From 93fc836f252a1f5aafdac732df32807362246a82 Mon Sep 17 00:00:00 2001 From: morethanwords Date: Sun, 26 Apr 2020 15:19:17 +0300 Subject: [PATCH] Moved MTProto to worker --- package-lock.json | 9 + package.json | 1 + src/components/chatInput.ts | 3 +- src/components/emoticonsDropdown.ts | 8 +- src/components/misc.ts | 1 + src/components/wrappers.ts | 5 +- src/lib/appManagers/apiUpdatesManager.ts | 7 +- src/lib/appManagers/appImManager.ts | 3 +- src/lib/appManagers/appMediaViewer.ts | 1 - src/lib/appManagers/appMessagesManager.ts | 7 +- src/lib/appManagers/appPhotosManager.ts | 25 +- src/lib/appManagers/appSharedMediaManager.ts | 5 - src/lib/appManagers/appSidebarLeft.ts | 3 +- src/lib/appManagers/appStickersManager.ts | 3 +- src/lib/appManagers/appUsersManager.ts | 3 +- src/lib/config.js | 320 - src/lib/config.ts | 75 + src/lib/crypto/crypto_methods.ts | 46 + src/lib/crypto/cryptoworker.ts | 88 +- src/lib/filemanager.ts | 11 +- src/lib/idb.ts | 41 +- src/lib/mtproto/apiFileManager.ts | 3 +- src/lib/mtproto/apiManager.ts | 19 +- src/lib/mtproto/authorizer.ts | 7 +- src/lib/mtproto/dcConfigurator.ts | 11 +- src/lib/mtproto/mtproto.ts | 15 +- src/lib/mtproto/mtproto.worker.js | 41 + src/lib/mtproto/mtproto_config.ts | 15 + src/lib/mtproto/mtprotoworker.ts | 150 + src/lib/mtproto/networker.ts | 70 +- src/lib/mtproto/networkerFactory.ts | 14 +- src/lib/mtproto/passwordManager.ts | 16 - src/lib/mtproto/rsaKeysManager.ts | 4 +- src/lib/mtproto/schema.ts | 5 + src/lib/{ => mtproto}/tl_utils.ts | 1530 +- src/lib/richtextprocessor.js | 1 + src/lib/storage.ts | 209 +- src/lib/utils.js | 6 +- src/pages/pageAuthCode.ts | 14 +- src/pages/pagePassword.ts | 45 +- src/pages/pageSignIn.ts | 26 +- src/pages/pageSignUp.ts | 3 +- stats.json | 26517 +++++++++-------- tsconfig.json | 2 +- webpack.common.js | 12 +- 45 files changed, 15628 insertions(+), 13772 deletions(-) delete mode 100644 src/lib/appManagers/appSharedMediaManager.ts delete mode 100644 src/lib/config.js create mode 100644 src/lib/config.ts create mode 100644 src/lib/crypto/crypto_methods.ts create mode 100644 src/lib/mtproto/mtproto.worker.js create mode 100644 src/lib/mtproto/mtproto_config.ts create mode 100644 src/lib/mtproto/mtprotoworker.ts create mode 100644 src/lib/mtproto/schema.ts rename src/lib/{ => mtproto}/tl_utils.ts (92%) diff --git a/package-lock.json b/package-lock.json index a2090541..e4561477 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5633,6 +5633,15 @@ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", "dev": true }, + "ifdef-loader": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/ifdef-loader/-/ifdef-loader-2.1.5.tgz", + "integrity": "sha512-GMUW5L8ZjsKRGABV3iXLdNFe2l7qFp9jeGYS55I6RNZLgQpicKxUfdH5oLDJ1cu+udb0hZiglwW6nX2kzgy86w==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0" + } + }, "iferr": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", diff --git a/package.json b/package.json index cf1d3028..82e85742 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "fastdom": "^1.0.9", "file-loader": "^4.3.0", "html-webpack-plugin": "^3.2.0", + "ifdef-loader": "^2.1.5", "install": "^0.13.0", "jest": "^24.9.0", "leemon": "^6.2.0", diff --git a/src/components/chatInput.ts b/src/components/chatInput.ts index 71a2cab4..2001cdfc 100644 --- a/src/components/chatInput.ts +++ b/src/components/chatInput.ts @@ -1,7 +1,8 @@ import Scrollable from "./scrollable"; import LazyLoadQueue from "./lazyLoadQueue"; import { RichTextProcessor } from "../lib/richtextprocessor"; -import apiManager from "../lib/mtproto/apiManager"; +//import apiManager from "../lib/mtproto/apiManager"; +import apiManager from "../lib/mtproto/mtprotoworker"; import appWebPagesManager from "../lib/appManagers/appWebPagesManager"; import appImManager from "../lib/appManagers/appImManager"; import { calcImageInBox, getRichValue } from "../lib/utils"; diff --git a/src/components/emoticonsDropdown.ts b/src/components/emoticonsDropdown.ts index 09053a31..ddc99d10 100644 --- a/src/components/emoticonsDropdown.ts +++ b/src/components/emoticonsDropdown.ts @@ -6,13 +6,15 @@ import Scrollable from "./scrollable"; import { findUpTag, whichChild, calcImageInBox } from "../lib/utils"; import { RichTextProcessor } from "../lib/richtextprocessor"; import appStickersManager, { MTStickerSet } from "../lib/appManagers/appStickersManager"; -import apiManager from '../lib/mtproto/apiManager'; -import CryptoWorker from '../lib/crypto/cryptoworker'; +//import apiManager from '../lib/mtproto/apiManager'; +import apiManager from '../lib/mtproto/mtprotoworker'; +//import CryptoWorker from '../lib/crypto/cryptoworker'; import LazyLoadQueue from "./lazyLoadQueue"; import { MTDocument, wrapSticker } from "./wrappers"; import appWebpManager from "../lib/appManagers/appWebpManager"; import appDocsManager from "../lib/appManagers/appDocsManager"; import ProgressivePreloader from "./preloader"; +import Config from "../lib/config"; export const EMOTICONSSTICKERGROUP = 'emoticons-dropdown'; @@ -369,7 +371,7 @@ const initEmoticonsDropdown = (pageEl: HTMLDivElement, reader.addEventListener('loadend', async(e) => { // @ts-ignore const text = e.srcElement.result; - let json = await CryptoWorker.gzipUncompress(text, true); + let json = await apiManager.gzipUncompress(text, true); let animation = await lottieLoader.loadAnimation({ container: li, diff --git a/src/components/misc.ts b/src/components/misc.ts index 2f865cb9..b9a1a1ce 100644 --- a/src/components/misc.ts +++ b/src/components/misc.ts @@ -1,4 +1,5 @@ import { whichChild, findUpTag } from "../lib/utils"; +import Config from "../lib/config"; let rippleClickID = 0; export function ripple(elem: HTMLElement, callback: (id: number) => Promise = () => Promise.resolve(), onEnd: (id: number) => void = null) { diff --git a/src/components/wrappers.ts b/src/components/wrappers.ts index 258df723..99484c66 100644 --- a/src/components/wrappers.ts +++ b/src/components/wrappers.ts @@ -1,5 +1,6 @@ import appPhotosManager from '../lib/appManagers/appPhotosManager'; -import CryptoWorker from '../lib/crypto/cryptoworker'; +//import CryptoWorker from '../lib/crypto/cryptoworker'; +import apiManager from '../lib/mtproto/mtprotoworker'; import LottieLoader from '../lib/lottieLoader'; import appStickersManager from "../lib/appManagers/appStickersManager"; import appDocsManager from "../lib/appManagers/appDocsManager"; @@ -709,7 +710,7 @@ export function wrapSticker(doc: MTDocument, div: HTMLDivElement, middleware?: ( console.time('render sticker' + doc.id); // @ts-ignore const text = e.srcElement.result; - let json = await CryptoWorker.gzipUncompress(text, true); + let json = await apiManager.gzipUncompress(text, true); console.timeEnd('decompress sticker' + doc.id); diff --git a/src/lib/appManagers/apiUpdatesManager.ts b/src/lib/appManagers/apiUpdatesManager.ts index 2d57993e..f7291510 100644 --- a/src/lib/appManagers/apiUpdatesManager.ts +++ b/src/lib/appManagers/apiUpdatesManager.ts @@ -1,5 +1,6 @@ -import apiManager from '../mtproto/apiManager'; -import networkerFactory from '../mtproto/networkerFactory'; +//import apiManager from '../mtproto/apiManager'; +import apiManager from '../mtproto/mtprotoworker'; +//import networkerFactory from '../mtproto/networkerFactory'; import { dT, $rootScope, tsNow } from "../utils"; import appPeersManager from "./appPeersManager"; import appUsersManager from "./appUsersManager"; @@ -500,7 +501,7 @@ export class ApiUpdatesManager { } public attach() { - networkerFactory.setUpdatesProcessor(this.processUpdateMessage.bind(this)); + apiManager.setUpdatesProcessor(this.processUpdateMessage.bind(this)); apiManager.invokeApi('updates.getState', {}, {noErrorBox: true}).then((stateResult: any) => { this.updatesState.seq = stateResult.seq; this.updatesState.pts = stateResult.pts; diff --git a/src/lib/appManagers/appImManager.ts b/src/lib/appManagers/appImManager.ts index 2e766a3c..747689a4 100644 --- a/src/lib/appManagers/appImManager.ts +++ b/src/lib/appManagers/appImManager.ts @@ -1,4 +1,5 @@ -import apiManager from '../mtproto/apiManager'; +//import apiManager from '../mtproto/apiManager'; +import apiManager from '../mtproto/mtprotoworker'; import { $rootScope, isElementInViewport, numberWithCommas, findUpClassName, formatNumber, placeCaretAtEnd, calcImageInBox, findUpTag, langPack } from "../utils"; import appUsersManager from "./appUsersManager"; import appMessagesManager from "./appMessagesManager"; diff --git a/src/lib/appManagers/appMediaViewer.ts b/src/lib/appManagers/appMediaViewer.ts index 442eb4f0..c2f7d291 100644 --- a/src/lib/appManagers/appMediaViewer.ts +++ b/src/lib/appManagers/appMediaViewer.ts @@ -1,5 +1,4 @@ import appPeersManager from "./appPeersManager"; -import appDialogsManager from "./appDialogsManager"; import appPhotosManager from "./appPhotosManager"; import appMessagesManager from "./appMessagesManager"; import { RichTextProcessor } from "../richtextprocessor"; diff --git a/src/lib/appManagers/appMessagesManager.ts b/src/lib/appManagers/appMessagesManager.ts index 216c6189..7dbddc31 100644 --- a/src/lib/appManagers/appMessagesManager.ts +++ b/src/lib/appManagers/appMessagesManager.ts @@ -17,7 +17,8 @@ import appImManager from "./appImManager"; import { MTDocument, MTPhotoSize } from "../../components/wrappers"; import ProgressivePreloader from "../../components/preloader"; import serverTimeManager from "../mtproto/serverTimeManager"; -import apiManager from "../mtproto/apiManager"; +//import apiManager from '../mtproto/apiManager'; +import apiManager from '../mtproto/mtprotoworker'; import appWebPagesManager from "./appWebPagesManager"; import { CancellablePromise, deferredPromise } from "../polyfill"; @@ -2925,9 +2926,9 @@ export class AppMessagesManager { limit = Math.max(10, prerendered, unreadCount + 2); unreadOffset = unreadCount; } - } else if('Mobile' in Config) { + }/* else if('Mobile' in Config) { limit = 20; - } + } */ } if(maxID > 0) { diff --git a/src/lib/appManagers/appPhotosManager.ts b/src/lib/appManagers/appPhotosManager.ts index ee33b9fb..0c3e80ea 100644 --- a/src/lib/appManagers/appPhotosManager.ts +++ b/src/lib/appManagers/appPhotosManager.ts @@ -4,7 +4,8 @@ import fileManager from '../filemanager'; import { bytesFromHex } from "../bin_utils"; import { MTPhotoSize } from "../../components/wrappers"; import apiFileManager from "../mtproto/apiFileManager"; -import apiManager from "../mtproto/apiManager"; +//import apiManager from '../mtproto/apiManager'; +import apiManager from '../mtproto/mtprotoworker'; export type MTPhoto = { _: 'photo' | 'photoEmpty' | string, @@ -89,7 +90,8 @@ export class AppPhotosManager { } public choosePhotoSize(photo: any, width = 0, height = 0) { - if(Config.Navigator.retina) { + //if(Config.Navigator.retina) { + if(window.devicePixelRatio > 1) { width *= 2; height *= 2; } @@ -104,8 +106,21 @@ export class AppPhotosManager { b crop 320x320 c crop 640x640 d crop 1280x1280 */ - + let bestPhotoSize: MTPhotoSize = {_: 'photoSizeEmpty'}; + let sizes = (photo.sizes || photo.thumbs) as typeof bestPhotoSize[]; + for(let photoSize of sizes) { + if(!photoSize.w || !photoSize.h) continue; + + bestPhotoSize = photoSize; + + let {w, h} = calcImageInBox(photoSize.w, photoSize.h, width, height); + if(w == width || h == height) { + break; + } + } + + /* let bestPhotoSize: MTPhotoSize = {_: 'photoSizeEmpty'}; let bestDiff = 0xFFFFFF; //console.log('choosePhotoSize', photo); @@ -123,9 +138,9 @@ export class AppPhotosManager { } //console.log('diff', diff, photoSize, bestPhotoSize); - }); + }); */ - //console.log('choosing', photo, width, height, bestPhotoSize); + console.log('choosing', photo, width, height, bestPhotoSize); return bestPhotoSize; } diff --git a/src/lib/appManagers/appSharedMediaManager.ts b/src/lib/appManagers/appSharedMediaManager.ts deleted file mode 100644 index 360bfe8e..00000000 --- a/src/lib/appManagers/appSharedMediaManager.ts +++ /dev/null @@ -1,5 +0,0 @@ -class AppSharedMediaManager { - -} - -export default new AppSharedMediaManager(); diff --git a/src/lib/appManagers/appSidebarLeft.ts b/src/lib/appManagers/appSidebarLeft.ts index c91cffce..8e994643 100644 --- a/src/lib/appManagers/appSidebarLeft.ts +++ b/src/lib/appManagers/appSidebarLeft.ts @@ -2,7 +2,8 @@ import appDialogsManager from "./appDialogsManager"; import { $rootScope } from "../utils"; import appImManager from "./appImManager"; -import apiManager from "../mtproto/apiManager"; +//import apiManager from '../mtproto/apiManager'; +import apiManager from '../mtproto/mtprotoworker'; import AppSearch, { SearchGroup } from "../../components/appSearch"; class AppSidebarLeft { diff --git a/src/lib/appManagers/appStickersManager.ts b/src/lib/appManagers/appStickersManager.ts index 36dd53a1..256dc187 100644 --- a/src/lib/appManagers/appStickersManager.ts +++ b/src/lib/appManagers/appStickersManager.ts @@ -1,6 +1,7 @@ import AppStorage from '../storage'; import { MTDocument } from '../../components/wrappers'; -import apiManager from '../mtproto/apiManager'; +//import apiManager from '../mtproto/apiManager'; +import apiManager from '../mtproto/mtprotoworker'; import apiFileManager from '../mtproto/apiFileManager'; import appDocsManager from './appDocsManager'; diff --git a/src/lib/appManagers/appUsersManager.ts b/src/lib/appManagers/appUsersManager.ts index dc0de35d..8d668bbf 100644 --- a/src/lib/appManagers/appUsersManager.ts +++ b/src/lib/appManagers/appUsersManager.ts @@ -1,7 +1,8 @@ import { SearchIndexManager, safeReplaceObject, isObject, tsNow, copy, $rootScope } from "../utils"; import { RichTextProcessor } from "../richtextprocessor"; import appChatsManager from "./appChatsManager"; -import apiManager from "../mtproto/apiManager"; +//import apiManager from '../mtproto/apiManager'; +import apiManager from '../mtproto/mtprotoworker'; import serverTimeManager from "../mtproto/serverTimeManager"; export class AppUsersManager { diff --git a/src/lib/config.js b/src/lib/config.js deleted file mode 100644 index c521474c..00000000 --- a/src/lib/config.js +++ /dev/null @@ -1,320 +0,0 @@ -/*! - * Webogram v0.7.0 - messaging web application for MTProto - * https://github.com/zhukov/webogram - * Copyright (C) 2014 Igor Zhukov - * https://github.com/zhukov/webogram/blob/master/LICENSE - */ - -Config = window.Config || {}; - -/* - - IMPORTANT NOTICE - ================ - - Do not publish your Webogram fork with my app credentials (below), or your application may be blocked. - You can get your own api_id, api_hash at https://my.telegram.org, see manual at https://core.telegram.org/api/obtaining_api_id. - -*/ - -Config.App = { - id: 1025907, - hash: '452b0359b988148995f22ff0f4229750', - version: '0.3.0', - domains: [], - baseDcID: 2 -}; - -Config.Modes = { - test: location.search.indexOf('test=1') > 0/* || true */, - debug: location.search.indexOf('debug=1') > 0, - http: location.search.indexOf('http=1') > 0, - ssl: location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:' && location.search.indexOf('ssl=0') == -1, - force_mobile: location.search.indexOf('mobile=1') > 0, - force_desktop: location.search.indexOf('desktop=1') > 0, - webcrypto: location.search.indexOf('webcrypto=0') == -1 && 1 == 2, - packed: location.protocol == 'app:' || location.protocol == 'chrome-extension:', - ios_standalone: window.navigator.standalone && navigator.userAgent.match(/iOS|iPhone|iPad/), - chrome_packed: window.chrome && chrome.app && chrome.app.window && true || false, - animations: true, - memory_only: false, - allow_tmpfs: location.search.indexOf('tmpfs=yeahImSureIknowWhatImDoing') > 0 || false, - push_api: location.search.indexOf('push=1') == -1, - multipleConnections: true -}; - -Config.Mobile = false; - -Config.Navigator = { - nativeEmoji: /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform || ''), - osX: (navigator.platform || '').toLowerCase().indexOf('mac') != -1 || - (navigator.userAgent || '').toLowerCase().indexOf('mac') != -1, - msie: (navigator.userAgent || '').search(/MSIE | Trident\/|Edge\//) != -1, - retina: window.devicePixelRatio > 1, - ffos: navigator.userAgent.search(/mobi.+Gecko/i) != -1, - ffos2p: navigator.userAgent.search(/mobi.+Gecko\/[34567]/i) != -1, - touch: screen.width <= 768 || ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch, - mobile: screen.width && screen.width < 480 || navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i) != -1 -}; - -Config.ExtCredentials = { - gmaps: { - api_key: 'AIzaSyC72t5GDcP-dob20d-ARwSwOQ41-zgbArg' - } -}; - -{ - /* let img_size = 32; - let side = 52; - let sheetUrl = `assets/img/sheet_apple_${img_size}_`; // #.png - let multiplyX = 100 / 6; - let sheetSizeX = 6 * (img_size + 2); // size of image in pixels - let sheetSizeY = side * (img_size + 2); // size of image in pixels - let sizeX = 100 * (sheetSizeX / img_size); - let sizeY = 100 * (sheetSizeY / img_size); - let splitted = true; */ - - let img_size = 64; - let side = 56; - let sheetUrl = `assets/img/sheet_apple_${img_size}`; // #.png - let multiplyX = 100 / side; - let sheetSizeX = side * (img_size + 2); // size of image in pixels - let sheetSizeY = side * (img_size + 2); // size of image in pixels - let sizeX = 100 * (sheetSizeX / img_size); - let sizeY = 100 * (sheetSizeY / img_size); - let splitted = false; - - Config.Emoji = { - img_size, - sheetUrl, - multiplyX, - sheetSizeX, - sheetSizeY, - sizeX, - sizeY, - side, - splitted, - keyCategory: 'category', - keyX: 'sheet_x', - keyY: 'sheet_y', - /* keyCategory: '2', - keyX: '0', // 'sheet_x' - keyY: '1', // 'sheet_y' */ - - emoji: {"#️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":0,"sort_order":132},"*️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":1,"sort_order":133},"0️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":2,"sort_order":134},"1️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":3,"sort_order":135},"2️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":4,"sort_order":136},"3️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":5,"sort_order":137},"4️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":6,"sort_order":138},"5️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":7,"sort_order":139},"6️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":8,"sort_order":140},"7️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":9,"sort_order":141},"8️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":10,"sort_order":142},"9️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":11,"sort_order":143},"©️":{"category":"Symbols","sheet_x":0,"sheet_y":12,"sort_order":129},"®️":{"category":"Symbols","sheet_x":0,"sheet_y":13,"sort_order":130},"🀄":{"category":"Activities","sheet_x":0,"sheet_y":14,"sort_order":73},"🃏":{"category":"Activities","sheet_x":0,"sheet_y":15,"sort_order":72},"🅰️":{"category":"Symbols","sheet_x":0,"sheet_y":16,"sort_order":150},"🅱️":{"category":"Symbols","sheet_x":0,"sheet_y":17,"sort_order":152},"🅾️":{"category":"Symbols","sheet_x":0,"sheet_y":18,"sort_order":161},"🅿️":{"category":"Symbols","sheet_x":0,"sheet_y":19,"sort_order":163},"🆎":{"category":"Symbols","sheet_x":0,"sheet_y":20,"sort_order":151},"🆑":{"category":"Symbols","sheet_x":0,"sheet_y":21,"sort_order":153},"🆒":{"category":"Symbols","sheet_x":0,"sheet_y":22,"sort_order":154},"🆓":{"category":"Symbols","sheet_x":0,"sheet_y":23,"sort_order":155},"🆔":{"category":"Symbols","sheet_x":0,"sheet_y":24,"sort_order":157},"🆕":{"category":"Symbols","sheet_x":0,"sheet_y":25,"sort_order":159},"🆖":{"category":"Symbols","sheet_x":0,"sheet_y":26,"sort_order":160},"🆗":{"category":"Symbols","sheet_x":0,"sheet_y":27,"sort_order":162},"🆘":{"category":"Symbols","sheet_x":0,"sheet_y":28,"sort_order":164},"🆙":{"category":"Symbols","sheet_x":0,"sheet_y":29,"sort_order":165},"🆚":{"category":"Symbols","sheet_x":0,"sheet_y":30,"sort_order":166},"🇦🇨":{"category":"Flags","sheet_x":0,"sheet_y":31,"sort_order":8},"🇦🇩":{"category":"Flags","sheet_x":0,"sheet_y":32,"sort_order":9},"🇦🇪":{"category":"Flags","sheet_x":0,"sheet_y":33,"sort_order":10},"🇦🇫":{"category":"Flags","sheet_x":0,"sheet_y":34,"sort_order":11},"🇦🇬":{"category":"Flags","sheet_x":0,"sheet_y":35,"sort_order":12},"🇦🇮":{"category":"Flags","sheet_x":0,"sheet_y":36,"sort_order":13},"🇦🇱":{"category":"Flags","sheet_x":0,"sheet_y":37,"sort_order":14},"🇦🇲":{"category":"Flags","sheet_x":0,"sheet_y":38,"sort_order":15},"🇦🇴":{"category":"Flags","sheet_x":0,"sheet_y":39,"sort_order":16},"🇦🇶":{"category":"Flags","sheet_x":0,"sheet_y":40,"sort_order":17},"🇦🇷":{"category":"Flags","sheet_x":0,"sheet_y":41,"sort_order":18},"🇦🇸":{"category":"Flags","sheet_x":0,"sheet_y":42,"sort_order":19},"🇦🇹":{"category":"Flags","sheet_x":0,"sheet_y":43,"sort_order":20},"🇦🇺":{"category":"Flags","sheet_x":0,"sheet_y":44,"sort_order":21},"🇦🇼":{"category":"Flags","sheet_x":0,"sheet_y":45,"sort_order":22},"🇦🇽":{"category":"Flags","sheet_x":0,"sheet_y":46,"sort_order":23},"🇦🇿":{"category":"Flags","sheet_x":0,"sheet_y":47,"sort_order":24},"🇧🇦":{"category":"Flags","sheet_x":0,"sheet_y":48,"sort_order":25},"🇧🇧":{"category":"Flags","sheet_x":0,"sheet_y":49,"sort_order":26},"🇧🇩":{"category":"Flags","sheet_x":0,"sheet_y":50,"sort_order":27},"🇧🇪":{"category":"Flags","sheet_x":0,"sheet_y":51,"sort_order":28},"🇧🇫":{"category":"Flags","sheet_x":0,"sheet_y":52,"sort_order":29},"🇧🇬":{"category":"Flags","sheet_x":0,"sheet_y":53,"sort_order":30},"🇧🇭":{"category":"Flags","sheet_x":0,"sheet_y":54,"sort_order":31},"🇧🇮":{"category":"Flags","sheet_x":0,"sheet_y":55,"sort_order":32},"🇧🇯":{"category":"Flags","sheet_x":0,"sheet_y":56,"sort_order":33},"🇧🇱":{"category":"Flags","sheet_x":1,"sheet_y":0,"sort_order":34},"🇧🇲":{"category":"Flags","sheet_x":1,"sheet_y":1,"sort_order":35},"🇧🇳":{"category":"Flags","sheet_x":1,"sheet_y":2,"sort_order":36},"🇧🇴":{"category":"Flags","sheet_x":1,"sheet_y":3,"sort_order":37},"🇧🇶":{"category":"Flags","sheet_x":1,"sheet_y":4,"sort_order":38},"🇧🇷":{"category":"Flags","sheet_x":1,"sheet_y":5,"sort_order":39},"🇧🇸":{"category":"Flags","sheet_x":1,"sheet_y":6,"sort_order":40},"🇧🇹":{"category":"Flags","sheet_x":1,"sheet_y":7,"sort_order":41},"🇧🇻":{"category":"Flags","sheet_x":1,"sheet_y":8,"sort_order":42},"🇧🇼":{"category":"Flags","sheet_x":1,"sheet_y":9,"sort_order":43},"🇧🇾":{"category":"Flags","sheet_x":1,"sheet_y":10,"sort_order":44},"🇧🇿":{"category":"Flags","sheet_x":1,"sheet_y":11,"sort_order":45},"🇨🇦":{"category":"Flags","sheet_x":1,"sheet_y":12,"sort_order":46},"🇨🇨":{"category":"Flags","sheet_x":1,"sheet_y":13,"sort_order":47},"🇨🇩":{"category":"Flags","sheet_x":1,"sheet_y":14,"sort_order":48},"🇨🇫":{"category":"Flags","sheet_x":1,"sheet_y":15,"sort_order":49},"🇨🇬":{"category":"Flags","sheet_x":1,"sheet_y":16,"sort_order":50},"🇨🇭":{"category":"Flags","sheet_x":1,"sheet_y":17,"sort_order":51},"🇨🇮":{"category":"Flags","sheet_x":1,"sheet_y":18,"sort_order":52},"🇨🇰":{"category":"Flags","sheet_x":1,"sheet_y":19,"sort_order":53},"🇨🇱":{"category":"Flags","sheet_x":1,"sheet_y":20,"sort_order":54},"🇨🇲":{"category":"Flags","sheet_x":1,"sheet_y":21,"sort_order":55},"🇨🇳":{"category":"Flags","sheet_x":1,"sheet_y":22,"sort_order":56},"🇨🇴":{"category":"Flags","sheet_x":1,"sheet_y":23,"sort_order":57},"🇨🇵":{"category":"Flags","sheet_x":1,"sheet_y":24,"sort_order":58},"🇨🇷":{"category":"Flags","sheet_x":1,"sheet_y":25,"sort_order":59},"🇨🇺":{"category":"Flags","sheet_x":1,"sheet_y":26,"sort_order":60},"🇨🇻":{"category":"Flags","sheet_x":1,"sheet_y":27,"sort_order":61},"🇨🇼":{"category":"Flags","sheet_x":1,"sheet_y":28,"sort_order":62},"🇨🇽":{"category":"Flags","sheet_x":1,"sheet_y":29,"sort_order":63},"🇨🇾":{"category":"Flags","sheet_x":1,"sheet_y":30,"sort_order":64},"🇨🇿":{"category":"Flags","sheet_x":1,"sheet_y":31,"sort_order":65},"🇩🇪":{"category":"Flags","sheet_x":1,"sheet_y":32,"sort_order":66},"🇩🇬":{"category":"Flags","sheet_x":1,"sheet_y":33,"sort_order":67},"🇩🇯":{"category":"Flags","sheet_x":1,"sheet_y":34,"sort_order":68},"🇩🇰":{"category":"Flags","sheet_x":1,"sheet_y":35,"sort_order":69},"🇩🇲":{"category":"Flags","sheet_x":1,"sheet_y":36,"sort_order":70},"🇩🇴":{"category":"Flags","sheet_x":1,"sheet_y":37,"sort_order":71},"🇩🇿":{"category":"Flags","sheet_x":1,"sheet_y":38,"sort_order":72},"🇪🇦":{"category":"Flags","sheet_x":1,"sheet_y":39,"sort_order":73},"🇪🇨":{"category":"Flags","sheet_x":1,"sheet_y":40,"sort_order":74},"🇪🇪":{"category":"Flags","sheet_x":1,"sheet_y":41,"sort_order":75},"🇪🇬":{"category":"Flags","sheet_x":1,"sheet_y":42,"sort_order":76},"🇪🇭":{"category":"Flags","sheet_x":1,"sheet_y":43,"sort_order":77},"🇪🇷":{"category":"Flags","sheet_x":1,"sheet_y":44,"sort_order":78},"🇪🇸":{"category":"Flags","sheet_x":1,"sheet_y":45,"sort_order":79},"🇪🇹":{"category":"Flags","sheet_x":1,"sheet_y":46,"sort_order":80},"🇪🇺":{"category":"Flags","sheet_x":1,"sheet_y":47,"sort_order":81},"🇫🇮":{"category":"Flags","sheet_x":1,"sheet_y":48,"sort_order":82},"🇫🇯":{"category":"Flags","sheet_x":1,"sheet_y":49,"sort_order":83},"🇫🇰":{"category":"Flags","sheet_x":1,"sheet_y":50,"sort_order":84},"🇫🇲":{"category":"Flags","sheet_x":1,"sheet_y":51,"sort_order":85},"🇫🇴":{"category":"Flags","sheet_x":1,"sheet_y":52,"sort_order":86},"🇫🇷":{"category":"Flags","sheet_x":1,"sheet_y":53,"sort_order":87},"🇬🇦":{"category":"Flags","sheet_x":1,"sheet_y":54,"sort_order":88},"🇬🇧":{"category":"Flags","sheet_x":1,"sheet_y":55,"sort_order":89},"🇬🇩":{"category":"Flags","sheet_x":1,"sheet_y":56,"sort_order":90},"🇬🇪":{"category":"Flags","sheet_x":2,"sheet_y":0,"sort_order":91},"🇬🇫":{"category":"Flags","sheet_x":2,"sheet_y":1,"sort_order":92},"🇬🇬":{"category":"Flags","sheet_x":2,"sheet_y":2,"sort_order":93},"🇬🇭":{"category":"Flags","sheet_x":2,"sheet_y":3,"sort_order":94},"🇬🇮":{"category":"Flags","sheet_x":2,"sheet_y":4,"sort_order":95},"🇬🇱":{"category":"Flags","sheet_x":2,"sheet_y":5,"sort_order":96},"🇬🇲":{"category":"Flags","sheet_x":2,"sheet_y":6,"sort_order":97},"🇬🇳":{"category":"Flags","sheet_x":2,"sheet_y":7,"sort_order":98},"🇬🇵":{"category":"Flags","sheet_x":2,"sheet_y":8,"sort_order":99},"🇬🇶":{"category":"Flags","sheet_x":2,"sheet_y":9,"sort_order":100},"🇬🇷":{"category":"Flags","sheet_x":2,"sheet_y":10,"sort_order":101},"🇬🇸":{"category":"Flags","sheet_x":2,"sheet_y":11,"sort_order":102},"🇬🇹":{"category":"Flags","sheet_x":2,"sheet_y":12,"sort_order":103},"🇬🇺":{"category":"Flags","sheet_x":2,"sheet_y":13,"sort_order":104},"🇬🇼":{"category":"Flags","sheet_x":2,"sheet_y":14,"sort_order":105},"🇬🇾":{"category":"Flags","sheet_x":2,"sheet_y":15,"sort_order":106},"🇭🇰":{"category":"Flags","sheet_x":2,"sheet_y":16,"sort_order":107},"🇭🇲":{"category":"Flags","sheet_x":2,"sheet_y":17,"sort_order":108},"🇭🇳":{"category":"Flags","sheet_x":2,"sheet_y":18,"sort_order":109},"🇭🇷":{"category":"Flags","sheet_x":2,"sheet_y":19,"sort_order":110},"🇭🇹":{"category":"Flags","sheet_x":2,"sheet_y":20,"sort_order":111},"🇭🇺":{"category":"Flags","sheet_x":2,"sheet_y":21,"sort_order":112},"🇮🇨":{"category":"Flags","sheet_x":2,"sheet_y":22,"sort_order":113},"🇮🇩":{"category":"Flags","sheet_x":2,"sheet_y":23,"sort_order":114},"🇮🇪":{"category":"Flags","sheet_x":2,"sheet_y":24,"sort_order":115},"🇮🇱":{"category":"Flags","sheet_x":2,"sheet_y":25,"sort_order":116},"🇮🇲":{"category":"Flags","sheet_x":2,"sheet_y":26,"sort_order":117},"🇮🇳":{"category":"Flags","sheet_x":2,"sheet_y":27,"sort_order":118},"🇮🇴":{"category":"Flags","sheet_x":2,"sheet_y":28,"sort_order":119},"🇮🇶":{"category":"Flags","sheet_x":2,"sheet_y":29,"sort_order":120},"🇮🇷":{"category":"Flags","sheet_x":2,"sheet_y":30,"sort_order":121},"🇮🇸":{"category":"Flags","sheet_x":2,"sheet_y":31,"sort_order":122},"🇮🇹":{"category":"Flags","sheet_x":2,"sheet_y":32,"sort_order":123},"🇯🇪":{"category":"Flags","sheet_x":2,"sheet_y":33,"sort_order":124},"🇯🇲":{"category":"Flags","sheet_x":2,"sheet_y":34,"sort_order":125},"🇯🇴":{"category":"Flags","sheet_x":2,"sheet_y":35,"sort_order":126},"🇯🇵":{"category":"Flags","sheet_x":2,"sheet_y":36,"sort_order":127},"🇰🇪":{"category":"Flags","sheet_x":2,"sheet_y":37,"sort_order":128},"🇰🇬":{"category":"Flags","sheet_x":2,"sheet_y":38,"sort_order":129},"🇰🇭":{"category":"Flags","sheet_x":2,"sheet_y":39,"sort_order":130},"🇰🇮":{"category":"Flags","sheet_x":2,"sheet_y":40,"sort_order":131},"🇰🇲":{"category":"Flags","sheet_x":2,"sheet_y":41,"sort_order":132},"🇰🇳":{"category":"Flags","sheet_x":2,"sheet_y":42,"sort_order":133},"🇰🇵":{"category":"Flags","sheet_x":2,"sheet_y":43,"sort_order":134},"🇰🇷":{"category":"Flags","sheet_x":2,"sheet_y":44,"sort_order":135},"🇰🇼":{"category":"Flags","sheet_x":2,"sheet_y":45,"sort_order":136},"🇰🇾":{"category":"Flags","sheet_x":2,"sheet_y":46,"sort_order":137},"🇰🇿":{"category":"Flags","sheet_x":2,"sheet_y":47,"sort_order":138},"🇱🇦":{"category":"Flags","sheet_x":2,"sheet_y":48,"sort_order":139},"🇱🇧":{"category":"Flags","sheet_x":2,"sheet_y":49,"sort_order":140},"🇱🇨":{"category":"Flags","sheet_x":2,"sheet_y":50,"sort_order":141},"🇱🇮":{"category":"Flags","sheet_x":2,"sheet_y":51,"sort_order":142},"🇱🇰":{"category":"Flags","sheet_x":2,"sheet_y":52,"sort_order":143},"🇱🇷":{"category":"Flags","sheet_x":2,"sheet_y":53,"sort_order":144},"🇱🇸":{"category":"Flags","sheet_x":2,"sheet_y":54,"sort_order":145},"🇱🇹":{"category":"Flags","sheet_x":2,"sheet_y":55,"sort_order":146},"🇱🇺":{"category":"Flags","sheet_x":2,"sheet_y":56,"sort_order":147},"🇱🇻":{"category":"Flags","sheet_x":3,"sheet_y":0,"sort_order":148},"🇱🇾":{"category":"Flags","sheet_x":3,"sheet_y":1,"sort_order":149},"🇲🇦":{"category":"Flags","sheet_x":3,"sheet_y":2,"sort_order":150},"🇲🇨":{"category":"Flags","sheet_x":3,"sheet_y":3,"sort_order":151},"🇲🇩":{"category":"Flags","sheet_x":3,"sheet_y":4,"sort_order":152},"🇲🇪":{"category":"Flags","sheet_x":3,"sheet_y":5,"sort_order":153},"🇲🇫":{"category":"Flags","sheet_x":3,"sheet_y":6,"sort_order":154},"🇲🇬":{"category":"Flags","sheet_x":3,"sheet_y":7,"sort_order":155},"🇲🇭":{"category":"Flags","sheet_x":3,"sheet_y":8,"sort_order":156},"🇲🇰":{"category":"Flags","sheet_x":3,"sheet_y":9,"sort_order":157},"🇲🇱":{"category":"Flags","sheet_x":3,"sheet_y":10,"sort_order":158},"🇲🇲":{"category":"Flags","sheet_x":3,"sheet_y":11,"sort_order":159},"🇲🇳":{"category":"Flags","sheet_x":3,"sheet_y":12,"sort_order":160},"🇲🇴":{"category":"Flags","sheet_x":3,"sheet_y":13,"sort_order":161},"🇲🇵":{"category":"Flags","sheet_x":3,"sheet_y":14,"sort_order":162},"🇲🇶":{"category":"Flags","sheet_x":3,"sheet_y":15,"sort_order":163},"🇲🇷":{"category":"Flags","sheet_x":3,"sheet_y":16,"sort_order":164},"🇲🇸":{"category":"Flags","sheet_x":3,"sheet_y":17,"sort_order":165},"🇲🇹":{"category":"Flags","sheet_x":3,"sheet_y":18,"sort_order":166},"🇲🇺":{"category":"Flags","sheet_x":3,"sheet_y":19,"sort_order":167},"🇲🇻":{"category":"Flags","sheet_x":3,"sheet_y":20,"sort_order":168},"🇲🇼":{"category":"Flags","sheet_x":3,"sheet_y":21,"sort_order":169},"🇲🇽":{"category":"Flags","sheet_x":3,"sheet_y":22,"sort_order":170},"🇲🇾":{"category":"Flags","sheet_x":3,"sheet_y":23,"sort_order":171},"🇲🇿":{"category":"Flags","sheet_x":3,"sheet_y":24,"sort_order":172},"🇳🇦":{"category":"Flags","sheet_x":3,"sheet_y":25,"sort_order":173},"🇳🇨":{"category":"Flags","sheet_x":3,"sheet_y":26,"sort_order":174},"🇳🇪":{"category":"Flags","sheet_x":3,"sheet_y":27,"sort_order":175},"🇳🇫":{"category":"Flags","sheet_x":3,"sheet_y":28,"sort_order":176},"🇳🇬":{"category":"Flags","sheet_x":3,"sheet_y":29,"sort_order":177},"🇳🇮":{"category":"Flags","sheet_x":3,"sheet_y":30,"sort_order":178},"🇳🇱":{"category":"Flags","sheet_x":3,"sheet_y":31,"sort_order":179},"🇳🇴":{"category":"Flags","sheet_x":3,"sheet_y":32,"sort_order":180},"🇳🇵":{"category":"Flags","sheet_x":3,"sheet_y":33,"sort_order":181},"🇳🇷":{"category":"Flags","sheet_x":3,"sheet_y":34,"sort_order":182},"🇳🇺":{"category":"Flags","sheet_x":3,"sheet_y":35,"sort_order":183},"🇳🇿":{"category":"Flags","sheet_x":3,"sheet_y":36,"sort_order":184},"🇴🇲":{"category":"Flags","sheet_x":3,"sheet_y":37,"sort_order":185},"🇵🇦":{"category":"Flags","sheet_x":3,"sheet_y":38,"sort_order":186},"🇵🇪":{"category":"Flags","sheet_x":3,"sheet_y":39,"sort_order":187},"🇵🇫":{"category":"Flags","sheet_x":3,"sheet_y":40,"sort_order":188},"🇵🇬":{"category":"Flags","sheet_x":3,"sheet_y":41,"sort_order":189},"🇵🇭":{"category":"Flags","sheet_x":3,"sheet_y":42,"sort_order":190},"🇵🇰":{"category":"Flags","sheet_x":3,"sheet_y":43,"sort_order":191},"🇵🇱":{"category":"Flags","sheet_x":3,"sheet_y":44,"sort_order":192},"🇵🇲":{"category":"Flags","sheet_x":3,"sheet_y":45,"sort_order":193},"🇵🇳":{"category":"Flags","sheet_x":3,"sheet_y":46,"sort_order":194},"🇵🇷":{"category":"Flags","sheet_x":3,"sheet_y":47,"sort_order":195},"🇵🇸":{"category":"Flags","sheet_x":3,"sheet_y":48,"sort_order":196},"🇵🇹":{"category":"Flags","sheet_x":3,"sheet_y":49,"sort_order":197},"🇵🇼":{"category":"Flags","sheet_x":3,"sheet_y":50,"sort_order":198},"🇵🇾":{"category":"Flags","sheet_x":3,"sheet_y":51,"sort_order":199},"🇶🇦":{"category":"Flags","sheet_x":3,"sheet_y":52,"sort_order":200},"🇷🇪":{"category":"Flags","sheet_x":3,"sheet_y":53,"sort_order":201},"🇷🇴":{"category":"Flags","sheet_x":3,"sheet_y":54,"sort_order":202},"🇷🇸":{"category":"Flags","sheet_x":3,"sheet_y":55,"sort_order":203},"🇷🇺":{"category":"Flags","sheet_x":3,"sheet_y":56,"sort_order":204},"🇷🇼":{"category":"Flags","sheet_x":4,"sheet_y":0,"sort_order":205},"🇸🇦":{"category":"Flags","sheet_x":4,"sheet_y":1,"sort_order":206},"🇸🇧":{"category":"Flags","sheet_x":4,"sheet_y":2,"sort_order":207},"🇸🇨":{"category":"Flags","sheet_x":4,"sheet_y":3,"sort_order":208},"🇸🇩":{"category":"Flags","sheet_x":4,"sheet_y":4,"sort_order":209},"🇸🇪":{"category":"Flags","sheet_x":4,"sheet_y":5,"sort_order":210},"🇸🇬":{"category":"Flags","sheet_x":4,"sheet_y":6,"sort_order":211},"🇸🇭":{"category":"Flags","sheet_x":4,"sheet_y":7,"sort_order":212},"🇸🇮":{"category":"Flags","sheet_x":4,"sheet_y":8,"sort_order":213},"🇸🇯":{"category":"Flags","sheet_x":4,"sheet_y":9,"sort_order":214},"🇸🇰":{"category":"Flags","sheet_x":4,"sheet_y":10,"sort_order":215},"🇸🇱":{"category":"Flags","sheet_x":4,"sheet_y":11,"sort_order":216},"🇸🇲":{"category":"Flags","sheet_x":4,"sheet_y":12,"sort_order":217},"🇸🇳":{"category":"Flags","sheet_x":4,"sheet_y":13,"sort_order":218},"🇸🇴":{"category":"Flags","sheet_x":4,"sheet_y":14,"sort_order":219},"🇸🇷":{"category":"Flags","sheet_x":4,"sheet_y":15,"sort_order":220},"🇸🇸":{"category":"Flags","sheet_x":4,"sheet_y":16,"sort_order":221},"🇸🇹":{"category":"Flags","sheet_x":4,"sheet_y":17,"sort_order":222},"🇸🇻":{"category":"Flags","sheet_x":4,"sheet_y":18,"sort_order":223},"🇸🇽":{"category":"Flags","sheet_x":4,"sheet_y":19,"sort_order":224},"🇸🇾":{"category":"Flags","sheet_x":4,"sheet_y":20,"sort_order":225},"🇸🇿":{"category":"Flags","sheet_x":4,"sheet_y":21,"sort_order":226},"🇹🇦":{"category":"Flags","sheet_x":4,"sheet_y":22,"sort_order":227},"🇹🇨":{"category":"Flags","sheet_x":4,"sheet_y":23,"sort_order":228},"🇹🇩":{"category":"Flags","sheet_x":4,"sheet_y":24,"sort_order":229},"🇹🇫":{"category":"Flags","sheet_x":4,"sheet_y":25,"sort_order":230},"🇹🇬":{"category":"Flags","sheet_x":4,"sheet_y":26,"sort_order":231},"🇹🇭":{"category":"Flags","sheet_x":4,"sheet_y":27,"sort_order":232},"🇹🇯":{"category":"Flags","sheet_x":4,"sheet_y":28,"sort_order":233},"🇹🇰":{"category":"Flags","sheet_x":4,"sheet_y":29,"sort_order":234},"🇹🇱":{"category":"Flags","sheet_x":4,"sheet_y":30,"sort_order":235},"🇹🇲":{"category":"Flags","sheet_x":4,"sheet_y":31,"sort_order":236},"🇹🇳":{"category":"Flags","sheet_x":4,"sheet_y":32,"sort_order":237},"🇹🇴":{"category":"Flags","sheet_x":4,"sheet_y":33,"sort_order":238},"🇹🇷":{"category":"Flags","sheet_x":4,"sheet_y":34,"sort_order":239},"🇹🇹":{"category":"Flags","sheet_x":4,"sheet_y":35,"sort_order":240},"🇹🇻":{"category":"Flags","sheet_x":4,"sheet_y":36,"sort_order":241},"🇹🇼":{"category":"Flags","sheet_x":4,"sheet_y":37,"sort_order":242},"🇹🇿":{"category":"Flags","sheet_x":4,"sheet_y":38,"sort_order":243},"🇺🇦":{"category":"Flags","sheet_x":4,"sheet_y":39,"sort_order":244},"🇺🇬":{"category":"Flags","sheet_x":4,"sheet_y":40,"sort_order":245},"🇺🇲":{"category":"Flags","sheet_x":4,"sheet_y":41,"sort_order":246},"🇺🇳":{"category":"Flags","sheet_x":4,"sheet_y":42,"sort_order":247},"🇺🇸":{"category":"Flags","sheet_x":4,"sheet_y":43,"sort_order":248},"🇺🇾":{"category":"Flags","sheet_x":4,"sheet_y":44,"sort_order":249},"🇺🇿":{"category":"Flags","sheet_x":4,"sheet_y":45,"sort_order":250},"🇻🇦":{"category":"Flags","sheet_x":4,"sheet_y":46,"sort_order":251},"🇻🇨":{"category":"Flags","sheet_x":4,"sheet_y":47,"sort_order":252},"🇻🇪":{"category":"Flags","sheet_x":4,"sheet_y":48,"sort_order":253},"🇻🇬":{"category":"Flags","sheet_x":4,"sheet_y":49,"sort_order":254},"🇻🇮":{"category":"Flags","sheet_x":4,"sheet_y":50,"sort_order":255},"🇻🇳":{"category":"Flags","sheet_x":4,"sheet_y":51,"sort_order":256},"🇻🇺":{"category":"Flags","sheet_x":4,"sheet_y":52,"sort_order":257},"🇼🇫":{"category":"Flags","sheet_x":4,"sheet_y":53,"sort_order":258},"🇼🇸":{"category":"Flags","sheet_x":4,"sheet_y":54,"sort_order":259},"🇽🇰":{"category":"Flags","sheet_x":4,"sheet_y":55,"sort_order":260},"🇾🇪":{"category":"Flags","sheet_x":4,"sheet_y":56,"sort_order":261},"🇾🇹":{"category":"Flags","sheet_x":5,"sheet_y":0,"sort_order":262},"🇿🇦":{"category":"Flags","sheet_x":5,"sheet_y":1,"sort_order":263},"🇿🇲":{"category":"Flags","sheet_x":5,"sheet_y":2,"sort_order":264},"🇿🇼":{"category":"Flags","sheet_x":5,"sheet_y":3,"sort_order":265},"🈁":{"category":"Symbols","sheet_x":5,"sheet_y":4,"sort_order":167},"🈂️":{"category":"Symbols","sheet_x":5,"sheet_y":5,"sort_order":168},"🈚":{"category":"Symbols","sheet_x":5,"sheet_y":6,"sort_order":174},"🈯":{"category":"Symbols","sheet_x":5,"sheet_y":7,"sort_order":171},"🈲":{"category":"Symbols","sheet_x":5,"sheet_y":8,"sort_order":175},"🈳":{"category":"Symbols","sheet_x":5,"sheet_y":9,"sort_order":179},"🈴":{"category":"Symbols","sheet_x":5,"sheet_y":10,"sort_order":178},"🈵":{"category":"Symbols","sheet_x":5,"sheet_y":11,"sort_order":183},"🈶":{"category":"Symbols","sheet_x":5,"sheet_y":12,"sort_order":170},"🈷️":{"category":"Symbols","sheet_x":5,"sheet_y":13,"sort_order":169},"🈸":{"category":"Symbols","sheet_x":5,"sheet_y":14,"sort_order":177},"🈹":{"category":"Symbols","sheet_x":5,"sheet_y":15,"sort_order":173},"🈺":{"category":"Symbols","sheet_x":5,"sheet_y":16,"sort_order":182},"🉐":{"category":"Symbols","sheet_x":5,"sheet_y":17,"sort_order":172},"🉑":{"category":"Symbols","sheet_x":5,"sheet_y":18,"sort_order":176},"🌀":{"category":"Travel & Places","sheet_x":5,"sheet_y":19,"sort_order":197},"🌁":{"category":"Travel & Places","sheet_x":5,"sheet_y":20,"sort_order":49},"🌂":{"category":"Travel & Places","sheet_x":5,"sheet_y":21,"sort_order":199},"🌃":{"category":"Travel & Places","sheet_x":5,"sheet_y":22,"sort_order":50},"🌄":{"category":"Travel & Places","sheet_x":5,"sheet_y":23,"sort_order":52},"🌅":{"category":"Travel & Places","sheet_x":5,"sheet_y":24,"sort_order":53},"🌆":{"category":"Travel & Places","sheet_x":5,"sheet_y":25,"sort_order":54},"🌇":{"category":"Travel & Places","sheet_x":5,"sheet_y":26,"sort_order":55},"🌈":{"category":"Travel & Places","sheet_x":5,"sheet_y":27,"sort_order":198},"🌉":{"category":"Travel & Places","sheet_x":5,"sheet_y":28,"sort_order":56},"🌊":{"category":"Travel & Places","sheet_x":5,"sheet_y":29,"sort_order":210},"🌋":{"category":"Travel & Places","sheet_x":5,"sheet_y":30,"sort_order":10},"🌌":{"category":"Travel & Places","sheet_x":5,"sheet_y":31,"sort_order":184},"🌍":{"category":"Travel & Places","sheet_x":5,"sheet_y":32,"sort_order":1},"🌎":{"category":"Travel & Places","sheet_x":5,"sheet_y":33,"sort_order":2},"🌏":{"category":"Travel & Places","sheet_x":5,"sheet_y":34,"sort_order":3},"🌐":{"category":"Travel & Places","sheet_x":5,"sheet_y":35,"sort_order":4},"🌑":{"category":"Travel & Places","sheet_x":5,"sheet_y":36,"sort_order":164},"🌒":{"category":"Travel & Places","sheet_x":5,"sheet_y":37,"sort_order":165},"🌓":{"category":"Travel & Places","sheet_x":5,"sheet_y":38,"sort_order":166},"🌔":{"category":"Travel & Places","sheet_x":5,"sheet_y":39,"sort_order":167},"🌕":{"category":"Travel & Places","sheet_x":5,"sheet_y":40,"sort_order":168},"🌖":{"category":"Travel & Places","sheet_x":5,"sheet_y":41,"sort_order":169},"🌗":{"category":"Travel & Places","sheet_x":5,"sheet_y":42,"sort_order":170},"🌘":{"category":"Travel & Places","sheet_x":5,"sheet_y":43,"sort_order":171},"🌙":{"category":"Travel & Places","sheet_x":5,"sheet_y":44,"sort_order":172},"🌚":{"category":"Travel & Places","sheet_x":5,"sheet_y":45,"sort_order":173},"🌛":{"category":"Travel & Places","sheet_x":5,"sheet_y":46,"sort_order":174},"🌜":{"category":"Travel & Places","sheet_x":5,"sheet_y":47,"sort_order":175},"🌝":{"category":"Travel & Places","sheet_x":5,"sheet_y":48,"sort_order":178},"🌞":{"category":"Travel & Places","sheet_x":5,"sheet_y":49,"sort_order":179},"🌟":{"category":"Travel & Places","sheet_x":5,"sheet_y":50,"sort_order":182},"🌠":{"category":"Travel & Places","sheet_x":5,"sheet_y":51,"sort_order":183},"🌡️":{"category":"Travel & Places","sheet_x":5,"sheet_y":52,"sort_order":176},"🌤️":{"category":"Travel & Places","sheet_x":5,"sheet_y":53,"sort_order":188},"🌥️":{"category":"Travel & Places","sheet_x":5,"sheet_y":54,"sort_order":189},"🌦️":{"category":"Travel & Places","sheet_x":5,"sheet_y":55,"sort_order":190},"🌧️":{"category":"Travel & Places","sheet_x":5,"sheet_y":56,"sort_order":191},"🌨️":{"category":"Travel & Places","sheet_x":6,"sheet_y":0,"sort_order":192},"🌩️":{"category":"Travel & Places","sheet_x":6,"sheet_y":1,"sort_order":193},"🌪️":{"category":"Travel & Places","sheet_x":6,"sheet_y":2,"sort_order":194},"🌫️":{"category":"Travel & Places","sheet_x":6,"sheet_y":3,"sort_order":195},"🌬️":{"category":"Travel & Places","sheet_x":6,"sheet_y":4,"sort_order":196},"🌭":{"category":"Food & Drink","sheet_x":6,"sheet_y":5,"sort_order":47},"🌮":{"category":"Food & Drink","sheet_x":6,"sheet_y":6,"sort_order":49},"🌯":{"category":"Food & Drink","sheet_x":6,"sheet_y":7,"sort_order":50},"🌰":{"category":"Food & Drink","sheet_x":6,"sheet_y":8,"sort_order":31},"🌱":{"category":"Animals & Nature","sheet_x":6,"sheet_y":9,"sort_order":116},"🌲":{"category":"Animals & Nature","sheet_x":6,"sheet_y":10,"sort_order":117},"🌳":{"category":"Animals & Nature","sheet_x":6,"sheet_y":11,"sort_order":118},"🌴":{"category":"Animals & Nature","sheet_x":6,"sheet_y":12,"sort_order":119},"🌵":{"category":"Animals & Nature","sheet_x":6,"sheet_y":13,"sort_order":120},"🌶️":{"category":"Food & Drink","sheet_x":6,"sheet_y":14,"sort_order":23},"🌷":{"category":"Animals & Nature","sheet_x":6,"sheet_y":15,"sort_order":115},"🌸":{"category":"Animals & Nature","sheet_x":6,"sheet_y":16,"sort_order":107},"🌹":{"category":"Animals & Nature","sheet_x":6,"sheet_y":17,"sort_order":110},"🌺":{"category":"Animals & Nature","sheet_x":6,"sheet_y":18,"sort_order":112},"🌻":{"category":"Animals & Nature","sheet_x":6,"sheet_y":19,"sort_order":113},"🌼":{"category":"Animals & Nature","sheet_x":6,"sheet_y":20,"sort_order":114},"🌽":{"category":"Food & Drink","sheet_x":6,"sheet_y":21,"sort_order":22},"🌾":{"category":"Animals & Nature","sheet_x":6,"sheet_y":22,"sort_order":121},"🌿":{"category":"Animals & Nature","sheet_x":6,"sheet_y":23,"sort_order":122},"🍀":{"category":"Animals & Nature","sheet_x":6,"sheet_y":24,"sort_order":124},"🍁":{"category":"Animals & Nature","sheet_x":6,"sheet_y":25,"sort_order":125},"🍂":{"category":"Animals & Nature","sheet_x":6,"sheet_y":26,"sort_order":126},"🍃":{"category":"Animals & Nature","sheet_x":6,"sheet_y":27,"sort_order":127},"🍄":{"category":"Food & Drink","sheet_x":6,"sheet_y":28,"sort_order":29},"🍅":{"category":"Food & Drink","sheet_x":6,"sheet_y":29,"sort_order":16},"🍆":{"category":"Food & Drink","sheet_x":6,"sheet_y":30,"sort_order":19},"🍇":{"category":"Food & Drink","sheet_x":6,"sheet_y":31,"sort_order":1},"🍈":{"category":"Food & Drink","sheet_x":6,"sheet_y":32,"sort_order":2},"🍉":{"category":"Food & Drink","sheet_x":6,"sheet_y":33,"sort_order":3},"🍊":{"category":"Food & Drink","sheet_x":6,"sheet_y":34,"sort_order":4},"🍋":{"category":"Food & Drink","sheet_x":6,"sheet_y":35,"sort_order":5},"🍌":{"category":"Food & Drink","sheet_x":6,"sheet_y":36,"sort_order":6},"🍍":{"category":"Food & Drink","sheet_x":6,"sheet_y":37,"sort_order":7},"🍎":{"category":"Food & Drink","sheet_x":6,"sheet_y":38,"sort_order":9},"🍏":{"category":"Food & Drink","sheet_x":6,"sheet_y":39,"sort_order":10},"🍐":{"category":"Food & Drink","sheet_x":6,"sheet_y":40,"sort_order":11},"🍑":{"category":"Food & Drink","sheet_x":6,"sheet_y":41,"sort_order":12},"🍒":{"category":"Food & Drink","sheet_x":6,"sheet_y":42,"sort_order":13},"🍓":{"category":"Food & Drink","sheet_x":6,"sheet_y":43,"sort_order":14},"🍔":{"category":"Food & Drink","sheet_x":6,"sheet_y":44,"sort_order":44},"🍕":{"category":"Food & Drink","sheet_x":6,"sheet_y":45,"sort_order":46},"🍖":{"category":"Food & Drink","sheet_x":6,"sheet_y":46,"sort_order":40},"🍗":{"category":"Food & Drink","sheet_x":6,"sheet_y":47,"sort_order":41},"🍘":{"category":"Food & Drink","sheet_x":6,"sheet_y":48,"sort_order":64},"🍙":{"category":"Food & Drink","sheet_x":6,"sheet_y":49,"sort_order":65},"🍚":{"category":"Food & Drink","sheet_x":6,"sheet_y":50,"sort_order":66},"🍛":{"category":"Food & Drink","sheet_x":6,"sheet_y":51,"sort_order":67},"🍜":{"category":"Food & Drink","sheet_x":6,"sheet_y":52,"sort_order":68},"🍝":{"category":"Food & Drink","sheet_x":6,"sheet_y":53,"sort_order":69},"🍞":{"category":"Food & Drink","sheet_x":6,"sheet_y":54,"sort_order":32},"🍟":{"category":"Food & Drink","sheet_x":6,"sheet_y":55,"sort_order":45},"🍠":{"category":"Food & Drink","sheet_x":6,"sheet_y":56,"sort_order":70},"🍡":{"category":"Food & Drink","sheet_x":7,"sheet_y":0,"sort_order":76},"🍢":{"category":"Food & Drink","sheet_x":7,"sheet_y":1,"sort_order":71},"🍣":{"category":"Food & Drink","sheet_x":7,"sheet_y":2,"sort_order":72},"🍤":{"category":"Food & Drink","sheet_x":7,"sheet_y":3,"sort_order":73},"🍥":{"category":"Food & Drink","sheet_x":7,"sheet_y":4,"sort_order":74},"🍦":{"category":"Food & Drink","sheet_x":7,"sheet_y":5,"sort_order":85},"🍧":{"category":"Food & Drink","sheet_x":7,"sheet_y":6,"sort_order":86},"🍨":{"category":"Food & Drink","sheet_x":7,"sheet_y":7,"sort_order":87},"🍩":{"category":"Food & Drink","sheet_x":7,"sheet_y":8,"sort_order":88},"🍪":{"category":"Food & Drink","sheet_x":7,"sheet_y":9,"sort_order":89},"🍫":{"category":"Food & Drink","sheet_x":7,"sheet_y":10,"sort_order":94},"🍬":{"category":"Food & Drink","sheet_x":7,"sheet_y":11,"sort_order":95},"🍭":{"category":"Food & Drink","sheet_x":7,"sheet_y":12,"sort_order":96},"🍮":{"category":"Food & Drink","sheet_x":7,"sheet_y":13,"sort_order":97},"🍯":{"category":"Food & Drink","sheet_x":7,"sheet_y":14,"sort_order":98},"🍰":{"category":"Food & Drink","sheet_x":7,"sheet_y":15,"sort_order":91},"🍱":{"category":"Food & Drink","sheet_x":7,"sheet_y":16,"sort_order":63},"🍲":{"category":"Food & Drink","sheet_x":7,"sheet_y":17,"sort_order":56},"🍳":{"category":"Food & Drink","sheet_x":7,"sheet_y":18,"sort_order":54},"🍴":{"category":"Food & Drink","sheet_x":7,"sheet_y":19,"sort_order":118},"🍵":{"category":"Food & Drink","sheet_x":7,"sheet_y":20,"sort_order":102},"🍶":{"category":"Food & Drink","sheet_x":7,"sheet_y":21,"sort_order":103},"🍷":{"category":"Food & Drink","sheet_x":7,"sheet_y":22,"sort_order":105},"🍸":{"category":"Food & Drink","sheet_x":7,"sheet_y":23,"sort_order":106},"🍹":{"category":"Food & Drink","sheet_x":7,"sheet_y":24,"sort_order":107},"🍺":{"category":"Food & Drink","sheet_x":7,"sheet_y":25,"sort_order":108},"🍻":{"category":"Food & Drink","sheet_x":7,"sheet_y":26,"sort_order":109},"🍼":{"category":"Food & Drink","sheet_x":7,"sheet_y":27,"sort_order":99},"🍽️":{"category":"Food & Drink","sheet_x":7,"sheet_y":28,"sort_order":117},"🍾":{"category":"Food & Drink","sheet_x":7,"sheet_y":29,"sort_order":104},"🍿":{"category":"Food & Drink","sheet_x":7,"sheet_y":30,"sort_order":59},"🎀":{"category":"Activities","sheet_x":7,"sheet_y":31,"sort_order":17},"🎁":{"category":"Activities","sheet_x":7,"sheet_y":32,"sort_order":18},"🎂":{"category":"Food & Drink","sheet_x":7,"sheet_y":33,"sort_order":90},"🎃":{"category":"Activities","sheet_x":7,"sheet_y":34,"sort_order":1},"🎄":{"category":"Activities","sheet_x":7,"sheet_y":35,"sort_order":2},"🎅":{"category":"People & Body","sheet_x":7,"sheet_y":36,"sort_order":177},"🎆":{"category":"Activities","sheet_x":7,"sheet_y":42,"sort_order":3},"🎇":{"category":"Activities","sheet_x":7,"sheet_y":43,"sort_order":4},"🎈":{"category":"Activities","sheet_x":7,"sheet_y":44,"sort_order":7},"🎉":{"category":"Activities","sheet_x":7,"sheet_y":45,"sort_order":8},"🎊":{"category":"Activities","sheet_x":7,"sheet_y":46,"sort_order":9},"🎋":{"category":"Activities","sheet_x":7,"sheet_y":47,"sort_order":10},"🎌":{"category":"Flags","sheet_x":7,"sheet_y":48,"sort_order":3},"🎍":{"category":"Activities","sheet_x":7,"sheet_y":49,"sort_order":11},"🎎":{"category":"Activities","sheet_x":7,"sheet_y":50,"sort_order":12},"🎏":{"category":"Activities","sheet_x":7,"sheet_y":51,"sort_order":13},"🎐":{"category":"Activities","sheet_x":7,"sheet_y":52,"sort_order":14},"🎑":{"category":"Activities","sheet_x":7,"sheet_y":53,"sort_order":15},"🎒":{"category":"Objects","sheet_x":7,"sheet_y":54,"sort_order":25},"🎓":{"category":"Objects","sheet_x":7,"sheet_y":55,"sort_order":37},"🎖️":{"category":"Activities","sheet_x":7,"sheet_y":56,"sort_order":22},"🎗️":{"category":"Activities","sheet_x":8,"sheet_y":0,"sort_order":19},"🎙️":{"category":"Objects","sheet_x":8,"sheet_y":1,"sort_order":56},"🎚️":{"category":"Objects","sheet_x":8,"sheet_y":2,"sort_order":57},"🎛️":{"category":"Objects","sheet_x":8,"sheet_y":3,"sort_order":58},"🎞️":{"category":"Objects","sheet_x":8,"sheet_y":4,"sort_order":89},"🎟️":{"category":"Activities","sheet_x":8,"sheet_y":5,"sort_order":20},"🎠":{"category":"Travel & Places","sheet_x":8,"sheet_y":6,"sort_order":58},"🎡":{"category":"Travel & Places","sheet_x":8,"sheet_y":7,"sort_order":59},"🎢":{"category":"Travel & Places","sheet_x":8,"sheet_y":8,"sort_order":60},"🎣":{"category":"Activities","sheet_x":8,"sheet_y":9,"sort_order":49},"🎤":{"category":"Objects","sheet_x":8,"sheet_y":10,"sort_order":59},"🎥":{"category":"Objects","sheet_x":8,"sheet_y":11,"sort_order":88},"🎦":{"category":"Symbols","sheet_x":8,"sheet_y":12,"sort_order":91},"🎧":{"category":"Objects","sheet_x":8,"sheet_y":13,"sort_order":60},"🎨":{"category":"Activities","sheet_x":8,"sheet_y":14,"sort_order":77},"🎩":{"category":"Objects","sheet_x":8,"sheet_y":15,"sort_order":36},"🎪":{"category":"Travel & Places","sheet_x":8,"sheet_y":16,"sort_order":62},"🎫":{"category":"Activities","sheet_x":8,"sheet_y":17,"sort_order":21},"🎬":{"category":"Objects","sheet_x":8,"sheet_y":18,"sort_order":91},"🎭":{"category":"Activities","sheet_x":8,"sheet_y":19,"sort_order":75},"🎮":{"category":"Activities","sheet_x":8,"sheet_y":20,"sort_order":61},"🎯":{"category":"Activities","sheet_x":8,"sheet_y":21,"sort_order":55},"🎰":{"category":"Activities","sheet_x":8,"sheet_y":22,"sort_order":63},"🎱":{"category":"Activities","sheet_x":8,"sheet_y":23,"sort_order":58},"🎲":{"category":"Activities","sheet_x":8,"sheet_y":24,"sort_order":64},"🎳":{"category":"Activities","sheet_x":8,"sheet_y":25,"sort_order":37},"🎴":{"category":"Activities","sheet_x":8,"sheet_y":26,"sort_order":74},"🎵":{"category":"Objects","sheet_x":8,"sheet_y":27,"sort_order":54},"🎶":{"category":"Objects","sheet_x":8,"sheet_y":28,"sort_order":55},"🎷":{"category":"Objects","sheet_x":8,"sheet_y":29,"sort_order":62},"🎸":{"category":"Objects","sheet_x":8,"sheet_y":30,"sort_order":63},"🎹":{"category":"Objects","sheet_x":8,"sheet_y":31,"sort_order":64},"🎺":{"category":"Objects","sheet_x":8,"sheet_y":32,"sort_order":65},"🎻":{"category":"Objects","sheet_x":8,"sheet_y":33,"sort_order":66},"🎼":{"category":"Objects","sheet_x":8,"sheet_y":34,"sort_order":53},"🎽":{"category":"Activities","sheet_x":8,"sheet_y":35,"sort_order":51},"🎾":{"category":"Activities","sheet_x":8,"sheet_y":36,"sort_order":35},"🎿":{"category":"Activities","sheet_x":8,"sheet_y":37,"sort_order":52},"🏀":{"category":"Activities","sheet_x":8,"sheet_y":38,"sort_order":31},"🏁":{"category":"Flags","sheet_x":8,"sheet_y":39,"sort_order":1},"🏂":{"category":"People & Body","sheet_x":8,"sheet_y":40,"sort_order":248},"🏃‍♀️":{"category":"People & Body","sheet_x":8,"sheet_y":46,"sort_order":232},"🏃‍♂️":{"category":"People & Body","sheet_x":8,"sheet_y":52,"sort_order":231},"🏃":{"category":"People & Body","sheet_x":9,"sheet_y":1,"sort_order":230},"🏄‍♀️":{"category":"People & Body","sheet_x":9,"sheet_y":7,"sort_order":254},"🏄‍♂️":{"category":"People & Body","sheet_x":9,"sheet_y":13,"sort_order":253},"🏄":{"category":"People & Body","sheet_x":9,"sheet_y":19,"sort_order":252},"🏅":{"category":"Activities","sheet_x":9,"sheet_y":25,"sort_order":24},"🏆":{"category":"Activities","sheet_x":9,"sheet_y":26,"sort_order":23},"🏇":{"category":"People & Body","sheet_x":9,"sheet_y":27,"sort_order":246},"🏈":{"category":"Activities","sheet_x":9,"sheet_y":33,"sort_order":33},"🏉":{"category":"Activities","sheet_x":9,"sheet_y":34,"sort_order":34},"🏊‍♀️":{"category":"People & Body","sheet_x":9,"sheet_y":35,"sort_order":260},"🏊‍♂️":{"category":"People & Body","sheet_x":9,"sheet_y":41,"sort_order":259},"🏊":{"category":"People & Body","sheet_x":9,"sheet_y":47,"sort_order":258},"🏋️‍♀️":{"category":"People & Body","sheet_x":9,"sheet_y":53,"sort_order":266},"🏋️‍♂️":{"category":"People & Body","sheet_x":10,"sheet_y":2,"sort_order":265},"🏋️":{"category":"People & Body","sheet_x":10,"sheet_y":8,"sort_order":264},"🏌️‍♀️":{"category":"People & Body","sheet_x":10,"sheet_y":14,"sort_order":251},"🏌️‍♂️":{"category":"People & Body","sheet_x":10,"sheet_y":20,"sort_order":250},"🏌️":{"category":"People & Body","sheet_x":10,"sheet_y":26,"sort_order":249},"🏍️":{"category":"Travel & Places","sheet_x":10,"sheet_y":32,"sort_order":92},"🏎️":{"category":"Travel & Places","sheet_x":10,"sheet_y":33,"sort_order":91},"🏏":{"category":"Activities","sheet_x":10,"sheet_y":34,"sort_order":38},"🏐":{"category":"Activities","sheet_x":10,"sheet_y":35,"sort_order":32},"🏑":{"category":"Activities","sheet_x":10,"sheet_y":36,"sort_order":39},"🏒":{"category":"Activities","sheet_x":10,"sheet_y":37,"sort_order":40},"🏓":{"category":"Activities","sheet_x":10,"sheet_y":38,"sort_order":42},"🏔️":{"category":"Travel & Places","sheet_x":10,"sheet_y":39,"sort_order":8},"🏕️":{"category":"Travel & Places","sheet_x":10,"sheet_y":40,"sort_order":12},"🏖️":{"category":"Travel & Places","sheet_x":10,"sheet_y":41,"sort_order":13},"🏗️":{"category":"Travel & Places","sheet_x":10,"sheet_y":42,"sort_order":19},"🏘️":{"category":"Travel & Places","sheet_x":10,"sheet_y":43,"sort_order":21},"🏙️":{"category":"Travel & Places","sheet_x":10,"sheet_y":44,"sort_order":51},"🏚️":{"category":"Travel & Places","sheet_x":10,"sheet_y":45,"sort_order":22},"🏛️":{"category":"Travel & Places","sheet_x":10,"sheet_y":46,"sort_order":18},"🏜️":{"category":"Travel & Places","sheet_x":10,"sheet_y":47,"sort_order":14},"🏝️":{"category":"Travel & Places","sheet_x":10,"sheet_y":48,"sort_order":15},"🏞️":{"category":"Travel & Places","sheet_x":10,"sheet_y":49,"sort_order":16},"🏟️":{"category":"Travel & Places","sheet_x":10,"sheet_y":50,"sort_order":17},"🏠":{"category":"Travel & Places","sheet_x":10,"sheet_y":51,"sort_order":23},"🏡":{"category":"Travel & Places","sheet_x":10,"sheet_y":52,"sort_order":24},"🏢":{"category":"Travel & Places","sheet_x":10,"sheet_y":53,"sort_order":25},"🏣":{"category":"Travel & Places","sheet_x":10,"sheet_y":54,"sort_order":26},"🏤":{"category":"Travel & Places","sheet_x":10,"sheet_y":55,"sort_order":27},"🏥":{"category":"Travel & Places","sheet_x":10,"sheet_y":56,"sort_order":28},"🏦":{"category":"Travel & Places","sheet_x":11,"sheet_y":0,"sort_order":29},"🏧":{"category":"Symbols","sheet_x":11,"sheet_y":1,"sort_order":1},"🏨":{"category":"Travel & Places","sheet_x":11,"sheet_y":2,"sort_order":30},"🏩":{"category":"Travel & Places","sheet_x":11,"sheet_y":3,"sort_order":31},"🏪":{"category":"Travel & Places","sheet_x":11,"sheet_y":4,"sort_order":32},"🏫":{"category":"Travel & Places","sheet_x":11,"sheet_y":5,"sort_order":33},"🏬":{"category":"Travel & Places","sheet_x":11,"sheet_y":6,"sort_order":34},"🏭":{"category":"Travel & Places","sheet_x":11,"sheet_y":7,"sort_order":35},"🏮":{"category":"Objects","sheet_x":11,"sheet_y":8,"sort_order":102},"🏯":{"category":"Travel & Places","sheet_x":11,"sheet_y":9,"sort_order":36},"🏰":{"category":"Travel & Places","sheet_x":11,"sheet_y":10,"sort_order":37},"🏳️‍🌈":{"category":"Flags","sheet_x":11,"sheet_y":11,"sort_order":6},"🏳️":{"category":"Flags","sheet_x":11,"sheet_y":12,"sort_order":5},"🏴‍☠️":{"category":"Flags","sheet_x":11,"sheet_y":13,"sort_order":7},"🏴󠁧󠁢󠁥󠁮󠁧󠁿":{"category":"Flags","sheet_x":11,"sheet_y":14,"sort_order":266},"🏴󠁧󠁢󠁳󠁣󠁴󠁿":{"category":"Flags","sheet_x":11,"sheet_y":15,"sort_order":267},"🏴󠁧󠁢󠁷󠁬󠁳󠁿":{"category":"Flags","sheet_x":11,"sheet_y":16,"sort_order":268},"🏴":{"category":"Flags","sheet_x":11,"sheet_y":17,"sort_order":4},"🏵️":{"category":"Animals & Nature","sheet_x":11,"sheet_y":18,"sort_order":109},"🏷️":{"category":"Objects","sheet_x":11,"sheet_y":19,"sort_order":120},"🏸":{"category":"Activities","sheet_x":11,"sheet_y":20,"sort_order":43},"🏹":{"category":"Objects","sheet_x":11,"sheet_y":21,"sort_order":189},"🏺":{"category":"Food & Drink","sheet_x":11,"sheet_y":22,"sort_order":121},"🏻":{"category":"Skin Tones","sheet_x":11,"sheet_y":23,"sort_order":1},"🏼":{"category":"Skin Tones","sheet_x":11,"sheet_y":24,"sort_order":2},"🏽":{"category":"Skin Tones","sheet_x":11,"sheet_y":25,"sort_order":3},"🏾":{"category":"Skin Tones","sheet_x":11,"sheet_y":26,"sort_order":4},"🏿":{"category":"Skin Tones","sheet_x":11,"sheet_y":27,"sort_order":5},"🐀":{"category":"Animals & Nature","sheet_x":11,"sheet_y":28,"sort_order":44},"🐁":{"category":"Animals & Nature","sheet_x":11,"sheet_y":29,"sort_order":43},"🐂":{"category":"Animals & Nature","sheet_x":11,"sheet_y":30,"sort_order":25},"🐃":{"category":"Animals & Nature","sheet_x":11,"sheet_y":31,"sort_order":26},"🐄":{"category":"Animals & Nature","sheet_x":11,"sheet_y":32,"sort_order":27},"🐅":{"category":"Animals & Nature","sheet_x":11,"sheet_y":33,"sort_order":17},"🐆":{"category":"Animals & Nature","sheet_x":11,"sheet_y":34,"sort_order":18},"🐇":{"category":"Animals & Nature","sheet_x":11,"sheet_y":35,"sort_order":47},"🐈":{"category":"Animals & Nature","sheet_x":11,"sheet_y":36,"sort_order":14},"🐉":{"category":"Animals & Nature","sheet_x":11,"sheet_y":37,"sort_order":82},"🐊":{"category":"Animals & Nature","sheet_x":11,"sheet_y":38,"sort_order":77},"🐋":{"category":"Animals & Nature","sheet_x":11,"sheet_y":39,"sort_order":86},"🐌":{"category":"Animals & Nature","sheet_x":11,"sheet_y":40,"sort_order":94},"🐍":{"category":"Animals & Nature","sheet_x":11,"sheet_y":41,"sort_order":80},"🐎":{"category":"Animals & Nature","sheet_x":11,"sheet_y":42,"sort_order":20},"🐏":{"category":"Animals & Nature","sheet_x":11,"sheet_y":43,"sort_order":32},"🐐":{"category":"Animals & Nature","sheet_x":11,"sheet_y":44,"sort_order":34},"🐑":{"category":"Animals & Nature","sheet_x":11,"sheet_y":45,"sort_order":33},"🐒":{"category":"Animals & Nature","sheet_x":11,"sheet_y":46,"sort_order":2},"🐓":{"category":"Animals & Nature","sheet_x":11,"sheet_y":47,"sort_order":62},"🐔":{"category":"Animals & Nature","sheet_x":11,"sheet_y":48,"sort_order":61},"🐕‍🦺":{"category":"Animals & Nature","sheet_x":11,"sheet_y":49,"sort_order":8},"🐕":{"category":"Animals & Nature","sheet_x":11,"sheet_y":50,"sort_order":6},"🐖":{"category":"Animals & Nature","sheet_x":11,"sheet_y":51,"sort_order":29},"🐗":{"category":"Animals & Nature","sheet_x":11,"sheet_y":52,"sort_order":30},"🐘":{"category":"Animals & Nature","sheet_x":11,"sheet_y":53,"sort_order":39},"🐙":{"category":"Animals & Nature","sheet_x":11,"sheet_y":54,"sort_order":92},"🐚":{"category":"Animals & Nature","sheet_x":11,"sheet_y":55,"sort_order":93},"🐛":{"category":"Animals & Nature","sheet_x":11,"sheet_y":56,"sort_order":96},"🐜":{"category":"Animals & Nature","sheet_x":12,"sheet_y":0,"sort_order":97},"🐝":{"category":"Animals & Nature","sheet_x":12,"sheet_y":1,"sort_order":98},"🐞":{"category":"Animals & Nature","sheet_x":12,"sheet_y":2,"sort_order":99},"🐟":{"category":"Animals & Nature","sheet_x":12,"sheet_y":3,"sort_order":88},"🐠":{"category":"Animals & Nature","sheet_x":12,"sheet_y":4,"sort_order":89},"🐡":{"category":"Animals & Nature","sheet_x":12,"sheet_y":5,"sort_order":90},"🐢":{"category":"Animals & Nature","sheet_x":12,"sheet_y":6,"sort_order":78},"🐣":{"category":"Animals & Nature","sheet_x":12,"sheet_y":7,"sort_order":63},"🐤":{"category":"Animals & Nature","sheet_x":12,"sheet_y":8,"sort_order":64},"🐥":{"category":"Animals & Nature","sheet_x":12,"sheet_y":9,"sort_order":65},"🐦":{"category":"Animals & Nature","sheet_x":12,"sheet_y":10,"sort_order":66},"🐧":{"category":"Animals & Nature","sheet_x":12,"sheet_y":11,"sort_order":67},"🐨":{"category":"Animals & Nature","sheet_x":12,"sheet_y":12,"sort_order":52},"🐩":{"category":"Animals & Nature","sheet_x":12,"sheet_y":13,"sort_order":9},"🐪":{"category":"Animals & Nature","sheet_x":12,"sheet_y":14,"sort_order":35},"🐫":{"category":"Animals & Nature","sheet_x":12,"sheet_y":15,"sort_order":36},"🐬":{"category":"Animals & Nature","sheet_x":12,"sheet_y":16,"sort_order":87},"🐭":{"category":"Animals & Nature","sheet_x":12,"sheet_y":17,"sort_order":42},"🐮":{"category":"Animals & Nature","sheet_x":12,"sheet_y":18,"sort_order":24},"🐯":{"category":"Animals & Nature","sheet_x":12,"sheet_y":19,"sort_order":16},"🐰":{"category":"Animals & Nature","sheet_x":12,"sheet_y":20,"sort_order":46},"🐱":{"category":"Animals & Nature","sheet_x":12,"sheet_y":21,"sort_order":13},"🐲":{"category":"Animals & Nature","sheet_x":12,"sheet_y":22,"sort_order":81},"🐳":{"category":"Animals & Nature","sheet_x":12,"sheet_y":23,"sort_order":85},"🐴":{"category":"Animals & Nature","sheet_x":12,"sheet_y":24,"sort_order":19},"🐵":{"category":"Animals & Nature","sheet_x":12,"sheet_y":25,"sort_order":1},"🐶":{"category":"Animals & Nature","sheet_x":12,"sheet_y":26,"sort_order":5},"🐷":{"category":"Animals & Nature","sheet_x":12,"sheet_y":27,"sort_order":28},"🐸":{"category":"Animals & Nature","sheet_x":12,"sheet_y":28,"sort_order":76},"🐹":{"category":"Animals & Nature","sheet_x":12,"sheet_y":29,"sort_order":45},"🐺":{"category":"Animals & Nature","sheet_x":12,"sheet_y":30,"sort_order":10},"🐻":{"category":"Animals & Nature","sheet_x":12,"sheet_y":31,"sort_order":51},"🐼":{"category":"Animals & Nature","sheet_x":12,"sheet_y":32,"sort_order":53},"🐽":{"category":"Animals & Nature","sheet_x":12,"sheet_y":33,"sort_order":31},"🐾":{"category":"Animals & Nature","sheet_x":12,"sheet_y":34,"sort_order":59},"🐿️":{"category":"Animals & Nature","sheet_x":12,"sheet_y":35,"sort_order":48},"👀":{"category":"People & Body","sheet_x":12,"sheet_y":36,"sort_order":45},"👁️‍🗨️":{"category":"Smileys & Emotion","sheet_x":12,"sheet_y":37,"sort_order":145},"👁️":{"category":"People & Body","sheet_x":12,"sheet_y":38,"sort_order":46},"👂":{"category":"People & Body","sheet_x":12,"sheet_y":39,"sort_order":39},"👃":{"category":"People & Body","sheet_x":12,"sheet_y":45,"sort_order":41},"👄":{"category":"People & Body","sheet_x":12,"sheet_y":51,"sort_order":48},"👅":{"category":"People & Body","sheet_x":12,"sheet_y":52,"sort_order":47},"👆":{"category":"People & Body","sheet_x":12,"sheet_y":53,"sort_order":15},"👇":{"category":"People & Body","sheet_x":13,"sheet_y":2,"sort_order":17},"👈":{"category":"People & Body","sheet_x":13,"sheet_y":8,"sort_order":13},"👉":{"category":"People & Body","sheet_x":13,"sheet_y":14,"sort_order":14},"👊":{"category":"People & Body","sheet_x":13,"sheet_y":20,"sort_order":22},"👋":{"category":"People & Body","sheet_x":13,"sheet_y":26,"sort_order":1},"👌":{"category":"People & Body","sheet_x":13,"sheet_y":32,"sort_order":6},"👍":{"category":"People & Body","sheet_x":13,"sheet_y":38,"sort_order":19},"👎":{"category":"People & Body","sheet_x":13,"sheet_y":44,"sort_order":20},"👏":{"category":"People & Body","sheet_x":13,"sheet_y":50,"sort_order":25},"👐":{"category":"People & Body","sheet_x":13,"sheet_y":56,"sort_order":27},"👑":{"category":"Objects","sheet_x":14,"sheet_y":5,"sort_order":34},"👒":{"category":"Objects","sheet_x":14,"sheet_y":6,"sort_order":35},"👓":{"category":"Objects","sheet_x":14,"sheet_y":7,"sort_order":1},"👔":{"category":"Objects","sheet_x":14,"sheet_y":8,"sort_order":6},"👕":{"category":"Objects","sheet_x":14,"sheet_y":9,"sort_order":7},"👖":{"category":"Objects","sheet_x":14,"sheet_y":10,"sort_order":8},"👗":{"category":"Objects","sheet_x":14,"sheet_y":11,"sort_order":13},"👘":{"category":"Objects","sheet_x":14,"sheet_y":12,"sort_order":14},"👙":{"category":"Objects","sheet_x":14,"sheet_y":13,"sort_order":19},"👚":{"category":"Objects","sheet_x":14,"sheet_y":14,"sort_order":20},"👛":{"category":"Objects","sheet_x":14,"sheet_y":15,"sort_order":21},"👜":{"category":"Objects","sheet_x":14,"sheet_y":16,"sort_order":22},"👝":{"category":"Objects","sheet_x":14,"sheet_y":17,"sort_order":23},"👞":{"category":"Objects","sheet_x":14,"sheet_y":18,"sort_order":26},"👟":{"category":"Objects","sheet_x":14,"sheet_y":19,"sort_order":27},"👠":{"category":"Objects","sheet_x":14,"sheet_y":20,"sort_order":30},"👡":{"category":"Objects","sheet_x":14,"sheet_y":21,"sort_order":31},"👢":{"category":"Objects","sheet_x":14,"sheet_y":22,"sort_order":33},"👣":{"category":"People & Body","sheet_x":14,"sheet_y":23,"sort_order":334},"👤":{"category":"People & Body","sheet_x":14,"sheet_y":24,"sort_order":332},"👥":{"category":"People & Body","sheet_x":14,"sheet_y":25,"sort_order":333},"👦":{"category":"People & Body","sheet_x":14,"sheet_y":26,"sort_order":51},"👧":{"category":"People & Body","sheet_x":14,"sheet_y":32,"sort_order":52},"👨‍🌾":{"category":"People & Body","sheet_x":14,"sheet_y":38,"sort_order":118},"👨‍🍳":{"category":"People & Body","sheet_x":14,"sheet_y":44,"sort_order":121},"👨‍🎓":{"category":"People & Body","sheet_x":14,"sheet_y":50,"sort_order":109},"👨‍🎤":{"category":"People & Body","sheet_x":14,"sheet_y":56,"sort_order":139},"👨‍🎨":{"category":"People & Body","sheet_x":15,"sheet_y":5,"sort_order":142},"👨‍🏫":{"category":"People & Body","sheet_x":15,"sheet_y":11,"sort_order":112},"👨‍🏭":{"category":"People & Body","sheet_x":15,"sheet_y":17,"sort_order":127},"👨‍👦‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":23,"sort_order":322},"👨‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":24,"sort_order":321},"👨‍👧‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":25,"sort_order":324},"👨‍👧‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":26,"sort_order":325},"👨‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":27,"sort_order":323},"👨‍👨‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":28,"sort_order":311},"👨‍👨‍👦‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":29,"sort_order":314},"👨‍👨‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":30,"sort_order":312},"👨‍👨‍👧‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":31,"sort_order":313},"👨‍👨‍👧‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":32,"sort_order":315},"👨‍👩‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":33,"sort_order":306},"👨‍👩‍👦‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":34,"sort_order":309},"👨‍👩‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":35,"sort_order":307},"👨‍👩‍👧‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":36,"sort_order":308},"👨‍👩‍👧‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":37,"sort_order":310},"👨‍💻":{"category":"People & Body","sheet_x":15,"sheet_y":38,"sort_order":136},"👨‍💼":{"category":"People & Body","sheet_x":15,"sheet_y":44,"sort_order":130},"👨‍🔧":{"category":"People & Body","sheet_x":15,"sheet_y":50,"sort_order":124},"👨‍🔬":{"category":"People & Body","sheet_x":15,"sheet_y":56,"sort_order":133},"👨‍🚀":{"category":"People & Body","sheet_x":16,"sheet_y":5,"sort_order":148},"👨‍🚒":{"category":"People & Body","sheet_x":16,"sheet_y":11,"sort_order":151},"👨‍🦯":{"category":"People & Body","sheet_x":16,"sheet_y":17,"sort_order":222},"👨‍🦰":{"category":"People & Body","sheet_x":16,"sheet_y":23,"sort_order":57},"👨‍🦱":{"category":"People & Body","sheet_x":16,"sheet_y":29,"sort_order":58},"👨‍🦲":{"category":"People & Body","sheet_x":16,"sheet_y":35,"sort_order":60},"👨‍🦳":{"category":"People & Body","sheet_x":16,"sheet_y":41,"sort_order":59},"👨‍🦼":{"category":"People & Body","sheet_x":16,"sheet_y":47,"sort_order":225},"👨‍🦽":{"category":"People & Body","sheet_x":16,"sheet_y":53,"sort_order":228},"👨‍⚕️":{"category":"People & Body","sheet_x":17,"sheet_y":2,"sort_order":106},"👨‍⚖️":{"category":"People & Body","sheet_x":17,"sheet_y":8,"sort_order":115},"👨‍✈️":{"category":"People & Body","sheet_x":17,"sheet_y":14,"sort_order":145},"👨‍❤️‍👨":{"category":"People & Body","sheet_x":17,"sheet_y":20,"sort_order":303},"👨‍❤️‍💋‍👨":{"category":"People & Body","sheet_x":17,"sheet_y":21,"sort_order":299},"👨":{"category":"People & Body","sheet_x":17,"sheet_y":22,"sort_order":55},"👩‍🌾":{"category":"People & Body","sheet_x":17,"sheet_y":28,"sort_order":119},"👩‍🍳":{"category":"People & Body","sheet_x":17,"sheet_y":34,"sort_order":122},"👩‍🎓":{"category":"People & Body","sheet_x":17,"sheet_y":40,"sort_order":110},"👩‍🎤":{"category":"People & Body","sheet_x":17,"sheet_y":46,"sort_order":140},"👩‍🎨":{"category":"People & Body","sheet_x":17,"sheet_y":52,"sort_order":143},"👩‍🏫":{"category":"People & Body","sheet_x":18,"sheet_y":1,"sort_order":113},"👩‍🏭":{"category":"People & Body","sheet_x":18,"sheet_y":7,"sort_order":128},"👩‍👦‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":13,"sort_order":327},"👩‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":14,"sort_order":326},"👩‍👧‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":15,"sort_order":329},"👩‍👧‍👧":{"category":"People & Body","sheet_x":18,"sheet_y":16,"sort_order":330},"👩‍👧":{"category":"People & Body","sheet_x":18,"sheet_y":17,"sort_order":328},"👩‍👩‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":18,"sort_order":316},"👩‍👩‍👦‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":19,"sort_order":319},"👩‍👩‍👧":{"category":"People & Body","sheet_x":18,"sheet_y":20,"sort_order":317},"👩‍👩‍👧‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":21,"sort_order":318},"👩‍👩‍👧‍👧":{"category":"People & Body","sheet_x":18,"sheet_y":22,"sort_order":320},"👩‍💻":{"category":"People & Body","sheet_x":18,"sheet_y":23,"sort_order":137},"👩‍💼":{"category":"People & Body","sheet_x":18,"sheet_y":29,"sort_order":131},"👩‍🔧":{"category":"People & Body","sheet_x":18,"sheet_y":35,"sort_order":125},"👩‍🔬":{"category":"People & Body","sheet_x":18,"sheet_y":41,"sort_order":134},"👩‍🚀":{"category":"People & Body","sheet_x":18,"sheet_y":47,"sort_order":149},"👩‍🚒":{"category":"People & Body","sheet_x":18,"sheet_y":53,"sort_order":152},"👩‍🦯":{"category":"People & Body","sheet_x":19,"sheet_y":2,"sort_order":223},"👩‍🦰":{"category":"People & Body","sheet_x":19,"sheet_y":8,"sort_order":62},"👩‍🦱":{"category":"People & Body","sheet_x":19,"sheet_y":14,"sort_order":64},"👩‍🦲":{"category":"People & Body","sheet_x":19,"sheet_y":20,"sort_order":68},"👩‍🦳":{"category":"People & Body","sheet_x":19,"sheet_y":26,"sort_order":66},"👩‍🦼":{"category":"People & Body","sheet_x":19,"sheet_y":32,"sort_order":226},"👩‍🦽":{"category":"People & Body","sheet_x":19,"sheet_y":38,"sort_order":229},"👩‍⚕️":{"category":"People & Body","sheet_x":19,"sheet_y":44,"sort_order":107},"👩‍⚖️":{"category":"People & Body","sheet_x":19,"sheet_y":50,"sort_order":116},"👩‍✈️":{"category":"People & Body","sheet_x":19,"sheet_y":56,"sort_order":146},"👩‍❤️‍👨":{"category":"People & Body","sheet_x":20,"sheet_y":5,"sort_order":302},"👩‍❤️‍👩":{"category":"People & Body","sheet_x":20,"sheet_y":6,"sort_order":304},"👩‍❤️‍💋‍👨":{"category":"People & Body","sheet_x":20,"sheet_y":7,"sort_order":298},"👩‍❤️‍💋‍👩":{"category":"People & Body","sheet_x":20,"sheet_y":8,"sort_order":300},"👩":{"category":"People & Body","sheet_x":20,"sheet_y":9,"sort_order":61},"👪":{"category":"People & Body","sheet_x":20,"sheet_y":15,"sort_order":305},"👫":{"category":"People & Body","sheet_x":20,"sheet_y":16,"sort_order":295},"👬":{"category":"People & Body","sheet_x":20,"sheet_y":42,"sort_order":296},"👭":{"category":"People & Body","sheet_x":21,"sheet_y":11,"sort_order":294},"👮‍♀️":{"category":"People & Body","sheet_x":21,"sheet_y":37,"sort_order":155},"👮‍♂️":{"category":"People & Body","sheet_x":21,"sheet_y":43,"sort_order":154},"👮":{"category":"People & Body","sheet_x":21,"sheet_y":49,"sort_order":153},"👯‍♀️":{"category":"People & Body","sheet_x":21,"sheet_y":55,"sort_order":238},"👯‍♂️":{"category":"People & Body","sheet_x":21,"sheet_y":56,"sort_order":237},"👯":{"category":"People & Body","sheet_x":22,"sheet_y":0,"sort_order":236},"👰":{"category":"People & Body","sheet_x":22,"sheet_y":1,"sort_order":173},"👱‍♀️":{"category":"People & Body","sheet_x":22,"sheet_y":7,"sort_order":70},"👱‍♂️":{"category":"People & Body","sheet_x":22,"sheet_y":13,"sort_order":71},"👱":{"category":"People & Body","sheet_x":22,"sheet_y":19,"sort_order":54},"👲":{"category":"People & Body","sheet_x":22,"sheet_y":25,"sort_order":170},"👳‍♀️":{"category":"People & Body","sheet_x":22,"sheet_y":31,"sort_order":169},"👳‍♂️":{"category":"People & Body","sheet_x":22,"sheet_y":37,"sort_order":168},"👳":{"category":"People & Body","sheet_x":22,"sheet_y":43,"sort_order":167},"👴":{"category":"People & Body","sheet_x":22,"sheet_y":49,"sort_order":73},"👵":{"category":"People & Body","sheet_x":22,"sheet_y":55,"sort_order":74},"👶":{"category":"People & Body","sheet_x":23,"sheet_y":4,"sort_order":49},"👷‍♀️":{"category":"People & Body","sheet_x":23,"sheet_y":10,"sort_order":164},"👷‍♂️":{"category":"People & Body","sheet_x":23,"sheet_y":16,"sort_order":163},"👷":{"category":"People & Body","sheet_x":23,"sheet_y":22,"sort_order":162},"👸":{"category":"People & Body","sheet_x":23,"sheet_y":28,"sort_order":166},"👹":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":34,"sort_order":97},"👺":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":35,"sort_order":98},"👻":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":36,"sort_order":99},"👼":{"category":"People & Body","sheet_x":23,"sheet_y":37,"sort_order":176},"👽":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":43,"sort_order":100},"👾":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":44,"sort_order":101},"👿":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":45,"sort_order":92},"💀":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":46,"sort_order":93},"💁‍♀️":{"category":"People & Body","sheet_x":23,"sheet_y":47,"sort_order":89},"💁‍♂️":{"category":"People & Body","sheet_x":23,"sheet_y":53,"sort_order":88},"💁":{"category":"People & Body","sheet_x":24,"sheet_y":2,"sort_order":87},"💂‍♀️":{"category":"People & Body","sheet_x":24,"sheet_y":8,"sort_order":161},"💂‍♂️":{"category":"People & Body","sheet_x":24,"sheet_y":14,"sort_order":160},"💂":{"category":"People & Body","sheet_x":24,"sheet_y":20,"sort_order":159},"💃":{"category":"People & Body","sheet_x":24,"sheet_y":26,"sort_order":233},"💄":{"category":"Objects","sheet_x":24,"sheet_y":32,"sort_order":41},"💅":{"category":"People & Body","sheet_x":24,"sheet_y":33,"sort_order":32},"💆‍♀️":{"category":"People & Body","sheet_x":24,"sheet_y":39,"sort_order":208},"💆‍♂️":{"category":"People & Body","sheet_x":24,"sheet_y":45,"sort_order":207},"💆":{"category":"People & Body","sheet_x":24,"sheet_y":51,"sort_order":206},"💇‍♀️":{"category":"People & Body","sheet_x":25,"sheet_y":0,"sort_order":211},"💇‍♂️":{"category":"People & Body","sheet_x":25,"sheet_y":6,"sort_order":210},"💇":{"category":"People & Body","sheet_x":25,"sheet_y":12,"sort_order":209},"💈":{"category":"Travel & Places","sheet_x":25,"sheet_y":18,"sort_order":61},"💉":{"category":"Objects","sheet_x":25,"sheet_y":19,"sort_order":208},"💊":{"category":"Objects","sheet_x":25,"sheet_y":20,"sort_order":210},"💋":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":21,"sort_order":115},"💌":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":22,"sort_order":116},"💍":{"category":"Objects","sheet_x":25,"sheet_y":23,"sort_order":42},"💎":{"category":"Objects","sheet_x":25,"sheet_y":24,"sort_order":43},"💏":{"category":"People & Body","sheet_x":25,"sheet_y":25,"sort_order":297},"💐":{"category":"Animals & Nature","sheet_x":25,"sheet_y":26,"sort_order":106},"💑":{"category":"People & Body","sheet_x":25,"sheet_y":27,"sort_order":301},"💒":{"category":"Travel & Places","sheet_x":25,"sheet_y":28,"sort_order":38},"💓":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":29,"sort_order":121},"💔":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":30,"sort_order":126},"💕":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":31,"sort_order":123},"💖":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":32,"sort_order":119},"💗":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":33,"sort_order":120},"💘":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":34,"sort_order":117},"💙":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":35,"sort_order":131},"💚":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":36,"sort_order":130},"💛":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":37,"sort_order":129},"💜":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":38,"sort_order":132},"💝":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":39,"sort_order":118},"💞":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":40,"sort_order":122},"💟":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":41,"sort_order":124},"💠":{"category":"Symbols","sheet_x":25,"sheet_y":42,"sort_order":214},"💡":{"category":"Objects","sheet_x":25,"sheet_y":43,"sort_order":100},"💢":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":44,"sort_order":137},"💣":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":45,"sort_order":143},"💤":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":46,"sort_order":149},"💥":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":47,"sort_order":138},"💦":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":48,"sort_order":140},"💧":{"category":"Travel & Places","sheet_x":25,"sheet_y":49,"sort_order":209},"💨":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":50,"sort_order":141},"💩":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":51,"sort_order":95},"💪":{"category":"People & Body","sheet_x":25,"sheet_y":52,"sort_order":34},"💫":{"category":"Smileys & Emotion","sheet_x":26,"sheet_y":1,"sort_order":139},"💬":{"category":"Smileys & Emotion","sheet_x":26,"sheet_y":2,"sort_order":144},"💭":{"category":"Smileys & Emotion","sheet_x":26,"sheet_y":3,"sort_order":148},"💮":{"category":"Animals & Nature","sheet_x":26,"sheet_y":4,"sort_order":108},"💯":{"category":"Smileys & Emotion","sheet_x":26,"sheet_y":5,"sort_order":136},"💰":{"category":"Objects","sheet_x":26,"sheet_y":6,"sort_order":121},"💱":{"category":"Objects","sheet_x":26,"sheet_y":7,"sort_order":130},"💲":{"category":"Objects","sheet_x":26,"sheet_y":8,"sort_order":131},"💳":{"category":"Objects","sheet_x":26,"sheet_y":9,"sort_order":127},"💴":{"category":"Objects","sheet_x":26,"sheet_y":10,"sort_order":122},"💵":{"category":"Objects","sheet_x":26,"sheet_y":11,"sort_order":123},"💶":{"category":"Objects","sheet_x":26,"sheet_y":12,"sort_order":124},"💷":{"category":"Objects","sheet_x":26,"sheet_y":13,"sort_order":125},"💸":{"category":"Objects","sheet_x":26,"sheet_y":14,"sort_order":126},"💹":{"category":"Objects","sheet_x":26,"sheet_y":15,"sort_order":129},"💺":{"category":"Travel & Places","sheet_x":26,"sheet_y":16,"sort_order":123},"💻":{"category":"Objects","sheet_x":26,"sheet_y":17,"sort_order":77},"💼":{"category":"Objects","sheet_x":26,"sheet_y":18,"sort_order":152},"💽":{"category":"Objects","sheet_x":26,"sheet_y":19,"sort_order":83},"💾":{"category":"Objects","sheet_x":26,"sheet_y":20,"sort_order":84},"💿":{"category":"Objects","sheet_x":26,"sheet_y":21,"sort_order":85},"📀":{"category":"Objects","sheet_x":26,"sheet_y":22,"sort_order":86},"📁":{"category":"Objects","sheet_x":26,"sheet_y":23,"sort_order":153},"📂":{"category":"Objects","sheet_x":26,"sheet_y":24,"sort_order":154},"📃":{"category":"Objects","sheet_x":26,"sheet_y":25,"sort_order":113},"📄":{"category":"Objects","sheet_x":26,"sheet_y":26,"sort_order":115},"📅":{"category":"Objects","sheet_x":26,"sheet_y":27,"sort_order":156},"📆":{"category":"Objects","sheet_x":26,"sheet_y":28,"sort_order":157},"📇":{"category":"Objects","sheet_x":26,"sheet_y":29,"sort_order":160},"📈":{"category":"Objects","sheet_x":26,"sheet_y":30,"sort_order":161},"📉":{"category":"Objects","sheet_x":26,"sheet_y":31,"sort_order":162},"📊":{"category":"Objects","sheet_x":26,"sheet_y":32,"sort_order":163},"📋":{"category":"Objects","sheet_x":26,"sheet_y":33,"sort_order":164},"📌":{"category":"Objects","sheet_x":26,"sheet_y":34,"sort_order":165},"📍":{"category":"Objects","sheet_x":26,"sheet_y":35,"sort_order":166},"📎":{"category":"Objects","sheet_x":26,"sheet_y":36,"sort_order":167},"📏":{"category":"Objects","sheet_x":26,"sheet_y":37,"sort_order":169},"📐":{"category":"Objects","sheet_x":26,"sheet_y":38,"sort_order":170},"📑":{"category":"Objects","sheet_x":26,"sheet_y":39,"sort_order":118},"📒":{"category":"Objects","sheet_x":26,"sheet_y":40,"sort_order":112},"📓":{"category":"Objects","sheet_x":26,"sheet_y":41,"sort_order":111},"📔":{"category":"Objects","sheet_x":26,"sheet_y":42,"sort_order":104},"📕":{"category":"Objects","sheet_x":26,"sheet_y":43,"sort_order":105},"📖":{"category":"Objects","sheet_x":26,"sheet_y":44,"sort_order":106},"📗":{"category":"Objects","sheet_x":26,"sheet_y":45,"sort_order":107},"📘":{"category":"Objects","sheet_x":26,"sheet_y":46,"sort_order":108},"📙":{"category":"Objects","sheet_x":26,"sheet_y":47,"sort_order":109},"📚":{"category":"Objects","sheet_x":26,"sheet_y":48,"sort_order":110},"📛":{"category":"Symbols","sheet_x":26,"sheet_y":49,"sort_order":104},"📜":{"category":"Objects","sheet_x":26,"sheet_y":50,"sort_order":114},"📝":{"category":"Objects","sheet_x":26,"sheet_y":51,"sort_order":151},"📞":{"category":"Objects","sheet_x":26,"sheet_y":52,"sort_order":72},"📟":{"category":"Objects","sheet_x":26,"sheet_y":53,"sort_order":73},"📠":{"category":"Objects","sheet_x":26,"sheet_y":54,"sort_order":74},"📡":{"category":"Objects","sheet_x":26,"sheet_y":55,"sort_order":207},"📢":{"category":"Objects","sheet_x":26,"sheet_y":56,"sort_order":48},"📣":{"category":"Objects","sheet_x":27,"sheet_y":0,"sort_order":49},"📤":{"category":"Objects","sheet_x":27,"sheet_y":1,"sort_order":136},"📥":{"category":"Objects","sheet_x":27,"sheet_y":2,"sort_order":137},"📦":{"category":"Objects","sheet_x":27,"sheet_y":3,"sort_order":138},"📧":{"category":"Objects","sheet_x":27,"sheet_y":4,"sort_order":133},"📨":{"category":"Objects","sheet_x":27,"sheet_y":5,"sort_order":134},"📩":{"category":"Objects","sheet_x":27,"sheet_y":6,"sort_order":135},"📪":{"category":"Objects","sheet_x":27,"sheet_y":7,"sort_order":140},"📫":{"category":"Objects","sheet_x":27,"sheet_y":8,"sort_order":139},"📬":{"category":"Objects","sheet_x":27,"sheet_y":9,"sort_order":141},"📭":{"category":"Objects","sheet_x":27,"sheet_y":10,"sort_order":142},"📮":{"category":"Objects","sheet_x":27,"sheet_y":11,"sort_order":143},"📯":{"category":"Objects","sheet_x":27,"sheet_y":12,"sort_order":50},"📰":{"category":"Objects","sheet_x":27,"sheet_y":13,"sort_order":116},"📱":{"category":"Objects","sheet_x":27,"sheet_y":14,"sort_order":69},"📲":{"category":"Objects","sheet_x":27,"sheet_y":15,"sort_order":70},"📳":{"category":"Symbols","sheet_x":27,"sheet_y":16,"sort_order":95},"📴":{"category":"Symbols","sheet_x":27,"sheet_y":17,"sort_order":96},"📵":{"category":"Symbols","sheet_x":27,"sheet_y":18,"sort_order":23},"📶":{"category":"Symbols","sheet_x":27,"sheet_y":19,"sort_order":94},"📷":{"category":"Objects","sheet_x":27,"sheet_y":20,"sort_order":93},"📸":{"category":"Objects","sheet_x":27,"sheet_y":21,"sort_order":94},"📹":{"category":"Objects","sheet_x":27,"sheet_y":22,"sort_order":95},"📺":{"category":"Objects","sheet_x":27,"sheet_y":23,"sort_order":92},"📻":{"category":"Objects","sheet_x":27,"sheet_y":24,"sort_order":61},"📼":{"category":"Objects","sheet_x":27,"sheet_y":25,"sort_order":96},"📽️":{"category":"Objects","sheet_x":27,"sheet_y":26,"sort_order":90},"📿":{"category":"Objects","sheet_x":27,"sheet_y":27,"sort_order":40},"🔀":{"category":"Symbols","sheet_x":27,"sheet_y":28,"sort_order":73},"🔁":{"category":"Symbols","sheet_x":27,"sheet_y":29,"sort_order":74},"🔂":{"category":"Symbols","sheet_x":27,"sheet_y":30,"sort_order":75},"🔃":{"category":"Symbols","sheet_x":27,"sheet_y":31,"sort_order":41},"🔄":{"category":"Symbols","sheet_x":27,"sheet_y":32,"sort_order":42},"🔅":{"category":"Symbols","sheet_x":27,"sheet_y":33,"sort_order":92},"🔆":{"category":"Symbols","sheet_x":27,"sheet_y":34,"sort_order":93},"🔇":{"category":"Objects","sheet_x":27,"sheet_y":35,"sort_order":44},"🔈":{"category":"Objects","sheet_x":27,"sheet_y":36,"sort_order":45},"🔉":{"category":"Objects","sheet_x":27,"sheet_y":37,"sort_order":46},"🔊":{"category":"Objects","sheet_x":27,"sheet_y":38,"sort_order":47},"🔋":{"category":"Objects","sheet_x":27,"sheet_y":39,"sort_order":75},"🔌":{"category":"Objects","sheet_x":27,"sheet_y":40,"sort_order":76},"🔍":{"category":"Objects","sheet_x":27,"sheet_y":41,"sort_order":97},"🔎":{"category":"Objects","sheet_x":27,"sheet_y":42,"sort_order":98},"🔏":{"category":"Objects","sheet_x":27,"sheet_y":43,"sort_order":177},"🔐":{"category":"Objects","sheet_x":27,"sheet_y":44,"sort_order":178},"🔑":{"category":"Objects","sheet_x":27,"sheet_y":45,"sort_order":179},"🔒":{"category":"Objects","sheet_x":27,"sheet_y":46,"sort_order":175},"🔓":{"category":"Objects","sheet_x":27,"sheet_y":47,"sort_order":176},"🔔":{"category":"Objects","sheet_x":27,"sheet_y":48,"sort_order":51},"🔕":{"category":"Objects","sheet_x":27,"sheet_y":49,"sort_order":52},"🔖":{"category":"Objects","sheet_x":27,"sheet_y":50,"sort_order":119},"🔗":{"category":"Objects","sheet_x":27,"sheet_y":51,"sort_order":197},"🔘":{"category":"Symbols","sheet_x":27,"sheet_y":52,"sort_order":215},"🔙":{"category":"Symbols","sheet_x":27,"sheet_y":53,"sort_order":43},"🔚":{"category":"Symbols","sheet_x":27,"sheet_y":54,"sort_order":44},"🔛":{"category":"Symbols","sheet_x":27,"sheet_y":55,"sort_order":45},"🔜":{"category":"Symbols","sheet_x":27,"sheet_y":56,"sort_order":46},"🔝":{"category":"Symbols","sheet_x":28,"sheet_y":0,"sort_order":47},"🔞":{"category":"Symbols","sheet_x":28,"sheet_y":1,"sort_order":24},"🔟":{"category":"Symbols","sheet_x":28,"sheet_y":2,"sort_order":144},"🔠":{"category":"Symbols","sheet_x":28,"sheet_y":3,"sort_order":145},"🔡":{"category":"Symbols","sheet_x":28,"sheet_y":4,"sort_order":146},"🔢":{"category":"Symbols","sheet_x":28,"sheet_y":5,"sort_order":147},"🔣":{"category":"Symbols","sheet_x":28,"sheet_y":6,"sort_order":148},"🔤":{"category":"Symbols","sheet_x":28,"sheet_y":7,"sort_order":149},"🔥":{"category":"Travel & Places","sheet_x":28,"sheet_y":8,"sort_order":208},"🔦":{"category":"Objects","sheet_x":28,"sheet_y":9,"sort_order":101},"🔧":{"category":"Objects","sheet_x":28,"sheet_y":10,"sort_order":191},"🔨":{"category":"Objects","sheet_x":28,"sheet_y":11,"sort_order":181},"🔩":{"category":"Objects","sheet_x":28,"sheet_y":12,"sort_order":192},"🔪":{"category":"Food & Drink","sheet_x":28,"sheet_y":13,"sort_order":120},"🔫":{"category":"Objects","sheet_x":28,"sheet_y":14,"sort_order":188},"🔬":{"category":"Objects","sheet_x":28,"sheet_y":15,"sort_order":205},"🔭":{"category":"Objects","sheet_x":28,"sheet_y":16,"sort_order":206},"🔮":{"category":"Activities","sheet_x":28,"sheet_y":17,"sort_order":59},"🔯":{"category":"Symbols","sheet_x":28,"sheet_y":18,"sort_order":59},"🔰":{"category":"Symbols","sheet_x":28,"sheet_y":19,"sort_order":105},"🔱":{"category":"Symbols","sheet_x":28,"sheet_y":20,"sort_order":103},"🔲":{"category":"Symbols","sheet_x":28,"sheet_y":21,"sort_order":217},"🔳":{"category":"Symbols","sheet_x":28,"sheet_y":22,"sort_order":216},"🔴":{"category":"Symbols","sheet_x":28,"sheet_y":23,"sort_order":184},"🔵":{"category":"Symbols","sheet_x":28,"sheet_y":24,"sort_order":188},"🔶":{"category":"Symbols","sheet_x":28,"sheet_y":25,"sort_order":208},"🔷":{"category":"Symbols","sheet_x":28,"sheet_y":26,"sort_order":209},"🔸":{"category":"Symbols","sheet_x":28,"sheet_y":27,"sort_order":210},"🔹":{"category":"Symbols","sheet_x":28,"sheet_y":28,"sort_order":211},"🔺":{"category":"Symbols","sheet_x":28,"sheet_y":29,"sort_order":212},"🔻":{"category":"Symbols","sheet_x":28,"sheet_y":30,"sort_order":213},"🔼":{"category":"Symbols","sheet_x":28,"sheet_y":31,"sort_order":83},"🔽":{"category":"Symbols","sheet_x":28,"sheet_y":32,"sort_order":85},"🕉️":{"category":"Symbols","sheet_x":28,"sheet_y":33,"sort_order":50},"🕊️":{"category":"Animals & Nature","sheet_x":28,"sheet_y":34,"sort_order":68},"🕋":{"category":"Travel & Places","sheet_x":28,"sheet_y":35,"sort_order":46},"🕌":{"category":"Travel & Places","sheet_x":28,"sheet_y":36,"sort_order":42},"🕍":{"category":"Travel & Places","sheet_x":28,"sheet_y":37,"sort_order":44},"🕎":{"category":"Symbols","sheet_x":28,"sheet_y":38,"sort_order":58},"🕐":{"category":"Travel & Places","sheet_x":28,"sheet_y":39,"sort_order":142},"🕑":{"category":"Travel & Places","sheet_x":28,"sheet_y":40,"sort_order":144},"🕒":{"category":"Travel & Places","sheet_x":28,"sheet_y":41,"sort_order":146},"🕓":{"category":"Travel & Places","sheet_x":28,"sheet_y":42,"sort_order":148},"🕔":{"category":"Travel & Places","sheet_x":28,"sheet_y":43,"sort_order":150},"🕕":{"category":"Travel & Places","sheet_x":28,"sheet_y":44,"sort_order":152},"🕖":{"category":"Travel & Places","sheet_x":28,"sheet_y":45,"sort_order":154},"🕗":{"category":"Travel & Places","sheet_x":28,"sheet_y":46,"sort_order":156},"🕘":{"category":"Travel & Places","sheet_x":28,"sheet_y":47,"sort_order":158},"🕙":{"category":"Travel & Places","sheet_x":28,"sheet_y":48,"sort_order":160},"🕚":{"category":"Travel & Places","sheet_x":28,"sheet_y":49,"sort_order":162},"🕛":{"category":"Travel & Places","sheet_x":28,"sheet_y":50,"sort_order":140},"🕜":{"category":"Travel & Places","sheet_x":28,"sheet_y":51,"sort_order":143},"🕝":{"category":"Travel & Places","sheet_x":28,"sheet_y":52,"sort_order":145},"🕞":{"category":"Travel & Places","sheet_x":28,"sheet_y":53,"sort_order":147},"🕟":{"category":"Travel & Places","sheet_x":28,"sheet_y":54,"sort_order":149},"🕠":{"category":"Travel & Places","sheet_x":28,"sheet_y":55,"sort_order":151},"🕡":{"category":"Travel & Places","sheet_x":28,"sheet_y":56,"sort_order":153},"🕢":{"category":"Travel & Places","sheet_x":29,"sheet_y":0,"sort_order":155},"🕣":{"category":"Travel & Places","sheet_x":29,"sheet_y":1,"sort_order":157},"🕤":{"category":"Travel & Places","sheet_x":29,"sheet_y":2,"sort_order":159},"🕥":{"category":"Travel & Places","sheet_x":29,"sheet_y":3,"sort_order":161},"🕦":{"category":"Travel & Places","sheet_x":29,"sheet_y":4,"sort_order":163},"🕧":{"category":"Travel & Places","sheet_x":29,"sheet_y":5,"sort_order":141},"🕯️":{"category":"Objects","sheet_x":29,"sheet_y":6,"sort_order":99},"🕰️":{"category":"Travel & Places","sheet_x":29,"sheet_y":7,"sort_order":139},"🕳️":{"category":"Smileys & Emotion","sheet_x":29,"sheet_y":8,"sort_order":142},"🕴️":{"category":"People & Body","sheet_x":29,"sheet_y":9,"sort_order":235},"🕵️‍♀️":{"category":"People & Body","sheet_x":29,"sheet_y":15,"sort_order":158},"🕵️‍♂️":{"category":"People & Body","sheet_x":29,"sheet_y":21,"sort_order":157},"🕵️":{"category":"People & Body","sheet_x":29,"sheet_y":27,"sort_order":156},"🕶️":{"category":"Objects","sheet_x":29,"sheet_y":33,"sort_order":2},"🕷️":{"category":"Animals & Nature","sheet_x":29,"sheet_y":34,"sort_order":101},"🕸️":{"category":"Animals & Nature","sheet_x":29,"sheet_y":35,"sort_order":102},"🕹️":{"category":"Activities","sheet_x":29,"sheet_y":36,"sort_order":62},"🕺":{"category":"People & Body","sheet_x":29,"sheet_y":37,"sort_order":234},"🖇️":{"category":"Objects","sheet_x":29,"sheet_y":43,"sort_order":168},"🖊️":{"category":"Objects","sheet_x":29,"sheet_y":44,"sort_order":148},"🖋️":{"category":"Objects","sheet_x":29,"sheet_y":45,"sort_order":147},"🖌️":{"category":"Objects","sheet_x":29,"sheet_y":46,"sort_order":149},"🖍️":{"category":"Objects","sheet_x":29,"sheet_y":47,"sort_order":150},"🖐️":{"category":"People & Body","sheet_x":29,"sheet_y":48,"sort_order":3},"🖕":{"category":"People & Body","sheet_x":29,"sheet_y":54,"sort_order":16},"🖖":{"category":"People & Body","sheet_x":30,"sheet_y":3,"sort_order":5},"🖤":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":9,"sort_order":134},"🖥️":{"category":"Objects","sheet_x":30,"sheet_y":10,"sort_order":78},"🖨️":{"category":"Objects","sheet_x":30,"sheet_y":11,"sort_order":79},"🖱️":{"category":"Objects","sheet_x":30,"sheet_y":12,"sort_order":81},"🖲️":{"category":"Objects","sheet_x":30,"sheet_y":13,"sort_order":82},"🖼️":{"category":"Activities","sheet_x":30,"sheet_y":14,"sort_order":76},"🗂️":{"category":"Objects","sheet_x":30,"sheet_y":15,"sort_order":155},"🗃️":{"category":"Objects","sheet_x":30,"sheet_y":16,"sort_order":172},"🗄️":{"category":"Objects","sheet_x":30,"sheet_y":17,"sort_order":173},"🗑️":{"category":"Objects","sheet_x":30,"sheet_y":18,"sort_order":174},"🗒️":{"category":"Objects","sheet_x":30,"sheet_y":19,"sort_order":158},"🗓️":{"category":"Objects","sheet_x":30,"sheet_y":20,"sort_order":159},"🗜️":{"category":"Objects","sheet_x":30,"sheet_y":21,"sort_order":194},"🗝️":{"category":"Objects","sheet_x":30,"sheet_y":22,"sort_order":180},"🗞️":{"category":"Objects","sheet_x":30,"sheet_y":23,"sort_order":117},"🗡️":{"category":"Objects","sheet_x":30,"sheet_y":24,"sort_order":186},"🗣️":{"category":"People & Body","sheet_x":30,"sheet_y":25,"sort_order":331},"🗨️":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":26,"sort_order":146},"🗯️":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":27,"sort_order":147},"🗳️":{"category":"Objects","sheet_x":30,"sheet_y":28,"sort_order":144},"🗺️":{"category":"Travel & Places","sheet_x":30,"sheet_y":29,"sort_order":5},"🗻":{"category":"Travel & Places","sheet_x":30,"sheet_y":30,"sort_order":11},"🗼":{"category":"Travel & Places","sheet_x":30,"sheet_y":31,"sort_order":39},"🗽":{"category":"Travel & Places","sheet_x":30,"sheet_y":32,"sort_order":40},"🗾":{"category":"Travel & Places","sheet_x":30,"sheet_y":33,"sort_order":6},"🗿":{"category":"Objects","sheet_x":30,"sheet_y":34,"sort_order":233},"😀":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":35,"sort_order":1},"😁":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":36,"sort_order":4},"😂":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":37,"sort_order":8},"😃":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":38,"sort_order":2},"😄":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":39,"sort_order":3},"😅":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":40,"sort_order":6},"😆":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":41,"sort_order":5},"😇":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":42,"sort_order":13},"😈":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":43,"sort_order":91},"😉":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":44,"sort_order":11},"😊":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":45,"sort_order":12},"😋":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":46,"sort_order":22},"😌":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":47,"sort_order":42},"😍":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":48,"sort_order":15},"😎":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":49,"sort_order":60},"😏":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":50,"sort_order":37},"😐":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":51,"sort_order":34},"😑":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":52,"sort_order":35},"😒":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":53,"sort_order":38},"😓":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":54,"sort_order":83},"😔":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":55,"sort_order":43},"😕":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":56,"sort_order":63},"😖":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":0,"sort_order":80},"😗":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":1,"sort_order":18},"😘":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":2,"sort_order":17},"😙":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":3,"sort_order":21},"😚":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":4,"sort_order":20},"😛":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":5,"sort_order":23},"😜":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":6,"sort_order":24},"😝":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":7,"sort_order":26},"😞":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":8,"sort_order":82},"😟":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":9,"sort_order":64},"😠":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":10,"sort_order":89},"😡":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":11,"sort_order":88},"😢":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":12,"sort_order":77},"😣":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":13,"sort_order":81},"😤":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":14,"sort_order":87},"😥":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":15,"sort_order":76},"😦":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":16,"sort_order":72},"😧":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":17,"sort_order":73},"😨":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":18,"sort_order":74},"😩":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":19,"sort_order":84},"😪":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":20,"sort_order":44},"😫":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":21,"sort_order":85},"😬":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":22,"sort_order":40},"😭":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":23,"sort_order":78},"😮":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":24,"sort_order":67},"😯":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":25,"sort_order":68},"😰":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":26,"sort_order":75},"😱":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":27,"sort_order":79},"😲":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":28,"sort_order":69},"😳":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":29,"sort_order":70},"😴":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":30,"sort_order":46},"😵":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":31,"sort_order":56},"😶":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":32,"sort_order":36},"😷":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":33,"sort_order":47},"😸":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":34,"sort_order":104},"😹":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":35,"sort_order":105},"😺":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":36,"sort_order":103},"😻":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":37,"sort_order":106},"😼":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":38,"sort_order":107},"😽":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":39,"sort_order":108},"😾":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":40,"sort_order":111},"😿":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":41,"sort_order":110},"🙀":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":42,"sort_order":109},"🙁":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":43,"sort_order":65},"🙂":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":44,"sort_order":9},"🙃":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":45,"sort_order":10},"🙄":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":46,"sort_order":39},"🙅‍♀️":{"category":"People & Body","sheet_x":31,"sheet_y":47,"sort_order":83},"🙅‍♂️":{"category":"People & Body","sheet_x":31,"sheet_y":53,"sort_order":82},"🙅":{"category":"People & Body","sheet_x":32,"sheet_y":2,"sort_order":81},"🙆‍♀️":{"category":"People & Body","sheet_x":32,"sheet_y":8,"sort_order":86},"🙆‍♂️":{"category":"People & Body","sheet_x":32,"sheet_y":14,"sort_order":85},"🙆":{"category":"People & Body","sheet_x":32,"sheet_y":20,"sort_order":84},"🙇‍♀️":{"category":"People & Body","sheet_x":32,"sheet_y":26,"sort_order":98},"🙇‍♂️":{"category":"People & Body","sheet_x":32,"sheet_y":32,"sort_order":97},"🙇":{"category":"People & Body","sheet_x":32,"sheet_y":38,"sort_order":96},"🙈":{"category":"Smileys & Emotion","sheet_x":32,"sheet_y":44,"sort_order":112},"🙉":{"category":"Smileys & Emotion","sheet_x":32,"sheet_y":45,"sort_order":113},"🙊":{"category":"Smileys & Emotion","sheet_x":32,"sheet_y":46,"sort_order":114},"🙋‍♀️":{"category":"People & Body","sheet_x":32,"sheet_y":47,"sort_order":92},"🙋‍♂️":{"category":"People & Body","sheet_x":32,"sheet_y":53,"sort_order":91},"🙋":{"category":"People & Body","sheet_x":33,"sheet_y":2,"sort_order":90},"🙌":{"category":"People & Body","sheet_x":33,"sheet_y":8,"sort_order":26},"🙍‍♀️":{"category":"People & Body","sheet_x":33,"sheet_y":14,"sort_order":77},"🙍‍♂️":{"category":"People & Body","sheet_x":33,"sheet_y":20,"sort_order":76},"🙍":{"category":"People & Body","sheet_x":33,"sheet_y":26,"sort_order":75},"🙎‍♀️":{"category":"People & Body","sheet_x":33,"sheet_y":32,"sort_order":80},"🙎‍♂️":{"category":"People & Body","sheet_x":33,"sheet_y":38,"sort_order":79},"🙎":{"category":"People & Body","sheet_x":33,"sheet_y":44,"sort_order":78},"🙏":{"category":"People & Body","sheet_x":33,"sheet_y":50,"sort_order":30},"🚀":{"category":"Travel & Places","sheet_x":33,"sheet_y":56,"sort_order":129},"🚁":{"category":"Travel & Places","sheet_x":34,"sheet_y":0,"sort_order":124},"🚂":{"category":"Travel & Places","sheet_x":34,"sheet_y":1,"sort_order":63},"🚃":{"category":"Travel & Places","sheet_x":34,"sheet_y":2,"sort_order":64},"🚄":{"category":"Travel & Places","sheet_x":34,"sheet_y":3,"sort_order":65},"🚅":{"category":"Travel & Places","sheet_x":34,"sheet_y":4,"sort_order":66},"🚆":{"category":"Travel & Places","sheet_x":34,"sheet_y":5,"sort_order":67},"🚇":{"category":"Travel & Places","sheet_x":34,"sheet_y":6,"sort_order":68},"🚈":{"category":"Travel & Places","sheet_x":34,"sheet_y":7,"sort_order":69},"🚉":{"category":"Travel & Places","sheet_x":34,"sheet_y":8,"sort_order":70},"🚊":{"category":"Travel & Places","sheet_x":34,"sheet_y":9,"sort_order":71},"🚋":{"category":"Travel & Places","sheet_x":34,"sheet_y":10,"sort_order":74},"🚌":{"category":"Travel & Places","sheet_x":34,"sheet_y":11,"sort_order":75},"🚍":{"category":"Travel & Places","sheet_x":34,"sheet_y":12,"sort_order":76},"🚎":{"category":"Travel & Places","sheet_x":34,"sheet_y":13,"sort_order":77},"🚏":{"category":"Travel & Places","sheet_x":34,"sheet_y":14,"sort_order":100},"🚐":{"category":"Travel & Places","sheet_x":34,"sheet_y":15,"sort_order":78},"🚑":{"category":"Travel & Places","sheet_x":34,"sheet_y":16,"sort_order":79},"🚒":{"category":"Travel & Places","sheet_x":34,"sheet_y":17,"sort_order":80},"🚓":{"category":"Travel & Places","sheet_x":34,"sheet_y":18,"sort_order":81},"🚔":{"category":"Travel & Places","sheet_x":34,"sheet_y":19,"sort_order":82},"🚕":{"category":"Travel & Places","sheet_x":34,"sheet_y":20,"sort_order":83},"🚖":{"category":"Travel & Places","sheet_x":34,"sheet_y":21,"sort_order":84},"🚗":{"category":"Travel & Places","sheet_x":34,"sheet_y":22,"sort_order":85},"🚘":{"category":"Travel & Places","sheet_x":34,"sheet_y":23,"sort_order":86},"🚙":{"category":"Travel & Places","sheet_x":34,"sheet_y":24,"sort_order":87},"🚚":{"category":"Travel & Places","sheet_x":34,"sheet_y":25,"sort_order":88},"🚛":{"category":"Travel & Places","sheet_x":34,"sheet_y":26,"sort_order":89},"🚜":{"category":"Travel & Places","sheet_x":34,"sheet_y":27,"sort_order":90},"🚝":{"category":"Travel & Places","sheet_x":34,"sheet_y":28,"sort_order":72},"🚞":{"category":"Travel & Places","sheet_x":34,"sheet_y":29,"sort_order":73},"🚟":{"category":"Travel & Places","sheet_x":34,"sheet_y":30,"sort_order":125},"🚠":{"category":"Travel & Places","sheet_x":34,"sheet_y":31,"sort_order":126},"🚡":{"category":"Travel & Places","sheet_x":34,"sheet_y":32,"sort_order":127},"🚢":{"category":"Travel & Places","sheet_x":34,"sheet_y":33,"sort_order":117},"🚣‍♀️":{"category":"People & Body","sheet_x":34,"sheet_y":34,"sort_order":257},"🚣‍♂️":{"category":"People & Body","sheet_x":34,"sheet_y":40,"sort_order":256},"🚣":{"category":"People & Body","sheet_x":34,"sheet_y":46,"sort_order":255},"🚤":{"category":"Travel & Places","sheet_x":34,"sheet_y":52,"sort_order":113},"🚥":{"category":"Travel & Places","sheet_x":34,"sheet_y":53,"sort_order":106},"🚦":{"category":"Travel & Places","sheet_x":34,"sheet_y":54,"sort_order":107},"🚧":{"category":"Travel & Places","sheet_x":34,"sheet_y":55,"sort_order":109},"🚨":{"category":"Travel & Places","sheet_x":34,"sheet_y":56,"sort_order":105},"🚩":{"category":"Flags","sheet_x":35,"sheet_y":0,"sort_order":2},"🚪":{"category":"Objects","sheet_x":35,"sheet_y":1,"sort_order":213},"🚫":{"category":"Symbols","sheet_x":35,"sheet_y":2,"sort_order":17},"🚬":{"category":"Objects","sheet_x":35,"sheet_y":3,"sort_order":230},"🚭":{"category":"Symbols","sheet_x":35,"sheet_y":4,"sort_order":19},"🚮":{"category":"Symbols","sheet_x":35,"sheet_y":5,"sort_order":2},"🚯":{"category":"Symbols","sheet_x":35,"sheet_y":6,"sort_order":20},"🚰":{"category":"Symbols","sheet_x":35,"sheet_y":7,"sort_order":3},"🚱":{"category":"Symbols","sheet_x":35,"sheet_y":8,"sort_order":21},"🚲":{"category":"Travel & Places","sheet_x":35,"sheet_y":9,"sort_order":97},"🚳":{"category":"Symbols","sheet_x":35,"sheet_y":10,"sort_order":18},"🚴‍♀️":{"category":"People & Body","sheet_x":35,"sheet_y":11,"sort_order":269},"🚴‍♂️":{"category":"People & Body","sheet_x":35,"sheet_y":17,"sort_order":268},"🚴":{"category":"People & Body","sheet_x":35,"sheet_y":23,"sort_order":267},"🚵‍♀️":{"category":"People & Body","sheet_x":35,"sheet_y":29,"sort_order":272},"🚵‍♂️":{"category":"People & Body","sheet_x":35,"sheet_y":35,"sort_order":271},"🚵":{"category":"People & Body","sheet_x":35,"sheet_y":41,"sort_order":270},"🚶‍♀️":{"category":"People & Body","sheet_x":35,"sheet_y":47,"sort_order":214},"🚶‍♂️":{"category":"People & Body","sheet_x":35,"sheet_y":53,"sort_order":213},"🚶":{"category":"People & Body","sheet_x":36,"sheet_y":2,"sort_order":212},"🚷":{"category":"Symbols","sheet_x":36,"sheet_y":8,"sort_order":22},"🚸":{"category":"Symbols","sheet_x":36,"sheet_y":9,"sort_order":15},"🚹":{"category":"Symbols","sheet_x":36,"sheet_y":10,"sort_order":5},"🚺":{"category":"Symbols","sheet_x":36,"sheet_y":11,"sort_order":6},"🚻":{"category":"Symbols","sheet_x":36,"sheet_y":12,"sort_order":7},"🚼":{"category":"Symbols","sheet_x":36,"sheet_y":13,"sort_order":8},"🚽":{"category":"Objects","sheet_x":36,"sheet_y":14,"sort_order":217},"🚾":{"category":"Symbols","sheet_x":36,"sheet_y":15,"sort_order":9},"🚿":{"category":"Objects","sheet_x":36,"sheet_y":16,"sort_order":218},"🛀":{"category":"People & Body","sheet_x":36,"sheet_y":17,"sort_order":291},"🛁":{"category":"Objects","sheet_x":36,"sheet_y":23,"sort_order":219},"🛂":{"category":"Symbols","sheet_x":36,"sheet_y":24,"sort_order":10},"🛃":{"category":"Symbols","sheet_x":36,"sheet_y":25,"sort_order":11},"🛄":{"category":"Symbols","sheet_x":36,"sheet_y":26,"sort_order":12},"🛅":{"category":"Symbols","sheet_x":36,"sheet_y":27,"sort_order":13},"🛋️":{"category":"Objects","sheet_x":36,"sheet_y":28,"sort_order":215},"🛌":{"category":"People & Body","sheet_x":36,"sheet_y":29,"sort_order":292},"🛍️":{"category":"Objects","sheet_x":36,"sheet_y":35,"sort_order":24},"🛎️":{"category":"Travel & Places","sheet_x":36,"sheet_y":36,"sort_order":131},"🛏️":{"category":"Objects","sheet_x":36,"sheet_y":37,"sort_order":214},"🛐":{"category":"Symbols","sheet_x":36,"sheet_y":38,"sort_order":48},"🛑":{"category":"Travel & Places","sheet_x":36,"sheet_y":39,"sort_order":108},"🛒":{"category":"Objects","sheet_x":36,"sheet_y":40,"sort_order":229},"🛕":{"category":"Travel & Places","sheet_x":36,"sheet_y":41,"sort_order":43},"🛠️":{"category":"Objects","sheet_x":36,"sheet_y":42,"sort_order":185},"🛡️":{"category":"Objects","sheet_x":36,"sheet_y":43,"sort_order":190},"🛢️":{"category":"Travel & Places","sheet_x":36,"sheet_y":44,"sort_order":103},"🛣️":{"category":"Travel & Places","sheet_x":36,"sheet_y":45,"sort_order":101},"🛤️":{"category":"Travel & Places","sheet_x":36,"sheet_y":46,"sort_order":102},"🛥️":{"category":"Travel & Places","sheet_x":36,"sheet_y":47,"sort_order":116},"🛩️":{"category":"Travel & Places","sheet_x":36,"sheet_y":48,"sort_order":119},"🛫":{"category":"Travel & Places","sheet_x":36,"sheet_y":49,"sort_order":120},"🛬":{"category":"Travel & Places","sheet_x":36,"sheet_y":50,"sort_order":121},"🛰️":{"category":"Travel & Places","sheet_x":36,"sheet_y":51,"sort_order":128},"🛳️":{"category":"Travel & Places","sheet_x":36,"sheet_y":52,"sort_order":114},"🛴":{"category":"Travel & Places","sheet_x":36,"sheet_y":53,"sort_order":98},"🛵":{"category":"Travel & Places","sheet_x":36,"sheet_y":54,"sort_order":93},"🛶":{"category":"Travel & Places","sheet_x":36,"sheet_y":55,"sort_order":112},"🛷":{"category":"Activities","sheet_x":36,"sheet_y":56,"sort_order":53},"🛸":{"category":"Travel & Places","sheet_x":37,"sheet_y":0,"sort_order":130},"🛹":{"category":"Travel & Places","sheet_x":37,"sheet_y":1,"sort_order":99},"🛺":{"category":"Travel & Places","sheet_x":37,"sheet_y":2,"sort_order":96},"🟠":{"category":"Symbols","sheet_x":37,"sheet_y":3,"sort_order":185},"🟡":{"category":"Symbols","sheet_x":37,"sheet_y":4,"sort_order":186},"🟢":{"category":"Symbols","sheet_x":37,"sheet_y":5,"sort_order":187},"🟣":{"category":"Symbols","sheet_x":37,"sheet_y":6,"sort_order":189},"🟤":{"category":"Symbols","sheet_x":37,"sheet_y":7,"sort_order":190},"🟥":{"category":"Symbols","sheet_x":37,"sheet_y":8,"sort_order":193},"🟦":{"category":"Symbols","sheet_x":37,"sheet_y":9,"sort_order":197},"🟧":{"category":"Symbols","sheet_x":37,"sheet_y":10,"sort_order":194},"🟨":{"category":"Symbols","sheet_x":37,"sheet_y":11,"sort_order":195},"🟩":{"category":"Symbols","sheet_x":37,"sheet_y":12,"sort_order":196},"🟪":{"category":"Symbols","sheet_x":37,"sheet_y":13,"sort_order":198},"🟫":{"category":"Symbols","sheet_x":37,"sheet_y":14,"sort_order":199},"🤍":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":15,"sort_order":135},"🤎":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":16,"sort_order":133},"🤏":{"category":"People & Body","sheet_x":37,"sheet_y":17,"sort_order":7},"🤐":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":23,"sort_order":32},"🤑":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":24,"sort_order":27},"🤒":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":25,"sort_order":48},"🤓":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":26,"sort_order":61},"🤔":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":27,"sort_order":31},"🤕":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":28,"sort_order":49},"🤖":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":29,"sort_order":102},"🤗":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":30,"sort_order":28},"🤘":{"category":"People & Body","sheet_x":37,"sheet_y":31,"sort_order":11},"🤙":{"category":"People & Body","sheet_x":37,"sheet_y":37,"sort_order":12},"🤚":{"category":"People & Body","sheet_x":37,"sheet_y":43,"sort_order":2},"🤛":{"category":"People & Body","sheet_x":37,"sheet_y":49,"sort_order":23},"🤜":{"category":"People & Body","sheet_x":37,"sheet_y":55,"sort_order":24},"🤝":{"category":"People & Body","sheet_x":38,"sheet_y":4,"sort_order":29},"🤞":{"category":"People & Body","sheet_x":38,"sheet_y":5,"sort_order":9},"🤟":{"category":"People & Body","sheet_x":38,"sheet_y":11,"sort_order":10},"🤠":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":17,"sort_order":58},"🤡":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":18,"sort_order":96},"🤢":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":19,"sort_order":50},"🤣":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":20,"sort_order":7},"🤤":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":21,"sort_order":45},"🤥":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":22,"sort_order":41},"🤦‍♀️":{"category":"People & Body","sheet_x":38,"sheet_y":23,"sort_order":101},"🤦‍♂️":{"category":"People & Body","sheet_x":38,"sheet_y":29,"sort_order":100},"🤦":{"category":"People & Body","sheet_x":38,"sheet_y":35,"sort_order":99},"🤧":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":41,"sort_order":52},"🤨":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":42,"sort_order":33},"🤩":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":43,"sort_order":16},"🤪":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":44,"sort_order":25},"🤫":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":45,"sort_order":30},"🤬":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":46,"sort_order":90},"🤭":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":47,"sort_order":29},"🤮":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":48,"sort_order":51},"🤯":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":49,"sort_order":57},"🤰":{"category":"People & Body","sheet_x":38,"sheet_y":50,"sort_order":174},"🤱":{"category":"People & Body","sheet_x":38,"sheet_y":56,"sort_order":175},"🤲":{"category":"People & Body","sheet_x":39,"sheet_y":5,"sort_order":28},"🤳":{"category":"People & Body","sheet_x":39,"sheet_y":11,"sort_order":33},"🤴":{"category":"People & Body","sheet_x":39,"sheet_y":17,"sort_order":165},"🤵":{"category":"People & Body","sheet_x":39,"sheet_y":23,"sort_order":172},"🤶":{"category":"People & Body","sheet_x":39,"sheet_y":29,"sort_order":178},"🤷‍♀️":{"category":"People & Body","sheet_x":39,"sheet_y":35,"sort_order":104},"🤷‍♂️":{"category":"People & Body","sheet_x":39,"sheet_y":41,"sort_order":103},"🤷":{"category":"People & Body","sheet_x":39,"sheet_y":47,"sort_order":102},"🤸‍♀️":{"category":"People & Body","sheet_x":39,"sheet_y":53,"sort_order":275},"🤸‍♂️":{"category":"People & Body","sheet_x":40,"sheet_y":2,"sort_order":274},"🤸":{"category":"People & Body","sheet_x":40,"sheet_y":8,"sort_order":273},"🤹‍♀️":{"category":"People & Body","sheet_x":40,"sheet_y":14,"sort_order":287},"🤹‍♂️":{"category":"People & Body","sheet_x":40,"sheet_y":20,"sort_order":286},"🤹":{"category":"People & Body","sheet_x":40,"sheet_y":26,"sort_order":285},"🤺":{"category":"People & Body","sheet_x":40,"sheet_y":32,"sort_order":245},"🤼‍♀️":{"category":"People & Body","sheet_x":40,"sheet_y":33,"sort_order":278},"🤼‍♂️":{"category":"People & Body","sheet_x":40,"sheet_y":34,"sort_order":277},"🤼":{"category":"People & Body","sheet_x":40,"sheet_y":35,"sort_order":276},"🤽‍♀️":{"category":"People & Body","sheet_x":40,"sheet_y":36,"sort_order":281},"🤽‍♂️":{"category":"People & Body","sheet_x":40,"sheet_y":42,"sort_order":280},"🤽":{"category":"People & Body","sheet_x":40,"sheet_y":48,"sort_order":279},"🤾‍♀️":{"category":"People & Body","sheet_x":40,"sheet_y":54,"sort_order":284},"🤾‍♂️":{"category":"People & Body","sheet_x":41,"sheet_y":3,"sort_order":283},"🤾":{"category":"People & Body","sheet_x":41,"sheet_y":9,"sort_order":282},"🤿":{"category":"Activities","sheet_x":41,"sheet_y":15,"sort_order":50},"🥀":{"category":"Animals & Nature","sheet_x":41,"sheet_y":16,"sort_order":111},"🥁":{"category":"Objects","sheet_x":41,"sheet_y":17,"sort_order":68},"🥂":{"category":"Food & Drink","sheet_x":41,"sheet_y":18,"sort_order":110},"🥃":{"category":"Food & Drink","sheet_x":41,"sheet_y":19,"sort_order":111},"🥄":{"category":"Food & Drink","sheet_x":41,"sheet_y":20,"sort_order":119},"🥅":{"category":"Activities","sheet_x":41,"sheet_y":21,"sort_order":46},"🥇":{"category":"Activities","sheet_x":41,"sheet_y":22,"sort_order":25},"🥈":{"category":"Activities","sheet_x":41,"sheet_y":23,"sort_order":26},"🥉":{"category":"Activities","sheet_x":41,"sheet_y":24,"sort_order":27},"🥊":{"category":"Activities","sheet_x":41,"sheet_y":25,"sort_order":44},"🥋":{"category":"Activities","sheet_x":41,"sheet_y":26,"sort_order":45},"🥌":{"category":"Activities","sheet_x":41,"sheet_y":27,"sort_order":54},"🥍":{"category":"Activities","sheet_x":41,"sheet_y":28,"sort_order":41},"🥎":{"category":"Activities","sheet_x":41,"sheet_y":29,"sort_order":30},"🥏":{"category":"Activities","sheet_x":41,"sheet_y":30,"sort_order":36},"🥐":{"category":"Food & Drink","sheet_x":41,"sheet_y":31,"sort_order":33},"🥑":{"category":"Food & Drink","sheet_x":41,"sheet_y":32,"sort_order":18},"🥒":{"category":"Food & Drink","sheet_x":41,"sheet_y":33,"sort_order":24},"🥓":{"category":"Food & Drink","sheet_x":41,"sheet_y":34,"sort_order":43},"🥔":{"category":"Food & Drink","sheet_x":41,"sheet_y":35,"sort_order":20},"🥕":{"category":"Food & Drink","sheet_x":41,"sheet_y":36,"sort_order":21},"🥖":{"category":"Food & Drink","sheet_x":41,"sheet_y":37,"sort_order":34},"🥗":{"category":"Food & Drink","sheet_x":41,"sheet_y":38,"sort_order":58},"🥘":{"category":"Food & Drink","sheet_x":41,"sheet_y":39,"sort_order":55},"🥙":{"category":"Food & Drink","sheet_x":41,"sheet_y":40,"sort_order":51},"🥚":{"category":"Food & Drink","sheet_x":41,"sheet_y":41,"sort_order":53},"🥛":{"category":"Food & Drink","sheet_x":41,"sheet_y":42,"sort_order":100},"🥜":{"category":"Food & Drink","sheet_x":41,"sheet_y":43,"sort_order":30},"🥝":{"category":"Food & Drink","sheet_x":41,"sheet_y":44,"sort_order":15},"🥞":{"category":"Food & Drink","sheet_x":41,"sheet_y":45,"sort_order":37},"🥟":{"category":"Food & Drink","sheet_x":41,"sheet_y":46,"sort_order":77},"🥠":{"category":"Food & Drink","sheet_x":41,"sheet_y":47,"sort_order":78},"🥡":{"category":"Food & Drink","sheet_x":41,"sheet_y":48,"sort_order":79},"🥢":{"category":"Food & Drink","sheet_x":41,"sheet_y":49,"sort_order":116},"🥣":{"category":"Food & Drink","sheet_x":41,"sheet_y":50,"sort_order":57},"🥤":{"category":"Food & Drink","sheet_x":41,"sheet_y":51,"sort_order":112},"🥥":{"category":"Food & Drink","sheet_x":41,"sheet_y":52,"sort_order":17},"🥦":{"category":"Food & Drink","sheet_x":41,"sheet_y":53,"sort_order":26},"🥧":{"category":"Food & Drink","sheet_x":41,"sheet_y":54,"sort_order":93},"🥨":{"category":"Food & Drink","sheet_x":41,"sheet_y":55,"sort_order":35},"🥩":{"category":"Food & Drink","sheet_x":41,"sheet_y":56,"sort_order":42},"🥪":{"category":"Food & Drink","sheet_x":42,"sheet_y":0,"sort_order":48},"🥫":{"category":"Food & Drink","sheet_x":42,"sheet_y":1,"sort_order":62},"🥬":{"category":"Food & Drink","sheet_x":42,"sheet_y":2,"sort_order":25},"🥭":{"category":"Food & Drink","sheet_x":42,"sheet_y":3,"sort_order":8},"🥮":{"category":"Food & Drink","sheet_x":42,"sheet_y":4,"sort_order":75},"🥯":{"category":"Food & Drink","sheet_x":42,"sheet_y":5,"sort_order":36},"🥰":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":6,"sort_order":14},"🥱":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":7,"sort_order":86},"🥳":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":8,"sort_order":59},"🥴":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":9,"sort_order":55},"🥵":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":10,"sort_order":53},"🥶":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":11,"sort_order":54},"🥺":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":12,"sort_order":71},"🥻":{"category":"Objects","sheet_x":42,"sheet_y":13,"sort_order":15},"🥼":{"category":"Objects","sheet_x":42,"sheet_y":14,"sort_order":4},"🥽":{"category":"Objects","sheet_x":42,"sheet_y":15,"sort_order":3},"🥾":{"category":"Objects","sheet_x":42,"sheet_y":16,"sort_order":28},"🥿":{"category":"Objects","sheet_x":42,"sheet_y":17,"sort_order":29},"🦀":{"category":"Food & Drink","sheet_x":42,"sheet_y":18,"sort_order":80},"🦁":{"category":"Animals & Nature","sheet_x":42,"sheet_y":19,"sort_order":15},"🦂":{"category":"Animals & Nature","sheet_x":42,"sheet_y":20,"sort_order":103},"🦃":{"category":"Animals & Nature","sheet_x":42,"sheet_y":21,"sort_order":60},"🦄":{"category":"Animals & Nature","sheet_x":42,"sheet_y":22,"sort_order":21},"🦅":{"category":"Animals & Nature","sheet_x":42,"sheet_y":23,"sort_order":69},"🦆":{"category":"Animals & Nature","sheet_x":42,"sheet_y":24,"sort_order":70},"🦇":{"category":"Animals & Nature","sheet_x":42,"sheet_y":25,"sort_order":50},"🦈":{"category":"Animals & Nature","sheet_x":42,"sheet_y":26,"sort_order":91},"🦉":{"category":"Animals & Nature","sheet_x":42,"sheet_y":27,"sort_order":72},"🦊":{"category":"Animals & Nature","sheet_x":42,"sheet_y":28,"sort_order":11},"🦋":{"category":"Animals & Nature","sheet_x":42,"sheet_y":29,"sort_order":95},"🦌":{"category":"Animals & Nature","sheet_x":42,"sheet_y":30,"sort_order":23},"🦍":{"category":"Animals & Nature","sheet_x":42,"sheet_y":31,"sort_order":3},"🦎":{"category":"Animals & Nature","sheet_x":42,"sheet_y":32,"sort_order":79},"🦏":{"category":"Animals & Nature","sheet_x":42,"sheet_y":33,"sort_order":40},"🦐":{"category":"Food & Drink","sheet_x":42,"sheet_y":34,"sort_order":82},"🦑":{"category":"Food & Drink","sheet_x":42,"sheet_y":35,"sort_order":83},"🦒":{"category":"Animals & Nature","sheet_x":42,"sheet_y":36,"sort_order":38},"🦓":{"category":"Animals & Nature","sheet_x":42,"sheet_y":37,"sort_order":22},"🦔":{"category":"Animals & Nature","sheet_x":42,"sheet_y":38,"sort_order":49},"🦕":{"category":"Animals & Nature","sheet_x":42,"sheet_y":39,"sort_order":83},"🦖":{"category":"Animals & Nature","sheet_x":42,"sheet_y":40,"sort_order":84},"🦗":{"category":"Animals & Nature","sheet_x":42,"sheet_y":41,"sort_order":100},"🦘":{"category":"Animals & Nature","sheet_x":42,"sheet_y":42,"sort_order":57},"🦙":{"category":"Animals & Nature","sheet_x":42,"sheet_y":43,"sort_order":37},"🦚":{"category":"Animals & Nature","sheet_x":42,"sheet_y":44,"sort_order":74},"🦛":{"category":"Animals & Nature","sheet_x":42,"sheet_y":45,"sort_order":41},"🦜":{"category":"Animals & Nature","sheet_x":42,"sheet_y":46,"sort_order":75},"🦝":{"category":"Animals & Nature","sheet_x":42,"sheet_y":47,"sort_order":12},"🦞":{"category":"Food & Drink","sheet_x":42,"sheet_y":48,"sort_order":81},"🦟":{"category":"Animals & Nature","sheet_x":42,"sheet_y":49,"sort_order":104},"🦠":{"category":"Animals & Nature","sheet_x":42,"sheet_y":50,"sort_order":105},"🦡":{"category":"Animals & Nature","sheet_x":42,"sheet_y":51,"sort_order":58},"🦢":{"category":"Animals & Nature","sheet_x":42,"sheet_y":52,"sort_order":71},"🦥":{"category":"Animals & Nature","sheet_x":42,"sheet_y":53,"sort_order":54},"🦦":{"category":"Animals & Nature","sheet_x":42,"sheet_y":54,"sort_order":55},"🦧":{"category":"Animals & Nature","sheet_x":42,"sheet_y":55,"sort_order":4},"🦨":{"category":"Animals & Nature","sheet_x":42,"sheet_y":56,"sort_order":56},"🦩":{"category":"Animals & Nature","sheet_x":43,"sheet_y":0,"sort_order":73},"🦪":{"category":"Food & Drink","sheet_x":43,"sheet_y":1,"sort_order":84},"🦮":{"category":"Animals & Nature","sheet_x":43,"sheet_y":2,"sort_order":7},"🦯":{"category":"Objects","sheet_x":43,"sheet_y":3,"sort_order":196},"🦴":{"category":"People & Body","sheet_x":43,"sheet_y":4,"sort_order":44},"🦵":{"category":"People & Body","sheet_x":43,"sheet_y":5,"sort_order":37},"🦶":{"category":"People & Body","sheet_x":43,"sheet_y":11,"sort_order":38},"🦷":{"category":"People & Body","sheet_x":43,"sheet_y":17,"sort_order":43},"🦸‍♀️":{"category":"People & Body","sheet_x":43,"sheet_y":18,"sort_order":181},"🦸‍♂️":{"category":"People & Body","sheet_x":43,"sheet_y":24,"sort_order":180},"🦸":{"category":"People & Body","sheet_x":43,"sheet_y":30,"sort_order":179},"🦹‍♀️":{"category":"People & Body","sheet_x":43,"sheet_y":36,"sort_order":184},"🦹‍♂️":{"category":"People & Body","sheet_x":43,"sheet_y":42,"sort_order":183},"🦹":{"category":"People & Body","sheet_x":43,"sheet_y":48,"sort_order":182},"🦺":{"category":"Objects","sheet_x":43,"sheet_y":54,"sort_order":5},"🦻":{"category":"People & Body","sheet_x":43,"sheet_y":55,"sort_order":40},"🦼":{"category":"Travel & Places","sheet_x":44,"sheet_y":4,"sort_order":95},"🦽":{"category":"Travel & Places","sheet_x":44,"sheet_y":5,"sort_order":94},"🦾":{"category":"People & Body","sheet_x":44,"sheet_y":6,"sort_order":35},"🦿":{"category":"People & Body","sheet_x":44,"sheet_y":7,"sort_order":36},"🧀":{"category":"Food & Drink","sheet_x":44,"sheet_y":8,"sort_order":39},"🧁":{"category":"Food & Drink","sheet_x":44,"sheet_y":9,"sort_order":92},"🧂":{"category":"Food & Drink","sheet_x":44,"sheet_y":10,"sort_order":61},"🧃":{"category":"Food & Drink","sheet_x":44,"sheet_y":11,"sort_order":113},"🧄":{"category":"Food & Drink","sheet_x":44,"sheet_y":12,"sort_order":27},"🧅":{"category":"Food & Drink","sheet_x":44,"sheet_y":13,"sort_order":28},"🧆":{"category":"Food & Drink","sheet_x":44,"sheet_y":14,"sort_order":52},"🧇":{"category":"Food & Drink","sheet_x":44,"sheet_y":15,"sort_order":38},"🧈":{"category":"Food & Drink","sheet_x":44,"sheet_y":16,"sort_order":60},"🧉":{"category":"Food & Drink","sheet_x":44,"sheet_y":17,"sort_order":114},"🧊":{"category":"Food & Drink","sheet_x":44,"sheet_y":18,"sort_order":115},"🧍‍♀️":{"category":"People & Body","sheet_x":44,"sheet_y":19,"sort_order":217},"🧍‍♂️":{"category":"People & Body","sheet_x":44,"sheet_y":25,"sort_order":216},"🧍":{"category":"People & Body","sheet_x":44,"sheet_y":31,"sort_order":215},"🧎‍♀️":{"category":"People & Body","sheet_x":44,"sheet_y":37,"sort_order":220},"🧎‍♂️":{"category":"People & Body","sheet_x":44,"sheet_y":43,"sort_order":219},"🧎":{"category":"People & Body","sheet_x":44,"sheet_y":49,"sort_order":218},"🧏‍♀️":{"category":"People & Body","sheet_x":44,"sheet_y":55,"sort_order":95},"🧏‍♂️":{"category":"People & Body","sheet_x":45,"sheet_y":4,"sort_order":94},"🧏":{"category":"People & Body","sheet_x":45,"sheet_y":10,"sort_order":93},"🧐":{"category":"Smileys & Emotion","sheet_x":45,"sheet_y":16,"sort_order":62},"🧑‍🌾":{"category":"People & Body","sheet_x":45,"sheet_y":17,"sort_order":117},"🧑‍🍳":{"category":"People & Body","sheet_x":45,"sheet_y":23,"sort_order":120},"🧑‍🎓":{"category":"People & Body","sheet_x":45,"sheet_y":29,"sort_order":108},"🧑‍🎤":{"category":"People & Body","sheet_x":45,"sheet_y":35,"sort_order":138},"🧑‍🎨":{"category":"People & Body","sheet_x":45,"sheet_y":41,"sort_order":141},"🧑‍🏫":{"category":"People & Body","sheet_x":45,"sheet_y":47,"sort_order":111},"🧑‍🏭":{"category":"People & Body","sheet_x":45,"sheet_y":53,"sort_order":126},"🧑‍💻":{"category":"People & Body","sheet_x":46,"sheet_y":2,"sort_order":135},"🧑‍💼":{"category":"People & Body","sheet_x":46,"sheet_y":8,"sort_order":129},"🧑‍🔧":{"category":"People & Body","sheet_x":46,"sheet_y":14,"sort_order":123},"🧑‍🔬":{"category":"People & Body","sheet_x":46,"sheet_y":20,"sort_order":132},"🧑‍🚀":{"category":"People & Body","sheet_x":46,"sheet_y":26,"sort_order":147},"🧑‍🚒":{"category":"People & Body","sheet_x":46,"sheet_y":32,"sort_order":150},"🧑‍🤝‍🧑":{"category":"People & Body","sheet_x":46,"sheet_y":38,"sort_order":293},"🧑‍🦯":{"category":"People & Body","sheet_x":47,"sheet_y":7,"sort_order":221},"🧑‍🦰":{"category":"People & Body","sheet_x":47,"sheet_y":13,"sort_order":63},"🧑‍🦱":{"category":"People & Body","sheet_x":47,"sheet_y":19,"sort_order":65},"🧑‍🦲":{"category":"People & Body","sheet_x":47,"sheet_y":25,"sort_order":69},"🧑‍🦳":{"category":"People & Body","sheet_x":47,"sheet_y":31,"sort_order":67},"🧑‍🦼":{"category":"People & Body","sheet_x":47,"sheet_y":37,"sort_order":224},"🧑‍🦽":{"category":"People & Body","sheet_x":47,"sheet_y":43,"sort_order":227},"🧑‍⚕️":{"category":"People & Body","sheet_x":47,"sheet_y":49,"sort_order":105},"🧑‍⚖️":{"category":"People & Body","sheet_x":47,"sheet_y":55,"sort_order":114},"🧑‍✈️":{"category":"People & Body","sheet_x":48,"sheet_y":4,"sort_order":144},"🧑":{"category":"People & Body","sheet_x":48,"sheet_y":10,"sort_order":53},"🧒":{"category":"People & Body","sheet_x":48,"sheet_y":16,"sort_order":50},"🧓":{"category":"People & Body","sheet_x":48,"sheet_y":22,"sort_order":72},"🧔":{"category":"People & Body","sheet_x":48,"sheet_y":28,"sort_order":56},"🧕":{"category":"People & Body","sheet_x":48,"sheet_y":34,"sort_order":171},"🧖‍♀️":{"category":"People & Body","sheet_x":48,"sheet_y":40,"sort_order":241},"🧖‍♂️":{"category":"People & Body","sheet_x":48,"sheet_y":46,"sort_order":240},"🧖":{"category":"People & Body","sheet_x":48,"sheet_y":52,"sort_order":239},"🧗‍♀️":{"category":"People & Body","sheet_x":49,"sheet_y":1,"sort_order":244},"🧗‍♂️":{"category":"People & Body","sheet_x":49,"sheet_y":7,"sort_order":243},"🧗":{"category":"People & Body","sheet_x":49,"sheet_y":13,"sort_order":242},"🧘‍♀️":{"category":"People & Body","sheet_x":49,"sheet_y":19,"sort_order":290},"🧘‍♂️":{"category":"People & Body","sheet_x":49,"sheet_y":25,"sort_order":289},"🧘":{"category":"People & Body","sheet_x":49,"sheet_y":31,"sort_order":288},"🧙‍♀️":{"category":"People & Body","sheet_x":49,"sheet_y":37,"sort_order":187},"🧙‍♂️":{"category":"People & Body","sheet_x":49,"sheet_y":43,"sort_order":186},"🧙":{"category":"People & Body","sheet_x":49,"sheet_y":49,"sort_order":185},"🧚‍♀️":{"category":"People & Body","sheet_x":49,"sheet_y":55,"sort_order":190},"🧚‍♂️":{"category":"People & Body","sheet_x":50,"sheet_y":4,"sort_order":189},"🧚":{"category":"People & Body","sheet_x":50,"sheet_y":10,"sort_order":188},"🧛‍♀️":{"category":"People & Body","sheet_x":50,"sheet_y":16,"sort_order":193},"🧛‍♂️":{"category":"People & Body","sheet_x":50,"sheet_y":22,"sort_order":192},"🧛":{"category":"People & Body","sheet_x":50,"sheet_y":28,"sort_order":191},"🧜‍♀️":{"category":"People & Body","sheet_x":50,"sheet_y":34,"sort_order":196},"🧜‍♂️":{"category":"People & Body","sheet_x":50,"sheet_y":40,"sort_order":195},"🧜":{"category":"People & Body","sheet_x":50,"sheet_y":46,"sort_order":194},"🧝‍♀️":{"category":"People & Body","sheet_x":50,"sheet_y":52,"sort_order":199},"🧝‍♂️":{"category":"People & Body","sheet_x":51,"sheet_y":1,"sort_order":198},"🧝":{"category":"People & Body","sheet_x":51,"sheet_y":7,"sort_order":197},"🧞‍♀️":{"category":"People & Body","sheet_x":51,"sheet_y":13,"sort_order":202},"🧞‍♂️":{"category":"People & Body","sheet_x":51,"sheet_y":14,"sort_order":201},"🧞":{"category":"People & Body","sheet_x":51,"sheet_y":15,"sort_order":200},"🧟‍♀️":{"category":"People & Body","sheet_x":51,"sheet_y":16,"sort_order":205},"🧟‍♂️":{"category":"People & Body","sheet_x":51,"sheet_y":17,"sort_order":204},"🧟":{"category":"People & Body","sheet_x":51,"sheet_y":18,"sort_order":203},"🧠":{"category":"People & Body","sheet_x":51,"sheet_y":19,"sort_order":42},"🧡":{"category":"Smileys & Emotion","sheet_x":51,"sheet_y":20,"sort_order":128},"🧢":{"category":"Objects","sheet_x":51,"sheet_y":21,"sort_order":38},"🧣":{"category":"Objects","sheet_x":51,"sheet_y":22,"sort_order":9},"🧤":{"category":"Objects","sheet_x":51,"sheet_y":23,"sort_order":10},"🧥":{"category":"Objects","sheet_x":51,"sheet_y":24,"sort_order":11},"🧦":{"category":"Objects","sheet_x":51,"sheet_y":25,"sort_order":12},"🧧":{"category":"Activities","sheet_x":51,"sheet_y":26,"sort_order":16},"🧨":{"category":"Activities","sheet_x":51,"sheet_y":27,"sort_order":5},"🧩":{"category":"Activities","sheet_x":51,"sheet_y":28,"sort_order":65},"🧪":{"category":"Objects","sheet_x":51,"sheet_y":29,"sort_order":202},"🧫":{"category":"Objects","sheet_x":51,"sheet_y":30,"sort_order":203},"🧬":{"category":"Objects","sheet_x":51,"sheet_y":31,"sort_order":204},"🧭":{"category":"Travel & Places","sheet_x":51,"sheet_y":32,"sort_order":7},"🧮":{"category":"Objects","sheet_x":51,"sheet_y":33,"sort_order":87},"🧯":{"category":"Objects","sheet_x":51,"sheet_y":34,"sort_order":228},"🧰":{"category":"Objects","sheet_x":51,"sheet_y":35,"sort_order":199},"🧱":{"category":"Travel & Places","sheet_x":51,"sheet_y":36,"sort_order":20},"🧲":{"category":"Objects","sheet_x":51,"sheet_y":37,"sort_order":200},"🧳":{"category":"Travel & Places","sheet_x":51,"sheet_y":38,"sort_order":132},"🧴":{"category":"Objects","sheet_x":51,"sheet_y":39,"sort_order":221},"🧵":{"category":"Activities","sheet_x":51,"sheet_y":40,"sort_order":78},"🧶":{"category":"Activities","sheet_x":51,"sheet_y":41,"sort_order":79},"🧷":{"category":"Objects","sheet_x":51,"sheet_y":42,"sort_order":222},"🧸":{"category":"Activities","sheet_x":51,"sheet_y":43,"sort_order":66},"🧹":{"category":"Objects","sheet_x":51,"sheet_y":44,"sort_order":223},"🧺":{"category":"Objects","sheet_x":51,"sheet_y":45,"sort_order":224},"🧻":{"category":"Objects","sheet_x":51,"sheet_y":46,"sort_order":225},"🧼":{"category":"Objects","sheet_x":51,"sheet_y":47,"sort_order":226},"🧽":{"category":"Objects","sheet_x":51,"sheet_y":48,"sort_order":227},"🧾":{"category":"Objects","sheet_x":51,"sheet_y":49,"sort_order":128},"🧿":{"category":"Activities","sheet_x":51,"sheet_y":50,"sort_order":60},"🩰":{"category":"Objects","sheet_x":51,"sheet_y":51,"sort_order":32},"🩱":{"category":"Objects","sheet_x":51,"sheet_y":52,"sort_order":16},"🩲":{"category":"Objects","sheet_x":51,"sheet_y":53,"sort_order":17},"🩳":{"category":"Objects","sheet_x":51,"sheet_y":54,"sort_order":18},"🩸":{"category":"Objects","sheet_x":51,"sheet_y":55,"sort_order":209},"🩹":{"category":"Objects","sheet_x":51,"sheet_y":56,"sort_order":211},"🩺":{"category":"Objects","sheet_x":52,"sheet_y":0,"sort_order":212},"🪀":{"category":"Activities","sheet_x":52,"sheet_y":1,"sort_order":56},"🪁":{"category":"Activities","sheet_x":52,"sheet_y":2,"sort_order":57},"🪂":{"category":"Travel & Places","sheet_x":52,"sheet_y":3,"sort_order":122},"🪐":{"category":"Travel & Places","sheet_x":52,"sheet_y":4,"sort_order":180},"🪑":{"category":"Objects","sheet_x":52,"sheet_y":5,"sort_order":216},"🪒":{"category":"Objects","sheet_x":52,"sheet_y":6,"sort_order":220},"🪓":{"category":"Objects","sheet_x":52,"sheet_y":7,"sort_order":182},"🪔":{"category":"Objects","sheet_x":52,"sheet_y":8,"sort_order":103},"🪕":{"category":"Objects","sheet_x":52,"sheet_y":9,"sort_order":67},"‼️":{"category":"Symbols","sheet_x":52,"sheet_y":10,"sort_order":122},"⁉️":{"category":"Symbols","sheet_x":52,"sheet_y":11,"sort_order":123},"™️":{"category":"Symbols","sheet_x":52,"sheet_y":12,"sort_order":131},"ℹ️":{"category":"Symbols","sheet_x":52,"sheet_y":13,"sort_order":156},"↔️":{"category":"Symbols","sheet_x":52,"sheet_y":14,"sort_order":36},"↕️":{"category":"Symbols","sheet_x":52,"sheet_y":15,"sort_order":35},"↖️":{"category":"Symbols","sheet_x":52,"sheet_y":16,"sort_order":34},"↗️":{"category":"Symbols","sheet_x":52,"sheet_y":17,"sort_order":28},"↘️":{"category":"Symbols","sheet_x":52,"sheet_y":18,"sort_order":30},"↙️":{"category":"Symbols","sheet_x":52,"sheet_y":19,"sort_order":32},"↩️":{"category":"Symbols","sheet_x":52,"sheet_y":20,"sort_order":37},"↪️":{"category":"Symbols","sheet_x":52,"sheet_y":21,"sort_order":38},"⌚":{"category":"Travel & Places","sheet_x":52,"sheet_y":22,"sort_order":135},"⌛":{"category":"Travel & Places","sheet_x":52,"sheet_y":23,"sort_order":133},"⌨️":{"category":"Objects","sheet_x":52,"sheet_y":24,"sort_order":80},"⏏️":{"category":"Symbols","sheet_x":52,"sheet_y":25,"sort_order":90},"⏩":{"category":"Symbols","sheet_x":52,"sheet_y":26,"sort_order":77},"⏪":{"category":"Symbols","sheet_x":52,"sheet_y":27,"sort_order":81},"⏫":{"category":"Symbols","sheet_x":52,"sheet_y":28,"sort_order":84},"⏬":{"category":"Symbols","sheet_x":52,"sheet_y":29,"sort_order":86},"⏭️":{"category":"Symbols","sheet_x":52,"sheet_y":30,"sort_order":78},"⏮️":{"category":"Symbols","sheet_x":52,"sheet_y":31,"sort_order":82},"⏯️":{"category":"Symbols","sheet_x":52,"sheet_y":32,"sort_order":79},"⏰":{"category":"Travel & Places","sheet_x":52,"sheet_y":33,"sort_order":136},"⏱️":{"category":"Travel & Places","sheet_x":52,"sheet_y":34,"sort_order":137},"⏲️":{"category":"Travel & Places","sheet_x":52,"sheet_y":35,"sort_order":138},"⏳":{"category":"Travel & Places","sheet_x":52,"sheet_y":36,"sort_order":134},"⏸️":{"category":"Symbols","sheet_x":52,"sheet_y":37,"sort_order":87},"⏹️":{"category":"Symbols","sheet_x":52,"sheet_y":38,"sort_order":88},"⏺️":{"category":"Symbols","sheet_x":52,"sheet_y":39,"sort_order":89},"Ⓜ️":{"category":"Symbols","sheet_x":52,"sheet_y":40,"sort_order":158},"▪️":{"category":"Symbols","sheet_x":52,"sheet_y":41,"sort_order":206},"▫️":{"category":"Symbols","sheet_x":52,"sheet_y":42,"sort_order":207},"▶️":{"category":"Symbols","sheet_x":52,"sheet_y":43,"sort_order":76},"◀️":{"category":"Symbols","sheet_x":52,"sheet_y":44,"sort_order":80},"◻️":{"category":"Symbols","sheet_x":52,"sheet_y":45,"sort_order":203},"◼️":{"category":"Symbols","sheet_x":52,"sheet_y":46,"sort_order":202},"◽":{"category":"Symbols","sheet_x":52,"sheet_y":47,"sort_order":205},"◾":{"category":"Symbols","sheet_x":52,"sheet_y":48,"sort_order":204},"☀️":{"category":"Travel & Places","sheet_x":52,"sheet_y":49,"sort_order":177},"☁️":{"category":"Travel & Places","sheet_x":52,"sheet_y":50,"sort_order":185},"☂️":{"category":"Travel & Places","sheet_x":52,"sheet_y":51,"sort_order":200},"☃️":{"category":"Travel & Places","sheet_x":52,"sheet_y":52,"sort_order":205},"☄️":{"category":"Travel & Places","sheet_x":52,"sheet_y":53,"sort_order":207},"☎️":{"category":"Objects","sheet_x":52,"sheet_y":54,"sort_order":71},"☑️":{"category":"Symbols","sheet_x":52,"sheet_y":55,"sort_order":108},"☔":{"category":"Travel & Places","sheet_x":52,"sheet_y":56,"sort_order":201},"☕":{"category":"Food & Drink","sheet_x":53,"sheet_y":0,"sort_order":101},"☘️":{"category":"Animals & Nature","sheet_x":53,"sheet_y":1,"sort_order":123},"☝️":{"category":"People & Body","sheet_x":53,"sheet_y":2,"sort_order":18},"☠️":{"category":"Smileys & Emotion","sheet_x":53,"sheet_y":8,"sort_order":94},"☢️":{"category":"Symbols","sheet_x":53,"sheet_y":9,"sort_order":25},"☣️":{"category":"Symbols","sheet_x":53,"sheet_y":10,"sort_order":26},"☦️":{"category":"Symbols","sheet_x":53,"sheet_y":11,"sort_order":55},"☪️":{"category":"Symbols","sheet_x":53,"sheet_y":12,"sort_order":56},"☮️":{"category":"Symbols","sheet_x":53,"sheet_y":13,"sort_order":57},"☯️":{"category":"Symbols","sheet_x":53,"sheet_y":14,"sort_order":53},"☸️":{"category":"Symbols","sheet_x":53,"sheet_y":15,"sort_order":52},"☹️":{"category":"Smileys & Emotion","sheet_x":53,"sheet_y":16,"sort_order":66},"☺️":{"category":"Smileys & Emotion","sheet_x":53,"sheet_y":17,"sort_order":19},"♈":{"category":"Symbols","sheet_x":53,"sheet_y":20,"sort_order":60},"♉":{"category":"Symbols","sheet_x":53,"sheet_y":21,"sort_order":61},"♊":{"category":"Symbols","sheet_x":53,"sheet_y":22,"sort_order":62},"♋":{"category":"Symbols","sheet_x":53,"sheet_y":23,"sort_order":63},"♌":{"category":"Symbols","sheet_x":53,"sheet_y":24,"sort_order":64},"♍":{"category":"Symbols","sheet_x":53,"sheet_y":25,"sort_order":65},"♎":{"category":"Symbols","sheet_x":53,"sheet_y":26,"sort_order":66},"♏":{"category":"Symbols","sheet_x":53,"sheet_y":27,"sort_order":67},"♐":{"category":"Symbols","sheet_x":53,"sheet_y":28,"sort_order":68},"♑":{"category":"Symbols","sheet_x":53,"sheet_y":29,"sort_order":69},"♒":{"category":"Symbols","sheet_x":53,"sheet_y":30,"sort_order":70},"♓":{"category":"Symbols","sheet_x":53,"sheet_y":31,"sort_order":71},"♟️":{"category":"Activities","sheet_x":53,"sheet_y":32,"sort_order":71},"♠️":{"category":"Activities","sheet_x":53,"sheet_y":33,"sort_order":67},"♣️":{"category":"Activities","sheet_x":53,"sheet_y":34,"sort_order":70},"♥️":{"category":"Activities","sheet_x":53,"sheet_y":35,"sort_order":68},"♦️":{"category":"Activities","sheet_x":53,"sheet_y":36,"sort_order":69},"♨️":{"category":"Travel & Places","sheet_x":53,"sheet_y":37,"sort_order":57},"♻️":{"category":"Symbols","sheet_x":53,"sheet_y":38,"sort_order":101},"♾️":{"category":"Symbols","sheet_x":53,"sheet_y":39,"sort_order":100},"♿":{"category":"Symbols","sheet_x":53,"sheet_y":40,"sort_order":4},"⚒️":{"category":"Objects","sheet_x":53,"sheet_y":41,"sort_order":184},"⚓":{"category":"Travel & Places","sheet_x":53,"sheet_y":42,"sort_order":110},"⚔️":{"category":"Objects","sheet_x":53,"sheet_y":43,"sort_order":187},"⚖️":{"category":"Objects","sheet_x":53,"sheet_y":45,"sort_order":195},"⚗️":{"category":"Objects","sheet_x":53,"sheet_y":46,"sort_order":201},"⚙️":{"category":"Objects","sheet_x":53,"sheet_y":47,"sort_order":193},"⚛️":{"category":"Symbols","sheet_x":53,"sheet_y":48,"sort_order":49},"⚜️":{"category":"Symbols","sheet_x":53,"sheet_y":49,"sort_order":102},"⚠️":{"category":"Symbols","sheet_x":53,"sheet_y":50,"sort_order":14},"⚡":{"category":"Travel & Places","sheet_x":53,"sheet_y":51,"sort_order":203},"⚪":{"category":"Symbols","sheet_x":53,"sheet_y":52,"sort_order":192},"⚫":{"category":"Symbols","sheet_x":53,"sheet_y":53,"sort_order":191},"⚰️":{"category":"Objects","sheet_x":53,"sheet_y":54,"sort_order":231},"⚱️":{"category":"Objects","sheet_x":53,"sheet_y":55,"sort_order":232},"⚽":{"category":"Activities","sheet_x":53,"sheet_y":56,"sort_order":28},"⚾":{"category":"Activities","sheet_x":54,"sheet_y":0,"sort_order":29},"⛄":{"category":"Travel & Places","sheet_x":54,"sheet_y":1,"sort_order":206},"⛅":{"category":"Travel & Places","sheet_x":54,"sheet_y":2,"sort_order":186},"⛈️":{"category":"Travel & Places","sheet_x":54,"sheet_y":3,"sort_order":187},"⛎":{"category":"Symbols","sheet_x":54,"sheet_y":4,"sort_order":72},"⛏️":{"category":"Objects","sheet_x":54,"sheet_y":5,"sort_order":183},"⛑️":{"category":"Objects","sheet_x":54,"sheet_y":6,"sort_order":39},"⛓️":{"category":"Objects","sheet_x":54,"sheet_y":7,"sort_order":198},"⛔":{"category":"Symbols","sheet_x":54,"sheet_y":8,"sort_order":16},"⛩️":{"category":"Travel & Places","sheet_x":54,"sheet_y":9,"sort_order":45},"⛪":{"category":"Travel & Places","sheet_x":54,"sheet_y":10,"sort_order":41},"⛰️":{"category":"Travel & Places","sheet_x":54,"sheet_y":11,"sort_order":9},"⛱️":{"category":"Travel & Places","sheet_x":54,"sheet_y":12,"sort_order":202},"⛲":{"category":"Travel & Places","sheet_x":54,"sheet_y":13,"sort_order":47},"⛳":{"category":"Activities","sheet_x":54,"sheet_y":14,"sort_order":47},"⛴️":{"category":"Travel & Places","sheet_x":54,"sheet_y":15,"sort_order":115},"⛵":{"category":"Travel & Places","sheet_x":54,"sheet_y":16,"sort_order":111},"⛷️":{"category":"People & Body","sheet_x":54,"sheet_y":17,"sort_order":247},"⛸️":{"category":"Activities","sheet_x":54,"sheet_y":18,"sort_order":48},"⛹️‍♀️":{"category":"People & Body","sheet_x":54,"sheet_y":19,"sort_order":263},"⛹️‍♂️":{"category":"People & Body","sheet_x":54,"sheet_y":25,"sort_order":262},"⛹️":{"category":"People & Body","sheet_x":54,"sheet_y":31,"sort_order":261},"⛺":{"category":"Travel & Places","sheet_x":54,"sheet_y":37,"sort_order":48},"⛽":{"category":"Travel & Places","sheet_x":54,"sheet_y":38,"sort_order":104},"✂️":{"category":"Objects","sheet_x":54,"sheet_y":39,"sort_order":171},"✅":{"category":"Symbols","sheet_x":54,"sheet_y":40,"sort_order":107},"✈️":{"category":"Travel & Places","sheet_x":54,"sheet_y":41,"sort_order":118},"✉️":{"category":"Objects","sheet_x":54,"sheet_y":42,"sort_order":132},"✊":{"category":"People & Body","sheet_x":54,"sheet_y":43,"sort_order":21},"✋":{"category":"People & Body","sheet_x":54,"sheet_y":49,"sort_order":4},"✌️":{"category":"People & Body","sheet_x":54,"sheet_y":55,"sort_order":8},"✍️":{"category":"People & Body","sheet_x":55,"sheet_y":4,"sort_order":31},"✏️":{"category":"Objects","sheet_x":55,"sheet_y":10,"sort_order":145},"✒️":{"category":"Objects","sheet_x":55,"sheet_y":11,"sort_order":146},"✔️":{"category":"Symbols","sheet_x":55,"sheet_y":12,"sort_order":109},"✖️":{"category":"Symbols","sheet_x":55,"sheet_y":13,"sort_order":110},"✝️":{"category":"Symbols","sheet_x":55,"sheet_y":14,"sort_order":54},"✡️":{"category":"Symbols","sheet_x":55,"sheet_y":15,"sort_order":51},"✨":{"category":"Activities","sheet_x":55,"sheet_y":16,"sort_order":6},"✳️":{"category":"Symbols","sheet_x":55,"sheet_y":17,"sort_order":119},"✴️":{"category":"Symbols","sheet_x":55,"sheet_y":18,"sort_order":120},"❄️":{"category":"Travel & Places","sheet_x":55,"sheet_y":19,"sort_order":204},"❇️":{"category":"Symbols","sheet_x":55,"sheet_y":20,"sort_order":121},"❌":{"category":"Symbols","sheet_x":55,"sheet_y":21,"sort_order":111},"❎":{"category":"Symbols","sheet_x":55,"sheet_y":22,"sort_order":112},"❓":{"category":"Symbols","sheet_x":55,"sheet_y":23,"sort_order":124},"❔":{"category":"Symbols","sheet_x":55,"sheet_y":24,"sort_order":125},"❕":{"category":"Symbols","sheet_x":55,"sheet_y":25,"sort_order":126},"❗":{"category":"Symbols","sheet_x":55,"sheet_y":26,"sort_order":127},"❣️":{"category":"Smileys & Emotion","sheet_x":55,"sheet_y":27,"sort_order":125},"❤️":{"category":"Smileys & Emotion","sheet_x":55,"sheet_y":28,"sort_order":127},"➕":{"category":"Symbols","sheet_x":55,"sheet_y":29,"sort_order":113},"➖":{"category":"Symbols","sheet_x":55,"sheet_y":30,"sort_order":114},"➗":{"category":"Symbols","sheet_x":55,"sheet_y":31,"sort_order":115},"➡️":{"category":"Symbols","sheet_x":55,"sheet_y":32,"sort_order":29},"➰":{"category":"Symbols","sheet_x":55,"sheet_y":33,"sort_order":116},"➿":{"category":"Symbols","sheet_x":55,"sheet_y":34,"sort_order":117},"⤴️":{"category":"Symbols","sheet_x":55,"sheet_y":35,"sort_order":39},"⤵️":{"category":"Symbols","sheet_x":55,"sheet_y":36,"sort_order":40},"⬅️":{"category":"Symbols","sheet_x":55,"sheet_y":37,"sort_order":33},"⬆️":{"category":"Symbols","sheet_x":55,"sheet_y":38,"sort_order":27},"⬇️":{"category":"Symbols","sheet_x":55,"sheet_y":39,"sort_order":31},"⬛":{"category":"Symbols","sheet_x":55,"sheet_y":40,"sort_order":200},"⬜":{"category":"Symbols","sheet_x":55,"sheet_y":41,"sort_order":201},"⭐":{"category":"Travel & Places","sheet_x":55,"sheet_y":42,"sort_order":181},"⭕":{"category":"Symbols","sheet_x":55,"sheet_y":43,"sort_order":106},"〰️":{"category":"Symbols","sheet_x":55,"sheet_y":44,"sort_order":128},"〽️":{"category":"Symbols","sheet_x":55,"sheet_y":45,"sort_order":118},"㊗️":{"category":"Symbols","sheet_x":55,"sheet_y":46,"sort_order":180},"㊙️":{"category":"Symbols","sheet_x":55,"sheet_y":47,"sort_order":181}} - }; -} - -Config.Countries = [{"phoneCode":"7 840","code":"AB","name":"Abkhazia","pattern":"","emoji":""},{"phoneCode":"93","code":"AF","name":"Afghanistan","pattern":"93 XXX XXX XXX","emoji":"🇦🇫"},{"phoneCode":"358 18","code":"AX","name":"Aland Islands","pattern":"","emoji":"🇦🇽"},{"phoneCode":"355","code":"AL","name":"Albania","pattern":"355 XX XXX XXXX","emoji":"🇦🇱"},{"phoneCode":"213","code":"DZ","name":"Algeria","pattern":"213 XXX XX XX XX","emoji":"🇩🇿"},{"phoneCode":"1 684","code":"AS","name":"American Samoa","pattern":"1684 XXX XXXX","emoji":"🇦🇸"},{"phoneCode":"376","code":"AD","name":"Andorra","pattern":"376 XX XX XX","emoji":"🇦🇩"},{"phoneCode":"244","code":"AO","name":"Angola","pattern":"244 XXX XXX XXX","emoji":"🇦🇴"},{"phoneCode":"1 264","code":"AI","name":"Anguilla","pattern":"1264 XXX XXXX","emoji":"🇦🇮"},{"phoneCode":"1 268","code":"AG","name":"Antigua & Barbuda","pattern":"1268 XXX XXXX","emoji":"🇦🇬"},{"phoneCode":"54","code":"AR","name":"Argentina","pattern":"","emoji":"🇦🇷"},{"phoneCode":"374","code":"AM","name":"Armenia","pattern":"374 XX XXX XXX","emoji":"🇦🇲"},{"phoneCode":"297","code":"AW","name":"Aruba","pattern":"297 XXX XXXX","emoji":"🇦🇼"},{"phoneCode":"247","code":"SH","name":"Ascension","pattern":"290 XX XXX","emoji":"🇸🇭"},{"phoneCode":"61","code":"AU","name":"Australia","pattern":"61 XXX XXX XXX","emoji":"🇦🇺"},{"phoneCode":"672","code":"AU","name":"Australian External Territories","pattern":"61 XXX XXX XXX","emoji":"🇦🇺"},{"phoneCode":"43","code":"AT","name":"Austria","pattern":"","emoji":"🇦🇹"},{"phoneCode":"994","code":"AZ","name":"Azerbaijan","pattern":"994 XX XXX XX XX","emoji":"🇦🇿"},{"phoneCode":"1 242","code":"BS","name":"Bahamas","pattern":"1242 XXX XXXX","emoji":"🇧🇸"},{"phoneCode":"973","code":"BH","name":"Bahrain","pattern":"973 XXXX XXXX","emoji":"🇧🇭"},{"phoneCode":"880","code":"BD","name":"Bangladesh","pattern":"","emoji":"🇧🇩"},{"phoneCode":"1 246","code":"BB","name":"Barbados","pattern":"1246 XXX XXXX","emoji":"🇧🇧"},{"phoneCode":"1 268","code":"AG","name":"Barbuda","pattern":"1268 XXX XXXX","emoji":"🇦🇬"},{"phoneCode":"375","code":"BY","name":"Belarus","pattern":"375 XX XXX XXXX","emoji":"🇧🇾"},{"phoneCode":"32","code":"BE","name":"Belgium","pattern":"32 XXX XX XX XX","emoji":"🇧🇪"},{"phoneCode":"501","code":"BZ","name":"Belize","pattern":"","emoji":"🇧🇿"},{"phoneCode":"229","code":"BJ","name":"Benin","pattern":"229 XX XXX XXX","emoji":"🇧🇯"},{"phoneCode":"1 441","code":"BM","name":"Bermuda","pattern":"1441 XXX XXXX","emoji":"🇧🇲"},{"phoneCode":"975","code":"BT","name":"Bhutan","pattern":"","emoji":"🇧🇹"},{"phoneCode":"591","code":"BO","name":"Bolivia","pattern":"591 X XXX XXXX","emoji":"🇧🇴"},{"phoneCode":"599 7","code":"BQ","name":"Caribbean Netherlands","pattern":"","emoji":"🇧🇶"},{"phoneCode":"387","code":"BA","name":"Bosnia & Herzegovina","pattern":"","emoji":"🇧🇦"},{"phoneCode":"267","code":"BW","name":"Botswana","pattern":"267 XX XXX XXX","emoji":"🇧🇼"},{"phoneCode":"55","code":"BR","name":"Brazil","pattern":"55 XX XXXXX XXXX","emoji":"🇧🇷"},{"phoneCode":"246","code":"IO","name":"British Indian Ocean Territory","pattern":"246 XXX XXXX","emoji":"🇮🇴"},{"phoneCode":"1 284","code":"VG","name":"British Virgin Islands","pattern":"1284 XXX XXXX","emoji":"🇻🇬"},{"phoneCode":"673","code":"BN","name":"Brunei","pattern":"673 XXX XXXX","emoji":"🇧🇳"},{"phoneCode":"359","code":"BG","name":"Bulgaria","pattern":"","emoji":"🇧🇬"},{"phoneCode":"226","code":"BF","name":"Burkina Faso","pattern":"226 XX XX XX XX","emoji":"🇧🇫"},{"phoneCode":"95","code":"MM","name":"Myanmar (Burma)","pattern":"","emoji":"🇲🇲"},{"phoneCode":"257","code":"BI","name":"Burundi","pattern":"257 XX XX XXXX","emoji":"🇧🇮"},{"phoneCode":"855","code":"KH","name":"Cambodia","pattern":"","emoji":"🇰🇭"},{"phoneCode":"237","code":"CM","name":"Cameroon","pattern":"237 XXXX XXXX","emoji":"🇨🇲"},{"phoneCode":"1","code":"CA","name":"Canada","pattern":"1 XXX XXX XXXX","emoji":"🇨🇦"},{"phoneCode":"238","code":"CV","name":"Cape Verde","pattern":"238 XXX XXXX","emoji":"🇨🇻"},{"phoneCode":"1 345","code":"KY","name":"Cayman Islands","pattern":"1345 XXX XXXX","emoji":"🇰🇾"},{"phoneCode":"236","code":"CF","name":"Central African Republic","pattern":"236 XX XX XX XX","emoji":"🇨🇫"},{"phoneCode":"235","code":"TD","name":"Chad","pattern":"235 XX XX XX XX","emoji":"🇹🇩"},{"phoneCode":"56","code":"CL","name":"Chile","pattern":"56 X XXXX XXXX","emoji":"🇨🇱"},{"phoneCode":"86","code":"CN","name":"China","pattern":"86 XXX XXXX XXXX","emoji":"🇨🇳"},{"phoneCode":"61","code":"CX","name":"Christmas Island","pattern":"","emoji":"🇨🇽"},{"phoneCode":"61","code":"CC","name":"Cocos (Keeling) Islands","pattern":"","emoji":"🇨🇨"},{"phoneCode":"57","code":"CO","name":"Colombia","pattern":"57 XXX XXX XXXX","emoji":"🇨🇴"},{"phoneCode":"269","code":"KM","name":"Comoros","pattern":"269 XXX XXXX","emoji":"🇰🇲"},{"phoneCode":"242","code":"CG","name":"Congo - Brazzaville","pattern":"242 XX XXX XXXX","emoji":"🇨🇬"},{"phoneCode":"243","code":"CD","name":"Congo - Kinshasa","pattern":"243 XX XXX XXXX","emoji":"🇨🇩"},{"phoneCode":"682","code":"CK","name":"Cook Islands","pattern":"","emoji":"🇨🇰"},{"phoneCode":"506","code":"CR","name":"Costa Rica","pattern":"","emoji":"🇨🇷"},{"phoneCode":"225","code":"CI","name":"Cote d’Ivoire","pattern":"225 XX XXX XXX","emoji":"🇨🇮"},{"phoneCode":"385","code":"HR","name":"Croatia","pattern":"","emoji":"🇭🇷"},{"phoneCode":"53","code":"CU","name":"Cuba","pattern":"53 XXXX XXXX","emoji":"🇨🇺"},{"phoneCode":"599 9","code":"CW","name":"Curacao","pattern":"","emoji":"🇨🇼"},{"phoneCode":"357","code":"CY","name":"Cyprus","pattern":"357 XXXX XXXX","emoji":"🇨🇾"},{"phoneCode":"420","code":"CZ","name":"Czech Republic","pattern":"","emoji":"🇨🇿"},{"phoneCode":"45","code":"DK","name":"Denmark","pattern":"45 XXXX XXXX","emoji":"🇩🇰"},{"phoneCode":"246","code":"DG","name":"Diego Garcia","pattern":"","emoji":"🇩🇬"},{"phoneCode":"253","code":"DJ","name":"Djibouti","pattern":"253 XX XX XX XX","emoji":"🇩🇯"},{"phoneCode":"1 767","code":"DM","name":"Dominica","pattern":"1767 XXX XXXX","emoji":"🇩🇲"},{"phoneCode":"1 809 and 1 829","code":"DO","name":"Dominican Republic","pattern":"1 XXX XXX XXXX","emoji":"🇩🇴"},{"phoneCode":"670","code":"TL","name":"Timor-Leste","pattern":"","emoji":"🇹🇱"},{"phoneCode":"593","code":"EC","name":"Ecuador","pattern":"","emoji":"🇪🇨"},{"phoneCode":"20","code":"EG","name":"Egypt","pattern":"20 XX XXX XXXX","emoji":"🇪🇬"},{"phoneCode":"503","code":"SV","name":"El Salvador","pattern":"503 XXXX XXXX","emoji":"🇸🇻"},{"phoneCode":"240","code":"GQ","name":"Equatorial Guinea","pattern":"240 XXX XXX XXX","emoji":"🇬🇶"},{"phoneCode":"291","code":"ER","name":"Eritrea","pattern":"291 X XXX XXX","emoji":"🇪🇷"},{"phoneCode":"372","code":"EE","name":"Estonia","pattern":"","emoji":"🇪🇪"},{"phoneCode":"251","code":"ET","name":"Ethiopia","pattern":"251 XX XXX XXXX","emoji":"🇪🇹"},{"phoneCode":"500","code":"FK","name":"Falkland Islands","pattern":"","emoji":"🇫🇰"},{"phoneCode":"298","code":"FO","name":"Faroe Islands","pattern":"298 XXX XXX","emoji":"🇫🇴"},{"phoneCode":"679","code":"FJ","name":"Fiji","pattern":"","emoji":"🇫🇯"},{"phoneCode":"358","code":"FI","name":"Finland","pattern":"","emoji":"🇫🇮"},{"phoneCode":"33","code":"FR","name":"France","pattern":"33 X XX XX XX XX","emoji":"🇫🇷"},{"phoneCode":"594","code":"GF","name":"French Guiana","pattern":"","emoji":"🇬🇫"},{"phoneCode":"689","code":"PF","name":"French Polynesia","pattern":"","emoji":"🇵🇫"},{"phoneCode":"241","code":"GA","name":"Gabon","pattern":"241 X XX XX XX","emoji":"🇬🇦"},{"phoneCode":"220","code":"GM","name":"Gambia","pattern":"220 XXX XXXX","emoji":"🇬🇲"},{"phoneCode":"995","code":"GE","name":"Georgia","pattern":"","emoji":"🇬🇪"},{"phoneCode":"49","code":"DE","name":"Germany","pattern":"49 XXX XXXXXXXX","emoji":"🇩🇪"},{"phoneCode":"233","code":"GH","name":"Ghana","pattern":"","emoji":"🇬🇭"},{"phoneCode":"350","code":"GI","name":"Gibraltar","pattern":"350 XXXX XXXX","emoji":"🇬🇮"},{"phoneCode":"30","code":"GR","name":"Greece","pattern":"30 XX XXXX XXXX","emoji":"🇬🇷"},{"phoneCode":"299","code":"GL","name":"Greenland","pattern":"299 XXX XXX","emoji":"🇬🇱"},{"phoneCode":"1 473","code":"GD","name":"Grenada","pattern":"1473 XXX XXXX","emoji":"🇬🇩"},{"phoneCode":"590","code":"GP","name":"Guadeloupe","pattern":"","emoji":"🇬🇵"},{"phoneCode":"1 671","code":"GU","name":"Guam","pattern":"1671 XXX XXXX","emoji":"🇬🇺"},{"phoneCode":"502","code":"GT","name":"Guatemala","pattern":"502 X XXX XXXX","emoji":"🇬🇹"},{"phoneCode":"44","code":"GG","name":"Guernsey","pattern":"","emoji":"🇬🇬"},{"phoneCode":"224","code":"GN","name":"Guinea","pattern":"224 XXX XXX XXX","emoji":"🇬🇳"},{"phoneCode":"245","code":"GW","name":"Guinea-Bissau","pattern":"245 XXX XXXX","emoji":"🇬🇼"},{"phoneCode":"592","code":"GY","name":"Guyana","pattern":"","emoji":"🇬🇾"},{"phoneCode":"509","code":"HT","name":"Haiti","pattern":"","emoji":"🇭🇹"},{"phoneCode":"504","code":"HN","name":"Honduras","pattern":"504 XXXX XXXX","emoji":"🇭🇳"},{"phoneCode":"852","code":"HK","name":"Hong Kong SAR China","pattern":"","emoji":"🇭🇰"},{"phoneCode":"36","code":"HU","name":"Hungary","pattern":"36 XX XXX XXXX","emoji":"🇭🇺"},{"phoneCode":"354","code":"IS","name":"Iceland","pattern":"354 XXX XXXX","emoji":"🇮🇸"},{"phoneCode":"91","code":"IN","name":"India","pattern":"91 XXXXX XXXXX","emoji":"🇮🇳"},{"phoneCode":"62","code":"ID","name":"Indonesia","pattern":"","emoji":"🇮🇩"},{"phoneCode":"98","code":"IR","name":"Iran","pattern":"98 XXX XXX XXXX","emoji":"🇮🇷"},{"phoneCode":"964","code":"IQ","name":"Iraq","pattern":"964 XXX XXX XXXX","emoji":"🇮🇶"},{"phoneCode":"353","code":"IE","name":"Ireland","pattern":"353 XX XXX XXXX","emoji":"🇮🇪"},{"phoneCode":"972","code":"IL","name":"Israel","pattern":"972 XX XXX XXXX","emoji":"🇮🇱"},{"phoneCode":"39","code":"IT","name":"Italy","pattern":"39 XXX XXX XXXX","emoji":"🇮🇹"},{"phoneCode":"1 876","code":"JM","name":"Jamaica","pattern":"1876 XXX XXXX","emoji":"🇯🇲"},{"phoneCode":"47 79","code":"SJ","name":"Svalbard & Jan Mayen","pattern":"","emoji":"🇸🇯"},{"phoneCode":"81","code":"JP","name":"Japan","pattern":"81 XX XXXX XXXX","emoji":"🇯🇵"},{"phoneCode":"44","code":"JE","name":"Jersey","pattern":"","emoji":"🇯🇪"},{"phoneCode":"962","code":"JO","name":"Jordan","pattern":"962 X XXXX XXXX","emoji":"🇯🇴"},{"phoneCode":"7 7","code":"KZ","name":"Kazakhstan","pattern":"7 XXX XXX XX XX","emoji":"🇰🇿"},{"phoneCode":"254","code":"KE","name":"Kenya","pattern":"254 XXX XXX XXX","emoji":"🇰🇪"},{"phoneCode":"686","code":"KI","name":"Kiribati","pattern":"","emoji":"🇰🇮"},{"phoneCode":"850","code":"KP","name":"North Korea","pattern":"","emoji":"🇰🇵"},{"phoneCode":"82","code":"KR","name":"South Korea","pattern":"","emoji":"🇰🇷"},{"phoneCode":"965","code":"KW","name":"Kuwait","pattern":"965 XXXX XXXX","emoji":"🇰🇼"},{"phoneCode":"996","code":"KG","name":"Kyrgyzstan","pattern":"","emoji":"🇰🇬"},{"phoneCode":"856","code":"LA","name":"Laos","pattern":"","emoji":"🇱🇦"},{"phoneCode":"371","code":"LV","name":"Latvia","pattern":"371 XXX XXXXX","emoji":"🇱🇻"},{"phoneCode":"961","code":"LB","name":"Lebanon","pattern":"","emoji":"🇱🇧"},{"phoneCode":"266","code":"LS","name":"Lesotho","pattern":"266 XX XXX XXX","emoji":"🇱🇸"},{"phoneCode":"231","code":"LR","name":"Liberia","pattern":"","emoji":"🇱🇷"},{"phoneCode":"218","code":"LY","name":"Libya","pattern":"218 XX XXX XXXX","emoji":"🇱🇾"},{"phoneCode":"423","code":"LI","name":"Liechtenstein","pattern":"","emoji":"🇱🇮"},{"phoneCode":"370","code":"LT","name":"Lithuania","pattern":"370 XXX XXXXX","emoji":"🇱🇹"},{"phoneCode":"352","code":"LU","name":"Luxembourg","pattern":"","emoji":"🇱🇺"},{"phoneCode":"853","code":"MO","name":"Macau SAR China","pattern":"","emoji":"🇲🇴"},{"phoneCode":"389","code":"MK","name":"Macedonia","pattern":"","emoji":"🇲🇰"},{"phoneCode":"261","code":"MG","name":"Madagascar","pattern":"261 XX XX XXX XX","emoji":"🇲🇬"},{"phoneCode":"265","code":"MW","name":"Malawi","pattern":"","emoji":"🇲🇼"},{"phoneCode":"60","code":"MM","name":"Malaysia","pattern":"","emoji":"🇲🇲"},{"phoneCode":"960","code":"MV","name":"Maldives","pattern":"","emoji":"🇲🇻"},{"phoneCode":"223","code":"ML","name":"Mali","pattern":"223 XXXX XXXX","emoji":"🇲🇱"},{"phoneCode":"356","code":"MT","name":"Malta","pattern":"356 XX XX XX XX","emoji":"🇲🇹"},{"phoneCode":"692","code":"MH","name":"Marshall Islands","pattern":"","emoji":"🇲🇭"},{"phoneCode":"596","code":"MQ","name":"Martinique","pattern":"","emoji":"🇲🇶"},{"phoneCode":"222","code":"MR","name":"Mauritania","pattern":"222 XXXX XXXX","emoji":"🇲🇷"},{"phoneCode":"230","code":"MU","name":"Mauritius","pattern":"","emoji":"🇲🇺"},{"phoneCode":"262","code":"YT","name":"Mayotte","pattern":"","emoji":"🇾🇹"},{"phoneCode":"52","code":"MX","name":"Mexico","pattern":"","emoji":"🇲🇽"},{"phoneCode":"691","code":"FM","name":"Micronesia","pattern":"","emoji":"🇫🇲"},{"phoneCode":"373","code":"MD","name":"Moldova","pattern":"373 XX XXX XXX","emoji":"🇲🇩"},{"phoneCode":"377","code":"MC","name":"Monaco","pattern":"377 XXXX XXXX","emoji":"🇲🇨"},{"phoneCode":"976","code":"MN","name":"Mongolia","pattern":"","emoji":"🇲🇳"},{"phoneCode":"382","code":"ME","name":"Montenegro","pattern":"","emoji":"🇲🇪"},{"phoneCode":"1 664","code":"MS","name":"Montserrat","pattern":"1664 XXX XXXX","emoji":"🇲🇸"},{"phoneCode":"212","code":"MA","name":"Morocco","pattern":"212 XX XXX XXXX","emoji":"🇲🇦"},{"phoneCode":"258","code":"MZ","name":"Mozambique","pattern":"258 XX XXX XXXX","emoji":"🇲🇿"},{"phoneCode":"264","code":"NA","name":"Namibia","pattern":"264 XX XXX XXXX","emoji":"🇳🇦"},{"phoneCode":"674","code":"NR","name":"Nauru","pattern":"","emoji":"🇳🇷"},{"phoneCode":"977","code":"NP","name":"Nepal","pattern":"","emoji":"🇳🇵"},{"phoneCode":"31","code":"NL","name":"Netherlands","pattern":"31 X XX XX XX XX","emoji":"🇳🇱"},{"phoneCode":"687","code":"NC","name":"New Caledonia","pattern":"","emoji":"🇳🇨"},{"phoneCode":"64","code":"NZ","name":"New Zealand","pattern":"","emoji":"🇳🇿"},{"phoneCode":"505","code":"NI","name":"Nicaragua","pattern":"505 XXXX XXXX","emoji":"🇳🇮"},{"phoneCode":"227","code":"NE","name":"Niger","pattern":"227 XX XX XX XX","emoji":"🇳🇪"},{"phoneCode":"234","code":"NG","name":"Nigeria","pattern":"","emoji":"🇳🇬"},{"phoneCode":"683","code":"NU","name":"Niue","pattern":"","emoji":"🇳🇺"},{"phoneCode":"672","code":"NF","name":"Norfolk Island","pattern":"","emoji":"🇳🇫"},{"phoneCode":"1 670","code":"MP","name":"Northern Mariana Islands","pattern":"1670 XXX XXXX","emoji":"🇲🇵"},{"phoneCode":"47","code":"NO","name":"Norway","pattern":"47 XXXX XXXX","emoji":"🇳🇴"},{"phoneCode":"968","code":"OM","name":"Oman","pattern":"968 XXXX XXXX","emoji":"🇴🇲"},{"phoneCode":"92","code":"PK","name":"Pakistan","pattern":"92 XXX XXX XXXX","emoji":"🇵🇰"},{"phoneCode":"680","code":"PW","name":"Palau","pattern":"","emoji":"🇵🇼"},{"phoneCode":"970","code":"PS","name":"Palestinian Territories","pattern":"970 XXX XX XXXX","emoji":"🇵🇸"},{"phoneCode":"507","code":"PA","name":"Panama","pattern":"507 XXXX XXXX","emoji":"🇵🇦"},{"phoneCode":"675","code":"PG","name":"Papua New Guinea","pattern":"","emoji":"🇵🇬"},{"phoneCode":"595","code":"PY","name":"Paraguay","pattern":"595 XXX XXX XXX","emoji":"🇵🇾"},{"phoneCode":"51","code":"PE","name":"Peru","pattern":"51 XXX XXX XXX","emoji":"🇵🇪"},{"phoneCode":"63","code":"PH","name":"Philippines","pattern":"63 XXX XXX XXXX","emoji":"🇵🇭"},{"phoneCode":"64","code":"PN","name":"Pitcairn Islands","pattern":"","emoji":"🇵🇳"},{"phoneCode":"48","code":"PL","name":"Poland","pattern":"48 XXX XXX XXX","emoji":"🇵🇱"},{"phoneCode":"351","code":"PT","name":"Portugal","pattern":"351 X XXXX XXXX","emoji":"🇵🇹"},{"phoneCode":"1 787 and 1 939","code":"PR","name":"Puerto Rico","pattern":"1 XXX XXX XXXX","emoji":"🇵🇷"},{"phoneCode":"974","code":"QA","name":"Qatar","pattern":"","emoji":"🇶🇦"},{"phoneCode":"262","code":"RE","name":"Reunion","pattern":"262 XXX XXX XXX","emoji":"🇷🇪"},{"phoneCode":"40","code":"RO","name":"Romania","pattern":"40 XXX XXX XXX","emoji":"🇷🇴"},{"phoneCode":"7","code":"RU","name":"Russia","pattern":"7 XXX XXX XX XX","emoji":"🇷🇺"},{"phoneCode":"250","code":"RW","name":"Rwanda","pattern":"250 XXX XXX XXX","emoji":"🇷🇼"},{"phoneCode":"590","code":"BL","name":"St. Barthelemy","pattern":"","emoji":"🇧🇱"},{"phoneCode":"290","code":"SH","name":"St. Helena","pattern":"290 XX XXX","emoji":"🇸🇭"},{"phoneCode":"1 869","code":"KN","name":"St. Kitts & Nevis","pattern":"1869 XXX XXXX","emoji":"🇰🇳"},{"phoneCode":"1 758","code":"LC","name":"St. Lucia","pattern":"1758 XXX XXXX","emoji":"🇱🇨"},{"phoneCode":"590","code":"MF","name":"St. Martin (France)","pattern":"","emoji":"🇲🇫"},{"phoneCode":"508","code":"PM","name":"St. Pierre and Miquelon","pattern":"","emoji":"🇵🇲"},{"phoneCode":"1 784","code":"VC","name":"St. Vincent and the Grenadines","pattern":"1784 XXX XXXX","emoji":"🇻🇨"},{"phoneCode":"685","code":"WS","name":"Samoa","pattern":"","emoji":"🇼🇸"},{"phoneCode":"378","code":"SM","name":"San Marino","pattern":"378 XXX XXX XXXX","emoji":"🇸🇲"},{"phoneCode":"239","code":"ST","name":"São Tome & Principe","pattern":"239 XX XXXXX","emoji":"🇸🇹"},{"phoneCode":"966","code":"SA","name":"Saudi Arabia","pattern":"","emoji":"🇸🇦"},{"phoneCode":"221","code":"SN","name":"Senegal","pattern":"221 XX XXX XXXX","emoji":"🇸🇳"},{"phoneCode":"381","code":"RS","name":"Serbia","pattern":"381 XX XXX XXXX","emoji":"🇷🇸"},{"phoneCode":"248","code":"SC","name":"Seychelles","pattern":"248 X XX XX XX","emoji":"🇸🇨"},{"phoneCode":"232","code":"SL","name":"Sierra Leone","pattern":"232 XX XXX XXX","emoji":"🇸🇱"},{"phoneCode":"65","code":"SG","name":"Singapore","pattern":"65 XXXX XXXX","emoji":"🇸🇬"},{"phoneCode":"599 3","code":"BQ","name":"Sint Eustatius","pattern":"","emoji":"🇧🇶"},{"phoneCode":"1 721","code":"SX","name":"Sint Maarten","pattern":"1721 XXX XXXX","emoji":"🇸🇽"},{"phoneCode":"421","code":"SK","name":"Slovakia","pattern":"","emoji":"🇸🇰"},{"phoneCode":"386","code":"SI","name":"Slovenia","pattern":"","emoji":"🇸🇮"},{"phoneCode":"677","code":"SB","name":"Solomon Islands","pattern":"","emoji":"🇸🇧"},{"phoneCode":"252","code":"SO","name":"Somalia","pattern":"252 XX XXX XXX","emoji":"🇸🇴"},{"phoneCode":"27","code":"ZA","name":"South Africa","pattern":"27 XX XXX XXXX","emoji":"🇿🇦"},{"phoneCode":"500","code":"GS","name":"South Georgia & South Sandwich Islands","pattern":"","emoji":"🇬🇸"},{"phoneCode":"995 34","code":"","name":"South Ossetia","pattern":"","emoji":""},{"phoneCode":"211","code":"SS","name":"South Sudan","pattern":"211 XX XXX XXXX","emoji":"🇸🇸"},{"phoneCode":"34","code":"ES","name":"Spain","pattern":"34 XXX XXX XXX","emoji":"🇪🇸"},{"phoneCode":"94","code":"LK","name":"Sri Lanka","pattern":"94 XX XXX XXXX","emoji":"🇱🇰"},{"phoneCode":"249","code":"SD","name":"Sudan","pattern":"249 XX XXX XXXX","emoji":"🇸🇩"},{"phoneCode":"597","code":"SR","name":"Suriname","pattern":"597 XXX XXXX","emoji":"🇸🇷"},{"phoneCode":"47 79","code":"SJ","name":"Svalbard","pattern":"","emoji":"🇸🇯"},{"phoneCode":"268","code":"SZ","name":"Swaziland","pattern":"268 XXXX XXXX","emoji":"🇸🇿"},{"phoneCode":"46","code":"SE","name":"Sweden","pattern":"46 XX XXX XXXX","emoji":"🇸🇪"},{"phoneCode":"41","code":"CH","name":"Switzerland","pattern":"41 XX XXX XXXX","emoji":"🇨🇭"},{"phoneCode":"963","code":"SY","name":"Syria","pattern":"","emoji":"🇸🇾"},{"phoneCode":"886","code":"TW","name":"Taiwan","pattern":"","emoji":"🇹🇼"},{"phoneCode":"992","code":"TJ","name":"Tajikistan","pattern":"","emoji":"🇹🇯"},{"phoneCode":"255","code":"TZ","name":"Tanzania","pattern":"255 XX XXX XXXX","emoji":"🇹🇿"},{"phoneCode":"66","code":"TH","name":"Thailand","pattern":"66 X XXXX XXXX","emoji":"🇹🇭"},{"phoneCode":"228","code":"TG","name":"Togo","pattern":"228 XX XXX XXX","emoji":"🇹🇬"},{"phoneCode":"690","code":"TK","name":"Tokelau","pattern":"","emoji":"🇹🇰"},{"phoneCode":"676","code":"TO","name":"Tonga","pattern":"","emoji":"🇹🇴"},{"phoneCode":"1 868","code":"TT","name":"Trinidad & Tobago","pattern":"1868 XXX XXXX","emoji":"🇹🇹"},{"phoneCode":"216","code":"TN","name":"Tunisia","pattern":"216 XX XXX XXX","emoji":"🇹🇳"},{"phoneCode":"90","code":"TR","name":"Turkey","pattern":"90 XXX XXX XXXX","emoji":"🇹🇷"},{"phoneCode":"993","code":"TM","name":"Turkmenistan","pattern":"993 XX XXXXXX","emoji":"🇹🇲"},{"phoneCode":"1 649","code":"TC","name":"Turks & Caicos Islands","pattern":"1649 XXX XXXX","emoji":"🇹🇨"},{"phoneCode":"688","code":"TV","name":"Tuvalu","pattern":"","emoji":"🇹🇻"},{"phoneCode":"256","code":"UG","name":"Uganda","pattern":"256 XX XXX XXXX","emoji":"🇺🇬"},{"phoneCode":"380","code":"UA","name":"Ukraine","pattern":"380 XX XXX XX XX","emoji":"🇺🇦"},{"phoneCode":"971","code":"AE","name":"United Arab Emirates","pattern":"971 XX XXX XXXX","emoji":"🇦🇪"},{"phoneCode":"44","code":"GB","name":"United Kingdom","pattern":"44 XXXX XXXXXX","emoji":"🇬🇧"},{"phoneCode":"1","code":"US","name":"United States","pattern":"1 XXX XXX XXXX","emoji":"🇺🇸"},{"phoneCode":"598","code":"UY","name":"Uruguay","pattern":"598 XXXX XXXX","emoji":"🇺🇾"},{"phoneCode":"1 340","code":"VI","name":"U.S. Virgin Islands","pattern":"1340 XXX XXXX","emoji":"🇻🇮"},{"phoneCode":"998","code":"UZ","name":"Uzbekistan","pattern":"998 XX XXXXXXX","emoji":"🇺🇿"},{"phoneCode":"678","code":"VU","name":"Vanuatu","pattern":"","emoji":"🇻🇺"},{"phoneCode":"58","code":"VE","name":"Venezuela","pattern":"58 XXX XXX XXXX","emoji":"🇻🇪"},{"phoneCode":"39 06 698","code":"VA","name":"Vatican City","pattern":"","emoji":"🇻🇦"},{"phoneCode":"84","code":"VN","name":"Vietnam","pattern":"","emoji":"🇻🇳"},{"phoneCode":"681","code":"WF","name":"Wallis & Futuna","pattern":"","emoji":"🇼🇫"},{"phoneCode":"967","code":"YE","name":"Yemen","pattern":"967 XXX XXX XXX","emoji":"🇾🇪"},{"phoneCode":"260","code":"ZM","name":"Zambia","pattern":"260 XX XXX XXXX","emoji":"🇿🇲"},{"phoneCode":"255","code":"","name":"Zanzibar","pattern":"","emoji":""},{"phoneCode":"263","code":"ZW","name":"Zimbabwe","pattern":"263 XX XXX XXXX","emoji":"🇿🇼"}]; - -if(Config.Modes.test) { - Config.Countries.push({ - name: 'Test Country', - phoneCode: '999 66', - code: 'TC', - emoji: '🤔', - pattern: '999 66 XXX XX' - }); - - console.log('Added test country to list!'); -} - -Config.Schema = Config.Schema || {}; - -Config.Schema.MTProto = {"constructors":[{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"85337187","predicate":"resPQ","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"pq","type":"bytes"},{"name":"server_public_key_fingerprints","type":"Vector"}],"type":"ResPQ"},{"id":"-2083955988","predicate":"p_q_inner_data","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"}],"type":"P_Q_inner_data"},{"id":"-1443537003","predicate":"p_q_inner_data_dc","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"},{"name":"dc","type":"int"}],"type":"P_Q_inner_data"},{"id":"1013613780","predicate":"p_q_inner_data_temp","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"},{"name":"expires_in","type":"int"}],"type":"P_Q_inner_data"},{"id":"1459478408","predicate":"p_q_inner_data_temp_dc","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"},{"name":"dc","type":"int"},{"name":"expires_in","type":"int"}],"type":"P_Q_inner_d"},{"id":"2043348061","predicate":"server_DH_params_fail","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash","type":"int128"}],"type":"Server_DH_Params"},{"id":"-790100132","predicate":"server_DH_params_ok","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"encrypted_answer","type":"bytes"}],"type":"Server_DH_Params"},{"id":"-1249309254","predicate":"server_DH_inner_data","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"g","type":"int"},{"name":"dh_prime","type":"bytes"},{"name":"g_a","type":"bytes"},{"name":"server_time","type":"int"}],"type":"Server_DH_inner_data"},{"id":"1715713620","predicate":"client_DH_inner_data","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"retry_id","type":"long"},{"name":"g_b","type":"bytes"}],"type":"Client_DH_Inner_Data"},{"id":"1003222836","predicate":"dh_gen_ok","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash1","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"1188831161","predicate":"dh_gen_retry","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash2","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"-1499615742","predicate":"dh_gen_fail","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash3","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"-212046591","predicate":"rpc_result","params":[{"name":"req_msg_id","type":"long"},{"name":"result","type":"Object"}],"type":"RpcResult"},{"id":"558156313","predicate":"rpc_error","params":[{"name":"error_code","type":"int"},{"name":"error_message","type":"string"}],"type":"RpcError"},{"id":"1579864942","predicate":"rpc_answer_unknown","params":[],"type":"RpcDropAnswer"},{"id":"-847714938","predicate":"rpc_answer_dropped_running","params":[],"type":"RpcDropAnswer"},{"id":"-1539647305","predicate":"rpc_answer_dropped","params":[{"name":"msg_id","type":"long"},{"name":"seq_no","type":"int"},{"name":"bytes","type":"int"}],"type":"RpcDropAnswer"},{"id":"155834844","predicate":"future_salt","params":[{"name":"valid_since","type":"int"},{"name":"valid_until","type":"int"},{"name":"salt","type":"long"}],"type":"FutureSalt"},{"id":"-1370486635","predicate":"future_salts","params":[{"name":"req_msg_id","type":"long"},{"name":"now","type":"int"},{"name":"salts","type":"vector"}],"type":"FutureSalts"},{"id":"880243653","predicate":"pong","params":[{"name":"msg_id","type":"long"},{"name":"ping_id","type":"long"}],"type":"Pong"},{"id":"-1631450872","predicate":"new_session_created","params":[{"name":"first_msg_id","type":"long"},{"name":"unique_id","type":"long"},{"name":"server_salt","type":"long"}],"type":"NewSession"},{"id":"1945237724","predicate":"msg_container","params":[{"name":"messages","type":"vector<%Message>"}],"type":"MessageContainer"},{"id":"1538843921","predicate":"message","params":[{"name":"msg_id","type":"long"},{"name":"seqno","type":"int"},{"name":"bytes","type":"int"},{"name":"body","type":"Object"}],"type":"Message"},{"id":"-530561358","predicate":"msg_copy","params":[{"name":"orig_message","type":"Message"}],"type":"MessageCopy"},{"id":"812830625","predicate":"gzip_packed","params":[{"name":"packed_data","type":"bytes"}],"type":"Object"},{"id":"1658238041","predicate":"msgs_ack","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgsAck"},{"id":"-1477445615","predicate":"bad_msg_notification","params":[{"name":"bad_msg_id","type":"long"},{"name":"bad_msg_seqno","type":"int"},{"name":"error_code","type":"int"}],"type":"BadMsgNotification"},{"id":"-307542917","predicate":"bad_server_salt","params":[{"name":"bad_msg_id","type":"long"},{"name":"bad_msg_seqno","type":"int"},{"name":"error_code","type":"int"},{"name":"new_server_salt","type":"long"}],"type":"BadMsgNotification"},{"id":"2105940488","predicate":"msg_resend_req","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgResendReq"},{"id":"-2045723925","predicate":"msg_resend_ans_req","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgResendReq"},{"id":"-630588590","predicate":"msgs_state_req","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgsStateReq"},{"id":"81704317","predicate":"msgs_state_info","params":[{"name":"req_msg_id","type":"long"},{"name":"info","type":"bytes"}],"type":"MsgsStateInfo"},{"id":"-1933520591","predicate":"msgs_all_info","params":[{"name":"msg_ids","type":"Vector"},{"name":"info","type":"bytes"}],"type":"MsgsAllInfo"},{"id":"661470918","predicate":"msg_detailed_info","params":[{"name":"msg_id","type":"long"},{"name":"answer_msg_id","type":"long"},{"name":"bytes","type":"int"},{"name":"status","type":"int"}],"type":"MsgDetailedInfo"},{"id":"-2137147681","predicate":"msg_new_detailed_info","params":[{"name":"answer_msg_id","type":"long"},{"name":"bytes","type":"int"},{"name":"status","type":"int"}],"type":"MsgDetailedInfo"},{"id":"1973679973","predicate":"bind_auth_key_inner","params":[{"name":"nonce","type":"long"},{"name":"temp_auth_key_id","type":"long"},{"name":"perm_auth_key_id","type":"long"},{"name":"temp_session_id","type":"long"},{"name":"expires_at","type":"int"}],"type":"BindAuthKeyInner"},{"id":"-161422892","predicate":"destroy_auth_key_ok","params":[],"type":"DestroyAuthKeyRes"},{"id":"178201177","predicate":"destroy_auth_key_none","params":[],"type":"DestroyAuthKeyRes"},{"id":"-368010477","predicate":"destroy_auth_key_fail","params":[],"type":"DestroyAuthKeyRes"},{"id":"-501201412","predicate":"destroy_session_ok","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"},{"id":"1658015945","predicate":"destroy_session_none","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"}],"methods":[{"id":"1615239032","method":"req_pq","params":[{"name":"nonce","type":"int128"}],"type":"ResPQ"},{"id":"-1099002127","method":"req_pq_multi","params":[{"name":"nonce","type":"int128"}],"type":"ResPQ"},{"id":"-686627650","method":"req_DH_params","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"public_key_fingerprint","type":"long"},{"name":"encrypted_data","type":"bytes"}],"type":"Server_DH_Params"},{"id":"-184262881","method":"set_client_DH_params","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"encrypted_data","type":"bytes"}],"type":"Set_client_DH_params_answer"},{"id":"1491380032","method":"rpc_drop_answer","params":[{"name":"req_msg_id","type":"long"}],"type":"RpcDropAnswer"},{"id":"-1188971260","method":"get_future_salts","params":[{"name":"num","type":"int"}],"type":"FutureSalts"},{"id":"2059302892","method":"ping","params":[{"name":"ping_id","type":"long"}],"type":"Pong"},{"id":"-213746804","method":"ping_delay_disconnect","params":[{"name":"ping_id","type":"long"},{"name":"disconnect_delay","type":"int"}],"type":"Pong"},{"id":"-1835453025","method":"http_wait","params":[{"name":"max_delay","type":"int"},{"name":"wait_after","type":"int"},{"name":"max_wait","type":"int"}],"type":"HttpWait"},{"id":"-784117408","method":"destroy_auth_key","params":[],"type":"DestroyAuthKeyRes"},{"id":"-414113498","method":"destroy_session","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"}]}; - -Config.Schema.API = {"constructors":[{"id":"-1132882121","predicate":"boolFalse","params":[],"type":"Bool"},{"id":"-1720552011","predicate":"boolTrue","params":[],"type":"Bool"},{"id":"1072550713","predicate":"true","params":[],"type":"True"},{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"-994444869","predicate":"error","params":[{"name":"code","type":"int"},{"name":"text","type":"string"}],"type":"Error"},{"id":"1450380236","predicate":"null","params":[],"type":"Null"},{"id":"2134579434","predicate":"inputPeerEmpty","params":[],"type":"InputPeer"},{"id":"2107670217","predicate":"inputPeerSelf","params":[],"type":"InputPeer"},{"id":"396093539","predicate":"inputPeerChat","params":[{"name":"chat_id","type":"int"}],"type":"InputPeer"},{"id":"-1182234929","predicate":"inputUserEmpty","params":[],"type":"InputUser"},{"id":"-138301121","predicate":"inputUserSelf","params":[],"type":"InputUser"},{"id":"-208488460","predicate":"inputPhoneContact","params":[{"name":"client_id","type":"long"},{"name":"phone","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"InputContact"},{"id":"-181407105","predicate":"inputFile","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"name","type":"string"},{"name":"md5_checksum","type":"string"}],"type":"InputFile"},{"id":"-1771768449","predicate":"inputMediaEmpty","params":[],"type":"InputMedia"},{"id":"505969924","predicate":"inputMediaUploadedPhoto","params":[{"name":"flags","type":"#"},{"name":"file","type":"InputFile"},{"name":"stickers","type":"flags.0?Vector"},{"name":"ttl_seconds","type":"flags.1?int"}],"type":"InputMedia"},{"id":"-1279654347","predicate":"inputMediaPhoto","params":[{"name":"flags","type":"#"},{"name":"id","type":"InputPhoto"},{"name":"ttl_seconds","type":"flags.0?int"}],"type":"InputMedia"},{"id":"-104578748","predicate":"inputMediaGeoPoint","params":[{"name":"geo_point","type":"InputGeoPoint"}],"type":"InputMedia"},{"id":"-122978821","predicate":"inputMediaContact","params":[{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"vcard","type":"string"}],"type":"InputMedia"},{"id":"480546647","predicate":"inputChatPhotoEmpty","params":[],"type":"InputChatPhoto"},{"id":"-1837345356","predicate":"inputChatUploadedPhoto","params":[{"name":"file","type":"InputFile"}],"type":"InputChatPhoto"},{"id":"-1991004873","predicate":"inputChatPhoto","params":[{"name":"id","type":"InputPhoto"}],"type":"InputChatPhoto"},{"id":"-457104426","predicate":"inputGeoPointEmpty","params":[],"type":"InputGeoPoint"},{"id":"-206066487","predicate":"inputGeoPoint","params":[{"name":"lat","type":"double"},{"name":"long","type":"double"}],"type":"InputGeoPoint"},{"id":"483901197","predicate":"inputPhotoEmpty","params":[],"type":"InputPhoto"},{"id":"1001634122","predicate":"inputPhoto","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"}],"type":"InputPhoto"},{"id":"-539317279","predicate":"inputFileLocation","params":[{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"},{"name":"file_reference","type":"bytes"}],"type":"InputFileLocation"},{"id":"-1649296275","predicate":"peerUser","params":[{"name":"user_id","type":"int"}],"type":"Peer"},{"id":"-1160714821","predicate":"peerChat","params":[{"name":"chat_id","type":"int"}],"type":"Peer"},{"id":"-1432995067","predicate":"storage.fileUnknown","params":[],"type":"storage.FileType"},{"id":"1086091090","predicate":"storage.filePartial","params":[],"type":"storage.FileType"},{"id":"8322574","predicate":"storage.fileJpeg","params":[],"type":"storage.FileType"},{"id":"-891180321","predicate":"storage.fileGif","params":[],"type":"storage.FileType"},{"id":"172975040","predicate":"storage.filePng","params":[],"type":"storage.FileType"},{"id":"-1373745011","predicate":"storage.filePdf","params":[],"type":"storage.FileType"},{"id":"1384777335","predicate":"storage.fileMp3","params":[],"type":"storage.FileType"},{"id":"1258941372","predicate":"storage.fileMov","params":[],"type":"storage.FileType"},{"id":"-1278304028","predicate":"storage.fileMp4","params":[],"type":"storage.FileType"},{"id":"276907596","predicate":"storage.fileWebp","params":[],"type":"storage.FileType"},{"id":"537022650","predicate":"userEmpty","params":[{"name":"id","type":"int"}],"type":"User"},{"id":"1326562017","predicate":"userProfilePhotoEmpty","params":[],"type":"UserProfilePhoto"},{"id":"-321430132","predicate":"userProfilePhoto","params":[{"name":"photo_id","type":"long"},{"name":"photo_small","type":"FileLocation"},{"name":"photo_big","type":"FileLocation"},{"name":"dc_id","type":"int"}],"type":"UserProfilePhoto"},{"id":"164646985","predicate":"userStatusEmpty","params":[],"type":"UserStatus"},{"id":"-306628279","predicate":"userStatusOnline","params":[{"name":"expires","type":"int"}],"type":"UserStatus"},{"id":"9203775","predicate":"userStatusOffline","params":[{"name":"was_online","type":"int"}],"type":"UserStatus"},{"id":"-1683826688","predicate":"chatEmpty","params":[{"name":"id","type":"int"}],"type":"Chat"},{"id":"1004149726","predicate":"chat","params":[{"name":"flags","type":"#"},{"name":"creator","type":"flags.0?true"},{"name":"kicked","type":"flags.1?true"},{"name":"left","type":"flags.2?true"},{"name":"deactivated","type":"flags.5?true"},{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"photo","type":"ChatPhoto"},{"name":"participants_count","type":"int"},{"name":"date","type":"int"},{"name":"version","type":"int"},{"name":"migrated_to","type":"flags.6?InputChannel"},{"name":"admin_rights","type":"flags.14?ChatAdminRights"},{"name":"default_banned_rights","type":"flags.18?ChatBannedRights"}],"type":"Chat"},{"id":"120753115","predicate":"chatForbidden","params":[{"name":"id","type":"int"},{"name":"title","type":"string"}],"type":"Chat"},{"id":"461151667","predicate":"chatFull","params":[{"name":"flags","type":"#"},{"name":"can_set_username","type":"flags.7?true"},{"name":"has_scheduled","type":"flags.8?true"},{"name":"id","type":"int"},{"name":"about","type":"string"},{"name":"participants","type":"ChatParticipants"},{"name":"chat_photo","type":"flags.2?Photo"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"exported_invite","type":"ExportedChatInvite"},{"name":"bot_info","type":"flags.3?Vector"},{"name":"pinned_msg_id","type":"flags.6?int"},{"name":"folder_id","type":"flags.11?int"}],"type":"ChatFull"},{"id":"-925415106","predicate":"chatParticipant","params":[{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"}],"type":"ChatParticipant"},{"id":"-57668565","predicate":"chatParticipantsForbidden","params":[{"name":"flags","type":"#"},{"name":"chat_id","type":"int"},{"name":"self_participant","type":"flags.0?ChatParticipant"}],"type":"ChatParticipants"},{"id":"1061556205","predicate":"chatParticipants","params":[{"name":"chat_id","type":"int"},{"name":"participants","type":"Vector"},{"name":"version","type":"int"}],"type":"ChatParticipants"},{"id":"935395612","predicate":"chatPhotoEmpty","params":[],"type":"ChatPhoto"},{"id":"1197267925","predicate":"chatPhoto","params":[{"name":"photo_small","type":"FileLocation"},{"name":"photo_big","type":"FileLocation"},{"name":"dc_id","type":"int"}],"type":"ChatPhoto"},{"id":"-2082087340","predicate":"messageEmpty","params":[{"name":"id","type":"int"}],"type":"Message"},{"id":"1160515173","predicate":"message","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"mentioned","type":"flags.4?true"},{"name":"media_unread","type":"flags.5?true"},{"name":"silent","type":"flags.13?true"},{"name":"post","type":"flags.14?true"},{"name":"from_scheduled","type":"flags.18?true"},{"name":"legacy","type":"flags.19?true"},{"name":"edit_hide","type":"flags.21?true"},{"name":"id","type":"int"},{"name":"from_id","type":"flags.8?int"},{"name":"to_id","type":"Peer"},{"name":"fwd_from","type":"flags.2?MessageFwdHeader"},{"name":"via_bot_id","type":"flags.11?int"},{"name":"reply_to_msg_id","type":"flags.3?int"},{"name":"date","type":"int"},{"name":"message","type":"string"},{"name":"media","type":"flags.9?MessageMedia"},{"name":"reply_markup","type":"flags.6?ReplyMarkup"},{"name":"entities","type":"flags.7?Vector"},{"name":"views","type":"flags.10?int"},{"name":"edit_date","type":"flags.15?int"},{"name":"post_author","type":"flags.16?string"},{"name":"grouped_id","type":"flags.17?long"},{"name":"restriction_reason","type":"flags.22?Vector"}],"type":"Message"},{"id":"-1642487306","predicate":"messageService","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"mentioned","type":"flags.4?true"},{"name":"media_unread","type":"flags.5?true"},{"name":"silent","type":"flags.13?true"},{"name":"post","type":"flags.14?true"},{"name":"legacy","type":"flags.19?true"},{"name":"id","type":"int"},{"name":"from_id","type":"flags.8?int"},{"name":"to_id","type":"Peer"},{"name":"reply_to_msg_id","type":"flags.3?int"},{"name":"date","type":"int"},{"name":"action","type":"MessageAction"}],"type":"Message"},{"id":"1038967584","predicate":"messageMediaEmpty","params":[],"type":"MessageMedia"},{"id":"1766936791","predicate":"messageMediaPhoto","params":[{"name":"flags","type":"#"},{"name":"photo","type":"flags.0?Photo"},{"name":"ttl_seconds","type":"flags.2?int"}],"type":"MessageMedia"},{"id":"1457575028","predicate":"messageMediaGeo","params":[{"name":"geo","type":"GeoPoint"}],"type":"MessageMedia"},{"id":"-873313984","predicate":"messageMediaContact","params":[{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"vcard","type":"string"},{"name":"user_id","type":"int"}],"type":"MessageMedia"},{"id":"-1618676578","predicate":"messageMediaUnsupported","params":[],"type":"MessageMedia"},{"id":"-1230047312","predicate":"messageActionEmpty","params":[],"type":"MessageAction"},{"id":"-1503425638","predicate":"messageActionChatCreate","params":[{"name":"title","type":"string"},{"name":"users","type":"Vector"}],"type":"MessageAction"},{"id":"-1247687078","predicate":"messageActionChatEditTitle","params":[{"name":"title","type":"string"}],"type":"MessageAction"},{"id":"2144015272","predicate":"messageActionChatEditPhoto","params":[{"name":"photo","type":"Photo"}],"type":"MessageAction"},{"id":"-1780220945","predicate":"messageActionChatDeletePhoto","params":[],"type":"MessageAction"},{"id":"1217033015","predicate":"messageActionChatAddUser","params":[{"name":"users","type":"Vector"}],"type":"MessageAction"},{"id":"-1297179892","predicate":"messageActionChatDeleteUser","params":[{"name":"user_id","type":"int"}],"type":"MessageAction"},{"id":"739712882","predicate":"dialog","params":[{"name":"flags","type":"#"},{"name":"pinned","type":"flags.2?true"},{"name":"unread_mark","type":"flags.3?true"},{"name":"peer","type":"Peer"},{"name":"top_message","type":"int"},{"name":"read_inbox_max_id","type":"int"},{"name":"read_outbox_max_id","type":"int"},{"name":"unread_count","type":"int"},{"name":"unread_mentions_count","type":"int"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"pts","type":"flags.0?int"},{"name":"draft","type":"flags.1?DraftMessage"},{"name":"folder_id","type":"flags.4?int"}],"type":"Dialog"},{"id":"590459437","predicate":"photoEmpty","params":[{"name":"id","type":"long"}],"type":"Photo"},{"id":"-797637467","predicate":"photo","params":[{"name":"flags","type":"#"},{"name":"has_stickers","type":"flags.0?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"date","type":"int"},{"name":"sizes","type":"Vector"},{"name":"dc_id","type":"int"}],"type":"Photo"},{"id":"236446268","predicate":"photoSizeEmpty","params":[{"name":"type","type":"string"}],"type":"PhotoSize"},{"id":"2009052699","predicate":"photoSize","params":[{"name":"type","type":"string"},{"name":"location","type":"FileLocation"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"size","type":"int"}],"type":"PhotoSize"},{"id":"-374917894","predicate":"photoCachedSize","params":[{"name":"type","type":"string"},{"name":"location","type":"FileLocation"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"bytes","type":"bytes"}],"type":"PhotoSize"},{"id":"286776671","predicate":"geoPointEmpty","params":[],"type":"GeoPoint"},{"id":"43446532","predicate":"geoPoint","params":[{"name":"long","type":"double"},{"name":"lat","type":"double"},{"name":"access_hash","type":"long"}],"type":"GeoPoint"},{"id":"1577067778","predicate":"auth.sentCode","params":[{"name":"flags","type":"#"},{"name":"type","type":"auth.SentCodeType"},{"name":"phone_code_hash","type":"string"},{"name":"next_type","type":"flags.1?auth.CodeType"},{"name":"timeout","type":"flags.2?int"}],"type":"auth.SentCode"},{"id":"-855308010","predicate":"auth.authorization","params":[{"name":"flags","type":"#"},{"name":"tmp_sessions","type":"flags.0?int"},{"name":"user","type":"User"}],"type":"auth.Authorization"},{"id":"-543777747","predicate":"auth.exportedAuthorization","params":[{"name":"id","type":"int"},{"name":"bytes","type":"bytes"}],"type":"auth.ExportedAuthorization"},{"id":"-1195615476","predicate":"inputNotifyPeer","params":[{"name":"peer","type":"InputPeer"}],"type":"InputNotifyPeer"},{"id":"423314455","predicate":"inputNotifyUsers","params":[],"type":"InputNotifyPeer"},{"id":"1251338318","predicate":"inputNotifyChats","params":[],"type":"InputNotifyPeer"},{"id":"-1673717362","predicate":"inputPeerNotifySettings","params":[{"name":"flags","type":"#"},{"name":"show_previews","type":"flags.0?Bool"},{"name":"silent","type":"flags.1?Bool"},{"name":"mute_until","type":"flags.2?int"},{"name":"sound","type":"flags.3?string"}],"type":"InputPeerNotifySettings"},{"id":"-1353671392","predicate":"peerNotifySettings","params":[{"name":"flags","type":"#"},{"name":"show_previews","type":"flags.0?Bool"},{"name":"silent","type":"flags.1?Bool"},{"name":"mute_until","type":"flags.2?int"},{"name":"sound","type":"flags.3?string"}],"type":"PeerNotifySettings"},{"id":"-2122045747","predicate":"peerSettings","params":[{"name":"flags","type":"#"},{"name":"report_spam","type":"flags.0?true"},{"name":"add_contact","type":"flags.1?true"},{"name":"block_contact","type":"flags.2?true"},{"name":"share_contact","type":"flags.3?true"},{"name":"need_contacts_exception","type":"flags.4?true"},{"name":"report_geo","type":"flags.5?true"}],"type":"PeerSettings"},{"id":"-1539849235","predicate":"wallPaper","params":[{"name":"id","type":"long"},{"name":"flags","type":"#"},{"name":"creator","type":"flags.0?true"},{"name":"default","type":"flags.1?true"},{"name":"pattern","type":"flags.3?true"},{"name":"dark","type":"flags.4?true"},{"name":"access_hash","type":"long"},{"name":"slug","type":"string"},{"name":"document","type":"Document"},{"name":"settings","type":"flags.2?WallPaperSettings"}],"type":"WallPaper"},{"id":"1490799288","predicate":"inputReportReasonSpam","params":[],"type":"ReportReason"},{"id":"505595789","predicate":"inputReportReasonViolence","params":[],"type":"ReportReason"},{"id":"777640226","predicate":"inputReportReasonPornography","params":[],"type":"ReportReason"},{"id":"-1376497949","predicate":"inputReportReasonChildAbuse","params":[],"type":"ReportReason"},{"id":"-512463606","predicate":"inputReportReasonOther","params":[{"name":"text","type":"string"}],"type":"ReportReason"},{"id":"-302941166","predicate":"userFull","params":[{"name":"flags","type":"#"},{"name":"blocked","type":"flags.0?true"},{"name":"phone_calls_available","type":"flags.4?true"},{"name":"phone_calls_private","type":"flags.5?true"},{"name":"can_pin_message","type":"flags.7?true"},{"name":"has_scheduled","type":"flags.12?true"},{"name":"user","type":"User"},{"name":"about","type":"flags.1?string"},{"name":"settings","type":"PeerSettings"},{"name":"profile_photo","type":"flags.2?Photo"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"bot_info","type":"flags.3?BotInfo"},{"name":"pinned_msg_id","type":"flags.6?int"},{"name":"common_chats_count","type":"int"},{"name":"folder_id","type":"flags.11?int"}],"type":"UserFull"},{"id":"-116274796","predicate":"contact","params":[{"name":"user_id","type":"int"},{"name":"mutual","type":"Bool"}],"type":"Contact"},{"id":"-805141448","predicate":"importedContact","params":[{"name":"user_id","type":"int"},{"name":"client_id","type":"long"}],"type":"ImportedContact"},{"id":"1444661369","predicate":"contactBlocked","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"}],"type":"ContactBlocked"},{"id":"-748155807","predicate":"contactStatus","params":[{"name":"user_id","type":"int"},{"name":"status","type":"UserStatus"}],"type":"ContactStatus"},{"id":"-1219778094","predicate":"contacts.contactsNotModified","params":[],"type":"contacts.Contacts"},{"id":"-353862078","predicate":"contacts.contacts","params":[{"name":"contacts","type":"Vector"},{"name":"saved_count","type":"int"},{"name":"users","type":"Vector"}],"type":"contacts.Contacts"},{"id":"2010127419","predicate":"contacts.importedContacts","params":[{"name":"imported","type":"Vector"},{"name":"popular_invites","type":"Vector"},{"name":"retry_contacts","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.ImportedContacts"},{"id":"471043349","predicate":"contacts.blocked","params":[{"name":"blocked","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Blocked"},{"id":"-1878523231","predicate":"contacts.blockedSlice","params":[{"name":"count","type":"int"},{"name":"blocked","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Blocked"},{"id":"364538944","predicate":"messages.dialogs","params":[{"name":"dialogs","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Dialogs"},{"id":"1910543603","predicate":"messages.dialogsSlice","params":[{"name":"count","type":"int"},{"name":"dialogs","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Dialogs"},{"id":"-1938715001","predicate":"messages.messages","params":[{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Messages"},{"id":"-923939298","predicate":"messages.messagesSlice","params":[{"name":"flags","type":"#"},{"name":"inexact","type":"flags.1?true"},{"name":"count","type":"int"},{"name":"next_rate","type":"flags.0?int"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Messages"},{"id":"1694474197","predicate":"messages.chats","params":[{"name":"chats","type":"Vector"}],"type":"messages.Chats"},{"id":"-438840932","predicate":"messages.chatFull","params":[{"name":"full_chat","type":"ChatFull"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.ChatFull"},{"id":"-1269012015","predicate":"messages.affectedHistory","params":[{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"offset","type":"int"}],"type":"messages.AffectedHistory"},{"id":"1474492012","predicate":"inputMessagesFilterEmpty","params":[],"type":"MessagesFilter"},{"id":"-1777752804","predicate":"inputMessagesFilterPhotos","params":[],"type":"MessagesFilter"},{"id":"-1614803355","predicate":"inputMessagesFilterVideo","params":[],"type":"MessagesFilter"},{"id":"1458172132","predicate":"inputMessagesFilterPhotoVideo","params":[],"type":"MessagesFilter"},{"id":"-1629621880","predicate":"inputMessagesFilterDocument","params":[],"type":"MessagesFilter"},{"id":"2129714567","predicate":"inputMessagesFilterUrl","params":[],"type":"MessagesFilter"},{"id":"-3644025","predicate":"inputMessagesFilterGif","params":[],"type":"MessagesFilter"},{"id":"522914557","predicate":"updateNewMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"1318109142","predicate":"updateMessageID","params":[{"name":"id","type":"int"},{"name":"random_id","type":"long"}],"type":"Update"},{"id":"-1576161051","predicate":"updateDeleteMessages","params":[{"name":"messages","type":"Vector"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"1548249383","predicate":"updateUserTyping","params":[{"name":"user_id","type":"int"},{"name":"action","type":"SendMessageAction"}],"type":"Update"},{"id":"-1704596961","predicate":"updateChatUserTyping","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"action","type":"SendMessageAction"}],"type":"Update"},{"id":"125178264","predicate":"updateChatParticipants","params":[{"name":"participants","type":"ChatParticipants"}],"type":"Update"},{"id":"469489699","predicate":"updateUserStatus","params":[{"name":"user_id","type":"int"},{"name":"status","type":"UserStatus"}],"type":"Update"},{"id":"-1489818765","predicate":"updateUserName","params":[{"name":"user_id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"}],"type":"Update"},{"id":"-1791935732","predicate":"updateUserPhoto","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"},{"name":"photo","type":"UserProfilePhoto"},{"name":"previous","type":"Bool"}],"type":"Update"},{"id":"-1519637954","predicate":"updates.state","params":[{"name":"pts","type":"int"},{"name":"qts","type":"int"},{"name":"date","type":"int"},{"name":"seq","type":"int"},{"name":"unread_count","type":"int"}],"type":"updates.State"},{"id":"1567990072","predicate":"updates.differenceEmpty","params":[{"name":"date","type":"int"},{"name":"seq","type":"int"}],"type":"updates.Difference"},{"id":"16030880","predicate":"updates.difference","params":[{"name":"new_messages","type":"Vector"},{"name":"new_encrypted_messages","type":"Vector"},{"name":"other_updates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"state","type":"updates.State"}],"type":"updates.Difference"},{"id":"-1459938943","predicate":"updates.differenceSlice","params":[{"name":"new_messages","type":"Vector"},{"name":"new_encrypted_messages","type":"Vector"},{"name":"other_updates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"intermediate_state","type":"updates.State"}],"type":"updates.Difference"},{"id":"-484987010","predicate":"updatesTooLong","params":[],"type":"Updates"},{"id":"-1857044719","predicate":"updateShortMessage","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"mentioned","type":"flags.4?true"},{"name":"media_unread","type":"flags.5?true"},{"name":"silent","type":"flags.13?true"},{"name":"id","type":"int"},{"name":"user_id","type":"int"},{"name":"message","type":"string"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"date","type":"int"},{"name":"fwd_from","type":"flags.2?MessageFwdHeader"},{"name":"via_bot_id","type":"flags.11?int"},{"name":"reply_to_msg_id","type":"flags.3?int"},{"name":"entities","type":"flags.7?Vector"}],"type":"Updates"},{"id":"377562760","predicate":"updateShortChatMessage","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"mentioned","type":"flags.4?true"},{"name":"media_unread","type":"flags.5?true"},{"name":"silent","type":"flags.13?true"},{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"chat_id","type":"int"},{"name":"message","type":"string"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"date","type":"int"},{"name":"fwd_from","type":"flags.2?MessageFwdHeader"},{"name":"via_bot_id","type":"flags.11?int"},{"name":"reply_to_msg_id","type":"flags.3?int"},{"name":"entities","type":"flags.7?Vector"}],"type":"Updates"},{"id":"2027216577","predicate":"updateShort","params":[{"name":"update","type":"Update"},{"name":"date","type":"int"}],"type":"Updates"},{"id":"1918567619","predicate":"updatesCombined","params":[{"name":"updates","type":"Vector"},{"name":"users","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"date","type":"int"},{"name":"seq_start","type":"int"},{"name":"seq","type":"int"}],"type":"Updates"},{"id":"1957577280","predicate":"updates","params":[{"name":"updates","type":"Vector"},{"name":"users","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"date","type":"int"},{"name":"seq","type":"int"}],"type":"Updates"},{"id":"-1916114267","predicate":"photos.photos","params":[{"name":"photos","type":"Vector"},{"name":"users","type":"Vector"}],"type":"photos.Photos"},{"id":"352657236","predicate":"photos.photosSlice","params":[{"name":"count","type":"int"},{"name":"photos","type":"Vector"},{"name":"users","type":"Vector"}],"type":"photos.Photos"},{"id":"539045032","predicate":"photos.photo","params":[{"name":"photo","type":"Photo"},{"name":"users","type":"Vector"}],"type":"photos.Photo"},{"id":"157948117","predicate":"upload.file","params":[{"name":"type","type":"storage.FileType"},{"name":"mtime","type":"int"},{"name":"bytes","type":"bytes"}],"type":"upload.File"},{"id":"414687501","predicate":"dcOption","params":[{"name":"flags","type":"#"},{"name":"ipv6","type":"flags.0?true"},{"name":"media_only","type":"flags.1?true"},{"name":"tcpo_only","type":"flags.2?true"},{"name":"cdn","type":"flags.3?true"},{"name":"static","type":"flags.4?true"},{"name":"id","type":"int"},{"name":"ip_address","type":"string"},{"name":"port","type":"int"},{"name":"secret","type":"flags.10?bytes"}],"type":"DcOption"},{"id":"856375399","predicate":"config","params":[{"name":"flags","type":"#"},{"name":"phonecalls_enabled","type":"flags.1?true"},{"name":"default_p2p_contacts","type":"flags.3?true"},{"name":"preload_featured_stickers","type":"flags.4?true"},{"name":"ignore_phone_entities","type":"flags.5?true"},{"name":"revoke_pm_inbox","type":"flags.6?true"},{"name":"blocked_mode","type":"flags.8?true"},{"name":"pfs_enabled","type":"flags.13?true"},{"name":"date","type":"int"},{"name":"expires","type":"int"},{"name":"test_mode","type":"Bool"},{"name":"this_dc","type":"int"},{"name":"dc_options","type":"Vector"},{"name":"dc_txt_domain_name","type":"string"},{"name":"chat_size_max","type":"int"},{"name":"megagroup_size_max","type":"int"},{"name":"forwarded_count_max","type":"int"},{"name":"online_update_period_ms","type":"int"},{"name":"offline_blur_timeout_ms","type":"int"},{"name":"offline_idle_timeout_ms","type":"int"},{"name":"online_cloud_timeout_ms","type":"int"},{"name":"notify_cloud_delay_ms","type":"int"},{"name":"notify_default_delay_ms","type":"int"},{"name":"push_chat_period_ms","type":"int"},{"name":"push_chat_limit","type":"int"},{"name":"saved_gifs_limit","type":"int"},{"name":"edit_time_limit","type":"int"},{"name":"revoke_time_limit","type":"int"},{"name":"revoke_pm_time_limit","type":"int"},{"name":"rating_e_decay","type":"int"},{"name":"stickers_recent_limit","type":"int"},{"name":"stickers_faved_limit","type":"int"},{"name":"channels_read_media_period","type":"int"},{"name":"tmp_sessions","type":"flags.0?int"},{"name":"pinned_dialogs_count_max","type":"int"},{"name":"pinned_infolder_count_max","type":"int"},{"name":"call_receive_timeout_ms","type":"int"},{"name":"call_ring_timeout_ms","type":"int"},{"name":"call_connect_timeout_ms","type":"int"},{"name":"call_packet_timeout_ms","type":"int"},{"name":"me_url_prefix","type":"string"},{"name":"autoupdate_url_prefix","type":"flags.7?string"},{"name":"gif_search_username","type":"flags.9?string"},{"name":"venue_search_username","type":"flags.10?string"},{"name":"img_search_username","type":"flags.11?string"},{"name":"static_maps_provider","type":"flags.12?string"},{"name":"caption_length_max","type":"int"},{"name":"message_length_max","type":"int"},{"name":"webfile_dc_id","type":"int"},{"name":"suggested_lang_code","type":"flags.2?string"},{"name":"lang_pack_version","type":"flags.2?int"},{"name":"base_lang_pack_version","type":"flags.2?int"}],"type":"Config"},{"id":"-1910892683","predicate":"nearestDc","params":[{"name":"country","type":"string"},{"name":"this_dc","type":"int"},{"name":"nearest_dc","type":"int"}],"type":"NearestDc"},{"id":"497489295","predicate":"help.appUpdate","params":[{"name":"flags","type":"#"},{"name":"can_not_skip","type":"flags.0?true"},{"name":"id","type":"int"},{"name":"version","type":"string"},{"name":"text","type":"string"},{"name":"entities","type":"Vector"},{"name":"document","type":"flags.1?Document"},{"name":"url","type":"flags.2?string"}],"type":"help.AppUpdate"},{"id":"-1000708810","predicate":"help.noAppUpdate","params":[],"type":"help.AppUpdate"},{"id":"415997816","predicate":"help.inviteText","params":[{"name":"message","type":"string"}],"type":"help.InviteText"},{"id":"314359194","predicate":"updateNewEncryptedMessage","params":[{"name":"message","type":"EncryptedMessage"},{"name":"qts","type":"int"}],"type":"Update"},{"id":"386986326","predicate":"updateEncryptedChatTyping","params":[{"name":"chat_id","type":"int"}],"type":"Update"},{"id":"-1264392051","predicate":"updateEncryption","params":[{"name":"chat","type":"EncryptedChat"},{"name":"date","type":"int"}],"type":"Update"},{"id":"956179895","predicate":"updateEncryptedMessagesRead","params":[{"name":"chat_id","type":"int"},{"name":"max_date","type":"int"},{"name":"date","type":"int"}],"type":"Update"},{"id":"-1417756512","predicate":"encryptedChatEmpty","params":[{"name":"id","type":"int"}],"type":"EncryptedChat"},{"id":"1006044124","predicate":"encryptedChatWaiting","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"}],"type":"EncryptedChat"},{"id":"-931638658","predicate":"encryptedChatRequested","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a","type":"bytes"}],"type":"EncryptedChat"},{"id":"-94974410","predicate":"encryptedChat","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a_or_b","type":"bytes"},{"name":"key_fingerprint","type":"long"}],"type":"EncryptedChat"},{"id":"332848423","predicate":"encryptedChatDiscarded","params":[{"name":"id","type":"int"}],"type":"EncryptedChat"},{"id":"-247351839","predicate":"inputEncryptedChat","params":[{"name":"chat_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputEncryptedChat"},{"id":"-1038136962","predicate":"encryptedFileEmpty","params":[],"type":"EncryptedFile"},{"id":"1248893260","predicate":"encryptedFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"size","type":"int"},{"name":"dc_id","type":"int"},{"name":"key_fingerprint","type":"int"}],"type":"EncryptedFile"},{"id":"406307684","predicate":"inputEncryptedFileEmpty","params":[],"type":"InputEncryptedFile"},{"id":"1690108678","predicate":"inputEncryptedFileUploaded","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"md5_checksum","type":"string"},{"name":"key_fingerprint","type":"int"}],"type":"InputEncryptedFile"},{"id":"1511503333","predicate":"inputEncryptedFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputEncryptedFile"},{"id":"-182231723","predicate":"inputEncryptedFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"-317144808","predicate":"encryptedMessage","params":[{"name":"random_id","type":"long"},{"name":"chat_id","type":"int"},{"name":"date","type":"int"},{"name":"bytes","type":"bytes"},{"name":"file","type":"EncryptedFile"}],"type":"EncryptedMessage"},{"id":"594758406","predicate":"encryptedMessageService","params":[{"name":"random_id","type":"long"},{"name":"chat_id","type":"int"},{"name":"date","type":"int"},{"name":"bytes","type":"bytes"}],"type":"EncryptedMessage"},{"id":"-1058912715","predicate":"messages.dhConfigNotModified","params":[{"name":"random","type":"bytes"}],"type":"messages.DhConfig"},{"id":"740433629","predicate":"messages.dhConfig","params":[{"name":"g","type":"int"},{"name":"p","type":"bytes"},{"name":"version","type":"int"},{"name":"random","type":"bytes"}],"type":"messages.DhConfig"},{"id":"1443858741","predicate":"messages.sentEncryptedMessage","params":[{"name":"date","type":"int"}],"type":"messages.SentEncryptedMessage"},{"id":"-1802240206","predicate":"messages.sentEncryptedFile","params":[{"name":"date","type":"int"},{"name":"file","type":"EncryptedFile"}],"type":"messages.SentEncryptedMessage"},{"id":"-95482955","predicate":"inputFileBig","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"name","type":"string"}],"type":"InputFile"},{"id":"767652808","predicate":"inputEncryptedFileBigUploaded","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"key_fingerprint","type":"int"}],"type":"InputEncryptedFile"},{"id":"-364179876","predicate":"updateChatParticipantAdd","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"},{"name":"version","type":"int"}],"type":"Update"},{"id":"1851755554","predicate":"updateChatParticipantDelete","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"version","type":"int"}],"type":"Update"},{"id":"-1906403213","predicate":"updateDcOptions","params":[{"name":"dc_options","type":"Vector"}],"type":"Update"},{"id":"1530447553","predicate":"inputMediaUploadedDocument","params":[{"name":"flags","type":"#"},{"name":"nosound_video","type":"flags.3?true"},{"name":"file","type":"InputFile"},{"name":"thumb","type":"flags.2?InputFile"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"},{"name":"stickers","type":"flags.0?Vector"},{"name":"ttl_seconds","type":"flags.1?int"}],"type":"InputMedia"},{"id":"598418386","predicate":"inputMediaDocument","params":[{"name":"flags","type":"#"},{"name":"id","type":"InputDocument"},{"name":"ttl_seconds","type":"flags.0?int"}],"type":"InputMedia"},{"id":"-1666158377","predicate":"messageMediaDocument","params":[{"name":"flags","type":"#"},{"name":"document","type":"flags.0?Document"},{"name":"ttl_seconds","type":"flags.2?int"}],"type":"MessageMedia"},{"id":"1928391342","predicate":"inputDocumentEmpty","params":[],"type":"InputDocument"},{"id":"448771445","predicate":"inputDocument","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"}],"type":"InputDocument"},{"id":"-1160743548","predicate":"inputDocumentFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"thumb_size","type":"string"}],"type":"InputFileLocation"},{"id":"922273905","predicate":"documentEmpty","params":[{"name":"id","type":"long"}],"type":"Document"},{"id":"-1683841855","predicate":"document","params":[{"name":"flags","type":"#"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"date","type":"int"},{"name":"mime_type","type":"string"},{"name":"size","type":"int"},{"name":"thumbs","type":"flags.0?Vector"},{"name":"dc_id","type":"int"},{"name":"attributes","type":"Vector"}],"type":"Document"},{"id":"398898678","predicate":"help.support","params":[{"name":"phone_number","type":"string"},{"name":"user","type":"User"}],"type":"help.Support"},{"id":"-1613493288","predicate":"notifyPeer","params":[{"name":"peer","type":"Peer"}],"type":"NotifyPeer"},{"id":"-1261946036","predicate":"notifyUsers","params":[],"type":"NotifyPeer"},{"id":"-1073230141","predicate":"notifyChats","params":[],"type":"NotifyPeer"},{"id":"-2131957734","predicate":"updateUserBlocked","params":[{"name":"user_id","type":"int"},{"name":"blocked","type":"Bool"}],"type":"Update"},{"id":"-1094555409","predicate":"updateNotifySettings","params":[{"name":"peer","type":"NotifyPeer"},{"name":"notify_settings","type":"PeerNotifySettings"}],"type":"Update"},{"id":"381645902","predicate":"sendMessageTypingAction","params":[],"type":"SendMessageAction"},{"id":"-44119819","predicate":"sendMessageCancelAction","params":[],"type":"SendMessageAction"},{"id":"-1584933265","predicate":"sendMessageRecordVideoAction","params":[],"type":"SendMessageAction"},{"id":"-378127636","predicate":"sendMessageUploadVideoAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"-718310409","predicate":"sendMessageRecordAudioAction","params":[],"type":"SendMessageAction"},{"id":"-212740181","predicate":"sendMessageUploadAudioAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"-774682074","predicate":"sendMessageUploadPhotoAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"-1441998364","predicate":"sendMessageUploadDocumentAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"393186209","predicate":"sendMessageGeoLocationAction","params":[],"type":"SendMessageAction"},{"id":"1653390447","predicate":"sendMessageChooseContactAction","params":[],"type":"SendMessageAction"},{"id":"-1290580579","predicate":"contacts.found","params":[{"name":"my_results","type":"Vector"},{"name":"results","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Found"},{"id":"-337352679","predicate":"updateServiceNotification","params":[{"name":"flags","type":"#"},{"name":"popup","type":"flags.0?true"},{"name":"inbox_date","type":"flags.1?int"},{"name":"type","type":"string"},{"name":"message","type":"string"},{"name":"media","type":"MessageMedia"},{"name":"entities","type":"Vector"}],"type":"Update"},{"id":"-496024847","predicate":"userStatusRecently","params":[],"type":"UserStatus"},{"id":"129960444","predicate":"userStatusLastWeek","params":[],"type":"UserStatus"},{"id":"2011940674","predicate":"userStatusLastMonth","params":[],"type":"UserStatus"},{"id":"-298113238","predicate":"updatePrivacy","params":[{"name":"key","type":"PrivacyKey"},{"name":"rules","type":"Vector"}],"type":"Update"},{"id":"1335282456","predicate":"inputPrivacyKeyStatusTimestamp","params":[],"type":"InputPrivacyKey"},{"id":"-1137792208","predicate":"privacyKeyStatusTimestamp","params":[],"type":"PrivacyKey"},{"id":"218751099","predicate":"inputPrivacyValueAllowContacts","params":[],"type":"InputPrivacyRule"},{"id":"407582158","predicate":"inputPrivacyValueAllowAll","params":[],"type":"InputPrivacyRule"},{"id":"320652927","predicate":"inputPrivacyValueAllowUsers","params":[{"name":"users","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"195371015","predicate":"inputPrivacyValueDisallowContacts","params":[],"type":"InputPrivacyRule"},{"id":"-697604407","predicate":"inputPrivacyValueDisallowAll","params":[],"type":"InputPrivacyRule"},{"id":"-1877932953","predicate":"inputPrivacyValueDisallowUsers","params":[{"name":"users","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"-123988","predicate":"privacyValueAllowContacts","params":[],"type":"PrivacyRule"},{"id":"1698855810","predicate":"privacyValueAllowAll","params":[],"type":"PrivacyRule"},{"id":"1297858060","predicate":"privacyValueAllowUsers","params":[{"name":"users","type":"Vector"}],"type":"PrivacyRule"},{"id":"-125240806","predicate":"privacyValueDisallowContacts","params":[],"type":"PrivacyRule"},{"id":"-1955338397","predicate":"privacyValueDisallowAll","params":[],"type":"PrivacyRule"},{"id":"209668535","predicate":"privacyValueDisallowUsers","params":[{"name":"users","type":"Vector"}],"type":"PrivacyRule"},{"id":"1352683077","predicate":"account.privacyRules","params":[{"name":"rules","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"account.PrivacyRules"},{"id":"-1194283041","predicate":"accountDaysTTL","params":[{"name":"days","type":"int"}],"type":"AccountDaysTTL"},{"id":"314130811","predicate":"updateUserPhone","params":[{"name":"user_id","type":"int"},{"name":"phone","type":"string"}],"type":"Update"},{"id":"1815593308","predicate":"documentAttributeImageSize","params":[{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"DocumentAttribute"},{"id":"297109817","predicate":"documentAttributeAnimated","params":[],"type":"DocumentAttribute"},{"id":"1662637586","predicate":"documentAttributeSticker","params":[{"name":"flags","type":"#"},{"name":"mask","type":"flags.1?true"},{"name":"alt","type":"string"},{"name":"stickerset","type":"InputStickerSet"},{"name":"mask_coords","type":"flags.0?MaskCoords"}],"type":"DocumentAttribute"},{"id":"250621158","predicate":"documentAttributeVideo","params":[{"name":"flags","type":"#"},{"name":"round_message","type":"flags.0?true"},{"name":"supports_streaming","type":"flags.1?true"},{"name":"duration","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"DocumentAttribute"},{"id":"-1739392570","predicate":"documentAttributeAudio","params":[{"name":"flags","type":"#"},{"name":"voice","type":"flags.10?true"},{"name":"duration","type":"int"},{"name":"title","type":"flags.0?string"},{"name":"performer","type":"flags.1?string"},{"name":"waveform","type":"flags.2?bytes"}],"type":"DocumentAttribute"},{"id":"358154344","predicate":"documentAttributeFilename","params":[{"name":"file_name","type":"string"}],"type":"DocumentAttribute"},{"id":"-244016606","predicate":"messages.stickersNotModified","params":[],"type":"messages.Stickers"},{"id":"-463889475","predicate":"messages.stickers","params":[{"name":"hash","type":"int"},{"name":"stickers","type":"Vector"}],"type":"messages.Stickers"},{"id":"313694676","predicate":"stickerPack","params":[{"name":"emoticon","type":"string"},{"name":"documents","type":"Vector"}],"type":"StickerPack"},{"id":"-395967805","predicate":"messages.allStickersNotModified","params":[],"type":"messages.AllStickers"},{"id":"-302170017","predicate":"messages.allStickers","params":[{"name":"hash","type":"int"},{"name":"sets","type":"Vector"}],"type":"messages.AllStickers"},{"id":"-1667805217","predicate":"updateReadHistoryInbox","params":[{"name":"flags","type":"#"},{"name":"folder_id","type":"flags.0?int"},{"name":"peer","type":"Peer"},{"name":"max_id","type":"int"},{"name":"still_unread_count","type":"int"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"791617983","predicate":"updateReadHistoryOutbox","params":[{"name":"peer","type":"Peer"},{"name":"max_id","type":"int"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-2066640507","predicate":"messages.affectedMessages","params":[{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"messages.AffectedMessages"},{"id":"2139689491","predicate":"updateWebPage","params":[{"name":"webpage","type":"WebPage"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-350980120","predicate":"webPageEmpty","params":[{"name":"id","type":"long"}],"type":"WebPage"},{"id":"-981018084","predicate":"webPagePending","params":[{"name":"id","type":"long"},{"name":"date","type":"int"}],"type":"WebPage"},{"id":"-392411726","predicate":"webPage","params":[{"name":"flags","type":"#"},{"name":"id","type":"long"},{"name":"url","type":"string"},{"name":"display_url","type":"string"},{"name":"hash","type":"int"},{"name":"type","type":"flags.0?string"},{"name":"site_name","type":"flags.1?string"},{"name":"title","type":"flags.2?string"},{"name":"description","type":"flags.3?string"},{"name":"photo","type":"flags.4?Photo"},{"name":"embed_url","type":"flags.5?string"},{"name":"embed_type","type":"flags.5?string"},{"name":"embed_width","type":"flags.6?int"},{"name":"embed_height","type":"flags.6?int"},{"name":"duration","type":"flags.7?int"},{"name":"author","type":"flags.8?string"},{"name":"document","type":"flags.9?Document"},{"name":"cached_page","type":"flags.10?Page"},{"name":"attributes","type":"flags.12?Vector"}],"type":"WebPage"},{"id":"-1557277184","predicate":"messageMediaWebPage","params":[{"name":"webpage","type":"WebPage"}],"type":"MessageMedia"},{"id":"-1392388579","predicate":"authorization","params":[{"name":"flags","type":"#"},{"name":"current","type":"flags.0?true"},{"name":"official_app","type":"flags.1?true"},{"name":"password_pending","type":"flags.2?true"},{"name":"hash","type":"long"},{"name":"device_model","type":"string"},{"name":"platform","type":"string"},{"name":"system_version","type":"string"},{"name":"api_id","type":"int"},{"name":"app_name","type":"string"},{"name":"app_version","type":"string"},{"name":"date_created","type":"int"},{"name":"date_active","type":"int"},{"name":"ip","type":"string"},{"name":"country","type":"string"},{"name":"region","type":"string"}],"type":"Authorization"},{"id":"307276766","predicate":"account.authorizations","params":[{"name":"authorizations","type":"Vector"}],"type":"account.Authorizations"},{"id":"-1390001672","predicate":"account.password","params":[{"name":"flags","type":"#"},{"name":"has_recovery","type":"flags.0?true"},{"name":"has_secure_values","type":"flags.1?true"},{"name":"has_password","type":"flags.2?true"},{"name":"current_algo","type":"flags.2?PasswordKdfAlgo"},{"name":"srp_B","type":"flags.2?bytes"},{"name":"srp_id","type":"flags.2?long"},{"name":"hint","type":"flags.3?string"},{"name":"email_unconfirmed_pattern","type":"flags.4?string"},{"name":"new_algo","type":"PasswordKdfAlgo"},{"name":"new_secure_algo","type":"SecurePasswordKdfAlgo"},{"name":"secure_random","type":"bytes"}],"type":"account.Password"},{"id":"-1705233435","predicate":"account.passwordSettings","params":[{"name":"flags","type":"#"},{"name":"email","type":"flags.0?string"},{"name":"secure_settings","type":"flags.1?SecureSecretSettings"}],"type":"account.PasswordSettings"},{"id":"-1036572727","predicate":"account.passwordInputSettings","params":[{"name":"flags","type":"#"},{"name":"new_algo","type":"flags.0?PasswordKdfAlgo"},{"name":"new_password_hash","type":"flags.0?bytes"},{"name":"hint","type":"flags.0?string"},{"name":"email","type":"flags.1?string"},{"name":"new_secure_settings","type":"flags.2?SecureSecretSettings"}],"type":"account.PasswordInputSettings"},{"id":"326715557","predicate":"auth.passwordRecovery","params":[{"name":"email_pattern","type":"string"}],"type":"auth.PasswordRecovery"},{"id":"-1052959727","predicate":"inputMediaVenue","params":[{"name":"geo_point","type":"InputGeoPoint"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"provider","type":"string"},{"name":"venue_id","type":"string"},{"name":"venue_type","type":"string"}],"type":"InputMedia"},{"id":"784356159","predicate":"messageMediaVenue","params":[{"name":"geo","type":"GeoPoint"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"provider","type":"string"},{"name":"venue_id","type":"string"},{"name":"venue_type","type":"string"}],"type":"MessageMedia"},{"id":"-1551583367","predicate":"receivedNotifyMessage","params":[{"name":"id","type":"int"},{"name":"flags","type":"int"}],"type":"ReceivedNotifyMessage"},{"id":"1776236393","predicate":"chatInviteEmpty","params":[],"type":"ExportedChatInvite"},{"id":"-64092740","predicate":"chatInviteExported","params":[{"name":"link","type":"string"}],"type":"ExportedChatInvite"},{"id":"1516793212","predicate":"chatInviteAlready","params":[{"name":"chat","type":"Chat"}],"type":"ChatInvite"},{"id":"-540871282","predicate":"chatInvite","params":[{"name":"flags","type":"#"},{"name":"channel","type":"flags.0?true"},{"name":"broadcast","type":"flags.1?true"},{"name":"public","type":"flags.2?true"},{"name":"megagroup","type":"flags.3?true"},{"name":"title","type":"string"},{"name":"photo","type":"Photo"},{"name":"participants_count","type":"int"},{"name":"participants","type":"flags.4?Vector"}],"type":"ChatInvite"},{"id":"-123931160","predicate":"messageActionChatJoinedByLink","params":[{"name":"inviter_id","type":"int"}],"type":"MessageAction"},{"id":"1757493555","predicate":"updateReadMessagesContents","params":[{"name":"messages","type":"Vector"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-4838507","predicate":"inputStickerSetEmpty","params":[],"type":"InputStickerSet"},{"id":"-1645763991","predicate":"inputStickerSetID","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputStickerSet"},{"id":"-2044933984","predicate":"inputStickerSetShortName","params":[{"name":"short_name","type":"string"}],"type":"InputStickerSet"},{"id":"-290164953","predicate":"stickerSet","params":[{"name":"flags","type":"#"},{"name":"archived","type":"flags.1?true"},{"name":"official","type":"flags.2?true"},{"name":"masks","type":"flags.3?true"},{"name":"animated","type":"flags.5?true"},{"name":"installed_date","type":"flags.0?int"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"title","type":"string"},{"name":"short_name","type":"string"},{"name":"thumb","type":"flags.4?PhotoSize"},{"name":"thumb_dc_id","type":"flags.4?int"},{"name":"count","type":"int"},{"name":"hash","type":"int"}],"type":"StickerSet"},{"id":"-1240849242","predicate":"messages.stickerSet","params":[{"name":"set","type":"StickerSet"},{"name":"packs","type":"Vector"},{"name":"documents","type":"Vector"}],"type":"messages.StickerSet"},{"id":"-1820043071","predicate":"user","params":[{"name":"flags","type":"#"},{"name":"self","type":"flags.10?true"},{"name":"contact","type":"flags.11?true"},{"name":"mutual_contact","type":"flags.12?true"},{"name":"deleted","type":"flags.13?true"},{"name":"bot","type":"flags.14?true"},{"name":"bot_chat_history","type":"flags.15?true"},{"name":"bot_nochats","type":"flags.16?true"},{"name":"verified","type":"flags.17?true"},{"name":"restricted","type":"flags.18?true"},{"name":"min","type":"flags.20?true"},{"name":"bot_inline_geo","type":"flags.21?true"},{"name":"support","type":"flags.23?true"},{"name":"scam","type":"flags.24?true"},{"name":"id","type":"int"},{"name":"access_hash","type":"flags.0?long"},{"name":"first_name","type":"flags.1?string"},{"name":"last_name","type":"flags.2?string"},{"name":"username","type":"flags.3?string"},{"name":"phone","type":"flags.4?string"},{"name":"photo","type":"flags.5?UserProfilePhoto"},{"name":"status","type":"flags.6?UserStatus"},{"name":"bot_info_version","type":"flags.14?int"},{"name":"restriction_reason","type":"flags.18?Vector"},{"name":"bot_inline_placeholder","type":"flags.19?string"},{"name":"lang_code","type":"flags.22?string"}],"type":"User"},{"id":"-1032140601","predicate":"botCommand","params":[{"name":"command","type":"string"},{"name":"description","type":"string"}],"type":"BotCommand"},{"id":"-1729618630","predicate":"botInfo","params":[{"name":"user_id","type":"int"},{"name":"description","type":"string"},{"name":"commands","type":"Vector"}],"type":"BotInfo"},{"id":"-1560655744","predicate":"keyboardButton","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"2002815875","predicate":"keyboardButtonRow","params":[{"name":"buttons","type":"Vector"}],"type":"KeyboardButtonRow"},{"id":"-1606526075","predicate":"replyKeyboardHide","params":[{"name":"flags","type":"#"},{"name":"selective","type":"flags.2?true"}],"type":"ReplyMarkup"},{"id":"-200242528","predicate":"replyKeyboardForceReply","params":[{"name":"flags","type":"#"},{"name":"single_use","type":"flags.1?true"},{"name":"selective","type":"flags.2?true"}],"type":"ReplyMarkup"},{"id":"889353612","predicate":"replyKeyboardMarkup","params":[{"name":"flags","type":"#"},{"name":"resize","type":"flags.0?true"},{"name":"single_use","type":"flags.1?true"},{"name":"selective","type":"flags.2?true"},{"name":"rows","type":"Vector"}],"type":"ReplyMarkup"},{"id":"2072935910","predicate":"inputPeerUser","params":[{"name":"user_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputPeer"},{"id":"-668391402","predicate":"inputUser","params":[{"name":"user_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputUser"},{"id":"-1148011883","predicate":"messageEntityUnknown","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-100378723","predicate":"messageEntityMention","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1868782349","predicate":"messageEntityHashtag","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1827637959","predicate":"messageEntityBotCommand","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1859134776","predicate":"messageEntityUrl","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1692693954","predicate":"messageEntityEmail","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-1117713463","predicate":"messageEntityBold","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-2106619040","predicate":"messageEntityItalic","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"681706865","predicate":"messageEntityCode","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1938967520","predicate":"messageEntityPre","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"},{"name":"language","type":"string"}],"type":"MessageEntity"},{"id":"1990644519","predicate":"messageEntityTextUrl","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"},{"name":"url","type":"string"}],"type":"MessageEntity"},{"id":"301019932","predicate":"updateShortSentMessage","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"id","type":"int"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"date","type":"int"},{"name":"media","type":"flags.9?MessageMedia"},{"name":"entities","type":"flags.7?Vector"}],"type":"Updates"},{"id":"-292807034","predicate":"inputChannelEmpty","params":[],"type":"InputChannel"},{"id":"-1343524562","predicate":"inputChannel","params":[{"name":"channel_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputChannel"},{"id":"-1109531342","predicate":"peerChannel","params":[{"name":"channel_id","type":"int"}],"type":"Peer"},{"id":"548253432","predicate":"inputPeerChannel","params":[{"name":"channel_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputPeer"},{"id":"-753232354","predicate":"channel","params":[{"name":"flags","type":"#"},{"name":"creator","type":"flags.0?true"},{"name":"left","type":"flags.2?true"},{"name":"broadcast","type":"flags.5?true"},{"name":"verified","type":"flags.7?true"},{"name":"megagroup","type":"flags.8?true"},{"name":"restricted","type":"flags.9?true"},{"name":"signatures","type":"flags.11?true"},{"name":"min","type":"flags.12?true"},{"name":"scam","type":"flags.19?true"},{"name":"has_link","type":"flags.20?true"},{"name":"has_geo","type":"flags.21?true"},{"name":"slowmode_enabled","type":"flags.22?true"},{"name":"id","type":"int"},{"name":"access_hash","type":"flags.13?long"},{"name":"title","type":"string"},{"name":"username","type":"flags.6?string"},{"name":"photo","type":"ChatPhoto"},{"name":"date","type":"int"},{"name":"version","type":"int"},{"name":"restriction_reason","type":"flags.9?Vector"},{"name":"admin_rights","type":"flags.14?ChatAdminRights"},{"name":"banned_rights","type":"flags.15?ChatBannedRights"},{"name":"default_banned_rights","type":"flags.18?ChatBannedRights"},{"name":"participants_count","type":"flags.17?int"}],"type":"Chat"},{"id":"681420594","predicate":"channelForbidden","params":[{"name":"flags","type":"#"},{"name":"broadcast","type":"flags.5?true"},{"name":"megagroup","type":"flags.8?true"},{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"title","type":"string"},{"name":"until_date","type":"flags.16?int"}],"type":"Chat"},{"id":"2131196633","predicate":"contacts.resolvedPeer","params":[{"name":"peer","type":"Peer"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.ResolvedPeer"},{"id":"763976820","predicate":"channelFull","params":[{"name":"flags","type":"#"},{"name":"can_view_participants","type":"flags.3?true"},{"name":"can_set_username","type":"flags.6?true"},{"name":"can_set_stickers","type":"flags.7?true"},{"name":"hidden_prehistory","type":"flags.10?true"},{"name":"can_view_stats","type":"flags.12?true"},{"name":"can_set_location","type":"flags.16?true"},{"name":"has_scheduled","type":"flags.19?true"},{"name":"id","type":"int"},{"name":"about","type":"string"},{"name":"participants_count","type":"flags.0?int"},{"name":"admins_count","type":"flags.1?int"},{"name":"kicked_count","type":"flags.2?int"},{"name":"banned_count","type":"flags.2?int"},{"name":"online_count","type":"flags.13?int"},{"name":"read_inbox_max_id","type":"int"},{"name":"read_outbox_max_id","type":"int"},{"name":"unread_count","type":"int"},{"name":"chat_photo","type":"Photo"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"exported_invite","type":"ExportedChatInvite"},{"name":"bot_info","type":"Vector"},{"name":"migrated_from_chat_id","type":"flags.4?int"},{"name":"migrated_from_max_id","type":"flags.4?int"},{"name":"pinned_msg_id","type":"flags.5?int"},{"name":"stickerset","type":"flags.8?StickerSet"},{"name":"available_min_id","type":"flags.9?int"},{"name":"folder_id","type":"flags.11?int"},{"name":"linked_chat_id","type":"flags.14?int"},{"name":"location","type":"flags.15?ChannelLocation"},{"name":"slowmode_seconds","type":"flags.17?int"},{"name":"slowmode_next_send_date","type":"flags.18?int"},{"name":"pts","type":"int"}],"type":"ChatFull"},{"id":"182649427","predicate":"messageRange","params":[{"name":"min_id","type":"int"},{"name":"max_id","type":"int"}],"type":"MessageRange"},{"id":"-1725551049","predicate":"messages.channelMessages","params":[{"name":"flags","type":"#"},{"name":"inexact","type":"flags.1?true"},{"name":"pts","type":"int"},{"name":"count","type":"int"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Messages"},{"id":"-1781355374","predicate":"messageActionChannelCreate","params":[{"name":"title","type":"string"}],"type":"MessageAction"},{"id":"-352032773","predicate":"updateChannelTooLong","params":[{"name":"flags","type":"#"},{"name":"channel_id","type":"int"},{"name":"pts","type":"flags.0?int"}],"type":"Update"},{"id":"-1227598250","predicate":"updateChannel","params":[{"name":"channel_id","type":"int"}],"type":"Update"},{"id":"1656358105","predicate":"updateNewChannelMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"856380452","predicate":"updateReadChannelInbox","params":[{"name":"flags","type":"#"},{"name":"folder_id","type":"flags.0?int"},{"name":"channel_id","type":"int"},{"name":"max_id","type":"int"},{"name":"still_unread_count","type":"int"},{"name":"pts","type":"int"}],"type":"Update"},{"id":"-1015733815","predicate":"updateDeleteChannelMessages","params":[{"name":"channel_id","type":"int"},{"name":"messages","type":"Vector"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-1734268085","predicate":"updateChannelMessageViews","params":[{"name":"channel_id","type":"int"},{"name":"id","type":"int"},{"name":"views","type":"int"}],"type":"Update"},{"id":"1041346555","predicate":"updates.channelDifferenceEmpty","params":[{"name":"flags","type":"#"},{"name":"final","type":"flags.0?true"},{"name":"pts","type":"int"},{"name":"timeout","type":"flags.1?int"}],"type":"updates.ChannelDifference"},{"id":"-1531132162","predicate":"updates.channelDifferenceTooLong","params":[{"name":"flags","type":"#"},{"name":"final","type":"flags.0?true"},{"name":"timeout","type":"flags.1?int"},{"name":"dialog","type":"Dialog"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"updates.ChannelDifference"},{"id":"543450958","predicate":"updates.channelDifference","params":[{"name":"flags","type":"#"},{"name":"final","type":"flags.0?true"},{"name":"pts","type":"int"},{"name":"timeout","type":"flags.1?int"},{"name":"new_messages","type":"Vector"},{"name":"other_updates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"updates.ChannelDifference"},{"id":"-1798033689","predicate":"channelMessagesFilterEmpty","params":[],"type":"ChannelMessagesFilter"},{"id":"-847783593","predicate":"channelMessagesFilter","params":[{"name":"flags","type":"#"},{"name":"exclude_new_messages","type":"flags.1?true"},{"name":"ranges","type":"Vector"}],"type":"ChannelMessagesFilter"},{"id":"367766557","predicate":"channelParticipant","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"}],"type":"ChannelParticipant"},{"id":"-1557620115","predicate":"channelParticipantSelf","params":[{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"}],"type":"ChannelParticipant"},{"id":"-2138237532","predicate":"channelParticipantCreator","params":[{"name":"flags","type":"#"},{"name":"user_id","type":"int"},{"name":"rank","type":"flags.0?string"}],"type":"ChannelParticipant"},{"id":"-566281095","predicate":"channelParticipantsRecent","params":[],"type":"ChannelParticipantsFilter"},{"id":"-1268741783","predicate":"channelParticipantsAdmins","params":[],"type":"ChannelParticipantsFilter"},{"id":"-1548400251","predicate":"channelParticipantsKicked","params":[{"name":"q","type":"string"}],"type":"ChannelParticipantsFilter"},{"id":"-177282392","predicate":"channels.channelParticipants","params":[{"name":"count","type":"int"},{"name":"participants","type":"Vector"},{"name":"users","type":"Vector"}],"type":"channels.ChannelParticipants"},{"id":"-791039645","predicate":"channels.channelParticipant","params":[{"name":"participant","type":"ChannelParticipant"},{"name":"users","type":"Vector"}],"type":"channels.ChannelParticipant"},{"id":"-636267638","predicate":"chatParticipantCreator","params":[{"name":"user_id","type":"int"}],"type":"ChatParticipant"},{"id":"-489233354","predicate":"chatParticipantAdmin","params":[{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"}],"type":"ChatParticipant"},{"id":"-1232070311","predicate":"updateChatParticipantAdmin","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"is_admin","type":"Bool"},{"name":"version","type":"int"}],"type":"Update"},{"id":"1371385889","predicate":"messageActionChatMigrateTo","params":[{"name":"channel_id","type":"int"}],"type":"MessageAction"},{"id":"-1336546578","predicate":"messageActionChannelMigrateFrom","params":[{"name":"title","type":"string"},{"name":"chat_id","type":"int"}],"type":"MessageAction"},{"id":"-1328445861","predicate":"channelParticipantsBots","params":[],"type":"ChannelParticipantsFilter"},{"id":"2013922064","predicate":"help.termsOfService","params":[{"name":"flags","type":"#"},{"name":"popup","type":"flags.0?true"},{"name":"id","type":"DataJSON"},{"name":"text","type":"string"},{"name":"entities","type":"Vector"},{"name":"min_age_confirm","type":"flags.1?int"}],"type":"help.TermsOfService"},{"id":"1753886890","predicate":"updateNewStickerSet","params":[{"name":"stickerset","type":"messages.StickerSet"}],"type":"Update"},{"id":"196268545","predicate":"updateStickerSetsOrder","params":[{"name":"flags","type":"#"},{"name":"masks","type":"flags.0?true"},{"name":"order","type":"Vector"}],"type":"Update"},{"id":"1135492588","predicate":"updateStickerSets","params":[],"type":"Update"},{"id":"372165663","predicate":"foundGif","params":[{"name":"url","type":"string"},{"name":"thumb_url","type":"string"},{"name":"content_url","type":"string"},{"name":"content_type","type":"string"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"FoundGif"},{"id":"-1670052855","predicate":"foundGifCached","params":[{"name":"url","type":"string"},{"name":"photo","type":"Photo"},{"name":"document","type":"Document"}],"type":"FoundGif"},{"id":"1212395773","predicate":"inputMediaGifExternal","params":[{"name":"url","type":"string"},{"name":"q","type":"string"}],"type":"InputMedia"},{"id":"1158290442","predicate":"messages.foundGifs","params":[{"name":"next_offset","type":"int"},{"name":"results","type":"Vector"}],"type":"messages.FoundGifs"},{"id":"-402498398","predicate":"messages.savedGifsNotModified","params":[],"type":"messages.SavedGifs"},{"id":"772213157","predicate":"messages.savedGifs","params":[{"name":"hash","type":"int"},{"name":"gifs","type":"Vector"}],"type":"messages.SavedGifs"},{"id":"-1821035490","predicate":"updateSavedGifs","params":[],"type":"Update"},{"id":"864077702","predicate":"inputBotInlineMessageMediaAuto","params":[{"name":"flags","type":"#"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"1036876423","predicate":"inputBotInlineMessageText","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.0?true"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"-2000710887","predicate":"inputBotInlineResult","params":[{"name":"flags","type":"#"},{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"title","type":"flags.1?string"},{"name":"description","type":"flags.2?string"},{"name":"url","type":"flags.3?string"},{"name":"thumb","type":"flags.4?InputWebDocument"},{"name":"content","type":"flags.5?InputWebDocument"},{"name":"send_message","type":"InputBotInlineMessage"}],"type":"InputBotInlineResult"},{"id":"1984755728","predicate":"botInlineMessageMediaAuto","params":[{"name":"flags","type":"#"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"-1937807902","predicate":"botInlineMessageText","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.0?true"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"295067450","predicate":"botInlineResult","params":[{"name":"flags","type":"#"},{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"title","type":"flags.1?string"},{"name":"description","type":"flags.2?string"},{"name":"url","type":"flags.3?string"},{"name":"thumb","type":"flags.4?WebDocument"},{"name":"content","type":"flags.5?WebDocument"},{"name":"send_message","type":"BotInlineMessage"}],"type":"BotInlineResult"},{"id":"-1803769784","predicate":"messages.botResults","params":[{"name":"flags","type":"#"},{"name":"gallery","type":"flags.0?true"},{"name":"query_id","type":"long"},{"name":"next_offset","type":"flags.1?string"},{"name":"switch_pm","type":"flags.2?InlineBotSwitchPM"},{"name":"results","type":"Vector"},{"name":"cache_time","type":"int"},{"name":"users","type":"Vector"}],"type":"messages.BotResults"},{"id":"1417832080","predicate":"updateBotInlineQuery","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"query","type":"string"},{"name":"geo","type":"flags.0?GeoPoint"},{"name":"offset","type":"string"}],"type":"Update"},{"id":"239663460","predicate":"updateBotInlineSend","params":[{"name":"flags","type":"#"},{"name":"user_id","type":"int"},{"name":"query","type":"string"},{"name":"geo","type":"flags.0?GeoPoint"},{"name":"id","type":"string"},{"name":"msg_id","type":"flags.1?InputBotInlineMessageID"}],"type":"Update"},{"id":"1358283666","predicate":"inputMessagesFilterVoice","params":[],"type":"MessagesFilter"},{"id":"928101534","predicate":"inputMessagesFilterMusic","params":[],"type":"MessagesFilter"},{"id":"-1107622874","predicate":"inputPrivacyKeyChatInvite","params":[],"type":"InputPrivacyKey"},{"id":"1343122938","predicate":"privacyKeyChatInvite","params":[],"type":"PrivacyKey"},{"id":"1571494644","predicate":"exportedMessageLink","params":[{"name":"link","type":"string"},{"name":"html","type":"string"}],"type":"ExportedMessageLink"},{"id":"-332168592","predicate":"messageFwdHeader","params":[{"name":"flags","type":"#"},{"name":"from_id","type":"flags.0?int"},{"name":"from_name","type":"flags.5?string"},{"name":"date","type":"int"},{"name":"channel_id","type":"flags.1?int"},{"name":"channel_post","type":"flags.2?int"},{"name":"post_author","type":"flags.3?string"},{"name":"saved_from_peer","type":"flags.4?Peer"},{"name":"saved_from_msg_id","type":"flags.4?int"}],"type":"MessageFwdHeader"},{"id":"457133559","predicate":"updateEditChannelMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-1738988427","predicate":"updateChannelPinnedMessage","params":[{"name":"channel_id","type":"int"},{"name":"id","type":"int"}],"type":"Update"},{"id":"-1799538451","predicate":"messageActionPinMessage","params":[],"type":"MessageAction"},{"id":"1923290508","predicate":"auth.codeTypeSms","params":[],"type":"auth.CodeType"},{"id":"1948046307","predicate":"auth.codeTypeCall","params":[],"type":"auth.CodeType"},{"id":"577556219","predicate":"auth.codeTypeFlashCall","params":[],"type":"auth.CodeType"},{"id":"1035688326","predicate":"auth.sentCodeTypeApp","params":[{"name":"length","type":"int"}],"type":"auth.SentCodeType"},{"id":"-1073693790","predicate":"auth.sentCodeTypeSms","params":[{"name":"length","type":"int"}],"type":"auth.SentCodeType"},{"id":"1398007207","predicate":"auth.sentCodeTypeCall","params":[{"name":"length","type":"int"}],"type":"auth.SentCodeType"},{"id":"-1425815847","predicate":"auth.sentCodeTypeFlashCall","params":[{"name":"pattern","type":"string"}],"type":"auth.SentCodeType"},{"id":"629866245","predicate":"keyboardButtonUrl","params":[{"name":"text","type":"string"},{"name":"url","type":"string"}],"type":"KeyboardButton"},{"id":"1748655686","predicate":"keyboardButtonCallback","params":[{"name":"text","type":"string"},{"name":"data","type":"bytes"}],"type":"KeyboardButton"},{"id":"-1318425559","predicate":"keyboardButtonRequestPhone","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"-59151553","predicate":"keyboardButtonRequestGeoLocation","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"90744648","predicate":"keyboardButtonSwitchInline","params":[{"name":"flags","type":"#"},{"name":"same_peer","type":"flags.0?true"},{"name":"text","type":"string"},{"name":"query","type":"string"}],"type":"KeyboardButton"},{"id":"1218642516","predicate":"replyInlineMarkup","params":[{"name":"rows","type":"Vector"}],"type":"ReplyMarkup"},{"id":"911761060","predicate":"messages.botCallbackAnswer","params":[{"name":"flags","type":"#"},{"name":"alert","type":"flags.1?true"},{"name":"has_url","type":"flags.3?true"},{"name":"native_ui","type":"flags.4?true"},{"name":"message","type":"flags.0?string"},{"name":"url","type":"flags.2?string"},{"name":"cache_time","type":"int"}],"type":"messages.BotCallbackAnswer"},{"id":"-415938591","predicate":"updateBotCallbackQuery","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"peer","type":"Peer"},{"name":"msg_id","type":"int"},{"name":"chat_instance","type":"long"},{"name":"data","type":"flags.0?bytes"},{"name":"game_short_name","type":"flags.1?string"}],"type":"Update"},{"id":"649453030","predicate":"messages.messageEditData","params":[{"name":"flags","type":"#"},{"name":"caption","type":"flags.0?true"}],"type":"messages.MessageEditData"},{"id":"-469536605","predicate":"updateEditMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-1045340827","predicate":"inputBotInlineMessageMediaGeo","params":[{"name":"flags","type":"#"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"period","type":"int"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"1098628881","predicate":"inputBotInlineMessageMediaVenue","params":[{"name":"flags","type":"#"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"provider","type":"string"},{"name":"venue_id","type":"string"},{"name":"venue_type","type":"string"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"-1494368259","predicate":"inputBotInlineMessageMediaContact","params":[{"name":"flags","type":"#"},{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"vcard","type":"string"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"-1222451611","predicate":"botInlineMessageMediaGeo","params":[{"name":"flags","type":"#"},{"name":"geo","type":"GeoPoint"},{"name":"period","type":"int"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"-1970903652","predicate":"botInlineMessageMediaVenue","params":[{"name":"flags","type":"#"},{"name":"geo","type":"GeoPoint"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"provider","type":"string"},{"name":"venue_id","type":"string"},{"name":"venue_type","type":"string"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"416402882","predicate":"botInlineMessageMediaContact","params":[{"name":"flags","type":"#"},{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"vcard","type":"string"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"-1462213465","predicate":"inputBotInlineResultPhoto","params":[{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"photo","type":"InputPhoto"},{"name":"send_message","type":"InputBotInlineMessage"}],"type":"InputBotInlineResult"},{"id":"-459324","predicate":"inputBotInlineResultDocument","params":[{"name":"flags","type":"#"},{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"title","type":"flags.1?string"},{"name":"description","type":"flags.2?string"},{"name":"document","type":"InputDocument"},{"name":"send_message","type":"InputBotInlineMessage"}],"type":"InputBotInlineResult"},{"id":"400266251","predicate":"botInlineMediaResult","params":[{"name":"flags","type":"#"},{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"photo","type":"flags.0?Photo"},{"name":"document","type":"flags.1?Document"},{"name":"title","type":"flags.2?string"},{"name":"description","type":"flags.3?string"},{"name":"send_message","type":"BotInlineMessage"}],"type":"BotInlineResult"},{"id":"-1995686519","predicate":"inputBotInlineMessageID","params":[{"name":"dc_id","type":"int"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputBotInlineMessageID"},{"id":"-103646630","predicate":"updateInlineBotCallbackQuery","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"msg_id","type":"InputBotInlineMessageID"},{"name":"chat_instance","type":"long"},{"name":"data","type":"flags.0?bytes"},{"name":"game_short_name","type":"flags.1?string"}],"type":"Update"},{"id":"1008755359","predicate":"inlineBotSwitchPM","params":[{"name":"text","type":"string"},{"name":"start_param","type":"string"}],"type":"InlineBotSwitchPM"},{"id":"863093588","predicate":"messages.peerDialogs","params":[{"name":"dialogs","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"state","type":"updates.State"}],"type":"messages.PeerDialogs"},{"id":"-305282981","predicate":"topPeer","params":[{"name":"peer","type":"Peer"},{"name":"rating","type":"double"}],"type":"TopPeer"},{"id":"-1419371685","predicate":"topPeerCategoryBotsPM","params":[],"type":"TopPeerCategory"},{"id":"344356834","predicate":"topPeerCategoryBotsInline","params":[],"type":"TopPeerCategory"},{"id":"104314861","predicate":"topPeerCategoryCorrespondents","params":[],"type":"TopPeerCategory"},{"id":"-1122524854","predicate":"topPeerCategoryGroups","params":[],"type":"TopPeerCategory"},{"id":"371037736","predicate":"topPeerCategoryChannels","params":[],"type":"TopPeerCategory"},{"id":"-75283823","predicate":"topPeerCategoryPeers","params":[{"name":"category","type":"TopPeerCategory"},{"name":"count","type":"int"},{"name":"peers","type":"Vector"}],"type":"TopPeerCategoryPeers"},{"id":"-567906571","predicate":"contacts.topPeersNotModified","params":[],"type":"contacts.TopPeers"},{"id":"1891070632","predicate":"contacts.topPeers","params":[{"name":"categories","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.TopPeers"},{"id":"892193368","predicate":"messageEntityMentionName","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"},{"name":"user_id","type":"int"}],"type":"MessageEntity"},{"id":"546203849","predicate":"inputMessageEntityMentionName","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"},{"name":"user_id","type":"InputUser"}],"type":"MessageEntity"},{"id":"975236280","predicate":"inputMessagesFilterChatPhotos","params":[],"type":"MessagesFilter"},{"id":"634833351","predicate":"updateReadChannelOutbox","params":[{"name":"channel_id","type":"int"},{"name":"max_id","type":"int"}],"type":"Update"},{"id":"-299124375","predicate":"updateDraftMessage","params":[{"name":"peer","type":"Peer"},{"name":"draft","type":"DraftMessage"}],"type":"Update"},{"id":"453805082","predicate":"draftMessageEmpty","params":[{"name":"flags","type":"#"},{"name":"date","type":"flags.0?int"}],"type":"DraftMessage"},{"id":"-40996577","predicate":"draftMessage","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"message","type":"string"},{"name":"entities","type":"flags.3?Vector"},{"name":"date","type":"int"}],"type":"DraftMessage"},{"id":"-1615153660","predicate":"messageActionHistoryClear","params":[],"type":"MessageAction"},{"id":"82699215","predicate":"messages.featuredStickersNotModified","params":[],"type":"messages.FeaturedStickers"},{"id":"-123893531","predicate":"messages.featuredStickers","params":[{"name":"hash","type":"int"},{"name":"sets","type":"Vector"},{"name":"unread","type":"Vector"}],"type":"messages.FeaturedStickers"},{"id":"1461528386","predicate":"updateReadFeaturedStickers","params":[],"type":"Update"},{"id":"186120336","predicate":"messages.recentStickersNotModified","params":[],"type":"messages.RecentStickers"},{"id":"586395571","predicate":"messages.recentStickers","params":[{"name":"hash","type":"int"},{"name":"packs","type":"Vector"},{"name":"stickers","type":"Vector"},{"name":"dates","type":"Vector"}],"type":"messages.RecentStickers"},{"id":"-1706939360","predicate":"updateRecentStickers","params":[],"type":"Update"},{"id":"1338747336","predicate":"messages.archivedStickers","params":[{"name":"count","type":"int"},{"name":"sets","type":"Vector"}],"type":"messages.ArchivedStickers"},{"id":"946083368","predicate":"messages.stickerSetInstallResultSuccess","params":[],"type":"messages.StickerSetInstallResult"},{"id":"904138920","predicate":"messages.stickerSetInstallResultArchive","params":[{"name":"sets","type":"Vector"}],"type":"messages.StickerSetInstallResult"},{"id":"1678812626","predicate":"stickerSetCovered","params":[{"name":"set","type":"StickerSet"},{"name":"cover","type":"Document"}],"type":"StickerSetCovered"},{"id":"-1574314746","predicate":"updateConfig","params":[],"type":"Update"},{"id":"861169551","predicate":"updatePtsChanged","params":[],"type":"Update"},{"id":"-440664550","predicate":"inputMediaPhotoExternal","params":[{"name":"flags","type":"#"},{"name":"url","type":"string"},{"name":"ttl_seconds","type":"flags.0?int"}],"type":"InputMedia"},{"id":"-78455655","predicate":"inputMediaDocumentExternal","params":[{"name":"flags","type":"#"},{"name":"url","type":"string"},{"name":"ttl_seconds","type":"flags.0?int"}],"type":"InputMedia"},{"id":"872932635","predicate":"stickerSetMultiCovered","params":[{"name":"set","type":"StickerSet"},{"name":"covers","type":"Vector"}],"type":"StickerSetCovered"},{"id":"-1361650766","predicate":"maskCoords","params":[{"name":"n","type":"int"},{"name":"x","type":"double"},{"name":"y","type":"double"},{"name":"zoom","type":"double"}],"type":"MaskCoords"},{"id":"-1744710921","predicate":"documentAttributeHasStickers","params":[],"type":"DocumentAttribute"},{"id":"1251549527","predicate":"inputStickeredMediaPhoto","params":[{"name":"id","type":"InputPhoto"}],"type":"InputStickeredMedia"},{"id":"70813275","predicate":"inputStickeredMediaDocument","params":[{"name":"id","type":"InputDocument"}],"type":"InputStickeredMedia"},{"id":"-1107729093","predicate":"game","params":[{"name":"flags","type":"#"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"short_name","type":"string"},{"name":"title","type":"string"},{"name":"description","type":"string"},{"name":"photo","type":"Photo"},{"name":"document","type":"flags.0?Document"}],"type":"Game"},{"id":"1336154098","predicate":"inputBotInlineResultGame","params":[{"name":"id","type":"string"},{"name":"short_name","type":"string"},{"name":"send_message","type":"InputBotInlineMessage"}],"type":"InputBotInlineResult"},{"id":"1262639204","predicate":"inputBotInlineMessageGame","params":[{"name":"flags","type":"#"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"-38694904","predicate":"messageMediaGame","params":[{"name":"game","type":"Game"}],"type":"MessageMedia"},{"id":"-750828557","predicate":"inputMediaGame","params":[{"name":"id","type":"InputGame"}],"type":"InputMedia"},{"id":"53231223","predicate":"inputGameID","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputGame"},{"id":"-1020139510","predicate":"inputGameShortName","params":[{"name":"bot_id","type":"InputUser"},{"name":"short_name","type":"string"}],"type":"InputGame"},{"id":"1358175439","predicate":"keyboardButtonGame","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"-1834538890","predicate":"messageActionGameScore","params":[{"name":"game_id","type":"long"},{"name":"score","type":"int"}],"type":"MessageAction"},{"id":"1493171408","predicate":"highScore","params":[{"name":"pos","type":"int"},{"name":"user_id","type":"int"},{"name":"score","type":"int"}],"type":"HighScore"},{"id":"-1707344487","predicate":"messages.highScores","params":[{"name":"scores","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.HighScores"},{"id":"1258196845","predicate":"updates.differenceTooLong","params":[{"name":"pts","type":"int"}],"type":"updates.Difference"},{"id":"1081547008","predicate":"updateChannelWebPage","params":[{"name":"channel_id","type":"int"},{"name":"webpage","type":"WebPage"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-1663561404","predicate":"messages.chatsSlice","params":[{"name":"count","type":"int"},{"name":"chats","type":"Vector"}],"type":"messages.Chats"},{"id":"-599948721","predicate":"textEmpty","params":[],"type":"RichText"},{"id":"1950782688","predicate":"textPlain","params":[{"name":"text","type":"string"}],"type":"RichText"},{"id":"1730456516","predicate":"textBold","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"-653089380","predicate":"textItalic","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"-1054465340","predicate":"textUnderline","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"-1678197867","predicate":"textStrike","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"1816074681","predicate":"textFixed","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"1009288385","predicate":"textUrl","params":[{"name":"text","type":"RichText"},{"name":"url","type":"string"},{"name":"webpage_id","type":"long"}],"type":"RichText"},{"id":"-564523562","predicate":"textEmail","params":[{"name":"text","type":"RichText"},{"name":"email","type":"string"}],"type":"RichText"},{"id":"2120376535","predicate":"textConcat","params":[{"name":"texts","type":"Vector"}],"type":"RichText"},{"id":"324435594","predicate":"pageBlockUnsupported","params":[],"type":"PageBlock"},{"id":"1890305021","predicate":"pageBlockTitle","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-1879401953","predicate":"pageBlockSubtitle","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-1162877472","predicate":"pageBlockAuthorDate","params":[{"name":"author","type":"RichText"},{"name":"published_date","type":"int"}],"type":"PageBlock"},{"id":"-1076861716","predicate":"pageBlockHeader","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-248793375","predicate":"pageBlockSubheader","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"1182402406","predicate":"pageBlockParagraph","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-1066346178","predicate":"pageBlockPreformatted","params":[{"name":"text","type":"RichText"},{"name":"language","type":"string"}],"type":"PageBlock"},{"id":"1216809369","predicate":"pageBlockFooter","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-618614392","predicate":"pageBlockDivider","params":[],"type":"PageBlock"},{"id":"-837994576","predicate":"pageBlockAnchor","params":[{"name":"name","type":"string"}],"type":"PageBlock"},{"id":"-454524911","predicate":"pageBlockList","params":[{"name":"items","type":"Vector"}],"type":"PageBlock"},{"id":"641563686","predicate":"pageBlockBlockquote","params":[{"name":"text","type":"RichText"},{"name":"caption","type":"RichText"}],"type":"PageBlock"},{"id":"1329878739","predicate":"pageBlockPullquote","params":[{"name":"text","type":"RichText"},{"name":"caption","type":"RichText"}],"type":"PageBlock"},{"id":"391759200","predicate":"pageBlockPhoto","params":[{"name":"flags","type":"#"},{"name":"photo_id","type":"long"},{"name":"caption","type":"PageCaption"},{"name":"url","type":"flags.0?string"},{"name":"webpage_id","type":"flags.0?long"}],"type":"PageBlock"},{"id":"2089805750","predicate":"pageBlockVideo","params":[{"name":"flags","type":"#"},{"name":"autoplay","type":"flags.0?true"},{"name":"loop","type":"flags.1?true"},{"name":"video_id","type":"long"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"972174080","predicate":"pageBlockCover","params":[{"name":"cover","type":"PageBlock"}],"type":"PageBlock"},{"id":"-1468953147","predicate":"pageBlockEmbed","params":[{"name":"flags","type":"#"},{"name":"full_width","type":"flags.0?true"},{"name":"allow_scrolling","type":"flags.3?true"},{"name":"url","type":"flags.1?string"},{"name":"html","type":"flags.2?string"},{"name":"poster_photo_id","type":"flags.4?long"},{"name":"w","type":"flags.5?int"},{"name":"h","type":"flags.5?int"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"-229005301","predicate":"pageBlockEmbedPost","params":[{"name":"url","type":"string"},{"name":"webpage_id","type":"long"},{"name":"author_photo_id","type":"long"},{"name":"author","type":"string"},{"name":"date","type":"int"},{"name":"blocks","type":"Vector"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"1705048653","predicate":"pageBlockCollage","params":[{"name":"items","type":"Vector"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"52401552","predicate":"pageBlockSlideshow","params":[{"name":"items","type":"Vector"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"-2054908813","predicate":"webPageNotModified","params":[],"type":"WebPage"},{"id":"-88417185","predicate":"inputPrivacyKeyPhoneCall","params":[],"type":"InputPrivacyKey"},{"id":"1030105979","predicate":"privacyKeyPhoneCall","params":[],"type":"PrivacyKey"},{"id":"-580219064","predicate":"sendMessageGamePlayAction","params":[],"type":"SendMessageAction"},{"id":"-2048646399","predicate":"phoneCallDiscardReasonMissed","params":[],"type":"PhoneCallDiscardReason"},{"id":"-527056480","predicate":"phoneCallDiscardReasonDisconnect","params":[],"type":"PhoneCallDiscardReason"},{"id":"1471006352","predicate":"phoneCallDiscardReasonHangup","params":[],"type":"PhoneCallDiscardReason"},{"id":"-84416311","predicate":"phoneCallDiscardReasonBusy","params":[],"type":"PhoneCallDiscardReason"},{"id":"1852826908","predicate":"updateDialogPinned","params":[{"name":"flags","type":"#"},{"name":"pinned","type":"flags.0?true"},{"name":"folder_id","type":"flags.1?int"},{"name":"peer","type":"DialogPeer"}],"type":"Update"},{"id":"-99664734","predicate":"updatePinnedDialogs","params":[{"name":"flags","type":"#"},{"name":"folder_id","type":"flags.1?int"},{"name":"order","type":"flags.0?Vector"}],"type":"Update"},{"id":"2104790276","predicate":"dataJSON","params":[{"name":"data","type":"string"}],"type":"DataJSON"},{"id":"-2095595325","predicate":"updateBotWebhookJSON","params":[{"name":"data","type":"DataJSON"}],"type":"Update"},{"id":"-1684914010","predicate":"updateBotWebhookJSONQuery","params":[{"name":"query_id","type":"long"},{"name":"data","type":"DataJSON"},{"name":"timeout","type":"int"}],"type":"Update"},{"id":"-886477832","predicate":"labeledPrice","params":[{"name":"label","type":"string"},{"name":"amount","type":"long"}],"type":"LabeledPrice"},{"id":"-1022713000","predicate":"invoice","params":[{"name":"flags","type":"#"},{"name":"test","type":"flags.0?true"},{"name":"name_requested","type":"flags.1?true"},{"name":"phone_requested","type":"flags.2?true"},{"name":"email_requested","type":"flags.3?true"},{"name":"shipping_address_requested","type":"flags.4?true"},{"name":"flexible","type":"flags.5?true"},{"name":"phone_to_provider","type":"flags.6?true"},{"name":"email_to_provider","type":"flags.7?true"},{"name":"currency","type":"string"},{"name":"prices","type":"Vector"}],"type":"Invoice"},{"id":"-186607933","predicate":"inputMediaInvoice","params":[{"name":"flags","type":"#"},{"name":"title","type":"string"},{"name":"description","type":"string"},{"name":"photo","type":"flags.0?InputWebDocument"},{"name":"invoice","type":"Invoice"},{"name":"payload","type":"bytes"},{"name":"provider","type":"string"},{"name":"provider_data","type":"DataJSON"},{"name":"start_param","type":"string"}],"type":"InputMedia"},{"id":"-368917890","predicate":"paymentCharge","params":[{"name":"id","type":"string"},{"name":"provider_charge_id","type":"string"}],"type":"PaymentCharge"},{"id":"-1892568281","predicate":"messageActionPaymentSentMe","params":[{"name":"flags","type":"#"},{"name":"currency","type":"string"},{"name":"total_amount","type":"long"},{"name":"payload","type":"bytes"},{"name":"info","type":"flags.0?PaymentRequestedInfo"},{"name":"shipping_option_id","type":"flags.1?string"},{"name":"charge","type":"PaymentCharge"}],"type":"MessageAction"},{"id":"-2074799289","predicate":"messageMediaInvoice","params":[{"name":"flags","type":"#"},{"name":"shipping_address_requested","type":"flags.1?true"},{"name":"test","type":"flags.3?true"},{"name":"title","type":"string"},{"name":"description","type":"string"},{"name":"photo","type":"flags.0?WebDocument"},{"name":"receipt_msg_id","type":"flags.2?int"},{"name":"currency","type":"string"},{"name":"total_amount","type":"long"},{"name":"start_param","type":"string"}],"type":"MessageMedia"},{"id":"512535275","predicate":"postAddress","params":[{"name":"street_line1","type":"string"},{"name":"street_line2","type":"string"},{"name":"city","type":"string"},{"name":"state","type":"string"},{"name":"country_iso2","type":"string"},{"name":"post_code","type":"string"}],"type":"PostAddress"},{"id":"-1868808300","predicate":"paymentRequestedInfo","params":[{"name":"flags","type":"#"},{"name":"name","type":"flags.0?string"},{"name":"phone","type":"flags.1?string"},{"name":"email","type":"flags.2?string"},{"name":"shipping_address","type":"flags.3?PostAddress"}],"type":"PaymentRequestedInfo"},{"id":"-1344716869","predicate":"keyboardButtonBuy","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"1080663248","predicate":"messageActionPaymentSent","params":[{"name":"currency","type":"string"},{"name":"total_amount","type":"long"}],"type":"MessageAction"},{"id":"-842892769","predicate":"paymentSavedCredentialsCard","params":[{"name":"id","type":"string"},{"name":"title","type":"string"}],"type":"PaymentSavedCredentials"},{"id":"475467473","predicate":"webDocument","params":[{"name":"url","type":"string"},{"name":"access_hash","type":"long"},{"name":"size","type":"int"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"}],"type":"WebDocument"},{"id":"-1678949555","predicate":"inputWebDocument","params":[{"name":"url","type":"string"},{"name":"size","type":"int"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"}],"type":"InputWebDocument"},{"id":"-1036396922","predicate":"inputWebFileLocation","params":[{"name":"url","type":"string"},{"name":"access_hash","type":"long"}],"type":"InputWebFileLocation"},{"id":"568808380","predicate":"upload.webFile","params":[{"name":"size","type":"int"},{"name":"mime_type","type":"string"},{"name":"file_type","type":"storage.FileType"},{"name":"mtime","type":"int"},{"name":"bytes","type":"bytes"}],"type":"upload.WebFile"},{"id":"1062645411","predicate":"payments.paymentForm","params":[{"name":"flags","type":"#"},{"name":"can_save_credentials","type":"flags.2?true"},{"name":"password_missing","type":"flags.3?true"},{"name":"bot_id","type":"int"},{"name":"invoice","type":"Invoice"},{"name":"provider_id","type":"int"},{"name":"url","type":"string"},{"name":"native_provider","type":"flags.4?string"},{"name":"native_params","type":"flags.4?DataJSON"},{"name":"saved_info","type":"flags.0?PaymentRequestedInfo"},{"name":"saved_credentials","type":"flags.1?PaymentSavedCredentials"},{"name":"users","type":"Vector"}],"type":"payments.PaymentForm"},{"id":"-784000893","predicate":"payments.validatedRequestedInfo","params":[{"name":"flags","type":"#"},{"name":"id","type":"flags.0?string"},{"name":"shipping_options","type":"flags.1?Vector"}],"type":"payments.ValidatedRequestedInfo"},{"id":"1314881805","predicate":"payments.paymentResult","params":[{"name":"updates","type":"Updates"}],"type":"payments.PaymentResult"},{"id":"1342771681","predicate":"payments.paymentReceipt","params":[{"name":"flags","type":"#"},{"name":"date","type":"int"},{"name":"bot_id","type":"int"},{"name":"invoice","type":"Invoice"},{"name":"provider_id","type":"int"},{"name":"info","type":"flags.0?PaymentRequestedInfo"},{"name":"shipping","type":"flags.1?ShippingOption"},{"name":"currency","type":"string"},{"name":"total_amount","type":"long"},{"name":"credentials_title","type":"string"},{"name":"users","type":"Vector"}],"type":"payments.PaymentReceipt"},{"id":"-74456004","predicate":"payments.savedInfo","params":[{"name":"flags","type":"#"},{"name":"has_saved_credentials","type":"flags.1?true"},{"name":"saved_info","type":"flags.0?PaymentRequestedInfo"}],"type":"payments.SavedInfo"},{"id":"-1056001329","predicate":"inputPaymentCredentialsSaved","params":[{"name":"id","type":"string"},{"name":"tmp_password","type":"bytes"}],"type":"InputPaymentCredentials"},{"id":"873977640","predicate":"inputPaymentCredentials","params":[{"name":"flags","type":"#"},{"name":"save","type":"flags.0?true"},{"name":"data","type":"DataJSON"}],"type":"InputPaymentCredentials"},{"id":"-614138572","predicate":"account.tmpPassword","params":[{"name":"tmp_password","type":"bytes"},{"name":"valid_until","type":"int"}],"type":"account.TmpPassword"},{"id":"-1239335713","predicate":"shippingOption","params":[{"name":"id","type":"string"},{"name":"title","type":"string"},{"name":"prices","type":"Vector"}],"type":"ShippingOption"},{"id":"-523384512","predicate":"updateBotShippingQuery","params":[{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"payload","type":"bytes"},{"name":"shipping_address","type":"PostAddress"}],"type":"Update"},{"id":"1563376297","predicate":"updateBotPrecheckoutQuery","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"payload","type":"bytes"},{"name":"info","type":"flags.0?PaymentRequestedInfo"},{"name":"shipping_option_id","type":"flags.1?string"},{"name":"currency","type":"string"},{"name":"total_amount","type":"long"}],"type":"Update"},{"id":"-6249322","predicate":"inputStickerSetItem","params":[{"name":"flags","type":"#"},{"name":"document","type":"InputDocument"},{"name":"emoji","type":"string"},{"name":"mask_coords","type":"flags.0?MaskCoords"}],"type":"InputStickerSetItem"},{"id":"-1425052898","predicate":"updatePhoneCall","params":[{"name":"phone_call","type":"PhoneCall"}],"type":"Update"},{"id":"506920429","predicate":"inputPhoneCall","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputPhoneCall"},{"id":"1399245077","predicate":"phoneCallEmpty","params":[{"name":"id","type":"long"}],"type":"PhoneCall"},{"id":"462375633","predicate":"phoneCallWaiting","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"protocol","type":"PhoneCallProtocol"},{"name":"receive_date","type":"flags.0?int"}],"type":"PhoneCall"},{"id":"-2014659757","predicate":"phoneCallRequested","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a_hash","type":"bytes"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"PhoneCall"},{"id":"-1719909046","predicate":"phoneCallAccepted","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_b","type":"bytes"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"PhoneCall"},{"id":"-2025673089","predicate":"phoneCall","params":[{"name":"flags","type":"#"},{"name":"p2p_allowed","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a_or_b","type":"bytes"},{"name":"key_fingerprint","type":"long"},{"name":"protocol","type":"PhoneCallProtocol"},{"name":"connections","type":"Vector"},{"name":"start_date","type":"int"}],"type":"PhoneCall"},{"id":"1355435489","predicate":"phoneCallDiscarded","params":[{"name":"flags","type":"#"},{"name":"need_rating","type":"flags.2?true"},{"name":"need_debug","type":"flags.3?true"},{"name":"video","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"reason","type":"flags.0?PhoneCallDiscardReason"},{"name":"duration","type":"flags.1?int"}],"type":"PhoneCall"},{"id":"-1655957568","predicate":"phoneConnection","params":[{"name":"id","type":"long"},{"name":"ip","type":"string"},{"name":"ipv6","type":"string"},{"name":"port","type":"int"},{"name":"peer_tag","type":"bytes"}],"type":"PhoneConnection"},{"id":"-1564789301","predicate":"phoneCallProtocol","params":[{"name":"flags","type":"#"},{"name":"udp_p2p","type":"flags.0?true"},{"name":"udp_reflector","type":"flags.1?true"},{"name":"min_layer","type":"int"},{"name":"max_layer","type":"int"}],"type":"PhoneCallProtocol"},{"id":"-326966976","predicate":"phone.phoneCall","params":[{"name":"phone_call","type":"PhoneCall"},{"name":"users","type":"Vector"}],"type":"phone.PhoneCall"},{"id":"-2134272152","predicate":"inputMessagesFilterPhoneCalls","params":[{"name":"flags","type":"#"},{"name":"missed","type":"flags.0?true"}],"type":"MessagesFilter"},{"id":"-2132731265","predicate":"messageActionPhoneCall","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.2?true"},{"name":"call_id","type":"long"},{"name":"reason","type":"flags.0?PhoneCallDiscardReason"},{"name":"duration","type":"flags.1?int"}],"type":"MessageAction"},{"id":"2054952868","predicate":"inputMessagesFilterRoundVoice","params":[],"type":"MessagesFilter"},{"id":"-1253451181","predicate":"inputMessagesFilterRoundVideo","params":[],"type":"MessagesFilter"},{"id":"-1997373508","predicate":"sendMessageRecordRoundAction","params":[],"type":"SendMessageAction"},{"id":"608050278","predicate":"sendMessageUploadRoundAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"-242427324","predicate":"upload.fileCdnRedirect","params":[{"name":"dc_id","type":"int"},{"name":"file_token","type":"bytes"},{"name":"encryption_key","type":"bytes"},{"name":"encryption_iv","type":"bytes"},{"name":"file_hashes","type":"Vector"}],"type":"upload.File"},{"id":"-290921362","predicate":"upload.cdnFileReuploadNeeded","params":[{"name":"request_token","type":"bytes"}],"type":"upload.CdnFile"},{"id":"-1449145777","predicate":"upload.cdnFile","params":[{"name":"bytes","type":"bytes"}],"type":"upload.CdnFile"},{"id":"-914167110","predicate":"cdnPublicKey","params":[{"name":"dc_id","type":"int"},{"name":"public_key","type":"string"}],"type":"CdnPublicKey"},{"id":"1462101002","predicate":"cdnConfig","params":[{"name":"public_keys","type":"Vector"}],"type":"CdnConfig"},{"id":"-283684427","predicate":"pageBlockChannel","params":[{"name":"channel","type":"Chat"}],"type":"PageBlock"},{"id":"-892239370","predicate":"langPackString","params":[{"name":"key","type":"string"},{"name":"value","type":"string"}],"type":"LangPackString"},{"id":"1816636575","predicate":"langPackStringPluralized","params":[{"name":"flags","type":"#"},{"name":"key","type":"string"},{"name":"zero_value","type":"flags.0?string"},{"name":"one_value","type":"flags.1?string"},{"name":"two_value","type":"flags.2?string"},{"name":"few_value","type":"flags.3?string"},{"name":"many_value","type":"flags.4?string"},{"name":"other_value","type":"string"}],"type":"LangPackString"},{"id":"695856818","predicate":"langPackStringDeleted","params":[{"name":"key","type":"string"}],"type":"LangPackString"},{"id":"-209337866","predicate":"langPackDifference","params":[{"name":"lang_code","type":"string"},{"name":"from_version","type":"int"},{"name":"version","type":"int"},{"name":"strings","type":"Vector"}],"type":"LangPackDifference"},{"id":"-288727837","predicate":"langPackLanguage","params":[{"name":"flags","type":"#"},{"name":"official","type":"flags.0?true"},{"name":"rtl","type":"flags.2?true"},{"name":"beta","type":"flags.3?true"},{"name":"name","type":"string"},{"name":"native_name","type":"string"},{"name":"lang_code","type":"string"},{"name":"base_lang_code","type":"flags.1?string"},{"name":"plural_code","type":"string"},{"name":"strings_count","type":"int"},{"name":"translated_count","type":"int"},{"name":"translations_url","type":"string"}],"type":"LangPackLanguage"},{"id":"1180041828","predicate":"updateLangPackTooLong","params":[{"name":"lang_code","type":"string"}],"type":"Update"},{"id":"1442983757","predicate":"updateLangPack","params":[{"name":"difference","type":"LangPackDifference"}],"type":"Update"},{"id":"-859915345","predicate":"channelParticipantAdmin","params":[{"name":"flags","type":"#"},{"name":"can_edit","type":"flags.0?true"},{"name":"self","type":"flags.1?true"},{"name":"user_id","type":"int"},{"name":"inviter_id","type":"flags.1?int"},{"name":"promoted_by","type":"int"},{"name":"date","type":"int"},{"name":"admin_rights","type":"ChatAdminRights"},{"name":"rank","type":"flags.2?string"}],"type":"ChannelParticipant"},{"id":"470789295","predicate":"channelParticipantBanned","params":[{"name":"flags","type":"#"},{"name":"left","type":"flags.0?true"},{"name":"user_id","type":"int"},{"name":"kicked_by","type":"int"},{"name":"date","type":"int"},{"name":"banned_rights","type":"ChatBannedRights"}],"type":"ChannelParticipant"},{"id":"338142689","predicate":"channelParticipantsBanned","params":[{"name":"q","type":"string"}],"type":"ChannelParticipantsFilter"},{"id":"106343499","predicate":"channelParticipantsSearch","params":[{"name":"q","type":"string"}],"type":"ChannelParticipantsFilter"},{"id":"-421545947","predicate":"channelAdminLogEventActionChangeTitle","params":[{"name":"prev_value","type":"string"},{"name":"new_value","type":"string"}],"type":"ChannelAdminLogEventAction"},{"id":"1427671598","predicate":"channelAdminLogEventActionChangeAbout","params":[{"name":"prev_value","type":"string"},{"name":"new_value","type":"string"}],"type":"ChannelAdminLogEventAction"},{"id":"1783299128","predicate":"channelAdminLogEventActionChangeUsername","params":[{"name":"prev_value","type":"string"},{"name":"new_value","type":"string"}],"type":"ChannelAdminLogEventAction"},{"id":"1129042607","predicate":"channelAdminLogEventActionChangePhoto","params":[{"name":"prev_photo","type":"Photo"},{"name":"new_photo","type":"Photo"}],"type":"ChannelAdminLogEventAction"},{"id":"460916654","predicate":"channelAdminLogEventActionToggleInvites","params":[{"name":"new_value","type":"Bool"}],"type":"ChannelAdminLogEventAction"},{"id":"648939889","predicate":"channelAdminLogEventActionToggleSignatures","params":[{"name":"new_value","type":"Bool"}],"type":"ChannelAdminLogEventAction"},{"id":"-370660328","predicate":"channelAdminLogEventActionUpdatePinned","params":[{"name":"message","type":"Message"}],"type":"ChannelAdminLogEventAction"},{"id":"1889215493","predicate":"channelAdminLogEventActionEditMessage","params":[{"name":"prev_message","type":"Message"},{"name":"new_message","type":"Message"}],"type":"ChannelAdminLogEventAction"},{"id":"1121994683","predicate":"channelAdminLogEventActionDeleteMessage","params":[{"name":"message","type":"Message"}],"type":"ChannelAdminLogEventAction"},{"id":"405815507","predicate":"channelAdminLogEventActionParticipantJoin","params":[],"type":"ChannelAdminLogEventAction"},{"id":"-124291086","predicate":"channelAdminLogEventActionParticipantLeave","params":[],"type":"ChannelAdminLogEventAction"},{"id":"-484690728","predicate":"channelAdminLogEventActionParticipantInvite","params":[{"name":"participant","type":"ChannelParticipant"}],"type":"ChannelAdminLogEventAction"},{"id":"-422036098","predicate":"channelAdminLogEventActionParticipantToggleBan","params":[{"name":"prev_participant","type":"ChannelParticipant"},{"name":"new_participant","type":"ChannelParticipant"}],"type":"ChannelAdminLogEventAction"},{"id":"-714643696","predicate":"channelAdminLogEventActionParticipantToggleAdmin","params":[{"name":"prev_participant","type":"ChannelParticipant"},{"name":"new_participant","type":"ChannelParticipant"}],"type":"ChannelAdminLogEventAction"},{"id":"995769920","predicate":"channelAdminLogEvent","params":[{"name":"id","type":"long"},{"name":"date","type":"int"},{"name":"user_id","type":"int"},{"name":"action","type":"ChannelAdminLogEventAction"}],"type":"ChannelAdminLogEvent"},{"id":"-309659827","predicate":"channels.adminLogResults","params":[{"name":"events","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"channels.AdminLogResults"},{"id":"-368018716","predicate":"channelAdminLogEventsFilter","params":[{"name":"flags","type":"#"},{"name":"join","type":"flags.0?true"},{"name":"leave","type":"flags.1?true"},{"name":"invite","type":"flags.2?true"},{"name":"ban","type":"flags.3?true"},{"name":"unban","type":"flags.4?true"},{"name":"kick","type":"flags.5?true"},{"name":"unkick","type":"flags.6?true"},{"name":"promote","type":"flags.7?true"},{"name":"demote","type":"flags.8?true"},{"name":"info","type":"flags.9?true"},{"name":"settings","type":"flags.10?true"},{"name":"pinned","type":"flags.11?true"},{"name":"edit","type":"flags.12?true"},{"name":"delete","type":"flags.13?true"}],"type":"ChannelAdminLogEventsFilter"},{"id":"511092620","predicate":"topPeerCategoryPhoneCalls","params":[],"type":"TopPeerCategory"},{"id":"-2143067670","predicate":"pageBlockAudio","params":[{"name":"audio_id","type":"long"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"1558266229","predicate":"popularContact","params":[{"name":"client_id","type":"long"},{"name":"importers","type":"int"}],"type":"PopularContact"},{"id":"1200788123","predicate":"messageActionScreenshotTaken","params":[],"type":"MessageAction"},{"id":"-1634752813","predicate":"messages.favedStickersNotModified","params":[],"type":"messages.FavedStickers"},{"id":"-209768682","predicate":"messages.favedStickers","params":[{"name":"hash","type":"int"},{"name":"packs","type":"Vector"},{"name":"stickers","type":"Vector"}],"type":"messages.FavedStickers"},{"id":"-451831443","predicate":"updateFavedStickers","params":[],"type":"Update"},{"id":"-1987495099","predicate":"updateChannelReadMessagesContents","params":[{"name":"channel_id","type":"int"},{"name":"messages","type":"Vector"}],"type":"Update"},{"id":"-1040652646","predicate":"inputMessagesFilterMyMentions","params":[],"type":"MessagesFilter"},{"id":"1887741886","predicate":"updateContactsReset","params":[],"type":"Update"},{"id":"-1312568665","predicate":"channelAdminLogEventActionChangeStickerSet","params":[{"name":"prev_stickerset","type":"InputStickerSet"},{"name":"new_stickerset","type":"InputStickerSet"}],"type":"ChannelAdminLogEventAction"},{"id":"-85549226","predicate":"messageActionCustomAction","params":[{"name":"message","type":"string"}],"type":"MessageAction"},{"id":"178373535","predicate":"inputPaymentCredentialsApplePay","params":[{"name":"payment_data","type":"DataJSON"}],"type":"InputPaymentCredentials"},{"id":"-905587442","predicate":"inputPaymentCredentialsAndroidPay","params":[{"name":"payment_token","type":"DataJSON"},{"name":"google_transaction_id","type":"string"}],"type":"InputPaymentCredentials"},{"id":"-419271411","predicate":"inputMessagesFilterGeo","params":[],"type":"MessagesFilter"},{"id":"-530392189","predicate":"inputMessagesFilterContacts","params":[],"type":"MessagesFilter"},{"id":"1893427255","predicate":"updateChannelAvailableMessages","params":[{"name":"channel_id","type":"int"},{"name":"available_min_id","type":"int"}],"type":"Update"},{"id":"1599903217","predicate":"channelAdminLogEventActionTogglePreHistoryHidden","params":[{"name":"new_value","type":"Bool"}],"type":"ChannelAdminLogEventAction"},{"id":"-833715459","predicate":"inputMediaGeoLive","params":[{"name":"flags","type":"#"},{"name":"stopped","type":"flags.0?true"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"period","type":"flags.1?int"}],"type":"InputMedia"},{"id":"2084316681","predicate":"messageMediaGeoLive","params":[{"name":"geo","type":"GeoPoint"},{"name":"period","type":"int"}],"type":"MessageMedia"},{"id":"1189204285","predicate":"recentMeUrlUnknown","params":[{"name":"url","type":"string"}],"type":"RecentMeUrl"},{"id":"-1917045962","predicate":"recentMeUrlUser","params":[{"name":"url","type":"string"},{"name":"user_id","type":"int"}],"type":"RecentMeUrl"},{"id":"-1608834311","predicate":"recentMeUrlChat","params":[{"name":"url","type":"string"},{"name":"chat_id","type":"int"}],"type":"RecentMeUrl"},{"id":"-347535331","predicate":"recentMeUrlChatInvite","params":[{"name":"url","type":"string"},{"name":"chat_invite","type":"ChatInvite"}],"type":"RecentMeUrl"},{"id":"-1140172836","predicate":"recentMeUrlStickerSet","params":[{"name":"url","type":"string"},{"name":"set","type":"StickerSetCovered"}],"type":"RecentMeUrl"},{"id":"235081943","predicate":"help.recentMeUrls","params":[{"name":"urls","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"help.RecentMeUrls"},{"id":"-266911767","predicate":"channels.channelParticipantsNotModified","params":[],"type":"channels.ChannelParticipants"},{"id":"1951620897","predicate":"messages.messagesNotModified","params":[{"name":"count","type":"int"}],"type":"messages.Messages"},{"id":"482797855","predicate":"inputSingleMedia","params":[{"name":"flags","type":"#"},{"name":"media","type":"InputMedia"},{"name":"random_id","type":"long"},{"name":"message","type":"string"},{"name":"entities","type":"flags.0?Vector"}],"type":"InputSingleMedia"},{"id":"-892779534","predicate":"webAuthorization","params":[{"name":"hash","type":"long"},{"name":"bot_id","type":"int"},{"name":"domain","type":"string"},{"name":"browser","type":"string"},{"name":"platform","type":"string"},{"name":"date_created","type":"int"},{"name":"date_active","type":"int"},{"name":"ip","type":"string"},{"name":"region","type":"string"}],"type":"WebAuthorization"},{"id":"-313079300","predicate":"account.webAuthorizations","params":[{"name":"authorizations","type":"Vector"},{"name":"users","type":"Vector"}],"type":"account.WebAuthorizations"},{"id":"-1502174430","predicate":"inputMessageID","params":[{"name":"id","type":"int"}],"type":"InputMessage"},{"id":"-1160215659","predicate":"inputMessageReplyTo","params":[{"name":"id","type":"int"}],"type":"InputMessage"},{"id":"-2037963464","predicate":"inputMessagePinned","params":[],"type":"InputMessage"},{"id":"-1687559349","predicate":"messageEntityPhone","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1280209983","predicate":"messageEntityCashtag","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-1410748418","predicate":"messageActionBotAllowed","params":[{"name":"domain","type":"string"}],"type":"MessageAction"},{"id":"-55902537","predicate":"inputDialogPeer","params":[{"name":"peer","type":"InputPeer"}],"type":"InputDialogPeer"},{"id":"-445792507","predicate":"dialogPeer","params":[{"name":"peer","type":"Peer"}],"type":"DialogPeer"},{"id":"223655517","predicate":"messages.foundStickerSetsNotModified","params":[],"type":"messages.FoundStickerSets"},{"id":"1359533640","predicate":"messages.foundStickerSets","params":[{"name":"hash","type":"int"},{"name":"sets","type":"Vector"}],"type":"messages.FoundStickerSets"},{"id":"1648543603","predicate":"fileHash","params":[{"name":"offset","type":"int"},{"name":"limit","type":"int"},{"name":"hash","type":"bytes"}],"type":"FileHash"},{"id":"-104284986","predicate":"webDocumentNoProxy","params":[{"name":"url","type":"string"},{"name":"size","type":"int"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"}],"type":"WebDocument"},{"id":"1968737087","predicate":"inputClientProxy","params":[{"name":"address","type":"string"},{"name":"port","type":"int"}],"type":"InputClientProxy"},{"id":"-526508104","predicate":"help.proxyDataEmpty","params":[{"name":"expires","type":"int"}],"type":"help.ProxyData"},{"id":"737668643","predicate":"help.proxyDataPromo","params":[{"name":"expires","type":"int"},{"name":"peer","type":"Peer"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"help.ProxyData"},{"id":"-483352705","predicate":"help.termsOfServiceUpdateEmpty","params":[{"name":"expires","type":"int"}],"type":"help.TermsOfServiceUpdate"},{"id":"686618977","predicate":"help.termsOfServiceUpdate","params":[{"name":"expires","type":"int"},{"name":"terms_of_service","type":"help.TermsOfService"}],"type":"help.TermsOfServiceUpdate"},{"id":"859091184","predicate":"inputSecureFileUploaded","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"md5_checksum","type":"string"},{"name":"file_hash","type":"bytes"},{"name":"secret","type":"bytes"}],"type":"InputSecureFile"},{"id":"1399317950","predicate":"inputSecureFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputSecureFile"},{"id":"-876089816","predicate":"inputSecureFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"1679398724","predicate":"secureFileEmpty","params":[],"type":"SecureFile"},{"id":"-534283678","predicate":"secureFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"size","type":"int"},{"name":"dc_id","type":"int"},{"name":"date","type":"int"},{"name":"file_hash","type":"bytes"},{"name":"secret","type":"bytes"}],"type":"SecureFile"},{"id":"-1964327229","predicate":"secureData","params":[{"name":"data","type":"bytes"},{"name":"data_hash","type":"bytes"},{"name":"secret","type":"bytes"}],"type":"SecureData"},{"id":"2103482845","predicate":"securePlainPhone","params":[{"name":"phone","type":"string"}],"type":"SecurePlainData"},{"id":"569137759","predicate":"securePlainEmail","params":[{"name":"email","type":"string"}],"type":"SecurePlainData"},{"id":"-1658158621","predicate":"secureValueTypePersonalDetails","params":[],"type":"SecureValueType"},{"id":"1034709504","predicate":"secureValueTypePassport","params":[],"type":"SecureValueType"},{"id":"115615172","predicate":"secureValueTypeDriverLicense","params":[],"type":"SecureValueType"},{"id":"-1596951477","predicate":"secureValueTypeIdentityCard","params":[],"type":"SecureValueType"},{"id":"-1717268701","predicate":"secureValueTypeInternalPassport","params":[],"type":"SecureValueType"},{"id":"-874308058","predicate":"secureValueTypeAddress","params":[],"type":"SecureValueType"},{"id":"-63531698","predicate":"secureValueTypeUtilityBill","params":[],"type":"SecureValueType"},{"id":"-1995211763","predicate":"secureValueTypeBankStatement","params":[],"type":"SecureValueType"},{"id":"-1954007928","predicate":"secureValueTypeRentalAgreement","params":[],"type":"SecureValueType"},{"id":"-1713143702","predicate":"secureValueTypePassportRegistration","params":[],"type":"SecureValueType"},{"id":"-368907213","predicate":"secureValueTypeTemporaryRegistration","params":[],"type":"SecureValueType"},{"id":"-1289704741","predicate":"secureValueTypePhone","params":[],"type":"SecureValueType"},{"id":"-1908627474","predicate":"secureValueTypeEmail","params":[],"type":"SecureValueType"},{"id":"411017418","predicate":"secureValue","params":[{"name":"flags","type":"#"},{"name":"type","type":"SecureValueType"},{"name":"data","type":"flags.0?SecureData"},{"name":"front_side","type":"flags.1?SecureFile"},{"name":"reverse_side","type":"flags.2?SecureFile"},{"name":"selfie","type":"flags.3?SecureFile"},{"name":"translation","type":"flags.6?Vector"},{"name":"files","type":"flags.4?Vector"},{"name":"plain_data","type":"flags.5?SecurePlainData"},{"name":"hash","type":"bytes"}],"type":"SecureValue"},{"id":"-618540889","predicate":"inputSecureValue","params":[{"name":"flags","type":"#"},{"name":"type","type":"SecureValueType"},{"name":"data","type":"flags.0?SecureData"},{"name":"front_side","type":"flags.1?InputSecureFile"},{"name":"reverse_side","type":"flags.2?InputSecureFile"},{"name":"selfie","type":"flags.3?InputSecureFile"},{"name":"translation","type":"flags.6?Vector"},{"name":"files","type":"flags.4?Vector"},{"name":"plain_data","type":"flags.5?SecurePlainData"}],"type":"InputSecureValue"},{"id":"-316748368","predicate":"secureValueHash","params":[{"name":"type","type":"SecureValueType"},{"name":"hash","type":"bytes"}],"type":"SecureValueHash"},{"id":"-391902247","predicate":"secureValueErrorData","params":[{"name":"type","type":"SecureValueType"},{"name":"data_hash","type":"bytes"},{"name":"field","type":"string"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"12467706","predicate":"secureValueErrorFrontSide","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"-2037765467","predicate":"secureValueErrorReverseSide","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"-449327402","predicate":"secureValueErrorSelfie","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"2054162547","predicate":"secureValueErrorFile","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"1717706985","predicate":"secureValueErrorFiles","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"Vector"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"871426631","predicate":"secureCredentialsEncrypted","params":[{"name":"data","type":"bytes"},{"name":"hash","type":"bytes"},{"name":"secret","type":"bytes"}],"type":"SecureCredentialsEncrypted"},{"id":"-1389486888","predicate":"account.authorizationForm","params":[{"name":"flags","type":"#"},{"name":"required_types","type":"Vector"},{"name":"values","type":"Vector"},{"name":"errors","type":"Vector"},{"name":"users","type":"Vector"},{"name":"privacy_policy_url","type":"flags.0?string"}],"type":"account.AuthorizationForm"},{"id":"-2128640689","predicate":"account.sentEmailCode","params":[{"name":"email_pattern","type":"string"},{"name":"length","type":"int"}],"type":"account.SentEmailCode"},{"id":"455635795","predicate":"messageActionSecureValuesSentMe","params":[{"name":"values","type":"Vector"},{"name":"credentials","type":"SecureCredentialsEncrypted"}],"type":"MessageAction"},{"id":"-648257196","predicate":"messageActionSecureValuesSent","params":[{"name":"types","type":"Vector"}],"type":"MessageAction"},{"id":"1722786150","predicate":"help.deepLinkInfoEmpty","params":[],"type":"help.DeepLinkInfo"},{"id":"1783556146","predicate":"help.deepLinkInfo","params":[{"name":"flags","type":"#"},{"name":"update_app","type":"flags.0?true"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"}],"type":"help.DeepLinkInfo"},{"id":"289586518","predicate":"savedPhoneContact","params":[{"name":"phone","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"date","type":"int"}],"type":"SavedContact"},{"id":"1304052993","predicate":"account.takeout","params":[{"name":"id","type":"long"}],"type":"account.Takeout"},{"id":"700340377","predicate":"inputTakeoutFileLocation","params":[],"type":"InputFileLocation"},{"id":"-513517117","predicate":"updateDialogUnreadMark","params":[{"name":"flags","type":"#"},{"name":"unread","type":"flags.0?true"},{"name":"peer","type":"DialogPeer"}],"type":"Update"},{"id":"-253500010","predicate":"messages.dialogsNotModified","params":[{"name":"count","type":"int"}],"type":"messages.Dialogs"},{"id":"-1625153079","predicate":"inputWebFileGeoPointLocation","params":[{"name":"geo_point","type":"InputGeoPoint"},{"name":"access_hash","type":"long"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"zoom","type":"int"},{"name":"scale","type":"int"}],"type":"InputWebFileLocation"},{"id":"-1255369827","predicate":"contacts.topPeersDisabled","params":[],"type":"contacts.TopPeers"},{"id":"-1685456582","predicate":"inputReportReasonCopyright","params":[],"type":"ReportReason"},{"id":"-732254058","predicate":"passwordKdfAlgoUnknown","params":[],"type":"PasswordKdfAlgo"},{"id":"4883767","predicate":"securePasswordKdfAlgoUnknown","params":[],"type":"SecurePasswordKdfAlgo"},{"id":"-1141711456","predicate":"securePasswordKdfAlgoPBKDF2HMACSHA512iter100000","params":[{"name":"salt","type":"bytes"}],"type":"SecurePasswordKdfAlgo"},{"id":"-2042159726","predicate":"securePasswordKdfAlgoSHA512","params":[{"name":"salt","type":"bytes"}],"type":"SecurePasswordKdfAlgo"},{"id":"354925740","predicate":"secureSecretSettings","params":[{"name":"secure_algo","type":"SecurePasswordKdfAlgo"},{"name":"secure_secret","type":"bytes"},{"name":"secure_secret_id","type":"long"}],"type":"SecureSecretSettings"},{"id":"982592842","predicate":"passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow","params":[{"name":"salt1","type":"bytes"},{"name":"salt2","type":"bytes"},{"name":"g","type":"int"},{"name":"p","type":"bytes"}],"type":"PasswordKdfAlgo"},{"id":"-1736378792","predicate":"inputCheckPasswordEmpty","params":[],"type":"InputCheckPasswordSRP"},{"id":"-763367294","predicate":"inputCheckPasswordSRP","params":[{"name":"srp_id","type":"long"},{"name":"A","type":"bytes"},{"name":"M1","type":"bytes"}],"type":"InputCheckPasswordSRP"},{"id":"-2036501105","predicate":"secureValueError","params":[{"name":"type","type":"SecureValueType"},{"name":"hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"-1592506512","predicate":"secureValueErrorTranslationFile","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"878931416","predicate":"secureValueErrorTranslationFiles","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"Vector"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"-2103600678","predicate":"secureRequiredType","params":[{"name":"flags","type":"#"},{"name":"native_names","type":"flags.0?true"},{"name":"selfie_required","type":"flags.1?true"},{"name":"translation_required","type":"flags.2?true"},{"name":"type","type":"SecureValueType"}],"type":"SecureRequiredType"},{"id":"41187252","predicate":"secureRequiredTypeOneOf","params":[{"name":"types","type":"Vector"}],"type":"SecureRequiredType"},{"id":"-1078332329","predicate":"help.passportConfigNotModified","params":[],"type":"help.PassportConfig"},{"id":"-1600596305","predicate":"help.passportConfig","params":[{"name":"hash","type":"int"},{"name":"countries_langs","type":"DataJSON"}],"type":"help.PassportConfig"},{"id":"488313413","predicate":"inputAppEvent","params":[{"name":"time","type":"double"},{"name":"type","type":"string"},{"name":"peer","type":"long"},{"name":"data","type":"JSONValue"}],"type":"InputAppEvent"},{"id":"-1059185703","predicate":"jsonObjectValue","params":[{"name":"key","type":"string"},{"name":"value","type":"JSONValue"}],"type":"JSONObjectValue"},{"id":"1064139624","predicate":"jsonNull","params":[],"type":"JSONValue"},{"id":"-952869270","predicate":"jsonBool","params":[{"name":"value","type":"Bool"}],"type":"JSONValue"},{"id":"736157604","predicate":"jsonNumber","params":[{"name":"value","type":"double"}],"type":"JSONValue"},{"id":"-1222740358","predicate":"jsonString","params":[{"name":"value","type":"string"}],"type":"JSONValue"},{"id":"-146520221","predicate":"jsonArray","params":[{"name":"value","type":"Vector"}],"type":"JSONValue"},{"id":"-1715350371","predicate":"jsonObject","params":[{"name":"value","type":"Vector"}],"type":"JSONValue"},{"id":"1279515160","predicate":"updateUserPinnedMessage","params":[{"name":"user_id","type":"int"},{"name":"id","type":"int"}],"type":"Update"},{"id":"-519195831","predicate":"updateChatPinnedMessage","params":[{"name":"chat_id","type":"int"},{"name":"id","type":"int"},{"name":"version","type":"int"}],"type":"Update"},{"id":"-1311015810","predicate":"inputNotifyBroadcasts","params":[],"type":"InputNotifyPeer"},{"id":"-703403793","predicate":"notifyBroadcasts","params":[],"type":"NotifyPeer"},{"id":"-311786236","predicate":"textSubscript","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"-939827711","predicate":"textSuperscript","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"55281185","predicate":"textMarked","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"483104362","predicate":"textPhone","params":[{"name":"text","type":"RichText"},{"name":"phone","type":"string"}],"type":"RichText"},{"id":"136105807","predicate":"textImage","params":[{"name":"document_id","type":"long"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"RichText"},{"id":"504660880","predicate":"pageBlockKicker","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"878078826","predicate":"pageTableCell","params":[{"name":"flags","type":"#"},{"name":"header","type":"flags.0?true"},{"name":"align_center","type":"flags.3?true"},{"name":"align_right","type":"flags.4?true"},{"name":"valign_middle","type":"flags.5?true"},{"name":"valign_bottom","type":"flags.6?true"},{"name":"text","type":"flags.7?RichText"},{"name":"colspan","type":"flags.1?int"},{"name":"rowspan","type":"flags.2?int"}],"type":"PageTableCell"},{"id":"-524237339","predicate":"pageTableRow","params":[{"name":"cells","type":"Vector"}],"type":"PageTableRow"},{"id":"-1085412734","predicate":"pageBlockTable","params":[{"name":"flags","type":"#"},{"name":"bordered","type":"flags.0?true"},{"name":"striped","type":"flags.1?true"},{"name":"title","type":"RichText"},{"name":"rows","type":"Vector"}],"type":"PageBlock"},{"id":"1869903447","predicate":"pageCaption","params":[{"name":"text","type":"RichText"},{"name":"credit","type":"RichText"}],"type":"PageCaption"},{"id":"-1188055347","predicate":"pageListItemText","params":[{"name":"text","type":"RichText"}],"type":"PageListItem"},{"id":"635466748","predicate":"pageListItemBlocks","params":[{"name":"blocks","type":"Vector"}],"type":"PageListItem"},{"id":"1577484359","predicate":"pageListOrderedItemText","params":[{"name":"num","type":"string"},{"name":"text","type":"RichText"}],"type":"PageListOrderedItem"},{"id":"-1730311882","predicate":"pageListOrderedItemBlocks","params":[{"name":"num","type":"string"},{"name":"blocks","type":"Vector"}],"type":"PageListOrderedItem"},{"id":"-1702174239","predicate":"pageBlockOrderedList","params":[{"name":"items","type":"Vector"}],"type":"PageBlock"},{"id":"1987480557","predicate":"pageBlockDetails","params":[{"name":"flags","type":"#"},{"name":"open","type":"flags.0?true"},{"name":"blocks","type":"Vector"},{"name":"title","type":"RichText"}],"type":"PageBlock"},{"id":"-1282352120","predicate":"pageRelatedArticle","params":[{"name":"flags","type":"#"},{"name":"url","type":"string"},{"name":"webpage_id","type":"long"},{"name":"title","type":"flags.0?string"},{"name":"description","type":"flags.1?string"},{"name":"photo_id","type":"flags.2?long"},{"name":"author","type":"flags.3?string"},{"name":"published_date","type":"flags.4?int"}],"type":"PageRelatedArticle"},{"id":"370236054","predicate":"pageBlockRelatedArticles","params":[{"name":"title","type":"RichText"},{"name":"articles","type":"Vector"}],"type":"PageBlock"},{"id":"-1538310410","predicate":"pageBlockMap","params":[{"name":"geo","type":"GeoPoint"},{"name":"zoom","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"-1366746132","predicate":"page","params":[{"name":"flags","type":"#"},{"name":"part","type":"flags.0?true"},{"name":"rtl","type":"flags.1?true"},{"name":"v2","type":"flags.2?true"},{"name":"url","type":"string"},{"name":"blocks","type":"Vector"},{"name":"photos","type":"Vector"},{"name":"documents","type":"Vector"}],"type":"Page"},{"id":"-610373422","predicate":"inputPrivacyKeyPhoneP2P","params":[],"type":"InputPrivacyKey"},{"id":"961092808","predicate":"privacyKeyPhoneP2P","params":[],"type":"PrivacyKey"},{"id":"894777186","predicate":"textAnchor","params":[{"name":"text","type":"RichText"},{"name":"name","type":"string"}],"type":"RichText"},{"id":"-1945767479","predicate":"help.supportName","params":[{"name":"name","type":"string"}],"type":"help.SupportName"},{"id":"-206688531","predicate":"help.userInfoEmpty","params":[],"type":"help.UserInfo"},{"id":"32192344","predicate":"help.userInfo","params":[{"name":"message","type":"string"},{"name":"entities","type":"Vector"},{"name":"author","type":"string"},{"name":"date","type":"int"}],"type":"help.UserInfo"},{"id":"-202219658","predicate":"messageActionContactSignUp","params":[],"type":"MessageAction"},{"id":"-1398708869","predicate":"updateMessagePoll","params":[{"name":"flags","type":"#"},{"name":"poll_id","type":"long"},{"name":"poll","type":"flags.0?Poll"},{"name":"results","type":"PollResults"}],"type":"Update"},{"id":"1823064809","predicate":"pollAnswer","params":[{"name":"text","type":"string"},{"name":"option","type":"bytes"}],"type":"PollAnswer"},{"id":"-716006138","predicate":"poll","params":[{"name":"id","type":"long"},{"name":"flags","type":"#"},{"name":"closed","type":"flags.0?true"},{"name":"public_voters","type":"flags.1?true"},{"name":"multiple_choice","type":"flags.2?true"},{"name":"quiz","type":"flags.3?true"},{"name":"question","type":"string"},{"name":"answers","type":"Vector"}],"type":"Poll"},{"id":"997055186","predicate":"pollAnswerVoters","params":[{"name":"flags","type":"#"},{"name":"chosen","type":"flags.0?true"},{"name":"correct","type":"flags.1?true"},{"name":"option","type":"bytes"},{"name":"voters","type":"int"}],"type":"PollAnswerVoters"},{"id":"1465219162","predicate":"pollResults","params":[{"name":"flags","type":"#"},{"name":"min","type":"flags.0?true"},{"name":"results","type":"flags.1?Vector"},{"name":"total_voters","type":"flags.2?int"}],"type":"PollResults"},{"id":"112424539","predicate":"inputMediaPoll","params":[{"name":"poll","type":"Poll"}],"type":"InputMedia"},{"id":"1272375192","predicate":"messageMediaPoll","params":[{"name":"poll","type":"Poll"},{"name":"results","type":"PollResults"}],"type":"MessageMedia"},{"id":"-264117680","predicate":"chatOnlines","params":[{"name":"onlines","type":"int"}],"type":"ChatOnlines"},{"id":"1202287072","predicate":"statsURL","params":[{"name":"url","type":"string"}],"type":"StatsURL"},{"id":"-525288402","predicate":"photoStrippedSize","params":[{"name":"type","type":"string"},{"name":"bytes","type":"bytes"}],"type":"PhotoSize"},{"id":"1605510357","predicate":"chatAdminRights","params":[{"name":"flags","type":"#"},{"name":"change_info","type":"flags.0?true"},{"name":"post_messages","type":"flags.1?true"},{"name":"edit_messages","type":"flags.2?true"},{"name":"delete_messages","type":"flags.3?true"},{"name":"ban_users","type":"flags.4?true"},{"name":"invite_users","type":"flags.5?true"},{"name":"pin_messages","type":"flags.7?true"},{"name":"add_admins","type":"flags.9?true"}],"type":"ChatAdminRights"},{"id":"-1626209256","predicate":"chatBannedRights","params":[{"name":"flags","type":"#"},{"name":"view_messages","type":"flags.0?true"},{"name":"send_messages","type":"flags.1?true"},{"name":"send_media","type":"flags.2?true"},{"name":"send_stickers","type":"flags.3?true"},{"name":"send_gifs","type":"flags.4?true"},{"name":"send_games","type":"flags.5?true"},{"name":"send_inline","type":"flags.6?true"},{"name":"embed_links","type":"flags.7?true"},{"name":"send_polls","type":"flags.8?true"},{"name":"change_info","type":"flags.10?true"},{"name":"invite_users","type":"flags.15?true"},{"name":"pin_messages","type":"flags.17?true"},{"name":"until_date","type":"int"}],"type":"ChatBannedRights"},{"id":"1421875280","predicate":"updateChatDefaultBannedRights","params":[{"name":"peer","type":"Peer"},{"name":"default_banned_rights","type":"ChatBannedRights"},{"name":"version","type":"int"}],"type":"Update"},{"id":"-433014407","predicate":"inputWallPaper","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputWallPaper"},{"id":"1913199744","predicate":"inputWallPaperSlug","params":[{"name":"slug","type":"string"}],"type":"InputWallPaper"},{"id":"-1150621555","predicate":"channelParticipantsContacts","params":[{"name":"q","type":"string"}],"type":"ChannelParticipantsFilter"},{"id":"771095562","predicate":"channelAdminLogEventActionDefaultBannedRights","params":[{"name":"prev_banned_rights","type":"ChatBannedRights"},{"name":"new_banned_rights","type":"ChatBannedRights"}],"type":"ChannelAdminLogEventAction"},{"id":"-1895328189","predicate":"channelAdminLogEventActionStopPoll","params":[{"name":"message","type":"Message"}],"type":"ChannelAdminLogEventAction"},{"id":"471437699","predicate":"account.wallPapersNotModified","params":[],"type":"account.WallPapers"},{"id":"1881892265","predicate":"account.wallPapers","params":[{"name":"hash","type":"int"},{"name":"wallpapers","type":"Vector"}],"type":"account.WallPapers"},{"id":"-557924733","predicate":"codeSettings","params":[{"name":"flags","type":"#"},{"name":"allow_flashcall","type":"flags.0?true"},{"name":"current_number","type":"flags.1?true"},{"name":"allow_app_hash","type":"flags.4?true"}],"type":"CodeSettings"},{"id":"84438264","predicate":"wallPaperSettings","params":[{"name":"flags","type":"#"},{"name":"blur","type":"flags.1?true"},{"name":"motion","type":"flags.2?true"},{"name":"background_color","type":"flags.0?int"},{"name":"second_background_color","type":"flags.4?int"},{"name":"intensity","type":"flags.3?int"},{"name":"rotation","type":"flags.4?int"}],"type":"WallPaperSettings"},{"id":"-532532493","predicate":"autoDownloadSettings","params":[{"name":"flags","type":"#"},{"name":"disabled","type":"flags.0?true"},{"name":"video_preload_large","type":"flags.1?true"},{"name":"audio_preload_next","type":"flags.2?true"},{"name":"phonecalls_less_data","type":"flags.3?true"},{"name":"photo_size_max","type":"int"},{"name":"video_size_max","type":"int"},{"name":"file_size_max","type":"int"},{"name":"video_upload_maxbitrate","type":"int"}],"type":"AutoDownloadSettings"},{"id":"1674235686","predicate":"account.autoDownloadSettings","params":[{"name":"low","type":"AutoDownloadSettings"},{"name":"medium","type":"AutoDownloadSettings"},{"name":"high","type":"AutoDownloadSettings"}],"type":"account.AutoDownloadSettings"},{"id":"-709641735","predicate":"emojiKeyword","params":[{"name":"keyword","type":"string"},{"name":"emoticons","type":"Vector"}],"type":"EmojiKeyword"},{"id":"594408994","predicate":"emojiKeywordDeleted","params":[{"name":"keyword","type":"string"},{"name":"emoticons","type":"Vector"}],"type":"EmojiKeyword"},{"id":"1556570557","predicate":"emojiKeywordsDifference","params":[{"name":"lang_code","type":"string"},{"name":"from_version","type":"int"},{"name":"version","type":"int"},{"name":"keywords","type":"Vector"}],"type":"EmojiKeywordsDifference"},{"id":"-1519029347","predicate":"emojiURL","params":[{"name":"url","type":"string"}],"type":"EmojiURL"},{"id":"-1275374751","predicate":"emojiLanguage","params":[{"name":"lang_code","type":"string"}],"type":"EmojiLanguage"},{"id":"-1529000952","predicate":"inputPrivacyKeyForwards","params":[],"type":"InputPrivacyKey"},{"id":"1777096355","predicate":"privacyKeyForwards","params":[],"type":"PrivacyKey"},{"id":"1461304012","predicate":"inputPrivacyKeyProfilePhoto","params":[],"type":"InputPrivacyKey"},{"id":"-1777000467","predicate":"privacyKeyProfilePhoto","params":[],"type":"PrivacyKey"},{"id":"-1132476723","predicate":"fileLocationToBeDeprecated","params":[{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"}],"type":"FileLocation"},{"id":"1075322878","predicate":"inputPhotoFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"thumb_size","type":"string"}],"type":"InputFileLocation"},{"id":"-667654413","predicate":"inputPhotoLegacyFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"}],"type":"InputFileLocation"},{"id":"668375447","predicate":"inputPeerPhotoFileLocation","params":[{"name":"flags","type":"#"},{"name":"big","type":"flags.0?true"},{"name":"peer","type":"InputPeer"},{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"}],"type":"InputFileLocation"},{"id":"230353641","predicate":"inputStickerSetThumb","params":[{"name":"stickerset","type":"InputStickerSet"},{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"}],"type":"InputFileLocation"},{"id":"-11252123","predicate":"folder","params":[{"name":"flags","type":"#"},{"name":"autofill_new_broadcasts","type":"flags.0?true"},{"name":"autofill_public_groups","type":"flags.1?true"},{"name":"autofill_new_correspondents","type":"flags.2?true"},{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"photo","type":"flags.3?ChatPhoto"}],"type":"Folder"},{"id":"1908216652","predicate":"dialogFolder","params":[{"name":"flags","type":"#"},{"name":"pinned","type":"flags.2?true"},{"name":"folder","type":"Folder"},{"name":"peer","type":"Peer"},{"name":"top_message","type":"int"},{"name":"unread_muted_peers_count","type":"int"},{"name":"unread_unmuted_peers_count","type":"int"},{"name":"unread_muted_messages_count","type":"int"},{"name":"unread_unmuted_messages_count","type":"int"}],"type":"Dialog"},{"id":"1684014375","predicate":"inputDialogPeerFolder","params":[{"name":"folder_id","type":"int"}],"type":"InputDialogPeer"},{"id":"1363483106","predicate":"dialogPeerFolder","params":[{"name":"folder_id","type":"int"}],"type":"DialogPeer"},{"id":"-70073706","predicate":"inputFolderPeer","params":[{"name":"peer","type":"InputPeer"},{"name":"folder_id","type":"int"}],"type":"InputFolderPeer"},{"id":"-373643672","predicate":"folderPeer","params":[{"name":"peer","type":"Peer"},{"name":"folder_id","type":"int"}],"type":"FolderPeer"},{"id":"422972864","predicate":"updateFolderPeers","params":[{"name":"folder_peers","type":"Vector"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"756118935","predicate":"inputUserFromMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"user_id","type":"int"}],"type":"InputUser"},{"id":"707290417","predicate":"inputChannelFromMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"channel_id","type":"int"}],"type":"InputChannel"},{"id":"398123750","predicate":"inputPeerUserFromMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"user_id","type":"int"}],"type":"InputPeer"},{"id":"-1667893317","predicate":"inputPeerChannelFromMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"channel_id","type":"int"}],"type":"InputPeer"},{"id":"55761658","predicate":"inputPrivacyKeyPhoneNumber","params":[],"type":"InputPrivacyKey"},{"id":"-778378131","predicate":"privacyKeyPhoneNumber","params":[],"type":"PrivacyKey"},{"id":"-1472172887","predicate":"topPeerCategoryForwardUsers","params":[],"type":"TopPeerCategory"},{"id":"-68239120","predicate":"topPeerCategoryForwardChats","params":[],"type":"TopPeerCategory"},{"id":"-1569748965","predicate":"channelAdminLogEventActionChangeLinkedChat","params":[{"name":"prev_value","type":"int"},{"name":"new_value","type":"int"}],"type":"ChannelAdminLogEventAction"},{"id":"-398136321","predicate":"messages.searchCounter","params":[{"name":"flags","type":"#"},{"name":"inexact","type":"flags.1?true"},{"name":"filter","type":"MessagesFilter"},{"name":"count","type":"int"}],"type":"messages.SearchCounter"},{"id":"280464681","predicate":"keyboardButtonUrlAuth","params":[{"name":"flags","type":"#"},{"name":"text","type":"string"},{"name":"fwd_text","type":"flags.0?string"},{"name":"url","type":"string"},{"name":"button_id","type":"int"}],"type":"KeyboardButton"},{"id":"-802258988","predicate":"inputKeyboardButtonUrlAuth","params":[{"name":"flags","type":"#"},{"name":"request_write_access","type":"flags.0?true"},{"name":"text","type":"string"},{"name":"fwd_text","type":"flags.1?string"},{"name":"url","type":"string"},{"name":"bot","type":"InputUser"}],"type":"KeyboardButton"},{"id":"-1831650802","predicate":"urlAuthResultRequest","params":[{"name":"flags","type":"#"},{"name":"request_write_access","type":"flags.0?true"},{"name":"bot","type":"User"},{"name":"domain","type":"string"}],"type":"UrlAuthResult"},{"id":"-1886646706","predicate":"urlAuthResultAccepted","params":[{"name":"url","type":"string"}],"type":"UrlAuthResult"},{"id":"-1445536993","predicate":"urlAuthResultDefault","params":[],"type":"UrlAuthResult"},{"id":"1283572154","predicate":"inputPrivacyValueAllowChatParticipants","params":[{"name":"chats","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"-668769361","predicate":"inputPrivacyValueDisallowChatParticipants","params":[{"name":"chats","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"415136107","predicate":"privacyValueAllowChatParticipants","params":[{"name":"chats","type":"Vector"}],"type":"PrivacyRule"},{"id":"-1397881200","predicate":"privacyValueDisallowChatParticipants","params":[{"name":"chats","type":"Vector"}],"type":"PrivacyRule"},{"id":"-1672577397","predicate":"messageEntityUnderline","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-1090087980","predicate":"messageEntityStrike","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"34469328","predicate":"messageEntityBlockquote","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1786671974","predicate":"updatePeerSettings","params":[{"name":"peer","type":"Peer"},{"name":"settings","type":"PeerSettings"}],"type":"Update"},{"id":"-1078612597","predicate":"channelLocationEmpty","params":[],"type":"ChannelLocation"},{"id":"547062491","predicate":"channelLocation","params":[{"name":"geo_point","type":"GeoPoint"},{"name":"address","type":"string"}],"type":"ChannelLocation"},{"id":"-901375139","predicate":"peerLocated","params":[{"name":"peer","type":"Peer"},{"name":"expires","type":"int"},{"name":"distance","type":"int"}],"type":"PeerLocated"},{"id":"-1263546448","predicate":"updatePeerLocated","params":[{"name":"peers","type":"Vector"}],"type":"Update"},{"id":"241923758","predicate":"channelAdminLogEventActionChangeLocation","params":[{"name":"prev_value","type":"ChannelLocation"},{"name":"new_value","type":"ChannelLocation"}],"type":"ChannelAdminLogEventAction"},{"id":"-606798099","predicate":"inputReportReasonGeoIrrelevant","params":[],"type":"ReportReason"},{"id":"1401984889","predicate":"channelAdminLogEventActionToggleSlowMode","params":[{"name":"prev_value","type":"int"},{"name":"new_value","type":"int"}],"type":"ChannelAdminLogEventAction"},{"id":"1148485274","predicate":"auth.authorizationSignUpRequired","params":[{"name":"flags","type":"#"},{"name":"terms_of_service","type":"flags.0?help.TermsOfService"}],"type":"auth.Authorization"},{"id":"-666824391","predicate":"payments.paymentVerificationNeeded","params":[{"name":"url","type":"string"}],"type":"payments.PaymentResult"},{"id":"42402760","predicate":"inputStickerSetAnimatedEmoji","params":[],"type":"InputStickerSet"},{"id":"967122427","predicate":"updateNewScheduledMessage","params":[{"name":"message","type":"Message"}],"type":"Update"},{"id":"-1870238482","predicate":"updateDeleteScheduledMessages","params":[{"name":"peer","type":"Peer"},{"name":"messages","type":"Vector"}],"type":"Update"},{"id":"-797791052","predicate":"restrictionReason","params":[{"name":"platform","type":"string"},{"name":"reason","type":"string"},{"name":"text","type":"string"}],"type":"RestrictionReason"},{"id":"1012306921","predicate":"inputTheme","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputTheme"},{"id":"-175567375","predicate":"inputThemeSlug","params":[{"name":"slug","type":"string"}],"type":"InputTheme"},{"id":"42930452","predicate":"theme","params":[{"name":"flags","type":"#"},{"name":"creator","type":"flags.0?true"},{"name":"default","type":"flags.1?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"slug","type":"string"},{"name":"title","type":"string"},{"name":"document","type":"flags.2?Document"},{"name":"settings","type":"flags.3?ThemeSettings"},{"name":"installs_count","type":"int"}],"type":"Theme"},{"id":"-199313886","predicate":"account.themesNotModified","params":[],"type":"account.Themes"},{"id":"2137482273","predicate":"account.themes","params":[{"name":"hash","type":"int"},{"name":"themes","type":"Vector"}],"type":"account.Themes"},{"id":"-2112423005","predicate":"updateTheme","params":[{"name":"theme","type":"Theme"}],"type":"Update"},{"id":"-786326563","predicate":"inputPrivacyKeyAddedByPhone","params":[],"type":"InputPrivacyKey"},{"id":"1124062251","predicate":"privacyKeyAddedByPhone","params":[],"type":"PrivacyKey"},{"id":"-2027964103","predicate":"updateGeoLiveViewed","params":[{"name":"peer","type":"Peer"},{"name":"msg_id","type":"int"}],"type":"Update"},{"id":"1448076945","predicate":"updateLoginToken","params":[],"type":"Update"},{"id":"1654593920","predicate":"auth.loginToken","params":[{"name":"expires","type":"int"},{"name":"token","type":"bytes"}],"type":"auth.LoginToken"},{"id":"110008598","predicate":"auth.loginTokenMigrateTo","params":[{"name":"dc_id","type":"int"},{"name":"token","type":"bytes"}],"type":"auth.LoginToken"},{"id":"957176926","predicate":"auth.loginTokenSuccess","params":[{"name":"authorization","type":"auth.Authorization"}],"type":"auth.LoginToken"},{"id":"1474462241","predicate":"account.contentSettings","params":[{"name":"flags","type":"#"},{"name":"sensitive_enabled","type":"flags.0?true"},{"name":"sensitive_can_change","type":"flags.1?true"}],"type":"account.ContentSettings"},{"id":"-1456996667","predicate":"messages.inactiveChats","params":[{"name":"dates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.InactiveChats"},{"id":"-1012849566","predicate":"baseThemeClassic","params":[],"type":"BaseTheme"},{"id":"-69724536","predicate":"baseThemeDay","params":[],"type":"BaseTheme"},{"id":"-1212997976","predicate":"baseThemeNight","params":[],"type":"BaseTheme"},{"id":"1834973166","predicate":"baseThemeTinted","params":[],"type":"BaseTheme"},{"id":"1527845466","predicate":"baseThemeArctic","params":[],"type":"BaseTheme"},{"id":"-2077770836","predicate":"inputWallPaperNoFile","params":[],"type":"InputWallPaper"},{"id":"-1963717851","predicate":"wallPaperNoFile","params":[{"name":"flags","type":"#"},{"name":"default","type":"flags.1?true"},{"name":"dark","type":"flags.4?true"},{"name":"settings","type":"flags.2?WallPaperSettings"}],"type":"WallPaper"},{"id":"-1118798639","predicate":"inputThemeSettings","params":[{"name":"flags","type":"#"},{"name":"base_theme","type":"BaseTheme"},{"name":"accent_color","type":"int"},{"name":"message_top_color","type":"flags.0?int"},{"name":"message_bottom_color","type":"flags.0?int"},{"name":"wallpaper","type":"flags.1?InputWallPaper"},{"name":"wallpaper_settings","type":"flags.1?WallPaperSettings"}],"type":"InputThemeSettings"},{"id":"-1676371894","predicate":"themeSettings","params":[{"name":"flags","type":"#"},{"name":"base_theme","type":"BaseTheme"},{"name":"accent_color","type":"int"},{"name":"message_top_color","type":"flags.0?int"},{"name":"message_bottom_color","type":"flags.0?int"},{"name":"wallpaper","type":"flags.1?WallPaper"}],"type":"ThemeSettings"},{"id":"1421174295","predicate":"webPageAttributeTheme","params":[{"name":"flags","type":"#"},{"name":"documents","type":"flags.0?Vector"},{"name":"settings","type":"flags.1?ThemeSettings"}],"type":"WebPageAttribute"}],"methods":[{"id":"-878758099","method":"invokeAfterMsg","params":[{"name":"msg_id","type":"long"},{"name":"query","type":"!X"}],"type":"X"},{"id":"1036301552","method":"invokeAfterMsgs","params":[{"name":"msg_ids","type":"Vector"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1502141361","method":"auth.sendCode","params":[{"name":"phone_number","type":"string"},{"name":"api_id","type":"int"},{"name":"api_hash","type":"string"},{"name":"settings","type":"CodeSettings"}],"type":"auth.SentCode"},{"id":"-2131827673","method":"auth.signUp","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"auth.Authorization"},{"id":"-1126886015","method":"auth.signIn","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"auth.Authorization"},{"id":"1461180992","method":"auth.logOut","params":[],"type":"Bool"},{"id":"-1616179942","method":"auth.resetAuthorizations","params":[],"type":"Bool"},{"id":"-440401971","method":"auth.exportAuthorization","params":[{"name":"dc_id","type":"int"}],"type":"auth.ExportedAuthorization"},{"id":"-470837741","method":"auth.importAuthorization","params":[{"name":"id","type":"int"},{"name":"bytes","type":"bytes"}],"type":"auth.Authorization"},{"id":"-841733627","method":"auth.bindTempAuthKey","params":[{"name":"perm_auth_key_id","type":"long"},{"name":"nonce","type":"long"},{"name":"expires_at","type":"int"},{"name":"encrypted_message","type":"bytes"}],"type":"Bool"},{"id":"1754754159","method":"account.registerDevice","params":[{"name":"flags","type":"#"},{"name":"no_muted","type":"flags.0?true"},{"name":"token_type","type":"int"},{"name":"token","type":"string"},{"name":"app_sandbox","type":"Bool"},{"name":"secret","type":"bytes"},{"name":"other_uids","type":"Vector"}],"type":"Bool"},{"id":"813089983","method":"account.unregisterDevice","params":[{"name":"token_type","type":"int"},{"name":"token","type":"string"},{"name":"other_uids","type":"Vector"}],"type":"Bool"},{"id":"-2067899501","method":"account.updateNotifySettings","params":[{"name":"peer","type":"InputNotifyPeer"},{"name":"settings","type":"InputPeerNotifySettings"}],"type":"Bool"},{"id":"313765169","method":"account.getNotifySettings","params":[{"name":"peer","type":"InputNotifyPeer"}],"type":"PeerNotifySettings"},{"id":"-612493497","method":"account.resetNotifySettings","params":[],"type":"Bool"},{"id":"2018596725","method":"account.updateProfile","params":[{"name":"flags","type":"#"},{"name":"first_name","type":"flags.0?string"},{"name":"last_name","type":"flags.1?string"},{"name":"about","type":"flags.2?string"}],"type":"User"},{"id":"1713919532","method":"account.updateStatus","params":[{"name":"offline","type":"Bool"}],"type":"Bool"},{"id":"-1430579357","method":"account.getWallPapers","params":[{"name":"hash","type":"int"}],"type":"account.WallPapers"},{"id":"-1374118561","method":"account.reportPeer","params":[{"name":"peer","type":"InputPeer"},{"name":"reason","type":"ReportReason"}],"type":"Bool"},{"id":"227648840","method":"users.getUsers","params":[{"name":"id","type":"Vector"}],"type":"Vector"},{"id":"-902781519","method":"users.getFullUser","params":[{"name":"id","type":"InputUser"}],"type":"UserFull"},{"id":"749357634","method":"contacts.getContactIDs","params":[{"name":"hash","type":"int"}],"type":"Vector"},{"id":"-995929106","method":"contacts.getStatuses","params":[],"type":"Vector"},{"id":"-1071414113","method":"contacts.getContacts","params":[{"name":"hash","type":"int"}],"type":"contacts.Contacts"},{"id":"746589157","method":"contacts.importContacts","params":[{"name":"contacts","type":"Vector"}],"type":"contacts.ImportedContacts"},{"id":"157945344","method":"contacts.deleteContacts","params":[{"name":"id","type":"Vector"}],"type":"Updates"},{"id":"269745566","method":"contacts.deleteByPhones","params":[{"name":"phones","type":"Vector"}],"type":"Bool"},{"id":"858475004","method":"contacts.block","params":[{"name":"id","type":"InputUser"}],"type":"Bool"},{"id":"-448724803","method":"contacts.unblock","params":[{"name":"id","type":"InputUser"}],"type":"Bool"},{"id":"-176409329","method":"contacts.getBlocked","params":[{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"contacts.Blocked"},{"id":"1673946374","method":"messages.getMessages","params":[{"name":"id","type":"Vector"}],"type":"messages.Messages"},{"id":"-1594999949","method":"messages.getDialogs","params":[{"name":"flags","type":"#"},{"name":"exclude_pinned","type":"flags.0?true"},{"name":"folder_id","type":"flags.1?int"},{"name":"offset_date","type":"int"},{"name":"offset_id","type":"int"},{"name":"offset_peer","type":"InputPeer"},{"name":"limit","type":"int"},{"name":"hash","type":"int"}],"type":"messages.Dialogs"},{"id":"-591691168","method":"messages.getHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"offset_id","type":"int"},{"name":"offset_date","type":"int"},{"name":"add_offset","type":"int"},{"name":"limit","type":"int"},{"name":"max_id","type":"int"},{"name":"min_id","type":"int"},{"name":"hash","type":"int"}],"type":"messages.Messages"},{"id":"-2045448344","method":"messages.search","params":[{"name":"flags","type":"#"},{"name":"peer","type":"InputPeer"},{"name":"q","type":"string"},{"name":"from_id","type":"flags.0?InputUser"},{"name":"filter","type":"MessagesFilter"},{"name":"min_date","type":"int"},{"name":"max_date","type":"int"},{"name":"offset_id","type":"int"},{"name":"add_offset","type":"int"},{"name":"limit","type":"int"},{"name":"max_id","type":"int"},{"name":"min_id","type":"int"},{"name":"hash","type":"int"}],"type":"messages.Messages"},{"id":"238054714","method":"messages.readHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"max_id","type":"int"}],"type":"messages.AffectedMessages"},{"id":"469850889","method":"messages.deleteHistory","params":[{"name":"flags","type":"#"},{"name":"just_clear","type":"flags.0?true"},{"name":"revoke","type":"flags.1?true"},{"name":"peer","type":"InputPeer"},{"name":"max_id","type":"int"}],"type":"messages.AffectedHistory"},{"id":"-443640366","method":"messages.deleteMessages","params":[{"name":"flags","type":"#"},{"name":"revoke","type":"flags.0?true"},{"name":"id","type":"Vector"}],"type":"messages.AffectedMessages"},{"id":"94983360","method":"messages.receivedMessages","params":[{"name":"max_id","type":"int"}],"type":"Vector"},{"id":"-1551737264","method":"messages.setTyping","params":[{"name":"peer","type":"InputPeer"},{"name":"action","type":"SendMessageAction"}],"type":"Bool"},{"id":"1376532592","method":"messages.sendMessage","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"clear_draft","type":"flags.7?true"},{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"message","type":"string"},{"name":"random_id","type":"long"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"},{"name":"entities","type":"flags.3?Vector"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"881978281","method":"messages.sendMedia","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"clear_draft","type":"flags.7?true"},{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"media","type":"InputMedia"},{"name":"message","type":"string"},{"name":"random_id","type":"long"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"},{"name":"entities","type":"flags.3?Vector"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"-637606386","method":"messages.forwardMessages","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"with_my_score","type":"flags.8?true"},{"name":"grouped","type":"flags.9?true"},{"name":"from_peer","type":"InputPeer"},{"name":"id","type":"Vector"},{"name":"random_id","type":"Vector"},{"name":"to_peer","type":"InputPeer"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"-820669733","method":"messages.reportSpam","params":[{"name":"peer","type":"InputPeer"}],"type":"Bool"},{"id":"913498268","method":"messages.getPeerSettings","params":[{"name":"peer","type":"InputPeer"}],"type":"PeerSettings"},{"id":"-1115507112","method":"messages.report","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"},{"name":"reason","type":"ReportReason"}],"type":"Bool"},{"id":"1013621127","method":"messages.getChats","params":[{"name":"id","type":"Vector"}],"type":"messages.Chats"},{"id":"998448230","method":"messages.getFullChat","params":[{"name":"chat_id","type":"int"}],"type":"messages.ChatFull"},{"id":"-599447467","method":"messages.editChatTitle","params":[{"name":"chat_id","type":"int"},{"name":"title","type":"string"}],"type":"Updates"},{"id":"-900957736","method":"messages.editChatPhoto","params":[{"name":"chat_id","type":"int"},{"name":"photo","type":"InputChatPhoto"}],"type":"Updates"},{"id":"-106911223","method":"messages.addChatUser","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"InputUser"},{"name":"fwd_limit","type":"int"}],"type":"Updates"},{"id":"-530505962","method":"messages.deleteChatUser","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"InputUser"}],"type":"Updates"},{"id":"164303470","method":"messages.createChat","params":[{"name":"users","type":"Vector"},{"name":"title","type":"string"}],"type":"Updates"},{"id":"-304838614","method":"updates.getState","params":[],"type":"updates.State"},{"id":"630429265","method":"updates.getDifference","params":[{"name":"flags","type":"#"},{"name":"pts","type":"int"},{"name":"pts_total_limit","type":"flags.0?int"},{"name":"date","type":"int"},{"name":"qts","type":"int"}],"type":"updates.Difference"},{"id":"-256159406","method":"photos.updateProfilePhoto","params":[{"name":"id","type":"InputPhoto"}],"type":"UserProfilePhoto"},{"id":"1328726168","method":"photos.uploadProfilePhoto","params":[{"name":"file","type":"InputFile"}],"type":"photos.Photo"},{"id":"-2016444625","method":"photos.deletePhotos","params":[{"name":"id","type":"Vector"}],"type":"Vector"},{"id":"-1291540959","method":"upload.saveFilePart","params":[{"name":"file_id","type":"long"},{"name":"file_part","type":"int"},{"name":"bytes","type":"bytes"}],"type":"Bool"},{"id":"-1319462148","method":"upload.getFile","params":[{"name":"flags","type":"#"},{"name":"precise","type":"flags.0?true"},{"name":"cdn_supported","type":"flags.1?true"},{"name":"location","type":"InputFileLocation"},{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"upload.File"},{"id":"-990308245","method":"help.getConfig","params":[],"type":"Config"},{"id":"531836966","method":"help.getNearestDc","params":[],"type":"NearestDc"},{"id":"1378703997","method":"help.getAppUpdate","params":[{"name":"source","type":"string"}],"type":"help.AppUpdate"},{"id":"1295590211","method":"help.getInviteText","params":[],"type":"help.InviteText"},{"id":"-1848823128","method":"photos.getUserPhotos","params":[{"name":"user_id","type":"InputUser"},{"name":"offset","type":"int"},{"name":"max_id","type":"long"},{"name":"limit","type":"int"}],"type":"photos.Photos"},{"id":"651135312","method":"messages.getDhConfig","params":[{"name":"version","type":"int"},{"name":"random_length","type":"int"}],"type":"messages.DhConfig"},{"id":"-162681021","method":"messages.requestEncryption","params":[{"name":"user_id","type":"InputUser"},{"name":"random_id","type":"int"},{"name":"g_a","type":"bytes"}],"type":"EncryptedChat"},{"id":"1035731989","method":"messages.acceptEncryption","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"g_b","type":"bytes"},{"name":"key_fingerprint","type":"long"}],"type":"EncryptedChat"},{"id":"-304536635","method":"messages.discardEncryption","params":[{"name":"chat_id","type":"int"}],"type":"Bool"},{"id":"2031374829","method":"messages.setEncryptedTyping","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"typing","type":"Bool"}],"type":"Bool"},{"id":"2135648522","method":"messages.readEncryptedHistory","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"max_date","type":"int"}],"type":"Bool"},{"id":"-1451792525","method":"messages.sendEncrypted","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"}],"type":"messages.SentEncryptedMessage"},{"id":"-1701831834","method":"messages.sendEncryptedFile","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"},{"name":"file","type":"InputEncryptedFile"}],"type":"messages.SentEncryptedMessage"},{"id":"852769188","method":"messages.sendEncryptedService","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"}],"type":"messages.SentEncryptedMessage"},{"id":"1436924774","method":"messages.receivedQueue","params":[{"name":"max_qts","type":"int"}],"type":"Vector"},{"id":"1259113487","method":"messages.reportEncryptedSpam","params":[{"name":"peer","type":"InputEncryptedChat"}],"type":"Bool"},{"id":"-562337987","method":"upload.saveBigFilePart","params":[{"name":"file_id","type":"long"},{"name":"file_part","type":"int"},{"name":"file_total_parts","type":"int"},{"name":"bytes","type":"bytes"}],"type":"Bool"},{"id":"2018609336","method":"initConnection","params":[{"name":"flags","type":"#"},{"name":"api_id","type":"int"},{"name":"device_model","type":"string"},{"name":"system_version","type":"string"},{"name":"app_version","type":"string"},{"name":"system_lang_code","type":"string"},{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"},{"name":"proxy","type":"flags.0?InputClientProxy"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1663104819","method":"help.getSupport","params":[],"type":"help.Support"},{"id":"916930423","method":"messages.readMessageContents","params":[{"name":"id","type":"Vector"}],"type":"messages.AffectedMessages"},{"id":"655677548","method":"account.checkUsername","params":[{"name":"username","type":"string"}],"type":"Bool"},{"id":"1040964988","method":"account.updateUsername","params":[{"name":"username","type":"string"}],"type":"User"},{"id":"301470424","method":"contacts.search","params":[{"name":"q","type":"string"},{"name":"limit","type":"int"}],"type":"contacts.Found"},{"id":"-623130288","method":"account.getPrivacy","params":[{"name":"key","type":"InputPrivacyKey"}],"type":"account.PrivacyRules"},{"id":"-906486552","method":"account.setPrivacy","params":[{"name":"key","type":"InputPrivacyKey"},{"name":"rules","type":"Vector"}],"type":"account.PrivacyRules"},{"id":"1099779595","method":"account.deleteAccount","params":[{"name":"reason","type":"string"}],"type":"Bool"},{"id":"150761757","method":"account.getAccountTTL","params":[],"type":"AccountDaysTTL"},{"id":"608323678","method":"account.setAccountTTL","params":[{"name":"ttl","type":"AccountDaysTTL"}],"type":"Bool"},{"id":"-627372787","method":"invokeWithLayer","params":[{"name":"layer","type":"int"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-113456221","method":"contacts.resolveUsername","params":[{"name":"username","type":"string"}],"type":"contacts.ResolvedPeer"},{"id":"-2108208411","method":"account.sendChangePhoneCode","params":[{"name":"phone_number","type":"string"},{"name":"settings","type":"CodeSettings"}],"type":"auth.SentCode"},{"id":"1891839707","method":"account.changePhone","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"User"},{"id":"71126828","method":"messages.getStickers","params":[{"name":"emoticon","type":"string"},{"name":"hash","type":"int"}],"type":"messages.Stickers"},{"id":"479598769","method":"messages.getAllStickers","params":[{"name":"hash","type":"int"}],"type":"messages.AllStickers"},{"id":"954152242","method":"account.updateDeviceLocked","params":[{"name":"period","type":"int"}],"type":"Bool"},{"id":"1738800940","method":"auth.importBotAuthorization","params":[{"name":"flags","type":"int"},{"name":"api_id","type":"int"},{"name":"api_hash","type":"string"},{"name":"bot_auth_token","type":"string"}],"type":"auth.Authorization"},{"id":"-1956073268","method":"messages.getWebPagePreview","params":[{"name":"flags","type":"#"},{"name":"message","type":"string"},{"name":"entities","type":"flags.3?Vector"}],"type":"MessageMedia"},{"id":"-484392616","method":"account.getAuthorizations","params":[],"type":"account.Authorizations"},{"id":"-545786948","method":"account.resetAuthorization","params":[{"name":"hash","type":"long"}],"type":"Bool"},{"id":"1418342645","method":"account.getPassword","params":[],"type":"account.Password"},{"id":"-1663767815","method":"account.getPasswordSettings","params":[{"name":"password","type":"InputCheckPasswordSRP"}],"type":"account.PasswordSettings"},{"id":"-1516564433","method":"account.updatePasswordSettings","params":[{"name":"password","type":"InputCheckPasswordSRP"},{"name":"new_settings","type":"account.PasswordInputSettings"}],"type":"Bool"},{"id":"-779399914","method":"auth.checkPassword","params":[{"name":"password","type":"InputCheckPasswordSRP"}],"type":"auth.Authorization"},{"id":"-661144474","method":"auth.requestPasswordRecovery","params":[],"type":"auth.PasswordRecovery"},{"id":"1319464594","method":"auth.recoverPassword","params":[{"name":"code","type":"string"}],"type":"auth.Authorization"},{"id":"-1080796745","method":"invokeWithoutUpdates","params":[{"name":"query","type":"!X"}],"type":"X"},{"id":"234312524","method":"messages.exportChatInvite","params":[{"name":"peer","type":"InputPeer"}],"type":"ExportedChatInvite"},{"id":"1051570619","method":"messages.checkChatInvite","params":[{"name":"hash","type":"string"}],"type":"ChatInvite"},{"id":"1817183516","method":"messages.importChatInvite","params":[{"name":"hash","type":"string"}],"type":"Updates"},{"id":"639215886","method":"messages.getStickerSet","params":[{"name":"stickerset","type":"InputStickerSet"}],"type":"messages.StickerSet"},{"id":"-946871200","method":"messages.installStickerSet","params":[{"name":"stickerset","type":"InputStickerSet"},{"name":"archived","type":"Bool"}],"type":"messages.StickerSetInstallResult"},{"id":"-110209570","method":"messages.uninstallStickerSet","params":[{"name":"stickerset","type":"InputStickerSet"}],"type":"Bool"},{"id":"-421563528","method":"messages.startBot","params":[{"name":"bot","type":"InputUser"},{"name":"peer","type":"InputPeer"},{"name":"random_id","type":"long"},{"name":"start_param","type":"string"}],"type":"Updates"},{"id":"-1877938321","method":"help.getAppChangelog","params":[{"name":"prev_app_version","type":"string"}],"type":"Updates"},{"id":"-993483427","method":"messages.getMessagesViews","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"},{"name":"increment","type":"Bool"}],"type":"Vector"},{"id":"-871347913","method":"channels.readHistory","params":[{"name":"channel","type":"InputChannel"},{"name":"max_id","type":"int"}],"type":"Bool"},{"id":"-2067661490","method":"channels.deleteMessages","params":[{"name":"channel","type":"InputChannel"},{"name":"id","type":"Vector"}],"type":"messages.AffectedMessages"},{"id":"-787622117","method":"channels.deleteUserHistory","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"}],"type":"messages.AffectedHistory"},{"id":"-32999408","method":"channels.reportSpam","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"},{"name":"id","type":"Vector"}],"type":"Bool"},{"id":"-1383294429","method":"channels.getMessages","params":[{"name":"channel","type":"InputChannel"},{"name":"id","type":"Vector"}],"type":"messages.Messages"},{"id":"306054633","method":"channels.getParticipants","params":[{"name":"channel","type":"InputChannel"},{"name":"filter","type":"ChannelParticipantsFilter"},{"name":"offset","type":"int"},{"name":"limit","type":"int"},{"name":"hash","type":"int"}],"type":"channels.ChannelParticipants"},{"id":"1416484774","method":"channels.getParticipant","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"}],"type":"channels.ChannelParticipant"},{"id":"176122811","method":"channels.getChannels","params":[{"name":"id","type":"Vector"}],"type":"messages.Chats"},{"id":"141781513","method":"channels.getFullChannel","params":[{"name":"channel","type":"InputChannel"}],"type":"messages.ChatFull"},{"id":"1029681423","method":"channels.createChannel","params":[{"name":"flags","type":"#"},{"name":"broadcast","type":"flags.0?true"},{"name":"megagroup","type":"flags.1?true"},{"name":"title","type":"string"},{"name":"about","type":"string"},{"name":"geo_point","type":"flags.2?InputGeoPoint"},{"name":"address","type":"flags.2?string"}],"type":"Updates"},{"id":"-751007486","method":"channels.editAdmin","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"},{"name":"admin_rights","type":"ChatAdminRights"},{"name":"rank","type":"string"}],"type":"Updates"},{"id":"1450044624","method":"channels.editTitle","params":[{"name":"channel","type":"InputChannel"},{"name":"title","type":"string"}],"type":"Updates"},{"id":"-248621111","method":"channels.editPhoto","params":[{"name":"channel","type":"InputChannel"},{"name":"photo","type":"InputChatPhoto"}],"type":"Updates"},{"id":"283557164","method":"channels.checkUsername","params":[{"name":"channel","type":"InputChannel"},{"name":"username","type":"string"}],"type":"Bool"},{"id":"890549214","method":"channels.updateUsername","params":[{"name":"channel","type":"InputChannel"},{"name":"username","type":"string"}],"type":"Bool"},{"id":"615851205","method":"channels.joinChannel","params":[{"name":"channel","type":"InputChannel"}],"type":"Updates"},{"id":"-130635115","method":"channels.leaveChannel","params":[{"name":"channel","type":"InputChannel"}],"type":"Updates"},{"id":"429865580","method":"channels.inviteToChannel","params":[{"name":"channel","type":"InputChannel"},{"name":"users","type":"Vector"}],"type":"Updates"},{"id":"-1072619549","method":"channels.deleteChannel","params":[{"name":"channel","type":"InputChannel"}],"type":"Updates"},{"id":"51854712","method":"updates.getChannelDifference","params":[{"name":"flags","type":"#"},{"name":"force","type":"flags.0?true"},{"name":"channel","type":"InputChannel"},{"name":"filter","type":"ChannelMessagesFilter"},{"name":"pts","type":"int"},{"name":"limit","type":"int"}],"type":"updates.ChannelDifference"},{"id":"-1444503762","method":"messages.editChatAdmin","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"InputUser"},{"name":"is_admin","type":"Bool"}],"type":"Bool"},{"id":"363051235","method":"messages.migrateChat","params":[{"name":"chat_id","type":"int"}],"type":"Updates"},{"id":"-1083038300","method":"messages.searchGlobal","params":[{"name":"flags","type":"#"},{"name":"folder_id","type":"flags.0?int"},{"name":"q","type":"string"},{"name":"offset_rate","type":"int"},{"name":"offset_peer","type":"InputPeer"},{"name":"offset_id","type":"int"},{"name":"limit","type":"int"}],"type":"messages.Messages"},{"id":"2016638777","method":"messages.reorderStickerSets","params":[{"name":"flags","type":"#"},{"name":"masks","type":"flags.0?true"},{"name":"order","type":"Vector"}],"type":"Bool"},{"id":"864953444","method":"messages.getDocumentByHash","params":[{"name":"sha256","type":"bytes"},{"name":"size","type":"int"},{"name":"mime_type","type":"string"}],"type":"Document"},{"id":"-1080395925","method":"messages.searchGifs","params":[{"name":"q","type":"string"},{"name":"offset","type":"int"}],"type":"messages.FoundGifs"},{"id":"-2084618926","method":"messages.getSavedGifs","params":[{"name":"hash","type":"int"}],"type":"messages.SavedGifs"},{"id":"846868683","method":"messages.saveGif","params":[{"name":"id","type":"InputDocument"},{"name":"unsave","type":"Bool"}],"type":"Bool"},{"id":"1364105629","method":"messages.getInlineBotResults","params":[{"name":"flags","type":"#"},{"name":"bot","type":"InputUser"},{"name":"peer","type":"InputPeer"},{"name":"geo_point","type":"flags.0?InputGeoPoint"},{"name":"query","type":"string"},{"name":"offset","type":"string"}],"type":"messages.BotResults"},{"id":"-346119674","method":"messages.setInlineBotResults","params":[{"name":"flags","type":"#"},{"name":"gallery","type":"flags.0?true"},{"name":"private","type":"flags.1?true"},{"name":"query_id","type":"long"},{"name":"results","type":"Vector"},{"name":"cache_time","type":"int"},{"name":"next_offset","type":"flags.2?string"},{"name":"switch_pm","type":"flags.3?InlineBotSwitchPM"}],"type":"Bool"},{"id":"570955184","method":"messages.sendInlineBotResult","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"clear_draft","type":"flags.7?true"},{"name":"hide_via","type":"flags.11?true"},{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"random_id","type":"long"},{"name":"query_id","type":"long"},{"name":"id","type":"string"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"-826838685","method":"channels.exportMessageLink","params":[{"name":"channel","type":"InputChannel"},{"name":"id","type":"int"},{"name":"grouped","type":"Bool"}],"type":"ExportedMessageLink"},{"id":"527021574","method":"channels.toggleSignatures","params":[{"name":"channel","type":"InputChannel"},{"name":"enabled","type":"Bool"}],"type":"Updates"},{"id":"1056025023","method":"auth.resendCode","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"}],"type":"auth.SentCode"},{"id":"520357240","method":"auth.cancelCode","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"}],"type":"Bool"},{"id":"-39416522","method":"messages.getMessageEditData","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"}],"type":"messages.MessageEditData"},{"id":"1224152952","method":"messages.editMessage","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"},{"name":"message","type":"flags.11?string"},{"name":"media","type":"flags.14?InputMedia"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"},{"name":"entities","type":"flags.3?Vector"},{"name":"schedule_date","type":"flags.15?int"}],"type":"Updates"},{"id":"-2091549254","method":"messages.editInlineBotMessage","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"id","type":"InputBotInlineMessageID"},{"name":"message","type":"flags.11?string"},{"name":"media","type":"flags.14?InputMedia"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"},{"name":"entities","type":"flags.3?Vector"}],"type":"Bool"},{"id":"-2130010132","method":"messages.getBotCallbackAnswer","params":[{"name":"flags","type":"#"},{"name":"game","type":"flags.1?true"},{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"data","type":"flags.0?bytes"}],"type":"messages.BotCallbackAnswer"},{"id":"-712043766","method":"messages.setBotCallbackAnswer","params":[{"name":"flags","type":"#"},{"name":"alert","type":"flags.1?true"},{"name":"query_id","type":"long"},{"name":"message","type":"flags.0?string"},{"name":"url","type":"flags.2?string"},{"name":"cache_time","type":"int"}],"type":"Bool"},{"id":"-728224331","method":"contacts.getTopPeers","params":[{"name":"flags","type":"#"},{"name":"correspondents","type":"flags.0?true"},{"name":"bots_pm","type":"flags.1?true"},{"name":"bots_inline","type":"flags.2?true"},{"name":"phone_calls","type":"flags.3?true"},{"name":"forward_users","type":"flags.4?true"},{"name":"forward_chats","type":"flags.5?true"},{"name":"groups","type":"flags.10?true"},{"name":"channels","type":"flags.15?true"},{"name":"offset","type":"int"},{"name":"limit","type":"int"},{"name":"hash","type":"int"}],"type":"contacts.TopPeers"},{"id":"451113900","method":"contacts.resetTopPeerRating","params":[{"name":"category","type":"TopPeerCategory"},{"name":"peer","type":"InputPeer"}],"type":"Bool"},{"id":"-462373635","method":"messages.getPeerDialogs","params":[{"name":"peers","type":"Vector"}],"type":"messages.PeerDialogs"},{"id":"-1137057461","method":"messages.saveDraft","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"peer","type":"InputPeer"},{"name":"message","type":"string"},{"name":"entities","type":"flags.3?Vector"}],"type":"Bool"},{"id":"1782549861","method":"messages.getAllDrafts","params":[],"type":"Updates"},{"id":"766298703","method":"messages.getFeaturedStickers","params":[{"name":"hash","type":"int"}],"type":"messages.FeaturedStickers"},{"id":"1527873830","method":"messages.readFeaturedStickers","params":[{"name":"id","type":"Vector"}],"type":"Bool"},{"id":"1587647177","method":"messages.getRecentStickers","params":[{"name":"flags","type":"#"},{"name":"attached","type":"flags.0?true"},{"name":"hash","type":"int"}],"type":"messages.RecentStickers"},{"id":"958863608","method":"messages.saveRecentSticker","params":[{"name":"flags","type":"#"},{"name":"attached","type":"flags.0?true"},{"name":"id","type":"InputDocument"},{"name":"unsave","type":"Bool"}],"type":"Bool"},{"id":"-1986437075","method":"messages.clearRecentStickers","params":[{"name":"flags","type":"#"},{"name":"attached","type":"flags.0?true"}],"type":"Bool"},{"id":"1475442322","method":"messages.getArchivedStickers","params":[{"name":"flags","type":"#"},{"name":"masks","type":"flags.0?true"},{"name":"offset_id","type":"long"},{"name":"limit","type":"int"}],"type":"messages.ArchivedStickers"},{"id":"457157256","method":"account.sendConfirmPhoneCode","params":[{"name":"hash","type":"string"},{"name":"settings","type":"CodeSettings"}],"type":"auth.SentCode"},{"id":"1596029123","method":"account.confirmPhone","params":[{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"Bool"},{"id":"-122669393","method":"channels.getAdminedPublicChannels","params":[{"name":"flags","type":"#"},{"name":"by_location","type":"flags.0?true"},{"name":"check_limit","type":"flags.1?true"}],"type":"messages.Chats"},{"id":"1706608543","method":"messages.getMaskStickers","params":[{"name":"hash","type":"int"}],"type":"messages.AllStickers"},{"id":"-866424884","method":"messages.getAttachedStickers","params":[{"name":"media","type":"InputStickeredMedia"}],"type":"Vector"},{"id":"-1907842680","method":"auth.dropTempAuthKeys","params":[{"name":"except_auth_keys","type":"Vector"}],"type":"Bool"},{"id":"-1896289088","method":"messages.setGameScore","params":[{"name":"flags","type":"#"},{"name":"edit_message","type":"flags.0?true"},{"name":"force","type":"flags.1?true"},{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"},{"name":"user_id","type":"InputUser"},{"name":"score","type":"int"}],"type":"Updates"},{"id":"363700068","method":"messages.setInlineGameScore","params":[{"name":"flags","type":"#"},{"name":"edit_message","type":"flags.0?true"},{"name":"force","type":"flags.1?true"},{"name":"id","type":"InputBotInlineMessageID"},{"name":"user_id","type":"InputUser"},{"name":"score","type":"int"}],"type":"Bool"},{"id":"-400399203","method":"messages.getGameHighScores","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"},{"name":"user_id","type":"InputUser"}],"type":"messages.HighScores"},{"id":"258170395","method":"messages.getInlineGameHighScores","params":[{"name":"id","type":"InputBotInlineMessageID"},{"name":"user_id","type":"InputUser"}],"type":"messages.HighScores"},{"id":"218777796","method":"messages.getCommonChats","params":[{"name":"user_id","type":"InputUser"},{"name":"max_id","type":"int"},{"name":"limit","type":"int"}],"type":"messages.Chats"},{"id":"-341307408","method":"messages.getAllChats","params":[{"name":"except_ids","type":"Vector"}],"type":"messages.Chats"},{"id":"-333262899","method":"help.setBotUpdatesStatus","params":[{"name":"pending_updates_count","type":"int"},{"name":"message","type":"string"}],"type":"Bool"},{"id":"852135825","method":"messages.getWebPage","params":[{"name":"url","type":"string"},{"name":"hash","type":"int"}],"type":"WebPage"},{"id":"-1489903017","method":"messages.toggleDialogPin","params":[{"name":"flags","type":"#"},{"name":"pinned","type":"flags.0?true"},{"name":"peer","type":"InputDialogPeer"}],"type":"Bool"},{"id":"991616823","method":"messages.reorderPinnedDialogs","params":[{"name":"flags","type":"#"},{"name":"force","type":"flags.0?true"},{"name":"folder_id","type":"int"},{"name":"order","type":"Vector"}],"type":"Bool"},{"id":"-692498958","method":"messages.getPinnedDialogs","params":[{"name":"folder_id","type":"int"}],"type":"messages.PeerDialogs"},{"id":"-1440257555","method":"bots.sendCustomRequest","params":[{"name":"custom_method","type":"string"},{"name":"params","type":"DataJSON"}],"type":"DataJSON"},{"id":"-434028723","method":"bots.answerWebhookJSONQuery","params":[{"name":"query_id","type":"long"},{"name":"data","type":"DataJSON"}],"type":"Bool"},{"id":"619086221","method":"upload.getWebFile","params":[{"name":"location","type":"InputWebFileLocation"},{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"upload.WebFile"},{"id":"-1712285883","method":"payments.getPaymentForm","params":[{"name":"msg_id","type":"int"}],"type":"payments.PaymentForm"},{"id":"-1601001088","method":"payments.getPaymentReceipt","params":[{"name":"msg_id","type":"int"}],"type":"payments.PaymentReceipt"},{"id":"1997180532","method":"payments.validateRequestedInfo","params":[{"name":"flags","type":"#"},{"name":"save","type":"flags.0?true"},{"name":"msg_id","type":"int"},{"name":"info","type":"PaymentRequestedInfo"}],"type":"payments.ValidatedRequestedInfo"},{"id":"730364339","method":"payments.sendPaymentForm","params":[{"name":"flags","type":"#"},{"name":"msg_id","type":"int"},{"name":"requested_info_id","type":"flags.0?string"},{"name":"shipping_option_id","type":"flags.1?string"},{"name":"credentials","type":"InputPaymentCredentials"}],"type":"payments.PaymentResult"},{"id":"1151208273","method":"account.getTmpPassword","params":[{"name":"password","type":"InputCheckPasswordSRP"},{"name":"period","type":"int"}],"type":"account.TmpPassword"},{"id":"578650699","method":"payments.getSavedInfo","params":[],"type":"payments.SavedInfo"},{"id":"-667062079","method":"payments.clearSavedInfo","params":[{"name":"flags","type":"#"},{"name":"credentials","type":"flags.0?true"},{"name":"info","type":"flags.1?true"}],"type":"Bool"},{"id":"-436833542","method":"messages.setBotShippingResults","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"error","type":"flags.0?string"},{"name":"shipping_options","type":"flags.1?Vector"}],"type":"Bool"},{"id":"163765653","method":"messages.setBotPrecheckoutResults","params":[{"name":"flags","type":"#"},{"name":"success","type":"flags.1?true"},{"name":"query_id","type":"long"},{"name":"error","type":"flags.0?string"}],"type":"Bool"},{"id":"-1680314774","method":"stickers.createStickerSet","params":[{"name":"flags","type":"#"},{"name":"masks","type":"flags.0?true"},{"name":"user_id","type":"InputUser"},{"name":"title","type":"string"},{"name":"short_name","type":"string"},{"name":"stickers","type":"Vector"}],"type":"messages.StickerSet"},{"id":"-143257775","method":"stickers.removeStickerFromSet","params":[{"name":"sticker","type":"InputDocument"}],"type":"messages.StickerSet"},{"id":"-4795190","method":"stickers.changeStickerPosition","params":[{"name":"sticker","type":"InputDocument"},{"name":"position","type":"int"}],"type":"messages.StickerSet"},{"id":"-2041315650","method":"stickers.addStickerToSet","params":[{"name":"stickerset","type":"InputStickerSet"},{"name":"sticker","type":"InputStickerSetItem"}],"type":"messages.StickerSet"},{"id":"1369162417","method":"messages.uploadMedia","params":[{"name":"peer","type":"InputPeer"},{"name":"media","type":"InputMedia"}],"type":"MessageMedia"},{"id":"1430593449","method":"phone.getCallConfig","params":[],"type":"DataJSON"},{"id":"1124046573","method":"phone.requestCall","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.0?true"},{"name":"user_id","type":"InputUser"},{"name":"random_id","type":"int"},{"name":"g_a_hash","type":"bytes"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"phone.PhoneCall"},{"id":"1003664544","method":"phone.acceptCall","params":[{"name":"peer","type":"InputPhoneCall"},{"name":"g_b","type":"bytes"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"phone.PhoneCall"},{"id":"788404002","method":"phone.confirmCall","params":[{"name":"peer","type":"InputPhoneCall"},{"name":"g_a","type":"bytes"},{"name":"key_fingerprint","type":"long"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"phone.PhoneCall"},{"id":"399855457","method":"phone.receivedCall","params":[{"name":"peer","type":"InputPhoneCall"}],"type":"Bool"},{"id":"-1295269440","method":"phone.discardCall","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.0?true"},{"name":"peer","type":"InputPhoneCall"},{"name":"duration","type":"int"},{"name":"reason","type":"PhoneCallDiscardReason"},{"name":"connection_id","type":"long"}],"type":"Updates"},{"id":"1508562471","method":"phone.setCallRating","params":[{"name":"flags","type":"#"},{"name":"user_initiative","type":"flags.0?true"},{"name":"peer","type":"InputPhoneCall"},{"name":"rating","type":"int"},{"name":"comment","type":"string"}],"type":"Updates"},{"id":"662363518","method":"phone.saveCallDebug","params":[{"name":"peer","type":"InputPhoneCall"},{"name":"debug","type":"DataJSON"}],"type":"Bool"},{"id":"536919235","method":"upload.getCdnFile","params":[{"name":"file_token","type":"bytes"},{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"upload.CdnFile"},{"id":"-1691921240","method":"upload.reuploadCdnFile","params":[{"name":"file_token","type":"bytes"},{"name":"request_token","type":"bytes"}],"type":"Vector"},{"id":"1375900482","method":"help.getCdnConfig","params":[],"type":"CdnConfig"},{"id":"-219008246","method":"langpack.getLangPack","params":[{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"}],"type":"LangPackDifference"},{"id":"-269862909","method":"langpack.getStrings","params":[{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"},{"name":"keys","type":"Vector"}],"type":"Vector"},{"id":"-845657435","method":"langpack.getDifference","params":[{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"},{"name":"from_version","type":"int"}],"type":"LangPackDifference"},{"id":"1120311183","method":"langpack.getLanguages","params":[{"name":"lang_pack","type":"string"}],"type":"Vector"},{"id":"1920559378","method":"channels.editBanned","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"},{"name":"banned_rights","type":"ChatBannedRights"}],"type":"Updates"},{"id":"870184064","method":"channels.getAdminLog","params":[{"name":"flags","type":"#"},{"name":"channel","type":"InputChannel"},{"name":"q","type":"string"},{"name":"events_filter","type":"flags.0?ChannelAdminLogEventsFilter"},{"name":"admins","type":"flags.1?Vector"},{"name":"max_id","type":"long"},{"name":"min_id","type":"long"},{"name":"limit","type":"int"}],"type":"channels.AdminLogResults"},{"id":"1302676017","method":"upload.getCdnFileHashes","params":[{"name":"file_token","type":"bytes"},{"name":"offset","type":"int"}],"type":"Vector"},{"id":"-914493408","method":"messages.sendScreenshotNotification","params":[{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"int"},{"name":"random_id","type":"long"}],"type":"Updates"},{"id":"-359881479","method":"channels.setStickers","params":[{"name":"channel","type":"InputChannel"},{"name":"stickerset","type":"InputStickerSet"}],"type":"Bool"},{"id":"567151374","method":"messages.getFavedStickers","params":[{"name":"hash","type":"int"}],"type":"messages.FavedStickers"},{"id":"-1174420133","method":"messages.faveSticker","params":[{"name":"id","type":"InputDocument"},{"name":"unfave","type":"Bool"}],"type":"Bool"},{"id":"-357180360","method":"channels.readMessageContents","params":[{"name":"channel","type":"InputChannel"},{"name":"id","type":"Vector"}],"type":"Bool"},{"id":"-2020263951","method":"contacts.resetSaved","params":[],"type":"Bool"},{"id":"1180140658","method":"messages.getUnreadMentions","params":[{"name":"peer","type":"InputPeer"},{"name":"offset_id","type":"int"},{"name":"add_offset","type":"int"},{"name":"limit","type":"int"},{"name":"max_id","type":"int"},{"name":"min_id","type":"int"}],"type":"messages.Messages"},{"id":"-1355375294","method":"channels.deleteHistory","params":[{"name":"channel","type":"InputChannel"},{"name":"max_id","type":"int"}],"type":"Bool"},{"id":"1036054804","method":"help.getRecentMeUrls","params":[{"name":"referer","type":"string"}],"type":"help.RecentMeUrls"},{"id":"-356796084","method":"channels.togglePreHistoryHidden","params":[{"name":"channel","type":"InputChannel"},{"name":"enabled","type":"Bool"}],"type":"Updates"},{"id":"251759059","method":"messages.readMentions","params":[{"name":"peer","type":"InputPeer"}],"type":"messages.AffectedHistory"},{"id":"-1144759543","method":"messages.getRecentLocations","params":[{"name":"peer","type":"InputPeer"},{"name":"limit","type":"int"},{"name":"hash","type":"int"}],"type":"messages.Messages"},{"id":"-872345397","method":"messages.sendMultiMedia","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"clear_draft","type":"flags.7?true"},{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"multi_media","type":"Vector"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"1347929239","method":"messages.uploadEncryptedFile","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"file","type":"InputEncryptedFile"}],"type":"EncryptedFile"},{"id":"405695855","method":"account.getWebAuthorizations","params":[],"type":"account.WebAuthorizations"},{"id":"755087855","method":"account.resetWebAuthorization","params":[{"name":"hash","type":"long"}],"type":"Bool"},{"id":"1747789204","method":"account.resetWebAuthorizations","params":[],"type":"Bool"},{"id":"-1028140917","method":"messages.searchStickerSets","params":[{"name":"flags","type":"#"},{"name":"exclude_featured","type":"flags.0?true"},{"name":"q","type":"string"},{"name":"hash","type":"int"}],"type":"messages.FoundStickerSets"},{"id":"-956147407","method":"upload.getFileHashes","params":[{"name":"location","type":"InputFileLocation"},{"name":"offset","type":"int"}],"type":"Vector"},{"id":"1031231713","method":"help.getProxyData","params":[],"type":"help.ProxyData"},{"id":"749019089","method":"help.getTermsOfServiceUpdate","params":[],"type":"help.TermsOfServiceUpdate"},{"id":"-294455398","method":"help.acceptTermsOfService","params":[{"name":"id","type":"DataJSON"}],"type":"Bool"},{"id":"-1299661699","method":"account.getAllSecureValues","params":[],"type":"Vector"},{"id":"1936088002","method":"account.getSecureValue","params":[{"name":"types","type":"Vector"}],"type":"Vector"},{"id":"-1986010339","method":"account.saveSecureValue","params":[{"name":"value","type":"InputSecureValue"},{"name":"secure_secret_id","type":"long"}],"type":"SecureValue"},{"id":"-1199522741","method":"account.deleteSecureValue","params":[{"name":"types","type":"Vector"}],"type":"Bool"},{"id":"-1865902923","method":"users.setSecureValueErrors","params":[{"name":"id","type":"InputUser"},{"name":"errors","type":"Vector"}],"type":"Bool"},{"id":"-1200903967","method":"account.getAuthorizationForm","params":[{"name":"bot_id","type":"int"},{"name":"scope","type":"string"},{"name":"public_key","type":"string"}],"type":"account.AuthorizationForm"},{"id":"-419267436","method":"account.acceptAuthorization","params":[{"name":"bot_id","type":"int"},{"name":"scope","type":"string"},{"name":"public_key","type":"string"},{"name":"value_hashes","type":"Vector"},{"name":"credentials","type":"SecureCredentialsEncrypted"}],"type":"Bool"},{"id":"-1516022023","method":"account.sendVerifyPhoneCode","params":[{"name":"phone_number","type":"string"},{"name":"settings","type":"CodeSettings"}],"type":"auth.SentCode"},{"id":"1305716726","method":"account.verifyPhone","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"Bool"},{"id":"1880182943","method":"account.sendVerifyEmailCode","params":[{"name":"email","type":"string"}],"type":"account.SentEmailCode"},{"id":"-323339813","method":"account.verifyEmail","params":[{"name":"email","type":"string"},{"name":"code","type":"string"}],"type":"Bool"},{"id":"1072547679","method":"help.getDeepLinkInfo","params":[{"name":"path","type":"string"}],"type":"help.DeepLinkInfo"},{"id":"-2098076769","method":"contacts.getSaved","params":[],"type":"Vector"},{"id":"-2092831552","method":"channels.getLeftChannels","params":[{"name":"offset","type":"int"}],"type":"messages.Chats"},{"id":"-262453244","method":"account.initTakeoutSession","params":[{"name":"flags","type":"#"},{"name":"contacts","type":"flags.0?true"},{"name":"message_users","type":"flags.1?true"},{"name":"message_chats","type":"flags.2?true"},{"name":"message_megagroups","type":"flags.3?true"},{"name":"message_channels","type":"flags.4?true"},{"name":"files","type":"flags.5?true"},{"name":"file_max_size","type":"flags.5?int"}],"type":"account.Takeout"},{"id":"489050862","method":"account.finishTakeoutSession","params":[{"name":"flags","type":"#"},{"name":"success","type":"flags.0?true"}],"type":"Bool"},{"id":"486505992","method":"messages.getSplitRanges","params":[],"type":"Vector"},{"id":"911373810","method":"invokeWithMessagesRange","params":[{"name":"range","type":"MessageRange"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1398145746","method":"invokeWithTakeout","params":[{"name":"takeout_id","type":"long"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1031349873","method":"messages.markDialogUnread","params":[{"name":"flags","type":"#"},{"name":"unread","type":"flags.0?true"},{"name":"peer","type":"InputDialogPeer"}],"type":"Bool"},{"id":"585256482","method":"messages.getDialogUnreadMarks","params":[],"type":"Vector"},{"id":"-2062238246","method":"contacts.toggleTopPeers","params":[{"name":"enabled","type":"Bool"}],"type":"Bool"},{"id":"2119757468","method":"messages.clearAllDrafts","params":[],"type":"Bool"},{"id":"-1735311088","method":"help.getAppConfig","params":[],"type":"JSONValue"},{"id":"1862465352","method":"help.saveAppLog","params":[{"name":"events","type":"Vector"}],"type":"Bool"},{"id":"-966677240","method":"help.getPassportConfig","params":[{"name":"hash","type":"int"}],"type":"help.PassportConfig"},{"id":"1784243458","method":"langpack.getLanguage","params":[{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"}],"type":"LangPackLanguage"},{"id":"-760547348","method":"messages.updatePinnedMessage","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.0?true"},{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"}],"type":"Updates"},{"id":"-1881204448","method":"account.confirmPasswordEmail","params":[{"name":"code","type":"string"}],"type":"Bool"},{"id":"2055154197","method":"account.resendPasswordEmail","params":[],"type":"Bool"},{"id":"-1043606090","method":"account.cancelPasswordEmail","params":[],"type":"Bool"},{"id":"-748624084","method":"help.getSupportName","params":[],"type":"help.SupportName"},{"id":"59377875","method":"help.getUserInfo","params":[{"name":"user_id","type":"InputUser"}],"type":"help.UserInfo"},{"id":"1723407216","method":"help.editUserInfo","params":[{"name":"user_id","type":"InputUser"},{"name":"message","type":"string"},{"name":"entities","type":"Vector"}],"type":"help.UserInfo"},{"id":"-1626880216","method":"account.getContactSignUpNotification","params":[],"type":"Bool"},{"id":"-806076575","method":"account.setContactSignUpNotification","params":[{"name":"silent","type":"Bool"}],"type":"Bool"},{"id":"1398240377","method":"account.getNotifyExceptions","params":[{"name":"flags","type":"#"},{"name":"compare_sound","type":"flags.1?true"},{"name":"peer","type":"flags.0?InputNotifyPeer"}],"type":"Updates"},{"id":"283795844","method":"messages.sendVote","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"options","type":"Vector"}],"type":"Updates"},{"id":"1941660731","method":"messages.getPollResults","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"}],"type":"Updates"},{"id":"1848369232","method":"messages.getOnlines","params":[{"name":"peer","type":"InputPeer"}],"type":"ChatOnlines"},{"id":"-2127811866","method":"messages.getStatsURL","params":[{"name":"flags","type":"#"},{"name":"dark","type":"flags.0?true"},{"name":"peer","type":"InputPeer"},{"name":"params","type":"string"}],"type":"StatsURL"},{"id":"-554301545","method":"messages.editChatAbout","params":[{"name":"peer","type":"InputPeer"},{"name":"about","type":"string"}],"type":"Bool"},{"id":"-1517917375","method":"messages.editChatDefaultBannedRights","params":[{"name":"peer","type":"InputPeer"},{"name":"banned_rights","type":"ChatBannedRights"}],"type":"Updates"},{"id":"-57811990","method":"account.getWallPaper","params":[{"name":"wallpaper","type":"InputWallPaper"}],"type":"WallPaper"},{"id":"-578472351","method":"account.uploadWallPaper","params":[{"name":"file","type":"InputFile"},{"name":"mime_type","type":"string"},{"name":"settings","type":"WallPaperSettings"}],"type":"WallPaper"},{"id":"1817860919","method":"account.saveWallPaper","params":[{"name":"wallpaper","type":"InputWallPaper"},{"name":"unsave","type":"Bool"},{"name":"settings","type":"WallPaperSettings"}],"type":"Bool"},{"id":"-18000023","method":"account.installWallPaper","params":[{"name":"wallpaper","type":"InputWallPaper"},{"name":"settings","type":"WallPaperSettings"}],"type":"Bool"},{"id":"-1153722364","method":"account.resetWallPapers","params":[],"type":"Bool"},{"id":"1457130303","method":"account.getAutoDownloadSettings","params":[],"type":"account.AutoDownloadSettings"},{"id":"1995661875","method":"account.saveAutoDownloadSettings","params":[{"name":"flags","type":"#"},{"name":"low","type":"flags.0?true"},{"name":"high","type":"flags.1?true"},{"name":"settings","type":"AutoDownloadSettings"}],"type":"Bool"},{"id":"899735650","method":"messages.getEmojiKeywords","params":[{"name":"lang_code","type":"string"}],"type":"EmojiKeywordsDifference"},{"id":"352892591","method":"messages.getEmojiKeywordsDifference","params":[{"name":"lang_code","type":"string"},{"name":"from_version","type":"int"}],"type":"EmojiKeywordsDifference"},{"id":"1318675378","method":"messages.getEmojiKeywordsLanguages","params":[{"name":"lang_codes","type":"Vector"}],"type":"Vector"},{"id":"-709817306","method":"messages.getEmojiURL","params":[{"name":"lang_code","type":"string"}],"type":"EmojiURL"},{"id":"1749536939","method":"folders.editPeerFolders","params":[{"name":"folder_peers","type":"Vector"}],"type":"Updates"},{"id":"472471681","method":"folders.deleteFolder","params":[{"name":"folder_id","type":"int"}],"type":"Updates"},{"id":"1932455680","method":"messages.getSearchCounters","params":[{"name":"peer","type":"InputPeer"},{"name":"filters","type":"Vector"}],"type":"Vector"},{"id":"-170208392","method":"channels.getGroupsForDiscussion","params":[],"type":"messages.Chats"},{"id":"1079520178","method":"channels.setDiscussionGroup","params":[{"name":"broadcast","type":"InputChannel"},{"name":"group","type":"InputChannel"}],"type":"Bool"},{"id":"-482388461","method":"messages.requestUrlAuth","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"button_id","type":"int"}],"type":"UrlAuthResult"},{"id":"-148247912","method":"messages.acceptUrlAuth","params":[{"name":"flags","type":"#"},{"name":"write_allowed","type":"flags.0?true"},{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"button_id","type":"int"}],"type":"UrlAuthResult"},{"id":"1336717624","method":"messages.hidePeerSettingsBar","params":[{"name":"peer","type":"InputPeer"}],"type":"Bool"},{"id":"-386636848","method":"contacts.addContact","params":[{"name":"flags","type":"#"},{"name":"add_phone_privacy_exception","type":"flags.0?true"},{"name":"id","type":"InputUser"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"phone","type":"string"}],"type":"Updates"},{"id":"-130964977","method":"contacts.acceptContact","params":[{"name":"id","type":"InputUser"}],"type":"Updates"},{"id":"-1892102881","method":"channels.editCreator","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"},{"name":"password","type":"InputCheckPasswordSRP"}],"type":"Updates"},{"id":"171270230","method":"contacts.getLocated","params":[{"name":"geo_point","type":"InputGeoPoint"}],"type":"Updates"},{"id":"1491484525","method":"channels.editLocation","params":[{"name":"channel","type":"InputChannel"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"address","type":"string"}],"type":"Bool"},{"id":"-304832784","method":"channels.toggleSlowMode","params":[{"name":"channel","type":"InputChannel"},{"name":"seconds","type":"int"}],"type":"Updates"},{"id":"-490575781","method":"messages.getScheduledHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"hash","type":"int"}],"type":"messages.Messages"},{"id":"-1111817116","method":"messages.getScheduledMessages","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"}],"type":"messages.Messages"},{"id":"-1120369398","method":"messages.sendScheduledMessages","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"}],"type":"Updates"},{"id":"1504586518","method":"messages.deleteScheduledMessages","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"}],"type":"Updates"},{"id":"473805619","method":"account.uploadTheme","params":[{"name":"flags","type":"#"},{"name":"file","type":"InputFile"},{"name":"thumb","type":"flags.0?InputFile"},{"name":"file_name","type":"string"},{"name":"mime_type","type":"string"}],"type":"Document"},{"id":"-2077048289","method":"account.createTheme","params":[{"name":"flags","type":"#"},{"name":"slug","type":"string"},{"name":"title","type":"string"},{"name":"document","type":"flags.2?InputDocument"},{"name":"settings","type":"flags.3?InputThemeSettings"}],"type":"Theme"},{"id":"1555261397","method":"account.updateTheme","params":[{"name":"flags","type":"#"},{"name":"format","type":"string"},{"name":"theme","type":"InputTheme"},{"name":"slug","type":"flags.0?string"},{"name":"title","type":"flags.1?string"},{"name":"document","type":"flags.2?InputDocument"},{"name":"settings","type":"flags.3?InputThemeSettings"}],"type":"Theme"},{"id":"-229175188","method":"account.saveTheme","params":[{"name":"theme","type":"InputTheme"},{"name":"unsave","type":"Bool"}],"type":"Bool"},{"id":"2061776695","method":"account.installTheme","params":[{"name":"flags","type":"#"},{"name":"dark","type":"flags.0?true"},{"name":"format","type":"flags.1?string"},{"name":"theme","type":"flags.1?InputTheme"}],"type":"Bool"},{"id":"-1919060949","method":"account.getTheme","params":[{"name":"format","type":"string"},{"name":"theme","type":"InputTheme"},{"name":"document_id","type":"long"}],"type":"Theme"},{"id":"676939512","method":"account.getThemes","params":[{"name":"format","type":"string"},{"name":"hash","type":"int"}],"type":"account.Themes"},{"id":"-1313598185","method":"auth.exportLoginToken","params":[{"name":"api_id","type":"int"},{"name":"api_hash","type":"string"},{"name":"except_ids","type":"Vector"}],"type":"auth.LoginToken"},{"id":"-1783866140","method":"auth.importLoginToken","params":[{"name":"token","type":"bytes"}],"type":"auth.LoginToken"},{"id":"-392909491","method":"auth.acceptLoginToken","params":[{"name":"token","type":"bytes"}],"type":"Authorization"},{"id":"-1250643605","method":"account.setContentSettings","params":[{"name":"flags","type":"#"},{"name":"sensitive_enabled","type":"flags.0?true"}],"type":"Bool"},{"id":"-1952756306","method":"account.getContentSettings","params":[],"type":"account.ContentSettings"},{"id":"300429806","method":"channels.getInactiveChannels","params":[],"type":"messages.InactiveChats"},{"id":"1705865692","method":"account.getMultiWallPapers","params":[{"name":"wallpapers","type":"Vector"}],"type":"Vector"}]}; - -Config.Schema.API.layer = 108; - -// From https://github.com/stephenmathieson/node-tlds/blob/master/index.js -Config.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', 'nico', 'ninja', 'nl', 'no', 'np', 'nr', 'nra', 'nrw', 'ntt', 'nu', 'nyc', 'nz', 'okinawa', 'om', 'one', 'ong', 'onl', 'ooo', 'org', 'organic', 'osaka', 'otsuka', 'ovh', 'pa', 'paris', 'partners', 'parts', 'party', 'pe', 'pf', 'pg', 'ph', 'pharmacy', 'photo', 'photography', 'photos', 'physio', 'pics', 'pictures', 'pink', 'pizza', 'pk', 'pl', 'place', 'plumbing', 'pm', 'pn', 'pohl', 'poker', 'porn', 'post', 'pr', 'praxi', 'press', 'pro', 'prod', 'productions', 'prof', 'properties', 'property', 'ps', 'pt', 'pub', 'pw', 'py', 'qa', 'qpon', 'quebec', 're', 'realtor', 'recipes', 'red', 'rehab', 'reise', 'reisen', 'reit', 'ren', 'rentals', 'repair', 'report', 'republican', 'rest', 'restaurant', 'reviews', 'rich', 'rio', 'rip', 'ro', 'rocks', 'rodeo', 'rs', 'rsvp', 'ru', 'ruhr', 'rw', 'ryukyu', 'sa', 'saarland', 'sale', 'samsung', 'sarl', 'saxo', 'sb', 'sc', 'sca', 'scb', 'schmidt', 'schule', 'schwarz', 'science', 'scot', 'sd', 'se', 'services', 'sew', 'sexy', 'sg', 'sh', 'shiksha', 'shoes', 'shriram', 'si', 'singles', 'sj', 'sk', 'sky', 'sl', 'sm', 'sn', 'so', 'social', 'software', 'sohu', 'solar', 'solutions', 'soy', 'space', 'spiegel', 'sr', 'st', 'style', 'su', 'supplies', 'supply', 'support', 'surf', 'surgery', 'suzuki', 'sv', 'sx', 'sy', 'sydney', 'systems', 'sz', 'taipei', 'tatar', 'tattoo', 'tax', 'tc', 'td', 'technology', 'tel', 'temasek', 'tennis', 'tf', 'tg', 'th', 'tienda', 'tips', 'tires', 'tirol', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'today', 'tokyo', 'tools', 'top', 'toshiba', 'town', 'toys', 'tp', 'tr', 'trade', 'training', 'travel', 'trust', 'tt', 'tui', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'university', 'uno', 'uol', 'us', 'uy', 'uz', 'va', 'vacations', 'vc', 've', 'vegas', 'ventures', 'versicherung', 'vet', 'vg', 'vi', 'viajes', 'video', 'villas', 'vision', 'vlaanderen', 'vn', 'vodka', 'vote', 'voting', 'voto', 'voyage', 'vu', 'wales', 'wang', 'watch', 'webcam', 'website', 'wed', 'wedding', 'wf', 'whoswho', 'wien', 'wiki', 'williamhill', 'wme', 'work', 'works', 'world', 'ws', 'wtc', 'wtf', '佛山', '集团', '在线', '한국', 'ভারত', '八卦', 'موقع', '公益', '公司', '移动', '我爱你', 'москва', 'қаз', 'онлайн', 'сайт', 'срб', '淡马锡', 'орг', '삼성', 'சிங்கப்பூர்', '商标', '商店', '商城', 'дети', 'мкд', '中文网', '中信', '中国', '中國', '谷歌', 'భారత్', 'ලංකා', 'ભારત', 'भारत', '网店', 'संगठन', '网络', 'укр', '香港', '台湾', '台灣', '手机', 'мон', 'الجزائر', 'عمان', 'ایران', 'امارات', 'بازار', 'الاردن', 'بھارت', 'المغرب', 'السعودية', 'مليسيا', 'شبكة', 'გე', '机构', '组织机构', 'ไทย', 'سورية', 'рус', 'рф', 'تونس', 'みんな', 'グーグル', '世界', 'ਭਾਰਤ', '网址', '游戏', 'vermögensberater', 'vermögensberatung', '企业', 'مصر', 'قطر', '广东', 'இலங்கை', 'இந்தியா', '新加坡', 'فلسطين', '政务', 'xxx', 'xyz', 'yachts', 'yandex', 'ye', 'yoga', 'yokohama', 'youtube', 'yt', 'za', 'zip', 'zm', 'zone', 'zuerich', 'zw']; - -// From https://raw.githubusercontent.com/FGRibreau/latenize/master/latinize_map.js -Config.LatinizeMap = {'Á': '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','Ỉ': 'I','Ȋ': 'I','Ī': 'I','Į': 'I','Ɨ': 'I','Ĩ': 'I','Ḭ': 'I','Ꝺ': 'D','Ꝼ': 'F','Ᵹ': 'G','Ꞃ': 'R','Ꞅ': 'S','Ꞇ': 'T','Ꝭ': 'IS','Ĵ': 'J','Ɉ': 'J','Ḱ': 'K','Ǩ': 'K','Ķ': 'K','Ⱪ': 'K','Ꝃ': 'K','Ḳ': 'K','Ƙ': 'K','Ḵ': 'K','Ꝁ': 'K','Ꝅ': 'K','Ĺ': 'L','Ƚ': 'L','Ľ': 'L','Ļ': 'L','Ḽ': 'L','Ḷ': 'L','Ḹ': 'L','Ⱡ': 'L','Ꝉ': 'L','Ḻ': 'L','Ŀ': 'L','Ɫ': 'L','Lj': 'L','Ł': 'L','LJ': 'LJ','Ḿ': 'M','Ṁ': 'M','Ṃ': 'M','Ɱ': 'M','Ń': 'N','Ň': 'N','Ņ': 'N','Ṋ': 'N','Ṅ': 'N','Ṇ': 'N','Ǹ': 'N','Ɲ': 'N','Ṉ': 'N','Ƞ': 'N','Nj': 'N','Ñ': 'N','NJ': 'NJ','Ó': 'O','Ŏ': 'O','Ǒ': 'O','Ô': 'O','Ố': 'O','Ộ': 'O','Ồ': 'O','Ổ': 'O','Ỗ': 'O','Ö': 'O','Ȫ': 'O','Ȯ': 'O','Ȱ': 'O','Ọ': 'O','Ő': 'O','Ȍ': 'O','Ò': 'O','Ỏ': 'O','Ơ': 'O','Ớ': 'O','Ợ': 'O','Ờ': 'O','Ở': 'O','Ỡ': 'O','Ȏ': 'O','Ꝋ': 'O','Ꝍ': 'O','Ō': 'O','Ṓ': 'O','Ṑ': 'O','Ɵ': 'O','Ǫ': 'O','Ǭ': 'O','Ø': 'O','Ǿ': 'O','Õ': 'O','Ṍ': 'O','Ṏ': 'O','Ȭ': 'O','Ƣ': 'OI','Ꝏ': 'OO','Ɛ': 'E','Ɔ': 'O','Ȣ': 'OU','Ṕ': 'P','Ṗ': 'P','Ꝓ': 'P','Ƥ': 'P','Ꝕ': 'P','Ᵽ': 'P','Ꝑ': 'P','Ꝙ': 'Q','Ꝗ': 'Q','Ŕ': 'R','Ř': 'R','Ŗ': 'R','Ṙ': 'R','Ṛ': 'R','Ṝ': 'R','Ȑ': 'R','Ȓ': 'R','Ṟ': 'R','Ɍ': 'R','Ɽ': 'R','Ꜿ': 'C','Ǝ': 'E','Ś': 'S','Ṥ': 'S','Š': 'S','Ṧ': 'S','Ş': 'S','Ŝ': 'S','Ș': 'S','Ṡ': 'S','Ṣ': 'S','Ṩ': 'S','ẞ': 'SS','Ť': 'T','Ţ': 'T','Ṱ': 'T','Ț': 'T','Ⱦ': 'T','Ṫ': 'T','Ṭ': 'T','Ƭ': 'T','Ṯ': 'T','Ʈ': 'T','Ŧ': 'T','Ɐ': 'A','Ꞁ': 'L','Ɯ': 'M','Ʌ': 'V','Ꜩ': 'TZ','Ú': 'U','Ŭ': 'U','Ǔ': 'U','Û': 'U','Ṷ': 'U','Ü': 'U','Ǘ': 'U','Ǚ': 'U','Ǜ': 'U','Ǖ': 'U','Ṳ': 'U','Ụ': 'U','Ű': 'U','Ȕ': 'U','Ù': 'U','Ủ': 'U','Ư': 'U','Ứ': 'U','Ự': 'U','Ừ': 'U','Ử': 'U','Ữ': 'U','Ȗ': 'U','Ū': 'U','Ṻ': 'U','Ų': 'U','Ů': 'U','Ũ': 'U','Ṹ': 'U','Ṵ': 'U','Ꝟ': 'V','Ṿ': 'V','Ʋ': 'V','Ṽ': 'V','Ꝡ': 'VY','Ẃ': 'W','Ŵ': 'W','Ẅ': 'W','Ẇ': 'W','Ẉ': 'W','Ẁ': 'W','Ⱳ': 'W','Ẍ': 'X','Ẋ': 'X','Ý': 'Y','Ŷ': 'Y','Ÿ': 'Y','Ẏ': 'Y','Ỵ': 'Y','Ỳ': 'Y','Ƴ': 'Y','Ỷ': 'Y','Ỿ': 'Y','Ȳ': 'Y','Ɏ': 'Y','Ỹ': 'Y','Ź': 'Z','Ž': 'Z','Ẑ': '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','ẳ': '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','ƀ': 'b','ƃ': 'b','ɵ': 'o','ć': 'c','č': 'c','ç': 'c','ḉ': 'c','ĉ': 'c','ɕ': 'c','ċ': 'c','ƈ': 'c','ȼ': 'c','ď': 'd','ḑ': 'd','ḓ': 'd','ȡ': 'd','ḋ': 'd','ḍ': 'd','ɗ': 'd','ᶑ': 'd','ḏ': 'd','ᵭ': 'd','ᶁ': 'd','đ': 'd','ɖ': 'd','ƌ': 'd','ı': 'i','ȷ': 'j','ɟ': 'j','ʄ': 'j','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','ẽ': 'e','ḛ': 'e','ꝫ': 'et','ḟ': 'f','ƒ': 'f','ᵮ': 'f','ᶂ': 'f','ǵ': 'g','ğ': 'g','ǧ': 'g','ģ': 'g','ĝ': 'g','ġ': 'g','ɠ': 'g','ḡ': 'g','ᶃ': 'g','ǥ': 'g','ḫ': 'h','ȟ': 'h','ḩ': 'h','ĥ': 'h','ⱨ': 'h','ḧ': 'h','ḣ': 'h','ḥ': 'h','ɦ': 'h','ẖ': 'h','ħ': 'h','ƕ': 'hv','í': 'i','ĭ': 'i','ǐ': 'i','î': 'i','ï': 'i','ḯ': 'i','ị': 'i','ȉ': 'i','ì': 'i','ỉ': 'i','ȋ': 'i','ī': 'i','į': 'i','ᶖ': 'i','ɨ': 'i','ĩ': 'i','ḭ': 'i','ꝺ': 'd','ꝼ': 'f','ᵹ': 'g','ꞃ': 'r','ꞅ': 's','ꞇ': 't','ꝭ': 'is','ǰ': 'j','ĵ': 'j','ʝ': 'j','ɉ': 'j','ḱ': 'k','ǩ': 'k','ķ': 'k','ⱪ': 'k','ꝃ': 'k','ḳ': 'k','ƙ': 'k','ḵ': 'k','ᶄ': 'k','ꝁ': 'k','ꝅ': 'k','ĺ': 'l','ƚ': 'l','ɬ': 'l','ľ': 'l','ļ': 'l','ḽ': 'l','ȴ': 'l','ḷ': 'l','ḹ': 'l','ⱡ': 'l','ꝉ': 'l','ḻ': 'l','ŀ': 'l','ɫ': 'l','ᶅ': 'l','ɭ': 'l','ł': 'l','lj': 'lj','ſ': 's','ẜ': 's','ẛ': 's','ẝ': 's','ḿ': 'm','ṁ': 'm','ṃ': 'm','ɱ': 'm','ᵯ': 'm','ᶆ': 'm','ń': 'n','ň': 'n','ņ': 'n','ṋ': 'n','ȵ': 'n','ṅ': 'n','ṇ': 'n','ǹ': 'n','ɲ': 'n','ṉ': 'n','ƞ': 'n','ᵰ': 'n','ᶇ': 'n','ɳ': 'n','ñ': 'n','nj': 'nj','ó': 'o','ŏ': 'o','ǒ': 'o','ô': 'o','ố': 'o','ộ': 'o','ồ': 'o','ổ': 'o','ỗ': 'o','ö': 'o','ȫ': 'o','ȯ': 'o','ȱ': 'o','ọ': 'o','ő': 'o','ȍ': 'o','ò': 'o','ỏ': 'o','ơ': 'o','ớ': 'o','ợ': 'o','ờ': 'o','ở': 'o','ỡ': 'o','ȏ': 'o','ꝋ': 'o','ꝍ': 'o','ⱺ': 'o','ō': 'o','ṓ': 'o','ṑ': 'o','ǫ': 'o','ǭ': 'o','ø': 'o','ǿ': 'o','õ': 'o','ṍ': 'o','ṏ': 'o','ȭ': 'o','ƣ': 'oi','ꝏ': 'oo','ɛ': 'e','ᶓ': 'e','ɔ': 'o','ᶗ': 'o','ȣ': 'ou','ṕ': 'p','ṗ': 'p','ꝓ': 'p','ƥ': 'p','ᵱ': 'p','ᶈ': 'p','ꝕ': 'p','ᵽ': 'p','ꝑ': 'p','ꝙ': 'q','ʠ': 'q','ɋ': 'q','ꝗ': 'q','ŕ': 'r','ř': 'r','ŗ': 'r','ṙ': 'r','ṛ': 'r','ṝ': 'r','ȑ': 'r','ɾ': 'r','ᵳ': 'r','ȓ': 'r','ṟ': 'r','ɼ': 'r','ᵲ': 'r','ᶉ': 'r','ɍ': 'r','ɽ': 'r','ↄ': 'c','ꜿ': 'c','ɘ': 'e','ɿ': 'r','ś': 's','ṥ': 's','š': 's','ṧ': 's','ş': 's','ŝ': 's','ș': 's','ṡ': 's','ṣ': 's','ṩ': 's','ʂ': 's','ᵴ': 's','ᶊ': 's','ȿ': 's','ɡ': 'g','ß': 'ss','ᴑ': 'o','ᴓ': 'o','ᴝ': 'u','ť': 't','ţ': 't','ṱ': 't','ț': 't','ȶ': 't','ẗ': 't','ⱦ': 't','ṫ': 't','ṭ': 't','ƭ': 't','ṯ': 't','ᵵ': 't','ƫ': 't','ʈ': 't','ŧ': 't','ᵺ': 'th','ɐ': 'a','ᴂ': 'ae','ǝ': 'e','ᵷ': 'g','ɥ': 'h','ʮ': 'h','ʯ': 'h','ᴉ': 'i','ʞ': 'k','ꞁ': 'l','ɯ': 'm','ɰ': 'm','ᴔ': 'oe','ɹ': 'r','ɻ': 'r','ɺ': 'r','ⱹ': 'r','ʇ': 't','ʌ': 'v','ʍ': 'w','ʎ': 'y','ꜩ': 'tz','ú': 'u','ŭ': 'u','ǔ': 'u','û': 'u','ṷ': 'u','ü': 'u','ǘ': 'u','ǚ': 'u','ǜ': 'u','ǖ': 'u','ṳ': 'u','ụ': 'u','ű': 'u','ȕ': 'u','ù': 'u','ủ': 'u','ư': 'u','ứ': 'u','ự': 'u','ừ': 'u','ử': 'u','ữ': 'u','ȗ': 'u','ū': 'u','ṻ': 'u','ų': 'u','ᶙ': 'u','ů': 'u','ũ': 'u','ṹ': 'u','ṵ': 'u','ᵫ': 'ue','ꝸ': 'um','ⱴ': 'v','ꝟ': 'v','ṿ': 'v','ʋ': 'v','ᶌ': 'v','ⱱ': 'v','ṽ': 'v','ꝡ': 'vy','ẃ': 'w','ŵ': 'w','ẅ': 'w','ẇ': 'w','ẉ': 'w','ẁ': 'w','ⱳ': 'w','ẘ': 'w','ẍ': 'x','ẋ': 'x','ᶍ': 'x','ý': 'y','ŷ': 'y','ÿ': 'y','ẏ': 'y','ỵ': 'y','ỳ': 'y','ƴ': 'y','ỷ': 'y','ỿ': 'y','ȳ': 'y','ẙ': 'y','ɏ': 'y','ỹ': 'y','ź': 'z','ž': 'z','ẑ': 'z','ʑ': 'z','ⱬ': 'z','ż': 'z','ẓ': 'z','ȥ': 'z','ẕ': 'z','ᵶ': 'z','ᶎ': 'z','ʐ': 'z','ƶ': 'z','ɀ': 'z','ff': 'ff','ffi': 'ffi','ffl': 'ffl','fi': 'fi','fl': 'fl','ij': 'ij','œ': 'oe','st': 'st','ₐ': 'a','ₑ': 'e','ᵢ': 'i','ⱼ': 'j','ₒ': 'o','ᵣ': 'r','ᵤ': 'u','ᵥ': 'v','ₓ': 'x','Ё': 'YO', 'Й': 'I', 'Ц': 'TS', 'У': 'U', 'К': 'K', 'Е': 'E', 'Н': 'N', 'Г': 'G', 'Ш': 'SH', 'Щ': 'SCH', 'З': 'Z', 'Х': 'H', 'Ъ': '', 'ё': 'yo', 'й': 'i', 'ц': 'ts', 'у': 'u', 'к': 'k', 'е': 'e', 'н': 'n', 'г': 'g', 'ш': 'sh', 'щ': 'sch', 'з': 'z', 'х': 'h', 'ъ': '', 'Ф': 'F', 'Ы': 'I', 'В': 'V', 'А': 'A', 'П': 'P', 'Р': 'R', 'О': 'O', 'Л': 'L', 'Д': 'D', 'Ж': 'ZH', 'Э': 'E', 'ф': 'f', 'ы': 'i', 'в': 'v', 'а': 'a', 'п': 'p', 'р': 'r', 'о': 'o', 'л': 'l', 'д': 'd', 'ж': 'zh', 'э': 'e', 'Я': 'Ya', 'Ч': 'CH', 'С': 'S', 'М': 'M', 'И': 'I', 'Т': 'T', 'Ь': '', 'Б': 'B', 'Ю': 'YU', 'я': 'ya', 'ч': 'ch', 'с': 's', 'м': 'm', 'и': 'i', 'т': 't', 'ь': '', 'б': 'b', 'ю': 'yu'} - -// ConfigStorage -//;(function (window) { - var keyPrefix = ''; - var noPrefix = false; - var cache = {}; - var useCs = !!(window.chrome && chrome.storage && chrome.storage.local); - var useLs = !useCs && !!window.localStorage; - - function storageSetPrefix(newPrefix) { - keyPrefix = newPrefix; - } - - function storageSetNoPrefix() { - noPrefix = true; - } - - function storageGetPrefix() { - if(noPrefix) { - noPrefix = false; - return ''; - } - - return keyPrefix; - } - - function storageGetValue(keys, callback) { - var single = false; - if(!Array.isArray(keys)) { - keys = Array.prototype.slice.call(arguments); - callback = keys.pop(); - single = keys.length == 1; - } - var result = [], - value; - var allFound = true; - var prefix = storageGetPrefix(), - i, key; - - for(i = 0; i < keys.length; i++) { - key = keys[i] = prefix + keys[i]; - if(key.substr(0, 3) != 'xt_' && cache[key] !== undefined) { - result.push(cache[key]); - } else if(useLs) { - try { - value = localStorage.getItem(key); - } catch(e) { - useLs = false; - } - - try { - value = (value === undefined || value === null) ? false : JSON.parse(value); - } catch(e) { - value = false; - } - result.push(cache[key] = value); - } else if(!useCs) { - result.push(cache[key] = false); - } else { - allFound = false; - } - } - - if(allFound) { - return callback(single ? result[0] : result); - } - - chrome.storage.local.get(keys, function(resultObj) { - var value; - result = []; - for(i = 0; i < keys.length; i++) { - key = keys[i]; - value = resultObj[key]; - value = value === undefined || value === null ? false : JSON.parse(value); - result.push(cache[key] = value); - } - - callback(single ? result[0] : result); - }); - } - - function storageSetValue(obj, callback) { - var keyValues = {}; - var prefix = storageGetPrefix(), - key, value; - - //console.log('storageSetValue', obj, callback, arguments); - - for(key in obj) { - if(obj.hasOwnProperty(key)) { - value = obj[key]; - key = prefix + key; - cache[key] = value; - //value = value instanceof Uint8Array ? Array.from(value) : JSON.stringify(value); - value = JSON.stringify(value); - if(useLs) { - try { - //console.log('setItem', key, value); - localStorage.setItem(key, value); - } catch (e) { - useLs = false; - } - } else { - keyValues[key] = value; - } - } - } - - if(useLs || !useCs) { - if(callback) { - callback(); - } - - return; - } - - chrome.storage.local.set(keyValues, callback); - } - - function storageRemoveValue(keys, callback) { - if(!Array.isArray(keys)) { - keys = Array.prototype.slice.call(arguments) - if(typeof keys[keys.length - 1] === 'function') { - callback = keys.pop(); - } - } - - var prefix = storageGetPrefix(), - i, key; - - for(i = 0; i < keys.length; i++) { - key = keys[i] = prefix + keys[i]; - delete cache[key]; - if(useLs) { - try { - localStorage.removeItem(key); - } catch(e) { - useLs = false; - } - } - } - - if(useCs) { - chrome.storage.local.remove(keys, callback); - } else if(callback) { - callback(); - } - } - - function storageClear(callback) { - if(useLs) { - try { - localStorage.clear(); - } catch (e) { - useLs = false; - } - } - - if(useCs) { - chrome.storage.local.clear(function() { - cache = {}; - callback(); - }) - } else { - cache = {}; - callback(); - } - } - - - - window.ConfigStorage = { - prefix: storageSetPrefix, - noPrefix: storageSetNoPrefix, - get: storageGetValue, - set: storageSetValue, - remove: storageRemoveValue, - clear: storageClear - }; - - //window.Config = Config; - - Config.Storage = window.ConfigStorage; - - module.exports = Config; -//})(this) diff --git a/src/lib/config.ts b/src/lib/config.ts new file mode 100644 index 00000000..76b36302 --- /dev/null +++ b/src/lib/config.ts @@ -0,0 +1,75 @@ +/*! + * Webogram v0.7.0 - messaging web application for MTProto + * https://github.com/zhukov/webogram + * Copyright (C) 2014 Igor Zhukov + * https://github.com/zhukov/webogram/blob/master/LICENSE + */ + +/* + + IMPORTANT NOTICE + ================ + + Do not publish your Webogram fork with my app credentials (below), or your application may be blocked. + You can get your own api_id, api_hash at https://my.telegram.org, see manual at https://core.telegram.org/api/obtaining_api_id. + +*/ + +{ + /* let img_size = 32; + let side = 52; + let sheetUrl = `assets/img/sheet_apple_${img_size}_`; // #.png + let multiplyX = 100 / 6; + let sheetSizeX = 6 * (img_size + 2); // size of image in pixels + let sheetSizeY = side * (img_size + 2); // size of image in pixels + let sizeX = 100 * (sheetSizeX / img_size); + let sizeY = 100 * (sheetSizeY / img_size); + let splitted = true; */ + + let img_size = 64; + let side = 56; + let sheetUrl = `assets/img/sheet_apple_${img_size}`; // #.png + let multiplyX = 100 / side; + let sheetSizeX = side * (img_size + 2); // size of image in pixels + let sheetSizeY = side * (img_size + 2); // size of image in pixels + let sizeX = 100 * (sheetSizeX / img_size); + let sizeY = 100 * (sheetSizeY / img_size); + let splitted = false; + + var Emoji = { + img_size, + sheetUrl, + multiplyX, + sheetSizeX, + sheetSizeY, + sizeX, + sizeY, + side, + splitted, + keyCategory: 'category', + keyX: 'sheet_x', + keyY: 'sheet_y', + /* keyCategory: '2', + keyX: '0', // 'sheet_x' + keyY: '1', // 'sheet_y' */ + + emoji: {"#️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":0,"sort_order":132},"*️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":1,"sort_order":133},"0️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":2,"sort_order":134},"1️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":3,"sort_order":135},"2️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":4,"sort_order":136},"3️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":5,"sort_order":137},"4️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":6,"sort_order":138},"5️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":7,"sort_order":139},"6️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":8,"sort_order":140},"7️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":9,"sort_order":141},"8️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":10,"sort_order":142},"9️⃣":{"category":"Symbols","sheet_x":0,"sheet_y":11,"sort_order":143},"©️":{"category":"Symbols","sheet_x":0,"sheet_y":12,"sort_order":129},"®️":{"category":"Symbols","sheet_x":0,"sheet_y":13,"sort_order":130},"🀄":{"category":"Activities","sheet_x":0,"sheet_y":14,"sort_order":73},"🃏":{"category":"Activities","sheet_x":0,"sheet_y":15,"sort_order":72},"🅰️":{"category":"Symbols","sheet_x":0,"sheet_y":16,"sort_order":150},"🅱️":{"category":"Symbols","sheet_x":0,"sheet_y":17,"sort_order":152},"🅾️":{"category":"Symbols","sheet_x":0,"sheet_y":18,"sort_order":161},"🅿️":{"category":"Symbols","sheet_x":0,"sheet_y":19,"sort_order":163},"🆎":{"category":"Symbols","sheet_x":0,"sheet_y":20,"sort_order":151},"🆑":{"category":"Symbols","sheet_x":0,"sheet_y":21,"sort_order":153},"🆒":{"category":"Symbols","sheet_x":0,"sheet_y":22,"sort_order":154},"🆓":{"category":"Symbols","sheet_x":0,"sheet_y":23,"sort_order":155},"🆔":{"category":"Symbols","sheet_x":0,"sheet_y":24,"sort_order":157},"🆕":{"category":"Symbols","sheet_x":0,"sheet_y":25,"sort_order":159},"🆖":{"category":"Symbols","sheet_x":0,"sheet_y":26,"sort_order":160},"🆗":{"category":"Symbols","sheet_x":0,"sheet_y":27,"sort_order":162},"🆘":{"category":"Symbols","sheet_x":0,"sheet_y":28,"sort_order":164},"🆙":{"category":"Symbols","sheet_x":0,"sheet_y":29,"sort_order":165},"🆚":{"category":"Symbols","sheet_x":0,"sheet_y":30,"sort_order":166},"🇦🇨":{"category":"Flags","sheet_x":0,"sheet_y":31,"sort_order":8},"🇦🇩":{"category":"Flags","sheet_x":0,"sheet_y":32,"sort_order":9},"🇦🇪":{"category":"Flags","sheet_x":0,"sheet_y":33,"sort_order":10},"🇦🇫":{"category":"Flags","sheet_x":0,"sheet_y":34,"sort_order":11},"🇦🇬":{"category":"Flags","sheet_x":0,"sheet_y":35,"sort_order":12},"🇦🇮":{"category":"Flags","sheet_x":0,"sheet_y":36,"sort_order":13},"🇦🇱":{"category":"Flags","sheet_x":0,"sheet_y":37,"sort_order":14},"🇦🇲":{"category":"Flags","sheet_x":0,"sheet_y":38,"sort_order":15},"🇦🇴":{"category":"Flags","sheet_x":0,"sheet_y":39,"sort_order":16},"🇦🇶":{"category":"Flags","sheet_x":0,"sheet_y":40,"sort_order":17},"🇦🇷":{"category":"Flags","sheet_x":0,"sheet_y":41,"sort_order":18},"🇦🇸":{"category":"Flags","sheet_x":0,"sheet_y":42,"sort_order":19},"🇦🇹":{"category":"Flags","sheet_x":0,"sheet_y":43,"sort_order":20},"🇦🇺":{"category":"Flags","sheet_x":0,"sheet_y":44,"sort_order":21},"🇦🇼":{"category":"Flags","sheet_x":0,"sheet_y":45,"sort_order":22},"🇦🇽":{"category":"Flags","sheet_x":0,"sheet_y":46,"sort_order":23},"🇦🇿":{"category":"Flags","sheet_x":0,"sheet_y":47,"sort_order":24},"🇧🇦":{"category":"Flags","sheet_x":0,"sheet_y":48,"sort_order":25},"🇧🇧":{"category":"Flags","sheet_x":0,"sheet_y":49,"sort_order":26},"🇧🇩":{"category":"Flags","sheet_x":0,"sheet_y":50,"sort_order":27},"🇧🇪":{"category":"Flags","sheet_x":0,"sheet_y":51,"sort_order":28},"🇧🇫":{"category":"Flags","sheet_x":0,"sheet_y":52,"sort_order":29},"🇧🇬":{"category":"Flags","sheet_x":0,"sheet_y":53,"sort_order":30},"🇧🇭":{"category":"Flags","sheet_x":0,"sheet_y":54,"sort_order":31},"🇧🇮":{"category":"Flags","sheet_x":0,"sheet_y":55,"sort_order":32},"🇧🇯":{"category":"Flags","sheet_x":0,"sheet_y":56,"sort_order":33},"🇧🇱":{"category":"Flags","sheet_x":1,"sheet_y":0,"sort_order":34},"🇧🇲":{"category":"Flags","sheet_x":1,"sheet_y":1,"sort_order":35},"🇧🇳":{"category":"Flags","sheet_x":1,"sheet_y":2,"sort_order":36},"🇧🇴":{"category":"Flags","sheet_x":1,"sheet_y":3,"sort_order":37},"🇧🇶":{"category":"Flags","sheet_x":1,"sheet_y":4,"sort_order":38},"🇧🇷":{"category":"Flags","sheet_x":1,"sheet_y":5,"sort_order":39},"🇧🇸":{"category":"Flags","sheet_x":1,"sheet_y":6,"sort_order":40},"🇧🇹":{"category":"Flags","sheet_x":1,"sheet_y":7,"sort_order":41},"🇧🇻":{"category":"Flags","sheet_x":1,"sheet_y":8,"sort_order":42},"🇧🇼":{"category":"Flags","sheet_x":1,"sheet_y":9,"sort_order":43},"🇧🇾":{"category":"Flags","sheet_x":1,"sheet_y":10,"sort_order":44},"🇧🇿":{"category":"Flags","sheet_x":1,"sheet_y":11,"sort_order":45},"🇨🇦":{"category":"Flags","sheet_x":1,"sheet_y":12,"sort_order":46},"🇨🇨":{"category":"Flags","sheet_x":1,"sheet_y":13,"sort_order":47},"🇨🇩":{"category":"Flags","sheet_x":1,"sheet_y":14,"sort_order":48},"🇨🇫":{"category":"Flags","sheet_x":1,"sheet_y":15,"sort_order":49},"🇨🇬":{"category":"Flags","sheet_x":1,"sheet_y":16,"sort_order":50},"🇨🇭":{"category":"Flags","sheet_x":1,"sheet_y":17,"sort_order":51},"🇨🇮":{"category":"Flags","sheet_x":1,"sheet_y":18,"sort_order":52},"🇨🇰":{"category":"Flags","sheet_x":1,"sheet_y":19,"sort_order":53},"🇨🇱":{"category":"Flags","sheet_x":1,"sheet_y":20,"sort_order":54},"🇨🇲":{"category":"Flags","sheet_x":1,"sheet_y":21,"sort_order":55},"🇨🇳":{"category":"Flags","sheet_x":1,"sheet_y":22,"sort_order":56},"🇨🇴":{"category":"Flags","sheet_x":1,"sheet_y":23,"sort_order":57},"🇨🇵":{"category":"Flags","sheet_x":1,"sheet_y":24,"sort_order":58},"🇨🇷":{"category":"Flags","sheet_x":1,"sheet_y":25,"sort_order":59},"🇨🇺":{"category":"Flags","sheet_x":1,"sheet_y":26,"sort_order":60},"🇨🇻":{"category":"Flags","sheet_x":1,"sheet_y":27,"sort_order":61},"🇨🇼":{"category":"Flags","sheet_x":1,"sheet_y":28,"sort_order":62},"🇨🇽":{"category":"Flags","sheet_x":1,"sheet_y":29,"sort_order":63},"🇨🇾":{"category":"Flags","sheet_x":1,"sheet_y":30,"sort_order":64},"🇨🇿":{"category":"Flags","sheet_x":1,"sheet_y":31,"sort_order":65},"🇩🇪":{"category":"Flags","sheet_x":1,"sheet_y":32,"sort_order":66},"🇩🇬":{"category":"Flags","sheet_x":1,"sheet_y":33,"sort_order":67},"🇩🇯":{"category":"Flags","sheet_x":1,"sheet_y":34,"sort_order":68},"🇩🇰":{"category":"Flags","sheet_x":1,"sheet_y":35,"sort_order":69},"🇩🇲":{"category":"Flags","sheet_x":1,"sheet_y":36,"sort_order":70},"🇩🇴":{"category":"Flags","sheet_x":1,"sheet_y":37,"sort_order":71},"🇩🇿":{"category":"Flags","sheet_x":1,"sheet_y":38,"sort_order":72},"🇪🇦":{"category":"Flags","sheet_x":1,"sheet_y":39,"sort_order":73},"🇪🇨":{"category":"Flags","sheet_x":1,"sheet_y":40,"sort_order":74},"🇪🇪":{"category":"Flags","sheet_x":1,"sheet_y":41,"sort_order":75},"🇪🇬":{"category":"Flags","sheet_x":1,"sheet_y":42,"sort_order":76},"🇪🇭":{"category":"Flags","sheet_x":1,"sheet_y":43,"sort_order":77},"🇪🇷":{"category":"Flags","sheet_x":1,"sheet_y":44,"sort_order":78},"🇪🇸":{"category":"Flags","sheet_x":1,"sheet_y":45,"sort_order":79},"🇪🇹":{"category":"Flags","sheet_x":1,"sheet_y":46,"sort_order":80},"🇪🇺":{"category":"Flags","sheet_x":1,"sheet_y":47,"sort_order":81},"🇫🇮":{"category":"Flags","sheet_x":1,"sheet_y":48,"sort_order":82},"🇫🇯":{"category":"Flags","sheet_x":1,"sheet_y":49,"sort_order":83},"🇫🇰":{"category":"Flags","sheet_x":1,"sheet_y":50,"sort_order":84},"🇫🇲":{"category":"Flags","sheet_x":1,"sheet_y":51,"sort_order":85},"🇫🇴":{"category":"Flags","sheet_x":1,"sheet_y":52,"sort_order":86},"🇫🇷":{"category":"Flags","sheet_x":1,"sheet_y":53,"sort_order":87},"🇬🇦":{"category":"Flags","sheet_x":1,"sheet_y":54,"sort_order":88},"🇬🇧":{"category":"Flags","sheet_x":1,"sheet_y":55,"sort_order":89},"🇬🇩":{"category":"Flags","sheet_x":1,"sheet_y":56,"sort_order":90},"🇬🇪":{"category":"Flags","sheet_x":2,"sheet_y":0,"sort_order":91},"🇬🇫":{"category":"Flags","sheet_x":2,"sheet_y":1,"sort_order":92},"🇬🇬":{"category":"Flags","sheet_x":2,"sheet_y":2,"sort_order":93},"🇬🇭":{"category":"Flags","sheet_x":2,"sheet_y":3,"sort_order":94},"🇬🇮":{"category":"Flags","sheet_x":2,"sheet_y":4,"sort_order":95},"🇬🇱":{"category":"Flags","sheet_x":2,"sheet_y":5,"sort_order":96},"🇬🇲":{"category":"Flags","sheet_x":2,"sheet_y":6,"sort_order":97},"🇬🇳":{"category":"Flags","sheet_x":2,"sheet_y":7,"sort_order":98},"🇬🇵":{"category":"Flags","sheet_x":2,"sheet_y":8,"sort_order":99},"🇬🇶":{"category":"Flags","sheet_x":2,"sheet_y":9,"sort_order":100},"🇬🇷":{"category":"Flags","sheet_x":2,"sheet_y":10,"sort_order":101},"🇬🇸":{"category":"Flags","sheet_x":2,"sheet_y":11,"sort_order":102},"🇬🇹":{"category":"Flags","sheet_x":2,"sheet_y":12,"sort_order":103},"🇬🇺":{"category":"Flags","sheet_x":2,"sheet_y":13,"sort_order":104},"🇬🇼":{"category":"Flags","sheet_x":2,"sheet_y":14,"sort_order":105},"🇬🇾":{"category":"Flags","sheet_x":2,"sheet_y":15,"sort_order":106},"🇭🇰":{"category":"Flags","sheet_x":2,"sheet_y":16,"sort_order":107},"🇭🇲":{"category":"Flags","sheet_x":2,"sheet_y":17,"sort_order":108},"🇭🇳":{"category":"Flags","sheet_x":2,"sheet_y":18,"sort_order":109},"🇭🇷":{"category":"Flags","sheet_x":2,"sheet_y":19,"sort_order":110},"🇭🇹":{"category":"Flags","sheet_x":2,"sheet_y":20,"sort_order":111},"🇭🇺":{"category":"Flags","sheet_x":2,"sheet_y":21,"sort_order":112},"🇮🇨":{"category":"Flags","sheet_x":2,"sheet_y":22,"sort_order":113},"🇮🇩":{"category":"Flags","sheet_x":2,"sheet_y":23,"sort_order":114},"🇮🇪":{"category":"Flags","sheet_x":2,"sheet_y":24,"sort_order":115},"🇮🇱":{"category":"Flags","sheet_x":2,"sheet_y":25,"sort_order":116},"🇮🇲":{"category":"Flags","sheet_x":2,"sheet_y":26,"sort_order":117},"🇮🇳":{"category":"Flags","sheet_x":2,"sheet_y":27,"sort_order":118},"🇮🇴":{"category":"Flags","sheet_x":2,"sheet_y":28,"sort_order":119},"🇮🇶":{"category":"Flags","sheet_x":2,"sheet_y":29,"sort_order":120},"🇮🇷":{"category":"Flags","sheet_x":2,"sheet_y":30,"sort_order":121},"🇮🇸":{"category":"Flags","sheet_x":2,"sheet_y":31,"sort_order":122},"🇮🇹":{"category":"Flags","sheet_x":2,"sheet_y":32,"sort_order":123},"🇯🇪":{"category":"Flags","sheet_x":2,"sheet_y":33,"sort_order":124},"🇯🇲":{"category":"Flags","sheet_x":2,"sheet_y":34,"sort_order":125},"🇯🇴":{"category":"Flags","sheet_x":2,"sheet_y":35,"sort_order":126},"🇯🇵":{"category":"Flags","sheet_x":2,"sheet_y":36,"sort_order":127},"🇰🇪":{"category":"Flags","sheet_x":2,"sheet_y":37,"sort_order":128},"🇰🇬":{"category":"Flags","sheet_x":2,"sheet_y":38,"sort_order":129},"🇰🇭":{"category":"Flags","sheet_x":2,"sheet_y":39,"sort_order":130},"🇰🇮":{"category":"Flags","sheet_x":2,"sheet_y":40,"sort_order":131},"🇰🇲":{"category":"Flags","sheet_x":2,"sheet_y":41,"sort_order":132},"🇰🇳":{"category":"Flags","sheet_x":2,"sheet_y":42,"sort_order":133},"🇰🇵":{"category":"Flags","sheet_x":2,"sheet_y":43,"sort_order":134},"🇰🇷":{"category":"Flags","sheet_x":2,"sheet_y":44,"sort_order":135},"🇰🇼":{"category":"Flags","sheet_x":2,"sheet_y":45,"sort_order":136},"🇰🇾":{"category":"Flags","sheet_x":2,"sheet_y":46,"sort_order":137},"🇰🇿":{"category":"Flags","sheet_x":2,"sheet_y":47,"sort_order":138},"🇱🇦":{"category":"Flags","sheet_x":2,"sheet_y":48,"sort_order":139},"🇱🇧":{"category":"Flags","sheet_x":2,"sheet_y":49,"sort_order":140},"🇱🇨":{"category":"Flags","sheet_x":2,"sheet_y":50,"sort_order":141},"🇱🇮":{"category":"Flags","sheet_x":2,"sheet_y":51,"sort_order":142},"🇱🇰":{"category":"Flags","sheet_x":2,"sheet_y":52,"sort_order":143},"🇱🇷":{"category":"Flags","sheet_x":2,"sheet_y":53,"sort_order":144},"🇱🇸":{"category":"Flags","sheet_x":2,"sheet_y":54,"sort_order":145},"🇱🇹":{"category":"Flags","sheet_x":2,"sheet_y":55,"sort_order":146},"🇱🇺":{"category":"Flags","sheet_x":2,"sheet_y":56,"sort_order":147},"🇱🇻":{"category":"Flags","sheet_x":3,"sheet_y":0,"sort_order":148},"🇱🇾":{"category":"Flags","sheet_x":3,"sheet_y":1,"sort_order":149},"🇲🇦":{"category":"Flags","sheet_x":3,"sheet_y":2,"sort_order":150},"🇲🇨":{"category":"Flags","sheet_x":3,"sheet_y":3,"sort_order":151},"🇲🇩":{"category":"Flags","sheet_x":3,"sheet_y":4,"sort_order":152},"🇲🇪":{"category":"Flags","sheet_x":3,"sheet_y":5,"sort_order":153},"🇲🇫":{"category":"Flags","sheet_x":3,"sheet_y":6,"sort_order":154},"🇲🇬":{"category":"Flags","sheet_x":3,"sheet_y":7,"sort_order":155},"🇲🇭":{"category":"Flags","sheet_x":3,"sheet_y":8,"sort_order":156},"🇲🇰":{"category":"Flags","sheet_x":3,"sheet_y":9,"sort_order":157},"🇲🇱":{"category":"Flags","sheet_x":3,"sheet_y":10,"sort_order":158},"🇲🇲":{"category":"Flags","sheet_x":3,"sheet_y":11,"sort_order":159},"🇲🇳":{"category":"Flags","sheet_x":3,"sheet_y":12,"sort_order":160},"🇲🇴":{"category":"Flags","sheet_x":3,"sheet_y":13,"sort_order":161},"🇲🇵":{"category":"Flags","sheet_x":3,"sheet_y":14,"sort_order":162},"🇲🇶":{"category":"Flags","sheet_x":3,"sheet_y":15,"sort_order":163},"🇲🇷":{"category":"Flags","sheet_x":3,"sheet_y":16,"sort_order":164},"🇲🇸":{"category":"Flags","sheet_x":3,"sheet_y":17,"sort_order":165},"🇲🇹":{"category":"Flags","sheet_x":3,"sheet_y":18,"sort_order":166},"🇲🇺":{"category":"Flags","sheet_x":3,"sheet_y":19,"sort_order":167},"🇲🇻":{"category":"Flags","sheet_x":3,"sheet_y":20,"sort_order":168},"🇲🇼":{"category":"Flags","sheet_x":3,"sheet_y":21,"sort_order":169},"🇲🇽":{"category":"Flags","sheet_x":3,"sheet_y":22,"sort_order":170},"🇲🇾":{"category":"Flags","sheet_x":3,"sheet_y":23,"sort_order":171},"🇲🇿":{"category":"Flags","sheet_x":3,"sheet_y":24,"sort_order":172},"🇳🇦":{"category":"Flags","sheet_x":3,"sheet_y":25,"sort_order":173},"🇳🇨":{"category":"Flags","sheet_x":3,"sheet_y":26,"sort_order":174},"🇳🇪":{"category":"Flags","sheet_x":3,"sheet_y":27,"sort_order":175},"🇳🇫":{"category":"Flags","sheet_x":3,"sheet_y":28,"sort_order":176},"🇳🇬":{"category":"Flags","sheet_x":3,"sheet_y":29,"sort_order":177},"🇳🇮":{"category":"Flags","sheet_x":3,"sheet_y":30,"sort_order":178},"🇳🇱":{"category":"Flags","sheet_x":3,"sheet_y":31,"sort_order":179},"🇳🇴":{"category":"Flags","sheet_x":3,"sheet_y":32,"sort_order":180},"🇳🇵":{"category":"Flags","sheet_x":3,"sheet_y":33,"sort_order":181},"🇳🇷":{"category":"Flags","sheet_x":3,"sheet_y":34,"sort_order":182},"🇳🇺":{"category":"Flags","sheet_x":3,"sheet_y":35,"sort_order":183},"🇳🇿":{"category":"Flags","sheet_x":3,"sheet_y":36,"sort_order":184},"🇴🇲":{"category":"Flags","sheet_x":3,"sheet_y":37,"sort_order":185},"🇵🇦":{"category":"Flags","sheet_x":3,"sheet_y":38,"sort_order":186},"🇵🇪":{"category":"Flags","sheet_x":3,"sheet_y":39,"sort_order":187},"🇵🇫":{"category":"Flags","sheet_x":3,"sheet_y":40,"sort_order":188},"🇵🇬":{"category":"Flags","sheet_x":3,"sheet_y":41,"sort_order":189},"🇵🇭":{"category":"Flags","sheet_x":3,"sheet_y":42,"sort_order":190},"🇵🇰":{"category":"Flags","sheet_x":3,"sheet_y":43,"sort_order":191},"🇵🇱":{"category":"Flags","sheet_x":3,"sheet_y":44,"sort_order":192},"🇵🇲":{"category":"Flags","sheet_x":3,"sheet_y":45,"sort_order":193},"🇵🇳":{"category":"Flags","sheet_x":3,"sheet_y":46,"sort_order":194},"🇵🇷":{"category":"Flags","sheet_x":3,"sheet_y":47,"sort_order":195},"🇵🇸":{"category":"Flags","sheet_x":3,"sheet_y":48,"sort_order":196},"🇵🇹":{"category":"Flags","sheet_x":3,"sheet_y":49,"sort_order":197},"🇵🇼":{"category":"Flags","sheet_x":3,"sheet_y":50,"sort_order":198},"🇵🇾":{"category":"Flags","sheet_x":3,"sheet_y":51,"sort_order":199},"🇶🇦":{"category":"Flags","sheet_x":3,"sheet_y":52,"sort_order":200},"🇷🇪":{"category":"Flags","sheet_x":3,"sheet_y":53,"sort_order":201},"🇷🇴":{"category":"Flags","sheet_x":3,"sheet_y":54,"sort_order":202},"🇷🇸":{"category":"Flags","sheet_x":3,"sheet_y":55,"sort_order":203},"🇷🇺":{"category":"Flags","sheet_x":3,"sheet_y":56,"sort_order":204},"🇷🇼":{"category":"Flags","sheet_x":4,"sheet_y":0,"sort_order":205},"🇸🇦":{"category":"Flags","sheet_x":4,"sheet_y":1,"sort_order":206},"🇸🇧":{"category":"Flags","sheet_x":4,"sheet_y":2,"sort_order":207},"🇸🇨":{"category":"Flags","sheet_x":4,"sheet_y":3,"sort_order":208},"🇸🇩":{"category":"Flags","sheet_x":4,"sheet_y":4,"sort_order":209},"🇸🇪":{"category":"Flags","sheet_x":4,"sheet_y":5,"sort_order":210},"🇸🇬":{"category":"Flags","sheet_x":4,"sheet_y":6,"sort_order":211},"🇸🇭":{"category":"Flags","sheet_x":4,"sheet_y":7,"sort_order":212},"🇸🇮":{"category":"Flags","sheet_x":4,"sheet_y":8,"sort_order":213},"🇸🇯":{"category":"Flags","sheet_x":4,"sheet_y":9,"sort_order":214},"🇸🇰":{"category":"Flags","sheet_x":4,"sheet_y":10,"sort_order":215},"🇸🇱":{"category":"Flags","sheet_x":4,"sheet_y":11,"sort_order":216},"🇸🇲":{"category":"Flags","sheet_x":4,"sheet_y":12,"sort_order":217},"🇸🇳":{"category":"Flags","sheet_x":4,"sheet_y":13,"sort_order":218},"🇸🇴":{"category":"Flags","sheet_x":4,"sheet_y":14,"sort_order":219},"🇸🇷":{"category":"Flags","sheet_x":4,"sheet_y":15,"sort_order":220},"🇸🇸":{"category":"Flags","sheet_x":4,"sheet_y":16,"sort_order":221},"🇸🇹":{"category":"Flags","sheet_x":4,"sheet_y":17,"sort_order":222},"🇸🇻":{"category":"Flags","sheet_x":4,"sheet_y":18,"sort_order":223},"🇸🇽":{"category":"Flags","sheet_x":4,"sheet_y":19,"sort_order":224},"🇸🇾":{"category":"Flags","sheet_x":4,"sheet_y":20,"sort_order":225},"🇸🇿":{"category":"Flags","sheet_x":4,"sheet_y":21,"sort_order":226},"🇹🇦":{"category":"Flags","sheet_x":4,"sheet_y":22,"sort_order":227},"🇹🇨":{"category":"Flags","sheet_x":4,"sheet_y":23,"sort_order":228},"🇹🇩":{"category":"Flags","sheet_x":4,"sheet_y":24,"sort_order":229},"🇹🇫":{"category":"Flags","sheet_x":4,"sheet_y":25,"sort_order":230},"🇹🇬":{"category":"Flags","sheet_x":4,"sheet_y":26,"sort_order":231},"🇹🇭":{"category":"Flags","sheet_x":4,"sheet_y":27,"sort_order":232},"🇹🇯":{"category":"Flags","sheet_x":4,"sheet_y":28,"sort_order":233},"🇹🇰":{"category":"Flags","sheet_x":4,"sheet_y":29,"sort_order":234},"🇹🇱":{"category":"Flags","sheet_x":4,"sheet_y":30,"sort_order":235},"🇹🇲":{"category":"Flags","sheet_x":4,"sheet_y":31,"sort_order":236},"🇹🇳":{"category":"Flags","sheet_x":4,"sheet_y":32,"sort_order":237},"🇹🇴":{"category":"Flags","sheet_x":4,"sheet_y":33,"sort_order":238},"🇹🇷":{"category":"Flags","sheet_x":4,"sheet_y":34,"sort_order":239},"🇹🇹":{"category":"Flags","sheet_x":4,"sheet_y":35,"sort_order":240},"🇹🇻":{"category":"Flags","sheet_x":4,"sheet_y":36,"sort_order":241},"🇹🇼":{"category":"Flags","sheet_x":4,"sheet_y":37,"sort_order":242},"🇹🇿":{"category":"Flags","sheet_x":4,"sheet_y":38,"sort_order":243},"🇺🇦":{"category":"Flags","sheet_x":4,"sheet_y":39,"sort_order":244},"🇺🇬":{"category":"Flags","sheet_x":4,"sheet_y":40,"sort_order":245},"🇺🇲":{"category":"Flags","sheet_x":4,"sheet_y":41,"sort_order":246},"🇺🇳":{"category":"Flags","sheet_x":4,"sheet_y":42,"sort_order":247},"🇺🇸":{"category":"Flags","sheet_x":4,"sheet_y":43,"sort_order":248},"🇺🇾":{"category":"Flags","sheet_x":4,"sheet_y":44,"sort_order":249},"🇺🇿":{"category":"Flags","sheet_x":4,"sheet_y":45,"sort_order":250},"🇻🇦":{"category":"Flags","sheet_x":4,"sheet_y":46,"sort_order":251},"🇻🇨":{"category":"Flags","sheet_x":4,"sheet_y":47,"sort_order":252},"🇻🇪":{"category":"Flags","sheet_x":4,"sheet_y":48,"sort_order":253},"🇻🇬":{"category":"Flags","sheet_x":4,"sheet_y":49,"sort_order":254},"🇻🇮":{"category":"Flags","sheet_x":4,"sheet_y":50,"sort_order":255},"🇻🇳":{"category":"Flags","sheet_x":4,"sheet_y":51,"sort_order":256},"🇻🇺":{"category":"Flags","sheet_x":4,"sheet_y":52,"sort_order":257},"🇼🇫":{"category":"Flags","sheet_x":4,"sheet_y":53,"sort_order":258},"🇼🇸":{"category":"Flags","sheet_x":4,"sheet_y":54,"sort_order":259},"🇽🇰":{"category":"Flags","sheet_x":4,"sheet_y":55,"sort_order":260},"🇾🇪":{"category":"Flags","sheet_x":4,"sheet_y":56,"sort_order":261},"🇾🇹":{"category":"Flags","sheet_x":5,"sheet_y":0,"sort_order":262},"🇿🇦":{"category":"Flags","sheet_x":5,"sheet_y":1,"sort_order":263},"🇿🇲":{"category":"Flags","sheet_x":5,"sheet_y":2,"sort_order":264},"🇿🇼":{"category":"Flags","sheet_x":5,"sheet_y":3,"sort_order":265},"🈁":{"category":"Symbols","sheet_x":5,"sheet_y":4,"sort_order":167},"🈂️":{"category":"Symbols","sheet_x":5,"sheet_y":5,"sort_order":168},"🈚":{"category":"Symbols","sheet_x":5,"sheet_y":6,"sort_order":174},"🈯":{"category":"Symbols","sheet_x":5,"sheet_y":7,"sort_order":171},"🈲":{"category":"Symbols","sheet_x":5,"sheet_y":8,"sort_order":175},"🈳":{"category":"Symbols","sheet_x":5,"sheet_y":9,"sort_order":179},"🈴":{"category":"Symbols","sheet_x":5,"sheet_y":10,"sort_order":178},"🈵":{"category":"Symbols","sheet_x":5,"sheet_y":11,"sort_order":183},"🈶":{"category":"Symbols","sheet_x":5,"sheet_y":12,"sort_order":170},"🈷️":{"category":"Symbols","sheet_x":5,"sheet_y":13,"sort_order":169},"🈸":{"category":"Symbols","sheet_x":5,"sheet_y":14,"sort_order":177},"🈹":{"category":"Symbols","sheet_x":5,"sheet_y":15,"sort_order":173},"🈺":{"category":"Symbols","sheet_x":5,"sheet_y":16,"sort_order":182},"🉐":{"category":"Symbols","sheet_x":5,"sheet_y":17,"sort_order":172},"🉑":{"category":"Symbols","sheet_x":5,"sheet_y":18,"sort_order":176},"🌀":{"category":"Travel & Places","sheet_x":5,"sheet_y":19,"sort_order":197},"🌁":{"category":"Travel & Places","sheet_x":5,"sheet_y":20,"sort_order":49},"🌂":{"category":"Travel & Places","sheet_x":5,"sheet_y":21,"sort_order":199},"🌃":{"category":"Travel & Places","sheet_x":5,"sheet_y":22,"sort_order":50},"🌄":{"category":"Travel & Places","sheet_x":5,"sheet_y":23,"sort_order":52},"🌅":{"category":"Travel & Places","sheet_x":5,"sheet_y":24,"sort_order":53},"🌆":{"category":"Travel & Places","sheet_x":5,"sheet_y":25,"sort_order":54},"🌇":{"category":"Travel & Places","sheet_x":5,"sheet_y":26,"sort_order":55},"🌈":{"category":"Travel & Places","sheet_x":5,"sheet_y":27,"sort_order":198},"🌉":{"category":"Travel & Places","sheet_x":5,"sheet_y":28,"sort_order":56},"🌊":{"category":"Travel & Places","sheet_x":5,"sheet_y":29,"sort_order":210},"🌋":{"category":"Travel & Places","sheet_x":5,"sheet_y":30,"sort_order":10},"🌌":{"category":"Travel & Places","sheet_x":5,"sheet_y":31,"sort_order":184},"🌍":{"category":"Travel & Places","sheet_x":5,"sheet_y":32,"sort_order":1},"🌎":{"category":"Travel & Places","sheet_x":5,"sheet_y":33,"sort_order":2},"🌏":{"category":"Travel & Places","sheet_x":5,"sheet_y":34,"sort_order":3},"🌐":{"category":"Travel & Places","sheet_x":5,"sheet_y":35,"sort_order":4},"🌑":{"category":"Travel & Places","sheet_x":5,"sheet_y":36,"sort_order":164},"🌒":{"category":"Travel & Places","sheet_x":5,"sheet_y":37,"sort_order":165},"🌓":{"category":"Travel & Places","sheet_x":5,"sheet_y":38,"sort_order":166},"🌔":{"category":"Travel & Places","sheet_x":5,"sheet_y":39,"sort_order":167},"🌕":{"category":"Travel & Places","sheet_x":5,"sheet_y":40,"sort_order":168},"🌖":{"category":"Travel & Places","sheet_x":5,"sheet_y":41,"sort_order":169},"🌗":{"category":"Travel & Places","sheet_x":5,"sheet_y":42,"sort_order":170},"🌘":{"category":"Travel & Places","sheet_x":5,"sheet_y":43,"sort_order":171},"🌙":{"category":"Travel & Places","sheet_x":5,"sheet_y":44,"sort_order":172},"🌚":{"category":"Travel & Places","sheet_x":5,"sheet_y":45,"sort_order":173},"🌛":{"category":"Travel & Places","sheet_x":5,"sheet_y":46,"sort_order":174},"🌜":{"category":"Travel & Places","sheet_x":5,"sheet_y":47,"sort_order":175},"🌝":{"category":"Travel & Places","sheet_x":5,"sheet_y":48,"sort_order":178},"🌞":{"category":"Travel & Places","sheet_x":5,"sheet_y":49,"sort_order":179},"🌟":{"category":"Travel & Places","sheet_x":5,"sheet_y":50,"sort_order":182},"🌠":{"category":"Travel & Places","sheet_x":5,"sheet_y":51,"sort_order":183},"🌡️":{"category":"Travel & Places","sheet_x":5,"sheet_y":52,"sort_order":176},"🌤️":{"category":"Travel & Places","sheet_x":5,"sheet_y":53,"sort_order":188},"🌥️":{"category":"Travel & Places","sheet_x":5,"sheet_y":54,"sort_order":189},"🌦️":{"category":"Travel & Places","sheet_x":5,"sheet_y":55,"sort_order":190},"🌧️":{"category":"Travel & Places","sheet_x":5,"sheet_y":56,"sort_order":191},"🌨️":{"category":"Travel & Places","sheet_x":6,"sheet_y":0,"sort_order":192},"🌩️":{"category":"Travel & Places","sheet_x":6,"sheet_y":1,"sort_order":193},"🌪️":{"category":"Travel & Places","sheet_x":6,"sheet_y":2,"sort_order":194},"🌫️":{"category":"Travel & Places","sheet_x":6,"sheet_y":3,"sort_order":195},"🌬️":{"category":"Travel & Places","sheet_x":6,"sheet_y":4,"sort_order":196},"🌭":{"category":"Food & Drink","sheet_x":6,"sheet_y":5,"sort_order":47},"🌮":{"category":"Food & Drink","sheet_x":6,"sheet_y":6,"sort_order":49},"🌯":{"category":"Food & Drink","sheet_x":6,"sheet_y":7,"sort_order":50},"🌰":{"category":"Food & Drink","sheet_x":6,"sheet_y":8,"sort_order":31},"🌱":{"category":"Animals & Nature","sheet_x":6,"sheet_y":9,"sort_order":116},"🌲":{"category":"Animals & Nature","sheet_x":6,"sheet_y":10,"sort_order":117},"🌳":{"category":"Animals & Nature","sheet_x":6,"sheet_y":11,"sort_order":118},"🌴":{"category":"Animals & Nature","sheet_x":6,"sheet_y":12,"sort_order":119},"🌵":{"category":"Animals & Nature","sheet_x":6,"sheet_y":13,"sort_order":120},"🌶️":{"category":"Food & Drink","sheet_x":6,"sheet_y":14,"sort_order":23},"🌷":{"category":"Animals & Nature","sheet_x":6,"sheet_y":15,"sort_order":115},"🌸":{"category":"Animals & Nature","sheet_x":6,"sheet_y":16,"sort_order":107},"🌹":{"category":"Animals & Nature","sheet_x":6,"sheet_y":17,"sort_order":110},"🌺":{"category":"Animals & Nature","sheet_x":6,"sheet_y":18,"sort_order":112},"🌻":{"category":"Animals & Nature","sheet_x":6,"sheet_y":19,"sort_order":113},"🌼":{"category":"Animals & Nature","sheet_x":6,"sheet_y":20,"sort_order":114},"🌽":{"category":"Food & Drink","sheet_x":6,"sheet_y":21,"sort_order":22},"🌾":{"category":"Animals & Nature","sheet_x":6,"sheet_y":22,"sort_order":121},"🌿":{"category":"Animals & Nature","sheet_x":6,"sheet_y":23,"sort_order":122},"🍀":{"category":"Animals & Nature","sheet_x":6,"sheet_y":24,"sort_order":124},"🍁":{"category":"Animals & Nature","sheet_x":6,"sheet_y":25,"sort_order":125},"🍂":{"category":"Animals & Nature","sheet_x":6,"sheet_y":26,"sort_order":126},"🍃":{"category":"Animals & Nature","sheet_x":6,"sheet_y":27,"sort_order":127},"🍄":{"category":"Food & Drink","sheet_x":6,"sheet_y":28,"sort_order":29},"🍅":{"category":"Food & Drink","sheet_x":6,"sheet_y":29,"sort_order":16},"🍆":{"category":"Food & Drink","sheet_x":6,"sheet_y":30,"sort_order":19},"🍇":{"category":"Food & Drink","sheet_x":6,"sheet_y":31,"sort_order":1},"🍈":{"category":"Food & Drink","sheet_x":6,"sheet_y":32,"sort_order":2},"🍉":{"category":"Food & Drink","sheet_x":6,"sheet_y":33,"sort_order":3},"🍊":{"category":"Food & Drink","sheet_x":6,"sheet_y":34,"sort_order":4},"🍋":{"category":"Food & Drink","sheet_x":6,"sheet_y":35,"sort_order":5},"🍌":{"category":"Food & Drink","sheet_x":6,"sheet_y":36,"sort_order":6},"🍍":{"category":"Food & Drink","sheet_x":6,"sheet_y":37,"sort_order":7},"🍎":{"category":"Food & Drink","sheet_x":6,"sheet_y":38,"sort_order":9},"🍏":{"category":"Food & Drink","sheet_x":6,"sheet_y":39,"sort_order":10},"🍐":{"category":"Food & Drink","sheet_x":6,"sheet_y":40,"sort_order":11},"🍑":{"category":"Food & Drink","sheet_x":6,"sheet_y":41,"sort_order":12},"🍒":{"category":"Food & Drink","sheet_x":6,"sheet_y":42,"sort_order":13},"🍓":{"category":"Food & Drink","sheet_x":6,"sheet_y":43,"sort_order":14},"🍔":{"category":"Food & Drink","sheet_x":6,"sheet_y":44,"sort_order":44},"🍕":{"category":"Food & Drink","sheet_x":6,"sheet_y":45,"sort_order":46},"🍖":{"category":"Food & Drink","sheet_x":6,"sheet_y":46,"sort_order":40},"🍗":{"category":"Food & Drink","sheet_x":6,"sheet_y":47,"sort_order":41},"🍘":{"category":"Food & Drink","sheet_x":6,"sheet_y":48,"sort_order":64},"🍙":{"category":"Food & Drink","sheet_x":6,"sheet_y":49,"sort_order":65},"🍚":{"category":"Food & Drink","sheet_x":6,"sheet_y":50,"sort_order":66},"🍛":{"category":"Food & Drink","sheet_x":6,"sheet_y":51,"sort_order":67},"🍜":{"category":"Food & Drink","sheet_x":6,"sheet_y":52,"sort_order":68},"🍝":{"category":"Food & Drink","sheet_x":6,"sheet_y":53,"sort_order":69},"🍞":{"category":"Food & Drink","sheet_x":6,"sheet_y":54,"sort_order":32},"🍟":{"category":"Food & Drink","sheet_x":6,"sheet_y":55,"sort_order":45},"🍠":{"category":"Food & Drink","sheet_x":6,"sheet_y":56,"sort_order":70},"🍡":{"category":"Food & Drink","sheet_x":7,"sheet_y":0,"sort_order":76},"🍢":{"category":"Food & Drink","sheet_x":7,"sheet_y":1,"sort_order":71},"🍣":{"category":"Food & Drink","sheet_x":7,"sheet_y":2,"sort_order":72},"🍤":{"category":"Food & Drink","sheet_x":7,"sheet_y":3,"sort_order":73},"🍥":{"category":"Food & Drink","sheet_x":7,"sheet_y":4,"sort_order":74},"🍦":{"category":"Food & Drink","sheet_x":7,"sheet_y":5,"sort_order":85},"🍧":{"category":"Food & Drink","sheet_x":7,"sheet_y":6,"sort_order":86},"🍨":{"category":"Food & Drink","sheet_x":7,"sheet_y":7,"sort_order":87},"🍩":{"category":"Food & Drink","sheet_x":7,"sheet_y":8,"sort_order":88},"🍪":{"category":"Food & Drink","sheet_x":7,"sheet_y":9,"sort_order":89},"🍫":{"category":"Food & Drink","sheet_x":7,"sheet_y":10,"sort_order":94},"🍬":{"category":"Food & Drink","sheet_x":7,"sheet_y":11,"sort_order":95},"🍭":{"category":"Food & Drink","sheet_x":7,"sheet_y":12,"sort_order":96},"🍮":{"category":"Food & Drink","sheet_x":7,"sheet_y":13,"sort_order":97},"🍯":{"category":"Food & Drink","sheet_x":7,"sheet_y":14,"sort_order":98},"🍰":{"category":"Food & Drink","sheet_x":7,"sheet_y":15,"sort_order":91},"🍱":{"category":"Food & Drink","sheet_x":7,"sheet_y":16,"sort_order":63},"🍲":{"category":"Food & Drink","sheet_x":7,"sheet_y":17,"sort_order":56},"🍳":{"category":"Food & Drink","sheet_x":7,"sheet_y":18,"sort_order":54},"🍴":{"category":"Food & Drink","sheet_x":7,"sheet_y":19,"sort_order":118},"🍵":{"category":"Food & Drink","sheet_x":7,"sheet_y":20,"sort_order":102},"🍶":{"category":"Food & Drink","sheet_x":7,"sheet_y":21,"sort_order":103},"🍷":{"category":"Food & Drink","sheet_x":7,"sheet_y":22,"sort_order":105},"🍸":{"category":"Food & Drink","sheet_x":7,"sheet_y":23,"sort_order":106},"🍹":{"category":"Food & Drink","sheet_x":7,"sheet_y":24,"sort_order":107},"🍺":{"category":"Food & Drink","sheet_x":7,"sheet_y":25,"sort_order":108},"🍻":{"category":"Food & Drink","sheet_x":7,"sheet_y":26,"sort_order":109},"🍼":{"category":"Food & Drink","sheet_x":7,"sheet_y":27,"sort_order":99},"🍽️":{"category":"Food & Drink","sheet_x":7,"sheet_y":28,"sort_order":117},"🍾":{"category":"Food & Drink","sheet_x":7,"sheet_y":29,"sort_order":104},"🍿":{"category":"Food & Drink","sheet_x":7,"sheet_y":30,"sort_order":59},"🎀":{"category":"Activities","sheet_x":7,"sheet_y":31,"sort_order":17},"🎁":{"category":"Activities","sheet_x":7,"sheet_y":32,"sort_order":18},"🎂":{"category":"Food & Drink","sheet_x":7,"sheet_y":33,"sort_order":90},"🎃":{"category":"Activities","sheet_x":7,"sheet_y":34,"sort_order":1},"🎄":{"category":"Activities","sheet_x":7,"sheet_y":35,"sort_order":2},"🎅":{"category":"People & Body","sheet_x":7,"sheet_y":36,"sort_order":177},"🎆":{"category":"Activities","sheet_x":7,"sheet_y":42,"sort_order":3},"🎇":{"category":"Activities","sheet_x":7,"sheet_y":43,"sort_order":4},"🎈":{"category":"Activities","sheet_x":7,"sheet_y":44,"sort_order":7},"🎉":{"category":"Activities","sheet_x":7,"sheet_y":45,"sort_order":8},"🎊":{"category":"Activities","sheet_x":7,"sheet_y":46,"sort_order":9},"🎋":{"category":"Activities","sheet_x":7,"sheet_y":47,"sort_order":10},"🎌":{"category":"Flags","sheet_x":7,"sheet_y":48,"sort_order":3},"🎍":{"category":"Activities","sheet_x":7,"sheet_y":49,"sort_order":11},"🎎":{"category":"Activities","sheet_x":7,"sheet_y":50,"sort_order":12},"🎏":{"category":"Activities","sheet_x":7,"sheet_y":51,"sort_order":13},"🎐":{"category":"Activities","sheet_x":7,"sheet_y":52,"sort_order":14},"🎑":{"category":"Activities","sheet_x":7,"sheet_y":53,"sort_order":15},"🎒":{"category":"Objects","sheet_x":7,"sheet_y":54,"sort_order":25},"🎓":{"category":"Objects","sheet_x":7,"sheet_y":55,"sort_order":37},"🎖️":{"category":"Activities","sheet_x":7,"sheet_y":56,"sort_order":22},"🎗️":{"category":"Activities","sheet_x":8,"sheet_y":0,"sort_order":19},"🎙️":{"category":"Objects","sheet_x":8,"sheet_y":1,"sort_order":56},"🎚️":{"category":"Objects","sheet_x":8,"sheet_y":2,"sort_order":57},"🎛️":{"category":"Objects","sheet_x":8,"sheet_y":3,"sort_order":58},"🎞️":{"category":"Objects","sheet_x":8,"sheet_y":4,"sort_order":89},"🎟️":{"category":"Activities","sheet_x":8,"sheet_y":5,"sort_order":20},"🎠":{"category":"Travel & Places","sheet_x":8,"sheet_y":6,"sort_order":58},"🎡":{"category":"Travel & Places","sheet_x":8,"sheet_y":7,"sort_order":59},"🎢":{"category":"Travel & Places","sheet_x":8,"sheet_y":8,"sort_order":60},"🎣":{"category":"Activities","sheet_x":8,"sheet_y":9,"sort_order":49},"🎤":{"category":"Objects","sheet_x":8,"sheet_y":10,"sort_order":59},"🎥":{"category":"Objects","sheet_x":8,"sheet_y":11,"sort_order":88},"🎦":{"category":"Symbols","sheet_x":8,"sheet_y":12,"sort_order":91},"🎧":{"category":"Objects","sheet_x":8,"sheet_y":13,"sort_order":60},"🎨":{"category":"Activities","sheet_x":8,"sheet_y":14,"sort_order":77},"🎩":{"category":"Objects","sheet_x":8,"sheet_y":15,"sort_order":36},"🎪":{"category":"Travel & Places","sheet_x":8,"sheet_y":16,"sort_order":62},"🎫":{"category":"Activities","sheet_x":8,"sheet_y":17,"sort_order":21},"🎬":{"category":"Objects","sheet_x":8,"sheet_y":18,"sort_order":91},"🎭":{"category":"Activities","sheet_x":8,"sheet_y":19,"sort_order":75},"🎮":{"category":"Activities","sheet_x":8,"sheet_y":20,"sort_order":61},"🎯":{"category":"Activities","sheet_x":8,"sheet_y":21,"sort_order":55},"🎰":{"category":"Activities","sheet_x":8,"sheet_y":22,"sort_order":63},"🎱":{"category":"Activities","sheet_x":8,"sheet_y":23,"sort_order":58},"🎲":{"category":"Activities","sheet_x":8,"sheet_y":24,"sort_order":64},"🎳":{"category":"Activities","sheet_x":8,"sheet_y":25,"sort_order":37},"🎴":{"category":"Activities","sheet_x":8,"sheet_y":26,"sort_order":74},"🎵":{"category":"Objects","sheet_x":8,"sheet_y":27,"sort_order":54},"🎶":{"category":"Objects","sheet_x":8,"sheet_y":28,"sort_order":55},"🎷":{"category":"Objects","sheet_x":8,"sheet_y":29,"sort_order":62},"🎸":{"category":"Objects","sheet_x":8,"sheet_y":30,"sort_order":63},"🎹":{"category":"Objects","sheet_x":8,"sheet_y":31,"sort_order":64},"🎺":{"category":"Objects","sheet_x":8,"sheet_y":32,"sort_order":65},"🎻":{"category":"Objects","sheet_x":8,"sheet_y":33,"sort_order":66},"🎼":{"category":"Objects","sheet_x":8,"sheet_y":34,"sort_order":53},"🎽":{"category":"Activities","sheet_x":8,"sheet_y":35,"sort_order":51},"🎾":{"category":"Activities","sheet_x":8,"sheet_y":36,"sort_order":35},"🎿":{"category":"Activities","sheet_x":8,"sheet_y":37,"sort_order":52},"🏀":{"category":"Activities","sheet_x":8,"sheet_y":38,"sort_order":31},"🏁":{"category":"Flags","sheet_x":8,"sheet_y":39,"sort_order":1},"🏂":{"category":"People & Body","sheet_x":8,"sheet_y":40,"sort_order":248},"🏃‍♀️":{"category":"People & Body","sheet_x":8,"sheet_y":46,"sort_order":232},"🏃‍♂️":{"category":"People & Body","sheet_x":8,"sheet_y":52,"sort_order":231},"🏃":{"category":"People & Body","sheet_x":9,"sheet_y":1,"sort_order":230},"🏄‍♀️":{"category":"People & Body","sheet_x":9,"sheet_y":7,"sort_order":254},"🏄‍♂️":{"category":"People & Body","sheet_x":9,"sheet_y":13,"sort_order":253},"🏄":{"category":"People & Body","sheet_x":9,"sheet_y":19,"sort_order":252},"🏅":{"category":"Activities","sheet_x":9,"sheet_y":25,"sort_order":24},"🏆":{"category":"Activities","sheet_x":9,"sheet_y":26,"sort_order":23},"🏇":{"category":"People & Body","sheet_x":9,"sheet_y":27,"sort_order":246},"🏈":{"category":"Activities","sheet_x":9,"sheet_y":33,"sort_order":33},"🏉":{"category":"Activities","sheet_x":9,"sheet_y":34,"sort_order":34},"🏊‍♀️":{"category":"People & Body","sheet_x":9,"sheet_y":35,"sort_order":260},"🏊‍♂️":{"category":"People & Body","sheet_x":9,"sheet_y":41,"sort_order":259},"🏊":{"category":"People & Body","sheet_x":9,"sheet_y":47,"sort_order":258},"🏋️‍♀️":{"category":"People & Body","sheet_x":9,"sheet_y":53,"sort_order":266},"🏋️‍♂️":{"category":"People & Body","sheet_x":10,"sheet_y":2,"sort_order":265},"🏋️":{"category":"People & Body","sheet_x":10,"sheet_y":8,"sort_order":264},"🏌️‍♀️":{"category":"People & Body","sheet_x":10,"sheet_y":14,"sort_order":251},"🏌️‍♂️":{"category":"People & Body","sheet_x":10,"sheet_y":20,"sort_order":250},"🏌️":{"category":"People & Body","sheet_x":10,"sheet_y":26,"sort_order":249},"🏍️":{"category":"Travel & Places","sheet_x":10,"sheet_y":32,"sort_order":92},"🏎️":{"category":"Travel & Places","sheet_x":10,"sheet_y":33,"sort_order":91},"🏏":{"category":"Activities","sheet_x":10,"sheet_y":34,"sort_order":38},"🏐":{"category":"Activities","sheet_x":10,"sheet_y":35,"sort_order":32},"🏑":{"category":"Activities","sheet_x":10,"sheet_y":36,"sort_order":39},"🏒":{"category":"Activities","sheet_x":10,"sheet_y":37,"sort_order":40},"🏓":{"category":"Activities","sheet_x":10,"sheet_y":38,"sort_order":42},"🏔️":{"category":"Travel & Places","sheet_x":10,"sheet_y":39,"sort_order":8},"🏕️":{"category":"Travel & Places","sheet_x":10,"sheet_y":40,"sort_order":12},"🏖️":{"category":"Travel & Places","sheet_x":10,"sheet_y":41,"sort_order":13},"🏗️":{"category":"Travel & Places","sheet_x":10,"sheet_y":42,"sort_order":19},"🏘️":{"category":"Travel & Places","sheet_x":10,"sheet_y":43,"sort_order":21},"🏙️":{"category":"Travel & Places","sheet_x":10,"sheet_y":44,"sort_order":51},"🏚️":{"category":"Travel & Places","sheet_x":10,"sheet_y":45,"sort_order":22},"🏛️":{"category":"Travel & Places","sheet_x":10,"sheet_y":46,"sort_order":18},"🏜️":{"category":"Travel & Places","sheet_x":10,"sheet_y":47,"sort_order":14},"🏝️":{"category":"Travel & Places","sheet_x":10,"sheet_y":48,"sort_order":15},"🏞️":{"category":"Travel & Places","sheet_x":10,"sheet_y":49,"sort_order":16},"🏟️":{"category":"Travel & Places","sheet_x":10,"sheet_y":50,"sort_order":17},"🏠":{"category":"Travel & Places","sheet_x":10,"sheet_y":51,"sort_order":23},"🏡":{"category":"Travel & Places","sheet_x":10,"sheet_y":52,"sort_order":24},"🏢":{"category":"Travel & Places","sheet_x":10,"sheet_y":53,"sort_order":25},"🏣":{"category":"Travel & Places","sheet_x":10,"sheet_y":54,"sort_order":26},"🏤":{"category":"Travel & Places","sheet_x":10,"sheet_y":55,"sort_order":27},"🏥":{"category":"Travel & Places","sheet_x":10,"sheet_y":56,"sort_order":28},"🏦":{"category":"Travel & Places","sheet_x":11,"sheet_y":0,"sort_order":29},"🏧":{"category":"Symbols","sheet_x":11,"sheet_y":1,"sort_order":1},"🏨":{"category":"Travel & Places","sheet_x":11,"sheet_y":2,"sort_order":30},"🏩":{"category":"Travel & Places","sheet_x":11,"sheet_y":3,"sort_order":31},"🏪":{"category":"Travel & Places","sheet_x":11,"sheet_y":4,"sort_order":32},"🏫":{"category":"Travel & Places","sheet_x":11,"sheet_y":5,"sort_order":33},"🏬":{"category":"Travel & Places","sheet_x":11,"sheet_y":6,"sort_order":34},"🏭":{"category":"Travel & Places","sheet_x":11,"sheet_y":7,"sort_order":35},"🏮":{"category":"Objects","sheet_x":11,"sheet_y":8,"sort_order":102},"🏯":{"category":"Travel & Places","sheet_x":11,"sheet_y":9,"sort_order":36},"🏰":{"category":"Travel & Places","sheet_x":11,"sheet_y":10,"sort_order":37},"🏳️‍🌈":{"category":"Flags","sheet_x":11,"sheet_y":11,"sort_order":6},"🏳️":{"category":"Flags","sheet_x":11,"sheet_y":12,"sort_order":5},"🏴‍☠️":{"category":"Flags","sheet_x":11,"sheet_y":13,"sort_order":7},"🏴󠁧󠁢󠁥󠁮󠁧󠁿":{"category":"Flags","sheet_x":11,"sheet_y":14,"sort_order":266},"🏴󠁧󠁢󠁳󠁣󠁴󠁿":{"category":"Flags","sheet_x":11,"sheet_y":15,"sort_order":267},"🏴󠁧󠁢󠁷󠁬󠁳󠁿":{"category":"Flags","sheet_x":11,"sheet_y":16,"sort_order":268},"🏴":{"category":"Flags","sheet_x":11,"sheet_y":17,"sort_order":4},"🏵️":{"category":"Animals & Nature","sheet_x":11,"sheet_y":18,"sort_order":109},"🏷️":{"category":"Objects","sheet_x":11,"sheet_y":19,"sort_order":120},"🏸":{"category":"Activities","sheet_x":11,"sheet_y":20,"sort_order":43},"🏹":{"category":"Objects","sheet_x":11,"sheet_y":21,"sort_order":189},"🏺":{"category":"Food & Drink","sheet_x":11,"sheet_y":22,"sort_order":121},"🏻":{"category":"Skin Tones","sheet_x":11,"sheet_y":23,"sort_order":1},"🏼":{"category":"Skin Tones","sheet_x":11,"sheet_y":24,"sort_order":2},"🏽":{"category":"Skin Tones","sheet_x":11,"sheet_y":25,"sort_order":3},"🏾":{"category":"Skin Tones","sheet_x":11,"sheet_y":26,"sort_order":4},"🏿":{"category":"Skin Tones","sheet_x":11,"sheet_y":27,"sort_order":5},"🐀":{"category":"Animals & Nature","sheet_x":11,"sheet_y":28,"sort_order":44},"🐁":{"category":"Animals & Nature","sheet_x":11,"sheet_y":29,"sort_order":43},"🐂":{"category":"Animals & Nature","sheet_x":11,"sheet_y":30,"sort_order":25},"🐃":{"category":"Animals & Nature","sheet_x":11,"sheet_y":31,"sort_order":26},"🐄":{"category":"Animals & Nature","sheet_x":11,"sheet_y":32,"sort_order":27},"🐅":{"category":"Animals & Nature","sheet_x":11,"sheet_y":33,"sort_order":17},"🐆":{"category":"Animals & Nature","sheet_x":11,"sheet_y":34,"sort_order":18},"🐇":{"category":"Animals & Nature","sheet_x":11,"sheet_y":35,"sort_order":47},"🐈":{"category":"Animals & Nature","sheet_x":11,"sheet_y":36,"sort_order":14},"🐉":{"category":"Animals & Nature","sheet_x":11,"sheet_y":37,"sort_order":82},"🐊":{"category":"Animals & Nature","sheet_x":11,"sheet_y":38,"sort_order":77},"🐋":{"category":"Animals & Nature","sheet_x":11,"sheet_y":39,"sort_order":86},"🐌":{"category":"Animals & Nature","sheet_x":11,"sheet_y":40,"sort_order":94},"🐍":{"category":"Animals & Nature","sheet_x":11,"sheet_y":41,"sort_order":80},"🐎":{"category":"Animals & Nature","sheet_x":11,"sheet_y":42,"sort_order":20},"🐏":{"category":"Animals & Nature","sheet_x":11,"sheet_y":43,"sort_order":32},"🐐":{"category":"Animals & Nature","sheet_x":11,"sheet_y":44,"sort_order":34},"🐑":{"category":"Animals & Nature","sheet_x":11,"sheet_y":45,"sort_order":33},"🐒":{"category":"Animals & Nature","sheet_x":11,"sheet_y":46,"sort_order":2},"🐓":{"category":"Animals & Nature","sheet_x":11,"sheet_y":47,"sort_order":62},"🐔":{"category":"Animals & Nature","sheet_x":11,"sheet_y":48,"sort_order":61},"🐕‍🦺":{"category":"Animals & Nature","sheet_x":11,"sheet_y":49,"sort_order":8},"🐕":{"category":"Animals & Nature","sheet_x":11,"sheet_y":50,"sort_order":6},"🐖":{"category":"Animals & Nature","sheet_x":11,"sheet_y":51,"sort_order":29},"🐗":{"category":"Animals & Nature","sheet_x":11,"sheet_y":52,"sort_order":30},"🐘":{"category":"Animals & Nature","sheet_x":11,"sheet_y":53,"sort_order":39},"🐙":{"category":"Animals & Nature","sheet_x":11,"sheet_y":54,"sort_order":92},"🐚":{"category":"Animals & Nature","sheet_x":11,"sheet_y":55,"sort_order":93},"🐛":{"category":"Animals & Nature","sheet_x":11,"sheet_y":56,"sort_order":96},"🐜":{"category":"Animals & Nature","sheet_x":12,"sheet_y":0,"sort_order":97},"🐝":{"category":"Animals & Nature","sheet_x":12,"sheet_y":1,"sort_order":98},"🐞":{"category":"Animals & Nature","sheet_x":12,"sheet_y":2,"sort_order":99},"🐟":{"category":"Animals & Nature","sheet_x":12,"sheet_y":3,"sort_order":88},"🐠":{"category":"Animals & Nature","sheet_x":12,"sheet_y":4,"sort_order":89},"🐡":{"category":"Animals & Nature","sheet_x":12,"sheet_y":5,"sort_order":90},"🐢":{"category":"Animals & Nature","sheet_x":12,"sheet_y":6,"sort_order":78},"🐣":{"category":"Animals & Nature","sheet_x":12,"sheet_y":7,"sort_order":63},"🐤":{"category":"Animals & Nature","sheet_x":12,"sheet_y":8,"sort_order":64},"🐥":{"category":"Animals & Nature","sheet_x":12,"sheet_y":9,"sort_order":65},"🐦":{"category":"Animals & Nature","sheet_x":12,"sheet_y":10,"sort_order":66},"🐧":{"category":"Animals & Nature","sheet_x":12,"sheet_y":11,"sort_order":67},"🐨":{"category":"Animals & Nature","sheet_x":12,"sheet_y":12,"sort_order":52},"🐩":{"category":"Animals & Nature","sheet_x":12,"sheet_y":13,"sort_order":9},"🐪":{"category":"Animals & Nature","sheet_x":12,"sheet_y":14,"sort_order":35},"🐫":{"category":"Animals & Nature","sheet_x":12,"sheet_y":15,"sort_order":36},"🐬":{"category":"Animals & Nature","sheet_x":12,"sheet_y":16,"sort_order":87},"🐭":{"category":"Animals & Nature","sheet_x":12,"sheet_y":17,"sort_order":42},"🐮":{"category":"Animals & Nature","sheet_x":12,"sheet_y":18,"sort_order":24},"🐯":{"category":"Animals & Nature","sheet_x":12,"sheet_y":19,"sort_order":16},"🐰":{"category":"Animals & Nature","sheet_x":12,"sheet_y":20,"sort_order":46},"🐱":{"category":"Animals & Nature","sheet_x":12,"sheet_y":21,"sort_order":13},"🐲":{"category":"Animals & Nature","sheet_x":12,"sheet_y":22,"sort_order":81},"🐳":{"category":"Animals & Nature","sheet_x":12,"sheet_y":23,"sort_order":85},"🐴":{"category":"Animals & Nature","sheet_x":12,"sheet_y":24,"sort_order":19},"🐵":{"category":"Animals & Nature","sheet_x":12,"sheet_y":25,"sort_order":1},"🐶":{"category":"Animals & Nature","sheet_x":12,"sheet_y":26,"sort_order":5},"🐷":{"category":"Animals & Nature","sheet_x":12,"sheet_y":27,"sort_order":28},"🐸":{"category":"Animals & Nature","sheet_x":12,"sheet_y":28,"sort_order":76},"🐹":{"category":"Animals & Nature","sheet_x":12,"sheet_y":29,"sort_order":45},"🐺":{"category":"Animals & Nature","sheet_x":12,"sheet_y":30,"sort_order":10},"🐻":{"category":"Animals & Nature","sheet_x":12,"sheet_y":31,"sort_order":51},"🐼":{"category":"Animals & Nature","sheet_x":12,"sheet_y":32,"sort_order":53},"🐽":{"category":"Animals & Nature","sheet_x":12,"sheet_y":33,"sort_order":31},"🐾":{"category":"Animals & Nature","sheet_x":12,"sheet_y":34,"sort_order":59},"🐿️":{"category":"Animals & Nature","sheet_x":12,"sheet_y":35,"sort_order":48},"👀":{"category":"People & Body","sheet_x":12,"sheet_y":36,"sort_order":45},"👁️‍🗨️":{"category":"Smileys & Emotion","sheet_x":12,"sheet_y":37,"sort_order":145},"👁️":{"category":"People & Body","sheet_x":12,"sheet_y":38,"sort_order":46},"👂":{"category":"People & Body","sheet_x":12,"sheet_y":39,"sort_order":39},"👃":{"category":"People & Body","sheet_x":12,"sheet_y":45,"sort_order":41},"👄":{"category":"People & Body","sheet_x":12,"sheet_y":51,"sort_order":48},"👅":{"category":"People & Body","sheet_x":12,"sheet_y":52,"sort_order":47},"👆":{"category":"People & Body","sheet_x":12,"sheet_y":53,"sort_order":15},"👇":{"category":"People & Body","sheet_x":13,"sheet_y":2,"sort_order":17},"👈":{"category":"People & Body","sheet_x":13,"sheet_y":8,"sort_order":13},"👉":{"category":"People & Body","sheet_x":13,"sheet_y":14,"sort_order":14},"👊":{"category":"People & Body","sheet_x":13,"sheet_y":20,"sort_order":22},"👋":{"category":"People & Body","sheet_x":13,"sheet_y":26,"sort_order":1},"👌":{"category":"People & Body","sheet_x":13,"sheet_y":32,"sort_order":6},"👍":{"category":"People & Body","sheet_x":13,"sheet_y":38,"sort_order":19},"👎":{"category":"People & Body","sheet_x":13,"sheet_y":44,"sort_order":20},"👏":{"category":"People & Body","sheet_x":13,"sheet_y":50,"sort_order":25},"👐":{"category":"People & Body","sheet_x":13,"sheet_y":56,"sort_order":27},"👑":{"category":"Objects","sheet_x":14,"sheet_y":5,"sort_order":34},"👒":{"category":"Objects","sheet_x":14,"sheet_y":6,"sort_order":35},"👓":{"category":"Objects","sheet_x":14,"sheet_y":7,"sort_order":1},"👔":{"category":"Objects","sheet_x":14,"sheet_y":8,"sort_order":6},"👕":{"category":"Objects","sheet_x":14,"sheet_y":9,"sort_order":7},"👖":{"category":"Objects","sheet_x":14,"sheet_y":10,"sort_order":8},"👗":{"category":"Objects","sheet_x":14,"sheet_y":11,"sort_order":13},"👘":{"category":"Objects","sheet_x":14,"sheet_y":12,"sort_order":14},"👙":{"category":"Objects","sheet_x":14,"sheet_y":13,"sort_order":19},"👚":{"category":"Objects","sheet_x":14,"sheet_y":14,"sort_order":20},"👛":{"category":"Objects","sheet_x":14,"sheet_y":15,"sort_order":21},"👜":{"category":"Objects","sheet_x":14,"sheet_y":16,"sort_order":22},"👝":{"category":"Objects","sheet_x":14,"sheet_y":17,"sort_order":23},"👞":{"category":"Objects","sheet_x":14,"sheet_y":18,"sort_order":26},"👟":{"category":"Objects","sheet_x":14,"sheet_y":19,"sort_order":27},"👠":{"category":"Objects","sheet_x":14,"sheet_y":20,"sort_order":30},"👡":{"category":"Objects","sheet_x":14,"sheet_y":21,"sort_order":31},"👢":{"category":"Objects","sheet_x":14,"sheet_y":22,"sort_order":33},"👣":{"category":"People & Body","sheet_x":14,"sheet_y":23,"sort_order":334},"👤":{"category":"People & Body","sheet_x":14,"sheet_y":24,"sort_order":332},"👥":{"category":"People & Body","sheet_x":14,"sheet_y":25,"sort_order":333},"👦":{"category":"People & Body","sheet_x":14,"sheet_y":26,"sort_order":51},"👧":{"category":"People & Body","sheet_x":14,"sheet_y":32,"sort_order":52},"👨‍🌾":{"category":"People & Body","sheet_x":14,"sheet_y":38,"sort_order":118},"👨‍🍳":{"category":"People & Body","sheet_x":14,"sheet_y":44,"sort_order":121},"👨‍🎓":{"category":"People & Body","sheet_x":14,"sheet_y":50,"sort_order":109},"👨‍🎤":{"category":"People & Body","sheet_x":14,"sheet_y":56,"sort_order":139},"👨‍🎨":{"category":"People & Body","sheet_x":15,"sheet_y":5,"sort_order":142},"👨‍🏫":{"category":"People & Body","sheet_x":15,"sheet_y":11,"sort_order":112},"👨‍🏭":{"category":"People & Body","sheet_x":15,"sheet_y":17,"sort_order":127},"👨‍👦‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":23,"sort_order":322},"👨‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":24,"sort_order":321},"👨‍👧‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":25,"sort_order":324},"👨‍👧‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":26,"sort_order":325},"👨‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":27,"sort_order":323},"👨‍👨‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":28,"sort_order":311},"👨‍👨‍👦‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":29,"sort_order":314},"👨‍👨‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":30,"sort_order":312},"👨‍👨‍👧‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":31,"sort_order":313},"👨‍👨‍👧‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":32,"sort_order":315},"👨‍👩‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":33,"sort_order":306},"👨‍👩‍👦‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":34,"sort_order":309},"👨‍👩‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":35,"sort_order":307},"👨‍👩‍👧‍👦":{"category":"People & Body","sheet_x":15,"sheet_y":36,"sort_order":308},"👨‍👩‍👧‍👧":{"category":"People & Body","sheet_x":15,"sheet_y":37,"sort_order":310},"👨‍💻":{"category":"People & Body","sheet_x":15,"sheet_y":38,"sort_order":136},"👨‍💼":{"category":"People & Body","sheet_x":15,"sheet_y":44,"sort_order":130},"👨‍🔧":{"category":"People & Body","sheet_x":15,"sheet_y":50,"sort_order":124},"👨‍🔬":{"category":"People & Body","sheet_x":15,"sheet_y":56,"sort_order":133},"👨‍🚀":{"category":"People & Body","sheet_x":16,"sheet_y":5,"sort_order":148},"👨‍🚒":{"category":"People & Body","sheet_x":16,"sheet_y":11,"sort_order":151},"👨‍🦯":{"category":"People & Body","sheet_x":16,"sheet_y":17,"sort_order":222},"👨‍🦰":{"category":"People & Body","sheet_x":16,"sheet_y":23,"sort_order":57},"👨‍🦱":{"category":"People & Body","sheet_x":16,"sheet_y":29,"sort_order":58},"👨‍🦲":{"category":"People & Body","sheet_x":16,"sheet_y":35,"sort_order":60},"👨‍🦳":{"category":"People & Body","sheet_x":16,"sheet_y":41,"sort_order":59},"👨‍🦼":{"category":"People & Body","sheet_x":16,"sheet_y":47,"sort_order":225},"👨‍🦽":{"category":"People & Body","sheet_x":16,"sheet_y":53,"sort_order":228},"👨‍⚕️":{"category":"People & Body","sheet_x":17,"sheet_y":2,"sort_order":106},"👨‍⚖️":{"category":"People & Body","sheet_x":17,"sheet_y":8,"sort_order":115},"👨‍✈️":{"category":"People & Body","sheet_x":17,"sheet_y":14,"sort_order":145},"👨‍❤️‍👨":{"category":"People & Body","sheet_x":17,"sheet_y":20,"sort_order":303},"👨‍❤️‍💋‍👨":{"category":"People & Body","sheet_x":17,"sheet_y":21,"sort_order":299},"👨":{"category":"People & Body","sheet_x":17,"sheet_y":22,"sort_order":55},"👩‍🌾":{"category":"People & Body","sheet_x":17,"sheet_y":28,"sort_order":119},"👩‍🍳":{"category":"People & Body","sheet_x":17,"sheet_y":34,"sort_order":122},"👩‍🎓":{"category":"People & Body","sheet_x":17,"sheet_y":40,"sort_order":110},"👩‍🎤":{"category":"People & Body","sheet_x":17,"sheet_y":46,"sort_order":140},"👩‍🎨":{"category":"People & Body","sheet_x":17,"sheet_y":52,"sort_order":143},"👩‍🏫":{"category":"People & Body","sheet_x":18,"sheet_y":1,"sort_order":113},"👩‍🏭":{"category":"People & Body","sheet_x":18,"sheet_y":7,"sort_order":128},"👩‍👦‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":13,"sort_order":327},"👩‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":14,"sort_order":326},"👩‍👧‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":15,"sort_order":329},"👩‍👧‍👧":{"category":"People & Body","sheet_x":18,"sheet_y":16,"sort_order":330},"👩‍👧":{"category":"People & Body","sheet_x":18,"sheet_y":17,"sort_order":328},"👩‍👩‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":18,"sort_order":316},"👩‍👩‍👦‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":19,"sort_order":319},"👩‍👩‍👧":{"category":"People & Body","sheet_x":18,"sheet_y":20,"sort_order":317},"👩‍👩‍👧‍👦":{"category":"People & Body","sheet_x":18,"sheet_y":21,"sort_order":318},"👩‍👩‍👧‍👧":{"category":"People & Body","sheet_x":18,"sheet_y":22,"sort_order":320},"👩‍💻":{"category":"People & Body","sheet_x":18,"sheet_y":23,"sort_order":137},"👩‍💼":{"category":"People & Body","sheet_x":18,"sheet_y":29,"sort_order":131},"👩‍🔧":{"category":"People & Body","sheet_x":18,"sheet_y":35,"sort_order":125},"👩‍🔬":{"category":"People & Body","sheet_x":18,"sheet_y":41,"sort_order":134},"👩‍🚀":{"category":"People & Body","sheet_x":18,"sheet_y":47,"sort_order":149},"👩‍🚒":{"category":"People & Body","sheet_x":18,"sheet_y":53,"sort_order":152},"👩‍🦯":{"category":"People & Body","sheet_x":19,"sheet_y":2,"sort_order":223},"👩‍🦰":{"category":"People & Body","sheet_x":19,"sheet_y":8,"sort_order":62},"👩‍🦱":{"category":"People & Body","sheet_x":19,"sheet_y":14,"sort_order":64},"👩‍🦲":{"category":"People & Body","sheet_x":19,"sheet_y":20,"sort_order":68},"👩‍🦳":{"category":"People & Body","sheet_x":19,"sheet_y":26,"sort_order":66},"👩‍🦼":{"category":"People & Body","sheet_x":19,"sheet_y":32,"sort_order":226},"👩‍🦽":{"category":"People & Body","sheet_x":19,"sheet_y":38,"sort_order":229},"👩‍⚕️":{"category":"People & Body","sheet_x":19,"sheet_y":44,"sort_order":107},"👩‍⚖️":{"category":"People & Body","sheet_x":19,"sheet_y":50,"sort_order":116},"👩‍✈️":{"category":"People & Body","sheet_x":19,"sheet_y":56,"sort_order":146},"👩‍❤️‍👨":{"category":"People & Body","sheet_x":20,"sheet_y":5,"sort_order":302},"👩‍❤️‍👩":{"category":"People & Body","sheet_x":20,"sheet_y":6,"sort_order":304},"👩‍❤️‍💋‍👨":{"category":"People & Body","sheet_x":20,"sheet_y":7,"sort_order":298},"👩‍❤️‍💋‍👩":{"category":"People & Body","sheet_x":20,"sheet_y":8,"sort_order":300},"👩":{"category":"People & Body","sheet_x":20,"sheet_y":9,"sort_order":61},"👪":{"category":"People & Body","sheet_x":20,"sheet_y":15,"sort_order":305},"👫":{"category":"People & Body","sheet_x":20,"sheet_y":16,"sort_order":295},"👬":{"category":"People & Body","sheet_x":20,"sheet_y":42,"sort_order":296},"👭":{"category":"People & Body","sheet_x":21,"sheet_y":11,"sort_order":294},"👮‍♀️":{"category":"People & Body","sheet_x":21,"sheet_y":37,"sort_order":155},"👮‍♂️":{"category":"People & Body","sheet_x":21,"sheet_y":43,"sort_order":154},"👮":{"category":"People & Body","sheet_x":21,"sheet_y":49,"sort_order":153},"👯‍♀️":{"category":"People & Body","sheet_x":21,"sheet_y":55,"sort_order":238},"👯‍♂️":{"category":"People & Body","sheet_x":21,"sheet_y":56,"sort_order":237},"👯":{"category":"People & Body","sheet_x":22,"sheet_y":0,"sort_order":236},"👰":{"category":"People & Body","sheet_x":22,"sheet_y":1,"sort_order":173},"👱‍♀️":{"category":"People & Body","sheet_x":22,"sheet_y":7,"sort_order":70},"👱‍♂️":{"category":"People & Body","sheet_x":22,"sheet_y":13,"sort_order":71},"👱":{"category":"People & Body","sheet_x":22,"sheet_y":19,"sort_order":54},"👲":{"category":"People & Body","sheet_x":22,"sheet_y":25,"sort_order":170},"👳‍♀️":{"category":"People & Body","sheet_x":22,"sheet_y":31,"sort_order":169},"👳‍♂️":{"category":"People & Body","sheet_x":22,"sheet_y":37,"sort_order":168},"👳":{"category":"People & Body","sheet_x":22,"sheet_y":43,"sort_order":167},"👴":{"category":"People & Body","sheet_x":22,"sheet_y":49,"sort_order":73},"👵":{"category":"People & Body","sheet_x":22,"sheet_y":55,"sort_order":74},"👶":{"category":"People & Body","sheet_x":23,"sheet_y":4,"sort_order":49},"👷‍♀️":{"category":"People & Body","sheet_x":23,"sheet_y":10,"sort_order":164},"👷‍♂️":{"category":"People & Body","sheet_x":23,"sheet_y":16,"sort_order":163},"👷":{"category":"People & Body","sheet_x":23,"sheet_y":22,"sort_order":162},"👸":{"category":"People & Body","sheet_x":23,"sheet_y":28,"sort_order":166},"👹":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":34,"sort_order":97},"👺":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":35,"sort_order":98},"👻":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":36,"sort_order":99},"👼":{"category":"People & Body","sheet_x":23,"sheet_y":37,"sort_order":176},"👽":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":43,"sort_order":100},"👾":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":44,"sort_order":101},"👿":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":45,"sort_order":92},"💀":{"category":"Smileys & Emotion","sheet_x":23,"sheet_y":46,"sort_order":93},"💁‍♀️":{"category":"People & Body","sheet_x":23,"sheet_y":47,"sort_order":89},"💁‍♂️":{"category":"People & Body","sheet_x":23,"sheet_y":53,"sort_order":88},"💁":{"category":"People & Body","sheet_x":24,"sheet_y":2,"sort_order":87},"💂‍♀️":{"category":"People & Body","sheet_x":24,"sheet_y":8,"sort_order":161},"💂‍♂️":{"category":"People & Body","sheet_x":24,"sheet_y":14,"sort_order":160},"💂":{"category":"People & Body","sheet_x":24,"sheet_y":20,"sort_order":159},"💃":{"category":"People & Body","sheet_x":24,"sheet_y":26,"sort_order":233},"💄":{"category":"Objects","sheet_x":24,"sheet_y":32,"sort_order":41},"💅":{"category":"People & Body","sheet_x":24,"sheet_y":33,"sort_order":32},"💆‍♀️":{"category":"People & Body","sheet_x":24,"sheet_y":39,"sort_order":208},"💆‍♂️":{"category":"People & Body","sheet_x":24,"sheet_y":45,"sort_order":207},"💆":{"category":"People & Body","sheet_x":24,"sheet_y":51,"sort_order":206},"💇‍♀️":{"category":"People & Body","sheet_x":25,"sheet_y":0,"sort_order":211},"💇‍♂️":{"category":"People & Body","sheet_x":25,"sheet_y":6,"sort_order":210},"💇":{"category":"People & Body","sheet_x":25,"sheet_y":12,"sort_order":209},"💈":{"category":"Travel & Places","sheet_x":25,"sheet_y":18,"sort_order":61},"💉":{"category":"Objects","sheet_x":25,"sheet_y":19,"sort_order":208},"💊":{"category":"Objects","sheet_x":25,"sheet_y":20,"sort_order":210},"💋":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":21,"sort_order":115},"💌":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":22,"sort_order":116},"💍":{"category":"Objects","sheet_x":25,"sheet_y":23,"sort_order":42},"💎":{"category":"Objects","sheet_x":25,"sheet_y":24,"sort_order":43},"💏":{"category":"People & Body","sheet_x":25,"sheet_y":25,"sort_order":297},"💐":{"category":"Animals & Nature","sheet_x":25,"sheet_y":26,"sort_order":106},"💑":{"category":"People & Body","sheet_x":25,"sheet_y":27,"sort_order":301},"💒":{"category":"Travel & Places","sheet_x":25,"sheet_y":28,"sort_order":38},"💓":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":29,"sort_order":121},"💔":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":30,"sort_order":126},"💕":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":31,"sort_order":123},"💖":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":32,"sort_order":119},"💗":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":33,"sort_order":120},"💘":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":34,"sort_order":117},"💙":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":35,"sort_order":131},"💚":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":36,"sort_order":130},"💛":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":37,"sort_order":129},"💜":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":38,"sort_order":132},"💝":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":39,"sort_order":118},"💞":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":40,"sort_order":122},"💟":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":41,"sort_order":124},"💠":{"category":"Symbols","sheet_x":25,"sheet_y":42,"sort_order":214},"💡":{"category":"Objects","sheet_x":25,"sheet_y":43,"sort_order":100},"💢":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":44,"sort_order":137},"💣":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":45,"sort_order":143},"💤":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":46,"sort_order":149},"💥":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":47,"sort_order":138},"💦":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":48,"sort_order":140},"💧":{"category":"Travel & Places","sheet_x":25,"sheet_y":49,"sort_order":209},"💨":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":50,"sort_order":141},"💩":{"category":"Smileys & Emotion","sheet_x":25,"sheet_y":51,"sort_order":95},"💪":{"category":"People & Body","sheet_x":25,"sheet_y":52,"sort_order":34},"💫":{"category":"Smileys & Emotion","sheet_x":26,"sheet_y":1,"sort_order":139},"💬":{"category":"Smileys & Emotion","sheet_x":26,"sheet_y":2,"sort_order":144},"💭":{"category":"Smileys & Emotion","sheet_x":26,"sheet_y":3,"sort_order":148},"💮":{"category":"Animals & Nature","sheet_x":26,"sheet_y":4,"sort_order":108},"💯":{"category":"Smileys & Emotion","sheet_x":26,"sheet_y":5,"sort_order":136},"💰":{"category":"Objects","sheet_x":26,"sheet_y":6,"sort_order":121},"💱":{"category":"Objects","sheet_x":26,"sheet_y":7,"sort_order":130},"💲":{"category":"Objects","sheet_x":26,"sheet_y":8,"sort_order":131},"💳":{"category":"Objects","sheet_x":26,"sheet_y":9,"sort_order":127},"💴":{"category":"Objects","sheet_x":26,"sheet_y":10,"sort_order":122},"💵":{"category":"Objects","sheet_x":26,"sheet_y":11,"sort_order":123},"💶":{"category":"Objects","sheet_x":26,"sheet_y":12,"sort_order":124},"💷":{"category":"Objects","sheet_x":26,"sheet_y":13,"sort_order":125},"💸":{"category":"Objects","sheet_x":26,"sheet_y":14,"sort_order":126},"💹":{"category":"Objects","sheet_x":26,"sheet_y":15,"sort_order":129},"💺":{"category":"Travel & Places","sheet_x":26,"sheet_y":16,"sort_order":123},"💻":{"category":"Objects","sheet_x":26,"sheet_y":17,"sort_order":77},"💼":{"category":"Objects","sheet_x":26,"sheet_y":18,"sort_order":152},"💽":{"category":"Objects","sheet_x":26,"sheet_y":19,"sort_order":83},"💾":{"category":"Objects","sheet_x":26,"sheet_y":20,"sort_order":84},"💿":{"category":"Objects","sheet_x":26,"sheet_y":21,"sort_order":85},"📀":{"category":"Objects","sheet_x":26,"sheet_y":22,"sort_order":86},"📁":{"category":"Objects","sheet_x":26,"sheet_y":23,"sort_order":153},"📂":{"category":"Objects","sheet_x":26,"sheet_y":24,"sort_order":154},"📃":{"category":"Objects","sheet_x":26,"sheet_y":25,"sort_order":113},"📄":{"category":"Objects","sheet_x":26,"sheet_y":26,"sort_order":115},"📅":{"category":"Objects","sheet_x":26,"sheet_y":27,"sort_order":156},"📆":{"category":"Objects","sheet_x":26,"sheet_y":28,"sort_order":157},"📇":{"category":"Objects","sheet_x":26,"sheet_y":29,"sort_order":160},"📈":{"category":"Objects","sheet_x":26,"sheet_y":30,"sort_order":161},"📉":{"category":"Objects","sheet_x":26,"sheet_y":31,"sort_order":162},"📊":{"category":"Objects","sheet_x":26,"sheet_y":32,"sort_order":163},"📋":{"category":"Objects","sheet_x":26,"sheet_y":33,"sort_order":164},"📌":{"category":"Objects","sheet_x":26,"sheet_y":34,"sort_order":165},"📍":{"category":"Objects","sheet_x":26,"sheet_y":35,"sort_order":166},"📎":{"category":"Objects","sheet_x":26,"sheet_y":36,"sort_order":167},"📏":{"category":"Objects","sheet_x":26,"sheet_y":37,"sort_order":169},"📐":{"category":"Objects","sheet_x":26,"sheet_y":38,"sort_order":170},"📑":{"category":"Objects","sheet_x":26,"sheet_y":39,"sort_order":118},"📒":{"category":"Objects","sheet_x":26,"sheet_y":40,"sort_order":112},"📓":{"category":"Objects","sheet_x":26,"sheet_y":41,"sort_order":111},"📔":{"category":"Objects","sheet_x":26,"sheet_y":42,"sort_order":104},"📕":{"category":"Objects","sheet_x":26,"sheet_y":43,"sort_order":105},"📖":{"category":"Objects","sheet_x":26,"sheet_y":44,"sort_order":106},"📗":{"category":"Objects","sheet_x":26,"sheet_y":45,"sort_order":107},"📘":{"category":"Objects","sheet_x":26,"sheet_y":46,"sort_order":108},"📙":{"category":"Objects","sheet_x":26,"sheet_y":47,"sort_order":109},"📚":{"category":"Objects","sheet_x":26,"sheet_y":48,"sort_order":110},"📛":{"category":"Symbols","sheet_x":26,"sheet_y":49,"sort_order":104},"📜":{"category":"Objects","sheet_x":26,"sheet_y":50,"sort_order":114},"📝":{"category":"Objects","sheet_x":26,"sheet_y":51,"sort_order":151},"📞":{"category":"Objects","sheet_x":26,"sheet_y":52,"sort_order":72},"📟":{"category":"Objects","sheet_x":26,"sheet_y":53,"sort_order":73},"📠":{"category":"Objects","sheet_x":26,"sheet_y":54,"sort_order":74},"📡":{"category":"Objects","sheet_x":26,"sheet_y":55,"sort_order":207},"📢":{"category":"Objects","sheet_x":26,"sheet_y":56,"sort_order":48},"📣":{"category":"Objects","sheet_x":27,"sheet_y":0,"sort_order":49},"📤":{"category":"Objects","sheet_x":27,"sheet_y":1,"sort_order":136},"📥":{"category":"Objects","sheet_x":27,"sheet_y":2,"sort_order":137},"📦":{"category":"Objects","sheet_x":27,"sheet_y":3,"sort_order":138},"📧":{"category":"Objects","sheet_x":27,"sheet_y":4,"sort_order":133},"📨":{"category":"Objects","sheet_x":27,"sheet_y":5,"sort_order":134},"📩":{"category":"Objects","sheet_x":27,"sheet_y":6,"sort_order":135},"📪":{"category":"Objects","sheet_x":27,"sheet_y":7,"sort_order":140},"📫":{"category":"Objects","sheet_x":27,"sheet_y":8,"sort_order":139},"📬":{"category":"Objects","sheet_x":27,"sheet_y":9,"sort_order":141},"📭":{"category":"Objects","sheet_x":27,"sheet_y":10,"sort_order":142},"📮":{"category":"Objects","sheet_x":27,"sheet_y":11,"sort_order":143},"📯":{"category":"Objects","sheet_x":27,"sheet_y":12,"sort_order":50},"📰":{"category":"Objects","sheet_x":27,"sheet_y":13,"sort_order":116},"📱":{"category":"Objects","sheet_x":27,"sheet_y":14,"sort_order":69},"📲":{"category":"Objects","sheet_x":27,"sheet_y":15,"sort_order":70},"📳":{"category":"Symbols","sheet_x":27,"sheet_y":16,"sort_order":95},"📴":{"category":"Symbols","sheet_x":27,"sheet_y":17,"sort_order":96},"📵":{"category":"Symbols","sheet_x":27,"sheet_y":18,"sort_order":23},"📶":{"category":"Symbols","sheet_x":27,"sheet_y":19,"sort_order":94},"📷":{"category":"Objects","sheet_x":27,"sheet_y":20,"sort_order":93},"📸":{"category":"Objects","sheet_x":27,"sheet_y":21,"sort_order":94},"📹":{"category":"Objects","sheet_x":27,"sheet_y":22,"sort_order":95},"📺":{"category":"Objects","sheet_x":27,"sheet_y":23,"sort_order":92},"📻":{"category":"Objects","sheet_x":27,"sheet_y":24,"sort_order":61},"📼":{"category":"Objects","sheet_x":27,"sheet_y":25,"sort_order":96},"📽️":{"category":"Objects","sheet_x":27,"sheet_y":26,"sort_order":90},"📿":{"category":"Objects","sheet_x":27,"sheet_y":27,"sort_order":40},"🔀":{"category":"Symbols","sheet_x":27,"sheet_y":28,"sort_order":73},"🔁":{"category":"Symbols","sheet_x":27,"sheet_y":29,"sort_order":74},"🔂":{"category":"Symbols","sheet_x":27,"sheet_y":30,"sort_order":75},"🔃":{"category":"Symbols","sheet_x":27,"sheet_y":31,"sort_order":41},"🔄":{"category":"Symbols","sheet_x":27,"sheet_y":32,"sort_order":42},"🔅":{"category":"Symbols","sheet_x":27,"sheet_y":33,"sort_order":92},"🔆":{"category":"Symbols","sheet_x":27,"sheet_y":34,"sort_order":93},"🔇":{"category":"Objects","sheet_x":27,"sheet_y":35,"sort_order":44},"🔈":{"category":"Objects","sheet_x":27,"sheet_y":36,"sort_order":45},"🔉":{"category":"Objects","sheet_x":27,"sheet_y":37,"sort_order":46},"🔊":{"category":"Objects","sheet_x":27,"sheet_y":38,"sort_order":47},"🔋":{"category":"Objects","sheet_x":27,"sheet_y":39,"sort_order":75},"🔌":{"category":"Objects","sheet_x":27,"sheet_y":40,"sort_order":76},"🔍":{"category":"Objects","sheet_x":27,"sheet_y":41,"sort_order":97},"🔎":{"category":"Objects","sheet_x":27,"sheet_y":42,"sort_order":98},"🔏":{"category":"Objects","sheet_x":27,"sheet_y":43,"sort_order":177},"🔐":{"category":"Objects","sheet_x":27,"sheet_y":44,"sort_order":178},"🔑":{"category":"Objects","sheet_x":27,"sheet_y":45,"sort_order":179},"🔒":{"category":"Objects","sheet_x":27,"sheet_y":46,"sort_order":175},"🔓":{"category":"Objects","sheet_x":27,"sheet_y":47,"sort_order":176},"🔔":{"category":"Objects","sheet_x":27,"sheet_y":48,"sort_order":51},"🔕":{"category":"Objects","sheet_x":27,"sheet_y":49,"sort_order":52},"🔖":{"category":"Objects","sheet_x":27,"sheet_y":50,"sort_order":119},"🔗":{"category":"Objects","sheet_x":27,"sheet_y":51,"sort_order":197},"🔘":{"category":"Symbols","sheet_x":27,"sheet_y":52,"sort_order":215},"🔙":{"category":"Symbols","sheet_x":27,"sheet_y":53,"sort_order":43},"🔚":{"category":"Symbols","sheet_x":27,"sheet_y":54,"sort_order":44},"🔛":{"category":"Symbols","sheet_x":27,"sheet_y":55,"sort_order":45},"🔜":{"category":"Symbols","sheet_x":27,"sheet_y":56,"sort_order":46},"🔝":{"category":"Symbols","sheet_x":28,"sheet_y":0,"sort_order":47},"🔞":{"category":"Symbols","sheet_x":28,"sheet_y":1,"sort_order":24},"🔟":{"category":"Symbols","sheet_x":28,"sheet_y":2,"sort_order":144},"🔠":{"category":"Symbols","sheet_x":28,"sheet_y":3,"sort_order":145},"🔡":{"category":"Symbols","sheet_x":28,"sheet_y":4,"sort_order":146},"🔢":{"category":"Symbols","sheet_x":28,"sheet_y":5,"sort_order":147},"🔣":{"category":"Symbols","sheet_x":28,"sheet_y":6,"sort_order":148},"🔤":{"category":"Symbols","sheet_x":28,"sheet_y":7,"sort_order":149},"🔥":{"category":"Travel & Places","sheet_x":28,"sheet_y":8,"sort_order":208},"🔦":{"category":"Objects","sheet_x":28,"sheet_y":9,"sort_order":101},"🔧":{"category":"Objects","sheet_x":28,"sheet_y":10,"sort_order":191},"🔨":{"category":"Objects","sheet_x":28,"sheet_y":11,"sort_order":181},"🔩":{"category":"Objects","sheet_x":28,"sheet_y":12,"sort_order":192},"🔪":{"category":"Food & Drink","sheet_x":28,"sheet_y":13,"sort_order":120},"🔫":{"category":"Objects","sheet_x":28,"sheet_y":14,"sort_order":188},"🔬":{"category":"Objects","sheet_x":28,"sheet_y":15,"sort_order":205},"🔭":{"category":"Objects","sheet_x":28,"sheet_y":16,"sort_order":206},"🔮":{"category":"Activities","sheet_x":28,"sheet_y":17,"sort_order":59},"🔯":{"category":"Symbols","sheet_x":28,"sheet_y":18,"sort_order":59},"🔰":{"category":"Symbols","sheet_x":28,"sheet_y":19,"sort_order":105},"🔱":{"category":"Symbols","sheet_x":28,"sheet_y":20,"sort_order":103},"🔲":{"category":"Symbols","sheet_x":28,"sheet_y":21,"sort_order":217},"🔳":{"category":"Symbols","sheet_x":28,"sheet_y":22,"sort_order":216},"🔴":{"category":"Symbols","sheet_x":28,"sheet_y":23,"sort_order":184},"🔵":{"category":"Symbols","sheet_x":28,"sheet_y":24,"sort_order":188},"🔶":{"category":"Symbols","sheet_x":28,"sheet_y":25,"sort_order":208},"🔷":{"category":"Symbols","sheet_x":28,"sheet_y":26,"sort_order":209},"🔸":{"category":"Symbols","sheet_x":28,"sheet_y":27,"sort_order":210},"🔹":{"category":"Symbols","sheet_x":28,"sheet_y":28,"sort_order":211},"🔺":{"category":"Symbols","sheet_x":28,"sheet_y":29,"sort_order":212},"🔻":{"category":"Symbols","sheet_x":28,"sheet_y":30,"sort_order":213},"🔼":{"category":"Symbols","sheet_x":28,"sheet_y":31,"sort_order":83},"🔽":{"category":"Symbols","sheet_x":28,"sheet_y":32,"sort_order":85},"🕉️":{"category":"Symbols","sheet_x":28,"sheet_y":33,"sort_order":50},"🕊️":{"category":"Animals & Nature","sheet_x":28,"sheet_y":34,"sort_order":68},"🕋":{"category":"Travel & Places","sheet_x":28,"sheet_y":35,"sort_order":46},"🕌":{"category":"Travel & Places","sheet_x":28,"sheet_y":36,"sort_order":42},"🕍":{"category":"Travel & Places","sheet_x":28,"sheet_y":37,"sort_order":44},"🕎":{"category":"Symbols","sheet_x":28,"sheet_y":38,"sort_order":58},"🕐":{"category":"Travel & Places","sheet_x":28,"sheet_y":39,"sort_order":142},"🕑":{"category":"Travel & Places","sheet_x":28,"sheet_y":40,"sort_order":144},"🕒":{"category":"Travel & Places","sheet_x":28,"sheet_y":41,"sort_order":146},"🕓":{"category":"Travel & Places","sheet_x":28,"sheet_y":42,"sort_order":148},"🕔":{"category":"Travel & Places","sheet_x":28,"sheet_y":43,"sort_order":150},"🕕":{"category":"Travel & Places","sheet_x":28,"sheet_y":44,"sort_order":152},"🕖":{"category":"Travel & Places","sheet_x":28,"sheet_y":45,"sort_order":154},"🕗":{"category":"Travel & Places","sheet_x":28,"sheet_y":46,"sort_order":156},"🕘":{"category":"Travel & Places","sheet_x":28,"sheet_y":47,"sort_order":158},"🕙":{"category":"Travel & Places","sheet_x":28,"sheet_y":48,"sort_order":160},"🕚":{"category":"Travel & Places","sheet_x":28,"sheet_y":49,"sort_order":162},"🕛":{"category":"Travel & Places","sheet_x":28,"sheet_y":50,"sort_order":140},"🕜":{"category":"Travel & Places","sheet_x":28,"sheet_y":51,"sort_order":143},"🕝":{"category":"Travel & Places","sheet_x":28,"sheet_y":52,"sort_order":145},"🕞":{"category":"Travel & Places","sheet_x":28,"sheet_y":53,"sort_order":147},"🕟":{"category":"Travel & Places","sheet_x":28,"sheet_y":54,"sort_order":149},"🕠":{"category":"Travel & Places","sheet_x":28,"sheet_y":55,"sort_order":151},"🕡":{"category":"Travel & Places","sheet_x":28,"sheet_y":56,"sort_order":153},"🕢":{"category":"Travel & Places","sheet_x":29,"sheet_y":0,"sort_order":155},"🕣":{"category":"Travel & Places","sheet_x":29,"sheet_y":1,"sort_order":157},"🕤":{"category":"Travel & Places","sheet_x":29,"sheet_y":2,"sort_order":159},"🕥":{"category":"Travel & Places","sheet_x":29,"sheet_y":3,"sort_order":161},"🕦":{"category":"Travel & Places","sheet_x":29,"sheet_y":4,"sort_order":163},"🕧":{"category":"Travel & Places","sheet_x":29,"sheet_y":5,"sort_order":141},"🕯️":{"category":"Objects","sheet_x":29,"sheet_y":6,"sort_order":99},"🕰️":{"category":"Travel & Places","sheet_x":29,"sheet_y":7,"sort_order":139},"🕳️":{"category":"Smileys & Emotion","sheet_x":29,"sheet_y":8,"sort_order":142},"🕴️":{"category":"People & Body","sheet_x":29,"sheet_y":9,"sort_order":235},"🕵️‍♀️":{"category":"People & Body","sheet_x":29,"sheet_y":15,"sort_order":158},"🕵️‍♂️":{"category":"People & Body","sheet_x":29,"sheet_y":21,"sort_order":157},"🕵️":{"category":"People & Body","sheet_x":29,"sheet_y":27,"sort_order":156},"🕶️":{"category":"Objects","sheet_x":29,"sheet_y":33,"sort_order":2},"🕷️":{"category":"Animals & Nature","sheet_x":29,"sheet_y":34,"sort_order":101},"🕸️":{"category":"Animals & Nature","sheet_x":29,"sheet_y":35,"sort_order":102},"🕹️":{"category":"Activities","sheet_x":29,"sheet_y":36,"sort_order":62},"🕺":{"category":"People & Body","sheet_x":29,"sheet_y":37,"sort_order":234},"🖇️":{"category":"Objects","sheet_x":29,"sheet_y":43,"sort_order":168},"🖊️":{"category":"Objects","sheet_x":29,"sheet_y":44,"sort_order":148},"🖋️":{"category":"Objects","sheet_x":29,"sheet_y":45,"sort_order":147},"🖌️":{"category":"Objects","sheet_x":29,"sheet_y":46,"sort_order":149},"🖍️":{"category":"Objects","sheet_x":29,"sheet_y":47,"sort_order":150},"🖐️":{"category":"People & Body","sheet_x":29,"sheet_y":48,"sort_order":3},"🖕":{"category":"People & Body","sheet_x":29,"sheet_y":54,"sort_order":16},"🖖":{"category":"People & Body","sheet_x":30,"sheet_y":3,"sort_order":5},"🖤":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":9,"sort_order":134},"🖥️":{"category":"Objects","sheet_x":30,"sheet_y":10,"sort_order":78},"🖨️":{"category":"Objects","sheet_x":30,"sheet_y":11,"sort_order":79},"🖱️":{"category":"Objects","sheet_x":30,"sheet_y":12,"sort_order":81},"🖲️":{"category":"Objects","sheet_x":30,"sheet_y":13,"sort_order":82},"🖼️":{"category":"Activities","sheet_x":30,"sheet_y":14,"sort_order":76},"🗂️":{"category":"Objects","sheet_x":30,"sheet_y":15,"sort_order":155},"🗃️":{"category":"Objects","sheet_x":30,"sheet_y":16,"sort_order":172},"🗄️":{"category":"Objects","sheet_x":30,"sheet_y":17,"sort_order":173},"🗑️":{"category":"Objects","sheet_x":30,"sheet_y":18,"sort_order":174},"🗒️":{"category":"Objects","sheet_x":30,"sheet_y":19,"sort_order":158},"🗓️":{"category":"Objects","sheet_x":30,"sheet_y":20,"sort_order":159},"🗜️":{"category":"Objects","sheet_x":30,"sheet_y":21,"sort_order":194},"🗝️":{"category":"Objects","sheet_x":30,"sheet_y":22,"sort_order":180},"🗞️":{"category":"Objects","sheet_x":30,"sheet_y":23,"sort_order":117},"🗡️":{"category":"Objects","sheet_x":30,"sheet_y":24,"sort_order":186},"🗣️":{"category":"People & Body","sheet_x":30,"sheet_y":25,"sort_order":331},"🗨️":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":26,"sort_order":146},"🗯️":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":27,"sort_order":147},"🗳️":{"category":"Objects","sheet_x":30,"sheet_y":28,"sort_order":144},"🗺️":{"category":"Travel & Places","sheet_x":30,"sheet_y":29,"sort_order":5},"🗻":{"category":"Travel & Places","sheet_x":30,"sheet_y":30,"sort_order":11},"🗼":{"category":"Travel & Places","sheet_x":30,"sheet_y":31,"sort_order":39},"🗽":{"category":"Travel & Places","sheet_x":30,"sheet_y":32,"sort_order":40},"🗾":{"category":"Travel & Places","sheet_x":30,"sheet_y":33,"sort_order":6},"🗿":{"category":"Objects","sheet_x":30,"sheet_y":34,"sort_order":233},"😀":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":35,"sort_order":1},"😁":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":36,"sort_order":4},"😂":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":37,"sort_order":8},"😃":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":38,"sort_order":2},"😄":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":39,"sort_order":3},"😅":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":40,"sort_order":6},"😆":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":41,"sort_order":5},"😇":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":42,"sort_order":13},"😈":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":43,"sort_order":91},"😉":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":44,"sort_order":11},"😊":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":45,"sort_order":12},"😋":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":46,"sort_order":22},"😌":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":47,"sort_order":42},"😍":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":48,"sort_order":15},"😎":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":49,"sort_order":60},"😏":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":50,"sort_order":37},"😐":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":51,"sort_order":34},"😑":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":52,"sort_order":35},"😒":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":53,"sort_order":38},"😓":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":54,"sort_order":83},"😔":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":55,"sort_order":43},"😕":{"category":"Smileys & Emotion","sheet_x":30,"sheet_y":56,"sort_order":63},"😖":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":0,"sort_order":80},"😗":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":1,"sort_order":18},"😘":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":2,"sort_order":17},"😙":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":3,"sort_order":21},"😚":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":4,"sort_order":20},"😛":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":5,"sort_order":23},"😜":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":6,"sort_order":24},"😝":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":7,"sort_order":26},"😞":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":8,"sort_order":82},"😟":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":9,"sort_order":64},"😠":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":10,"sort_order":89},"😡":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":11,"sort_order":88},"😢":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":12,"sort_order":77},"😣":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":13,"sort_order":81},"😤":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":14,"sort_order":87},"😥":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":15,"sort_order":76},"😦":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":16,"sort_order":72},"😧":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":17,"sort_order":73},"😨":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":18,"sort_order":74},"😩":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":19,"sort_order":84},"😪":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":20,"sort_order":44},"😫":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":21,"sort_order":85},"😬":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":22,"sort_order":40},"😭":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":23,"sort_order":78},"😮":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":24,"sort_order":67},"😯":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":25,"sort_order":68},"😰":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":26,"sort_order":75},"😱":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":27,"sort_order":79},"😲":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":28,"sort_order":69},"😳":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":29,"sort_order":70},"😴":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":30,"sort_order":46},"😵":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":31,"sort_order":56},"😶":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":32,"sort_order":36},"😷":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":33,"sort_order":47},"😸":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":34,"sort_order":104},"😹":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":35,"sort_order":105},"😺":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":36,"sort_order":103},"😻":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":37,"sort_order":106},"😼":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":38,"sort_order":107},"😽":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":39,"sort_order":108},"😾":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":40,"sort_order":111},"😿":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":41,"sort_order":110},"🙀":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":42,"sort_order":109},"🙁":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":43,"sort_order":65},"🙂":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":44,"sort_order":9},"🙃":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":45,"sort_order":10},"🙄":{"category":"Smileys & Emotion","sheet_x":31,"sheet_y":46,"sort_order":39},"🙅‍♀️":{"category":"People & Body","sheet_x":31,"sheet_y":47,"sort_order":83},"🙅‍♂️":{"category":"People & Body","sheet_x":31,"sheet_y":53,"sort_order":82},"🙅":{"category":"People & Body","sheet_x":32,"sheet_y":2,"sort_order":81},"🙆‍♀️":{"category":"People & Body","sheet_x":32,"sheet_y":8,"sort_order":86},"🙆‍♂️":{"category":"People & Body","sheet_x":32,"sheet_y":14,"sort_order":85},"🙆":{"category":"People & Body","sheet_x":32,"sheet_y":20,"sort_order":84},"🙇‍♀️":{"category":"People & Body","sheet_x":32,"sheet_y":26,"sort_order":98},"🙇‍♂️":{"category":"People & Body","sheet_x":32,"sheet_y":32,"sort_order":97},"🙇":{"category":"People & Body","sheet_x":32,"sheet_y":38,"sort_order":96},"🙈":{"category":"Smileys & Emotion","sheet_x":32,"sheet_y":44,"sort_order":112},"🙉":{"category":"Smileys & Emotion","sheet_x":32,"sheet_y":45,"sort_order":113},"🙊":{"category":"Smileys & Emotion","sheet_x":32,"sheet_y":46,"sort_order":114},"🙋‍♀️":{"category":"People & Body","sheet_x":32,"sheet_y":47,"sort_order":92},"🙋‍♂️":{"category":"People & Body","sheet_x":32,"sheet_y":53,"sort_order":91},"🙋":{"category":"People & Body","sheet_x":33,"sheet_y":2,"sort_order":90},"🙌":{"category":"People & Body","sheet_x":33,"sheet_y":8,"sort_order":26},"🙍‍♀️":{"category":"People & Body","sheet_x":33,"sheet_y":14,"sort_order":77},"🙍‍♂️":{"category":"People & Body","sheet_x":33,"sheet_y":20,"sort_order":76},"🙍":{"category":"People & Body","sheet_x":33,"sheet_y":26,"sort_order":75},"🙎‍♀️":{"category":"People & Body","sheet_x":33,"sheet_y":32,"sort_order":80},"🙎‍♂️":{"category":"People & Body","sheet_x":33,"sheet_y":38,"sort_order":79},"🙎":{"category":"People & Body","sheet_x":33,"sheet_y":44,"sort_order":78},"🙏":{"category":"People & Body","sheet_x":33,"sheet_y":50,"sort_order":30},"🚀":{"category":"Travel & Places","sheet_x":33,"sheet_y":56,"sort_order":129},"🚁":{"category":"Travel & Places","sheet_x":34,"sheet_y":0,"sort_order":124},"🚂":{"category":"Travel & Places","sheet_x":34,"sheet_y":1,"sort_order":63},"🚃":{"category":"Travel & Places","sheet_x":34,"sheet_y":2,"sort_order":64},"🚄":{"category":"Travel & Places","sheet_x":34,"sheet_y":3,"sort_order":65},"🚅":{"category":"Travel & Places","sheet_x":34,"sheet_y":4,"sort_order":66},"🚆":{"category":"Travel & Places","sheet_x":34,"sheet_y":5,"sort_order":67},"🚇":{"category":"Travel & Places","sheet_x":34,"sheet_y":6,"sort_order":68},"🚈":{"category":"Travel & Places","sheet_x":34,"sheet_y":7,"sort_order":69},"🚉":{"category":"Travel & Places","sheet_x":34,"sheet_y":8,"sort_order":70},"🚊":{"category":"Travel & Places","sheet_x":34,"sheet_y":9,"sort_order":71},"🚋":{"category":"Travel & Places","sheet_x":34,"sheet_y":10,"sort_order":74},"🚌":{"category":"Travel & Places","sheet_x":34,"sheet_y":11,"sort_order":75},"🚍":{"category":"Travel & Places","sheet_x":34,"sheet_y":12,"sort_order":76},"🚎":{"category":"Travel & Places","sheet_x":34,"sheet_y":13,"sort_order":77},"🚏":{"category":"Travel & Places","sheet_x":34,"sheet_y":14,"sort_order":100},"🚐":{"category":"Travel & Places","sheet_x":34,"sheet_y":15,"sort_order":78},"🚑":{"category":"Travel & Places","sheet_x":34,"sheet_y":16,"sort_order":79},"🚒":{"category":"Travel & Places","sheet_x":34,"sheet_y":17,"sort_order":80},"🚓":{"category":"Travel & Places","sheet_x":34,"sheet_y":18,"sort_order":81},"🚔":{"category":"Travel & Places","sheet_x":34,"sheet_y":19,"sort_order":82},"🚕":{"category":"Travel & Places","sheet_x":34,"sheet_y":20,"sort_order":83},"🚖":{"category":"Travel & Places","sheet_x":34,"sheet_y":21,"sort_order":84},"🚗":{"category":"Travel & Places","sheet_x":34,"sheet_y":22,"sort_order":85},"🚘":{"category":"Travel & Places","sheet_x":34,"sheet_y":23,"sort_order":86},"🚙":{"category":"Travel & Places","sheet_x":34,"sheet_y":24,"sort_order":87},"🚚":{"category":"Travel & Places","sheet_x":34,"sheet_y":25,"sort_order":88},"🚛":{"category":"Travel & Places","sheet_x":34,"sheet_y":26,"sort_order":89},"🚜":{"category":"Travel & Places","sheet_x":34,"sheet_y":27,"sort_order":90},"🚝":{"category":"Travel & Places","sheet_x":34,"sheet_y":28,"sort_order":72},"🚞":{"category":"Travel & Places","sheet_x":34,"sheet_y":29,"sort_order":73},"🚟":{"category":"Travel & Places","sheet_x":34,"sheet_y":30,"sort_order":125},"🚠":{"category":"Travel & Places","sheet_x":34,"sheet_y":31,"sort_order":126},"🚡":{"category":"Travel & Places","sheet_x":34,"sheet_y":32,"sort_order":127},"🚢":{"category":"Travel & Places","sheet_x":34,"sheet_y":33,"sort_order":117},"🚣‍♀️":{"category":"People & Body","sheet_x":34,"sheet_y":34,"sort_order":257},"🚣‍♂️":{"category":"People & Body","sheet_x":34,"sheet_y":40,"sort_order":256},"🚣":{"category":"People & Body","sheet_x":34,"sheet_y":46,"sort_order":255},"🚤":{"category":"Travel & Places","sheet_x":34,"sheet_y":52,"sort_order":113},"🚥":{"category":"Travel & Places","sheet_x":34,"sheet_y":53,"sort_order":106},"🚦":{"category":"Travel & Places","sheet_x":34,"sheet_y":54,"sort_order":107},"🚧":{"category":"Travel & Places","sheet_x":34,"sheet_y":55,"sort_order":109},"🚨":{"category":"Travel & Places","sheet_x":34,"sheet_y":56,"sort_order":105},"🚩":{"category":"Flags","sheet_x":35,"sheet_y":0,"sort_order":2},"🚪":{"category":"Objects","sheet_x":35,"sheet_y":1,"sort_order":213},"🚫":{"category":"Symbols","sheet_x":35,"sheet_y":2,"sort_order":17},"🚬":{"category":"Objects","sheet_x":35,"sheet_y":3,"sort_order":230},"🚭":{"category":"Symbols","sheet_x":35,"sheet_y":4,"sort_order":19},"🚮":{"category":"Symbols","sheet_x":35,"sheet_y":5,"sort_order":2},"🚯":{"category":"Symbols","sheet_x":35,"sheet_y":6,"sort_order":20},"🚰":{"category":"Symbols","sheet_x":35,"sheet_y":7,"sort_order":3},"🚱":{"category":"Symbols","sheet_x":35,"sheet_y":8,"sort_order":21},"🚲":{"category":"Travel & Places","sheet_x":35,"sheet_y":9,"sort_order":97},"🚳":{"category":"Symbols","sheet_x":35,"sheet_y":10,"sort_order":18},"🚴‍♀️":{"category":"People & Body","sheet_x":35,"sheet_y":11,"sort_order":269},"🚴‍♂️":{"category":"People & Body","sheet_x":35,"sheet_y":17,"sort_order":268},"🚴":{"category":"People & Body","sheet_x":35,"sheet_y":23,"sort_order":267},"🚵‍♀️":{"category":"People & Body","sheet_x":35,"sheet_y":29,"sort_order":272},"🚵‍♂️":{"category":"People & Body","sheet_x":35,"sheet_y":35,"sort_order":271},"🚵":{"category":"People & Body","sheet_x":35,"sheet_y":41,"sort_order":270},"🚶‍♀️":{"category":"People & Body","sheet_x":35,"sheet_y":47,"sort_order":214},"🚶‍♂️":{"category":"People & Body","sheet_x":35,"sheet_y":53,"sort_order":213},"🚶":{"category":"People & Body","sheet_x":36,"sheet_y":2,"sort_order":212},"🚷":{"category":"Symbols","sheet_x":36,"sheet_y":8,"sort_order":22},"🚸":{"category":"Symbols","sheet_x":36,"sheet_y":9,"sort_order":15},"🚹":{"category":"Symbols","sheet_x":36,"sheet_y":10,"sort_order":5},"🚺":{"category":"Symbols","sheet_x":36,"sheet_y":11,"sort_order":6},"🚻":{"category":"Symbols","sheet_x":36,"sheet_y":12,"sort_order":7},"🚼":{"category":"Symbols","sheet_x":36,"sheet_y":13,"sort_order":8},"🚽":{"category":"Objects","sheet_x":36,"sheet_y":14,"sort_order":217},"🚾":{"category":"Symbols","sheet_x":36,"sheet_y":15,"sort_order":9},"🚿":{"category":"Objects","sheet_x":36,"sheet_y":16,"sort_order":218},"🛀":{"category":"People & Body","sheet_x":36,"sheet_y":17,"sort_order":291},"🛁":{"category":"Objects","sheet_x":36,"sheet_y":23,"sort_order":219},"🛂":{"category":"Symbols","sheet_x":36,"sheet_y":24,"sort_order":10},"🛃":{"category":"Symbols","sheet_x":36,"sheet_y":25,"sort_order":11},"🛄":{"category":"Symbols","sheet_x":36,"sheet_y":26,"sort_order":12},"🛅":{"category":"Symbols","sheet_x":36,"sheet_y":27,"sort_order":13},"🛋️":{"category":"Objects","sheet_x":36,"sheet_y":28,"sort_order":215},"🛌":{"category":"People & Body","sheet_x":36,"sheet_y":29,"sort_order":292},"🛍️":{"category":"Objects","sheet_x":36,"sheet_y":35,"sort_order":24},"🛎️":{"category":"Travel & Places","sheet_x":36,"sheet_y":36,"sort_order":131},"🛏️":{"category":"Objects","sheet_x":36,"sheet_y":37,"sort_order":214},"🛐":{"category":"Symbols","sheet_x":36,"sheet_y":38,"sort_order":48},"🛑":{"category":"Travel & Places","sheet_x":36,"sheet_y":39,"sort_order":108},"🛒":{"category":"Objects","sheet_x":36,"sheet_y":40,"sort_order":229},"🛕":{"category":"Travel & Places","sheet_x":36,"sheet_y":41,"sort_order":43},"🛠️":{"category":"Objects","sheet_x":36,"sheet_y":42,"sort_order":185},"🛡️":{"category":"Objects","sheet_x":36,"sheet_y":43,"sort_order":190},"🛢️":{"category":"Travel & Places","sheet_x":36,"sheet_y":44,"sort_order":103},"🛣️":{"category":"Travel & Places","sheet_x":36,"sheet_y":45,"sort_order":101},"🛤️":{"category":"Travel & Places","sheet_x":36,"sheet_y":46,"sort_order":102},"🛥️":{"category":"Travel & Places","sheet_x":36,"sheet_y":47,"sort_order":116},"🛩️":{"category":"Travel & Places","sheet_x":36,"sheet_y":48,"sort_order":119},"🛫":{"category":"Travel & Places","sheet_x":36,"sheet_y":49,"sort_order":120},"🛬":{"category":"Travel & Places","sheet_x":36,"sheet_y":50,"sort_order":121},"🛰️":{"category":"Travel & Places","sheet_x":36,"sheet_y":51,"sort_order":128},"🛳️":{"category":"Travel & Places","sheet_x":36,"sheet_y":52,"sort_order":114},"🛴":{"category":"Travel & Places","sheet_x":36,"sheet_y":53,"sort_order":98},"🛵":{"category":"Travel & Places","sheet_x":36,"sheet_y":54,"sort_order":93},"🛶":{"category":"Travel & Places","sheet_x":36,"sheet_y":55,"sort_order":112},"🛷":{"category":"Activities","sheet_x":36,"sheet_y":56,"sort_order":53},"🛸":{"category":"Travel & Places","sheet_x":37,"sheet_y":0,"sort_order":130},"🛹":{"category":"Travel & Places","sheet_x":37,"sheet_y":1,"sort_order":99},"🛺":{"category":"Travel & Places","sheet_x":37,"sheet_y":2,"sort_order":96},"🟠":{"category":"Symbols","sheet_x":37,"sheet_y":3,"sort_order":185},"🟡":{"category":"Symbols","sheet_x":37,"sheet_y":4,"sort_order":186},"🟢":{"category":"Symbols","sheet_x":37,"sheet_y":5,"sort_order":187},"🟣":{"category":"Symbols","sheet_x":37,"sheet_y":6,"sort_order":189},"🟤":{"category":"Symbols","sheet_x":37,"sheet_y":7,"sort_order":190},"🟥":{"category":"Symbols","sheet_x":37,"sheet_y":8,"sort_order":193},"🟦":{"category":"Symbols","sheet_x":37,"sheet_y":9,"sort_order":197},"🟧":{"category":"Symbols","sheet_x":37,"sheet_y":10,"sort_order":194},"🟨":{"category":"Symbols","sheet_x":37,"sheet_y":11,"sort_order":195},"🟩":{"category":"Symbols","sheet_x":37,"sheet_y":12,"sort_order":196},"🟪":{"category":"Symbols","sheet_x":37,"sheet_y":13,"sort_order":198},"🟫":{"category":"Symbols","sheet_x":37,"sheet_y":14,"sort_order":199},"🤍":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":15,"sort_order":135},"🤎":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":16,"sort_order":133},"🤏":{"category":"People & Body","sheet_x":37,"sheet_y":17,"sort_order":7},"🤐":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":23,"sort_order":32},"🤑":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":24,"sort_order":27},"🤒":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":25,"sort_order":48},"🤓":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":26,"sort_order":61},"🤔":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":27,"sort_order":31},"🤕":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":28,"sort_order":49},"🤖":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":29,"sort_order":102},"🤗":{"category":"Smileys & Emotion","sheet_x":37,"sheet_y":30,"sort_order":28},"🤘":{"category":"People & Body","sheet_x":37,"sheet_y":31,"sort_order":11},"🤙":{"category":"People & Body","sheet_x":37,"sheet_y":37,"sort_order":12},"🤚":{"category":"People & Body","sheet_x":37,"sheet_y":43,"sort_order":2},"🤛":{"category":"People & Body","sheet_x":37,"sheet_y":49,"sort_order":23},"🤜":{"category":"People & Body","sheet_x":37,"sheet_y":55,"sort_order":24},"🤝":{"category":"People & Body","sheet_x":38,"sheet_y":4,"sort_order":29},"🤞":{"category":"People & Body","sheet_x":38,"sheet_y":5,"sort_order":9},"🤟":{"category":"People & Body","sheet_x":38,"sheet_y":11,"sort_order":10},"🤠":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":17,"sort_order":58},"🤡":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":18,"sort_order":96},"🤢":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":19,"sort_order":50},"🤣":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":20,"sort_order":7},"🤤":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":21,"sort_order":45},"🤥":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":22,"sort_order":41},"🤦‍♀️":{"category":"People & Body","sheet_x":38,"sheet_y":23,"sort_order":101},"🤦‍♂️":{"category":"People & Body","sheet_x":38,"sheet_y":29,"sort_order":100},"🤦":{"category":"People & Body","sheet_x":38,"sheet_y":35,"sort_order":99},"🤧":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":41,"sort_order":52},"🤨":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":42,"sort_order":33},"🤩":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":43,"sort_order":16},"🤪":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":44,"sort_order":25},"🤫":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":45,"sort_order":30},"🤬":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":46,"sort_order":90},"🤭":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":47,"sort_order":29},"🤮":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":48,"sort_order":51},"🤯":{"category":"Smileys & Emotion","sheet_x":38,"sheet_y":49,"sort_order":57},"🤰":{"category":"People & Body","sheet_x":38,"sheet_y":50,"sort_order":174},"🤱":{"category":"People & Body","sheet_x":38,"sheet_y":56,"sort_order":175},"🤲":{"category":"People & Body","sheet_x":39,"sheet_y":5,"sort_order":28},"🤳":{"category":"People & Body","sheet_x":39,"sheet_y":11,"sort_order":33},"🤴":{"category":"People & Body","sheet_x":39,"sheet_y":17,"sort_order":165},"🤵":{"category":"People & Body","sheet_x":39,"sheet_y":23,"sort_order":172},"🤶":{"category":"People & Body","sheet_x":39,"sheet_y":29,"sort_order":178},"🤷‍♀️":{"category":"People & Body","sheet_x":39,"sheet_y":35,"sort_order":104},"🤷‍♂️":{"category":"People & Body","sheet_x":39,"sheet_y":41,"sort_order":103},"🤷":{"category":"People & Body","sheet_x":39,"sheet_y":47,"sort_order":102},"🤸‍♀️":{"category":"People & Body","sheet_x":39,"sheet_y":53,"sort_order":275},"🤸‍♂️":{"category":"People & Body","sheet_x":40,"sheet_y":2,"sort_order":274},"🤸":{"category":"People & Body","sheet_x":40,"sheet_y":8,"sort_order":273},"🤹‍♀️":{"category":"People & Body","sheet_x":40,"sheet_y":14,"sort_order":287},"🤹‍♂️":{"category":"People & Body","sheet_x":40,"sheet_y":20,"sort_order":286},"🤹":{"category":"People & Body","sheet_x":40,"sheet_y":26,"sort_order":285},"🤺":{"category":"People & Body","sheet_x":40,"sheet_y":32,"sort_order":245},"🤼‍♀️":{"category":"People & Body","sheet_x":40,"sheet_y":33,"sort_order":278},"🤼‍♂️":{"category":"People & Body","sheet_x":40,"sheet_y":34,"sort_order":277},"🤼":{"category":"People & Body","sheet_x":40,"sheet_y":35,"sort_order":276},"🤽‍♀️":{"category":"People & Body","sheet_x":40,"sheet_y":36,"sort_order":281},"🤽‍♂️":{"category":"People & Body","sheet_x":40,"sheet_y":42,"sort_order":280},"🤽":{"category":"People & Body","sheet_x":40,"sheet_y":48,"sort_order":279},"🤾‍♀️":{"category":"People & Body","sheet_x":40,"sheet_y":54,"sort_order":284},"🤾‍♂️":{"category":"People & Body","sheet_x":41,"sheet_y":3,"sort_order":283},"🤾":{"category":"People & Body","sheet_x":41,"sheet_y":9,"sort_order":282},"🤿":{"category":"Activities","sheet_x":41,"sheet_y":15,"sort_order":50},"🥀":{"category":"Animals & Nature","sheet_x":41,"sheet_y":16,"sort_order":111},"🥁":{"category":"Objects","sheet_x":41,"sheet_y":17,"sort_order":68},"🥂":{"category":"Food & Drink","sheet_x":41,"sheet_y":18,"sort_order":110},"🥃":{"category":"Food & Drink","sheet_x":41,"sheet_y":19,"sort_order":111},"🥄":{"category":"Food & Drink","sheet_x":41,"sheet_y":20,"sort_order":119},"🥅":{"category":"Activities","sheet_x":41,"sheet_y":21,"sort_order":46},"🥇":{"category":"Activities","sheet_x":41,"sheet_y":22,"sort_order":25},"🥈":{"category":"Activities","sheet_x":41,"sheet_y":23,"sort_order":26},"🥉":{"category":"Activities","sheet_x":41,"sheet_y":24,"sort_order":27},"🥊":{"category":"Activities","sheet_x":41,"sheet_y":25,"sort_order":44},"🥋":{"category":"Activities","sheet_x":41,"sheet_y":26,"sort_order":45},"🥌":{"category":"Activities","sheet_x":41,"sheet_y":27,"sort_order":54},"🥍":{"category":"Activities","sheet_x":41,"sheet_y":28,"sort_order":41},"🥎":{"category":"Activities","sheet_x":41,"sheet_y":29,"sort_order":30},"🥏":{"category":"Activities","sheet_x":41,"sheet_y":30,"sort_order":36},"🥐":{"category":"Food & Drink","sheet_x":41,"sheet_y":31,"sort_order":33},"🥑":{"category":"Food & Drink","sheet_x":41,"sheet_y":32,"sort_order":18},"🥒":{"category":"Food & Drink","sheet_x":41,"sheet_y":33,"sort_order":24},"🥓":{"category":"Food & Drink","sheet_x":41,"sheet_y":34,"sort_order":43},"🥔":{"category":"Food & Drink","sheet_x":41,"sheet_y":35,"sort_order":20},"🥕":{"category":"Food & Drink","sheet_x":41,"sheet_y":36,"sort_order":21},"🥖":{"category":"Food & Drink","sheet_x":41,"sheet_y":37,"sort_order":34},"🥗":{"category":"Food & Drink","sheet_x":41,"sheet_y":38,"sort_order":58},"🥘":{"category":"Food & Drink","sheet_x":41,"sheet_y":39,"sort_order":55},"🥙":{"category":"Food & Drink","sheet_x":41,"sheet_y":40,"sort_order":51},"🥚":{"category":"Food & Drink","sheet_x":41,"sheet_y":41,"sort_order":53},"🥛":{"category":"Food & Drink","sheet_x":41,"sheet_y":42,"sort_order":100},"🥜":{"category":"Food & Drink","sheet_x":41,"sheet_y":43,"sort_order":30},"🥝":{"category":"Food & Drink","sheet_x":41,"sheet_y":44,"sort_order":15},"🥞":{"category":"Food & Drink","sheet_x":41,"sheet_y":45,"sort_order":37},"🥟":{"category":"Food & Drink","sheet_x":41,"sheet_y":46,"sort_order":77},"🥠":{"category":"Food & Drink","sheet_x":41,"sheet_y":47,"sort_order":78},"🥡":{"category":"Food & Drink","sheet_x":41,"sheet_y":48,"sort_order":79},"🥢":{"category":"Food & Drink","sheet_x":41,"sheet_y":49,"sort_order":116},"🥣":{"category":"Food & Drink","sheet_x":41,"sheet_y":50,"sort_order":57},"🥤":{"category":"Food & Drink","sheet_x":41,"sheet_y":51,"sort_order":112},"🥥":{"category":"Food & Drink","sheet_x":41,"sheet_y":52,"sort_order":17},"🥦":{"category":"Food & Drink","sheet_x":41,"sheet_y":53,"sort_order":26},"🥧":{"category":"Food & Drink","sheet_x":41,"sheet_y":54,"sort_order":93},"🥨":{"category":"Food & Drink","sheet_x":41,"sheet_y":55,"sort_order":35},"🥩":{"category":"Food & Drink","sheet_x":41,"sheet_y":56,"sort_order":42},"🥪":{"category":"Food & Drink","sheet_x":42,"sheet_y":0,"sort_order":48},"🥫":{"category":"Food & Drink","sheet_x":42,"sheet_y":1,"sort_order":62},"🥬":{"category":"Food & Drink","sheet_x":42,"sheet_y":2,"sort_order":25},"🥭":{"category":"Food & Drink","sheet_x":42,"sheet_y":3,"sort_order":8},"🥮":{"category":"Food & Drink","sheet_x":42,"sheet_y":4,"sort_order":75},"🥯":{"category":"Food & Drink","sheet_x":42,"sheet_y":5,"sort_order":36},"🥰":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":6,"sort_order":14},"🥱":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":7,"sort_order":86},"🥳":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":8,"sort_order":59},"🥴":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":9,"sort_order":55},"🥵":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":10,"sort_order":53},"🥶":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":11,"sort_order":54},"🥺":{"category":"Smileys & Emotion","sheet_x":42,"sheet_y":12,"sort_order":71},"🥻":{"category":"Objects","sheet_x":42,"sheet_y":13,"sort_order":15},"🥼":{"category":"Objects","sheet_x":42,"sheet_y":14,"sort_order":4},"🥽":{"category":"Objects","sheet_x":42,"sheet_y":15,"sort_order":3},"🥾":{"category":"Objects","sheet_x":42,"sheet_y":16,"sort_order":28},"🥿":{"category":"Objects","sheet_x":42,"sheet_y":17,"sort_order":29},"🦀":{"category":"Food & Drink","sheet_x":42,"sheet_y":18,"sort_order":80},"🦁":{"category":"Animals & Nature","sheet_x":42,"sheet_y":19,"sort_order":15},"🦂":{"category":"Animals & Nature","sheet_x":42,"sheet_y":20,"sort_order":103},"🦃":{"category":"Animals & Nature","sheet_x":42,"sheet_y":21,"sort_order":60},"🦄":{"category":"Animals & Nature","sheet_x":42,"sheet_y":22,"sort_order":21},"🦅":{"category":"Animals & Nature","sheet_x":42,"sheet_y":23,"sort_order":69},"🦆":{"category":"Animals & Nature","sheet_x":42,"sheet_y":24,"sort_order":70},"🦇":{"category":"Animals & Nature","sheet_x":42,"sheet_y":25,"sort_order":50},"🦈":{"category":"Animals & Nature","sheet_x":42,"sheet_y":26,"sort_order":91},"🦉":{"category":"Animals & Nature","sheet_x":42,"sheet_y":27,"sort_order":72},"🦊":{"category":"Animals & Nature","sheet_x":42,"sheet_y":28,"sort_order":11},"🦋":{"category":"Animals & Nature","sheet_x":42,"sheet_y":29,"sort_order":95},"🦌":{"category":"Animals & Nature","sheet_x":42,"sheet_y":30,"sort_order":23},"🦍":{"category":"Animals & Nature","sheet_x":42,"sheet_y":31,"sort_order":3},"🦎":{"category":"Animals & Nature","sheet_x":42,"sheet_y":32,"sort_order":79},"🦏":{"category":"Animals & Nature","sheet_x":42,"sheet_y":33,"sort_order":40},"🦐":{"category":"Food & Drink","sheet_x":42,"sheet_y":34,"sort_order":82},"🦑":{"category":"Food & Drink","sheet_x":42,"sheet_y":35,"sort_order":83},"🦒":{"category":"Animals & Nature","sheet_x":42,"sheet_y":36,"sort_order":38},"🦓":{"category":"Animals & Nature","sheet_x":42,"sheet_y":37,"sort_order":22},"🦔":{"category":"Animals & Nature","sheet_x":42,"sheet_y":38,"sort_order":49},"🦕":{"category":"Animals & Nature","sheet_x":42,"sheet_y":39,"sort_order":83},"🦖":{"category":"Animals & Nature","sheet_x":42,"sheet_y":40,"sort_order":84},"🦗":{"category":"Animals & Nature","sheet_x":42,"sheet_y":41,"sort_order":100},"🦘":{"category":"Animals & Nature","sheet_x":42,"sheet_y":42,"sort_order":57},"🦙":{"category":"Animals & Nature","sheet_x":42,"sheet_y":43,"sort_order":37},"🦚":{"category":"Animals & Nature","sheet_x":42,"sheet_y":44,"sort_order":74},"🦛":{"category":"Animals & Nature","sheet_x":42,"sheet_y":45,"sort_order":41},"🦜":{"category":"Animals & Nature","sheet_x":42,"sheet_y":46,"sort_order":75},"🦝":{"category":"Animals & Nature","sheet_x":42,"sheet_y":47,"sort_order":12},"🦞":{"category":"Food & Drink","sheet_x":42,"sheet_y":48,"sort_order":81},"🦟":{"category":"Animals & Nature","sheet_x":42,"sheet_y":49,"sort_order":104},"🦠":{"category":"Animals & Nature","sheet_x":42,"sheet_y":50,"sort_order":105},"🦡":{"category":"Animals & Nature","sheet_x":42,"sheet_y":51,"sort_order":58},"🦢":{"category":"Animals & Nature","sheet_x":42,"sheet_y":52,"sort_order":71},"🦥":{"category":"Animals & Nature","sheet_x":42,"sheet_y":53,"sort_order":54},"🦦":{"category":"Animals & Nature","sheet_x":42,"sheet_y":54,"sort_order":55},"🦧":{"category":"Animals & Nature","sheet_x":42,"sheet_y":55,"sort_order":4},"🦨":{"category":"Animals & Nature","sheet_x":42,"sheet_y":56,"sort_order":56},"🦩":{"category":"Animals & Nature","sheet_x":43,"sheet_y":0,"sort_order":73},"🦪":{"category":"Food & Drink","sheet_x":43,"sheet_y":1,"sort_order":84},"🦮":{"category":"Animals & Nature","sheet_x":43,"sheet_y":2,"sort_order":7},"🦯":{"category":"Objects","sheet_x":43,"sheet_y":3,"sort_order":196},"🦴":{"category":"People & Body","sheet_x":43,"sheet_y":4,"sort_order":44},"🦵":{"category":"People & Body","sheet_x":43,"sheet_y":5,"sort_order":37},"🦶":{"category":"People & Body","sheet_x":43,"sheet_y":11,"sort_order":38},"🦷":{"category":"People & Body","sheet_x":43,"sheet_y":17,"sort_order":43},"🦸‍♀️":{"category":"People & Body","sheet_x":43,"sheet_y":18,"sort_order":181},"🦸‍♂️":{"category":"People & Body","sheet_x":43,"sheet_y":24,"sort_order":180},"🦸":{"category":"People & Body","sheet_x":43,"sheet_y":30,"sort_order":179},"🦹‍♀️":{"category":"People & Body","sheet_x":43,"sheet_y":36,"sort_order":184},"🦹‍♂️":{"category":"People & Body","sheet_x":43,"sheet_y":42,"sort_order":183},"🦹":{"category":"People & Body","sheet_x":43,"sheet_y":48,"sort_order":182},"🦺":{"category":"Objects","sheet_x":43,"sheet_y":54,"sort_order":5},"🦻":{"category":"People & Body","sheet_x":43,"sheet_y":55,"sort_order":40},"🦼":{"category":"Travel & Places","sheet_x":44,"sheet_y":4,"sort_order":95},"🦽":{"category":"Travel & Places","sheet_x":44,"sheet_y":5,"sort_order":94},"🦾":{"category":"People & Body","sheet_x":44,"sheet_y":6,"sort_order":35},"🦿":{"category":"People & Body","sheet_x":44,"sheet_y":7,"sort_order":36},"🧀":{"category":"Food & Drink","sheet_x":44,"sheet_y":8,"sort_order":39},"🧁":{"category":"Food & Drink","sheet_x":44,"sheet_y":9,"sort_order":92},"🧂":{"category":"Food & Drink","sheet_x":44,"sheet_y":10,"sort_order":61},"🧃":{"category":"Food & Drink","sheet_x":44,"sheet_y":11,"sort_order":113},"🧄":{"category":"Food & Drink","sheet_x":44,"sheet_y":12,"sort_order":27},"🧅":{"category":"Food & Drink","sheet_x":44,"sheet_y":13,"sort_order":28},"🧆":{"category":"Food & Drink","sheet_x":44,"sheet_y":14,"sort_order":52},"🧇":{"category":"Food & Drink","sheet_x":44,"sheet_y":15,"sort_order":38},"🧈":{"category":"Food & Drink","sheet_x":44,"sheet_y":16,"sort_order":60},"🧉":{"category":"Food & Drink","sheet_x":44,"sheet_y":17,"sort_order":114},"🧊":{"category":"Food & Drink","sheet_x":44,"sheet_y":18,"sort_order":115},"🧍‍♀️":{"category":"People & Body","sheet_x":44,"sheet_y":19,"sort_order":217},"🧍‍♂️":{"category":"People & Body","sheet_x":44,"sheet_y":25,"sort_order":216},"🧍":{"category":"People & Body","sheet_x":44,"sheet_y":31,"sort_order":215},"🧎‍♀️":{"category":"People & Body","sheet_x":44,"sheet_y":37,"sort_order":220},"🧎‍♂️":{"category":"People & Body","sheet_x":44,"sheet_y":43,"sort_order":219},"🧎":{"category":"People & Body","sheet_x":44,"sheet_y":49,"sort_order":218},"🧏‍♀️":{"category":"People & Body","sheet_x":44,"sheet_y":55,"sort_order":95},"🧏‍♂️":{"category":"People & Body","sheet_x":45,"sheet_y":4,"sort_order":94},"🧏":{"category":"People & Body","sheet_x":45,"sheet_y":10,"sort_order":93},"🧐":{"category":"Smileys & Emotion","sheet_x":45,"sheet_y":16,"sort_order":62},"🧑‍🌾":{"category":"People & Body","sheet_x":45,"sheet_y":17,"sort_order":117},"🧑‍🍳":{"category":"People & Body","sheet_x":45,"sheet_y":23,"sort_order":120},"🧑‍🎓":{"category":"People & Body","sheet_x":45,"sheet_y":29,"sort_order":108},"🧑‍🎤":{"category":"People & Body","sheet_x":45,"sheet_y":35,"sort_order":138},"🧑‍🎨":{"category":"People & Body","sheet_x":45,"sheet_y":41,"sort_order":141},"🧑‍🏫":{"category":"People & Body","sheet_x":45,"sheet_y":47,"sort_order":111},"🧑‍🏭":{"category":"People & Body","sheet_x":45,"sheet_y":53,"sort_order":126},"🧑‍💻":{"category":"People & Body","sheet_x":46,"sheet_y":2,"sort_order":135},"🧑‍💼":{"category":"People & Body","sheet_x":46,"sheet_y":8,"sort_order":129},"🧑‍🔧":{"category":"People & Body","sheet_x":46,"sheet_y":14,"sort_order":123},"🧑‍🔬":{"category":"People & Body","sheet_x":46,"sheet_y":20,"sort_order":132},"🧑‍🚀":{"category":"People & Body","sheet_x":46,"sheet_y":26,"sort_order":147},"🧑‍🚒":{"category":"People & Body","sheet_x":46,"sheet_y":32,"sort_order":150},"🧑‍🤝‍🧑":{"category":"People & Body","sheet_x":46,"sheet_y":38,"sort_order":293},"🧑‍🦯":{"category":"People & Body","sheet_x":47,"sheet_y":7,"sort_order":221},"🧑‍🦰":{"category":"People & Body","sheet_x":47,"sheet_y":13,"sort_order":63},"🧑‍🦱":{"category":"People & Body","sheet_x":47,"sheet_y":19,"sort_order":65},"🧑‍🦲":{"category":"People & Body","sheet_x":47,"sheet_y":25,"sort_order":69},"🧑‍🦳":{"category":"People & Body","sheet_x":47,"sheet_y":31,"sort_order":67},"🧑‍🦼":{"category":"People & Body","sheet_x":47,"sheet_y":37,"sort_order":224},"🧑‍🦽":{"category":"People & Body","sheet_x":47,"sheet_y":43,"sort_order":227},"🧑‍⚕️":{"category":"People & Body","sheet_x":47,"sheet_y":49,"sort_order":105},"🧑‍⚖️":{"category":"People & Body","sheet_x":47,"sheet_y":55,"sort_order":114},"🧑‍✈️":{"category":"People & Body","sheet_x":48,"sheet_y":4,"sort_order":144},"🧑":{"category":"People & Body","sheet_x":48,"sheet_y":10,"sort_order":53},"🧒":{"category":"People & Body","sheet_x":48,"sheet_y":16,"sort_order":50},"🧓":{"category":"People & Body","sheet_x":48,"sheet_y":22,"sort_order":72},"🧔":{"category":"People & Body","sheet_x":48,"sheet_y":28,"sort_order":56},"🧕":{"category":"People & Body","sheet_x":48,"sheet_y":34,"sort_order":171},"🧖‍♀️":{"category":"People & Body","sheet_x":48,"sheet_y":40,"sort_order":241},"🧖‍♂️":{"category":"People & Body","sheet_x":48,"sheet_y":46,"sort_order":240},"🧖":{"category":"People & Body","sheet_x":48,"sheet_y":52,"sort_order":239},"🧗‍♀️":{"category":"People & Body","sheet_x":49,"sheet_y":1,"sort_order":244},"🧗‍♂️":{"category":"People & Body","sheet_x":49,"sheet_y":7,"sort_order":243},"🧗":{"category":"People & Body","sheet_x":49,"sheet_y":13,"sort_order":242},"🧘‍♀️":{"category":"People & Body","sheet_x":49,"sheet_y":19,"sort_order":290},"🧘‍♂️":{"category":"People & Body","sheet_x":49,"sheet_y":25,"sort_order":289},"🧘":{"category":"People & Body","sheet_x":49,"sheet_y":31,"sort_order":288},"🧙‍♀️":{"category":"People & Body","sheet_x":49,"sheet_y":37,"sort_order":187},"🧙‍♂️":{"category":"People & Body","sheet_x":49,"sheet_y":43,"sort_order":186},"🧙":{"category":"People & Body","sheet_x":49,"sheet_y":49,"sort_order":185},"🧚‍♀️":{"category":"People & Body","sheet_x":49,"sheet_y":55,"sort_order":190},"🧚‍♂️":{"category":"People & Body","sheet_x":50,"sheet_y":4,"sort_order":189},"🧚":{"category":"People & Body","sheet_x":50,"sheet_y":10,"sort_order":188},"🧛‍♀️":{"category":"People & Body","sheet_x":50,"sheet_y":16,"sort_order":193},"🧛‍♂️":{"category":"People & Body","sheet_x":50,"sheet_y":22,"sort_order":192},"🧛":{"category":"People & Body","sheet_x":50,"sheet_y":28,"sort_order":191},"🧜‍♀️":{"category":"People & Body","sheet_x":50,"sheet_y":34,"sort_order":196},"🧜‍♂️":{"category":"People & Body","sheet_x":50,"sheet_y":40,"sort_order":195},"🧜":{"category":"People & Body","sheet_x":50,"sheet_y":46,"sort_order":194},"🧝‍♀️":{"category":"People & Body","sheet_x":50,"sheet_y":52,"sort_order":199},"🧝‍♂️":{"category":"People & Body","sheet_x":51,"sheet_y":1,"sort_order":198},"🧝":{"category":"People & Body","sheet_x":51,"sheet_y":7,"sort_order":197},"🧞‍♀️":{"category":"People & Body","sheet_x":51,"sheet_y":13,"sort_order":202},"🧞‍♂️":{"category":"People & Body","sheet_x":51,"sheet_y":14,"sort_order":201},"🧞":{"category":"People & Body","sheet_x":51,"sheet_y":15,"sort_order":200},"🧟‍♀️":{"category":"People & Body","sheet_x":51,"sheet_y":16,"sort_order":205},"🧟‍♂️":{"category":"People & Body","sheet_x":51,"sheet_y":17,"sort_order":204},"🧟":{"category":"People & Body","sheet_x":51,"sheet_y":18,"sort_order":203},"🧠":{"category":"People & Body","sheet_x":51,"sheet_y":19,"sort_order":42},"🧡":{"category":"Smileys & Emotion","sheet_x":51,"sheet_y":20,"sort_order":128},"🧢":{"category":"Objects","sheet_x":51,"sheet_y":21,"sort_order":38},"🧣":{"category":"Objects","sheet_x":51,"sheet_y":22,"sort_order":9},"🧤":{"category":"Objects","sheet_x":51,"sheet_y":23,"sort_order":10},"🧥":{"category":"Objects","sheet_x":51,"sheet_y":24,"sort_order":11},"🧦":{"category":"Objects","sheet_x":51,"sheet_y":25,"sort_order":12},"🧧":{"category":"Activities","sheet_x":51,"sheet_y":26,"sort_order":16},"🧨":{"category":"Activities","sheet_x":51,"sheet_y":27,"sort_order":5},"🧩":{"category":"Activities","sheet_x":51,"sheet_y":28,"sort_order":65},"🧪":{"category":"Objects","sheet_x":51,"sheet_y":29,"sort_order":202},"🧫":{"category":"Objects","sheet_x":51,"sheet_y":30,"sort_order":203},"🧬":{"category":"Objects","sheet_x":51,"sheet_y":31,"sort_order":204},"🧭":{"category":"Travel & Places","sheet_x":51,"sheet_y":32,"sort_order":7},"🧮":{"category":"Objects","sheet_x":51,"sheet_y":33,"sort_order":87},"🧯":{"category":"Objects","sheet_x":51,"sheet_y":34,"sort_order":228},"🧰":{"category":"Objects","sheet_x":51,"sheet_y":35,"sort_order":199},"🧱":{"category":"Travel & Places","sheet_x":51,"sheet_y":36,"sort_order":20},"🧲":{"category":"Objects","sheet_x":51,"sheet_y":37,"sort_order":200},"🧳":{"category":"Travel & Places","sheet_x":51,"sheet_y":38,"sort_order":132},"🧴":{"category":"Objects","sheet_x":51,"sheet_y":39,"sort_order":221},"🧵":{"category":"Activities","sheet_x":51,"sheet_y":40,"sort_order":78},"🧶":{"category":"Activities","sheet_x":51,"sheet_y":41,"sort_order":79},"🧷":{"category":"Objects","sheet_x":51,"sheet_y":42,"sort_order":222},"🧸":{"category":"Activities","sheet_x":51,"sheet_y":43,"sort_order":66},"🧹":{"category":"Objects","sheet_x":51,"sheet_y":44,"sort_order":223},"🧺":{"category":"Objects","sheet_x":51,"sheet_y":45,"sort_order":224},"🧻":{"category":"Objects","sheet_x":51,"sheet_y":46,"sort_order":225},"🧼":{"category":"Objects","sheet_x":51,"sheet_y":47,"sort_order":226},"🧽":{"category":"Objects","sheet_x":51,"sheet_y":48,"sort_order":227},"🧾":{"category":"Objects","sheet_x":51,"sheet_y":49,"sort_order":128},"🧿":{"category":"Activities","sheet_x":51,"sheet_y":50,"sort_order":60},"🩰":{"category":"Objects","sheet_x":51,"sheet_y":51,"sort_order":32},"🩱":{"category":"Objects","sheet_x":51,"sheet_y":52,"sort_order":16},"🩲":{"category":"Objects","sheet_x":51,"sheet_y":53,"sort_order":17},"🩳":{"category":"Objects","sheet_x":51,"sheet_y":54,"sort_order":18},"🩸":{"category":"Objects","sheet_x":51,"sheet_y":55,"sort_order":209},"🩹":{"category":"Objects","sheet_x":51,"sheet_y":56,"sort_order":211},"🩺":{"category":"Objects","sheet_x":52,"sheet_y":0,"sort_order":212},"🪀":{"category":"Activities","sheet_x":52,"sheet_y":1,"sort_order":56},"🪁":{"category":"Activities","sheet_x":52,"sheet_y":2,"sort_order":57},"🪂":{"category":"Travel & Places","sheet_x":52,"sheet_y":3,"sort_order":122},"🪐":{"category":"Travel & Places","sheet_x":52,"sheet_y":4,"sort_order":180},"🪑":{"category":"Objects","sheet_x":52,"sheet_y":5,"sort_order":216},"🪒":{"category":"Objects","sheet_x":52,"sheet_y":6,"sort_order":220},"🪓":{"category":"Objects","sheet_x":52,"sheet_y":7,"sort_order":182},"🪔":{"category":"Objects","sheet_x":52,"sheet_y":8,"sort_order":103},"🪕":{"category":"Objects","sheet_x":52,"sheet_y":9,"sort_order":67},"‼️":{"category":"Symbols","sheet_x":52,"sheet_y":10,"sort_order":122},"⁉️":{"category":"Symbols","sheet_x":52,"sheet_y":11,"sort_order":123},"™️":{"category":"Symbols","sheet_x":52,"sheet_y":12,"sort_order":131},"ℹ️":{"category":"Symbols","sheet_x":52,"sheet_y":13,"sort_order":156},"↔️":{"category":"Symbols","sheet_x":52,"sheet_y":14,"sort_order":36},"↕️":{"category":"Symbols","sheet_x":52,"sheet_y":15,"sort_order":35},"↖️":{"category":"Symbols","sheet_x":52,"sheet_y":16,"sort_order":34},"↗️":{"category":"Symbols","sheet_x":52,"sheet_y":17,"sort_order":28},"↘️":{"category":"Symbols","sheet_x":52,"sheet_y":18,"sort_order":30},"↙️":{"category":"Symbols","sheet_x":52,"sheet_y":19,"sort_order":32},"↩️":{"category":"Symbols","sheet_x":52,"sheet_y":20,"sort_order":37},"↪️":{"category":"Symbols","sheet_x":52,"sheet_y":21,"sort_order":38},"⌚":{"category":"Travel & Places","sheet_x":52,"sheet_y":22,"sort_order":135},"⌛":{"category":"Travel & Places","sheet_x":52,"sheet_y":23,"sort_order":133},"⌨️":{"category":"Objects","sheet_x":52,"sheet_y":24,"sort_order":80},"⏏️":{"category":"Symbols","sheet_x":52,"sheet_y":25,"sort_order":90},"⏩":{"category":"Symbols","sheet_x":52,"sheet_y":26,"sort_order":77},"⏪":{"category":"Symbols","sheet_x":52,"sheet_y":27,"sort_order":81},"⏫":{"category":"Symbols","sheet_x":52,"sheet_y":28,"sort_order":84},"⏬":{"category":"Symbols","sheet_x":52,"sheet_y":29,"sort_order":86},"⏭️":{"category":"Symbols","sheet_x":52,"sheet_y":30,"sort_order":78},"⏮️":{"category":"Symbols","sheet_x":52,"sheet_y":31,"sort_order":82},"⏯️":{"category":"Symbols","sheet_x":52,"sheet_y":32,"sort_order":79},"⏰":{"category":"Travel & Places","sheet_x":52,"sheet_y":33,"sort_order":136},"⏱️":{"category":"Travel & Places","sheet_x":52,"sheet_y":34,"sort_order":137},"⏲️":{"category":"Travel & Places","sheet_x":52,"sheet_y":35,"sort_order":138},"⏳":{"category":"Travel & Places","sheet_x":52,"sheet_y":36,"sort_order":134},"⏸️":{"category":"Symbols","sheet_x":52,"sheet_y":37,"sort_order":87},"⏹️":{"category":"Symbols","sheet_x":52,"sheet_y":38,"sort_order":88},"⏺️":{"category":"Symbols","sheet_x":52,"sheet_y":39,"sort_order":89},"Ⓜ️":{"category":"Symbols","sheet_x":52,"sheet_y":40,"sort_order":158},"▪️":{"category":"Symbols","sheet_x":52,"sheet_y":41,"sort_order":206},"▫️":{"category":"Symbols","sheet_x":52,"sheet_y":42,"sort_order":207},"▶️":{"category":"Symbols","sheet_x":52,"sheet_y":43,"sort_order":76},"◀️":{"category":"Symbols","sheet_x":52,"sheet_y":44,"sort_order":80},"◻️":{"category":"Symbols","sheet_x":52,"sheet_y":45,"sort_order":203},"◼️":{"category":"Symbols","sheet_x":52,"sheet_y":46,"sort_order":202},"◽":{"category":"Symbols","sheet_x":52,"sheet_y":47,"sort_order":205},"◾":{"category":"Symbols","sheet_x":52,"sheet_y":48,"sort_order":204},"☀️":{"category":"Travel & Places","sheet_x":52,"sheet_y":49,"sort_order":177},"☁️":{"category":"Travel & Places","sheet_x":52,"sheet_y":50,"sort_order":185},"☂️":{"category":"Travel & Places","sheet_x":52,"sheet_y":51,"sort_order":200},"☃️":{"category":"Travel & Places","sheet_x":52,"sheet_y":52,"sort_order":205},"☄️":{"category":"Travel & Places","sheet_x":52,"sheet_y":53,"sort_order":207},"☎️":{"category":"Objects","sheet_x":52,"sheet_y":54,"sort_order":71},"☑️":{"category":"Symbols","sheet_x":52,"sheet_y":55,"sort_order":108},"☔":{"category":"Travel & Places","sheet_x":52,"sheet_y":56,"sort_order":201},"☕":{"category":"Food & Drink","sheet_x":53,"sheet_y":0,"sort_order":101},"☘️":{"category":"Animals & Nature","sheet_x":53,"sheet_y":1,"sort_order":123},"☝️":{"category":"People & Body","sheet_x":53,"sheet_y":2,"sort_order":18},"☠️":{"category":"Smileys & Emotion","sheet_x":53,"sheet_y":8,"sort_order":94},"☢️":{"category":"Symbols","sheet_x":53,"sheet_y":9,"sort_order":25},"☣️":{"category":"Symbols","sheet_x":53,"sheet_y":10,"sort_order":26},"☦️":{"category":"Symbols","sheet_x":53,"sheet_y":11,"sort_order":55},"☪️":{"category":"Symbols","sheet_x":53,"sheet_y":12,"sort_order":56},"☮️":{"category":"Symbols","sheet_x":53,"sheet_y":13,"sort_order":57},"☯️":{"category":"Symbols","sheet_x":53,"sheet_y":14,"sort_order":53},"☸️":{"category":"Symbols","sheet_x":53,"sheet_y":15,"sort_order":52},"☹️":{"category":"Smileys & Emotion","sheet_x":53,"sheet_y":16,"sort_order":66},"☺️":{"category":"Smileys & Emotion","sheet_x":53,"sheet_y":17,"sort_order":19},"♈":{"category":"Symbols","sheet_x":53,"sheet_y":20,"sort_order":60},"♉":{"category":"Symbols","sheet_x":53,"sheet_y":21,"sort_order":61},"♊":{"category":"Symbols","sheet_x":53,"sheet_y":22,"sort_order":62},"♋":{"category":"Symbols","sheet_x":53,"sheet_y":23,"sort_order":63},"♌":{"category":"Symbols","sheet_x":53,"sheet_y":24,"sort_order":64},"♍":{"category":"Symbols","sheet_x":53,"sheet_y":25,"sort_order":65},"♎":{"category":"Symbols","sheet_x":53,"sheet_y":26,"sort_order":66},"♏":{"category":"Symbols","sheet_x":53,"sheet_y":27,"sort_order":67},"♐":{"category":"Symbols","sheet_x":53,"sheet_y":28,"sort_order":68},"♑":{"category":"Symbols","sheet_x":53,"sheet_y":29,"sort_order":69},"♒":{"category":"Symbols","sheet_x":53,"sheet_y":30,"sort_order":70},"♓":{"category":"Symbols","sheet_x":53,"sheet_y":31,"sort_order":71},"♟️":{"category":"Activities","sheet_x":53,"sheet_y":32,"sort_order":71},"♠️":{"category":"Activities","sheet_x":53,"sheet_y":33,"sort_order":67},"♣️":{"category":"Activities","sheet_x":53,"sheet_y":34,"sort_order":70},"♥️":{"category":"Activities","sheet_x":53,"sheet_y":35,"sort_order":68},"♦️":{"category":"Activities","sheet_x":53,"sheet_y":36,"sort_order":69},"♨️":{"category":"Travel & Places","sheet_x":53,"sheet_y":37,"sort_order":57},"♻️":{"category":"Symbols","sheet_x":53,"sheet_y":38,"sort_order":101},"♾️":{"category":"Symbols","sheet_x":53,"sheet_y":39,"sort_order":100},"♿":{"category":"Symbols","sheet_x":53,"sheet_y":40,"sort_order":4},"⚒️":{"category":"Objects","sheet_x":53,"sheet_y":41,"sort_order":184},"⚓":{"category":"Travel & Places","sheet_x":53,"sheet_y":42,"sort_order":110},"⚔️":{"category":"Objects","sheet_x":53,"sheet_y":43,"sort_order":187},"⚖️":{"category":"Objects","sheet_x":53,"sheet_y":45,"sort_order":195},"⚗️":{"category":"Objects","sheet_x":53,"sheet_y":46,"sort_order":201},"⚙️":{"category":"Objects","sheet_x":53,"sheet_y":47,"sort_order":193},"⚛️":{"category":"Symbols","sheet_x":53,"sheet_y":48,"sort_order":49},"⚜️":{"category":"Symbols","sheet_x":53,"sheet_y":49,"sort_order":102},"⚠️":{"category":"Symbols","sheet_x":53,"sheet_y":50,"sort_order":14},"⚡":{"category":"Travel & Places","sheet_x":53,"sheet_y":51,"sort_order":203},"⚪":{"category":"Symbols","sheet_x":53,"sheet_y":52,"sort_order":192},"⚫":{"category":"Symbols","sheet_x":53,"sheet_y":53,"sort_order":191},"⚰️":{"category":"Objects","sheet_x":53,"sheet_y":54,"sort_order":231},"⚱️":{"category":"Objects","sheet_x":53,"sheet_y":55,"sort_order":232},"⚽":{"category":"Activities","sheet_x":53,"sheet_y":56,"sort_order":28},"⚾":{"category":"Activities","sheet_x":54,"sheet_y":0,"sort_order":29},"⛄":{"category":"Travel & Places","sheet_x":54,"sheet_y":1,"sort_order":206},"⛅":{"category":"Travel & Places","sheet_x":54,"sheet_y":2,"sort_order":186},"⛈️":{"category":"Travel & Places","sheet_x":54,"sheet_y":3,"sort_order":187},"⛎":{"category":"Symbols","sheet_x":54,"sheet_y":4,"sort_order":72},"⛏️":{"category":"Objects","sheet_x":54,"sheet_y":5,"sort_order":183},"⛑️":{"category":"Objects","sheet_x":54,"sheet_y":6,"sort_order":39},"⛓️":{"category":"Objects","sheet_x":54,"sheet_y":7,"sort_order":198},"⛔":{"category":"Symbols","sheet_x":54,"sheet_y":8,"sort_order":16},"⛩️":{"category":"Travel & Places","sheet_x":54,"sheet_y":9,"sort_order":45},"⛪":{"category":"Travel & Places","sheet_x":54,"sheet_y":10,"sort_order":41},"⛰️":{"category":"Travel & Places","sheet_x":54,"sheet_y":11,"sort_order":9},"⛱️":{"category":"Travel & Places","sheet_x":54,"sheet_y":12,"sort_order":202},"⛲":{"category":"Travel & Places","sheet_x":54,"sheet_y":13,"sort_order":47},"⛳":{"category":"Activities","sheet_x":54,"sheet_y":14,"sort_order":47},"⛴️":{"category":"Travel & Places","sheet_x":54,"sheet_y":15,"sort_order":115},"⛵":{"category":"Travel & Places","sheet_x":54,"sheet_y":16,"sort_order":111},"⛷️":{"category":"People & Body","sheet_x":54,"sheet_y":17,"sort_order":247},"⛸️":{"category":"Activities","sheet_x":54,"sheet_y":18,"sort_order":48},"⛹️‍♀️":{"category":"People & Body","sheet_x":54,"sheet_y":19,"sort_order":263},"⛹️‍♂️":{"category":"People & Body","sheet_x":54,"sheet_y":25,"sort_order":262},"⛹️":{"category":"People & Body","sheet_x":54,"sheet_y":31,"sort_order":261},"⛺":{"category":"Travel & Places","sheet_x":54,"sheet_y":37,"sort_order":48},"⛽":{"category":"Travel & Places","sheet_x":54,"sheet_y":38,"sort_order":104},"✂️":{"category":"Objects","sheet_x":54,"sheet_y":39,"sort_order":171},"✅":{"category":"Symbols","sheet_x":54,"sheet_y":40,"sort_order":107},"✈️":{"category":"Travel & Places","sheet_x":54,"sheet_y":41,"sort_order":118},"✉️":{"category":"Objects","sheet_x":54,"sheet_y":42,"sort_order":132},"✊":{"category":"People & Body","sheet_x":54,"sheet_y":43,"sort_order":21},"✋":{"category":"People & Body","sheet_x":54,"sheet_y":49,"sort_order":4},"✌️":{"category":"People & Body","sheet_x":54,"sheet_y":55,"sort_order":8},"✍️":{"category":"People & Body","sheet_x":55,"sheet_y":4,"sort_order":31},"✏️":{"category":"Objects","sheet_x":55,"sheet_y":10,"sort_order":145},"✒️":{"category":"Objects","sheet_x":55,"sheet_y":11,"sort_order":146},"✔️":{"category":"Symbols","sheet_x":55,"sheet_y":12,"sort_order":109},"✖️":{"category":"Symbols","sheet_x":55,"sheet_y":13,"sort_order":110},"✝️":{"category":"Symbols","sheet_x":55,"sheet_y":14,"sort_order":54},"✡️":{"category":"Symbols","sheet_x":55,"sheet_y":15,"sort_order":51},"✨":{"category":"Activities","sheet_x":55,"sheet_y":16,"sort_order":6},"✳️":{"category":"Symbols","sheet_x":55,"sheet_y":17,"sort_order":119},"✴️":{"category":"Symbols","sheet_x":55,"sheet_y":18,"sort_order":120},"❄️":{"category":"Travel & Places","sheet_x":55,"sheet_y":19,"sort_order":204},"❇️":{"category":"Symbols","sheet_x":55,"sheet_y":20,"sort_order":121},"❌":{"category":"Symbols","sheet_x":55,"sheet_y":21,"sort_order":111},"❎":{"category":"Symbols","sheet_x":55,"sheet_y":22,"sort_order":112},"❓":{"category":"Symbols","sheet_x":55,"sheet_y":23,"sort_order":124},"❔":{"category":"Symbols","sheet_x":55,"sheet_y":24,"sort_order":125},"❕":{"category":"Symbols","sheet_x":55,"sheet_y":25,"sort_order":126},"❗":{"category":"Symbols","sheet_x":55,"sheet_y":26,"sort_order":127},"❣️":{"category":"Smileys & Emotion","sheet_x":55,"sheet_y":27,"sort_order":125},"❤️":{"category":"Smileys & Emotion","sheet_x":55,"sheet_y":28,"sort_order":127},"➕":{"category":"Symbols","sheet_x":55,"sheet_y":29,"sort_order":113},"➖":{"category":"Symbols","sheet_x":55,"sheet_y":30,"sort_order":114},"➗":{"category":"Symbols","sheet_x":55,"sheet_y":31,"sort_order":115},"➡️":{"category":"Symbols","sheet_x":55,"sheet_y":32,"sort_order":29},"➰":{"category":"Symbols","sheet_x":55,"sheet_y":33,"sort_order":116},"➿":{"category":"Symbols","sheet_x":55,"sheet_y":34,"sort_order":117},"⤴️":{"category":"Symbols","sheet_x":55,"sheet_y":35,"sort_order":39},"⤵️":{"category":"Symbols","sheet_x":55,"sheet_y":36,"sort_order":40},"⬅️":{"category":"Symbols","sheet_x":55,"sheet_y":37,"sort_order":33},"⬆️":{"category":"Symbols","sheet_x":55,"sheet_y":38,"sort_order":27},"⬇️":{"category":"Symbols","sheet_x":55,"sheet_y":39,"sort_order":31},"⬛":{"category":"Symbols","sheet_x":55,"sheet_y":40,"sort_order":200},"⬜":{"category":"Symbols","sheet_x":55,"sheet_y":41,"sort_order":201},"⭐":{"category":"Travel & Places","sheet_x":55,"sheet_y":42,"sort_order":181},"⭕":{"category":"Symbols","sheet_x":55,"sheet_y":43,"sort_order":106},"〰️":{"category":"Symbols","sheet_x":55,"sheet_y":44,"sort_order":128},"〽️":{"category":"Symbols","sheet_x":55,"sheet_y":45,"sort_order":118},"㊗️":{"category":"Symbols","sheet_x":55,"sheet_y":46,"sort_order":180},"㊙️":{"category":"Symbols","sheet_x":55,"sheet_y":47,"sort_order":181}} + }; +} + +var Countries = [{"phoneCode":"7 840","code":"AB","name":"Abkhazia","pattern":"","emoji":""},{"phoneCode":"93","code":"AF","name":"Afghanistan","pattern":"93 XXX XXX XXX","emoji":"🇦🇫"},{"phoneCode":"358 18","code":"AX","name":"Aland Islands","pattern":"","emoji":"🇦🇽"},{"phoneCode":"355","code":"AL","name":"Albania","pattern":"355 XX XXX XXXX","emoji":"🇦🇱"},{"phoneCode":"213","code":"DZ","name":"Algeria","pattern":"213 XXX XX XX XX","emoji":"🇩🇿"},{"phoneCode":"1 684","code":"AS","name":"American Samoa","pattern":"1684 XXX XXXX","emoji":"🇦🇸"},{"phoneCode":"376","code":"AD","name":"Andorra","pattern":"376 XX XX XX","emoji":"🇦🇩"},{"phoneCode":"244","code":"AO","name":"Angola","pattern":"244 XXX XXX XXX","emoji":"🇦🇴"},{"phoneCode":"1 264","code":"AI","name":"Anguilla","pattern":"1264 XXX XXXX","emoji":"🇦🇮"},{"phoneCode":"1 268","code":"AG","name":"Antigua & Barbuda","pattern":"1268 XXX XXXX","emoji":"🇦🇬"},{"phoneCode":"54","code":"AR","name":"Argentina","pattern":"","emoji":"🇦🇷"},{"phoneCode":"374","code":"AM","name":"Armenia","pattern":"374 XX XXX XXX","emoji":"🇦🇲"},{"phoneCode":"297","code":"AW","name":"Aruba","pattern":"297 XXX XXXX","emoji":"🇦🇼"},{"phoneCode":"247","code":"SH","name":"Ascension","pattern":"290 XX XXX","emoji":"🇸🇭"},{"phoneCode":"61","code":"AU","name":"Australia","pattern":"61 XXX XXX XXX","emoji":"🇦🇺"},{"phoneCode":"672","code":"AU","name":"Australian External Territories","pattern":"61 XXX XXX XXX","emoji":"🇦🇺"},{"phoneCode":"43","code":"AT","name":"Austria","pattern":"","emoji":"🇦🇹"},{"phoneCode":"994","code":"AZ","name":"Azerbaijan","pattern":"994 XX XXX XX XX","emoji":"🇦🇿"},{"phoneCode":"1 242","code":"BS","name":"Bahamas","pattern":"1242 XXX XXXX","emoji":"🇧🇸"},{"phoneCode":"973","code":"BH","name":"Bahrain","pattern":"973 XXXX XXXX","emoji":"🇧🇭"},{"phoneCode":"880","code":"BD","name":"Bangladesh","pattern":"","emoji":"🇧🇩"},{"phoneCode":"1 246","code":"BB","name":"Barbados","pattern":"1246 XXX XXXX","emoji":"🇧🇧"},{"phoneCode":"1 268","code":"AG","name":"Barbuda","pattern":"1268 XXX XXXX","emoji":"🇦🇬"},{"phoneCode":"375","code":"BY","name":"Belarus","pattern":"375 XX XXX XXXX","emoji":"🇧🇾"},{"phoneCode":"32","code":"BE","name":"Belgium","pattern":"32 XXX XX XX XX","emoji":"🇧🇪"},{"phoneCode":"501","code":"BZ","name":"Belize","pattern":"","emoji":"🇧🇿"},{"phoneCode":"229","code":"BJ","name":"Benin","pattern":"229 XX XXX XXX","emoji":"🇧🇯"},{"phoneCode":"1 441","code":"BM","name":"Bermuda","pattern":"1441 XXX XXXX","emoji":"🇧🇲"},{"phoneCode":"975","code":"BT","name":"Bhutan","pattern":"","emoji":"🇧🇹"},{"phoneCode":"591","code":"BO","name":"Bolivia","pattern":"591 X XXX XXXX","emoji":"🇧🇴"},{"phoneCode":"599 7","code":"BQ","name":"Caribbean Netherlands","pattern":"","emoji":"🇧🇶"},{"phoneCode":"387","code":"BA","name":"Bosnia & Herzegovina","pattern":"","emoji":"🇧🇦"},{"phoneCode":"267","code":"BW","name":"Botswana","pattern":"267 XX XXX XXX","emoji":"🇧🇼"},{"phoneCode":"55","code":"BR","name":"Brazil","pattern":"55 XX XXXXX XXXX","emoji":"🇧🇷"},{"phoneCode":"246","code":"IO","name":"British Indian Ocean Territory","pattern":"246 XXX XXXX","emoji":"🇮🇴"},{"phoneCode":"1 284","code":"VG","name":"British Virgin Islands","pattern":"1284 XXX XXXX","emoji":"🇻🇬"},{"phoneCode":"673","code":"BN","name":"Brunei","pattern":"673 XXX XXXX","emoji":"🇧🇳"},{"phoneCode":"359","code":"BG","name":"Bulgaria","pattern":"","emoji":"🇧🇬"},{"phoneCode":"226","code":"BF","name":"Burkina Faso","pattern":"226 XX XX XX XX","emoji":"🇧🇫"},{"phoneCode":"95","code":"MM","name":"Myanmar (Burma)","pattern":"","emoji":"🇲🇲"},{"phoneCode":"257","code":"BI","name":"Burundi","pattern":"257 XX XX XXXX","emoji":"🇧🇮"},{"phoneCode":"855","code":"KH","name":"Cambodia","pattern":"","emoji":"🇰🇭"},{"phoneCode":"237","code":"CM","name":"Cameroon","pattern":"237 XXXX XXXX","emoji":"🇨🇲"},{"phoneCode":"1","code":"CA","name":"Canada","pattern":"1 XXX XXX XXXX","emoji":"🇨🇦"},{"phoneCode":"238","code":"CV","name":"Cape Verde","pattern":"238 XXX XXXX","emoji":"🇨🇻"},{"phoneCode":"1 345","code":"KY","name":"Cayman Islands","pattern":"1345 XXX XXXX","emoji":"🇰🇾"},{"phoneCode":"236","code":"CF","name":"Central African Republic","pattern":"236 XX XX XX XX","emoji":"🇨🇫"},{"phoneCode":"235","code":"TD","name":"Chad","pattern":"235 XX XX XX XX","emoji":"🇹🇩"},{"phoneCode":"56","code":"CL","name":"Chile","pattern":"56 X XXXX XXXX","emoji":"🇨🇱"},{"phoneCode":"86","code":"CN","name":"China","pattern":"86 XXX XXXX XXXX","emoji":"🇨🇳"},{"phoneCode":"61","code":"CX","name":"Christmas Island","pattern":"","emoji":"🇨🇽"},{"phoneCode":"61","code":"CC","name":"Cocos (Keeling) Islands","pattern":"","emoji":"🇨🇨"},{"phoneCode":"57","code":"CO","name":"Colombia","pattern":"57 XXX XXX XXXX","emoji":"🇨🇴"},{"phoneCode":"269","code":"KM","name":"Comoros","pattern":"269 XXX XXXX","emoji":"🇰🇲"},{"phoneCode":"242","code":"CG","name":"Congo - Brazzaville","pattern":"242 XX XXX XXXX","emoji":"🇨🇬"},{"phoneCode":"243","code":"CD","name":"Congo - Kinshasa","pattern":"243 XX XXX XXXX","emoji":"🇨🇩"},{"phoneCode":"682","code":"CK","name":"Cook Islands","pattern":"","emoji":"🇨🇰"},{"phoneCode":"506","code":"CR","name":"Costa Rica","pattern":"","emoji":"🇨🇷"},{"phoneCode":"225","code":"CI","name":"Cote d’Ivoire","pattern":"225 XX XXX XXX","emoji":"🇨🇮"},{"phoneCode":"385","code":"HR","name":"Croatia","pattern":"","emoji":"🇭🇷"},{"phoneCode":"53","code":"CU","name":"Cuba","pattern":"53 XXXX XXXX","emoji":"🇨🇺"},{"phoneCode":"599 9","code":"CW","name":"Curacao","pattern":"","emoji":"🇨🇼"},{"phoneCode":"357","code":"CY","name":"Cyprus","pattern":"357 XXXX XXXX","emoji":"🇨🇾"},{"phoneCode":"420","code":"CZ","name":"Czech Republic","pattern":"","emoji":"🇨🇿"},{"phoneCode":"45","code":"DK","name":"Denmark","pattern":"45 XXXX XXXX","emoji":"🇩🇰"},{"phoneCode":"246","code":"DG","name":"Diego Garcia","pattern":"","emoji":"🇩🇬"},{"phoneCode":"253","code":"DJ","name":"Djibouti","pattern":"253 XX XX XX XX","emoji":"🇩🇯"},{"phoneCode":"1 767","code":"DM","name":"Dominica","pattern":"1767 XXX XXXX","emoji":"🇩🇲"},{"phoneCode":"1 809 and 1 829","code":"DO","name":"Dominican Republic","pattern":"1 XXX XXX XXXX","emoji":"🇩🇴"},{"phoneCode":"670","code":"TL","name":"Timor-Leste","pattern":"","emoji":"🇹🇱"},{"phoneCode":"593","code":"EC","name":"Ecuador","pattern":"","emoji":"🇪🇨"},{"phoneCode":"20","code":"EG","name":"Egypt","pattern":"20 XX XXX XXXX","emoji":"🇪🇬"},{"phoneCode":"503","code":"SV","name":"El Salvador","pattern":"503 XXXX XXXX","emoji":"🇸🇻"},{"phoneCode":"240","code":"GQ","name":"Equatorial Guinea","pattern":"240 XXX XXX XXX","emoji":"🇬🇶"},{"phoneCode":"291","code":"ER","name":"Eritrea","pattern":"291 X XXX XXX","emoji":"🇪🇷"},{"phoneCode":"372","code":"EE","name":"Estonia","pattern":"","emoji":"🇪🇪"},{"phoneCode":"251","code":"ET","name":"Ethiopia","pattern":"251 XX XXX XXXX","emoji":"🇪🇹"},{"phoneCode":"500","code":"FK","name":"Falkland Islands","pattern":"","emoji":"🇫🇰"},{"phoneCode":"298","code":"FO","name":"Faroe Islands","pattern":"298 XXX XXX","emoji":"🇫🇴"},{"phoneCode":"679","code":"FJ","name":"Fiji","pattern":"","emoji":"🇫🇯"},{"phoneCode":"358","code":"FI","name":"Finland","pattern":"","emoji":"🇫🇮"},{"phoneCode":"33","code":"FR","name":"France","pattern":"33 X XX XX XX XX","emoji":"🇫🇷"},{"phoneCode":"594","code":"GF","name":"French Guiana","pattern":"","emoji":"🇬🇫"},{"phoneCode":"689","code":"PF","name":"French Polynesia","pattern":"","emoji":"🇵🇫"},{"phoneCode":"241","code":"GA","name":"Gabon","pattern":"241 X XX XX XX","emoji":"🇬🇦"},{"phoneCode":"220","code":"GM","name":"Gambia","pattern":"220 XXX XXXX","emoji":"🇬🇲"},{"phoneCode":"995","code":"GE","name":"Georgia","pattern":"","emoji":"🇬🇪"},{"phoneCode":"49","code":"DE","name":"Germany","pattern":"49 XXX XXXXXXXX","emoji":"🇩🇪"},{"phoneCode":"233","code":"GH","name":"Ghana","pattern":"","emoji":"🇬🇭"},{"phoneCode":"350","code":"GI","name":"Gibraltar","pattern":"350 XXXX XXXX","emoji":"🇬🇮"},{"phoneCode":"30","code":"GR","name":"Greece","pattern":"30 XX XXXX XXXX","emoji":"🇬🇷"},{"phoneCode":"299","code":"GL","name":"Greenland","pattern":"299 XXX XXX","emoji":"🇬🇱"},{"phoneCode":"1 473","code":"GD","name":"Grenada","pattern":"1473 XXX XXXX","emoji":"🇬🇩"},{"phoneCode":"590","code":"GP","name":"Guadeloupe","pattern":"","emoji":"🇬🇵"},{"phoneCode":"1 671","code":"GU","name":"Guam","pattern":"1671 XXX XXXX","emoji":"🇬🇺"},{"phoneCode":"502","code":"GT","name":"Guatemala","pattern":"502 X XXX XXXX","emoji":"🇬🇹"},{"phoneCode":"44","code":"GG","name":"Guernsey","pattern":"","emoji":"🇬🇬"},{"phoneCode":"224","code":"GN","name":"Guinea","pattern":"224 XXX XXX XXX","emoji":"🇬🇳"},{"phoneCode":"245","code":"GW","name":"Guinea-Bissau","pattern":"245 XXX XXXX","emoji":"🇬🇼"},{"phoneCode":"592","code":"GY","name":"Guyana","pattern":"","emoji":"🇬🇾"},{"phoneCode":"509","code":"HT","name":"Haiti","pattern":"","emoji":"🇭🇹"},{"phoneCode":"504","code":"HN","name":"Honduras","pattern":"504 XXXX XXXX","emoji":"🇭🇳"},{"phoneCode":"852","code":"HK","name":"Hong Kong SAR China","pattern":"","emoji":"🇭🇰"},{"phoneCode":"36","code":"HU","name":"Hungary","pattern":"36 XX XXX XXXX","emoji":"🇭🇺"},{"phoneCode":"354","code":"IS","name":"Iceland","pattern":"354 XXX XXXX","emoji":"🇮🇸"},{"phoneCode":"91","code":"IN","name":"India","pattern":"91 XXXXX XXXXX","emoji":"🇮🇳"},{"phoneCode":"62","code":"ID","name":"Indonesia","pattern":"","emoji":"🇮🇩"},{"phoneCode":"98","code":"IR","name":"Iran","pattern":"98 XXX XXX XXXX","emoji":"🇮🇷"},{"phoneCode":"964","code":"IQ","name":"Iraq","pattern":"964 XXX XXX XXXX","emoji":"🇮🇶"},{"phoneCode":"353","code":"IE","name":"Ireland","pattern":"353 XX XXX XXXX","emoji":"🇮🇪"},{"phoneCode":"972","code":"IL","name":"Israel","pattern":"972 XX XXX XXXX","emoji":"🇮🇱"},{"phoneCode":"39","code":"IT","name":"Italy","pattern":"39 XXX XXX XXXX","emoji":"🇮🇹"},{"phoneCode":"1 876","code":"JM","name":"Jamaica","pattern":"1876 XXX XXXX","emoji":"🇯🇲"},{"phoneCode":"47 79","code":"SJ","name":"Svalbard & Jan Mayen","pattern":"","emoji":"🇸🇯"},{"phoneCode":"81","code":"JP","name":"Japan","pattern":"81 XX XXXX XXXX","emoji":"🇯🇵"},{"phoneCode":"44","code":"JE","name":"Jersey","pattern":"","emoji":"🇯🇪"},{"phoneCode":"962","code":"JO","name":"Jordan","pattern":"962 X XXXX XXXX","emoji":"🇯🇴"},{"phoneCode":"7 7","code":"KZ","name":"Kazakhstan","pattern":"7 XXX XXX XX XX","emoji":"🇰🇿"},{"phoneCode":"254","code":"KE","name":"Kenya","pattern":"254 XXX XXX XXX","emoji":"🇰🇪"},{"phoneCode":"686","code":"KI","name":"Kiribati","pattern":"","emoji":"🇰🇮"},{"phoneCode":"850","code":"KP","name":"North Korea","pattern":"","emoji":"🇰🇵"},{"phoneCode":"82","code":"KR","name":"South Korea","pattern":"","emoji":"🇰🇷"},{"phoneCode":"965","code":"KW","name":"Kuwait","pattern":"965 XXXX XXXX","emoji":"🇰🇼"},{"phoneCode":"996","code":"KG","name":"Kyrgyzstan","pattern":"","emoji":"🇰🇬"},{"phoneCode":"856","code":"LA","name":"Laos","pattern":"","emoji":"🇱🇦"},{"phoneCode":"371","code":"LV","name":"Latvia","pattern":"371 XXX XXXXX","emoji":"🇱🇻"},{"phoneCode":"961","code":"LB","name":"Lebanon","pattern":"","emoji":"🇱🇧"},{"phoneCode":"266","code":"LS","name":"Lesotho","pattern":"266 XX XXX XXX","emoji":"🇱🇸"},{"phoneCode":"231","code":"LR","name":"Liberia","pattern":"","emoji":"🇱🇷"},{"phoneCode":"218","code":"LY","name":"Libya","pattern":"218 XX XXX XXXX","emoji":"🇱🇾"},{"phoneCode":"423","code":"LI","name":"Liechtenstein","pattern":"","emoji":"🇱🇮"},{"phoneCode":"370","code":"LT","name":"Lithuania","pattern":"370 XXX XXXXX","emoji":"🇱🇹"},{"phoneCode":"352","code":"LU","name":"Luxembourg","pattern":"","emoji":"🇱🇺"},{"phoneCode":"853","code":"MO","name":"Macau SAR China","pattern":"","emoji":"🇲🇴"},{"phoneCode":"389","code":"MK","name":"Macedonia","pattern":"","emoji":"🇲🇰"},{"phoneCode":"261","code":"MG","name":"Madagascar","pattern":"261 XX XX XXX XX","emoji":"🇲🇬"},{"phoneCode":"265","code":"MW","name":"Malawi","pattern":"","emoji":"🇲🇼"},{"phoneCode":"60","code":"MM","name":"Malaysia","pattern":"","emoji":"🇲🇲"},{"phoneCode":"960","code":"MV","name":"Maldives","pattern":"","emoji":"🇲🇻"},{"phoneCode":"223","code":"ML","name":"Mali","pattern":"223 XXXX XXXX","emoji":"🇲🇱"},{"phoneCode":"356","code":"MT","name":"Malta","pattern":"356 XX XX XX XX","emoji":"🇲🇹"},{"phoneCode":"692","code":"MH","name":"Marshall Islands","pattern":"","emoji":"🇲🇭"},{"phoneCode":"596","code":"MQ","name":"Martinique","pattern":"","emoji":"🇲🇶"},{"phoneCode":"222","code":"MR","name":"Mauritania","pattern":"222 XXXX XXXX","emoji":"🇲🇷"},{"phoneCode":"230","code":"MU","name":"Mauritius","pattern":"","emoji":"🇲🇺"},{"phoneCode":"262","code":"YT","name":"Mayotte","pattern":"","emoji":"🇾🇹"},{"phoneCode":"52","code":"MX","name":"Mexico","pattern":"","emoji":"🇲🇽"},{"phoneCode":"691","code":"FM","name":"Micronesia","pattern":"","emoji":"🇫🇲"},{"phoneCode":"373","code":"MD","name":"Moldova","pattern":"373 XX XXX XXX","emoji":"🇲🇩"},{"phoneCode":"377","code":"MC","name":"Monaco","pattern":"377 XXXX XXXX","emoji":"🇲🇨"},{"phoneCode":"976","code":"MN","name":"Mongolia","pattern":"","emoji":"🇲🇳"},{"phoneCode":"382","code":"ME","name":"Montenegro","pattern":"","emoji":"🇲🇪"},{"phoneCode":"1 664","code":"MS","name":"Montserrat","pattern":"1664 XXX XXXX","emoji":"🇲🇸"},{"phoneCode":"212","code":"MA","name":"Morocco","pattern":"212 XX XXX XXXX","emoji":"🇲🇦"},{"phoneCode":"258","code":"MZ","name":"Mozambique","pattern":"258 XX XXX XXXX","emoji":"🇲🇿"},{"phoneCode":"264","code":"NA","name":"Namibia","pattern":"264 XX XXX XXXX","emoji":"🇳🇦"},{"phoneCode":"674","code":"NR","name":"Nauru","pattern":"","emoji":"🇳🇷"},{"phoneCode":"977","code":"NP","name":"Nepal","pattern":"","emoji":"🇳🇵"},{"phoneCode":"31","code":"NL","name":"Netherlands","pattern":"31 X XX XX XX XX","emoji":"🇳🇱"},{"phoneCode":"687","code":"NC","name":"New Caledonia","pattern":"","emoji":"🇳🇨"},{"phoneCode":"64","code":"NZ","name":"New Zealand","pattern":"","emoji":"🇳🇿"},{"phoneCode":"505","code":"NI","name":"Nicaragua","pattern":"505 XXXX XXXX","emoji":"🇳🇮"},{"phoneCode":"227","code":"NE","name":"Niger","pattern":"227 XX XX XX XX","emoji":"🇳🇪"},{"phoneCode":"234","code":"NG","name":"Nigeria","pattern":"","emoji":"🇳🇬"},{"phoneCode":"683","code":"NU","name":"Niue","pattern":"","emoji":"🇳🇺"},{"phoneCode":"672","code":"NF","name":"Norfolk Island","pattern":"","emoji":"🇳🇫"},{"phoneCode":"1 670","code":"MP","name":"Northern Mariana Islands","pattern":"1670 XXX XXXX","emoji":"🇲🇵"},{"phoneCode":"47","code":"NO","name":"Norway","pattern":"47 XXXX XXXX","emoji":"🇳🇴"},{"phoneCode":"968","code":"OM","name":"Oman","pattern":"968 XXXX XXXX","emoji":"🇴🇲"},{"phoneCode":"92","code":"PK","name":"Pakistan","pattern":"92 XXX XXX XXXX","emoji":"🇵🇰"},{"phoneCode":"680","code":"PW","name":"Palau","pattern":"","emoji":"🇵🇼"},{"phoneCode":"970","code":"PS","name":"Palestinian Territories","pattern":"970 XXX XX XXXX","emoji":"🇵🇸"},{"phoneCode":"507","code":"PA","name":"Panama","pattern":"507 XXXX XXXX","emoji":"🇵🇦"},{"phoneCode":"675","code":"PG","name":"Papua New Guinea","pattern":"","emoji":"🇵🇬"},{"phoneCode":"595","code":"PY","name":"Paraguay","pattern":"595 XXX XXX XXX","emoji":"🇵🇾"},{"phoneCode":"51","code":"PE","name":"Peru","pattern":"51 XXX XXX XXX","emoji":"🇵🇪"},{"phoneCode":"63","code":"PH","name":"Philippines","pattern":"63 XXX XXX XXXX","emoji":"🇵🇭"},{"phoneCode":"64","code":"PN","name":"Pitcairn Islands","pattern":"","emoji":"🇵🇳"},{"phoneCode":"48","code":"PL","name":"Poland","pattern":"48 XXX XXX XXX","emoji":"🇵🇱"},{"phoneCode":"351","code":"PT","name":"Portugal","pattern":"351 X XXXX XXXX","emoji":"🇵🇹"},{"phoneCode":"1 787 and 1 939","code":"PR","name":"Puerto Rico","pattern":"1 XXX XXX XXXX","emoji":"🇵🇷"},{"phoneCode":"974","code":"QA","name":"Qatar","pattern":"","emoji":"🇶🇦"},{"phoneCode":"262","code":"RE","name":"Reunion","pattern":"262 XXX XXX XXX","emoji":"🇷🇪"},{"phoneCode":"40","code":"RO","name":"Romania","pattern":"40 XXX XXX XXX","emoji":"🇷🇴"},{"phoneCode":"7","code":"RU","name":"Russia","pattern":"7 XXX XXX XX XX","emoji":"🇷🇺"},{"phoneCode":"250","code":"RW","name":"Rwanda","pattern":"250 XXX XXX XXX","emoji":"🇷🇼"},{"phoneCode":"590","code":"BL","name":"St. Barthelemy","pattern":"","emoji":"🇧🇱"},{"phoneCode":"290","code":"SH","name":"St. Helena","pattern":"290 XX XXX","emoji":"🇸🇭"},{"phoneCode":"1 869","code":"KN","name":"St. Kitts & Nevis","pattern":"1869 XXX XXXX","emoji":"🇰🇳"},{"phoneCode":"1 758","code":"LC","name":"St. Lucia","pattern":"1758 XXX XXXX","emoji":"🇱🇨"},{"phoneCode":"590","code":"MF","name":"St. Martin (France)","pattern":"","emoji":"🇲🇫"},{"phoneCode":"508","code":"PM","name":"St. Pierre and Miquelon","pattern":"","emoji":"🇵🇲"},{"phoneCode":"1 784","code":"VC","name":"St. Vincent and the Grenadines","pattern":"1784 XXX XXXX","emoji":"🇻🇨"},{"phoneCode":"685","code":"WS","name":"Samoa","pattern":"","emoji":"🇼🇸"},{"phoneCode":"378","code":"SM","name":"San Marino","pattern":"378 XXX XXX XXXX","emoji":"🇸🇲"},{"phoneCode":"239","code":"ST","name":"São Tome & Principe","pattern":"239 XX XXXXX","emoji":"🇸🇹"},{"phoneCode":"966","code":"SA","name":"Saudi Arabia","pattern":"","emoji":"🇸🇦"},{"phoneCode":"221","code":"SN","name":"Senegal","pattern":"221 XX XXX XXXX","emoji":"🇸🇳"},{"phoneCode":"381","code":"RS","name":"Serbia","pattern":"381 XX XXX XXXX","emoji":"🇷🇸"},{"phoneCode":"248","code":"SC","name":"Seychelles","pattern":"248 X XX XX XX","emoji":"🇸🇨"},{"phoneCode":"232","code":"SL","name":"Sierra Leone","pattern":"232 XX XXX XXX","emoji":"🇸🇱"},{"phoneCode":"65","code":"SG","name":"Singapore","pattern":"65 XXXX XXXX","emoji":"🇸🇬"},{"phoneCode":"599 3","code":"BQ","name":"Sint Eustatius","pattern":"","emoji":"🇧🇶"},{"phoneCode":"1 721","code":"SX","name":"Sint Maarten","pattern":"1721 XXX XXXX","emoji":"🇸🇽"},{"phoneCode":"421","code":"SK","name":"Slovakia","pattern":"","emoji":"🇸🇰"},{"phoneCode":"386","code":"SI","name":"Slovenia","pattern":"","emoji":"🇸🇮"},{"phoneCode":"677","code":"SB","name":"Solomon Islands","pattern":"","emoji":"🇸🇧"},{"phoneCode":"252","code":"SO","name":"Somalia","pattern":"252 XX XXX XXX","emoji":"🇸🇴"},{"phoneCode":"27","code":"ZA","name":"South Africa","pattern":"27 XX XXX XXXX","emoji":"🇿🇦"},{"phoneCode":"500","code":"GS","name":"South Georgia & South Sandwich Islands","pattern":"","emoji":"🇬🇸"},{"phoneCode":"995 34","code":"","name":"South Ossetia","pattern":"","emoji":""},{"phoneCode":"211","code":"SS","name":"South Sudan","pattern":"211 XX XXX XXXX","emoji":"🇸🇸"},{"phoneCode":"34","code":"ES","name":"Spain","pattern":"34 XXX XXX XXX","emoji":"🇪🇸"},{"phoneCode":"94","code":"LK","name":"Sri Lanka","pattern":"94 XX XXX XXXX","emoji":"🇱🇰"},{"phoneCode":"249","code":"SD","name":"Sudan","pattern":"249 XX XXX XXXX","emoji":"🇸🇩"},{"phoneCode":"597","code":"SR","name":"Suriname","pattern":"597 XXX XXXX","emoji":"🇸🇷"},{"phoneCode":"47 79","code":"SJ","name":"Svalbard","pattern":"","emoji":"🇸🇯"},{"phoneCode":"268","code":"SZ","name":"Swaziland","pattern":"268 XXXX XXXX","emoji":"🇸🇿"},{"phoneCode":"46","code":"SE","name":"Sweden","pattern":"46 XX XXX XXXX","emoji":"🇸🇪"},{"phoneCode":"41","code":"CH","name":"Switzerland","pattern":"41 XX XXX XXXX","emoji":"🇨🇭"},{"phoneCode":"963","code":"SY","name":"Syria","pattern":"","emoji":"🇸🇾"},{"phoneCode":"886","code":"TW","name":"Taiwan","pattern":"","emoji":"🇹🇼"},{"phoneCode":"992","code":"TJ","name":"Tajikistan","pattern":"","emoji":"🇹🇯"},{"phoneCode":"255","code":"TZ","name":"Tanzania","pattern":"255 XX XXX XXXX","emoji":"🇹🇿"},{"phoneCode":"66","code":"TH","name":"Thailand","pattern":"66 X XXXX XXXX","emoji":"🇹🇭"},{"phoneCode":"228","code":"TG","name":"Togo","pattern":"228 XX XXX XXX","emoji":"🇹🇬"},{"phoneCode":"690","code":"TK","name":"Tokelau","pattern":"","emoji":"🇹🇰"},{"phoneCode":"676","code":"TO","name":"Tonga","pattern":"","emoji":"🇹🇴"},{"phoneCode":"1 868","code":"TT","name":"Trinidad & Tobago","pattern":"1868 XXX XXXX","emoji":"🇹🇹"},{"phoneCode":"216","code":"TN","name":"Tunisia","pattern":"216 XX XXX XXX","emoji":"🇹🇳"},{"phoneCode":"90","code":"TR","name":"Turkey","pattern":"90 XXX XXX XXXX","emoji":"🇹🇷"},{"phoneCode":"993","code":"TM","name":"Turkmenistan","pattern":"993 XX XXXXXX","emoji":"🇹🇲"},{"phoneCode":"1 649","code":"TC","name":"Turks & Caicos Islands","pattern":"1649 XXX XXXX","emoji":"🇹🇨"},{"phoneCode":"688","code":"TV","name":"Tuvalu","pattern":"","emoji":"🇹🇻"},{"phoneCode":"256","code":"UG","name":"Uganda","pattern":"256 XX XXX XXXX","emoji":"🇺🇬"},{"phoneCode":"380","code":"UA","name":"Ukraine","pattern":"380 XX XXX XX XX","emoji":"🇺🇦"},{"phoneCode":"971","code":"AE","name":"United Arab Emirates","pattern":"971 XX XXX XXXX","emoji":"🇦🇪"},{"phoneCode":"44","code":"GB","name":"United Kingdom","pattern":"44 XXXX XXXXXX","emoji":"🇬🇧"},{"phoneCode":"1","code":"US","name":"United States","pattern":"1 XXX XXX XXXX","emoji":"🇺🇸"},{"phoneCode":"598","code":"UY","name":"Uruguay","pattern":"598 XXXX XXXX","emoji":"🇺🇾"},{"phoneCode":"1 340","code":"VI","name":"U.S. Virgin Islands","pattern":"1340 XXX XXXX","emoji":"🇻🇮"},{"phoneCode":"998","code":"UZ","name":"Uzbekistan","pattern":"998 XX XXXXXXX","emoji":"🇺🇿"},{"phoneCode":"678","code":"VU","name":"Vanuatu","pattern":"","emoji":"🇻🇺"},{"phoneCode":"58","code":"VE","name":"Venezuela","pattern":"58 XXX XXX XXXX","emoji":"🇻🇪"},{"phoneCode":"39 06 698","code":"VA","name":"Vatican City","pattern":"","emoji":"🇻🇦"},{"phoneCode":"84","code":"VN","name":"Vietnam","pattern":"","emoji":"🇻🇳"},{"phoneCode":"681","code":"WF","name":"Wallis & Futuna","pattern":"","emoji":"🇼🇫"},{"phoneCode":"967","code":"YE","name":"Yemen","pattern":"967 XXX XXX XXX","emoji":"🇾🇪"},{"phoneCode":"260","code":"ZM","name":"Zambia","pattern":"260 XX XXX XXXX","emoji":"🇿🇲"},{"phoneCode":"255","code":"","name":"Zanzibar","pattern":"","emoji":""},{"phoneCode":"263","code":"ZW","name":"Zimbabwe","pattern":"263 XX XXX XXXX","emoji":"🇿🇼"}]; + +// From https://github.com/stephenmathieson/node-tlds/blob/master/index.js +var 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', 'nico', 'ninja', 'nl', 'no', 'np', 'nr', 'nra', 'nrw', 'ntt', 'nu', 'nyc', 'nz', 'okinawa', 'om', 'one', 'ong', 'onl', 'ooo', 'org', 'organic', 'osaka', 'otsuka', 'ovh', 'pa', 'paris', 'partners', 'parts', 'party', 'pe', 'pf', 'pg', 'ph', 'pharmacy', 'photo', 'photography', 'photos', 'physio', 'pics', 'pictures', 'pink', 'pizza', 'pk', 'pl', 'place', 'plumbing', 'pm', 'pn', 'pohl', 'poker', 'porn', 'post', 'pr', 'praxi', 'press', 'pro', 'prod', 'productions', 'prof', 'properties', 'property', 'ps', 'pt', 'pub', 'pw', 'py', 'qa', 'qpon', 'quebec', 're', 'realtor', 'recipes', 'red', 'rehab', 'reise', 'reisen', 'reit', 'ren', 'rentals', 'repair', 'report', 'republican', 'rest', 'restaurant', 'reviews', 'rich', 'rio', 'rip', 'ro', 'rocks', 'rodeo', 'rs', 'rsvp', 'ru', 'ruhr', 'rw', 'ryukyu', 'sa', 'saarland', 'sale', 'samsung', 'sarl', 'saxo', 'sb', 'sc', 'sca', 'scb', 'schmidt', 'schule', 'schwarz', 'science', 'scot', 'sd', 'se', 'services', 'sew', 'sexy', 'sg', 'sh', 'shiksha', 'shoes', 'shriram', 'si', 'singles', 'sj', 'sk', 'sky', 'sl', 'sm', 'sn', 'so', 'social', 'software', 'sohu', 'solar', 'solutions', 'soy', 'space', 'spiegel', 'sr', 'st', 'style', 'su', 'supplies', 'supply', 'support', 'surf', 'surgery', 'suzuki', 'sv', 'sx', 'sy', 'sydney', 'systems', 'sz', 'taipei', 'tatar', 'tattoo', 'tax', 'tc', 'td', 'technology', 'tel', 'temasek', 'tennis', 'tf', 'tg', 'th', 'tienda', 'tips', 'tires', 'tirol', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'today', 'tokyo', 'tools', 'top', 'toshiba', 'town', 'toys', 'tp', 'tr', 'trade', 'training', 'travel', 'trust', 'tt', 'tui', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'university', 'uno', 'uol', 'us', 'uy', 'uz', 'va', 'vacations', 'vc', 've', 'vegas', 'ventures', 'versicherung', 'vet', 'vg', 'vi', 'viajes', 'video', 'villas', 'vision', 'vlaanderen', 'vn', 'vodka', 'vote', 'voting', 'voto', 'voyage', 'vu', 'wales', 'wang', 'watch', 'webcam', 'website', 'wed', 'wedding', 'wf', 'whoswho', 'wien', 'wiki', 'williamhill', 'wme', 'work', 'works', 'world', 'ws', 'wtc', 'wtf', '佛山', '集团', '在线', '한국', 'ভারত', '八卦', 'موقع', '公益', '公司', '移动', '我爱你', 'москва', 'қаз', 'онлайн', 'сайт', 'срб', '淡马锡', 'орг', '삼성', 'சிங்கப்பூர்', '商标', '商店', '商城', 'дети', 'мкд', '中文网', '中信', '中国', '中國', '谷歌', 'భారత్', 'ලංකා', 'ભારત', 'भारत', '网店', 'संगठन', '网络', 'укр', '香港', '台湾', '台灣', '手机', 'мон', 'الجزائر', 'عمان', 'ایران', 'امارات', 'بازار', 'الاردن', 'بھارت', 'المغرب', 'السعودية', 'مليسيا', 'شبكة', 'გე', '机构', '组织机构', 'ไทย', 'سورية', 'рус', 'рф', 'تونس', 'みんな', 'グーグル', '世界', 'ਭਾਰਤ', '网址', '游戏', 'vermögensberater', 'vermögensberatung', '企业', 'مصر', 'قطر', '广东', 'இலங்கை', 'இந்தியா', '新加坡', 'فلسطين', '政务', 'xxx', 'xyz', 'yachts', 'yandex', 'ye', 'yoga', 'yokohama', 'youtube', 'yt', 'za', 'zip', 'zm', 'zone', 'zuerich', 'zw']; + +// From https://raw.githubusercontent.com/FGRibreau/latenize/master/latinize_map.js +var LatinizeMap = {'Á': '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','Ỉ': 'I','Ȋ': 'I','Ī': 'I','Į': 'I','Ɨ': 'I','Ĩ': 'I','Ḭ': 'I','Ꝺ': 'D','Ꝼ': 'F','Ᵹ': 'G','Ꞃ': 'R','Ꞅ': 'S','Ꞇ': 'T','Ꝭ': 'IS','Ĵ': 'J','Ɉ': 'J','Ḱ': 'K','Ǩ': 'K','Ķ': 'K','Ⱪ': 'K','Ꝃ': 'K','Ḳ': 'K','Ƙ': 'K','Ḵ': 'K','Ꝁ': 'K','Ꝅ': 'K','Ĺ': 'L','Ƚ': 'L','Ľ': 'L','Ļ': 'L','Ḽ': 'L','Ḷ': 'L','Ḹ': 'L','Ⱡ': 'L','Ꝉ': 'L','Ḻ': 'L','Ŀ': 'L','Ɫ': 'L','Lj': 'L','Ł': 'L','LJ': 'LJ','Ḿ': 'M','Ṁ': 'M','Ṃ': 'M','Ɱ': 'M','Ń': 'N','Ň': 'N','Ņ': 'N','Ṋ': 'N','Ṅ': 'N','Ṇ': 'N','Ǹ': 'N','Ɲ': 'N','Ṉ': 'N','Ƞ': 'N','Nj': 'N','Ñ': 'N','NJ': 'NJ','Ó': 'O','Ŏ': 'O','Ǒ': 'O','Ô': 'O','Ố': 'O','Ộ': 'O','Ồ': 'O','Ổ': 'O','Ỗ': 'O','Ö': 'O','Ȫ': 'O','Ȯ': 'O','Ȱ': 'O','Ọ': 'O','Ő': 'O','Ȍ': 'O','Ò': 'O','Ỏ': 'O','Ơ': 'O','Ớ': 'O','Ợ': 'O','Ờ': 'O','Ở': 'O','Ỡ': 'O','Ȏ': 'O','Ꝋ': 'O','Ꝍ': 'O','Ō': 'O','Ṓ': 'O','Ṑ': 'O','Ɵ': 'O','Ǫ': 'O','Ǭ': 'O','Ø': 'O','Ǿ': 'O','Õ': 'O','Ṍ': 'O','Ṏ': 'O','Ȭ': 'O','Ƣ': 'OI','Ꝏ': 'OO','Ɛ': 'E','Ɔ': 'O','Ȣ': 'OU','Ṕ': 'P','Ṗ': 'P','Ꝓ': 'P','Ƥ': 'P','Ꝕ': 'P','Ᵽ': 'P','Ꝑ': 'P','Ꝙ': 'Q','Ꝗ': 'Q','Ŕ': 'R','Ř': 'R','Ŗ': 'R','Ṙ': 'R','Ṛ': 'R','Ṝ': 'R','Ȑ': 'R','Ȓ': 'R','Ṟ': 'R','Ɍ': 'R','Ɽ': 'R','Ꜿ': 'C','Ǝ': 'E','Ś': 'S','Ṥ': 'S','Š': 'S','Ṧ': 'S','Ş': 'S','Ŝ': 'S','Ș': 'S','Ṡ': 'S','Ṣ': 'S','Ṩ': 'S','ẞ': 'SS','Ť': 'T','Ţ': 'T','Ṱ': 'T','Ț': 'T','Ⱦ': 'T','Ṫ': 'T','Ṭ': 'T','Ƭ': 'T','Ṯ': 'T','Ʈ': 'T','Ŧ': 'T','Ɐ': 'A','Ꞁ': 'L','Ɯ': 'M','Ʌ': 'V','Ꜩ': 'TZ','Ú': 'U','Ŭ': 'U','Ǔ': 'U','Û': 'U','Ṷ': 'U','Ü': 'U','Ǘ': 'U','Ǚ': 'U','Ǜ': 'U','Ǖ': 'U','Ṳ': 'U','Ụ': 'U','Ű': 'U','Ȕ': 'U','Ù': 'U','Ủ': 'U','Ư': 'U','Ứ': 'U','Ự': 'U','Ừ': 'U','Ử': 'U','Ữ': 'U','Ȗ': 'U','Ū': 'U','Ṻ': 'U','Ų': 'U','Ů': 'U','Ũ': 'U','Ṹ': 'U','Ṵ': 'U','Ꝟ': 'V','Ṿ': 'V','Ʋ': 'V','Ṽ': 'V','Ꝡ': 'VY','Ẃ': 'W','Ŵ': 'W','Ẅ': 'W','Ẇ': 'W','Ẉ': 'W','Ẁ': 'W','Ⱳ': 'W','Ẍ': 'X','Ẋ': 'X','Ý': 'Y','Ŷ': 'Y','Ÿ': 'Y','Ẏ': 'Y','Ỵ': 'Y','Ỳ': 'Y','Ƴ': 'Y','Ỷ': 'Y','Ỿ': 'Y','Ȳ': 'Y','Ɏ': 'Y','Ỹ': 'Y','Ź': 'Z','Ž': 'Z','Ẑ': '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','ẳ': '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','ƀ': 'b','ƃ': 'b','ɵ': 'o','ć': 'c','č': 'c','ç': 'c','ḉ': 'c','ĉ': 'c','ɕ': 'c','ċ': 'c','ƈ': 'c','ȼ': 'c','ď': 'd','ḑ': 'd','ḓ': 'd','ȡ': 'd','ḋ': 'd','ḍ': 'd','ɗ': 'd','ᶑ': 'd','ḏ': 'd','ᵭ': 'd','ᶁ': 'd','đ': 'd','ɖ': 'd','ƌ': 'd','ı': 'i','ȷ': 'j','ɟ': 'j','ʄ': 'j','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','ẽ': 'e','ḛ': 'e','ꝫ': 'et','ḟ': 'f','ƒ': 'f','ᵮ': 'f','ᶂ': 'f','ǵ': 'g','ğ': 'g','ǧ': 'g','ģ': 'g','ĝ': 'g','ġ': 'g','ɠ': 'g','ḡ': 'g','ᶃ': 'g','ǥ': 'g','ḫ': 'h','ȟ': 'h','ḩ': 'h','ĥ': 'h','ⱨ': 'h','ḧ': 'h','ḣ': 'h','ḥ': 'h','ɦ': 'h','ẖ': 'h','ħ': 'h','ƕ': 'hv','í': 'i','ĭ': 'i','ǐ': 'i','î': 'i','ï': 'i','ḯ': 'i','ị': 'i','ȉ': 'i','ì': 'i','ỉ': 'i','ȋ': 'i','ī': 'i','į': 'i','ᶖ': 'i','ɨ': 'i','ĩ': 'i','ḭ': 'i','ꝺ': 'd','ꝼ': 'f','ᵹ': 'g','ꞃ': 'r','ꞅ': 's','ꞇ': 't','ꝭ': 'is','ǰ': 'j','ĵ': 'j','ʝ': 'j','ɉ': 'j','ḱ': 'k','ǩ': 'k','ķ': 'k','ⱪ': 'k','ꝃ': 'k','ḳ': 'k','ƙ': 'k','ḵ': 'k','ᶄ': 'k','ꝁ': 'k','ꝅ': 'k','ĺ': 'l','ƚ': 'l','ɬ': 'l','ľ': 'l','ļ': 'l','ḽ': 'l','ȴ': 'l','ḷ': 'l','ḹ': 'l','ⱡ': 'l','ꝉ': 'l','ḻ': 'l','ŀ': 'l','ɫ': 'l','ᶅ': 'l','ɭ': 'l','ł': 'l','lj': 'lj','ſ': 's','ẜ': 's','ẛ': 's','ẝ': 's','ḿ': 'm','ṁ': 'm','ṃ': 'm','ɱ': 'm','ᵯ': 'm','ᶆ': 'm','ń': 'n','ň': 'n','ņ': 'n','ṋ': 'n','ȵ': 'n','ṅ': 'n','ṇ': 'n','ǹ': 'n','ɲ': 'n','ṉ': 'n','ƞ': 'n','ᵰ': 'n','ᶇ': 'n','ɳ': 'n','ñ': 'n','nj': 'nj','ó': 'o','ŏ': 'o','ǒ': 'o','ô': 'o','ố': 'o','ộ': 'o','ồ': 'o','ổ': 'o','ỗ': 'o','ö': 'o','ȫ': 'o','ȯ': 'o','ȱ': 'o','ọ': 'o','ő': 'o','ȍ': 'o','ò': 'o','ỏ': 'o','ơ': 'o','ớ': 'o','ợ': 'o','ờ': 'o','ở': 'o','ỡ': 'o','ȏ': 'o','ꝋ': 'o','ꝍ': 'o','ⱺ': 'o','ō': 'o','ṓ': 'o','ṑ': 'o','ǫ': 'o','ǭ': 'o','ø': 'o','ǿ': 'o','õ': 'o','ṍ': 'o','ṏ': 'o','ȭ': 'o','ƣ': 'oi','ꝏ': 'oo','ɛ': 'e','ᶓ': 'e','ɔ': 'o','ᶗ': 'o','ȣ': 'ou','ṕ': 'p','ṗ': 'p','ꝓ': 'p','ƥ': 'p','ᵱ': 'p','ᶈ': 'p','ꝕ': 'p','ᵽ': 'p','ꝑ': 'p','ꝙ': 'q','ʠ': 'q','ɋ': 'q','ꝗ': 'q','ŕ': 'r','ř': 'r','ŗ': 'r','ṙ': 'r','ṛ': 'r','ṝ': 'r','ȑ': 'r','ɾ': 'r','ᵳ': 'r','ȓ': 'r','ṟ': 'r','ɼ': 'r','ᵲ': 'r','ᶉ': 'r','ɍ': 'r','ɽ': 'r','ↄ': 'c','ꜿ': 'c','ɘ': 'e','ɿ': 'r','ś': 's','ṥ': 's','š': 's','ṧ': 's','ş': 's','ŝ': 's','ș': 's','ṡ': 's','ṣ': 's','ṩ': 's','ʂ': 's','ᵴ': 's','ᶊ': 's','ȿ': 's','ɡ': 'g','ß': 'ss','ᴑ': 'o','ᴓ': 'o','ᴝ': 'u','ť': 't','ţ': 't','ṱ': 't','ț': 't','ȶ': 't','ẗ': 't','ⱦ': 't','ṫ': 't','ṭ': 't','ƭ': 't','ṯ': 't','ᵵ': 't','ƫ': 't','ʈ': 't','ŧ': 't','ᵺ': 'th','ɐ': 'a','ᴂ': 'ae','ǝ': 'e','ᵷ': 'g','ɥ': 'h','ʮ': 'h','ʯ': 'h','ᴉ': 'i','ʞ': 'k','ꞁ': 'l','ɯ': 'm','ɰ': 'm','ᴔ': 'oe','ɹ': 'r','ɻ': 'r','ɺ': 'r','ⱹ': 'r','ʇ': 't','ʌ': 'v','ʍ': 'w','ʎ': 'y','ꜩ': 'tz','ú': 'u','ŭ': 'u','ǔ': 'u','û': 'u','ṷ': 'u','ü': 'u','ǘ': 'u','ǚ': 'u','ǜ': 'u','ǖ': 'u','ṳ': 'u','ụ': 'u','ű': 'u','ȕ': 'u','ù': 'u','ủ': 'u','ư': 'u','ứ': 'u','ự': 'u','ừ': 'u','ử': 'u','ữ': 'u','ȗ': 'u','ū': 'u','ṻ': 'u','ų': 'u','ᶙ': 'u','ů': 'u','ũ': 'u','ṹ': 'u','ṵ': 'u','ᵫ': 'ue','ꝸ': 'um','ⱴ': 'v','ꝟ': 'v','ṿ': 'v','ʋ': 'v','ᶌ': 'v','ⱱ': 'v','ṽ': 'v','ꝡ': 'vy','ẃ': 'w','ŵ': 'w','ẅ': 'w','ẇ': 'w','ẉ': 'w','ẁ': 'w','ⱳ': 'w','ẘ': 'w','ẍ': 'x','ẋ': 'x','ᶍ': 'x','ý': 'y','ŷ': 'y','ÿ': 'y','ẏ': 'y','ỵ': 'y','ỳ': 'y','ƴ': 'y','ỷ': 'y','ỿ': 'y','ȳ': 'y','ẙ': 'y','ɏ': 'y','ỹ': 'y','ź': 'z','ž': 'z','ẑ': 'z','ʑ': 'z','ⱬ': 'z','ż': 'z','ẓ': 'z','ȥ': 'z','ẕ': 'z','ᵶ': 'z','ᶎ': 'z','ʐ': 'z','ƶ': 'z','ɀ': 'z','ff': 'ff','ffi': 'ffi','ffl': 'ffl','fi': 'fi','fl': 'fl','ij': 'ij','œ': 'oe','st': 'st','ₐ': 'a','ₑ': 'e','ᵢ': 'i','ⱼ': 'j','ₒ': 'o','ᵣ': 'r','ᵤ': 'u','ᵥ': 'v','ₓ': 'x','Ё': 'YO', 'Й': 'I', 'Ц': 'TS', 'У': 'U', 'К': 'K', 'Е': 'E', 'Н': 'N', 'Г': 'G', 'Ш': 'SH', 'Щ': 'SCH', 'З': 'Z', 'Х': 'H', 'Ъ': '', 'ё': 'yo', 'й': 'i', 'ц': 'ts', 'у': 'u', 'к': 'k', 'е': 'e', 'н': 'n', 'г': 'g', 'ш': 'sh', 'щ': 'sch', 'з': 'z', 'х': 'h', 'ъ': '', 'Ф': 'F', 'Ы': 'I', 'В': 'V', 'А': 'A', 'П': 'P', 'Р': 'R', 'О': 'O', 'Л': 'L', 'Д': 'D', 'Ж': 'ZH', 'Э': 'E', 'ф': 'f', 'ы': 'i', 'в': 'v', 'а': 'a', 'п': 'p', 'р': 'r', 'о': 'o', 'л': 'l', 'д': 'd', 'ж': 'zh', 'э': 'e', 'Я': 'Ya', 'Ч': 'CH', 'С': 'S', 'М': 'M', 'И': 'I', 'Т': 'T', 'Ь': '', 'Б': 'B', 'Ю': 'YU', 'я': 'ya', 'ч': 'ch', 'с': 's', 'м': 'm', 'и': 'i', 'т': 't', 'ь': '', 'б': 'b', 'ю': 'yu'} + +const Config = { + Emoji, + LatinizeMap, + TLD, + Countries +}; +(window as any).Config = Config; +export default Config; \ No newline at end of file diff --git a/src/lib/crypto/crypto_methods.ts b/src/lib/crypto/crypto_methods.ts new file mode 100644 index 00000000..91d8b668 --- /dev/null +++ b/src/lib/crypto/crypto_methods.ts @@ -0,0 +1,46 @@ +import { convertToArrayBuffer, convertToByteArray } from "../bin_utils"; + +export default abstract class CryptoWorkerMethods { + abstract performTaskWorker(task: string, ...args: any[]): Promise; + + public sha1Hash(bytes: number[] | ArrayBuffer | Uint8Array): Promise { + return this.performTaskWorker('sha1-hash', bytes); + } + + public sha256Hash(bytes: any) { + return this.performTaskWorker('sha256-hash', bytes); + } + + public pbkdf2(buffer: Uint8Array, salt: Uint8Array, iterations: number) { + return this.performTaskWorker('pbkdf2', buffer, salt, iterations); + } + + public aesEncrypt(bytes: any, keyBytes: any, ivBytes: any) { + return this.performTaskWorker('aes-encrypt', convertToArrayBuffer(bytes), + convertToArrayBuffer(keyBytes), convertToArrayBuffer(ivBytes)); + } + + public aesDecrypt(encryptedBytes: any, keyBytes: any, ivBytes: any): Promise { + return this.performTaskWorker('aes-decrypt', + encryptedBytes, keyBytes, ivBytes) + .then(bytes => convertToArrayBuffer(bytes)); + } + + public rsaEncrypt(publicKey: {modulus: string, exponent: string}, bytes: any): Promise { + return this.performTaskWorker('rsa-encrypt', publicKey, bytes); + } + + public factorize(bytes: any) { + bytes = convertToByteArray(bytes); + + return this.performTaskWorker<[number[], number[], number]>('factorize', bytes); + } + + public modPow(x: any, y: any, m: any) { + return this.performTaskWorker('mod-pow', x, y, m); + } + + public gzipUncompress(bytes: ArrayBuffer, toString?: boolean) { + return this.performTaskWorker('unzip', bytes, toString); + } +} \ No newline at end of file diff --git a/src/lib/crypto/cryptoworker.ts b/src/lib/crypto/cryptoworker.ts index 98be5054..80f4d87d 100644 --- a/src/lib/crypto/cryptoworker.ts +++ b/src/lib/crypto/cryptoworker.ts @@ -1,7 +1,5 @@ -import {convertToArrayBuffer, convertToByteArray, dT} from '../bin_utils'; - -// @ts-ignore -//import Worker from './crypto.worker.js'; +import {dT} from '../bin_utils'; +import CryptoWorkerMethods from './crypto_methods'; type Task = { taskID: number, @@ -9,7 +7,7 @@ type Task = { args: any[] }; -class CryptoWorker { +class CryptoWorker extends CryptoWorkerMethods { private webWorker: Worker | boolean = false; private taskID = 0; private awaiting: { @@ -22,13 +20,35 @@ class CryptoWorker { private pending: Array = []; private debug = false; + private utils: {[name: string]: (...args: any[]) => any} = {}; + constructor() { + super(); console.log(dT(), 'CW constructor'); - if(window.Worker/* && 1 == 2 */) { - import('./crypto.worker.js').then((CryptoWebWorker: any) => { - //console.log(CryptoWebWorker); - var tmpWorker = new CryptoWebWorker.default(); + /// #if MTPROTO_WORKER + Promise.all([ + import('./crypto_utils').then(utils => { + Object.assign(this.utils, { + 'sha1-hash': utils.sha1HashSync, + 'sha256-hash': utils.sha256HashSync, + 'pbkdf2': utils.hash_pbkdf2, + 'aes-encrypt': utils.aesEncryptSync, + 'aes-decrypt': utils.aesDecryptSync, + 'rsa-encrypt': utils.rsaEncrypt, + 'factorize': utils.pqPrimeFactorization, + 'mod-pow': utils.bytesModPow + }); + }), + + import('../bin_utils').then(utils => { + this.utils.unzip = utils.gzipUncompress; + }) + ]); + /// #else + if(window.Worker) { + import('./crypto.worker.js').then((worker: any) => { + var tmpWorker = new worker.default(); //var tmpWorker = new Worker(); tmpWorker.onmessage = (e: any) => { if(!this.webWorker) { @@ -41,11 +61,12 @@ class CryptoWorker { }; tmpWorker.onerror = (error: any) => { - console.error('CW error', error/* , error.stack */); + console.error('CW error', error); this.webWorker = false; }; }); } + /// #endif } private finalizeTask(taskID: number, result: any) { @@ -60,6 +81,9 @@ class CryptoWorker { public performTaskWorker(task: string, ...args: any[]) { this.debug && console.log(dT(), 'CW start', task, args); + /// #if MTPROTO_WORKER + return Promise.resolve(this.utils[task](...args)); + /// #else return new Promise((resolve, reject) => { this.awaiting[this.taskID] = {resolve, reject, taskName: task}; @@ -75,6 +99,7 @@ class CryptoWorker { this.taskID++; }); + /// #endif } private releasePending() { @@ -86,49 +111,8 @@ class CryptoWorker { this.pending.length = 0; } } - - public sha1Hash(bytes: number[] | ArrayBuffer | Uint8Array): Promise { - return this.performTaskWorker('sha1-hash', bytes); - } - - public sha256Hash(bytes: any) { - return this.performTaskWorker('sha256-hash', bytes); - } - - public pbkdf2(buffer: Uint8Array, salt: Uint8Array, iterations: number) { - return this.performTaskWorker('pbkdf2', buffer, salt, iterations); - } - - public aesEncrypt(bytes: any, keyBytes: any, ivBytes: any) { - return this.performTaskWorker('aes-encrypt', convertToArrayBuffer(bytes), - convertToArrayBuffer(keyBytes), convertToArrayBuffer(ivBytes)); - } - - public aesDecrypt(encryptedBytes: any, keyBytes: any, ivBytes: any): Promise { - return this.performTaskWorker('aes-decrypt', - encryptedBytes, keyBytes, ivBytes) - .then(bytes => convertToArrayBuffer(bytes)); - } - - public rsaEncrypt(publicKey: {modulus: string, exponent: string}, bytes: any): Promise { - return this.performTaskWorker('rsa-encrypt', publicKey, bytes); - } - - public factorize(bytes: any) { - bytes = convertToByteArray(bytes); - - return this.performTaskWorker<[number[], number[], number]>('factorize', bytes); - } - - public modPow(x: any, y: any, m: any) { - return this.performTaskWorker('mod-pow', x, y, m); - } - - public gzipUncompress(bytes: ArrayBuffer, toString?: boolean) { - return this.performTaskWorker('unzip', bytes, toString); - } } const cryptoWorker = new CryptoWorker(); -(window as any).CryptoWorker = cryptoWorker; +//(window as any).CryptoWorker = cryptoWorker; export default cryptoWorker; diff --git a/src/lib/filemanager.ts b/src/lib/filemanager.ts index e8a28d23..29ef400e 100644 --- a/src/lib/filemanager.ts +++ b/src/lib/filemanager.ts @@ -1,11 +1,11 @@ -import {bytesToArrayBuffer, blobSafeMimeType, blobConstruct, bytesToBase64} from './bin_utils'; +import {blobSafeMimeType, blobConstruct, bytesToBase64} from './bin_utils'; -import 'web-streams-polyfill/ponyfill'; +/* import 'web-streams-polyfill/ponyfill'; // @ts-ignore import streamSaver from 'streamsaver'; if(window.location.href.indexOf('localhost') === -1) { streamSaver.mitm = 'mitm.html'; -} +} */ class FileManager { public blobSupported = true; @@ -104,13 +104,14 @@ class FileManager { } public chooseSaveFile(fileName: string, ext: string, mimeType: string, size?: number): any { - let fileStream = streamSaver.createWriteStream(fileName, { + throw new Error('no writer'); + /* let fileStream = streamSaver.createWriteStream(fileName, { size: size, writableStrategy: undefined, readableStrategy: undefined }); let writer = fileStream.getWriter(); - return writer; + return writer; */ } public getFakeFileWriter(mimeType: string, saveFileCallback: any) { diff --git a/src/lib/idb.ts b/src/lib/idb.ts index 992a48bb..659b6bff 100644 --- a/src/lib/idb.ts +++ b/src/lib/idb.ts @@ -6,28 +6,11 @@ class IdbFileStorage { public dbStoreName = 'files'; public dbVersion = 2; public openDbPromise: Promise; - public storageIsAvailable: boolean; - public storeBlobsAvailable: boolean; + public storageIsAvailable = true; + public storeBlobsAvailable = true; public name = 'IndexedDB'; constructor() { - // @ts-ignore - //window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB; - // @ts-ignore - window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.OIDBTransaction || window.msIDBTransaction; - - this.storageIsAvailable = window.indexedDB !== undefined && window.IDBTransaction !== undefined; - - // IndexedDB is REALLY slow without blob support in Safari 8, no point in it - if(this.storageIsAvailable && - navigator.userAgent.indexOf('Safari') != -1 && - navigator.userAgent.indexOf('Chrome') == -1 && - navigator.userAgent.match(/Version\/[678]/) - ) { - this.storageIsAvailable = false; - } - - this.storeBlobsAvailable = this.storageIsAvailable || false; this.openDatabase(); } @@ -103,8 +86,7 @@ class IdbFileStorage { public deleteFile(fileName: string): Promise { return this.openDatabase().then((db) => { try { - // @ts-ignore - var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ_WRITE || 'readwrite') + var objectStore = db.transaction([this.dbStoreName], 'readwrite') .objectStore(this.dbStoreName); console.log('Delete file: `' + fileName + '`'); @@ -137,8 +119,7 @@ class IdbFileStorage { } try { - // @ts-ignore - var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ_WRITE || 'readwrite') + var objectStore = db.transaction([this.dbStoreName], 'readwrite') .objectStore(this.dbStoreName); var request = objectStore.put(blob, fileName); } catch(error) { @@ -206,8 +187,7 @@ class IdbFileStorage { public storagePutB64String(db: IDBDatabase, fileName: string, b64string: string) { try { - // @ts-ignore - var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ_WRITE || 'readwrite') + var objectStore = db.transaction([this.dbStoreName], 'readwrite') .objectStore(this.dbStoreName); var request = objectStore.put(b64string, fileName); } catch(error) { @@ -230,8 +210,7 @@ class IdbFileStorage { public getFile(fileName: string, size?: any): Promise { return this.openDatabase().then((db) => { - // @ts-ignore - var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ || 'readonly') + var objectStore = db.transaction([this.dbStoreName], 'readonly') .objectStore(this.dbStoreName); var request = objectStore.get(fileName); @@ -257,8 +236,7 @@ class IdbFileStorage { public getAllKeys(): Promise> { console.time('getAllEntries'); return this.openDatabase().then((db) => { - // @ts-ignore - var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ || 'readonly') + var objectStore = db.transaction([this.dbStoreName], 'readonly') .objectStore(this.dbStoreName); var request = objectStore.getAllKeys(); @@ -278,8 +256,7 @@ class IdbFileStorage { public isFileExists(fileName: string): Promise { console.time('isFileExists'); return this.openDatabase().then((db) => { - // @ts-ignore - var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ || 'readonly') + var objectStore = db.transaction([this.dbStoreName], 'readonly') .objectStore(this.dbStoreName); var request = objectStore.openCursor(fileName); @@ -307,6 +284,6 @@ class IdbFileStorage { const idbFileStorage = new IdbFileStorage(); -(window as any).IdbFileStorage = idbFileStorage; +//(window as any).IdbFileStorage = idbFileStorage; export default idbFileStorage; diff --git a/src/lib/mtproto/apiFileManager.ts b/src/lib/mtproto/apiFileManager.ts index 6c47e347..c43b4fea 100644 --- a/src/lib/mtproto/apiFileManager.ts +++ b/src/lib/mtproto/apiFileManager.ts @@ -2,7 +2,8 @@ import { nextRandomInt } from "../bin_utils"; import IdbFileStorage from "../idb"; import FileManager from "../filemanager"; -import apiManager from "./apiManager"; +//import apiManager from "./apiManager"; +import apiManager from "./mtprotoworker"; import { logger, deferredPromise, CancellablePromise } from "../polyfill"; export class ApiFileManager { diff --git a/src/lib/mtproto/apiManager.ts b/src/lib/mtproto/apiManager.ts index 67952d0f..05d46f23 100644 --- a/src/lib/mtproto/apiManager.ts +++ b/src/lib/mtproto/apiManager.ts @@ -6,10 +6,13 @@ import networkerFactory from './networkerFactory'; import { telegramMeWebService } from './mtproto'; import authorizer from './authorizer'; import { isObject, tsNow, $rootScope } from '../utils'; -import * as Config from '../config'; +import {App, Modes} from './mtproto_config'; import dcConfigurator from './dcConfigurator'; import HTTP from './transports/http'; import { logger } from '../polyfill'; +import passwordManager from './passwordManager'; + +console.error('apiManager included!'); export class ApiManager { public cachedNetworkers: {[x: number]: MTPNetworker} = {}; @@ -55,7 +58,7 @@ export class ApiManager { public async logOut() { let storageKeys: Array = []; - let prefix = Config.Modes.test ? 't_dc' : 'dc'; + let prefix = Modes.test ? 't_dc' : 'dc'; for(let dcID = 1; dcID <= 5; dcID++) { storageKeys.push(prefix + dcID + '_auth_key'); @@ -124,7 +127,7 @@ export class ApiManager { // mtpGetNetworker public async getNetworker(dcID: number, options: any = {}): Promise { let upload = (options.fileUpload || options.fileDownload) - && (dcConfigurator.chooseServer(dcID, true) instanceof HTTP || Config.Modes.multipleConnections); + && (dcConfigurator.chooseServer(dcID, true) instanceof HTTP || Modes.multipleConnections); let cache = upload ? this.cachedUploadNetworkers : this.cachedNetworkers; if(!dcID) { @@ -315,7 +318,7 @@ export class ApiManager { this.getNetworker(dcID, options).then(performRequest, rejectPromise); } else { AppStorage.get('dc').then((baseDcID) => { - this.getNetworker(this.baseDcID = dcID = baseDcID || Config.App.baseDcID, options).then(performRequest, rejectPromise); + this.getNetworker(this.baseDcID = dcID = baseDcID || App.baseDcID, options).then(performRequest, rejectPromise); }); } }); @@ -328,6 +331,14 @@ export class ApiManager { return auth.id || 0; }); } + + public checkPassword(value: string): Promise { + return passwordManager.getState() + .then(state => { + console.log(state); + return passwordManager.check(state, value); + }); + } } export default new ApiManager(); diff --git a/src/lib/mtproto/authorizer.ts b/src/lib/mtproto/authorizer.ts index e7ce5a92..906c1679 100644 --- a/src/lib/mtproto/authorizer.ts +++ b/src/lib/mtproto/authorizer.ts @@ -1,4 +1,4 @@ -import { TLSerialization, TLDeserialization } from "../tl_utils"; +import { TLSerialization, TLDeserialization } from "./tl_utils"; import dcConfigurator from "./dcConfigurator"; import { dT, bytesToHex, bytesCmp, bytesFromHex, bytesXor } from "../bin_utils"; import rsaKeysManager from "./rsaKeysManager"; @@ -9,11 +9,6 @@ import timeManager from "./timeManager"; import { BigInteger } from "jsbn"; import CryptoWorker from "../crypto/cryptoworker"; -import {MTProto} from './mtproto'; - -/* const chromeMatches = navigator.userAgent.match(/Chrome\/(\d+(\.\d+)?)/); -const chromeVersion = (chromeMatches && parseFloat(chromeMatches[1])) || false; -const xhrSendBuffer = !('ArrayBufferView' in window) && (chromeVersion > 0 && chromeVersion < 30); */ /* let fNewNonce: any = bytesFromHex('8761970c24cb2329b5b2459752c502f3057cb7e8dbab200e526e8767fdc73b3c').reverse(); let fNonce: any = bytesFromHex('b597720d11faa5914ef485c529cde414').reverse(); diff --git a/src/lib/mtproto/dcConfigurator.ts b/src/lib/mtproto/dcConfigurator.ts index 9a2e17b7..919792a4 100644 --- a/src/lib/mtproto/dcConfigurator.ts +++ b/src/lib/mtproto/dcConfigurator.ts @@ -1,6 +1,7 @@ import Socket from './transports/websocket'; import MTTransport from './transports/transport'; import HTTP from './transports/http'; +import { Modes } from './mtproto_config'; type Servers = { [transport: string]: { @@ -20,7 +21,7 @@ type Servers = { export class DcConfigurator { private sslSubdomains = ['pluto', 'venus', 'aurora', 'vesta', 'flora']; - private dcOptions = Config.Modes.test + private dcOptions = Modes.test ? [ {id: 1, host: '149.154.175.10', port: 80}, {id: 2, host: '149.154.167.40', port: 80}, @@ -47,7 +48,7 @@ export class DcConfigurator { }; public chooseServer(dcID: number, upload?: boolean, transport = 'websocket') { - let servers = upload && (transport != 'websocket' || Config.Modes.multipleConnections) + let servers = upload && (transport != 'websocket' || Modes.multipleConnections) ? this.chosenUploadServers[transport] : this.chosenServers[transport]; @@ -56,14 +57,14 @@ export class DcConfigurator { if(transport == 'websocket') { let subdomain = this.sslSubdomains[dcID - 1]; - let path = Config.Modes.test ? 'apiws_test' : 'apiws'; + let path = Modes.test ? 'apiws_test' : 'apiws'; chosenServer = 'wss://' + subdomain + '.web.telegram.org/' + path; return servers[dcID] = new Socket(dcID, chosenServer); } - if(Config.Modes.ssl || !Config.Modes.http || transport == 'https') { + if(Modes.ssl || !Modes.http || transport == 'https') { let subdomain = this.sslSubdomains[dcID - 1] + (upload ? '-1' : ''); - let path = Config.Modes.test ? 'apiw_test1' : 'apiw1'; + let path = Modes.test ? 'apiw_test1' : 'apiw1'; chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path; return servers[dcID] = new HTTP(dcID, chosenServer); } diff --git a/src/lib/mtproto/mtproto.ts b/src/lib/mtproto/mtproto.ts index 74eb0376..1ce7e0ca 100644 --- a/src/lib/mtproto/mtproto.ts +++ b/src/lib/mtproto/mtproto.ts @@ -1,9 +1,8 @@ -import * as Config from '../config'; import AppStorage from '../storage'; - import {tsNow} from '../utils'; +import { Modes, App } from './mtproto_config'; -import PasswordManager from './passwordManager'; +/* import PasswordManager from './passwordManager'; import DcConfigurator from './dcConfigurator'; import RSAKeysManager from './rsaKeysManager'; import TimeManager from './timeManager'; @@ -11,11 +10,11 @@ import ServerTimeManager from './serverTimeManager'; import Authorizer from './authorizer'; import NetworkerFactory from './networkerFactory'; import ApiManager from './apiManager'; -import ApiFileManager from './apiFileManager'; +import ApiFileManager from './apiFileManager'; */ export class TelegramMeWebService { - public disabled = Config.Modes.test || - Config.App.domains.indexOf(location.hostname) == -1 || + public disabled = Modes.test || + App.domains.indexOf(location.hostname) == -1 || location.protocol != 'http:' && location.protocol != 'https:' || location.protocol == 'https:' && location.hostname != 'web.telegram.org'; @@ -54,7 +53,7 @@ export class TelegramMeWebService { export const telegramMeWebService = new TelegramMeWebService(); -export namespace MTProto { +/* export namespace MTProto { //$($window).on('click keydown', rng_seed_time); // WARNING! export const passwordManager = PasswordManager; @@ -68,4 +67,4 @@ export namespace MTProto { export const serverTimeManager = ServerTimeManager; } -(window as any).MTProto = MTProto; +//(window as any).MTProto = MTProto; */ diff --git a/src/lib/mtproto/mtproto.worker.js b/src/lib/mtproto/mtproto.worker.js new file mode 100644 index 00000000..b6d42f10 --- /dev/null +++ b/src/lib/mtproto/mtproto.worker.js @@ -0,0 +1,41 @@ +import apiManager from "./apiManager"; +import AppStorage from '../storage'; +import cryptoWorker from "../crypto/cryptoworker"; +import networkerFactory from "./networkerFactory"; + +//const ctx: Worker = self as any; +const ctx = self; + +console.error('INCLUDE !!!', new Error().stack); + +networkerFactory.setUpdatesProcessor((obj, bool) => { + ctx.postMessage({update: {obj, bool}}); +}); + +ctx.onmessage = function(e) { + var taskID = e.data.taskID; + + if(e.data.useLs) { + AppStorage.finishTask(e.data.taskID, e.data.args); + return; + } + + switch(e.data.task) { + case 'unzip': + return cryptoWorker.gzipUncompress.apply(cryptoWorker, e.data.args).then(result => { + ctx.postMessage({taskID: taskID, result: result}); + }); + + default: + return apiManager[e.data.task].apply(apiManager, e.data.args).then(result => { + console.log(e.data.task + ' result:', result, taskID); + ctx.postMessage({taskID: taskID, result: result}); + }).catch(err => { + console.error(e.data.task + ' err:', err, taskID); + ctx.postMessage({taskID: taskID, error: err}); + }); + //throw new Error('Unknown task: ' + e.data.task); + } +} + +ctx.postMessage('ready'); diff --git a/src/lib/mtproto/mtproto_config.ts b/src/lib/mtproto/mtproto_config.ts new file mode 100644 index 00000000..ab274435 --- /dev/null +++ b/src/lib/mtproto/mtproto_config.ts @@ -0,0 +1,15 @@ +export const App = { + id: 1025907, + hash: '452b0359b988148995f22ff0f4229750', + version: '0.3.0', + domains: [] as string[], + baseDcID: 2 +}; + +export const Modes = { + test: location.search.indexOf('test=1') > 0/* || true */, + debug: location.search.indexOf('debug=1') > 0, + http: location.search.indexOf('http=1') > 0, + ssl: location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:' && location.search.indexOf('ssl=0') == -1, + multipleConnections: true +}; diff --git a/src/lib/mtproto/mtprotoworker.ts b/src/lib/mtproto/mtprotoworker.ts new file mode 100644 index 00000000..a7c27610 --- /dev/null +++ b/src/lib/mtproto/mtprotoworker.ts @@ -0,0 +1,150 @@ +import {dT, isObject} from '../utils'; +import AppStorage from '../storage'; +import CryptoWorkerMethods from '../crypto/crypto_methods'; + +type Task = { + taskID: number, + task: string, + args: any[] +}; + +class ApiManagerProxy extends CryptoWorkerMethods { + private webWorker: Worker | boolean = false; + private taskID = 0; + private awaiting: { + [id: number]: { + resolve: any, + reject: any, + taskName: string + } + } = {} as any; + private pending: Array = []; + private debug = true; + + public updatesProcessor: (obj: any, bool: boolean) => void = null; + + constructor() { + super(); + console.log(dT(), 'ApiManagerProxy constructor'); + + if(window.Worker) { + import('./mtproto.worker.js').then((worker: any) => { + var tmpWorker = new worker.default(); + tmpWorker.onmessage = (e: any) => { + if(!this.webWorker) { + this.webWorker = tmpWorker; + console.info(dT(), 'ApiManagerProxy set webWorker'); + this.releasePending(); + } + + if(!isObject(e.data)) { + return; + } + + if(e.data.useLs) { + // @ts-ignore + AppStorage[e.data.task](...e.data.args).then(res => { + (this.webWorker as Worker).postMessage({useLs: true, taskID: e.data.taskID, args: res}); + }); + } else if(e.data.update) { + if(this.updatesProcessor) { + this.updatesProcessor(e.data.update.obj, e.data.update.bool); + } + } else { + this.finalizeTask(e.data.taskID, e.data.result, e.data.error); + } + }; + + tmpWorker.onerror = (error: any) => { + console.error('ApiManagerProxy error', error); + this.webWorker = false; + }; + }); + } + } + + private finalizeTask(taskID: number, result: any, error: any) { + let deferred = this.awaiting[taskID]; + if(deferred !== undefined) { + this.debug && console.log(dT(), 'ApiManagerProxy done', deferred.taskName, result, error); + result === undefined ? deferred.reject(error) : deferred.resolve(result); + delete this.awaiting[taskID]; + } + } + + public performTaskWorker(task: string, ...args: any[]) { + this.debug && console.log(dT(), 'ApiManagerProxy start', task, args); + + return new Promise((resolve, reject) => { + this.awaiting[this.taskID] = {resolve, reject, taskName: task}; + + let params = { + task, + taskID: this.taskID, + args + }; + + //(this.webWorker as Worker).postMessage(params); + this.pending.push(params); + this.releasePending(); + + this.taskID++; + }); + } + + private releasePending() { + if(this.webWorker) { + this.pending.forEach(pending => { + (this.webWorker as Worker).postMessage(pending); + }); + + this.pending.length = 0; + } + } + + public setUpdatesProcessor(callback: (obj: any, bool: boolean) => void) { + this.updatesProcessor = callback; + } + + public invokeApi(method: string, params: any = {}, options: { + dcID?: number, + timeout?: number, + noErrorBox?: boolean, + fileUpload?: boolean, + ignoreErrors?: boolean, + fileDownload?: boolean, + createNetworker?: boolean, + singleInRequest?: boolean, + startMaxLength?: number, + + waitTime?: number, + stopTime?: number, + rawError?: any + } = {}): Promise { + return this.performTaskWorker('invokeApi', method, params, options); + } + + public setUserAuth(userAuth: {id: number}) { + return this.performTaskWorker('setUserAuth', userAuth); + } + + public getNetworker(dc_id: number) { + return this.performTaskWorker('getNetworker', dc_id); + } + + public getUserID(): Promise { + return this.performTaskWorker('getUserID'); + } + + public logOut(): Promise { + return this.performTaskWorker('logOut'); + } + + public checkPassword(value: string): Promise { + return this.performTaskWorker('checkPassword', value); + } +} + +const apiManagerProxy = new ApiManagerProxy(); +(window as any).apiManagerProxy = apiManagerProxy; +export default apiManagerProxy; diff --git a/src/lib/mtproto/networker.ts b/src/lib/mtproto/networker.ts index 6e77c9a3..549a31e9 100644 --- a/src/lib/mtproto/networker.ts +++ b/src/lib/mtproto/networker.ts @@ -2,10 +2,10 @@ import {tsNow, isObject} from '../utils'; import {convertToUint8Array, bufferConcat, nextRandomInt, bytesToHex, longToBytes, bytesCmp, uintToInt, bigStringInt} from '../bin_utils'; -import {TLDeserialization, TLSerialization} from '../tl_utils'; +import {TLDeserialization, TLSerialization} from './tl_utils'; import CryptoWorker from '../crypto/cryptoworker'; import AppStorage from '../storage'; -import * as Config from '../config'; +import Schema from './schema'; import timeManager from './timeManager'; import NetworkerFactory from './networkerFactory'; @@ -13,10 +13,9 @@ import dcConfigurator from './dcConfigurator'; import Socket from './transports/websocket'; import HTTP from './transports/http'; import { logger } from '../polyfill'; +import { Modes, App } from './mtproto_config'; -/* const chromeMatches = navigator.userAgent.match(/Chrome\/(\d+(\.\d+)?)/); -const chromeVersion = chromeMatches && parseFloat(chromeMatches[1]) || false; -const xhrSendBuffer = !('ArrayBufferView' in window) && (chromeVersion > 0 && chromeVersion < 30);*/ +console.error('networker included!', new Error().stack); type Message = { msg_id: string, @@ -103,15 +102,11 @@ class MTPNetworker { this.updateSession(); - if(!NetworkerFactory.offlineInited) { - NetworkerFactory.offlineInited = true; - /* $rootScope.offline = true - $rootScope.offlineConnecting = true */ - } - - if(Config.Navigator.mobile) { - this.setupMobileSleep(); - } + // if(!NetworkerFactory.offlineInited) { + // NetworkerFactory.offlineInited = true; + // /* $rootScope.offline = true + // $rootScope.offlineConnecting = true */ + // } this.transport = dcConfigurator.chooseServer(this.dcID, this.upload); @@ -131,25 +126,6 @@ class MTPNetworker { //MTProto.secureRandom.nextBytes(this.sessionID); } - public setupMobileSleep() { - /* $rootScope.$watch('idle.isIDLE', (isIDLE) => { - if(isIDLE) { - this.sleepAfter = tsNow() + 30000; - } else { - delete this.sleepAfter; - this.checkLongPoll(); - } - }) - - $rootScope.$on('push_received', function() { - // this.log('push recieved', self.sleepAfter) - if(this.sleepAfter) { - this.sleepAfter = tsNow() + 30000; - this.checkLongPoll(); - } - }) */ - } - public updateSentMessage(sentMessageID: any) { var sentMessage = this.sentMessages[sentMessageID]; if(!sentMessage) { @@ -202,7 +178,7 @@ class MTPNetworker { body: serializer.getBytes() }; - if(Config.Modes.debug) { + if(Modes.debug) { this.log('MT call', method, params, messageID, seqNo); } @@ -221,7 +197,7 @@ class MTPNetworker { body: serializer.getBytes() }; - if(Config.Modes.debug) { + if(Modes.debug) { this.log('MT message', object, messageID, seqNo); } @@ -251,32 +227,32 @@ class MTPNetworker { if(!this.connectionInited) { // this will call once for each new session ///////this.log('Wrap api call !this.connectionInited'); - let invokeWithLayer = Config.Schema.API.methods.find((m: any) => m.method == 'invokeWithLayer'); + let invokeWithLayer = Schema.API.methods.find((m: any) => m.method == 'invokeWithLayer'); if(!invokeWithLayer) throw new Error('no invokeWithLayer!'); serializer.storeInt(+invokeWithLayer.id >>> 0, 'invokeWithLayer'); // @ts-ignore - serializer.storeInt(Config.Schema.API.layer, 'layer'); + serializer.storeInt(Schema.layer, 'layer'); - let initConnection = Config.Schema.API.methods.find((m: any) => m.method == 'initConnection'); + let initConnection = Schema.API.methods.find((m: any) => m.method == 'initConnection'); if(!initConnection) throw new Error('no initConnection!'); serializer.storeInt(+initConnection.id >>> 0, 'initConnection'); serializer.storeInt(0x0, 'flags'); - serializer.storeInt(Config.App.id, 'api_id'); + serializer.storeInt(App.id, 'api_id'); serializer.storeString(navigator.userAgent || 'Unknown UserAgent', 'device_model'); serializer.storeString(navigator.platform || 'Unknown Platform', 'system_version'); - serializer.storeString(Config.App.version, 'app_version'); + serializer.storeString(App.version, 'app_version'); serializer.storeString(navigator.language || 'en', 'system_lang_code'); serializer.storeString('', 'lang_pack'); serializer.storeString(navigator.language || 'en', 'lang_code'); //serializer.storeInt(0x0, 'proxy'); /* serializer.storeMethod('initConnection', { 'flags': 0, - 'api_id': Config.App.id, + 'api_id': App.id, 'device_model': navigator.userAgent || 'Unknown UserAgent', 'system_version': navigator.platform || 'Unknown Platform', - 'app_version': Config.App.version, + 'app_version': App.version, 'system_lang_code': navigator.language || 'en', 'lang_pack': '', 'lang_code': navigator.language || 'en' @@ -284,7 +260,7 @@ class MTPNetworker { } if(options.afterMessageID) { - let invokeAfterMsg = Config.Schema.API.methods.find((m: any) => m.method == 'invokeAfterMsg'); + let invokeAfterMsg = Schema.API.methods.find((m: any) => m.method == 'invokeAfterMsg'); if(!invokeAfterMsg) throw new Error('no invokeAfterMsg!'); this.log('Api call options.afterMessageID!'); @@ -307,7 +283,7 @@ class MTPNetworker { isAPI: true }; - if(Config.Modes.debug/* || true */) { + if(Modes.debug/* || true */) { this.log('Api call', method, message, params, options); } else { //////this.log('Api call', method); @@ -677,7 +653,7 @@ class MTPNetworker { this.sentMessages[message.msg_id] = containerSentMessage; - if(Config.Modes.debug || true) { + if(Modes.debug || true) { this.log('Container', innerMessages, message.msg_id, message.seq_no); } } else { @@ -698,7 +674,7 @@ class MTPNetworker { self.toggleOffline(false); // this.log('parse for', message) self.parseResponse(result).then((response) => { - if(Config.Modes.debug) { + if(Modes.debug) { this.log('Server response', self.dcID, response); } @@ -1194,7 +1170,7 @@ class MTPNetworker { } } else { if(deferred) { - if(Config.Modes.debug) { + if(Modes.debug) { this.debug && this.log('Rpc response', message.result); } else { var dRes = message.result._; diff --git a/src/lib/mtproto/networkerFactory.ts b/src/lib/mtproto/networkerFactory.ts index c141b6de..04927493 100644 --- a/src/lib/mtproto/networkerFactory.ts +++ b/src/lib/mtproto/networkerFactory.ts @@ -1,19 +1,11 @@ -import { dT } from "../utils"; - import { MTPNetworker } from "./networker"; export class NetworkerFactory { public updatesProcessor: (obj: any, bool: boolean) => void = null; - public offlineInited = false; + //public offlineInited = false; public akStopped = false; - constructor() { - /* $rootScope.retryOnline = function() { - $(document.body).trigger('online'); - } */ - } - - public startAll() { + /* public startAll() { if(this.akStopped) { this.akStopped = false; @@ -27,7 +19,7 @@ export class NetworkerFactory { public stopAll() { this.akStopped = true; - } + } */ public setUpdatesProcessor(callback: (obj: any, bool: boolean) => void) { this.updatesProcessor = callback; diff --git a/src/lib/mtproto/passwordManager.ts b/src/lib/mtproto/passwordManager.ts index 1485469e..7aabf1ed 100644 --- a/src/lib/mtproto/passwordManager.ts +++ b/src/lib/mtproto/passwordManager.ts @@ -1,9 +1,6 @@ import apiManager from "./apiManager"; - import { bufferConcats, bytesToHex, bytesFromHex, bufferConcat, bytesXor } from "../bin_utils"; - import CryptoWorker from "../crypto/cryptoworker"; - import {str2bigInt, greater, isZero, // @ts-ignore bigInt2str, powMod, int2bigInt, mult, mod, sub, bitSize, negative, mult, add} from 'leemon'; @@ -80,19 +77,6 @@ export class PasswordManager { }, options); } - /* public makePasswordHash(salt: any, password: any) { - var passwordUTF8 = unescape(encodeURIComponent(password)); - - var buffer = new ArrayBuffer(passwordUTF8.length); - var byteView = new Uint8Array(buffer); - for(var i = 0, len = passwordUTF8.length; i < len; i++) { - byteView[i] = passwordUTF8.charCodeAt(i); - } - - buffer = bufferConcat(bufferConcat(salt, byteView), salt); - - return CryptoWorker.sha256Hash(buffer); - } */ public makePasswordHash(password: string, client_salt: Uint8Array, server_salt: Uint8Array) { var passwordUTF8 = unescape(encodeURIComponent(password)); diff --git a/src/lib/mtproto/rsaKeysManager.ts b/src/lib/mtproto/rsaKeysManager.ts index 969b0ffa..5077273d 100644 --- a/src/lib/mtproto/rsaKeysManager.ts +++ b/src/lib/mtproto/rsaKeysManager.ts @@ -1,7 +1,5 @@ -import { TLSerialization } from "../tl_utils"; - +import { TLSerialization } from "./tl_utils"; import { bytesFromHex, bigStringInt, bytesToHex, bytesFromArrayBuffer } from "../bin_utils"; - import CryptoWorker from '../crypto/cryptoworker'; export class RSAKeysManager { diff --git a/src/lib/mtproto/schema.ts b/src/lib/mtproto/schema.ts new file mode 100644 index 00000000..53704def --- /dev/null +++ b/src/lib/mtproto/schema.ts @@ -0,0 +1,5 @@ +export default { + "MTProto": {"constructors":[{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"85337187","predicate":"resPQ","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"pq","type":"bytes"},{"name":"server_public_key_fingerprints","type":"Vector"}],"type":"ResPQ"},{"id":"-2083955988","predicate":"p_q_inner_data","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"}],"type":"P_Q_inner_data"},{"id":"-1443537003","predicate":"p_q_inner_data_dc","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"},{"name":"dc","type":"int"}],"type":"P_Q_inner_data"},{"id":"1013613780","predicate":"p_q_inner_data_temp","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"},{"name":"expires_in","type":"int"}],"type":"P_Q_inner_data"},{"id":"1459478408","predicate":"p_q_inner_data_temp_dc","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"},{"name":"dc","type":"int"},{"name":"expires_in","type":"int"}],"type":"P_Q_inner_d"},{"id":"2043348061","predicate":"server_DH_params_fail","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash","type":"int128"}],"type":"Server_DH_Params"},{"id":"-790100132","predicate":"server_DH_params_ok","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"encrypted_answer","type":"bytes"}],"type":"Server_DH_Params"},{"id":"-1249309254","predicate":"server_DH_inner_data","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"g","type":"int"},{"name":"dh_prime","type":"bytes"},{"name":"g_a","type":"bytes"},{"name":"server_time","type":"int"}],"type":"Server_DH_inner_data"},{"id":"1715713620","predicate":"client_DH_inner_data","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"retry_id","type":"long"},{"name":"g_b","type":"bytes"}],"type":"Client_DH_Inner_Data"},{"id":"1003222836","predicate":"dh_gen_ok","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash1","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"1188831161","predicate":"dh_gen_retry","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash2","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"-1499615742","predicate":"dh_gen_fail","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash3","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"-212046591","predicate":"rpc_result","params":[{"name":"req_msg_id","type":"long"},{"name":"result","type":"Object"}],"type":"RpcResult"},{"id":"558156313","predicate":"rpc_error","params":[{"name":"error_code","type":"int"},{"name":"error_message","type":"string"}],"type":"RpcError"},{"id":"1579864942","predicate":"rpc_answer_unknown","params":[],"type":"RpcDropAnswer"},{"id":"-847714938","predicate":"rpc_answer_dropped_running","params":[],"type":"RpcDropAnswer"},{"id":"-1539647305","predicate":"rpc_answer_dropped","params":[{"name":"msg_id","type":"long"},{"name":"seq_no","type":"int"},{"name":"bytes","type":"int"}],"type":"RpcDropAnswer"},{"id":"155834844","predicate":"future_salt","params":[{"name":"valid_since","type":"int"},{"name":"valid_until","type":"int"},{"name":"salt","type":"long"}],"type":"FutureSalt"},{"id":"-1370486635","predicate":"future_salts","params":[{"name":"req_msg_id","type":"long"},{"name":"now","type":"int"},{"name":"salts","type":"vector"}],"type":"FutureSalts"},{"id":"880243653","predicate":"pong","params":[{"name":"msg_id","type":"long"},{"name":"ping_id","type":"long"}],"type":"Pong"},{"id":"-1631450872","predicate":"new_session_created","params":[{"name":"first_msg_id","type":"long"},{"name":"unique_id","type":"long"},{"name":"server_salt","type":"long"}],"type":"NewSession"},{"id":"1945237724","predicate":"msg_container","params":[{"name":"messages","type":"vector<%Message>"}],"type":"MessageContainer"},{"id":"1538843921","predicate":"message","params":[{"name":"msg_id","type":"long"},{"name":"seqno","type":"int"},{"name":"bytes","type":"int"},{"name":"body","type":"Object"}],"type":"Message"},{"id":"-530561358","predicate":"msg_copy","params":[{"name":"orig_message","type":"Message"}],"type":"MessageCopy"},{"id":"812830625","predicate":"gzip_packed","params":[{"name":"packed_data","type":"bytes"}],"type":"Object"},{"id":"1658238041","predicate":"msgs_ack","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgsAck"},{"id":"-1477445615","predicate":"bad_msg_notification","params":[{"name":"bad_msg_id","type":"long"},{"name":"bad_msg_seqno","type":"int"},{"name":"error_code","type":"int"}],"type":"BadMsgNotification"},{"id":"-307542917","predicate":"bad_server_salt","params":[{"name":"bad_msg_id","type":"long"},{"name":"bad_msg_seqno","type":"int"},{"name":"error_code","type":"int"},{"name":"new_server_salt","type":"long"}],"type":"BadMsgNotification"},{"id":"2105940488","predicate":"msg_resend_req","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgResendReq"},{"id":"-2045723925","predicate":"msg_resend_ans_req","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgResendReq"},{"id":"-630588590","predicate":"msgs_state_req","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgsStateReq"},{"id":"81704317","predicate":"msgs_state_info","params":[{"name":"req_msg_id","type":"long"},{"name":"info","type":"bytes"}],"type":"MsgsStateInfo"},{"id":"-1933520591","predicate":"msgs_all_info","params":[{"name":"msg_ids","type":"Vector"},{"name":"info","type":"bytes"}],"type":"MsgsAllInfo"},{"id":"661470918","predicate":"msg_detailed_info","params":[{"name":"msg_id","type":"long"},{"name":"answer_msg_id","type":"long"},{"name":"bytes","type":"int"},{"name":"status","type":"int"}],"type":"MsgDetailedInfo"},{"id":"-2137147681","predicate":"msg_new_detailed_info","params":[{"name":"answer_msg_id","type":"long"},{"name":"bytes","type":"int"},{"name":"status","type":"int"}],"type":"MsgDetailedInfo"},{"id":"1973679973","predicate":"bind_auth_key_inner","params":[{"name":"nonce","type":"long"},{"name":"temp_auth_key_id","type":"long"},{"name":"perm_auth_key_id","type":"long"},{"name":"temp_session_id","type":"long"},{"name":"expires_at","type":"int"}],"type":"BindAuthKeyInner"},{"id":"-161422892","predicate":"destroy_auth_key_ok","params":[],"type":"DestroyAuthKeyRes"},{"id":"178201177","predicate":"destroy_auth_key_none","params":[],"type":"DestroyAuthKeyRes"},{"id":"-368010477","predicate":"destroy_auth_key_fail","params":[],"type":"DestroyAuthKeyRes"},{"id":"-501201412","predicate":"destroy_session_ok","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"},{"id":"1658015945","predicate":"destroy_session_none","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"}],"methods":[{"id":"1615239032","method":"req_pq","params":[{"name":"nonce","type":"int128"}],"type":"ResPQ"},{"id":"-1099002127","method":"req_pq_multi","params":[{"name":"nonce","type":"int128"}],"type":"ResPQ"},{"id":"-686627650","method":"req_DH_params","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"public_key_fingerprint","type":"long"},{"name":"encrypted_data","type":"bytes"}],"type":"Server_DH_Params"},{"id":"-184262881","method":"set_client_DH_params","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"encrypted_data","type":"bytes"}],"type":"Set_client_DH_params_answer"},{"id":"1491380032","method":"rpc_drop_answer","params":[{"name":"req_msg_id","type":"long"}],"type":"RpcDropAnswer"},{"id":"-1188971260","method":"get_future_salts","params":[{"name":"num","type":"int"}],"type":"FutureSalts"},{"id":"2059302892","method":"ping","params":[{"name":"ping_id","type":"long"}],"type":"Pong"},{"id":"-213746804","method":"ping_delay_disconnect","params":[{"name":"ping_id","type":"long"},{"name":"disconnect_delay","type":"int"}],"type":"Pong"},{"id":"-1835453025","method":"http_wait","params":[{"name":"max_delay","type":"int"},{"name":"wait_after","type":"int"},{"name":"max_wait","type":"int"}],"type":"HttpWait"},{"id":"-784117408","method":"destroy_auth_key","params":[],"type":"DestroyAuthKeyRes"},{"id":"-414113498","method":"destroy_session","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"}]}, + "API": {"constructors":[{"id":"-1132882121","predicate":"boolFalse","params":[],"type":"Bool"},{"id":"-1720552011","predicate":"boolTrue","params":[],"type":"Bool"},{"id":"1072550713","predicate":"true","params":[],"type":"True"},{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"-994444869","predicate":"error","params":[{"name":"code","type":"int"},{"name":"text","type":"string"}],"type":"Error"},{"id":"1450380236","predicate":"null","params":[],"type":"Null"},{"id":"2134579434","predicate":"inputPeerEmpty","params":[],"type":"InputPeer"},{"id":"2107670217","predicate":"inputPeerSelf","params":[],"type":"InputPeer"},{"id":"396093539","predicate":"inputPeerChat","params":[{"name":"chat_id","type":"int"}],"type":"InputPeer"},{"id":"-1182234929","predicate":"inputUserEmpty","params":[],"type":"InputUser"},{"id":"-138301121","predicate":"inputUserSelf","params":[],"type":"InputUser"},{"id":"-208488460","predicate":"inputPhoneContact","params":[{"name":"client_id","type":"long"},{"name":"phone","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"InputContact"},{"id":"-181407105","predicate":"inputFile","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"name","type":"string"},{"name":"md5_checksum","type":"string"}],"type":"InputFile"},{"id":"-1771768449","predicate":"inputMediaEmpty","params":[],"type":"InputMedia"},{"id":"505969924","predicate":"inputMediaUploadedPhoto","params":[{"name":"flags","type":"#"},{"name":"file","type":"InputFile"},{"name":"stickers","type":"flags.0?Vector"},{"name":"ttl_seconds","type":"flags.1?int"}],"type":"InputMedia"},{"id":"-1279654347","predicate":"inputMediaPhoto","params":[{"name":"flags","type":"#"},{"name":"id","type":"InputPhoto"},{"name":"ttl_seconds","type":"flags.0?int"}],"type":"InputMedia"},{"id":"-104578748","predicate":"inputMediaGeoPoint","params":[{"name":"geo_point","type":"InputGeoPoint"}],"type":"InputMedia"},{"id":"-122978821","predicate":"inputMediaContact","params":[{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"vcard","type":"string"}],"type":"InputMedia"},{"id":"480546647","predicate":"inputChatPhotoEmpty","params":[],"type":"InputChatPhoto"},{"id":"-1837345356","predicate":"inputChatUploadedPhoto","params":[{"name":"file","type":"InputFile"}],"type":"InputChatPhoto"},{"id":"-1991004873","predicate":"inputChatPhoto","params":[{"name":"id","type":"InputPhoto"}],"type":"InputChatPhoto"},{"id":"-457104426","predicate":"inputGeoPointEmpty","params":[],"type":"InputGeoPoint"},{"id":"-206066487","predicate":"inputGeoPoint","params":[{"name":"lat","type":"double"},{"name":"long","type":"double"}],"type":"InputGeoPoint"},{"id":"483901197","predicate":"inputPhotoEmpty","params":[],"type":"InputPhoto"},{"id":"1001634122","predicate":"inputPhoto","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"}],"type":"InputPhoto"},{"id":"-539317279","predicate":"inputFileLocation","params":[{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"},{"name":"file_reference","type":"bytes"}],"type":"InputFileLocation"},{"id":"-1649296275","predicate":"peerUser","params":[{"name":"user_id","type":"int"}],"type":"Peer"},{"id":"-1160714821","predicate":"peerChat","params":[{"name":"chat_id","type":"int"}],"type":"Peer"},{"id":"-1432995067","predicate":"storage.fileUnknown","params":[],"type":"storage.FileType"},{"id":"1086091090","predicate":"storage.filePartial","params":[],"type":"storage.FileType"},{"id":"8322574","predicate":"storage.fileJpeg","params":[],"type":"storage.FileType"},{"id":"-891180321","predicate":"storage.fileGif","params":[],"type":"storage.FileType"},{"id":"172975040","predicate":"storage.filePng","params":[],"type":"storage.FileType"},{"id":"-1373745011","predicate":"storage.filePdf","params":[],"type":"storage.FileType"},{"id":"1384777335","predicate":"storage.fileMp3","params":[],"type":"storage.FileType"},{"id":"1258941372","predicate":"storage.fileMov","params":[],"type":"storage.FileType"},{"id":"-1278304028","predicate":"storage.fileMp4","params":[],"type":"storage.FileType"},{"id":"276907596","predicate":"storage.fileWebp","params":[],"type":"storage.FileType"},{"id":"537022650","predicate":"userEmpty","params":[{"name":"id","type":"int"}],"type":"User"},{"id":"1326562017","predicate":"userProfilePhotoEmpty","params":[],"type":"UserProfilePhoto"},{"id":"-321430132","predicate":"userProfilePhoto","params":[{"name":"photo_id","type":"long"},{"name":"photo_small","type":"FileLocation"},{"name":"photo_big","type":"FileLocation"},{"name":"dc_id","type":"int"}],"type":"UserProfilePhoto"},{"id":"164646985","predicate":"userStatusEmpty","params":[],"type":"UserStatus"},{"id":"-306628279","predicate":"userStatusOnline","params":[{"name":"expires","type":"int"}],"type":"UserStatus"},{"id":"9203775","predicate":"userStatusOffline","params":[{"name":"was_online","type":"int"}],"type":"UserStatus"},{"id":"-1683826688","predicate":"chatEmpty","params":[{"name":"id","type":"int"}],"type":"Chat"},{"id":"1004149726","predicate":"chat","params":[{"name":"flags","type":"#"},{"name":"creator","type":"flags.0?true"},{"name":"kicked","type":"flags.1?true"},{"name":"left","type":"flags.2?true"},{"name":"deactivated","type":"flags.5?true"},{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"photo","type":"ChatPhoto"},{"name":"participants_count","type":"int"},{"name":"date","type":"int"},{"name":"version","type":"int"},{"name":"migrated_to","type":"flags.6?InputChannel"},{"name":"admin_rights","type":"flags.14?ChatAdminRights"},{"name":"default_banned_rights","type":"flags.18?ChatBannedRights"}],"type":"Chat"},{"id":"120753115","predicate":"chatForbidden","params":[{"name":"id","type":"int"},{"name":"title","type":"string"}],"type":"Chat"},{"id":"461151667","predicate":"chatFull","params":[{"name":"flags","type":"#"},{"name":"can_set_username","type":"flags.7?true"},{"name":"has_scheduled","type":"flags.8?true"},{"name":"id","type":"int"},{"name":"about","type":"string"},{"name":"participants","type":"ChatParticipants"},{"name":"chat_photo","type":"flags.2?Photo"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"exported_invite","type":"ExportedChatInvite"},{"name":"bot_info","type":"flags.3?Vector"},{"name":"pinned_msg_id","type":"flags.6?int"},{"name":"folder_id","type":"flags.11?int"}],"type":"ChatFull"},{"id":"-925415106","predicate":"chatParticipant","params":[{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"}],"type":"ChatParticipant"},{"id":"-57668565","predicate":"chatParticipantsForbidden","params":[{"name":"flags","type":"#"},{"name":"chat_id","type":"int"},{"name":"self_participant","type":"flags.0?ChatParticipant"}],"type":"ChatParticipants"},{"id":"1061556205","predicate":"chatParticipants","params":[{"name":"chat_id","type":"int"},{"name":"participants","type":"Vector"},{"name":"version","type":"int"}],"type":"ChatParticipants"},{"id":"935395612","predicate":"chatPhotoEmpty","params":[],"type":"ChatPhoto"},{"id":"1197267925","predicate":"chatPhoto","params":[{"name":"photo_small","type":"FileLocation"},{"name":"photo_big","type":"FileLocation"},{"name":"dc_id","type":"int"}],"type":"ChatPhoto"},{"id":"-2082087340","predicate":"messageEmpty","params":[{"name":"id","type":"int"}],"type":"Message"},{"id":"1160515173","predicate":"message","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"mentioned","type":"flags.4?true"},{"name":"media_unread","type":"flags.5?true"},{"name":"silent","type":"flags.13?true"},{"name":"post","type":"flags.14?true"},{"name":"from_scheduled","type":"flags.18?true"},{"name":"legacy","type":"flags.19?true"},{"name":"edit_hide","type":"flags.21?true"},{"name":"id","type":"int"},{"name":"from_id","type":"flags.8?int"},{"name":"to_id","type":"Peer"},{"name":"fwd_from","type":"flags.2?MessageFwdHeader"},{"name":"via_bot_id","type":"flags.11?int"},{"name":"reply_to_msg_id","type":"flags.3?int"},{"name":"date","type":"int"},{"name":"message","type":"string"},{"name":"media","type":"flags.9?MessageMedia"},{"name":"reply_markup","type":"flags.6?ReplyMarkup"},{"name":"entities","type":"flags.7?Vector"},{"name":"views","type":"flags.10?int"},{"name":"edit_date","type":"flags.15?int"},{"name":"post_author","type":"flags.16?string"},{"name":"grouped_id","type":"flags.17?long"},{"name":"restriction_reason","type":"flags.22?Vector"}],"type":"Message"},{"id":"-1642487306","predicate":"messageService","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"mentioned","type":"flags.4?true"},{"name":"media_unread","type":"flags.5?true"},{"name":"silent","type":"flags.13?true"},{"name":"post","type":"flags.14?true"},{"name":"legacy","type":"flags.19?true"},{"name":"id","type":"int"},{"name":"from_id","type":"flags.8?int"},{"name":"to_id","type":"Peer"},{"name":"reply_to_msg_id","type":"flags.3?int"},{"name":"date","type":"int"},{"name":"action","type":"MessageAction"}],"type":"Message"},{"id":"1038967584","predicate":"messageMediaEmpty","params":[],"type":"MessageMedia"},{"id":"1766936791","predicate":"messageMediaPhoto","params":[{"name":"flags","type":"#"},{"name":"photo","type":"flags.0?Photo"},{"name":"ttl_seconds","type":"flags.2?int"}],"type":"MessageMedia"},{"id":"1457575028","predicate":"messageMediaGeo","params":[{"name":"geo","type":"GeoPoint"}],"type":"MessageMedia"},{"id":"-873313984","predicate":"messageMediaContact","params":[{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"vcard","type":"string"},{"name":"user_id","type":"int"}],"type":"MessageMedia"},{"id":"-1618676578","predicate":"messageMediaUnsupported","params":[],"type":"MessageMedia"},{"id":"-1230047312","predicate":"messageActionEmpty","params":[],"type":"MessageAction"},{"id":"-1503425638","predicate":"messageActionChatCreate","params":[{"name":"title","type":"string"},{"name":"users","type":"Vector"}],"type":"MessageAction"},{"id":"-1247687078","predicate":"messageActionChatEditTitle","params":[{"name":"title","type":"string"}],"type":"MessageAction"},{"id":"2144015272","predicate":"messageActionChatEditPhoto","params":[{"name":"photo","type":"Photo"}],"type":"MessageAction"},{"id":"-1780220945","predicate":"messageActionChatDeletePhoto","params":[],"type":"MessageAction"},{"id":"1217033015","predicate":"messageActionChatAddUser","params":[{"name":"users","type":"Vector"}],"type":"MessageAction"},{"id":"-1297179892","predicate":"messageActionChatDeleteUser","params":[{"name":"user_id","type":"int"}],"type":"MessageAction"},{"id":"739712882","predicate":"dialog","params":[{"name":"flags","type":"#"},{"name":"pinned","type":"flags.2?true"},{"name":"unread_mark","type":"flags.3?true"},{"name":"peer","type":"Peer"},{"name":"top_message","type":"int"},{"name":"read_inbox_max_id","type":"int"},{"name":"read_outbox_max_id","type":"int"},{"name":"unread_count","type":"int"},{"name":"unread_mentions_count","type":"int"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"pts","type":"flags.0?int"},{"name":"draft","type":"flags.1?DraftMessage"},{"name":"folder_id","type":"flags.4?int"}],"type":"Dialog"},{"id":"590459437","predicate":"photoEmpty","params":[{"name":"id","type":"long"}],"type":"Photo"},{"id":"-797637467","predicate":"photo","params":[{"name":"flags","type":"#"},{"name":"has_stickers","type":"flags.0?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"date","type":"int"},{"name":"sizes","type":"Vector"},{"name":"dc_id","type":"int"}],"type":"Photo"},{"id":"236446268","predicate":"photoSizeEmpty","params":[{"name":"type","type":"string"}],"type":"PhotoSize"},{"id":"2009052699","predicate":"photoSize","params":[{"name":"type","type":"string"},{"name":"location","type":"FileLocation"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"size","type":"int"}],"type":"PhotoSize"},{"id":"-374917894","predicate":"photoCachedSize","params":[{"name":"type","type":"string"},{"name":"location","type":"FileLocation"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"bytes","type":"bytes"}],"type":"PhotoSize"},{"id":"286776671","predicate":"geoPointEmpty","params":[],"type":"GeoPoint"},{"id":"43446532","predicate":"geoPoint","params":[{"name":"long","type":"double"},{"name":"lat","type":"double"},{"name":"access_hash","type":"long"}],"type":"GeoPoint"},{"id":"1577067778","predicate":"auth.sentCode","params":[{"name":"flags","type":"#"},{"name":"type","type":"auth.SentCodeType"},{"name":"phone_code_hash","type":"string"},{"name":"next_type","type":"flags.1?auth.CodeType"},{"name":"timeout","type":"flags.2?int"}],"type":"auth.SentCode"},{"id":"-855308010","predicate":"auth.authorization","params":[{"name":"flags","type":"#"},{"name":"tmp_sessions","type":"flags.0?int"},{"name":"user","type":"User"}],"type":"auth.Authorization"},{"id":"-543777747","predicate":"auth.exportedAuthorization","params":[{"name":"id","type":"int"},{"name":"bytes","type":"bytes"}],"type":"auth.ExportedAuthorization"},{"id":"-1195615476","predicate":"inputNotifyPeer","params":[{"name":"peer","type":"InputPeer"}],"type":"InputNotifyPeer"},{"id":"423314455","predicate":"inputNotifyUsers","params":[],"type":"InputNotifyPeer"},{"id":"1251338318","predicate":"inputNotifyChats","params":[],"type":"InputNotifyPeer"},{"id":"-1673717362","predicate":"inputPeerNotifySettings","params":[{"name":"flags","type":"#"},{"name":"show_previews","type":"flags.0?Bool"},{"name":"silent","type":"flags.1?Bool"},{"name":"mute_until","type":"flags.2?int"},{"name":"sound","type":"flags.3?string"}],"type":"InputPeerNotifySettings"},{"id":"-1353671392","predicate":"peerNotifySettings","params":[{"name":"flags","type":"#"},{"name":"show_previews","type":"flags.0?Bool"},{"name":"silent","type":"flags.1?Bool"},{"name":"mute_until","type":"flags.2?int"},{"name":"sound","type":"flags.3?string"}],"type":"PeerNotifySettings"},{"id":"-2122045747","predicate":"peerSettings","params":[{"name":"flags","type":"#"},{"name":"report_spam","type":"flags.0?true"},{"name":"add_contact","type":"flags.1?true"},{"name":"block_contact","type":"flags.2?true"},{"name":"share_contact","type":"flags.3?true"},{"name":"need_contacts_exception","type":"flags.4?true"},{"name":"report_geo","type":"flags.5?true"}],"type":"PeerSettings"},{"id":"-1539849235","predicate":"wallPaper","params":[{"name":"id","type":"long"},{"name":"flags","type":"#"},{"name":"creator","type":"flags.0?true"},{"name":"default","type":"flags.1?true"},{"name":"pattern","type":"flags.3?true"},{"name":"dark","type":"flags.4?true"},{"name":"access_hash","type":"long"},{"name":"slug","type":"string"},{"name":"document","type":"Document"},{"name":"settings","type":"flags.2?WallPaperSettings"}],"type":"WallPaper"},{"id":"1490799288","predicate":"inputReportReasonSpam","params":[],"type":"ReportReason"},{"id":"505595789","predicate":"inputReportReasonViolence","params":[],"type":"ReportReason"},{"id":"777640226","predicate":"inputReportReasonPornography","params":[],"type":"ReportReason"},{"id":"-1376497949","predicate":"inputReportReasonChildAbuse","params":[],"type":"ReportReason"},{"id":"-512463606","predicate":"inputReportReasonOther","params":[{"name":"text","type":"string"}],"type":"ReportReason"},{"id":"-302941166","predicate":"userFull","params":[{"name":"flags","type":"#"},{"name":"blocked","type":"flags.0?true"},{"name":"phone_calls_available","type":"flags.4?true"},{"name":"phone_calls_private","type":"flags.5?true"},{"name":"can_pin_message","type":"flags.7?true"},{"name":"has_scheduled","type":"flags.12?true"},{"name":"user","type":"User"},{"name":"about","type":"flags.1?string"},{"name":"settings","type":"PeerSettings"},{"name":"profile_photo","type":"flags.2?Photo"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"bot_info","type":"flags.3?BotInfo"},{"name":"pinned_msg_id","type":"flags.6?int"},{"name":"common_chats_count","type":"int"},{"name":"folder_id","type":"flags.11?int"}],"type":"UserFull"},{"id":"-116274796","predicate":"contact","params":[{"name":"user_id","type":"int"},{"name":"mutual","type":"Bool"}],"type":"Contact"},{"id":"-805141448","predicate":"importedContact","params":[{"name":"user_id","type":"int"},{"name":"client_id","type":"long"}],"type":"ImportedContact"},{"id":"1444661369","predicate":"contactBlocked","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"}],"type":"ContactBlocked"},{"id":"-748155807","predicate":"contactStatus","params":[{"name":"user_id","type":"int"},{"name":"status","type":"UserStatus"}],"type":"ContactStatus"},{"id":"-1219778094","predicate":"contacts.contactsNotModified","params":[],"type":"contacts.Contacts"},{"id":"-353862078","predicate":"contacts.contacts","params":[{"name":"contacts","type":"Vector"},{"name":"saved_count","type":"int"},{"name":"users","type":"Vector"}],"type":"contacts.Contacts"},{"id":"2010127419","predicate":"contacts.importedContacts","params":[{"name":"imported","type":"Vector"},{"name":"popular_invites","type":"Vector"},{"name":"retry_contacts","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.ImportedContacts"},{"id":"471043349","predicate":"contacts.blocked","params":[{"name":"blocked","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Blocked"},{"id":"-1878523231","predicate":"contacts.blockedSlice","params":[{"name":"count","type":"int"},{"name":"blocked","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Blocked"},{"id":"364538944","predicate":"messages.dialogs","params":[{"name":"dialogs","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Dialogs"},{"id":"1910543603","predicate":"messages.dialogsSlice","params":[{"name":"count","type":"int"},{"name":"dialogs","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Dialogs"},{"id":"-1938715001","predicate":"messages.messages","params":[{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Messages"},{"id":"-923939298","predicate":"messages.messagesSlice","params":[{"name":"flags","type":"#"},{"name":"inexact","type":"flags.1?true"},{"name":"count","type":"int"},{"name":"next_rate","type":"flags.0?int"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Messages"},{"id":"1694474197","predicate":"messages.chats","params":[{"name":"chats","type":"Vector"}],"type":"messages.Chats"},{"id":"-438840932","predicate":"messages.chatFull","params":[{"name":"full_chat","type":"ChatFull"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.ChatFull"},{"id":"-1269012015","predicate":"messages.affectedHistory","params":[{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"offset","type":"int"}],"type":"messages.AffectedHistory"},{"id":"1474492012","predicate":"inputMessagesFilterEmpty","params":[],"type":"MessagesFilter"},{"id":"-1777752804","predicate":"inputMessagesFilterPhotos","params":[],"type":"MessagesFilter"},{"id":"-1614803355","predicate":"inputMessagesFilterVideo","params":[],"type":"MessagesFilter"},{"id":"1458172132","predicate":"inputMessagesFilterPhotoVideo","params":[],"type":"MessagesFilter"},{"id":"-1629621880","predicate":"inputMessagesFilterDocument","params":[],"type":"MessagesFilter"},{"id":"2129714567","predicate":"inputMessagesFilterUrl","params":[],"type":"MessagesFilter"},{"id":"-3644025","predicate":"inputMessagesFilterGif","params":[],"type":"MessagesFilter"},{"id":"522914557","predicate":"updateNewMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"1318109142","predicate":"updateMessageID","params":[{"name":"id","type":"int"},{"name":"random_id","type":"long"}],"type":"Update"},{"id":"-1576161051","predicate":"updateDeleteMessages","params":[{"name":"messages","type":"Vector"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"1548249383","predicate":"updateUserTyping","params":[{"name":"user_id","type":"int"},{"name":"action","type":"SendMessageAction"}],"type":"Update"},{"id":"-1704596961","predicate":"updateChatUserTyping","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"action","type":"SendMessageAction"}],"type":"Update"},{"id":"125178264","predicate":"updateChatParticipants","params":[{"name":"participants","type":"ChatParticipants"}],"type":"Update"},{"id":"469489699","predicate":"updateUserStatus","params":[{"name":"user_id","type":"int"},{"name":"status","type":"UserStatus"}],"type":"Update"},{"id":"-1489818765","predicate":"updateUserName","params":[{"name":"user_id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"}],"type":"Update"},{"id":"-1791935732","predicate":"updateUserPhoto","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"},{"name":"photo","type":"UserProfilePhoto"},{"name":"previous","type":"Bool"}],"type":"Update"},{"id":"-1519637954","predicate":"updates.state","params":[{"name":"pts","type":"int"},{"name":"qts","type":"int"},{"name":"date","type":"int"},{"name":"seq","type":"int"},{"name":"unread_count","type":"int"}],"type":"updates.State"},{"id":"1567990072","predicate":"updates.differenceEmpty","params":[{"name":"date","type":"int"},{"name":"seq","type":"int"}],"type":"updates.Difference"},{"id":"16030880","predicate":"updates.difference","params":[{"name":"new_messages","type":"Vector"},{"name":"new_encrypted_messages","type":"Vector"},{"name":"other_updates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"state","type":"updates.State"}],"type":"updates.Difference"},{"id":"-1459938943","predicate":"updates.differenceSlice","params":[{"name":"new_messages","type":"Vector"},{"name":"new_encrypted_messages","type":"Vector"},{"name":"other_updates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"intermediate_state","type":"updates.State"}],"type":"updates.Difference"},{"id":"-484987010","predicate":"updatesTooLong","params":[],"type":"Updates"},{"id":"-1857044719","predicate":"updateShortMessage","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"mentioned","type":"flags.4?true"},{"name":"media_unread","type":"flags.5?true"},{"name":"silent","type":"flags.13?true"},{"name":"id","type":"int"},{"name":"user_id","type":"int"},{"name":"message","type":"string"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"date","type":"int"},{"name":"fwd_from","type":"flags.2?MessageFwdHeader"},{"name":"via_bot_id","type":"flags.11?int"},{"name":"reply_to_msg_id","type":"flags.3?int"},{"name":"entities","type":"flags.7?Vector"}],"type":"Updates"},{"id":"377562760","predicate":"updateShortChatMessage","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"mentioned","type":"flags.4?true"},{"name":"media_unread","type":"flags.5?true"},{"name":"silent","type":"flags.13?true"},{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"chat_id","type":"int"},{"name":"message","type":"string"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"date","type":"int"},{"name":"fwd_from","type":"flags.2?MessageFwdHeader"},{"name":"via_bot_id","type":"flags.11?int"},{"name":"reply_to_msg_id","type":"flags.3?int"},{"name":"entities","type":"flags.7?Vector"}],"type":"Updates"},{"id":"2027216577","predicate":"updateShort","params":[{"name":"update","type":"Update"},{"name":"date","type":"int"}],"type":"Updates"},{"id":"1918567619","predicate":"updatesCombined","params":[{"name":"updates","type":"Vector"},{"name":"users","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"date","type":"int"},{"name":"seq_start","type":"int"},{"name":"seq","type":"int"}],"type":"Updates"},{"id":"1957577280","predicate":"updates","params":[{"name":"updates","type":"Vector"},{"name":"users","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"date","type":"int"},{"name":"seq","type":"int"}],"type":"Updates"},{"id":"-1916114267","predicate":"photos.photos","params":[{"name":"photos","type":"Vector"},{"name":"users","type":"Vector"}],"type":"photos.Photos"},{"id":"352657236","predicate":"photos.photosSlice","params":[{"name":"count","type":"int"},{"name":"photos","type":"Vector"},{"name":"users","type":"Vector"}],"type":"photos.Photos"},{"id":"539045032","predicate":"photos.photo","params":[{"name":"photo","type":"Photo"},{"name":"users","type":"Vector"}],"type":"photos.Photo"},{"id":"157948117","predicate":"upload.file","params":[{"name":"type","type":"storage.FileType"},{"name":"mtime","type":"int"},{"name":"bytes","type":"bytes"}],"type":"upload.File"},{"id":"414687501","predicate":"dcOption","params":[{"name":"flags","type":"#"},{"name":"ipv6","type":"flags.0?true"},{"name":"media_only","type":"flags.1?true"},{"name":"tcpo_only","type":"flags.2?true"},{"name":"cdn","type":"flags.3?true"},{"name":"static","type":"flags.4?true"},{"name":"id","type":"int"},{"name":"ip_address","type":"string"},{"name":"port","type":"int"},{"name":"secret","type":"flags.10?bytes"}],"type":"DcOption"},{"id":"856375399","predicate":"config","params":[{"name":"flags","type":"#"},{"name":"phonecalls_enabled","type":"flags.1?true"},{"name":"default_p2p_contacts","type":"flags.3?true"},{"name":"preload_featured_stickers","type":"flags.4?true"},{"name":"ignore_phone_entities","type":"flags.5?true"},{"name":"revoke_pm_inbox","type":"flags.6?true"},{"name":"blocked_mode","type":"flags.8?true"},{"name":"pfs_enabled","type":"flags.13?true"},{"name":"date","type":"int"},{"name":"expires","type":"int"},{"name":"test_mode","type":"Bool"},{"name":"this_dc","type":"int"},{"name":"dc_options","type":"Vector"},{"name":"dc_txt_domain_name","type":"string"},{"name":"chat_size_max","type":"int"},{"name":"megagroup_size_max","type":"int"},{"name":"forwarded_count_max","type":"int"},{"name":"online_update_period_ms","type":"int"},{"name":"offline_blur_timeout_ms","type":"int"},{"name":"offline_idle_timeout_ms","type":"int"},{"name":"online_cloud_timeout_ms","type":"int"},{"name":"notify_cloud_delay_ms","type":"int"},{"name":"notify_default_delay_ms","type":"int"},{"name":"push_chat_period_ms","type":"int"},{"name":"push_chat_limit","type":"int"},{"name":"saved_gifs_limit","type":"int"},{"name":"edit_time_limit","type":"int"},{"name":"revoke_time_limit","type":"int"},{"name":"revoke_pm_time_limit","type":"int"},{"name":"rating_e_decay","type":"int"},{"name":"stickers_recent_limit","type":"int"},{"name":"stickers_faved_limit","type":"int"},{"name":"channels_read_media_period","type":"int"},{"name":"tmp_sessions","type":"flags.0?int"},{"name":"pinned_dialogs_count_max","type":"int"},{"name":"pinned_infolder_count_max","type":"int"},{"name":"call_receive_timeout_ms","type":"int"},{"name":"call_ring_timeout_ms","type":"int"},{"name":"call_connect_timeout_ms","type":"int"},{"name":"call_packet_timeout_ms","type":"int"},{"name":"me_url_prefix","type":"string"},{"name":"autoupdate_url_prefix","type":"flags.7?string"},{"name":"gif_search_username","type":"flags.9?string"},{"name":"venue_search_username","type":"flags.10?string"},{"name":"img_search_username","type":"flags.11?string"},{"name":"static_maps_provider","type":"flags.12?string"},{"name":"caption_length_max","type":"int"},{"name":"message_length_max","type":"int"},{"name":"webfile_dc_id","type":"int"},{"name":"suggested_lang_code","type":"flags.2?string"},{"name":"lang_pack_version","type":"flags.2?int"},{"name":"base_lang_pack_version","type":"flags.2?int"}],"type":"Config"},{"id":"-1910892683","predicate":"nearestDc","params":[{"name":"country","type":"string"},{"name":"this_dc","type":"int"},{"name":"nearest_dc","type":"int"}],"type":"NearestDc"},{"id":"497489295","predicate":"help.appUpdate","params":[{"name":"flags","type":"#"},{"name":"can_not_skip","type":"flags.0?true"},{"name":"id","type":"int"},{"name":"version","type":"string"},{"name":"text","type":"string"},{"name":"entities","type":"Vector"},{"name":"document","type":"flags.1?Document"},{"name":"url","type":"flags.2?string"}],"type":"help.AppUpdate"},{"id":"-1000708810","predicate":"help.noAppUpdate","params":[],"type":"help.AppUpdate"},{"id":"415997816","predicate":"help.inviteText","params":[{"name":"message","type":"string"}],"type":"help.InviteText"},{"id":"314359194","predicate":"updateNewEncryptedMessage","params":[{"name":"message","type":"EncryptedMessage"},{"name":"qts","type":"int"}],"type":"Update"},{"id":"386986326","predicate":"updateEncryptedChatTyping","params":[{"name":"chat_id","type":"int"}],"type":"Update"},{"id":"-1264392051","predicate":"updateEncryption","params":[{"name":"chat","type":"EncryptedChat"},{"name":"date","type":"int"}],"type":"Update"},{"id":"956179895","predicate":"updateEncryptedMessagesRead","params":[{"name":"chat_id","type":"int"},{"name":"max_date","type":"int"},{"name":"date","type":"int"}],"type":"Update"},{"id":"-1417756512","predicate":"encryptedChatEmpty","params":[{"name":"id","type":"int"}],"type":"EncryptedChat"},{"id":"1006044124","predicate":"encryptedChatWaiting","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"}],"type":"EncryptedChat"},{"id":"-931638658","predicate":"encryptedChatRequested","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a","type":"bytes"}],"type":"EncryptedChat"},{"id":"-94974410","predicate":"encryptedChat","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a_or_b","type":"bytes"},{"name":"key_fingerprint","type":"long"}],"type":"EncryptedChat"},{"id":"332848423","predicate":"encryptedChatDiscarded","params":[{"name":"id","type":"int"}],"type":"EncryptedChat"},{"id":"-247351839","predicate":"inputEncryptedChat","params":[{"name":"chat_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputEncryptedChat"},{"id":"-1038136962","predicate":"encryptedFileEmpty","params":[],"type":"EncryptedFile"},{"id":"1248893260","predicate":"encryptedFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"size","type":"int"},{"name":"dc_id","type":"int"},{"name":"key_fingerprint","type":"int"}],"type":"EncryptedFile"},{"id":"406307684","predicate":"inputEncryptedFileEmpty","params":[],"type":"InputEncryptedFile"},{"id":"1690108678","predicate":"inputEncryptedFileUploaded","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"md5_checksum","type":"string"},{"name":"key_fingerprint","type":"int"}],"type":"InputEncryptedFile"},{"id":"1511503333","predicate":"inputEncryptedFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputEncryptedFile"},{"id":"-182231723","predicate":"inputEncryptedFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"-317144808","predicate":"encryptedMessage","params":[{"name":"random_id","type":"long"},{"name":"chat_id","type":"int"},{"name":"date","type":"int"},{"name":"bytes","type":"bytes"},{"name":"file","type":"EncryptedFile"}],"type":"EncryptedMessage"},{"id":"594758406","predicate":"encryptedMessageService","params":[{"name":"random_id","type":"long"},{"name":"chat_id","type":"int"},{"name":"date","type":"int"},{"name":"bytes","type":"bytes"}],"type":"EncryptedMessage"},{"id":"-1058912715","predicate":"messages.dhConfigNotModified","params":[{"name":"random","type":"bytes"}],"type":"messages.DhConfig"},{"id":"740433629","predicate":"messages.dhConfig","params":[{"name":"g","type":"int"},{"name":"p","type":"bytes"},{"name":"version","type":"int"},{"name":"random","type":"bytes"}],"type":"messages.DhConfig"},{"id":"1443858741","predicate":"messages.sentEncryptedMessage","params":[{"name":"date","type":"int"}],"type":"messages.SentEncryptedMessage"},{"id":"-1802240206","predicate":"messages.sentEncryptedFile","params":[{"name":"date","type":"int"},{"name":"file","type":"EncryptedFile"}],"type":"messages.SentEncryptedMessage"},{"id":"-95482955","predicate":"inputFileBig","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"name","type":"string"}],"type":"InputFile"},{"id":"767652808","predicate":"inputEncryptedFileBigUploaded","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"key_fingerprint","type":"int"}],"type":"InputEncryptedFile"},{"id":"-364179876","predicate":"updateChatParticipantAdd","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"},{"name":"version","type":"int"}],"type":"Update"},{"id":"1851755554","predicate":"updateChatParticipantDelete","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"version","type":"int"}],"type":"Update"},{"id":"-1906403213","predicate":"updateDcOptions","params":[{"name":"dc_options","type":"Vector"}],"type":"Update"},{"id":"1530447553","predicate":"inputMediaUploadedDocument","params":[{"name":"flags","type":"#"},{"name":"nosound_video","type":"flags.3?true"},{"name":"file","type":"InputFile"},{"name":"thumb","type":"flags.2?InputFile"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"},{"name":"stickers","type":"flags.0?Vector"},{"name":"ttl_seconds","type":"flags.1?int"}],"type":"InputMedia"},{"id":"598418386","predicate":"inputMediaDocument","params":[{"name":"flags","type":"#"},{"name":"id","type":"InputDocument"},{"name":"ttl_seconds","type":"flags.0?int"}],"type":"InputMedia"},{"id":"-1666158377","predicate":"messageMediaDocument","params":[{"name":"flags","type":"#"},{"name":"document","type":"flags.0?Document"},{"name":"ttl_seconds","type":"flags.2?int"}],"type":"MessageMedia"},{"id":"1928391342","predicate":"inputDocumentEmpty","params":[],"type":"InputDocument"},{"id":"448771445","predicate":"inputDocument","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"}],"type":"InputDocument"},{"id":"-1160743548","predicate":"inputDocumentFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"thumb_size","type":"string"}],"type":"InputFileLocation"},{"id":"922273905","predicate":"documentEmpty","params":[{"name":"id","type":"long"}],"type":"Document"},{"id":"-1683841855","predicate":"document","params":[{"name":"flags","type":"#"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"date","type":"int"},{"name":"mime_type","type":"string"},{"name":"size","type":"int"},{"name":"thumbs","type":"flags.0?Vector"},{"name":"dc_id","type":"int"},{"name":"attributes","type":"Vector"}],"type":"Document"},{"id":"398898678","predicate":"help.support","params":[{"name":"phone_number","type":"string"},{"name":"user","type":"User"}],"type":"help.Support"},{"id":"-1613493288","predicate":"notifyPeer","params":[{"name":"peer","type":"Peer"}],"type":"NotifyPeer"},{"id":"-1261946036","predicate":"notifyUsers","params":[],"type":"NotifyPeer"},{"id":"-1073230141","predicate":"notifyChats","params":[],"type":"NotifyPeer"},{"id":"-2131957734","predicate":"updateUserBlocked","params":[{"name":"user_id","type":"int"},{"name":"blocked","type":"Bool"}],"type":"Update"},{"id":"-1094555409","predicate":"updateNotifySettings","params":[{"name":"peer","type":"NotifyPeer"},{"name":"notify_settings","type":"PeerNotifySettings"}],"type":"Update"},{"id":"381645902","predicate":"sendMessageTypingAction","params":[],"type":"SendMessageAction"},{"id":"-44119819","predicate":"sendMessageCancelAction","params":[],"type":"SendMessageAction"},{"id":"-1584933265","predicate":"sendMessageRecordVideoAction","params":[],"type":"SendMessageAction"},{"id":"-378127636","predicate":"sendMessageUploadVideoAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"-718310409","predicate":"sendMessageRecordAudioAction","params":[],"type":"SendMessageAction"},{"id":"-212740181","predicate":"sendMessageUploadAudioAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"-774682074","predicate":"sendMessageUploadPhotoAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"-1441998364","predicate":"sendMessageUploadDocumentAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"393186209","predicate":"sendMessageGeoLocationAction","params":[],"type":"SendMessageAction"},{"id":"1653390447","predicate":"sendMessageChooseContactAction","params":[],"type":"SendMessageAction"},{"id":"-1290580579","predicate":"contacts.found","params":[{"name":"my_results","type":"Vector"},{"name":"results","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Found"},{"id":"-337352679","predicate":"updateServiceNotification","params":[{"name":"flags","type":"#"},{"name":"popup","type":"flags.0?true"},{"name":"inbox_date","type":"flags.1?int"},{"name":"type","type":"string"},{"name":"message","type":"string"},{"name":"media","type":"MessageMedia"},{"name":"entities","type":"Vector"}],"type":"Update"},{"id":"-496024847","predicate":"userStatusRecently","params":[],"type":"UserStatus"},{"id":"129960444","predicate":"userStatusLastWeek","params":[],"type":"UserStatus"},{"id":"2011940674","predicate":"userStatusLastMonth","params":[],"type":"UserStatus"},{"id":"-298113238","predicate":"updatePrivacy","params":[{"name":"key","type":"PrivacyKey"},{"name":"rules","type":"Vector"}],"type":"Update"},{"id":"1335282456","predicate":"inputPrivacyKeyStatusTimestamp","params":[],"type":"InputPrivacyKey"},{"id":"-1137792208","predicate":"privacyKeyStatusTimestamp","params":[],"type":"PrivacyKey"},{"id":"218751099","predicate":"inputPrivacyValueAllowContacts","params":[],"type":"InputPrivacyRule"},{"id":"407582158","predicate":"inputPrivacyValueAllowAll","params":[],"type":"InputPrivacyRule"},{"id":"320652927","predicate":"inputPrivacyValueAllowUsers","params":[{"name":"users","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"195371015","predicate":"inputPrivacyValueDisallowContacts","params":[],"type":"InputPrivacyRule"},{"id":"-697604407","predicate":"inputPrivacyValueDisallowAll","params":[],"type":"InputPrivacyRule"},{"id":"-1877932953","predicate":"inputPrivacyValueDisallowUsers","params":[{"name":"users","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"-123988","predicate":"privacyValueAllowContacts","params":[],"type":"PrivacyRule"},{"id":"1698855810","predicate":"privacyValueAllowAll","params":[],"type":"PrivacyRule"},{"id":"1297858060","predicate":"privacyValueAllowUsers","params":[{"name":"users","type":"Vector"}],"type":"PrivacyRule"},{"id":"-125240806","predicate":"privacyValueDisallowContacts","params":[],"type":"PrivacyRule"},{"id":"-1955338397","predicate":"privacyValueDisallowAll","params":[],"type":"PrivacyRule"},{"id":"209668535","predicate":"privacyValueDisallowUsers","params":[{"name":"users","type":"Vector"}],"type":"PrivacyRule"},{"id":"1352683077","predicate":"account.privacyRules","params":[{"name":"rules","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"account.PrivacyRules"},{"id":"-1194283041","predicate":"accountDaysTTL","params":[{"name":"days","type":"int"}],"type":"AccountDaysTTL"},{"id":"314130811","predicate":"updateUserPhone","params":[{"name":"user_id","type":"int"},{"name":"phone","type":"string"}],"type":"Update"},{"id":"1815593308","predicate":"documentAttributeImageSize","params":[{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"DocumentAttribute"},{"id":"297109817","predicate":"documentAttributeAnimated","params":[],"type":"DocumentAttribute"},{"id":"1662637586","predicate":"documentAttributeSticker","params":[{"name":"flags","type":"#"},{"name":"mask","type":"flags.1?true"},{"name":"alt","type":"string"},{"name":"stickerset","type":"InputStickerSet"},{"name":"mask_coords","type":"flags.0?MaskCoords"}],"type":"DocumentAttribute"},{"id":"250621158","predicate":"documentAttributeVideo","params":[{"name":"flags","type":"#"},{"name":"round_message","type":"flags.0?true"},{"name":"supports_streaming","type":"flags.1?true"},{"name":"duration","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"DocumentAttribute"},{"id":"-1739392570","predicate":"documentAttributeAudio","params":[{"name":"flags","type":"#"},{"name":"voice","type":"flags.10?true"},{"name":"duration","type":"int"},{"name":"title","type":"flags.0?string"},{"name":"performer","type":"flags.1?string"},{"name":"waveform","type":"flags.2?bytes"}],"type":"DocumentAttribute"},{"id":"358154344","predicate":"documentAttributeFilename","params":[{"name":"file_name","type":"string"}],"type":"DocumentAttribute"},{"id":"-244016606","predicate":"messages.stickersNotModified","params":[],"type":"messages.Stickers"},{"id":"-463889475","predicate":"messages.stickers","params":[{"name":"hash","type":"int"},{"name":"stickers","type":"Vector"}],"type":"messages.Stickers"},{"id":"313694676","predicate":"stickerPack","params":[{"name":"emoticon","type":"string"},{"name":"documents","type":"Vector"}],"type":"StickerPack"},{"id":"-395967805","predicate":"messages.allStickersNotModified","params":[],"type":"messages.AllStickers"},{"id":"-302170017","predicate":"messages.allStickers","params":[{"name":"hash","type":"int"},{"name":"sets","type":"Vector"}],"type":"messages.AllStickers"},{"id":"-1667805217","predicate":"updateReadHistoryInbox","params":[{"name":"flags","type":"#"},{"name":"folder_id","type":"flags.0?int"},{"name":"peer","type":"Peer"},{"name":"max_id","type":"int"},{"name":"still_unread_count","type":"int"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"791617983","predicate":"updateReadHistoryOutbox","params":[{"name":"peer","type":"Peer"},{"name":"max_id","type":"int"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-2066640507","predicate":"messages.affectedMessages","params":[{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"messages.AffectedMessages"},{"id":"2139689491","predicate":"updateWebPage","params":[{"name":"webpage","type":"WebPage"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-350980120","predicate":"webPageEmpty","params":[{"name":"id","type":"long"}],"type":"WebPage"},{"id":"-981018084","predicate":"webPagePending","params":[{"name":"id","type":"long"},{"name":"date","type":"int"}],"type":"WebPage"},{"id":"-392411726","predicate":"webPage","params":[{"name":"flags","type":"#"},{"name":"id","type":"long"},{"name":"url","type":"string"},{"name":"display_url","type":"string"},{"name":"hash","type":"int"},{"name":"type","type":"flags.0?string"},{"name":"site_name","type":"flags.1?string"},{"name":"title","type":"flags.2?string"},{"name":"description","type":"flags.3?string"},{"name":"photo","type":"flags.4?Photo"},{"name":"embed_url","type":"flags.5?string"},{"name":"embed_type","type":"flags.5?string"},{"name":"embed_width","type":"flags.6?int"},{"name":"embed_height","type":"flags.6?int"},{"name":"duration","type":"flags.7?int"},{"name":"author","type":"flags.8?string"},{"name":"document","type":"flags.9?Document"},{"name":"cached_page","type":"flags.10?Page"},{"name":"attributes","type":"flags.12?Vector"}],"type":"WebPage"},{"id":"-1557277184","predicate":"messageMediaWebPage","params":[{"name":"webpage","type":"WebPage"}],"type":"MessageMedia"},{"id":"-1392388579","predicate":"authorization","params":[{"name":"flags","type":"#"},{"name":"current","type":"flags.0?true"},{"name":"official_app","type":"flags.1?true"},{"name":"password_pending","type":"flags.2?true"},{"name":"hash","type":"long"},{"name":"device_model","type":"string"},{"name":"platform","type":"string"},{"name":"system_version","type":"string"},{"name":"api_id","type":"int"},{"name":"app_name","type":"string"},{"name":"app_version","type":"string"},{"name":"date_created","type":"int"},{"name":"date_active","type":"int"},{"name":"ip","type":"string"},{"name":"country","type":"string"},{"name":"region","type":"string"}],"type":"Authorization"},{"id":"307276766","predicate":"account.authorizations","params":[{"name":"authorizations","type":"Vector"}],"type":"account.Authorizations"},{"id":"-1390001672","predicate":"account.password","params":[{"name":"flags","type":"#"},{"name":"has_recovery","type":"flags.0?true"},{"name":"has_secure_values","type":"flags.1?true"},{"name":"has_password","type":"flags.2?true"},{"name":"current_algo","type":"flags.2?PasswordKdfAlgo"},{"name":"srp_B","type":"flags.2?bytes"},{"name":"srp_id","type":"flags.2?long"},{"name":"hint","type":"flags.3?string"},{"name":"email_unconfirmed_pattern","type":"flags.4?string"},{"name":"new_algo","type":"PasswordKdfAlgo"},{"name":"new_secure_algo","type":"SecurePasswordKdfAlgo"},{"name":"secure_random","type":"bytes"}],"type":"account.Password"},{"id":"-1705233435","predicate":"account.passwordSettings","params":[{"name":"flags","type":"#"},{"name":"email","type":"flags.0?string"},{"name":"secure_settings","type":"flags.1?SecureSecretSettings"}],"type":"account.PasswordSettings"},{"id":"-1036572727","predicate":"account.passwordInputSettings","params":[{"name":"flags","type":"#"},{"name":"new_algo","type":"flags.0?PasswordKdfAlgo"},{"name":"new_password_hash","type":"flags.0?bytes"},{"name":"hint","type":"flags.0?string"},{"name":"email","type":"flags.1?string"},{"name":"new_secure_settings","type":"flags.2?SecureSecretSettings"}],"type":"account.PasswordInputSettings"},{"id":"326715557","predicate":"auth.passwordRecovery","params":[{"name":"email_pattern","type":"string"}],"type":"auth.PasswordRecovery"},{"id":"-1052959727","predicate":"inputMediaVenue","params":[{"name":"geo_point","type":"InputGeoPoint"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"provider","type":"string"},{"name":"venue_id","type":"string"},{"name":"venue_type","type":"string"}],"type":"InputMedia"},{"id":"784356159","predicate":"messageMediaVenue","params":[{"name":"geo","type":"GeoPoint"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"provider","type":"string"},{"name":"venue_id","type":"string"},{"name":"venue_type","type":"string"}],"type":"MessageMedia"},{"id":"-1551583367","predicate":"receivedNotifyMessage","params":[{"name":"id","type":"int"},{"name":"flags","type":"int"}],"type":"ReceivedNotifyMessage"},{"id":"1776236393","predicate":"chatInviteEmpty","params":[],"type":"ExportedChatInvite"},{"id":"-64092740","predicate":"chatInviteExported","params":[{"name":"link","type":"string"}],"type":"ExportedChatInvite"},{"id":"1516793212","predicate":"chatInviteAlready","params":[{"name":"chat","type":"Chat"}],"type":"ChatInvite"},{"id":"-540871282","predicate":"chatInvite","params":[{"name":"flags","type":"#"},{"name":"channel","type":"flags.0?true"},{"name":"broadcast","type":"flags.1?true"},{"name":"public","type":"flags.2?true"},{"name":"megagroup","type":"flags.3?true"},{"name":"title","type":"string"},{"name":"photo","type":"Photo"},{"name":"participants_count","type":"int"},{"name":"participants","type":"flags.4?Vector"}],"type":"ChatInvite"},{"id":"-123931160","predicate":"messageActionChatJoinedByLink","params":[{"name":"inviter_id","type":"int"}],"type":"MessageAction"},{"id":"1757493555","predicate":"updateReadMessagesContents","params":[{"name":"messages","type":"Vector"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-4838507","predicate":"inputStickerSetEmpty","params":[],"type":"InputStickerSet"},{"id":"-1645763991","predicate":"inputStickerSetID","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputStickerSet"},{"id":"-2044933984","predicate":"inputStickerSetShortName","params":[{"name":"short_name","type":"string"}],"type":"InputStickerSet"},{"id":"-290164953","predicate":"stickerSet","params":[{"name":"flags","type":"#"},{"name":"archived","type":"flags.1?true"},{"name":"official","type":"flags.2?true"},{"name":"masks","type":"flags.3?true"},{"name":"animated","type":"flags.5?true"},{"name":"installed_date","type":"flags.0?int"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"title","type":"string"},{"name":"short_name","type":"string"},{"name":"thumb","type":"flags.4?PhotoSize"},{"name":"thumb_dc_id","type":"flags.4?int"},{"name":"count","type":"int"},{"name":"hash","type":"int"}],"type":"StickerSet"},{"id":"-1240849242","predicate":"messages.stickerSet","params":[{"name":"set","type":"StickerSet"},{"name":"packs","type":"Vector"},{"name":"documents","type":"Vector"}],"type":"messages.StickerSet"},{"id":"-1820043071","predicate":"user","params":[{"name":"flags","type":"#"},{"name":"self","type":"flags.10?true"},{"name":"contact","type":"flags.11?true"},{"name":"mutual_contact","type":"flags.12?true"},{"name":"deleted","type":"flags.13?true"},{"name":"bot","type":"flags.14?true"},{"name":"bot_chat_history","type":"flags.15?true"},{"name":"bot_nochats","type":"flags.16?true"},{"name":"verified","type":"flags.17?true"},{"name":"restricted","type":"flags.18?true"},{"name":"min","type":"flags.20?true"},{"name":"bot_inline_geo","type":"flags.21?true"},{"name":"support","type":"flags.23?true"},{"name":"scam","type":"flags.24?true"},{"name":"id","type":"int"},{"name":"access_hash","type":"flags.0?long"},{"name":"first_name","type":"flags.1?string"},{"name":"last_name","type":"flags.2?string"},{"name":"username","type":"flags.3?string"},{"name":"phone","type":"flags.4?string"},{"name":"photo","type":"flags.5?UserProfilePhoto"},{"name":"status","type":"flags.6?UserStatus"},{"name":"bot_info_version","type":"flags.14?int"},{"name":"restriction_reason","type":"flags.18?Vector"},{"name":"bot_inline_placeholder","type":"flags.19?string"},{"name":"lang_code","type":"flags.22?string"}],"type":"User"},{"id":"-1032140601","predicate":"botCommand","params":[{"name":"command","type":"string"},{"name":"description","type":"string"}],"type":"BotCommand"},{"id":"-1729618630","predicate":"botInfo","params":[{"name":"user_id","type":"int"},{"name":"description","type":"string"},{"name":"commands","type":"Vector"}],"type":"BotInfo"},{"id":"-1560655744","predicate":"keyboardButton","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"2002815875","predicate":"keyboardButtonRow","params":[{"name":"buttons","type":"Vector"}],"type":"KeyboardButtonRow"},{"id":"-1606526075","predicate":"replyKeyboardHide","params":[{"name":"flags","type":"#"},{"name":"selective","type":"flags.2?true"}],"type":"ReplyMarkup"},{"id":"-200242528","predicate":"replyKeyboardForceReply","params":[{"name":"flags","type":"#"},{"name":"single_use","type":"flags.1?true"},{"name":"selective","type":"flags.2?true"}],"type":"ReplyMarkup"},{"id":"889353612","predicate":"replyKeyboardMarkup","params":[{"name":"flags","type":"#"},{"name":"resize","type":"flags.0?true"},{"name":"single_use","type":"flags.1?true"},{"name":"selective","type":"flags.2?true"},{"name":"rows","type":"Vector"}],"type":"ReplyMarkup"},{"id":"2072935910","predicate":"inputPeerUser","params":[{"name":"user_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputPeer"},{"id":"-668391402","predicate":"inputUser","params":[{"name":"user_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputUser"},{"id":"-1148011883","predicate":"messageEntityUnknown","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-100378723","predicate":"messageEntityMention","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1868782349","predicate":"messageEntityHashtag","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1827637959","predicate":"messageEntityBotCommand","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1859134776","predicate":"messageEntityUrl","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1692693954","predicate":"messageEntityEmail","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-1117713463","predicate":"messageEntityBold","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-2106619040","predicate":"messageEntityItalic","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"681706865","predicate":"messageEntityCode","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1938967520","predicate":"messageEntityPre","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"},{"name":"language","type":"string"}],"type":"MessageEntity"},{"id":"1990644519","predicate":"messageEntityTextUrl","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"},{"name":"url","type":"string"}],"type":"MessageEntity"},{"id":"301019932","predicate":"updateShortSentMessage","params":[{"name":"flags","type":"#"},{"name":"out","type":"flags.1?true"},{"name":"id","type":"int"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"date","type":"int"},{"name":"media","type":"flags.9?MessageMedia"},{"name":"entities","type":"flags.7?Vector"}],"type":"Updates"},{"id":"-292807034","predicate":"inputChannelEmpty","params":[],"type":"InputChannel"},{"id":"-1343524562","predicate":"inputChannel","params":[{"name":"channel_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputChannel"},{"id":"-1109531342","predicate":"peerChannel","params":[{"name":"channel_id","type":"int"}],"type":"Peer"},{"id":"548253432","predicate":"inputPeerChannel","params":[{"name":"channel_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputPeer"},{"id":"-753232354","predicate":"channel","params":[{"name":"flags","type":"#"},{"name":"creator","type":"flags.0?true"},{"name":"left","type":"flags.2?true"},{"name":"broadcast","type":"flags.5?true"},{"name":"verified","type":"flags.7?true"},{"name":"megagroup","type":"flags.8?true"},{"name":"restricted","type":"flags.9?true"},{"name":"signatures","type":"flags.11?true"},{"name":"min","type":"flags.12?true"},{"name":"scam","type":"flags.19?true"},{"name":"has_link","type":"flags.20?true"},{"name":"has_geo","type":"flags.21?true"},{"name":"slowmode_enabled","type":"flags.22?true"},{"name":"id","type":"int"},{"name":"access_hash","type":"flags.13?long"},{"name":"title","type":"string"},{"name":"username","type":"flags.6?string"},{"name":"photo","type":"ChatPhoto"},{"name":"date","type":"int"},{"name":"version","type":"int"},{"name":"restriction_reason","type":"flags.9?Vector"},{"name":"admin_rights","type":"flags.14?ChatAdminRights"},{"name":"banned_rights","type":"flags.15?ChatBannedRights"},{"name":"default_banned_rights","type":"flags.18?ChatBannedRights"},{"name":"participants_count","type":"flags.17?int"}],"type":"Chat"},{"id":"681420594","predicate":"channelForbidden","params":[{"name":"flags","type":"#"},{"name":"broadcast","type":"flags.5?true"},{"name":"megagroup","type":"flags.8?true"},{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"title","type":"string"},{"name":"until_date","type":"flags.16?int"}],"type":"Chat"},{"id":"2131196633","predicate":"contacts.resolvedPeer","params":[{"name":"peer","type":"Peer"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.ResolvedPeer"},{"id":"763976820","predicate":"channelFull","params":[{"name":"flags","type":"#"},{"name":"can_view_participants","type":"flags.3?true"},{"name":"can_set_username","type":"flags.6?true"},{"name":"can_set_stickers","type":"flags.7?true"},{"name":"hidden_prehistory","type":"flags.10?true"},{"name":"can_view_stats","type":"flags.12?true"},{"name":"can_set_location","type":"flags.16?true"},{"name":"has_scheduled","type":"flags.19?true"},{"name":"id","type":"int"},{"name":"about","type":"string"},{"name":"participants_count","type":"flags.0?int"},{"name":"admins_count","type":"flags.1?int"},{"name":"kicked_count","type":"flags.2?int"},{"name":"banned_count","type":"flags.2?int"},{"name":"online_count","type":"flags.13?int"},{"name":"read_inbox_max_id","type":"int"},{"name":"read_outbox_max_id","type":"int"},{"name":"unread_count","type":"int"},{"name":"chat_photo","type":"Photo"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"exported_invite","type":"ExportedChatInvite"},{"name":"bot_info","type":"Vector"},{"name":"migrated_from_chat_id","type":"flags.4?int"},{"name":"migrated_from_max_id","type":"flags.4?int"},{"name":"pinned_msg_id","type":"flags.5?int"},{"name":"stickerset","type":"flags.8?StickerSet"},{"name":"available_min_id","type":"flags.9?int"},{"name":"folder_id","type":"flags.11?int"},{"name":"linked_chat_id","type":"flags.14?int"},{"name":"location","type":"flags.15?ChannelLocation"},{"name":"slowmode_seconds","type":"flags.17?int"},{"name":"slowmode_next_send_date","type":"flags.18?int"},{"name":"pts","type":"int"}],"type":"ChatFull"},{"id":"182649427","predicate":"messageRange","params":[{"name":"min_id","type":"int"},{"name":"max_id","type":"int"}],"type":"MessageRange"},{"id":"-1725551049","predicate":"messages.channelMessages","params":[{"name":"flags","type":"#"},{"name":"inexact","type":"flags.1?true"},{"name":"pts","type":"int"},{"name":"count","type":"int"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Messages"},{"id":"-1781355374","predicate":"messageActionChannelCreate","params":[{"name":"title","type":"string"}],"type":"MessageAction"},{"id":"-352032773","predicate":"updateChannelTooLong","params":[{"name":"flags","type":"#"},{"name":"channel_id","type":"int"},{"name":"pts","type":"flags.0?int"}],"type":"Update"},{"id":"-1227598250","predicate":"updateChannel","params":[{"name":"channel_id","type":"int"}],"type":"Update"},{"id":"1656358105","predicate":"updateNewChannelMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"856380452","predicate":"updateReadChannelInbox","params":[{"name":"flags","type":"#"},{"name":"folder_id","type":"flags.0?int"},{"name":"channel_id","type":"int"},{"name":"max_id","type":"int"},{"name":"still_unread_count","type":"int"},{"name":"pts","type":"int"}],"type":"Update"},{"id":"-1015733815","predicate":"updateDeleteChannelMessages","params":[{"name":"channel_id","type":"int"},{"name":"messages","type":"Vector"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-1734268085","predicate":"updateChannelMessageViews","params":[{"name":"channel_id","type":"int"},{"name":"id","type":"int"},{"name":"views","type":"int"}],"type":"Update"},{"id":"1041346555","predicate":"updates.channelDifferenceEmpty","params":[{"name":"flags","type":"#"},{"name":"final","type":"flags.0?true"},{"name":"pts","type":"int"},{"name":"timeout","type":"flags.1?int"}],"type":"updates.ChannelDifference"},{"id":"-1531132162","predicate":"updates.channelDifferenceTooLong","params":[{"name":"flags","type":"#"},{"name":"final","type":"flags.0?true"},{"name":"timeout","type":"flags.1?int"},{"name":"dialog","type":"Dialog"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"updates.ChannelDifference"},{"id":"543450958","predicate":"updates.channelDifference","params":[{"name":"flags","type":"#"},{"name":"final","type":"flags.0?true"},{"name":"pts","type":"int"},{"name":"timeout","type":"flags.1?int"},{"name":"new_messages","type":"Vector"},{"name":"other_updates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"updates.ChannelDifference"},{"id":"-1798033689","predicate":"channelMessagesFilterEmpty","params":[],"type":"ChannelMessagesFilter"},{"id":"-847783593","predicate":"channelMessagesFilter","params":[{"name":"flags","type":"#"},{"name":"exclude_new_messages","type":"flags.1?true"},{"name":"ranges","type":"Vector"}],"type":"ChannelMessagesFilter"},{"id":"367766557","predicate":"channelParticipant","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"}],"type":"ChannelParticipant"},{"id":"-1557620115","predicate":"channelParticipantSelf","params":[{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"}],"type":"ChannelParticipant"},{"id":"-2138237532","predicate":"channelParticipantCreator","params":[{"name":"flags","type":"#"},{"name":"user_id","type":"int"},{"name":"rank","type":"flags.0?string"}],"type":"ChannelParticipant"},{"id":"-566281095","predicate":"channelParticipantsRecent","params":[],"type":"ChannelParticipantsFilter"},{"id":"-1268741783","predicate":"channelParticipantsAdmins","params":[],"type":"ChannelParticipantsFilter"},{"id":"-1548400251","predicate":"channelParticipantsKicked","params":[{"name":"q","type":"string"}],"type":"ChannelParticipantsFilter"},{"id":"-177282392","predicate":"channels.channelParticipants","params":[{"name":"count","type":"int"},{"name":"participants","type":"Vector"},{"name":"users","type":"Vector"}],"type":"channels.ChannelParticipants"},{"id":"-791039645","predicate":"channels.channelParticipant","params":[{"name":"participant","type":"ChannelParticipant"},{"name":"users","type":"Vector"}],"type":"channels.ChannelParticipant"},{"id":"-636267638","predicate":"chatParticipantCreator","params":[{"name":"user_id","type":"int"}],"type":"ChatParticipant"},{"id":"-489233354","predicate":"chatParticipantAdmin","params":[{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"}],"type":"ChatParticipant"},{"id":"-1232070311","predicate":"updateChatParticipantAdmin","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"is_admin","type":"Bool"},{"name":"version","type":"int"}],"type":"Update"},{"id":"1371385889","predicate":"messageActionChatMigrateTo","params":[{"name":"channel_id","type":"int"}],"type":"MessageAction"},{"id":"-1336546578","predicate":"messageActionChannelMigrateFrom","params":[{"name":"title","type":"string"},{"name":"chat_id","type":"int"}],"type":"MessageAction"},{"id":"-1328445861","predicate":"channelParticipantsBots","params":[],"type":"ChannelParticipantsFilter"},{"id":"2013922064","predicate":"help.termsOfService","params":[{"name":"flags","type":"#"},{"name":"popup","type":"flags.0?true"},{"name":"id","type":"DataJSON"},{"name":"text","type":"string"},{"name":"entities","type":"Vector"},{"name":"min_age_confirm","type":"flags.1?int"}],"type":"help.TermsOfService"},{"id":"1753886890","predicate":"updateNewStickerSet","params":[{"name":"stickerset","type":"messages.StickerSet"}],"type":"Update"},{"id":"196268545","predicate":"updateStickerSetsOrder","params":[{"name":"flags","type":"#"},{"name":"masks","type":"flags.0?true"},{"name":"order","type":"Vector"}],"type":"Update"},{"id":"1135492588","predicate":"updateStickerSets","params":[],"type":"Update"},{"id":"372165663","predicate":"foundGif","params":[{"name":"url","type":"string"},{"name":"thumb_url","type":"string"},{"name":"content_url","type":"string"},{"name":"content_type","type":"string"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"FoundGif"},{"id":"-1670052855","predicate":"foundGifCached","params":[{"name":"url","type":"string"},{"name":"photo","type":"Photo"},{"name":"document","type":"Document"}],"type":"FoundGif"},{"id":"1212395773","predicate":"inputMediaGifExternal","params":[{"name":"url","type":"string"},{"name":"q","type":"string"}],"type":"InputMedia"},{"id":"1158290442","predicate":"messages.foundGifs","params":[{"name":"next_offset","type":"int"},{"name":"results","type":"Vector"}],"type":"messages.FoundGifs"},{"id":"-402498398","predicate":"messages.savedGifsNotModified","params":[],"type":"messages.SavedGifs"},{"id":"772213157","predicate":"messages.savedGifs","params":[{"name":"hash","type":"int"},{"name":"gifs","type":"Vector"}],"type":"messages.SavedGifs"},{"id":"-1821035490","predicate":"updateSavedGifs","params":[],"type":"Update"},{"id":"864077702","predicate":"inputBotInlineMessageMediaAuto","params":[{"name":"flags","type":"#"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"1036876423","predicate":"inputBotInlineMessageText","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.0?true"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"-2000710887","predicate":"inputBotInlineResult","params":[{"name":"flags","type":"#"},{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"title","type":"flags.1?string"},{"name":"description","type":"flags.2?string"},{"name":"url","type":"flags.3?string"},{"name":"thumb","type":"flags.4?InputWebDocument"},{"name":"content","type":"flags.5?InputWebDocument"},{"name":"send_message","type":"InputBotInlineMessage"}],"type":"InputBotInlineResult"},{"id":"1984755728","predicate":"botInlineMessageMediaAuto","params":[{"name":"flags","type":"#"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"-1937807902","predicate":"botInlineMessageText","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.0?true"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"295067450","predicate":"botInlineResult","params":[{"name":"flags","type":"#"},{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"title","type":"flags.1?string"},{"name":"description","type":"flags.2?string"},{"name":"url","type":"flags.3?string"},{"name":"thumb","type":"flags.4?WebDocument"},{"name":"content","type":"flags.5?WebDocument"},{"name":"send_message","type":"BotInlineMessage"}],"type":"BotInlineResult"},{"id":"-1803769784","predicate":"messages.botResults","params":[{"name":"flags","type":"#"},{"name":"gallery","type":"flags.0?true"},{"name":"query_id","type":"long"},{"name":"next_offset","type":"flags.1?string"},{"name":"switch_pm","type":"flags.2?InlineBotSwitchPM"},{"name":"results","type":"Vector"},{"name":"cache_time","type":"int"},{"name":"users","type":"Vector"}],"type":"messages.BotResults"},{"id":"1417832080","predicate":"updateBotInlineQuery","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"query","type":"string"},{"name":"geo","type":"flags.0?GeoPoint"},{"name":"offset","type":"string"}],"type":"Update"},{"id":"239663460","predicate":"updateBotInlineSend","params":[{"name":"flags","type":"#"},{"name":"user_id","type":"int"},{"name":"query","type":"string"},{"name":"geo","type":"flags.0?GeoPoint"},{"name":"id","type":"string"},{"name":"msg_id","type":"flags.1?InputBotInlineMessageID"}],"type":"Update"},{"id":"1358283666","predicate":"inputMessagesFilterVoice","params":[],"type":"MessagesFilter"},{"id":"928101534","predicate":"inputMessagesFilterMusic","params":[],"type":"MessagesFilter"},{"id":"-1107622874","predicate":"inputPrivacyKeyChatInvite","params":[],"type":"InputPrivacyKey"},{"id":"1343122938","predicate":"privacyKeyChatInvite","params":[],"type":"PrivacyKey"},{"id":"1571494644","predicate":"exportedMessageLink","params":[{"name":"link","type":"string"},{"name":"html","type":"string"}],"type":"ExportedMessageLink"},{"id":"-332168592","predicate":"messageFwdHeader","params":[{"name":"flags","type":"#"},{"name":"from_id","type":"flags.0?int"},{"name":"from_name","type":"flags.5?string"},{"name":"date","type":"int"},{"name":"channel_id","type":"flags.1?int"},{"name":"channel_post","type":"flags.2?int"},{"name":"post_author","type":"flags.3?string"},{"name":"saved_from_peer","type":"flags.4?Peer"},{"name":"saved_from_msg_id","type":"flags.4?int"}],"type":"MessageFwdHeader"},{"id":"457133559","predicate":"updateEditChannelMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-1738988427","predicate":"updateChannelPinnedMessage","params":[{"name":"channel_id","type":"int"},{"name":"id","type":"int"}],"type":"Update"},{"id":"-1799538451","predicate":"messageActionPinMessage","params":[],"type":"MessageAction"},{"id":"1923290508","predicate":"auth.codeTypeSms","params":[],"type":"auth.CodeType"},{"id":"1948046307","predicate":"auth.codeTypeCall","params":[],"type":"auth.CodeType"},{"id":"577556219","predicate":"auth.codeTypeFlashCall","params":[],"type":"auth.CodeType"},{"id":"1035688326","predicate":"auth.sentCodeTypeApp","params":[{"name":"length","type":"int"}],"type":"auth.SentCodeType"},{"id":"-1073693790","predicate":"auth.sentCodeTypeSms","params":[{"name":"length","type":"int"}],"type":"auth.SentCodeType"},{"id":"1398007207","predicate":"auth.sentCodeTypeCall","params":[{"name":"length","type":"int"}],"type":"auth.SentCodeType"},{"id":"-1425815847","predicate":"auth.sentCodeTypeFlashCall","params":[{"name":"pattern","type":"string"}],"type":"auth.SentCodeType"},{"id":"629866245","predicate":"keyboardButtonUrl","params":[{"name":"text","type":"string"},{"name":"url","type":"string"}],"type":"KeyboardButton"},{"id":"1748655686","predicate":"keyboardButtonCallback","params":[{"name":"text","type":"string"},{"name":"data","type":"bytes"}],"type":"KeyboardButton"},{"id":"-1318425559","predicate":"keyboardButtonRequestPhone","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"-59151553","predicate":"keyboardButtonRequestGeoLocation","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"90744648","predicate":"keyboardButtonSwitchInline","params":[{"name":"flags","type":"#"},{"name":"same_peer","type":"flags.0?true"},{"name":"text","type":"string"},{"name":"query","type":"string"}],"type":"KeyboardButton"},{"id":"1218642516","predicate":"replyInlineMarkup","params":[{"name":"rows","type":"Vector"}],"type":"ReplyMarkup"},{"id":"911761060","predicate":"messages.botCallbackAnswer","params":[{"name":"flags","type":"#"},{"name":"alert","type":"flags.1?true"},{"name":"has_url","type":"flags.3?true"},{"name":"native_ui","type":"flags.4?true"},{"name":"message","type":"flags.0?string"},{"name":"url","type":"flags.2?string"},{"name":"cache_time","type":"int"}],"type":"messages.BotCallbackAnswer"},{"id":"-415938591","predicate":"updateBotCallbackQuery","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"peer","type":"Peer"},{"name":"msg_id","type":"int"},{"name":"chat_instance","type":"long"},{"name":"data","type":"flags.0?bytes"},{"name":"game_short_name","type":"flags.1?string"}],"type":"Update"},{"id":"649453030","predicate":"messages.messageEditData","params":[{"name":"flags","type":"#"},{"name":"caption","type":"flags.0?true"}],"type":"messages.MessageEditData"},{"id":"-469536605","predicate":"updateEditMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-1045340827","predicate":"inputBotInlineMessageMediaGeo","params":[{"name":"flags","type":"#"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"period","type":"int"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"1098628881","predicate":"inputBotInlineMessageMediaVenue","params":[{"name":"flags","type":"#"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"provider","type":"string"},{"name":"venue_id","type":"string"},{"name":"venue_type","type":"string"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"-1494368259","predicate":"inputBotInlineMessageMediaContact","params":[{"name":"flags","type":"#"},{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"vcard","type":"string"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"-1222451611","predicate":"botInlineMessageMediaGeo","params":[{"name":"flags","type":"#"},{"name":"geo","type":"GeoPoint"},{"name":"period","type":"int"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"-1970903652","predicate":"botInlineMessageMediaVenue","params":[{"name":"flags","type":"#"},{"name":"geo","type":"GeoPoint"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"provider","type":"string"},{"name":"venue_id","type":"string"},{"name":"venue_type","type":"string"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"416402882","predicate":"botInlineMessageMediaContact","params":[{"name":"flags","type":"#"},{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"vcard","type":"string"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"BotInlineMessage"},{"id":"-1462213465","predicate":"inputBotInlineResultPhoto","params":[{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"photo","type":"InputPhoto"},{"name":"send_message","type":"InputBotInlineMessage"}],"type":"InputBotInlineResult"},{"id":"-459324","predicate":"inputBotInlineResultDocument","params":[{"name":"flags","type":"#"},{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"title","type":"flags.1?string"},{"name":"description","type":"flags.2?string"},{"name":"document","type":"InputDocument"},{"name":"send_message","type":"InputBotInlineMessage"}],"type":"InputBotInlineResult"},{"id":"400266251","predicate":"botInlineMediaResult","params":[{"name":"flags","type":"#"},{"name":"id","type":"string"},{"name":"type","type":"string"},{"name":"photo","type":"flags.0?Photo"},{"name":"document","type":"flags.1?Document"},{"name":"title","type":"flags.2?string"},{"name":"description","type":"flags.3?string"},{"name":"send_message","type":"BotInlineMessage"}],"type":"BotInlineResult"},{"id":"-1995686519","predicate":"inputBotInlineMessageID","params":[{"name":"dc_id","type":"int"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputBotInlineMessageID"},{"id":"-103646630","predicate":"updateInlineBotCallbackQuery","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"msg_id","type":"InputBotInlineMessageID"},{"name":"chat_instance","type":"long"},{"name":"data","type":"flags.0?bytes"},{"name":"game_short_name","type":"flags.1?string"}],"type":"Update"},{"id":"1008755359","predicate":"inlineBotSwitchPM","params":[{"name":"text","type":"string"},{"name":"start_param","type":"string"}],"type":"InlineBotSwitchPM"},{"id":"863093588","predicate":"messages.peerDialogs","params":[{"name":"dialogs","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"state","type":"updates.State"}],"type":"messages.PeerDialogs"},{"id":"-305282981","predicate":"topPeer","params":[{"name":"peer","type":"Peer"},{"name":"rating","type":"double"}],"type":"TopPeer"},{"id":"-1419371685","predicate":"topPeerCategoryBotsPM","params":[],"type":"TopPeerCategory"},{"id":"344356834","predicate":"topPeerCategoryBotsInline","params":[],"type":"TopPeerCategory"},{"id":"104314861","predicate":"topPeerCategoryCorrespondents","params":[],"type":"TopPeerCategory"},{"id":"-1122524854","predicate":"topPeerCategoryGroups","params":[],"type":"TopPeerCategory"},{"id":"371037736","predicate":"topPeerCategoryChannels","params":[],"type":"TopPeerCategory"},{"id":"-75283823","predicate":"topPeerCategoryPeers","params":[{"name":"category","type":"TopPeerCategory"},{"name":"count","type":"int"},{"name":"peers","type":"Vector"}],"type":"TopPeerCategoryPeers"},{"id":"-567906571","predicate":"contacts.topPeersNotModified","params":[],"type":"contacts.TopPeers"},{"id":"1891070632","predicate":"contacts.topPeers","params":[{"name":"categories","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.TopPeers"},{"id":"892193368","predicate":"messageEntityMentionName","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"},{"name":"user_id","type":"int"}],"type":"MessageEntity"},{"id":"546203849","predicate":"inputMessageEntityMentionName","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"},{"name":"user_id","type":"InputUser"}],"type":"MessageEntity"},{"id":"975236280","predicate":"inputMessagesFilterChatPhotos","params":[],"type":"MessagesFilter"},{"id":"634833351","predicate":"updateReadChannelOutbox","params":[{"name":"channel_id","type":"int"},{"name":"max_id","type":"int"}],"type":"Update"},{"id":"-299124375","predicate":"updateDraftMessage","params":[{"name":"peer","type":"Peer"},{"name":"draft","type":"DraftMessage"}],"type":"Update"},{"id":"453805082","predicate":"draftMessageEmpty","params":[{"name":"flags","type":"#"},{"name":"date","type":"flags.0?int"}],"type":"DraftMessage"},{"id":"-40996577","predicate":"draftMessage","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"message","type":"string"},{"name":"entities","type":"flags.3?Vector"},{"name":"date","type":"int"}],"type":"DraftMessage"},{"id":"-1615153660","predicate":"messageActionHistoryClear","params":[],"type":"MessageAction"},{"id":"82699215","predicate":"messages.featuredStickersNotModified","params":[],"type":"messages.FeaturedStickers"},{"id":"-123893531","predicate":"messages.featuredStickers","params":[{"name":"hash","type":"int"},{"name":"sets","type":"Vector"},{"name":"unread","type":"Vector"}],"type":"messages.FeaturedStickers"},{"id":"1461528386","predicate":"updateReadFeaturedStickers","params":[],"type":"Update"},{"id":"186120336","predicate":"messages.recentStickersNotModified","params":[],"type":"messages.RecentStickers"},{"id":"586395571","predicate":"messages.recentStickers","params":[{"name":"hash","type":"int"},{"name":"packs","type":"Vector"},{"name":"stickers","type":"Vector"},{"name":"dates","type":"Vector"}],"type":"messages.RecentStickers"},{"id":"-1706939360","predicate":"updateRecentStickers","params":[],"type":"Update"},{"id":"1338747336","predicate":"messages.archivedStickers","params":[{"name":"count","type":"int"},{"name":"sets","type":"Vector"}],"type":"messages.ArchivedStickers"},{"id":"946083368","predicate":"messages.stickerSetInstallResultSuccess","params":[],"type":"messages.StickerSetInstallResult"},{"id":"904138920","predicate":"messages.stickerSetInstallResultArchive","params":[{"name":"sets","type":"Vector"}],"type":"messages.StickerSetInstallResult"},{"id":"1678812626","predicate":"stickerSetCovered","params":[{"name":"set","type":"StickerSet"},{"name":"cover","type":"Document"}],"type":"StickerSetCovered"},{"id":"-1574314746","predicate":"updateConfig","params":[],"type":"Update"},{"id":"861169551","predicate":"updatePtsChanged","params":[],"type":"Update"},{"id":"-440664550","predicate":"inputMediaPhotoExternal","params":[{"name":"flags","type":"#"},{"name":"url","type":"string"},{"name":"ttl_seconds","type":"flags.0?int"}],"type":"InputMedia"},{"id":"-78455655","predicate":"inputMediaDocumentExternal","params":[{"name":"flags","type":"#"},{"name":"url","type":"string"},{"name":"ttl_seconds","type":"flags.0?int"}],"type":"InputMedia"},{"id":"872932635","predicate":"stickerSetMultiCovered","params":[{"name":"set","type":"StickerSet"},{"name":"covers","type":"Vector"}],"type":"StickerSetCovered"},{"id":"-1361650766","predicate":"maskCoords","params":[{"name":"n","type":"int"},{"name":"x","type":"double"},{"name":"y","type":"double"},{"name":"zoom","type":"double"}],"type":"MaskCoords"},{"id":"-1744710921","predicate":"documentAttributeHasStickers","params":[],"type":"DocumentAttribute"},{"id":"1251549527","predicate":"inputStickeredMediaPhoto","params":[{"name":"id","type":"InputPhoto"}],"type":"InputStickeredMedia"},{"id":"70813275","predicate":"inputStickeredMediaDocument","params":[{"name":"id","type":"InputDocument"}],"type":"InputStickeredMedia"},{"id":"-1107729093","predicate":"game","params":[{"name":"flags","type":"#"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"short_name","type":"string"},{"name":"title","type":"string"},{"name":"description","type":"string"},{"name":"photo","type":"Photo"},{"name":"document","type":"flags.0?Document"}],"type":"Game"},{"id":"1336154098","predicate":"inputBotInlineResultGame","params":[{"name":"id","type":"string"},{"name":"short_name","type":"string"},{"name":"send_message","type":"InputBotInlineMessage"}],"type":"InputBotInlineResult"},{"id":"1262639204","predicate":"inputBotInlineMessageGame","params":[{"name":"flags","type":"#"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"}],"type":"InputBotInlineMessage"},{"id":"-38694904","predicate":"messageMediaGame","params":[{"name":"game","type":"Game"}],"type":"MessageMedia"},{"id":"-750828557","predicate":"inputMediaGame","params":[{"name":"id","type":"InputGame"}],"type":"InputMedia"},{"id":"53231223","predicate":"inputGameID","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputGame"},{"id":"-1020139510","predicate":"inputGameShortName","params":[{"name":"bot_id","type":"InputUser"},{"name":"short_name","type":"string"}],"type":"InputGame"},{"id":"1358175439","predicate":"keyboardButtonGame","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"-1834538890","predicate":"messageActionGameScore","params":[{"name":"game_id","type":"long"},{"name":"score","type":"int"}],"type":"MessageAction"},{"id":"1493171408","predicate":"highScore","params":[{"name":"pos","type":"int"},{"name":"user_id","type":"int"},{"name":"score","type":"int"}],"type":"HighScore"},{"id":"-1707344487","predicate":"messages.highScores","params":[{"name":"scores","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.HighScores"},{"id":"1258196845","predicate":"updates.differenceTooLong","params":[{"name":"pts","type":"int"}],"type":"updates.Difference"},{"id":"1081547008","predicate":"updateChannelWebPage","params":[{"name":"channel_id","type":"int"},{"name":"webpage","type":"WebPage"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"-1663561404","predicate":"messages.chatsSlice","params":[{"name":"count","type":"int"},{"name":"chats","type":"Vector"}],"type":"messages.Chats"},{"id":"-599948721","predicate":"textEmpty","params":[],"type":"RichText"},{"id":"1950782688","predicate":"textPlain","params":[{"name":"text","type":"string"}],"type":"RichText"},{"id":"1730456516","predicate":"textBold","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"-653089380","predicate":"textItalic","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"-1054465340","predicate":"textUnderline","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"-1678197867","predicate":"textStrike","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"1816074681","predicate":"textFixed","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"1009288385","predicate":"textUrl","params":[{"name":"text","type":"RichText"},{"name":"url","type":"string"},{"name":"webpage_id","type":"long"}],"type":"RichText"},{"id":"-564523562","predicate":"textEmail","params":[{"name":"text","type":"RichText"},{"name":"email","type":"string"}],"type":"RichText"},{"id":"2120376535","predicate":"textConcat","params":[{"name":"texts","type":"Vector"}],"type":"RichText"},{"id":"324435594","predicate":"pageBlockUnsupported","params":[],"type":"PageBlock"},{"id":"1890305021","predicate":"pageBlockTitle","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-1879401953","predicate":"pageBlockSubtitle","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-1162877472","predicate":"pageBlockAuthorDate","params":[{"name":"author","type":"RichText"},{"name":"published_date","type":"int"}],"type":"PageBlock"},{"id":"-1076861716","predicate":"pageBlockHeader","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-248793375","predicate":"pageBlockSubheader","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"1182402406","predicate":"pageBlockParagraph","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-1066346178","predicate":"pageBlockPreformatted","params":[{"name":"text","type":"RichText"},{"name":"language","type":"string"}],"type":"PageBlock"},{"id":"1216809369","predicate":"pageBlockFooter","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"-618614392","predicate":"pageBlockDivider","params":[],"type":"PageBlock"},{"id":"-837994576","predicate":"pageBlockAnchor","params":[{"name":"name","type":"string"}],"type":"PageBlock"},{"id":"-454524911","predicate":"pageBlockList","params":[{"name":"items","type":"Vector"}],"type":"PageBlock"},{"id":"641563686","predicate":"pageBlockBlockquote","params":[{"name":"text","type":"RichText"},{"name":"caption","type":"RichText"}],"type":"PageBlock"},{"id":"1329878739","predicate":"pageBlockPullquote","params":[{"name":"text","type":"RichText"},{"name":"caption","type":"RichText"}],"type":"PageBlock"},{"id":"391759200","predicate":"pageBlockPhoto","params":[{"name":"flags","type":"#"},{"name":"photo_id","type":"long"},{"name":"caption","type":"PageCaption"},{"name":"url","type":"flags.0?string"},{"name":"webpage_id","type":"flags.0?long"}],"type":"PageBlock"},{"id":"2089805750","predicate":"pageBlockVideo","params":[{"name":"flags","type":"#"},{"name":"autoplay","type":"flags.0?true"},{"name":"loop","type":"flags.1?true"},{"name":"video_id","type":"long"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"972174080","predicate":"pageBlockCover","params":[{"name":"cover","type":"PageBlock"}],"type":"PageBlock"},{"id":"-1468953147","predicate":"pageBlockEmbed","params":[{"name":"flags","type":"#"},{"name":"full_width","type":"flags.0?true"},{"name":"allow_scrolling","type":"flags.3?true"},{"name":"url","type":"flags.1?string"},{"name":"html","type":"flags.2?string"},{"name":"poster_photo_id","type":"flags.4?long"},{"name":"w","type":"flags.5?int"},{"name":"h","type":"flags.5?int"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"-229005301","predicate":"pageBlockEmbedPost","params":[{"name":"url","type":"string"},{"name":"webpage_id","type":"long"},{"name":"author_photo_id","type":"long"},{"name":"author","type":"string"},{"name":"date","type":"int"},{"name":"blocks","type":"Vector"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"1705048653","predicate":"pageBlockCollage","params":[{"name":"items","type":"Vector"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"52401552","predicate":"pageBlockSlideshow","params":[{"name":"items","type":"Vector"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"-2054908813","predicate":"webPageNotModified","params":[],"type":"WebPage"},{"id":"-88417185","predicate":"inputPrivacyKeyPhoneCall","params":[],"type":"InputPrivacyKey"},{"id":"1030105979","predicate":"privacyKeyPhoneCall","params":[],"type":"PrivacyKey"},{"id":"-580219064","predicate":"sendMessageGamePlayAction","params":[],"type":"SendMessageAction"},{"id":"-2048646399","predicate":"phoneCallDiscardReasonMissed","params":[],"type":"PhoneCallDiscardReason"},{"id":"-527056480","predicate":"phoneCallDiscardReasonDisconnect","params":[],"type":"PhoneCallDiscardReason"},{"id":"1471006352","predicate":"phoneCallDiscardReasonHangup","params":[],"type":"PhoneCallDiscardReason"},{"id":"-84416311","predicate":"phoneCallDiscardReasonBusy","params":[],"type":"PhoneCallDiscardReason"},{"id":"1852826908","predicate":"updateDialogPinned","params":[{"name":"flags","type":"#"},{"name":"pinned","type":"flags.0?true"},{"name":"folder_id","type":"flags.1?int"},{"name":"peer","type":"DialogPeer"}],"type":"Update"},{"id":"-99664734","predicate":"updatePinnedDialogs","params":[{"name":"flags","type":"#"},{"name":"folder_id","type":"flags.1?int"},{"name":"order","type":"flags.0?Vector"}],"type":"Update"},{"id":"2104790276","predicate":"dataJSON","params":[{"name":"data","type":"string"}],"type":"DataJSON"},{"id":"-2095595325","predicate":"updateBotWebhookJSON","params":[{"name":"data","type":"DataJSON"}],"type":"Update"},{"id":"-1684914010","predicate":"updateBotWebhookJSONQuery","params":[{"name":"query_id","type":"long"},{"name":"data","type":"DataJSON"},{"name":"timeout","type":"int"}],"type":"Update"},{"id":"-886477832","predicate":"labeledPrice","params":[{"name":"label","type":"string"},{"name":"amount","type":"long"}],"type":"LabeledPrice"},{"id":"-1022713000","predicate":"invoice","params":[{"name":"flags","type":"#"},{"name":"test","type":"flags.0?true"},{"name":"name_requested","type":"flags.1?true"},{"name":"phone_requested","type":"flags.2?true"},{"name":"email_requested","type":"flags.3?true"},{"name":"shipping_address_requested","type":"flags.4?true"},{"name":"flexible","type":"flags.5?true"},{"name":"phone_to_provider","type":"flags.6?true"},{"name":"email_to_provider","type":"flags.7?true"},{"name":"currency","type":"string"},{"name":"prices","type":"Vector"}],"type":"Invoice"},{"id":"-186607933","predicate":"inputMediaInvoice","params":[{"name":"flags","type":"#"},{"name":"title","type":"string"},{"name":"description","type":"string"},{"name":"photo","type":"flags.0?InputWebDocument"},{"name":"invoice","type":"Invoice"},{"name":"payload","type":"bytes"},{"name":"provider","type":"string"},{"name":"provider_data","type":"DataJSON"},{"name":"start_param","type":"string"}],"type":"InputMedia"},{"id":"-368917890","predicate":"paymentCharge","params":[{"name":"id","type":"string"},{"name":"provider_charge_id","type":"string"}],"type":"PaymentCharge"},{"id":"-1892568281","predicate":"messageActionPaymentSentMe","params":[{"name":"flags","type":"#"},{"name":"currency","type":"string"},{"name":"total_amount","type":"long"},{"name":"payload","type":"bytes"},{"name":"info","type":"flags.0?PaymentRequestedInfo"},{"name":"shipping_option_id","type":"flags.1?string"},{"name":"charge","type":"PaymentCharge"}],"type":"MessageAction"},{"id":"-2074799289","predicate":"messageMediaInvoice","params":[{"name":"flags","type":"#"},{"name":"shipping_address_requested","type":"flags.1?true"},{"name":"test","type":"flags.3?true"},{"name":"title","type":"string"},{"name":"description","type":"string"},{"name":"photo","type":"flags.0?WebDocument"},{"name":"receipt_msg_id","type":"flags.2?int"},{"name":"currency","type":"string"},{"name":"total_amount","type":"long"},{"name":"start_param","type":"string"}],"type":"MessageMedia"},{"id":"512535275","predicate":"postAddress","params":[{"name":"street_line1","type":"string"},{"name":"street_line2","type":"string"},{"name":"city","type":"string"},{"name":"state","type":"string"},{"name":"country_iso2","type":"string"},{"name":"post_code","type":"string"}],"type":"PostAddress"},{"id":"-1868808300","predicate":"paymentRequestedInfo","params":[{"name":"flags","type":"#"},{"name":"name","type":"flags.0?string"},{"name":"phone","type":"flags.1?string"},{"name":"email","type":"flags.2?string"},{"name":"shipping_address","type":"flags.3?PostAddress"}],"type":"PaymentRequestedInfo"},{"id":"-1344716869","predicate":"keyboardButtonBuy","params":[{"name":"text","type":"string"}],"type":"KeyboardButton"},{"id":"1080663248","predicate":"messageActionPaymentSent","params":[{"name":"currency","type":"string"},{"name":"total_amount","type":"long"}],"type":"MessageAction"},{"id":"-842892769","predicate":"paymentSavedCredentialsCard","params":[{"name":"id","type":"string"},{"name":"title","type":"string"}],"type":"PaymentSavedCredentials"},{"id":"475467473","predicate":"webDocument","params":[{"name":"url","type":"string"},{"name":"access_hash","type":"long"},{"name":"size","type":"int"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"}],"type":"WebDocument"},{"id":"-1678949555","predicate":"inputWebDocument","params":[{"name":"url","type":"string"},{"name":"size","type":"int"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"}],"type":"InputWebDocument"},{"id":"-1036396922","predicate":"inputWebFileLocation","params":[{"name":"url","type":"string"},{"name":"access_hash","type":"long"}],"type":"InputWebFileLocation"},{"id":"568808380","predicate":"upload.webFile","params":[{"name":"size","type":"int"},{"name":"mime_type","type":"string"},{"name":"file_type","type":"storage.FileType"},{"name":"mtime","type":"int"},{"name":"bytes","type":"bytes"}],"type":"upload.WebFile"},{"id":"1062645411","predicate":"payments.paymentForm","params":[{"name":"flags","type":"#"},{"name":"can_save_credentials","type":"flags.2?true"},{"name":"password_missing","type":"flags.3?true"},{"name":"bot_id","type":"int"},{"name":"invoice","type":"Invoice"},{"name":"provider_id","type":"int"},{"name":"url","type":"string"},{"name":"native_provider","type":"flags.4?string"},{"name":"native_params","type":"flags.4?DataJSON"},{"name":"saved_info","type":"flags.0?PaymentRequestedInfo"},{"name":"saved_credentials","type":"flags.1?PaymentSavedCredentials"},{"name":"users","type":"Vector"}],"type":"payments.PaymentForm"},{"id":"-784000893","predicate":"payments.validatedRequestedInfo","params":[{"name":"flags","type":"#"},{"name":"id","type":"flags.0?string"},{"name":"shipping_options","type":"flags.1?Vector"}],"type":"payments.ValidatedRequestedInfo"},{"id":"1314881805","predicate":"payments.paymentResult","params":[{"name":"updates","type":"Updates"}],"type":"payments.PaymentResult"},{"id":"1342771681","predicate":"payments.paymentReceipt","params":[{"name":"flags","type":"#"},{"name":"date","type":"int"},{"name":"bot_id","type":"int"},{"name":"invoice","type":"Invoice"},{"name":"provider_id","type":"int"},{"name":"info","type":"flags.0?PaymentRequestedInfo"},{"name":"shipping","type":"flags.1?ShippingOption"},{"name":"currency","type":"string"},{"name":"total_amount","type":"long"},{"name":"credentials_title","type":"string"},{"name":"users","type":"Vector"}],"type":"payments.PaymentReceipt"},{"id":"-74456004","predicate":"payments.savedInfo","params":[{"name":"flags","type":"#"},{"name":"has_saved_credentials","type":"flags.1?true"},{"name":"saved_info","type":"flags.0?PaymentRequestedInfo"}],"type":"payments.SavedInfo"},{"id":"-1056001329","predicate":"inputPaymentCredentialsSaved","params":[{"name":"id","type":"string"},{"name":"tmp_password","type":"bytes"}],"type":"InputPaymentCredentials"},{"id":"873977640","predicate":"inputPaymentCredentials","params":[{"name":"flags","type":"#"},{"name":"save","type":"flags.0?true"},{"name":"data","type":"DataJSON"}],"type":"InputPaymentCredentials"},{"id":"-614138572","predicate":"account.tmpPassword","params":[{"name":"tmp_password","type":"bytes"},{"name":"valid_until","type":"int"}],"type":"account.TmpPassword"},{"id":"-1239335713","predicate":"shippingOption","params":[{"name":"id","type":"string"},{"name":"title","type":"string"},{"name":"prices","type":"Vector"}],"type":"ShippingOption"},{"id":"-523384512","predicate":"updateBotShippingQuery","params":[{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"payload","type":"bytes"},{"name":"shipping_address","type":"PostAddress"}],"type":"Update"},{"id":"1563376297","predicate":"updateBotPrecheckoutQuery","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"user_id","type":"int"},{"name":"payload","type":"bytes"},{"name":"info","type":"flags.0?PaymentRequestedInfo"},{"name":"shipping_option_id","type":"flags.1?string"},{"name":"currency","type":"string"},{"name":"total_amount","type":"long"}],"type":"Update"},{"id":"-6249322","predicate":"inputStickerSetItem","params":[{"name":"flags","type":"#"},{"name":"document","type":"InputDocument"},{"name":"emoji","type":"string"},{"name":"mask_coords","type":"flags.0?MaskCoords"}],"type":"InputStickerSetItem"},{"id":"-1425052898","predicate":"updatePhoneCall","params":[{"name":"phone_call","type":"PhoneCall"}],"type":"Update"},{"id":"506920429","predicate":"inputPhoneCall","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputPhoneCall"},{"id":"1399245077","predicate":"phoneCallEmpty","params":[{"name":"id","type":"long"}],"type":"PhoneCall"},{"id":"462375633","predicate":"phoneCallWaiting","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"protocol","type":"PhoneCallProtocol"},{"name":"receive_date","type":"flags.0?int"}],"type":"PhoneCall"},{"id":"-2014659757","predicate":"phoneCallRequested","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a_hash","type":"bytes"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"PhoneCall"},{"id":"-1719909046","predicate":"phoneCallAccepted","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_b","type":"bytes"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"PhoneCall"},{"id":"-2025673089","predicate":"phoneCall","params":[{"name":"flags","type":"#"},{"name":"p2p_allowed","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a_or_b","type":"bytes"},{"name":"key_fingerprint","type":"long"},{"name":"protocol","type":"PhoneCallProtocol"},{"name":"connections","type":"Vector"},{"name":"start_date","type":"int"}],"type":"PhoneCall"},{"id":"1355435489","predicate":"phoneCallDiscarded","params":[{"name":"flags","type":"#"},{"name":"need_rating","type":"flags.2?true"},{"name":"need_debug","type":"flags.3?true"},{"name":"video","type":"flags.5?true"},{"name":"id","type":"long"},{"name":"reason","type":"flags.0?PhoneCallDiscardReason"},{"name":"duration","type":"flags.1?int"}],"type":"PhoneCall"},{"id":"-1655957568","predicate":"phoneConnection","params":[{"name":"id","type":"long"},{"name":"ip","type":"string"},{"name":"ipv6","type":"string"},{"name":"port","type":"int"},{"name":"peer_tag","type":"bytes"}],"type":"PhoneConnection"},{"id":"-1564789301","predicate":"phoneCallProtocol","params":[{"name":"flags","type":"#"},{"name":"udp_p2p","type":"flags.0?true"},{"name":"udp_reflector","type":"flags.1?true"},{"name":"min_layer","type":"int"},{"name":"max_layer","type":"int"}],"type":"PhoneCallProtocol"},{"id":"-326966976","predicate":"phone.phoneCall","params":[{"name":"phone_call","type":"PhoneCall"},{"name":"users","type":"Vector"}],"type":"phone.PhoneCall"},{"id":"-2134272152","predicate":"inputMessagesFilterPhoneCalls","params":[{"name":"flags","type":"#"},{"name":"missed","type":"flags.0?true"}],"type":"MessagesFilter"},{"id":"-2132731265","predicate":"messageActionPhoneCall","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.2?true"},{"name":"call_id","type":"long"},{"name":"reason","type":"flags.0?PhoneCallDiscardReason"},{"name":"duration","type":"flags.1?int"}],"type":"MessageAction"},{"id":"2054952868","predicate":"inputMessagesFilterRoundVoice","params":[],"type":"MessagesFilter"},{"id":"-1253451181","predicate":"inputMessagesFilterRoundVideo","params":[],"type":"MessagesFilter"},{"id":"-1997373508","predicate":"sendMessageRecordRoundAction","params":[],"type":"SendMessageAction"},{"id":"608050278","predicate":"sendMessageUploadRoundAction","params":[{"name":"progress","type":"int"}],"type":"SendMessageAction"},{"id":"-242427324","predicate":"upload.fileCdnRedirect","params":[{"name":"dc_id","type":"int"},{"name":"file_token","type":"bytes"},{"name":"encryption_key","type":"bytes"},{"name":"encryption_iv","type":"bytes"},{"name":"file_hashes","type":"Vector"}],"type":"upload.File"},{"id":"-290921362","predicate":"upload.cdnFileReuploadNeeded","params":[{"name":"request_token","type":"bytes"}],"type":"upload.CdnFile"},{"id":"-1449145777","predicate":"upload.cdnFile","params":[{"name":"bytes","type":"bytes"}],"type":"upload.CdnFile"},{"id":"-914167110","predicate":"cdnPublicKey","params":[{"name":"dc_id","type":"int"},{"name":"public_key","type":"string"}],"type":"CdnPublicKey"},{"id":"1462101002","predicate":"cdnConfig","params":[{"name":"public_keys","type":"Vector"}],"type":"CdnConfig"},{"id":"-283684427","predicate":"pageBlockChannel","params":[{"name":"channel","type":"Chat"}],"type":"PageBlock"},{"id":"-892239370","predicate":"langPackString","params":[{"name":"key","type":"string"},{"name":"value","type":"string"}],"type":"LangPackString"},{"id":"1816636575","predicate":"langPackStringPluralized","params":[{"name":"flags","type":"#"},{"name":"key","type":"string"},{"name":"zero_value","type":"flags.0?string"},{"name":"one_value","type":"flags.1?string"},{"name":"two_value","type":"flags.2?string"},{"name":"few_value","type":"flags.3?string"},{"name":"many_value","type":"flags.4?string"},{"name":"other_value","type":"string"}],"type":"LangPackString"},{"id":"695856818","predicate":"langPackStringDeleted","params":[{"name":"key","type":"string"}],"type":"LangPackString"},{"id":"-209337866","predicate":"langPackDifference","params":[{"name":"lang_code","type":"string"},{"name":"from_version","type":"int"},{"name":"version","type":"int"},{"name":"strings","type":"Vector"}],"type":"LangPackDifference"},{"id":"-288727837","predicate":"langPackLanguage","params":[{"name":"flags","type":"#"},{"name":"official","type":"flags.0?true"},{"name":"rtl","type":"flags.2?true"},{"name":"beta","type":"flags.3?true"},{"name":"name","type":"string"},{"name":"native_name","type":"string"},{"name":"lang_code","type":"string"},{"name":"base_lang_code","type":"flags.1?string"},{"name":"plural_code","type":"string"},{"name":"strings_count","type":"int"},{"name":"translated_count","type":"int"},{"name":"translations_url","type":"string"}],"type":"LangPackLanguage"},{"id":"1180041828","predicate":"updateLangPackTooLong","params":[{"name":"lang_code","type":"string"}],"type":"Update"},{"id":"1442983757","predicate":"updateLangPack","params":[{"name":"difference","type":"LangPackDifference"}],"type":"Update"},{"id":"-859915345","predicate":"channelParticipantAdmin","params":[{"name":"flags","type":"#"},{"name":"can_edit","type":"flags.0?true"},{"name":"self","type":"flags.1?true"},{"name":"user_id","type":"int"},{"name":"inviter_id","type":"flags.1?int"},{"name":"promoted_by","type":"int"},{"name":"date","type":"int"},{"name":"admin_rights","type":"ChatAdminRights"},{"name":"rank","type":"flags.2?string"}],"type":"ChannelParticipant"},{"id":"470789295","predicate":"channelParticipantBanned","params":[{"name":"flags","type":"#"},{"name":"left","type":"flags.0?true"},{"name":"user_id","type":"int"},{"name":"kicked_by","type":"int"},{"name":"date","type":"int"},{"name":"banned_rights","type":"ChatBannedRights"}],"type":"ChannelParticipant"},{"id":"338142689","predicate":"channelParticipantsBanned","params":[{"name":"q","type":"string"}],"type":"ChannelParticipantsFilter"},{"id":"106343499","predicate":"channelParticipantsSearch","params":[{"name":"q","type":"string"}],"type":"ChannelParticipantsFilter"},{"id":"-421545947","predicate":"channelAdminLogEventActionChangeTitle","params":[{"name":"prev_value","type":"string"},{"name":"new_value","type":"string"}],"type":"ChannelAdminLogEventAction"},{"id":"1427671598","predicate":"channelAdminLogEventActionChangeAbout","params":[{"name":"prev_value","type":"string"},{"name":"new_value","type":"string"}],"type":"ChannelAdminLogEventAction"},{"id":"1783299128","predicate":"channelAdminLogEventActionChangeUsername","params":[{"name":"prev_value","type":"string"},{"name":"new_value","type":"string"}],"type":"ChannelAdminLogEventAction"},{"id":"1129042607","predicate":"channelAdminLogEventActionChangePhoto","params":[{"name":"prev_photo","type":"Photo"},{"name":"new_photo","type":"Photo"}],"type":"ChannelAdminLogEventAction"},{"id":"460916654","predicate":"channelAdminLogEventActionToggleInvites","params":[{"name":"new_value","type":"Bool"}],"type":"ChannelAdminLogEventAction"},{"id":"648939889","predicate":"channelAdminLogEventActionToggleSignatures","params":[{"name":"new_value","type":"Bool"}],"type":"ChannelAdminLogEventAction"},{"id":"-370660328","predicate":"channelAdminLogEventActionUpdatePinned","params":[{"name":"message","type":"Message"}],"type":"ChannelAdminLogEventAction"},{"id":"1889215493","predicate":"channelAdminLogEventActionEditMessage","params":[{"name":"prev_message","type":"Message"},{"name":"new_message","type":"Message"}],"type":"ChannelAdminLogEventAction"},{"id":"1121994683","predicate":"channelAdminLogEventActionDeleteMessage","params":[{"name":"message","type":"Message"}],"type":"ChannelAdminLogEventAction"},{"id":"405815507","predicate":"channelAdminLogEventActionParticipantJoin","params":[],"type":"ChannelAdminLogEventAction"},{"id":"-124291086","predicate":"channelAdminLogEventActionParticipantLeave","params":[],"type":"ChannelAdminLogEventAction"},{"id":"-484690728","predicate":"channelAdminLogEventActionParticipantInvite","params":[{"name":"participant","type":"ChannelParticipant"}],"type":"ChannelAdminLogEventAction"},{"id":"-422036098","predicate":"channelAdminLogEventActionParticipantToggleBan","params":[{"name":"prev_participant","type":"ChannelParticipant"},{"name":"new_participant","type":"ChannelParticipant"}],"type":"ChannelAdminLogEventAction"},{"id":"-714643696","predicate":"channelAdminLogEventActionParticipantToggleAdmin","params":[{"name":"prev_participant","type":"ChannelParticipant"},{"name":"new_participant","type":"ChannelParticipant"}],"type":"ChannelAdminLogEventAction"},{"id":"995769920","predicate":"channelAdminLogEvent","params":[{"name":"id","type":"long"},{"name":"date","type":"int"},{"name":"user_id","type":"int"},{"name":"action","type":"ChannelAdminLogEventAction"}],"type":"ChannelAdminLogEvent"},{"id":"-309659827","predicate":"channels.adminLogResults","params":[{"name":"events","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"channels.AdminLogResults"},{"id":"-368018716","predicate":"channelAdminLogEventsFilter","params":[{"name":"flags","type":"#"},{"name":"join","type":"flags.0?true"},{"name":"leave","type":"flags.1?true"},{"name":"invite","type":"flags.2?true"},{"name":"ban","type":"flags.3?true"},{"name":"unban","type":"flags.4?true"},{"name":"kick","type":"flags.5?true"},{"name":"unkick","type":"flags.6?true"},{"name":"promote","type":"flags.7?true"},{"name":"demote","type":"flags.8?true"},{"name":"info","type":"flags.9?true"},{"name":"settings","type":"flags.10?true"},{"name":"pinned","type":"flags.11?true"},{"name":"edit","type":"flags.12?true"},{"name":"delete","type":"flags.13?true"}],"type":"ChannelAdminLogEventsFilter"},{"id":"511092620","predicate":"topPeerCategoryPhoneCalls","params":[],"type":"TopPeerCategory"},{"id":"-2143067670","predicate":"pageBlockAudio","params":[{"name":"audio_id","type":"long"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"1558266229","predicate":"popularContact","params":[{"name":"client_id","type":"long"},{"name":"importers","type":"int"}],"type":"PopularContact"},{"id":"1200788123","predicate":"messageActionScreenshotTaken","params":[],"type":"MessageAction"},{"id":"-1634752813","predicate":"messages.favedStickersNotModified","params":[],"type":"messages.FavedStickers"},{"id":"-209768682","predicate":"messages.favedStickers","params":[{"name":"hash","type":"int"},{"name":"packs","type":"Vector"},{"name":"stickers","type":"Vector"}],"type":"messages.FavedStickers"},{"id":"-451831443","predicate":"updateFavedStickers","params":[],"type":"Update"},{"id":"-1987495099","predicate":"updateChannelReadMessagesContents","params":[{"name":"channel_id","type":"int"},{"name":"messages","type":"Vector"}],"type":"Update"},{"id":"-1040652646","predicate":"inputMessagesFilterMyMentions","params":[],"type":"MessagesFilter"},{"id":"1887741886","predicate":"updateContactsReset","params":[],"type":"Update"},{"id":"-1312568665","predicate":"channelAdminLogEventActionChangeStickerSet","params":[{"name":"prev_stickerset","type":"InputStickerSet"},{"name":"new_stickerset","type":"InputStickerSet"}],"type":"ChannelAdminLogEventAction"},{"id":"-85549226","predicate":"messageActionCustomAction","params":[{"name":"message","type":"string"}],"type":"MessageAction"},{"id":"178373535","predicate":"inputPaymentCredentialsApplePay","params":[{"name":"payment_data","type":"DataJSON"}],"type":"InputPaymentCredentials"},{"id":"-905587442","predicate":"inputPaymentCredentialsAndroidPay","params":[{"name":"payment_token","type":"DataJSON"},{"name":"google_transaction_id","type":"string"}],"type":"InputPaymentCredentials"},{"id":"-419271411","predicate":"inputMessagesFilterGeo","params":[],"type":"MessagesFilter"},{"id":"-530392189","predicate":"inputMessagesFilterContacts","params":[],"type":"MessagesFilter"},{"id":"1893427255","predicate":"updateChannelAvailableMessages","params":[{"name":"channel_id","type":"int"},{"name":"available_min_id","type":"int"}],"type":"Update"},{"id":"1599903217","predicate":"channelAdminLogEventActionTogglePreHistoryHidden","params":[{"name":"new_value","type":"Bool"}],"type":"ChannelAdminLogEventAction"},{"id":"-833715459","predicate":"inputMediaGeoLive","params":[{"name":"flags","type":"#"},{"name":"stopped","type":"flags.0?true"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"period","type":"flags.1?int"}],"type":"InputMedia"},{"id":"2084316681","predicate":"messageMediaGeoLive","params":[{"name":"geo","type":"GeoPoint"},{"name":"period","type":"int"}],"type":"MessageMedia"},{"id":"1189204285","predicate":"recentMeUrlUnknown","params":[{"name":"url","type":"string"}],"type":"RecentMeUrl"},{"id":"-1917045962","predicate":"recentMeUrlUser","params":[{"name":"url","type":"string"},{"name":"user_id","type":"int"}],"type":"RecentMeUrl"},{"id":"-1608834311","predicate":"recentMeUrlChat","params":[{"name":"url","type":"string"},{"name":"chat_id","type":"int"}],"type":"RecentMeUrl"},{"id":"-347535331","predicate":"recentMeUrlChatInvite","params":[{"name":"url","type":"string"},{"name":"chat_invite","type":"ChatInvite"}],"type":"RecentMeUrl"},{"id":"-1140172836","predicate":"recentMeUrlStickerSet","params":[{"name":"url","type":"string"},{"name":"set","type":"StickerSetCovered"}],"type":"RecentMeUrl"},{"id":"235081943","predicate":"help.recentMeUrls","params":[{"name":"urls","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"help.RecentMeUrls"},{"id":"-266911767","predicate":"channels.channelParticipantsNotModified","params":[],"type":"channels.ChannelParticipants"},{"id":"1951620897","predicate":"messages.messagesNotModified","params":[{"name":"count","type":"int"}],"type":"messages.Messages"},{"id":"482797855","predicate":"inputSingleMedia","params":[{"name":"flags","type":"#"},{"name":"media","type":"InputMedia"},{"name":"random_id","type":"long"},{"name":"message","type":"string"},{"name":"entities","type":"flags.0?Vector"}],"type":"InputSingleMedia"},{"id":"-892779534","predicate":"webAuthorization","params":[{"name":"hash","type":"long"},{"name":"bot_id","type":"int"},{"name":"domain","type":"string"},{"name":"browser","type":"string"},{"name":"platform","type":"string"},{"name":"date_created","type":"int"},{"name":"date_active","type":"int"},{"name":"ip","type":"string"},{"name":"region","type":"string"}],"type":"WebAuthorization"},{"id":"-313079300","predicate":"account.webAuthorizations","params":[{"name":"authorizations","type":"Vector"},{"name":"users","type":"Vector"}],"type":"account.WebAuthorizations"},{"id":"-1502174430","predicate":"inputMessageID","params":[{"name":"id","type":"int"}],"type":"InputMessage"},{"id":"-1160215659","predicate":"inputMessageReplyTo","params":[{"name":"id","type":"int"}],"type":"InputMessage"},{"id":"-2037963464","predicate":"inputMessagePinned","params":[],"type":"InputMessage"},{"id":"-1687559349","predicate":"messageEntityPhone","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1280209983","predicate":"messageEntityCashtag","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-1410748418","predicate":"messageActionBotAllowed","params":[{"name":"domain","type":"string"}],"type":"MessageAction"},{"id":"-55902537","predicate":"inputDialogPeer","params":[{"name":"peer","type":"InputPeer"}],"type":"InputDialogPeer"},{"id":"-445792507","predicate":"dialogPeer","params":[{"name":"peer","type":"Peer"}],"type":"DialogPeer"},{"id":"223655517","predicate":"messages.foundStickerSetsNotModified","params":[],"type":"messages.FoundStickerSets"},{"id":"1359533640","predicate":"messages.foundStickerSets","params":[{"name":"hash","type":"int"},{"name":"sets","type":"Vector"}],"type":"messages.FoundStickerSets"},{"id":"1648543603","predicate":"fileHash","params":[{"name":"offset","type":"int"},{"name":"limit","type":"int"},{"name":"hash","type":"bytes"}],"type":"FileHash"},{"id":"-104284986","predicate":"webDocumentNoProxy","params":[{"name":"url","type":"string"},{"name":"size","type":"int"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"}],"type":"WebDocument"},{"id":"1968737087","predicate":"inputClientProxy","params":[{"name":"address","type":"string"},{"name":"port","type":"int"}],"type":"InputClientProxy"},{"id":"-526508104","predicate":"help.proxyDataEmpty","params":[{"name":"expires","type":"int"}],"type":"help.ProxyData"},{"id":"737668643","predicate":"help.proxyDataPromo","params":[{"name":"expires","type":"int"},{"name":"peer","type":"Peer"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"help.ProxyData"},{"id":"-483352705","predicate":"help.termsOfServiceUpdateEmpty","params":[{"name":"expires","type":"int"}],"type":"help.TermsOfServiceUpdate"},{"id":"686618977","predicate":"help.termsOfServiceUpdate","params":[{"name":"expires","type":"int"},{"name":"terms_of_service","type":"help.TermsOfService"}],"type":"help.TermsOfServiceUpdate"},{"id":"859091184","predicate":"inputSecureFileUploaded","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"md5_checksum","type":"string"},{"name":"file_hash","type":"bytes"},{"name":"secret","type":"bytes"}],"type":"InputSecureFile"},{"id":"1399317950","predicate":"inputSecureFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputSecureFile"},{"id":"-876089816","predicate":"inputSecureFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"1679398724","predicate":"secureFileEmpty","params":[],"type":"SecureFile"},{"id":"-534283678","predicate":"secureFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"size","type":"int"},{"name":"dc_id","type":"int"},{"name":"date","type":"int"},{"name":"file_hash","type":"bytes"},{"name":"secret","type":"bytes"}],"type":"SecureFile"},{"id":"-1964327229","predicate":"secureData","params":[{"name":"data","type":"bytes"},{"name":"data_hash","type":"bytes"},{"name":"secret","type":"bytes"}],"type":"SecureData"},{"id":"2103482845","predicate":"securePlainPhone","params":[{"name":"phone","type":"string"}],"type":"SecurePlainData"},{"id":"569137759","predicate":"securePlainEmail","params":[{"name":"email","type":"string"}],"type":"SecurePlainData"},{"id":"-1658158621","predicate":"secureValueTypePersonalDetails","params":[],"type":"SecureValueType"},{"id":"1034709504","predicate":"secureValueTypePassport","params":[],"type":"SecureValueType"},{"id":"115615172","predicate":"secureValueTypeDriverLicense","params":[],"type":"SecureValueType"},{"id":"-1596951477","predicate":"secureValueTypeIdentityCard","params":[],"type":"SecureValueType"},{"id":"-1717268701","predicate":"secureValueTypeInternalPassport","params":[],"type":"SecureValueType"},{"id":"-874308058","predicate":"secureValueTypeAddress","params":[],"type":"SecureValueType"},{"id":"-63531698","predicate":"secureValueTypeUtilityBill","params":[],"type":"SecureValueType"},{"id":"-1995211763","predicate":"secureValueTypeBankStatement","params":[],"type":"SecureValueType"},{"id":"-1954007928","predicate":"secureValueTypeRentalAgreement","params":[],"type":"SecureValueType"},{"id":"-1713143702","predicate":"secureValueTypePassportRegistration","params":[],"type":"SecureValueType"},{"id":"-368907213","predicate":"secureValueTypeTemporaryRegistration","params":[],"type":"SecureValueType"},{"id":"-1289704741","predicate":"secureValueTypePhone","params":[],"type":"SecureValueType"},{"id":"-1908627474","predicate":"secureValueTypeEmail","params":[],"type":"SecureValueType"},{"id":"411017418","predicate":"secureValue","params":[{"name":"flags","type":"#"},{"name":"type","type":"SecureValueType"},{"name":"data","type":"flags.0?SecureData"},{"name":"front_side","type":"flags.1?SecureFile"},{"name":"reverse_side","type":"flags.2?SecureFile"},{"name":"selfie","type":"flags.3?SecureFile"},{"name":"translation","type":"flags.6?Vector"},{"name":"files","type":"flags.4?Vector"},{"name":"plain_data","type":"flags.5?SecurePlainData"},{"name":"hash","type":"bytes"}],"type":"SecureValue"},{"id":"-618540889","predicate":"inputSecureValue","params":[{"name":"flags","type":"#"},{"name":"type","type":"SecureValueType"},{"name":"data","type":"flags.0?SecureData"},{"name":"front_side","type":"flags.1?InputSecureFile"},{"name":"reverse_side","type":"flags.2?InputSecureFile"},{"name":"selfie","type":"flags.3?InputSecureFile"},{"name":"translation","type":"flags.6?Vector"},{"name":"files","type":"flags.4?Vector"},{"name":"plain_data","type":"flags.5?SecurePlainData"}],"type":"InputSecureValue"},{"id":"-316748368","predicate":"secureValueHash","params":[{"name":"type","type":"SecureValueType"},{"name":"hash","type":"bytes"}],"type":"SecureValueHash"},{"id":"-391902247","predicate":"secureValueErrorData","params":[{"name":"type","type":"SecureValueType"},{"name":"data_hash","type":"bytes"},{"name":"field","type":"string"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"12467706","predicate":"secureValueErrorFrontSide","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"-2037765467","predicate":"secureValueErrorReverseSide","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"-449327402","predicate":"secureValueErrorSelfie","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"2054162547","predicate":"secureValueErrorFile","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"1717706985","predicate":"secureValueErrorFiles","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"Vector"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"871426631","predicate":"secureCredentialsEncrypted","params":[{"name":"data","type":"bytes"},{"name":"hash","type":"bytes"},{"name":"secret","type":"bytes"}],"type":"SecureCredentialsEncrypted"},{"id":"-1389486888","predicate":"account.authorizationForm","params":[{"name":"flags","type":"#"},{"name":"required_types","type":"Vector"},{"name":"values","type":"Vector"},{"name":"errors","type":"Vector"},{"name":"users","type":"Vector"},{"name":"privacy_policy_url","type":"flags.0?string"}],"type":"account.AuthorizationForm"},{"id":"-2128640689","predicate":"account.sentEmailCode","params":[{"name":"email_pattern","type":"string"},{"name":"length","type":"int"}],"type":"account.SentEmailCode"},{"id":"455635795","predicate":"messageActionSecureValuesSentMe","params":[{"name":"values","type":"Vector"},{"name":"credentials","type":"SecureCredentialsEncrypted"}],"type":"MessageAction"},{"id":"-648257196","predicate":"messageActionSecureValuesSent","params":[{"name":"types","type":"Vector"}],"type":"MessageAction"},{"id":"1722786150","predicate":"help.deepLinkInfoEmpty","params":[],"type":"help.DeepLinkInfo"},{"id":"1783556146","predicate":"help.deepLinkInfo","params":[{"name":"flags","type":"#"},{"name":"update_app","type":"flags.0?true"},{"name":"message","type":"string"},{"name":"entities","type":"flags.1?Vector"}],"type":"help.DeepLinkInfo"},{"id":"289586518","predicate":"savedPhoneContact","params":[{"name":"phone","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"date","type":"int"}],"type":"SavedContact"},{"id":"1304052993","predicate":"account.takeout","params":[{"name":"id","type":"long"}],"type":"account.Takeout"},{"id":"700340377","predicate":"inputTakeoutFileLocation","params":[],"type":"InputFileLocation"},{"id":"-513517117","predicate":"updateDialogUnreadMark","params":[{"name":"flags","type":"#"},{"name":"unread","type":"flags.0?true"},{"name":"peer","type":"DialogPeer"}],"type":"Update"},{"id":"-253500010","predicate":"messages.dialogsNotModified","params":[{"name":"count","type":"int"}],"type":"messages.Dialogs"},{"id":"-1625153079","predicate":"inputWebFileGeoPointLocation","params":[{"name":"geo_point","type":"InputGeoPoint"},{"name":"access_hash","type":"long"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"zoom","type":"int"},{"name":"scale","type":"int"}],"type":"InputWebFileLocation"},{"id":"-1255369827","predicate":"contacts.topPeersDisabled","params":[],"type":"contacts.TopPeers"},{"id":"-1685456582","predicate":"inputReportReasonCopyright","params":[],"type":"ReportReason"},{"id":"-732254058","predicate":"passwordKdfAlgoUnknown","params":[],"type":"PasswordKdfAlgo"},{"id":"4883767","predicate":"securePasswordKdfAlgoUnknown","params":[],"type":"SecurePasswordKdfAlgo"},{"id":"-1141711456","predicate":"securePasswordKdfAlgoPBKDF2HMACSHA512iter100000","params":[{"name":"salt","type":"bytes"}],"type":"SecurePasswordKdfAlgo"},{"id":"-2042159726","predicate":"securePasswordKdfAlgoSHA512","params":[{"name":"salt","type":"bytes"}],"type":"SecurePasswordKdfAlgo"},{"id":"354925740","predicate":"secureSecretSettings","params":[{"name":"secure_algo","type":"SecurePasswordKdfAlgo"},{"name":"secure_secret","type":"bytes"},{"name":"secure_secret_id","type":"long"}],"type":"SecureSecretSettings"},{"id":"982592842","predicate":"passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow","params":[{"name":"salt1","type":"bytes"},{"name":"salt2","type":"bytes"},{"name":"g","type":"int"},{"name":"p","type":"bytes"}],"type":"PasswordKdfAlgo"},{"id":"-1736378792","predicate":"inputCheckPasswordEmpty","params":[],"type":"InputCheckPasswordSRP"},{"id":"-763367294","predicate":"inputCheckPasswordSRP","params":[{"name":"srp_id","type":"long"},{"name":"A","type":"bytes"},{"name":"M1","type":"bytes"}],"type":"InputCheckPasswordSRP"},{"id":"-2036501105","predicate":"secureValueError","params":[{"name":"type","type":"SecureValueType"},{"name":"hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"-1592506512","predicate":"secureValueErrorTranslationFile","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"bytes"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"878931416","predicate":"secureValueErrorTranslationFiles","params":[{"name":"type","type":"SecureValueType"},{"name":"file_hash","type":"Vector"},{"name":"text","type":"string"}],"type":"SecureValueError"},{"id":"-2103600678","predicate":"secureRequiredType","params":[{"name":"flags","type":"#"},{"name":"native_names","type":"flags.0?true"},{"name":"selfie_required","type":"flags.1?true"},{"name":"translation_required","type":"flags.2?true"},{"name":"type","type":"SecureValueType"}],"type":"SecureRequiredType"},{"id":"41187252","predicate":"secureRequiredTypeOneOf","params":[{"name":"types","type":"Vector"}],"type":"SecureRequiredType"},{"id":"-1078332329","predicate":"help.passportConfigNotModified","params":[],"type":"help.PassportConfig"},{"id":"-1600596305","predicate":"help.passportConfig","params":[{"name":"hash","type":"int"},{"name":"countries_langs","type":"DataJSON"}],"type":"help.PassportConfig"},{"id":"488313413","predicate":"inputAppEvent","params":[{"name":"time","type":"double"},{"name":"type","type":"string"},{"name":"peer","type":"long"},{"name":"data","type":"JSONValue"}],"type":"InputAppEvent"},{"id":"-1059185703","predicate":"jsonObjectValue","params":[{"name":"key","type":"string"},{"name":"value","type":"JSONValue"}],"type":"JSONObjectValue"},{"id":"1064139624","predicate":"jsonNull","params":[],"type":"JSONValue"},{"id":"-952869270","predicate":"jsonBool","params":[{"name":"value","type":"Bool"}],"type":"JSONValue"},{"id":"736157604","predicate":"jsonNumber","params":[{"name":"value","type":"double"}],"type":"JSONValue"},{"id":"-1222740358","predicate":"jsonString","params":[{"name":"value","type":"string"}],"type":"JSONValue"},{"id":"-146520221","predicate":"jsonArray","params":[{"name":"value","type":"Vector"}],"type":"JSONValue"},{"id":"-1715350371","predicate":"jsonObject","params":[{"name":"value","type":"Vector"}],"type":"JSONValue"},{"id":"1279515160","predicate":"updateUserPinnedMessage","params":[{"name":"user_id","type":"int"},{"name":"id","type":"int"}],"type":"Update"},{"id":"-519195831","predicate":"updateChatPinnedMessage","params":[{"name":"chat_id","type":"int"},{"name":"id","type":"int"},{"name":"version","type":"int"}],"type":"Update"},{"id":"-1311015810","predicate":"inputNotifyBroadcasts","params":[],"type":"InputNotifyPeer"},{"id":"-703403793","predicate":"notifyBroadcasts","params":[],"type":"NotifyPeer"},{"id":"-311786236","predicate":"textSubscript","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"-939827711","predicate":"textSuperscript","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"55281185","predicate":"textMarked","params":[{"name":"text","type":"RichText"}],"type":"RichText"},{"id":"483104362","predicate":"textPhone","params":[{"name":"text","type":"RichText"},{"name":"phone","type":"string"}],"type":"RichText"},{"id":"136105807","predicate":"textImage","params":[{"name":"document_id","type":"long"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"RichText"},{"id":"504660880","predicate":"pageBlockKicker","params":[{"name":"text","type":"RichText"}],"type":"PageBlock"},{"id":"878078826","predicate":"pageTableCell","params":[{"name":"flags","type":"#"},{"name":"header","type":"flags.0?true"},{"name":"align_center","type":"flags.3?true"},{"name":"align_right","type":"flags.4?true"},{"name":"valign_middle","type":"flags.5?true"},{"name":"valign_bottom","type":"flags.6?true"},{"name":"text","type":"flags.7?RichText"},{"name":"colspan","type":"flags.1?int"},{"name":"rowspan","type":"flags.2?int"}],"type":"PageTableCell"},{"id":"-524237339","predicate":"pageTableRow","params":[{"name":"cells","type":"Vector"}],"type":"PageTableRow"},{"id":"-1085412734","predicate":"pageBlockTable","params":[{"name":"flags","type":"#"},{"name":"bordered","type":"flags.0?true"},{"name":"striped","type":"flags.1?true"},{"name":"title","type":"RichText"},{"name":"rows","type":"Vector"}],"type":"PageBlock"},{"id":"1869903447","predicate":"pageCaption","params":[{"name":"text","type":"RichText"},{"name":"credit","type":"RichText"}],"type":"PageCaption"},{"id":"-1188055347","predicate":"pageListItemText","params":[{"name":"text","type":"RichText"}],"type":"PageListItem"},{"id":"635466748","predicate":"pageListItemBlocks","params":[{"name":"blocks","type":"Vector"}],"type":"PageListItem"},{"id":"1577484359","predicate":"pageListOrderedItemText","params":[{"name":"num","type":"string"},{"name":"text","type":"RichText"}],"type":"PageListOrderedItem"},{"id":"-1730311882","predicate":"pageListOrderedItemBlocks","params":[{"name":"num","type":"string"},{"name":"blocks","type":"Vector"}],"type":"PageListOrderedItem"},{"id":"-1702174239","predicate":"pageBlockOrderedList","params":[{"name":"items","type":"Vector"}],"type":"PageBlock"},{"id":"1987480557","predicate":"pageBlockDetails","params":[{"name":"flags","type":"#"},{"name":"open","type":"flags.0?true"},{"name":"blocks","type":"Vector"},{"name":"title","type":"RichText"}],"type":"PageBlock"},{"id":"-1282352120","predicate":"pageRelatedArticle","params":[{"name":"flags","type":"#"},{"name":"url","type":"string"},{"name":"webpage_id","type":"long"},{"name":"title","type":"flags.0?string"},{"name":"description","type":"flags.1?string"},{"name":"photo_id","type":"flags.2?long"},{"name":"author","type":"flags.3?string"},{"name":"published_date","type":"flags.4?int"}],"type":"PageRelatedArticle"},{"id":"370236054","predicate":"pageBlockRelatedArticles","params":[{"name":"title","type":"RichText"},{"name":"articles","type":"Vector"}],"type":"PageBlock"},{"id":"-1538310410","predicate":"pageBlockMap","params":[{"name":"geo","type":"GeoPoint"},{"name":"zoom","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"caption","type":"PageCaption"}],"type":"PageBlock"},{"id":"-1366746132","predicate":"page","params":[{"name":"flags","type":"#"},{"name":"part","type":"flags.0?true"},{"name":"rtl","type":"flags.1?true"},{"name":"v2","type":"flags.2?true"},{"name":"url","type":"string"},{"name":"blocks","type":"Vector"},{"name":"photos","type":"Vector"},{"name":"documents","type":"Vector"}],"type":"Page"},{"id":"-610373422","predicate":"inputPrivacyKeyPhoneP2P","params":[],"type":"InputPrivacyKey"},{"id":"961092808","predicate":"privacyKeyPhoneP2P","params":[],"type":"PrivacyKey"},{"id":"894777186","predicate":"textAnchor","params":[{"name":"text","type":"RichText"},{"name":"name","type":"string"}],"type":"RichText"},{"id":"-1945767479","predicate":"help.supportName","params":[{"name":"name","type":"string"}],"type":"help.SupportName"},{"id":"-206688531","predicate":"help.userInfoEmpty","params":[],"type":"help.UserInfo"},{"id":"32192344","predicate":"help.userInfo","params":[{"name":"message","type":"string"},{"name":"entities","type":"Vector"},{"name":"author","type":"string"},{"name":"date","type":"int"}],"type":"help.UserInfo"},{"id":"-202219658","predicate":"messageActionContactSignUp","params":[],"type":"MessageAction"},{"id":"-1398708869","predicate":"updateMessagePoll","params":[{"name":"flags","type":"#"},{"name":"poll_id","type":"long"},{"name":"poll","type":"flags.0?Poll"},{"name":"results","type":"PollResults"}],"type":"Update"},{"id":"1823064809","predicate":"pollAnswer","params":[{"name":"text","type":"string"},{"name":"option","type":"bytes"}],"type":"PollAnswer"},{"id":"-716006138","predicate":"poll","params":[{"name":"id","type":"long"},{"name":"flags","type":"#"},{"name":"closed","type":"flags.0?true"},{"name":"public_voters","type":"flags.1?true"},{"name":"multiple_choice","type":"flags.2?true"},{"name":"quiz","type":"flags.3?true"},{"name":"question","type":"string"},{"name":"answers","type":"Vector"}],"type":"Poll"},{"id":"997055186","predicate":"pollAnswerVoters","params":[{"name":"flags","type":"#"},{"name":"chosen","type":"flags.0?true"},{"name":"correct","type":"flags.1?true"},{"name":"option","type":"bytes"},{"name":"voters","type":"int"}],"type":"PollAnswerVoters"},{"id":"1465219162","predicate":"pollResults","params":[{"name":"flags","type":"#"},{"name":"min","type":"flags.0?true"},{"name":"results","type":"flags.1?Vector"},{"name":"total_voters","type":"flags.2?int"}],"type":"PollResults"},{"id":"112424539","predicate":"inputMediaPoll","params":[{"name":"poll","type":"Poll"}],"type":"InputMedia"},{"id":"1272375192","predicate":"messageMediaPoll","params":[{"name":"poll","type":"Poll"},{"name":"results","type":"PollResults"}],"type":"MessageMedia"},{"id":"-264117680","predicate":"chatOnlines","params":[{"name":"onlines","type":"int"}],"type":"ChatOnlines"},{"id":"1202287072","predicate":"statsURL","params":[{"name":"url","type":"string"}],"type":"StatsURL"},{"id":"-525288402","predicate":"photoStrippedSize","params":[{"name":"type","type":"string"},{"name":"bytes","type":"bytes"}],"type":"PhotoSize"},{"id":"1605510357","predicate":"chatAdminRights","params":[{"name":"flags","type":"#"},{"name":"change_info","type":"flags.0?true"},{"name":"post_messages","type":"flags.1?true"},{"name":"edit_messages","type":"flags.2?true"},{"name":"delete_messages","type":"flags.3?true"},{"name":"ban_users","type":"flags.4?true"},{"name":"invite_users","type":"flags.5?true"},{"name":"pin_messages","type":"flags.7?true"},{"name":"add_admins","type":"flags.9?true"}],"type":"ChatAdminRights"},{"id":"-1626209256","predicate":"chatBannedRights","params":[{"name":"flags","type":"#"},{"name":"view_messages","type":"flags.0?true"},{"name":"send_messages","type":"flags.1?true"},{"name":"send_media","type":"flags.2?true"},{"name":"send_stickers","type":"flags.3?true"},{"name":"send_gifs","type":"flags.4?true"},{"name":"send_games","type":"flags.5?true"},{"name":"send_inline","type":"flags.6?true"},{"name":"embed_links","type":"flags.7?true"},{"name":"send_polls","type":"flags.8?true"},{"name":"change_info","type":"flags.10?true"},{"name":"invite_users","type":"flags.15?true"},{"name":"pin_messages","type":"flags.17?true"},{"name":"until_date","type":"int"}],"type":"ChatBannedRights"},{"id":"1421875280","predicate":"updateChatDefaultBannedRights","params":[{"name":"peer","type":"Peer"},{"name":"default_banned_rights","type":"ChatBannedRights"},{"name":"version","type":"int"}],"type":"Update"},{"id":"-433014407","predicate":"inputWallPaper","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputWallPaper"},{"id":"1913199744","predicate":"inputWallPaperSlug","params":[{"name":"slug","type":"string"}],"type":"InputWallPaper"},{"id":"-1150621555","predicate":"channelParticipantsContacts","params":[{"name":"q","type":"string"}],"type":"ChannelParticipantsFilter"},{"id":"771095562","predicate":"channelAdminLogEventActionDefaultBannedRights","params":[{"name":"prev_banned_rights","type":"ChatBannedRights"},{"name":"new_banned_rights","type":"ChatBannedRights"}],"type":"ChannelAdminLogEventAction"},{"id":"-1895328189","predicate":"channelAdminLogEventActionStopPoll","params":[{"name":"message","type":"Message"}],"type":"ChannelAdminLogEventAction"},{"id":"471437699","predicate":"account.wallPapersNotModified","params":[],"type":"account.WallPapers"},{"id":"1881892265","predicate":"account.wallPapers","params":[{"name":"hash","type":"int"},{"name":"wallpapers","type":"Vector"}],"type":"account.WallPapers"},{"id":"-557924733","predicate":"codeSettings","params":[{"name":"flags","type":"#"},{"name":"allow_flashcall","type":"flags.0?true"},{"name":"current_number","type":"flags.1?true"},{"name":"allow_app_hash","type":"flags.4?true"}],"type":"CodeSettings"},{"id":"84438264","predicate":"wallPaperSettings","params":[{"name":"flags","type":"#"},{"name":"blur","type":"flags.1?true"},{"name":"motion","type":"flags.2?true"},{"name":"background_color","type":"flags.0?int"},{"name":"second_background_color","type":"flags.4?int"},{"name":"intensity","type":"flags.3?int"},{"name":"rotation","type":"flags.4?int"}],"type":"WallPaperSettings"},{"id":"-532532493","predicate":"autoDownloadSettings","params":[{"name":"flags","type":"#"},{"name":"disabled","type":"flags.0?true"},{"name":"video_preload_large","type":"flags.1?true"},{"name":"audio_preload_next","type":"flags.2?true"},{"name":"phonecalls_less_data","type":"flags.3?true"},{"name":"photo_size_max","type":"int"},{"name":"video_size_max","type":"int"},{"name":"file_size_max","type":"int"},{"name":"video_upload_maxbitrate","type":"int"}],"type":"AutoDownloadSettings"},{"id":"1674235686","predicate":"account.autoDownloadSettings","params":[{"name":"low","type":"AutoDownloadSettings"},{"name":"medium","type":"AutoDownloadSettings"},{"name":"high","type":"AutoDownloadSettings"}],"type":"account.AutoDownloadSettings"},{"id":"-709641735","predicate":"emojiKeyword","params":[{"name":"keyword","type":"string"},{"name":"emoticons","type":"Vector"}],"type":"EmojiKeyword"},{"id":"594408994","predicate":"emojiKeywordDeleted","params":[{"name":"keyword","type":"string"},{"name":"emoticons","type":"Vector"}],"type":"EmojiKeyword"},{"id":"1556570557","predicate":"emojiKeywordsDifference","params":[{"name":"lang_code","type":"string"},{"name":"from_version","type":"int"},{"name":"version","type":"int"},{"name":"keywords","type":"Vector"}],"type":"EmojiKeywordsDifference"},{"id":"-1519029347","predicate":"emojiURL","params":[{"name":"url","type":"string"}],"type":"EmojiURL"},{"id":"-1275374751","predicate":"emojiLanguage","params":[{"name":"lang_code","type":"string"}],"type":"EmojiLanguage"},{"id":"-1529000952","predicate":"inputPrivacyKeyForwards","params":[],"type":"InputPrivacyKey"},{"id":"1777096355","predicate":"privacyKeyForwards","params":[],"type":"PrivacyKey"},{"id":"1461304012","predicate":"inputPrivacyKeyProfilePhoto","params":[],"type":"InputPrivacyKey"},{"id":"-1777000467","predicate":"privacyKeyProfilePhoto","params":[],"type":"PrivacyKey"},{"id":"-1132476723","predicate":"fileLocationToBeDeprecated","params":[{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"}],"type":"FileLocation"},{"id":"1075322878","predicate":"inputPhotoFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"thumb_size","type":"string"}],"type":"InputFileLocation"},{"id":"-667654413","predicate":"inputPhotoLegacyFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"file_reference","type":"bytes"},{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"}],"type":"InputFileLocation"},{"id":"668375447","predicate":"inputPeerPhotoFileLocation","params":[{"name":"flags","type":"#"},{"name":"big","type":"flags.0?true"},{"name":"peer","type":"InputPeer"},{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"}],"type":"InputFileLocation"},{"id":"230353641","predicate":"inputStickerSetThumb","params":[{"name":"stickerset","type":"InputStickerSet"},{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"}],"type":"InputFileLocation"},{"id":"-11252123","predicate":"folder","params":[{"name":"flags","type":"#"},{"name":"autofill_new_broadcasts","type":"flags.0?true"},{"name":"autofill_public_groups","type":"flags.1?true"},{"name":"autofill_new_correspondents","type":"flags.2?true"},{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"photo","type":"flags.3?ChatPhoto"}],"type":"Folder"},{"id":"1908216652","predicate":"dialogFolder","params":[{"name":"flags","type":"#"},{"name":"pinned","type":"flags.2?true"},{"name":"folder","type":"Folder"},{"name":"peer","type":"Peer"},{"name":"top_message","type":"int"},{"name":"unread_muted_peers_count","type":"int"},{"name":"unread_unmuted_peers_count","type":"int"},{"name":"unread_muted_messages_count","type":"int"},{"name":"unread_unmuted_messages_count","type":"int"}],"type":"Dialog"},{"id":"1684014375","predicate":"inputDialogPeerFolder","params":[{"name":"folder_id","type":"int"}],"type":"InputDialogPeer"},{"id":"1363483106","predicate":"dialogPeerFolder","params":[{"name":"folder_id","type":"int"}],"type":"DialogPeer"},{"id":"-70073706","predicate":"inputFolderPeer","params":[{"name":"peer","type":"InputPeer"},{"name":"folder_id","type":"int"}],"type":"InputFolderPeer"},{"id":"-373643672","predicate":"folderPeer","params":[{"name":"peer","type":"Peer"},{"name":"folder_id","type":"int"}],"type":"FolderPeer"},{"id":"422972864","predicate":"updateFolderPeers","params":[{"name":"folder_peers","type":"Vector"},{"name":"pts","type":"int"},{"name":"pts_count","type":"int"}],"type":"Update"},{"id":"756118935","predicate":"inputUserFromMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"user_id","type":"int"}],"type":"InputUser"},{"id":"707290417","predicate":"inputChannelFromMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"channel_id","type":"int"}],"type":"InputChannel"},{"id":"398123750","predicate":"inputPeerUserFromMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"user_id","type":"int"}],"type":"InputPeer"},{"id":"-1667893317","predicate":"inputPeerChannelFromMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"channel_id","type":"int"}],"type":"InputPeer"},{"id":"55761658","predicate":"inputPrivacyKeyPhoneNumber","params":[],"type":"InputPrivacyKey"},{"id":"-778378131","predicate":"privacyKeyPhoneNumber","params":[],"type":"PrivacyKey"},{"id":"-1472172887","predicate":"topPeerCategoryForwardUsers","params":[],"type":"TopPeerCategory"},{"id":"-68239120","predicate":"topPeerCategoryForwardChats","params":[],"type":"TopPeerCategory"},{"id":"-1569748965","predicate":"channelAdminLogEventActionChangeLinkedChat","params":[{"name":"prev_value","type":"int"},{"name":"new_value","type":"int"}],"type":"ChannelAdminLogEventAction"},{"id":"-398136321","predicate":"messages.searchCounter","params":[{"name":"flags","type":"#"},{"name":"inexact","type":"flags.1?true"},{"name":"filter","type":"MessagesFilter"},{"name":"count","type":"int"}],"type":"messages.SearchCounter"},{"id":"280464681","predicate":"keyboardButtonUrlAuth","params":[{"name":"flags","type":"#"},{"name":"text","type":"string"},{"name":"fwd_text","type":"flags.0?string"},{"name":"url","type":"string"},{"name":"button_id","type":"int"}],"type":"KeyboardButton"},{"id":"-802258988","predicate":"inputKeyboardButtonUrlAuth","params":[{"name":"flags","type":"#"},{"name":"request_write_access","type":"flags.0?true"},{"name":"text","type":"string"},{"name":"fwd_text","type":"flags.1?string"},{"name":"url","type":"string"},{"name":"bot","type":"InputUser"}],"type":"KeyboardButton"},{"id":"-1831650802","predicate":"urlAuthResultRequest","params":[{"name":"flags","type":"#"},{"name":"request_write_access","type":"flags.0?true"},{"name":"bot","type":"User"},{"name":"domain","type":"string"}],"type":"UrlAuthResult"},{"id":"-1886646706","predicate":"urlAuthResultAccepted","params":[{"name":"url","type":"string"}],"type":"UrlAuthResult"},{"id":"-1445536993","predicate":"urlAuthResultDefault","params":[],"type":"UrlAuthResult"},{"id":"1283572154","predicate":"inputPrivacyValueAllowChatParticipants","params":[{"name":"chats","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"-668769361","predicate":"inputPrivacyValueDisallowChatParticipants","params":[{"name":"chats","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"415136107","predicate":"privacyValueAllowChatParticipants","params":[{"name":"chats","type":"Vector"}],"type":"PrivacyRule"},{"id":"-1397881200","predicate":"privacyValueDisallowChatParticipants","params":[{"name":"chats","type":"Vector"}],"type":"PrivacyRule"},{"id":"-1672577397","predicate":"messageEntityUnderline","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"-1090087980","predicate":"messageEntityStrike","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"34469328","predicate":"messageEntityBlockquote","params":[{"name":"offset","type":"int"},{"name":"length","type":"int"}],"type":"MessageEntity"},{"id":"1786671974","predicate":"updatePeerSettings","params":[{"name":"peer","type":"Peer"},{"name":"settings","type":"PeerSettings"}],"type":"Update"},{"id":"-1078612597","predicate":"channelLocationEmpty","params":[],"type":"ChannelLocation"},{"id":"547062491","predicate":"channelLocation","params":[{"name":"geo_point","type":"GeoPoint"},{"name":"address","type":"string"}],"type":"ChannelLocation"},{"id":"-901375139","predicate":"peerLocated","params":[{"name":"peer","type":"Peer"},{"name":"expires","type":"int"},{"name":"distance","type":"int"}],"type":"PeerLocated"},{"id":"-1263546448","predicate":"updatePeerLocated","params":[{"name":"peers","type":"Vector"}],"type":"Update"},{"id":"241923758","predicate":"channelAdminLogEventActionChangeLocation","params":[{"name":"prev_value","type":"ChannelLocation"},{"name":"new_value","type":"ChannelLocation"}],"type":"ChannelAdminLogEventAction"},{"id":"-606798099","predicate":"inputReportReasonGeoIrrelevant","params":[],"type":"ReportReason"},{"id":"1401984889","predicate":"channelAdminLogEventActionToggleSlowMode","params":[{"name":"prev_value","type":"int"},{"name":"new_value","type":"int"}],"type":"ChannelAdminLogEventAction"},{"id":"1148485274","predicate":"auth.authorizationSignUpRequired","params":[{"name":"flags","type":"#"},{"name":"terms_of_service","type":"flags.0?help.TermsOfService"}],"type":"auth.Authorization"},{"id":"-666824391","predicate":"payments.paymentVerificationNeeded","params":[{"name":"url","type":"string"}],"type":"payments.PaymentResult"},{"id":"42402760","predicate":"inputStickerSetAnimatedEmoji","params":[],"type":"InputStickerSet"},{"id":"967122427","predicate":"updateNewScheduledMessage","params":[{"name":"message","type":"Message"}],"type":"Update"},{"id":"-1870238482","predicate":"updateDeleteScheduledMessages","params":[{"name":"peer","type":"Peer"},{"name":"messages","type":"Vector"}],"type":"Update"},{"id":"-797791052","predicate":"restrictionReason","params":[{"name":"platform","type":"string"},{"name":"reason","type":"string"},{"name":"text","type":"string"}],"type":"RestrictionReason"},{"id":"1012306921","predicate":"inputTheme","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputTheme"},{"id":"-175567375","predicate":"inputThemeSlug","params":[{"name":"slug","type":"string"}],"type":"InputTheme"},{"id":"42930452","predicate":"theme","params":[{"name":"flags","type":"#"},{"name":"creator","type":"flags.0?true"},{"name":"default","type":"flags.1?true"},{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"slug","type":"string"},{"name":"title","type":"string"},{"name":"document","type":"flags.2?Document"},{"name":"settings","type":"flags.3?ThemeSettings"},{"name":"installs_count","type":"int"}],"type":"Theme"},{"id":"-199313886","predicate":"account.themesNotModified","params":[],"type":"account.Themes"},{"id":"2137482273","predicate":"account.themes","params":[{"name":"hash","type":"int"},{"name":"themes","type":"Vector"}],"type":"account.Themes"},{"id":"-2112423005","predicate":"updateTheme","params":[{"name":"theme","type":"Theme"}],"type":"Update"},{"id":"-786326563","predicate":"inputPrivacyKeyAddedByPhone","params":[],"type":"InputPrivacyKey"},{"id":"1124062251","predicate":"privacyKeyAddedByPhone","params":[],"type":"PrivacyKey"},{"id":"-2027964103","predicate":"updateGeoLiveViewed","params":[{"name":"peer","type":"Peer"},{"name":"msg_id","type":"int"}],"type":"Update"},{"id":"1448076945","predicate":"updateLoginToken","params":[],"type":"Update"},{"id":"1654593920","predicate":"auth.loginToken","params":[{"name":"expires","type":"int"},{"name":"token","type":"bytes"}],"type":"auth.LoginToken"},{"id":"110008598","predicate":"auth.loginTokenMigrateTo","params":[{"name":"dc_id","type":"int"},{"name":"token","type":"bytes"}],"type":"auth.LoginToken"},{"id":"957176926","predicate":"auth.loginTokenSuccess","params":[{"name":"authorization","type":"auth.Authorization"}],"type":"auth.LoginToken"},{"id":"1474462241","predicate":"account.contentSettings","params":[{"name":"flags","type":"#"},{"name":"sensitive_enabled","type":"flags.0?true"},{"name":"sensitive_can_change","type":"flags.1?true"}],"type":"account.ContentSettings"},{"id":"-1456996667","predicate":"messages.inactiveChats","params":[{"name":"dates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.InactiveChats"},{"id":"-1012849566","predicate":"baseThemeClassic","params":[],"type":"BaseTheme"},{"id":"-69724536","predicate":"baseThemeDay","params":[],"type":"BaseTheme"},{"id":"-1212997976","predicate":"baseThemeNight","params":[],"type":"BaseTheme"},{"id":"1834973166","predicate":"baseThemeTinted","params":[],"type":"BaseTheme"},{"id":"1527845466","predicate":"baseThemeArctic","params":[],"type":"BaseTheme"},{"id":"-2077770836","predicate":"inputWallPaperNoFile","params":[],"type":"InputWallPaper"},{"id":"-1963717851","predicate":"wallPaperNoFile","params":[{"name":"flags","type":"#"},{"name":"default","type":"flags.1?true"},{"name":"dark","type":"flags.4?true"},{"name":"settings","type":"flags.2?WallPaperSettings"}],"type":"WallPaper"},{"id":"-1118798639","predicate":"inputThemeSettings","params":[{"name":"flags","type":"#"},{"name":"base_theme","type":"BaseTheme"},{"name":"accent_color","type":"int"},{"name":"message_top_color","type":"flags.0?int"},{"name":"message_bottom_color","type":"flags.0?int"},{"name":"wallpaper","type":"flags.1?InputWallPaper"},{"name":"wallpaper_settings","type":"flags.1?WallPaperSettings"}],"type":"InputThemeSettings"},{"id":"-1676371894","predicate":"themeSettings","params":[{"name":"flags","type":"#"},{"name":"base_theme","type":"BaseTheme"},{"name":"accent_color","type":"int"},{"name":"message_top_color","type":"flags.0?int"},{"name":"message_bottom_color","type":"flags.0?int"},{"name":"wallpaper","type":"flags.1?WallPaper"}],"type":"ThemeSettings"},{"id":"1421174295","predicate":"webPageAttributeTheme","params":[{"name":"flags","type":"#"},{"name":"documents","type":"flags.0?Vector"},{"name":"settings","type":"flags.1?ThemeSettings"}],"type":"WebPageAttribute"}],"methods":[{"id":"-878758099","method":"invokeAfterMsg","params":[{"name":"msg_id","type":"long"},{"name":"query","type":"!X"}],"type":"X"},{"id":"1036301552","method":"invokeAfterMsgs","params":[{"name":"msg_ids","type":"Vector"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1502141361","method":"auth.sendCode","params":[{"name":"phone_number","type":"string"},{"name":"api_id","type":"int"},{"name":"api_hash","type":"string"},{"name":"settings","type":"CodeSettings"}],"type":"auth.SentCode"},{"id":"-2131827673","method":"auth.signUp","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"auth.Authorization"},{"id":"-1126886015","method":"auth.signIn","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"auth.Authorization"},{"id":"1461180992","method":"auth.logOut","params":[],"type":"Bool"},{"id":"-1616179942","method":"auth.resetAuthorizations","params":[],"type":"Bool"},{"id":"-440401971","method":"auth.exportAuthorization","params":[{"name":"dc_id","type":"int"}],"type":"auth.ExportedAuthorization"},{"id":"-470837741","method":"auth.importAuthorization","params":[{"name":"id","type":"int"},{"name":"bytes","type":"bytes"}],"type":"auth.Authorization"},{"id":"-841733627","method":"auth.bindTempAuthKey","params":[{"name":"perm_auth_key_id","type":"long"},{"name":"nonce","type":"long"},{"name":"expires_at","type":"int"},{"name":"encrypted_message","type":"bytes"}],"type":"Bool"},{"id":"1754754159","method":"account.registerDevice","params":[{"name":"flags","type":"#"},{"name":"no_muted","type":"flags.0?true"},{"name":"token_type","type":"int"},{"name":"token","type":"string"},{"name":"app_sandbox","type":"Bool"},{"name":"secret","type":"bytes"},{"name":"other_uids","type":"Vector"}],"type":"Bool"},{"id":"813089983","method":"account.unregisterDevice","params":[{"name":"token_type","type":"int"},{"name":"token","type":"string"},{"name":"other_uids","type":"Vector"}],"type":"Bool"},{"id":"-2067899501","method":"account.updateNotifySettings","params":[{"name":"peer","type":"InputNotifyPeer"},{"name":"settings","type":"InputPeerNotifySettings"}],"type":"Bool"},{"id":"313765169","method":"account.getNotifySettings","params":[{"name":"peer","type":"InputNotifyPeer"}],"type":"PeerNotifySettings"},{"id":"-612493497","method":"account.resetNotifySettings","params":[],"type":"Bool"},{"id":"2018596725","method":"account.updateProfile","params":[{"name":"flags","type":"#"},{"name":"first_name","type":"flags.0?string"},{"name":"last_name","type":"flags.1?string"},{"name":"about","type":"flags.2?string"}],"type":"User"},{"id":"1713919532","method":"account.updateStatus","params":[{"name":"offline","type":"Bool"}],"type":"Bool"},{"id":"-1430579357","method":"account.getWallPapers","params":[{"name":"hash","type":"int"}],"type":"account.WallPapers"},{"id":"-1374118561","method":"account.reportPeer","params":[{"name":"peer","type":"InputPeer"},{"name":"reason","type":"ReportReason"}],"type":"Bool"},{"id":"227648840","method":"users.getUsers","params":[{"name":"id","type":"Vector"}],"type":"Vector"},{"id":"-902781519","method":"users.getFullUser","params":[{"name":"id","type":"InputUser"}],"type":"UserFull"},{"id":"749357634","method":"contacts.getContactIDs","params":[{"name":"hash","type":"int"}],"type":"Vector"},{"id":"-995929106","method":"contacts.getStatuses","params":[],"type":"Vector"},{"id":"-1071414113","method":"contacts.getContacts","params":[{"name":"hash","type":"int"}],"type":"contacts.Contacts"},{"id":"746589157","method":"contacts.importContacts","params":[{"name":"contacts","type":"Vector"}],"type":"contacts.ImportedContacts"},{"id":"157945344","method":"contacts.deleteContacts","params":[{"name":"id","type":"Vector"}],"type":"Updates"},{"id":"269745566","method":"contacts.deleteByPhones","params":[{"name":"phones","type":"Vector"}],"type":"Bool"},{"id":"858475004","method":"contacts.block","params":[{"name":"id","type":"InputUser"}],"type":"Bool"},{"id":"-448724803","method":"contacts.unblock","params":[{"name":"id","type":"InputUser"}],"type":"Bool"},{"id":"-176409329","method":"contacts.getBlocked","params":[{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"contacts.Blocked"},{"id":"1673946374","method":"messages.getMessages","params":[{"name":"id","type":"Vector"}],"type":"messages.Messages"},{"id":"-1594999949","method":"messages.getDialogs","params":[{"name":"flags","type":"#"},{"name":"exclude_pinned","type":"flags.0?true"},{"name":"folder_id","type":"flags.1?int"},{"name":"offset_date","type":"int"},{"name":"offset_id","type":"int"},{"name":"offset_peer","type":"InputPeer"},{"name":"limit","type":"int"},{"name":"hash","type":"int"}],"type":"messages.Dialogs"},{"id":"-591691168","method":"messages.getHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"offset_id","type":"int"},{"name":"offset_date","type":"int"},{"name":"add_offset","type":"int"},{"name":"limit","type":"int"},{"name":"max_id","type":"int"},{"name":"min_id","type":"int"},{"name":"hash","type":"int"}],"type":"messages.Messages"},{"id":"-2045448344","method":"messages.search","params":[{"name":"flags","type":"#"},{"name":"peer","type":"InputPeer"},{"name":"q","type":"string"},{"name":"from_id","type":"flags.0?InputUser"},{"name":"filter","type":"MessagesFilter"},{"name":"min_date","type":"int"},{"name":"max_date","type":"int"},{"name":"offset_id","type":"int"},{"name":"add_offset","type":"int"},{"name":"limit","type":"int"},{"name":"max_id","type":"int"},{"name":"min_id","type":"int"},{"name":"hash","type":"int"}],"type":"messages.Messages"},{"id":"238054714","method":"messages.readHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"max_id","type":"int"}],"type":"messages.AffectedMessages"},{"id":"469850889","method":"messages.deleteHistory","params":[{"name":"flags","type":"#"},{"name":"just_clear","type":"flags.0?true"},{"name":"revoke","type":"flags.1?true"},{"name":"peer","type":"InputPeer"},{"name":"max_id","type":"int"}],"type":"messages.AffectedHistory"},{"id":"-443640366","method":"messages.deleteMessages","params":[{"name":"flags","type":"#"},{"name":"revoke","type":"flags.0?true"},{"name":"id","type":"Vector"}],"type":"messages.AffectedMessages"},{"id":"94983360","method":"messages.receivedMessages","params":[{"name":"max_id","type":"int"}],"type":"Vector"},{"id":"-1551737264","method":"messages.setTyping","params":[{"name":"peer","type":"InputPeer"},{"name":"action","type":"SendMessageAction"}],"type":"Bool"},{"id":"1376532592","method":"messages.sendMessage","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"clear_draft","type":"flags.7?true"},{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"message","type":"string"},{"name":"random_id","type":"long"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"},{"name":"entities","type":"flags.3?Vector"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"881978281","method":"messages.sendMedia","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"clear_draft","type":"flags.7?true"},{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"media","type":"InputMedia"},{"name":"message","type":"string"},{"name":"random_id","type":"long"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"},{"name":"entities","type":"flags.3?Vector"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"-637606386","method":"messages.forwardMessages","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"with_my_score","type":"flags.8?true"},{"name":"grouped","type":"flags.9?true"},{"name":"from_peer","type":"InputPeer"},{"name":"id","type":"Vector"},{"name":"random_id","type":"Vector"},{"name":"to_peer","type":"InputPeer"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"-820669733","method":"messages.reportSpam","params":[{"name":"peer","type":"InputPeer"}],"type":"Bool"},{"id":"913498268","method":"messages.getPeerSettings","params":[{"name":"peer","type":"InputPeer"}],"type":"PeerSettings"},{"id":"-1115507112","method":"messages.report","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"},{"name":"reason","type":"ReportReason"}],"type":"Bool"},{"id":"1013621127","method":"messages.getChats","params":[{"name":"id","type":"Vector"}],"type":"messages.Chats"},{"id":"998448230","method":"messages.getFullChat","params":[{"name":"chat_id","type":"int"}],"type":"messages.ChatFull"},{"id":"-599447467","method":"messages.editChatTitle","params":[{"name":"chat_id","type":"int"},{"name":"title","type":"string"}],"type":"Updates"},{"id":"-900957736","method":"messages.editChatPhoto","params":[{"name":"chat_id","type":"int"},{"name":"photo","type":"InputChatPhoto"}],"type":"Updates"},{"id":"-106911223","method":"messages.addChatUser","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"InputUser"},{"name":"fwd_limit","type":"int"}],"type":"Updates"},{"id":"-530505962","method":"messages.deleteChatUser","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"InputUser"}],"type":"Updates"},{"id":"164303470","method":"messages.createChat","params":[{"name":"users","type":"Vector"},{"name":"title","type":"string"}],"type":"Updates"},{"id":"-304838614","method":"updates.getState","params":[],"type":"updates.State"},{"id":"630429265","method":"updates.getDifference","params":[{"name":"flags","type":"#"},{"name":"pts","type":"int"},{"name":"pts_total_limit","type":"flags.0?int"},{"name":"date","type":"int"},{"name":"qts","type":"int"}],"type":"updates.Difference"},{"id":"-256159406","method":"photos.updateProfilePhoto","params":[{"name":"id","type":"InputPhoto"}],"type":"UserProfilePhoto"},{"id":"1328726168","method":"photos.uploadProfilePhoto","params":[{"name":"file","type":"InputFile"}],"type":"photos.Photo"},{"id":"-2016444625","method":"photos.deletePhotos","params":[{"name":"id","type":"Vector"}],"type":"Vector"},{"id":"-1291540959","method":"upload.saveFilePart","params":[{"name":"file_id","type":"long"},{"name":"file_part","type":"int"},{"name":"bytes","type":"bytes"}],"type":"Bool"},{"id":"-1319462148","method":"upload.getFile","params":[{"name":"flags","type":"#"},{"name":"precise","type":"flags.0?true"},{"name":"cdn_supported","type":"flags.1?true"},{"name":"location","type":"InputFileLocation"},{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"upload.File"},{"id":"-990308245","method":"help.getConfig","params":[],"type":"Config"},{"id":"531836966","method":"help.getNearestDc","params":[],"type":"NearestDc"},{"id":"1378703997","method":"help.getAppUpdate","params":[{"name":"source","type":"string"}],"type":"help.AppUpdate"},{"id":"1295590211","method":"help.getInviteText","params":[],"type":"help.InviteText"},{"id":"-1848823128","method":"photos.getUserPhotos","params":[{"name":"user_id","type":"InputUser"},{"name":"offset","type":"int"},{"name":"max_id","type":"long"},{"name":"limit","type":"int"}],"type":"photos.Photos"},{"id":"651135312","method":"messages.getDhConfig","params":[{"name":"version","type":"int"},{"name":"random_length","type":"int"}],"type":"messages.DhConfig"},{"id":"-162681021","method":"messages.requestEncryption","params":[{"name":"user_id","type":"InputUser"},{"name":"random_id","type":"int"},{"name":"g_a","type":"bytes"}],"type":"EncryptedChat"},{"id":"1035731989","method":"messages.acceptEncryption","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"g_b","type":"bytes"},{"name":"key_fingerprint","type":"long"}],"type":"EncryptedChat"},{"id":"-304536635","method":"messages.discardEncryption","params":[{"name":"chat_id","type":"int"}],"type":"Bool"},{"id":"2031374829","method":"messages.setEncryptedTyping","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"typing","type":"Bool"}],"type":"Bool"},{"id":"2135648522","method":"messages.readEncryptedHistory","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"max_date","type":"int"}],"type":"Bool"},{"id":"-1451792525","method":"messages.sendEncrypted","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"}],"type":"messages.SentEncryptedMessage"},{"id":"-1701831834","method":"messages.sendEncryptedFile","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"},{"name":"file","type":"InputEncryptedFile"}],"type":"messages.SentEncryptedMessage"},{"id":"852769188","method":"messages.sendEncryptedService","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"}],"type":"messages.SentEncryptedMessage"},{"id":"1436924774","method":"messages.receivedQueue","params":[{"name":"max_qts","type":"int"}],"type":"Vector"},{"id":"1259113487","method":"messages.reportEncryptedSpam","params":[{"name":"peer","type":"InputEncryptedChat"}],"type":"Bool"},{"id":"-562337987","method":"upload.saveBigFilePart","params":[{"name":"file_id","type":"long"},{"name":"file_part","type":"int"},{"name":"file_total_parts","type":"int"},{"name":"bytes","type":"bytes"}],"type":"Bool"},{"id":"2018609336","method":"initConnection","params":[{"name":"flags","type":"#"},{"name":"api_id","type":"int"},{"name":"device_model","type":"string"},{"name":"system_version","type":"string"},{"name":"app_version","type":"string"},{"name":"system_lang_code","type":"string"},{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"},{"name":"proxy","type":"flags.0?InputClientProxy"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1663104819","method":"help.getSupport","params":[],"type":"help.Support"},{"id":"916930423","method":"messages.readMessageContents","params":[{"name":"id","type":"Vector"}],"type":"messages.AffectedMessages"},{"id":"655677548","method":"account.checkUsername","params":[{"name":"username","type":"string"}],"type":"Bool"},{"id":"1040964988","method":"account.updateUsername","params":[{"name":"username","type":"string"}],"type":"User"},{"id":"301470424","method":"contacts.search","params":[{"name":"q","type":"string"},{"name":"limit","type":"int"}],"type":"contacts.Found"},{"id":"-623130288","method":"account.getPrivacy","params":[{"name":"key","type":"InputPrivacyKey"}],"type":"account.PrivacyRules"},{"id":"-906486552","method":"account.setPrivacy","params":[{"name":"key","type":"InputPrivacyKey"},{"name":"rules","type":"Vector"}],"type":"account.PrivacyRules"},{"id":"1099779595","method":"account.deleteAccount","params":[{"name":"reason","type":"string"}],"type":"Bool"},{"id":"150761757","method":"account.getAccountTTL","params":[],"type":"AccountDaysTTL"},{"id":"608323678","method":"account.setAccountTTL","params":[{"name":"ttl","type":"AccountDaysTTL"}],"type":"Bool"},{"id":"-627372787","method":"invokeWithLayer","params":[{"name":"layer","type":"int"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-113456221","method":"contacts.resolveUsername","params":[{"name":"username","type":"string"}],"type":"contacts.ResolvedPeer"},{"id":"-2108208411","method":"account.sendChangePhoneCode","params":[{"name":"phone_number","type":"string"},{"name":"settings","type":"CodeSettings"}],"type":"auth.SentCode"},{"id":"1891839707","method":"account.changePhone","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"User"},{"id":"71126828","method":"messages.getStickers","params":[{"name":"emoticon","type":"string"},{"name":"hash","type":"int"}],"type":"messages.Stickers"},{"id":"479598769","method":"messages.getAllStickers","params":[{"name":"hash","type":"int"}],"type":"messages.AllStickers"},{"id":"954152242","method":"account.updateDeviceLocked","params":[{"name":"period","type":"int"}],"type":"Bool"},{"id":"1738800940","method":"auth.importBotAuthorization","params":[{"name":"flags","type":"int"},{"name":"api_id","type":"int"},{"name":"api_hash","type":"string"},{"name":"bot_auth_token","type":"string"}],"type":"auth.Authorization"},{"id":"-1956073268","method":"messages.getWebPagePreview","params":[{"name":"flags","type":"#"},{"name":"message","type":"string"},{"name":"entities","type":"flags.3?Vector"}],"type":"MessageMedia"},{"id":"-484392616","method":"account.getAuthorizations","params":[],"type":"account.Authorizations"},{"id":"-545786948","method":"account.resetAuthorization","params":[{"name":"hash","type":"long"}],"type":"Bool"},{"id":"1418342645","method":"account.getPassword","params":[],"type":"account.Password"},{"id":"-1663767815","method":"account.getPasswordSettings","params":[{"name":"password","type":"InputCheckPasswordSRP"}],"type":"account.PasswordSettings"},{"id":"-1516564433","method":"account.updatePasswordSettings","params":[{"name":"password","type":"InputCheckPasswordSRP"},{"name":"new_settings","type":"account.PasswordInputSettings"}],"type":"Bool"},{"id":"-779399914","method":"auth.checkPassword","params":[{"name":"password","type":"InputCheckPasswordSRP"}],"type":"auth.Authorization"},{"id":"-661144474","method":"auth.requestPasswordRecovery","params":[],"type":"auth.PasswordRecovery"},{"id":"1319464594","method":"auth.recoverPassword","params":[{"name":"code","type":"string"}],"type":"auth.Authorization"},{"id":"-1080796745","method":"invokeWithoutUpdates","params":[{"name":"query","type":"!X"}],"type":"X"},{"id":"234312524","method":"messages.exportChatInvite","params":[{"name":"peer","type":"InputPeer"}],"type":"ExportedChatInvite"},{"id":"1051570619","method":"messages.checkChatInvite","params":[{"name":"hash","type":"string"}],"type":"ChatInvite"},{"id":"1817183516","method":"messages.importChatInvite","params":[{"name":"hash","type":"string"}],"type":"Updates"},{"id":"639215886","method":"messages.getStickerSet","params":[{"name":"stickerset","type":"InputStickerSet"}],"type":"messages.StickerSet"},{"id":"-946871200","method":"messages.installStickerSet","params":[{"name":"stickerset","type":"InputStickerSet"},{"name":"archived","type":"Bool"}],"type":"messages.StickerSetInstallResult"},{"id":"-110209570","method":"messages.uninstallStickerSet","params":[{"name":"stickerset","type":"InputStickerSet"}],"type":"Bool"},{"id":"-421563528","method":"messages.startBot","params":[{"name":"bot","type":"InputUser"},{"name":"peer","type":"InputPeer"},{"name":"random_id","type":"long"},{"name":"start_param","type":"string"}],"type":"Updates"},{"id":"-1877938321","method":"help.getAppChangelog","params":[{"name":"prev_app_version","type":"string"}],"type":"Updates"},{"id":"-993483427","method":"messages.getMessagesViews","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"},{"name":"increment","type":"Bool"}],"type":"Vector"},{"id":"-871347913","method":"channels.readHistory","params":[{"name":"channel","type":"InputChannel"},{"name":"max_id","type":"int"}],"type":"Bool"},{"id":"-2067661490","method":"channels.deleteMessages","params":[{"name":"channel","type":"InputChannel"},{"name":"id","type":"Vector"}],"type":"messages.AffectedMessages"},{"id":"-787622117","method":"channels.deleteUserHistory","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"}],"type":"messages.AffectedHistory"},{"id":"-32999408","method":"channels.reportSpam","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"},{"name":"id","type":"Vector"}],"type":"Bool"},{"id":"-1383294429","method":"channels.getMessages","params":[{"name":"channel","type":"InputChannel"},{"name":"id","type":"Vector"}],"type":"messages.Messages"},{"id":"306054633","method":"channels.getParticipants","params":[{"name":"channel","type":"InputChannel"},{"name":"filter","type":"ChannelParticipantsFilter"},{"name":"offset","type":"int"},{"name":"limit","type":"int"},{"name":"hash","type":"int"}],"type":"channels.ChannelParticipants"},{"id":"1416484774","method":"channels.getParticipant","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"}],"type":"channels.ChannelParticipant"},{"id":"176122811","method":"channels.getChannels","params":[{"name":"id","type":"Vector"}],"type":"messages.Chats"},{"id":"141781513","method":"channels.getFullChannel","params":[{"name":"channel","type":"InputChannel"}],"type":"messages.ChatFull"},{"id":"1029681423","method":"channels.createChannel","params":[{"name":"flags","type":"#"},{"name":"broadcast","type":"flags.0?true"},{"name":"megagroup","type":"flags.1?true"},{"name":"title","type":"string"},{"name":"about","type":"string"},{"name":"geo_point","type":"flags.2?InputGeoPoint"},{"name":"address","type":"flags.2?string"}],"type":"Updates"},{"id":"-751007486","method":"channels.editAdmin","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"},{"name":"admin_rights","type":"ChatAdminRights"},{"name":"rank","type":"string"}],"type":"Updates"},{"id":"1450044624","method":"channels.editTitle","params":[{"name":"channel","type":"InputChannel"},{"name":"title","type":"string"}],"type":"Updates"},{"id":"-248621111","method":"channels.editPhoto","params":[{"name":"channel","type":"InputChannel"},{"name":"photo","type":"InputChatPhoto"}],"type":"Updates"},{"id":"283557164","method":"channels.checkUsername","params":[{"name":"channel","type":"InputChannel"},{"name":"username","type":"string"}],"type":"Bool"},{"id":"890549214","method":"channels.updateUsername","params":[{"name":"channel","type":"InputChannel"},{"name":"username","type":"string"}],"type":"Bool"},{"id":"615851205","method":"channels.joinChannel","params":[{"name":"channel","type":"InputChannel"}],"type":"Updates"},{"id":"-130635115","method":"channels.leaveChannel","params":[{"name":"channel","type":"InputChannel"}],"type":"Updates"},{"id":"429865580","method":"channels.inviteToChannel","params":[{"name":"channel","type":"InputChannel"},{"name":"users","type":"Vector"}],"type":"Updates"},{"id":"-1072619549","method":"channels.deleteChannel","params":[{"name":"channel","type":"InputChannel"}],"type":"Updates"},{"id":"51854712","method":"updates.getChannelDifference","params":[{"name":"flags","type":"#"},{"name":"force","type":"flags.0?true"},{"name":"channel","type":"InputChannel"},{"name":"filter","type":"ChannelMessagesFilter"},{"name":"pts","type":"int"},{"name":"limit","type":"int"}],"type":"updates.ChannelDifference"},{"id":"-1444503762","method":"messages.editChatAdmin","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"InputUser"},{"name":"is_admin","type":"Bool"}],"type":"Bool"},{"id":"363051235","method":"messages.migrateChat","params":[{"name":"chat_id","type":"int"}],"type":"Updates"},{"id":"-1083038300","method":"messages.searchGlobal","params":[{"name":"flags","type":"#"},{"name":"folder_id","type":"flags.0?int"},{"name":"q","type":"string"},{"name":"offset_rate","type":"int"},{"name":"offset_peer","type":"InputPeer"},{"name":"offset_id","type":"int"},{"name":"limit","type":"int"}],"type":"messages.Messages"},{"id":"2016638777","method":"messages.reorderStickerSets","params":[{"name":"flags","type":"#"},{"name":"masks","type":"flags.0?true"},{"name":"order","type":"Vector"}],"type":"Bool"},{"id":"864953444","method":"messages.getDocumentByHash","params":[{"name":"sha256","type":"bytes"},{"name":"size","type":"int"},{"name":"mime_type","type":"string"}],"type":"Document"},{"id":"-1080395925","method":"messages.searchGifs","params":[{"name":"q","type":"string"},{"name":"offset","type":"int"}],"type":"messages.FoundGifs"},{"id":"-2084618926","method":"messages.getSavedGifs","params":[{"name":"hash","type":"int"}],"type":"messages.SavedGifs"},{"id":"846868683","method":"messages.saveGif","params":[{"name":"id","type":"InputDocument"},{"name":"unsave","type":"Bool"}],"type":"Bool"},{"id":"1364105629","method":"messages.getInlineBotResults","params":[{"name":"flags","type":"#"},{"name":"bot","type":"InputUser"},{"name":"peer","type":"InputPeer"},{"name":"geo_point","type":"flags.0?InputGeoPoint"},{"name":"query","type":"string"},{"name":"offset","type":"string"}],"type":"messages.BotResults"},{"id":"-346119674","method":"messages.setInlineBotResults","params":[{"name":"flags","type":"#"},{"name":"gallery","type":"flags.0?true"},{"name":"private","type":"flags.1?true"},{"name":"query_id","type":"long"},{"name":"results","type":"Vector"},{"name":"cache_time","type":"int"},{"name":"next_offset","type":"flags.2?string"},{"name":"switch_pm","type":"flags.3?InlineBotSwitchPM"}],"type":"Bool"},{"id":"570955184","method":"messages.sendInlineBotResult","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"clear_draft","type":"flags.7?true"},{"name":"hide_via","type":"flags.11?true"},{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"random_id","type":"long"},{"name":"query_id","type":"long"},{"name":"id","type":"string"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"-826838685","method":"channels.exportMessageLink","params":[{"name":"channel","type":"InputChannel"},{"name":"id","type":"int"},{"name":"grouped","type":"Bool"}],"type":"ExportedMessageLink"},{"id":"527021574","method":"channels.toggleSignatures","params":[{"name":"channel","type":"InputChannel"},{"name":"enabled","type":"Bool"}],"type":"Updates"},{"id":"1056025023","method":"auth.resendCode","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"}],"type":"auth.SentCode"},{"id":"520357240","method":"auth.cancelCode","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"}],"type":"Bool"},{"id":"-39416522","method":"messages.getMessageEditData","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"}],"type":"messages.MessageEditData"},{"id":"1224152952","method":"messages.editMessage","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"},{"name":"message","type":"flags.11?string"},{"name":"media","type":"flags.14?InputMedia"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"},{"name":"entities","type":"flags.3?Vector"},{"name":"schedule_date","type":"flags.15?int"}],"type":"Updates"},{"id":"-2091549254","method":"messages.editInlineBotMessage","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"id","type":"InputBotInlineMessageID"},{"name":"message","type":"flags.11?string"},{"name":"media","type":"flags.14?InputMedia"},{"name":"reply_markup","type":"flags.2?ReplyMarkup"},{"name":"entities","type":"flags.3?Vector"}],"type":"Bool"},{"id":"-2130010132","method":"messages.getBotCallbackAnswer","params":[{"name":"flags","type":"#"},{"name":"game","type":"flags.1?true"},{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"data","type":"flags.0?bytes"}],"type":"messages.BotCallbackAnswer"},{"id":"-712043766","method":"messages.setBotCallbackAnswer","params":[{"name":"flags","type":"#"},{"name":"alert","type":"flags.1?true"},{"name":"query_id","type":"long"},{"name":"message","type":"flags.0?string"},{"name":"url","type":"flags.2?string"},{"name":"cache_time","type":"int"}],"type":"Bool"},{"id":"-728224331","method":"contacts.getTopPeers","params":[{"name":"flags","type":"#"},{"name":"correspondents","type":"flags.0?true"},{"name":"bots_pm","type":"flags.1?true"},{"name":"bots_inline","type":"flags.2?true"},{"name":"phone_calls","type":"flags.3?true"},{"name":"forward_users","type":"flags.4?true"},{"name":"forward_chats","type":"flags.5?true"},{"name":"groups","type":"flags.10?true"},{"name":"channels","type":"flags.15?true"},{"name":"offset","type":"int"},{"name":"limit","type":"int"},{"name":"hash","type":"int"}],"type":"contacts.TopPeers"},{"id":"451113900","method":"contacts.resetTopPeerRating","params":[{"name":"category","type":"TopPeerCategory"},{"name":"peer","type":"InputPeer"}],"type":"Bool"},{"id":"-462373635","method":"messages.getPeerDialogs","params":[{"name":"peers","type":"Vector"}],"type":"messages.PeerDialogs"},{"id":"-1137057461","method":"messages.saveDraft","params":[{"name":"flags","type":"#"},{"name":"no_webpage","type":"flags.1?true"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"peer","type":"InputPeer"},{"name":"message","type":"string"},{"name":"entities","type":"flags.3?Vector"}],"type":"Bool"},{"id":"1782549861","method":"messages.getAllDrafts","params":[],"type":"Updates"},{"id":"766298703","method":"messages.getFeaturedStickers","params":[{"name":"hash","type":"int"}],"type":"messages.FeaturedStickers"},{"id":"1527873830","method":"messages.readFeaturedStickers","params":[{"name":"id","type":"Vector"}],"type":"Bool"},{"id":"1587647177","method":"messages.getRecentStickers","params":[{"name":"flags","type":"#"},{"name":"attached","type":"flags.0?true"},{"name":"hash","type":"int"}],"type":"messages.RecentStickers"},{"id":"958863608","method":"messages.saveRecentSticker","params":[{"name":"flags","type":"#"},{"name":"attached","type":"flags.0?true"},{"name":"id","type":"InputDocument"},{"name":"unsave","type":"Bool"}],"type":"Bool"},{"id":"-1986437075","method":"messages.clearRecentStickers","params":[{"name":"flags","type":"#"},{"name":"attached","type":"flags.0?true"}],"type":"Bool"},{"id":"1475442322","method":"messages.getArchivedStickers","params":[{"name":"flags","type":"#"},{"name":"masks","type":"flags.0?true"},{"name":"offset_id","type":"long"},{"name":"limit","type":"int"}],"type":"messages.ArchivedStickers"},{"id":"457157256","method":"account.sendConfirmPhoneCode","params":[{"name":"hash","type":"string"},{"name":"settings","type":"CodeSettings"}],"type":"auth.SentCode"},{"id":"1596029123","method":"account.confirmPhone","params":[{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"Bool"},{"id":"-122669393","method":"channels.getAdminedPublicChannels","params":[{"name":"flags","type":"#"},{"name":"by_location","type":"flags.0?true"},{"name":"check_limit","type":"flags.1?true"}],"type":"messages.Chats"},{"id":"1706608543","method":"messages.getMaskStickers","params":[{"name":"hash","type":"int"}],"type":"messages.AllStickers"},{"id":"-866424884","method":"messages.getAttachedStickers","params":[{"name":"media","type":"InputStickeredMedia"}],"type":"Vector"},{"id":"-1907842680","method":"auth.dropTempAuthKeys","params":[{"name":"except_auth_keys","type":"Vector"}],"type":"Bool"},{"id":"-1896289088","method":"messages.setGameScore","params":[{"name":"flags","type":"#"},{"name":"edit_message","type":"flags.0?true"},{"name":"force","type":"flags.1?true"},{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"},{"name":"user_id","type":"InputUser"},{"name":"score","type":"int"}],"type":"Updates"},{"id":"363700068","method":"messages.setInlineGameScore","params":[{"name":"flags","type":"#"},{"name":"edit_message","type":"flags.0?true"},{"name":"force","type":"flags.1?true"},{"name":"id","type":"InputBotInlineMessageID"},{"name":"user_id","type":"InputUser"},{"name":"score","type":"int"}],"type":"Bool"},{"id":"-400399203","method":"messages.getGameHighScores","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"},{"name":"user_id","type":"InputUser"}],"type":"messages.HighScores"},{"id":"258170395","method":"messages.getInlineGameHighScores","params":[{"name":"id","type":"InputBotInlineMessageID"},{"name":"user_id","type":"InputUser"}],"type":"messages.HighScores"},{"id":"218777796","method":"messages.getCommonChats","params":[{"name":"user_id","type":"InputUser"},{"name":"max_id","type":"int"},{"name":"limit","type":"int"}],"type":"messages.Chats"},{"id":"-341307408","method":"messages.getAllChats","params":[{"name":"except_ids","type":"Vector"}],"type":"messages.Chats"},{"id":"-333262899","method":"help.setBotUpdatesStatus","params":[{"name":"pending_updates_count","type":"int"},{"name":"message","type":"string"}],"type":"Bool"},{"id":"852135825","method":"messages.getWebPage","params":[{"name":"url","type":"string"},{"name":"hash","type":"int"}],"type":"WebPage"},{"id":"-1489903017","method":"messages.toggleDialogPin","params":[{"name":"flags","type":"#"},{"name":"pinned","type":"flags.0?true"},{"name":"peer","type":"InputDialogPeer"}],"type":"Bool"},{"id":"991616823","method":"messages.reorderPinnedDialogs","params":[{"name":"flags","type":"#"},{"name":"force","type":"flags.0?true"},{"name":"folder_id","type":"int"},{"name":"order","type":"Vector"}],"type":"Bool"},{"id":"-692498958","method":"messages.getPinnedDialogs","params":[{"name":"folder_id","type":"int"}],"type":"messages.PeerDialogs"},{"id":"-1440257555","method":"bots.sendCustomRequest","params":[{"name":"custom_method","type":"string"},{"name":"params","type":"DataJSON"}],"type":"DataJSON"},{"id":"-434028723","method":"bots.answerWebhookJSONQuery","params":[{"name":"query_id","type":"long"},{"name":"data","type":"DataJSON"}],"type":"Bool"},{"id":"619086221","method":"upload.getWebFile","params":[{"name":"location","type":"InputWebFileLocation"},{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"upload.WebFile"},{"id":"-1712285883","method":"payments.getPaymentForm","params":[{"name":"msg_id","type":"int"}],"type":"payments.PaymentForm"},{"id":"-1601001088","method":"payments.getPaymentReceipt","params":[{"name":"msg_id","type":"int"}],"type":"payments.PaymentReceipt"},{"id":"1997180532","method":"payments.validateRequestedInfo","params":[{"name":"flags","type":"#"},{"name":"save","type":"flags.0?true"},{"name":"msg_id","type":"int"},{"name":"info","type":"PaymentRequestedInfo"}],"type":"payments.ValidatedRequestedInfo"},{"id":"730364339","method":"payments.sendPaymentForm","params":[{"name":"flags","type":"#"},{"name":"msg_id","type":"int"},{"name":"requested_info_id","type":"flags.0?string"},{"name":"shipping_option_id","type":"flags.1?string"},{"name":"credentials","type":"InputPaymentCredentials"}],"type":"payments.PaymentResult"},{"id":"1151208273","method":"account.getTmpPassword","params":[{"name":"password","type":"InputCheckPasswordSRP"},{"name":"period","type":"int"}],"type":"account.TmpPassword"},{"id":"578650699","method":"payments.getSavedInfo","params":[],"type":"payments.SavedInfo"},{"id":"-667062079","method":"payments.clearSavedInfo","params":[{"name":"flags","type":"#"},{"name":"credentials","type":"flags.0?true"},{"name":"info","type":"flags.1?true"}],"type":"Bool"},{"id":"-436833542","method":"messages.setBotShippingResults","params":[{"name":"flags","type":"#"},{"name":"query_id","type":"long"},{"name":"error","type":"flags.0?string"},{"name":"shipping_options","type":"flags.1?Vector"}],"type":"Bool"},{"id":"163765653","method":"messages.setBotPrecheckoutResults","params":[{"name":"flags","type":"#"},{"name":"success","type":"flags.1?true"},{"name":"query_id","type":"long"},{"name":"error","type":"flags.0?string"}],"type":"Bool"},{"id":"-1680314774","method":"stickers.createStickerSet","params":[{"name":"flags","type":"#"},{"name":"masks","type":"flags.0?true"},{"name":"user_id","type":"InputUser"},{"name":"title","type":"string"},{"name":"short_name","type":"string"},{"name":"stickers","type":"Vector"}],"type":"messages.StickerSet"},{"id":"-143257775","method":"stickers.removeStickerFromSet","params":[{"name":"sticker","type":"InputDocument"}],"type":"messages.StickerSet"},{"id":"-4795190","method":"stickers.changeStickerPosition","params":[{"name":"sticker","type":"InputDocument"},{"name":"position","type":"int"}],"type":"messages.StickerSet"},{"id":"-2041315650","method":"stickers.addStickerToSet","params":[{"name":"stickerset","type":"InputStickerSet"},{"name":"sticker","type":"InputStickerSetItem"}],"type":"messages.StickerSet"},{"id":"1369162417","method":"messages.uploadMedia","params":[{"name":"peer","type":"InputPeer"},{"name":"media","type":"InputMedia"}],"type":"MessageMedia"},{"id":"1430593449","method":"phone.getCallConfig","params":[],"type":"DataJSON"},{"id":"1124046573","method":"phone.requestCall","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.0?true"},{"name":"user_id","type":"InputUser"},{"name":"random_id","type":"int"},{"name":"g_a_hash","type":"bytes"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"phone.PhoneCall"},{"id":"1003664544","method":"phone.acceptCall","params":[{"name":"peer","type":"InputPhoneCall"},{"name":"g_b","type":"bytes"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"phone.PhoneCall"},{"id":"788404002","method":"phone.confirmCall","params":[{"name":"peer","type":"InputPhoneCall"},{"name":"g_a","type":"bytes"},{"name":"key_fingerprint","type":"long"},{"name":"protocol","type":"PhoneCallProtocol"}],"type":"phone.PhoneCall"},{"id":"399855457","method":"phone.receivedCall","params":[{"name":"peer","type":"InputPhoneCall"}],"type":"Bool"},{"id":"-1295269440","method":"phone.discardCall","params":[{"name":"flags","type":"#"},{"name":"video","type":"flags.0?true"},{"name":"peer","type":"InputPhoneCall"},{"name":"duration","type":"int"},{"name":"reason","type":"PhoneCallDiscardReason"},{"name":"connection_id","type":"long"}],"type":"Updates"},{"id":"1508562471","method":"phone.setCallRating","params":[{"name":"flags","type":"#"},{"name":"user_initiative","type":"flags.0?true"},{"name":"peer","type":"InputPhoneCall"},{"name":"rating","type":"int"},{"name":"comment","type":"string"}],"type":"Updates"},{"id":"662363518","method":"phone.saveCallDebug","params":[{"name":"peer","type":"InputPhoneCall"},{"name":"debug","type":"DataJSON"}],"type":"Bool"},{"id":"536919235","method":"upload.getCdnFile","params":[{"name":"file_token","type":"bytes"},{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"upload.CdnFile"},{"id":"-1691921240","method":"upload.reuploadCdnFile","params":[{"name":"file_token","type":"bytes"},{"name":"request_token","type":"bytes"}],"type":"Vector"},{"id":"1375900482","method":"help.getCdnConfig","params":[],"type":"CdnConfig"},{"id":"-219008246","method":"langpack.getLangPack","params":[{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"}],"type":"LangPackDifference"},{"id":"-269862909","method":"langpack.getStrings","params":[{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"},{"name":"keys","type":"Vector"}],"type":"Vector"},{"id":"-845657435","method":"langpack.getDifference","params":[{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"},{"name":"from_version","type":"int"}],"type":"LangPackDifference"},{"id":"1120311183","method":"langpack.getLanguages","params":[{"name":"lang_pack","type":"string"}],"type":"Vector"},{"id":"1920559378","method":"channels.editBanned","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"},{"name":"banned_rights","type":"ChatBannedRights"}],"type":"Updates"},{"id":"870184064","method":"channels.getAdminLog","params":[{"name":"flags","type":"#"},{"name":"channel","type":"InputChannel"},{"name":"q","type":"string"},{"name":"events_filter","type":"flags.0?ChannelAdminLogEventsFilter"},{"name":"admins","type":"flags.1?Vector"},{"name":"max_id","type":"long"},{"name":"min_id","type":"long"},{"name":"limit","type":"int"}],"type":"channels.AdminLogResults"},{"id":"1302676017","method":"upload.getCdnFileHashes","params":[{"name":"file_token","type":"bytes"},{"name":"offset","type":"int"}],"type":"Vector"},{"id":"-914493408","method":"messages.sendScreenshotNotification","params":[{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"int"},{"name":"random_id","type":"long"}],"type":"Updates"},{"id":"-359881479","method":"channels.setStickers","params":[{"name":"channel","type":"InputChannel"},{"name":"stickerset","type":"InputStickerSet"}],"type":"Bool"},{"id":"567151374","method":"messages.getFavedStickers","params":[{"name":"hash","type":"int"}],"type":"messages.FavedStickers"},{"id":"-1174420133","method":"messages.faveSticker","params":[{"name":"id","type":"InputDocument"},{"name":"unfave","type":"Bool"}],"type":"Bool"},{"id":"-357180360","method":"channels.readMessageContents","params":[{"name":"channel","type":"InputChannel"},{"name":"id","type":"Vector"}],"type":"Bool"},{"id":"-2020263951","method":"contacts.resetSaved","params":[],"type":"Bool"},{"id":"1180140658","method":"messages.getUnreadMentions","params":[{"name":"peer","type":"InputPeer"},{"name":"offset_id","type":"int"},{"name":"add_offset","type":"int"},{"name":"limit","type":"int"},{"name":"max_id","type":"int"},{"name":"min_id","type":"int"}],"type":"messages.Messages"},{"id":"-1355375294","method":"channels.deleteHistory","params":[{"name":"channel","type":"InputChannel"},{"name":"max_id","type":"int"}],"type":"Bool"},{"id":"1036054804","method":"help.getRecentMeUrls","params":[{"name":"referer","type":"string"}],"type":"help.RecentMeUrls"},{"id":"-356796084","method":"channels.togglePreHistoryHidden","params":[{"name":"channel","type":"InputChannel"},{"name":"enabled","type":"Bool"}],"type":"Updates"},{"id":"251759059","method":"messages.readMentions","params":[{"name":"peer","type":"InputPeer"}],"type":"messages.AffectedHistory"},{"id":"-1144759543","method":"messages.getRecentLocations","params":[{"name":"peer","type":"InputPeer"},{"name":"limit","type":"int"},{"name":"hash","type":"int"}],"type":"messages.Messages"},{"id":"-872345397","method":"messages.sendMultiMedia","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.5?true"},{"name":"background","type":"flags.6?true"},{"name":"clear_draft","type":"flags.7?true"},{"name":"peer","type":"InputPeer"},{"name":"reply_to_msg_id","type":"flags.0?int"},{"name":"multi_media","type":"Vector"},{"name":"schedule_date","type":"flags.10?int"}],"type":"Updates"},{"id":"1347929239","method":"messages.uploadEncryptedFile","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"file","type":"InputEncryptedFile"}],"type":"EncryptedFile"},{"id":"405695855","method":"account.getWebAuthorizations","params":[],"type":"account.WebAuthorizations"},{"id":"755087855","method":"account.resetWebAuthorization","params":[{"name":"hash","type":"long"}],"type":"Bool"},{"id":"1747789204","method":"account.resetWebAuthorizations","params":[],"type":"Bool"},{"id":"-1028140917","method":"messages.searchStickerSets","params":[{"name":"flags","type":"#"},{"name":"exclude_featured","type":"flags.0?true"},{"name":"q","type":"string"},{"name":"hash","type":"int"}],"type":"messages.FoundStickerSets"},{"id":"-956147407","method":"upload.getFileHashes","params":[{"name":"location","type":"InputFileLocation"},{"name":"offset","type":"int"}],"type":"Vector"},{"id":"1031231713","method":"help.getProxyData","params":[],"type":"help.ProxyData"},{"id":"749019089","method":"help.getTermsOfServiceUpdate","params":[],"type":"help.TermsOfServiceUpdate"},{"id":"-294455398","method":"help.acceptTermsOfService","params":[{"name":"id","type":"DataJSON"}],"type":"Bool"},{"id":"-1299661699","method":"account.getAllSecureValues","params":[],"type":"Vector"},{"id":"1936088002","method":"account.getSecureValue","params":[{"name":"types","type":"Vector"}],"type":"Vector"},{"id":"-1986010339","method":"account.saveSecureValue","params":[{"name":"value","type":"InputSecureValue"},{"name":"secure_secret_id","type":"long"}],"type":"SecureValue"},{"id":"-1199522741","method":"account.deleteSecureValue","params":[{"name":"types","type":"Vector"}],"type":"Bool"},{"id":"-1865902923","method":"users.setSecureValueErrors","params":[{"name":"id","type":"InputUser"},{"name":"errors","type":"Vector"}],"type":"Bool"},{"id":"-1200903967","method":"account.getAuthorizationForm","params":[{"name":"bot_id","type":"int"},{"name":"scope","type":"string"},{"name":"public_key","type":"string"}],"type":"account.AuthorizationForm"},{"id":"-419267436","method":"account.acceptAuthorization","params":[{"name":"bot_id","type":"int"},{"name":"scope","type":"string"},{"name":"public_key","type":"string"},{"name":"value_hashes","type":"Vector"},{"name":"credentials","type":"SecureCredentialsEncrypted"}],"type":"Bool"},{"id":"-1516022023","method":"account.sendVerifyPhoneCode","params":[{"name":"phone_number","type":"string"},{"name":"settings","type":"CodeSettings"}],"type":"auth.SentCode"},{"id":"1305716726","method":"account.verifyPhone","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"Bool"},{"id":"1880182943","method":"account.sendVerifyEmailCode","params":[{"name":"email","type":"string"}],"type":"account.SentEmailCode"},{"id":"-323339813","method":"account.verifyEmail","params":[{"name":"email","type":"string"},{"name":"code","type":"string"}],"type":"Bool"},{"id":"1072547679","method":"help.getDeepLinkInfo","params":[{"name":"path","type":"string"}],"type":"help.DeepLinkInfo"},{"id":"-2098076769","method":"contacts.getSaved","params":[],"type":"Vector"},{"id":"-2092831552","method":"channels.getLeftChannels","params":[{"name":"offset","type":"int"}],"type":"messages.Chats"},{"id":"-262453244","method":"account.initTakeoutSession","params":[{"name":"flags","type":"#"},{"name":"contacts","type":"flags.0?true"},{"name":"message_users","type":"flags.1?true"},{"name":"message_chats","type":"flags.2?true"},{"name":"message_megagroups","type":"flags.3?true"},{"name":"message_channels","type":"flags.4?true"},{"name":"files","type":"flags.5?true"},{"name":"file_max_size","type":"flags.5?int"}],"type":"account.Takeout"},{"id":"489050862","method":"account.finishTakeoutSession","params":[{"name":"flags","type":"#"},{"name":"success","type":"flags.0?true"}],"type":"Bool"},{"id":"486505992","method":"messages.getSplitRanges","params":[],"type":"Vector"},{"id":"911373810","method":"invokeWithMessagesRange","params":[{"name":"range","type":"MessageRange"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1398145746","method":"invokeWithTakeout","params":[{"name":"takeout_id","type":"long"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1031349873","method":"messages.markDialogUnread","params":[{"name":"flags","type":"#"},{"name":"unread","type":"flags.0?true"},{"name":"peer","type":"InputDialogPeer"}],"type":"Bool"},{"id":"585256482","method":"messages.getDialogUnreadMarks","params":[],"type":"Vector"},{"id":"-2062238246","method":"contacts.toggleTopPeers","params":[{"name":"enabled","type":"Bool"}],"type":"Bool"},{"id":"2119757468","method":"messages.clearAllDrafts","params":[],"type":"Bool"},{"id":"-1735311088","method":"help.getAppConfig","params":[],"type":"JSONValue"},{"id":"1862465352","method":"help.saveAppLog","params":[{"name":"events","type":"Vector"}],"type":"Bool"},{"id":"-966677240","method":"help.getPassportConfig","params":[{"name":"hash","type":"int"}],"type":"help.PassportConfig"},{"id":"1784243458","method":"langpack.getLanguage","params":[{"name":"lang_pack","type":"string"},{"name":"lang_code","type":"string"}],"type":"LangPackLanguage"},{"id":"-760547348","method":"messages.updatePinnedMessage","params":[{"name":"flags","type":"#"},{"name":"silent","type":"flags.0?true"},{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"}],"type":"Updates"},{"id":"-1881204448","method":"account.confirmPasswordEmail","params":[{"name":"code","type":"string"}],"type":"Bool"},{"id":"2055154197","method":"account.resendPasswordEmail","params":[],"type":"Bool"},{"id":"-1043606090","method":"account.cancelPasswordEmail","params":[],"type":"Bool"},{"id":"-748624084","method":"help.getSupportName","params":[],"type":"help.SupportName"},{"id":"59377875","method":"help.getUserInfo","params":[{"name":"user_id","type":"InputUser"}],"type":"help.UserInfo"},{"id":"1723407216","method":"help.editUserInfo","params":[{"name":"user_id","type":"InputUser"},{"name":"message","type":"string"},{"name":"entities","type":"Vector"}],"type":"help.UserInfo"},{"id":"-1626880216","method":"account.getContactSignUpNotification","params":[],"type":"Bool"},{"id":"-806076575","method":"account.setContactSignUpNotification","params":[{"name":"silent","type":"Bool"}],"type":"Bool"},{"id":"1398240377","method":"account.getNotifyExceptions","params":[{"name":"flags","type":"#"},{"name":"compare_sound","type":"flags.1?true"},{"name":"peer","type":"flags.0?InputNotifyPeer"}],"type":"Updates"},{"id":"283795844","method":"messages.sendVote","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"options","type":"Vector"}],"type":"Updates"},{"id":"1941660731","method":"messages.getPollResults","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"}],"type":"Updates"},{"id":"1848369232","method":"messages.getOnlines","params":[{"name":"peer","type":"InputPeer"}],"type":"ChatOnlines"},{"id":"-2127811866","method":"messages.getStatsURL","params":[{"name":"flags","type":"#"},{"name":"dark","type":"flags.0?true"},{"name":"peer","type":"InputPeer"},{"name":"params","type":"string"}],"type":"StatsURL"},{"id":"-554301545","method":"messages.editChatAbout","params":[{"name":"peer","type":"InputPeer"},{"name":"about","type":"string"}],"type":"Bool"},{"id":"-1517917375","method":"messages.editChatDefaultBannedRights","params":[{"name":"peer","type":"InputPeer"},{"name":"banned_rights","type":"ChatBannedRights"}],"type":"Updates"},{"id":"-57811990","method":"account.getWallPaper","params":[{"name":"wallpaper","type":"InputWallPaper"}],"type":"WallPaper"},{"id":"-578472351","method":"account.uploadWallPaper","params":[{"name":"file","type":"InputFile"},{"name":"mime_type","type":"string"},{"name":"settings","type":"WallPaperSettings"}],"type":"WallPaper"},{"id":"1817860919","method":"account.saveWallPaper","params":[{"name":"wallpaper","type":"InputWallPaper"},{"name":"unsave","type":"Bool"},{"name":"settings","type":"WallPaperSettings"}],"type":"Bool"},{"id":"-18000023","method":"account.installWallPaper","params":[{"name":"wallpaper","type":"InputWallPaper"},{"name":"settings","type":"WallPaperSettings"}],"type":"Bool"},{"id":"-1153722364","method":"account.resetWallPapers","params":[],"type":"Bool"},{"id":"1457130303","method":"account.getAutoDownloadSettings","params":[],"type":"account.AutoDownloadSettings"},{"id":"1995661875","method":"account.saveAutoDownloadSettings","params":[{"name":"flags","type":"#"},{"name":"low","type":"flags.0?true"},{"name":"high","type":"flags.1?true"},{"name":"settings","type":"AutoDownloadSettings"}],"type":"Bool"},{"id":"899735650","method":"messages.getEmojiKeywords","params":[{"name":"lang_code","type":"string"}],"type":"EmojiKeywordsDifference"},{"id":"352892591","method":"messages.getEmojiKeywordsDifference","params":[{"name":"lang_code","type":"string"},{"name":"from_version","type":"int"}],"type":"EmojiKeywordsDifference"},{"id":"1318675378","method":"messages.getEmojiKeywordsLanguages","params":[{"name":"lang_codes","type":"Vector"}],"type":"Vector"},{"id":"-709817306","method":"messages.getEmojiURL","params":[{"name":"lang_code","type":"string"}],"type":"EmojiURL"},{"id":"1749536939","method":"folders.editPeerFolders","params":[{"name":"folder_peers","type":"Vector"}],"type":"Updates"},{"id":"472471681","method":"folders.deleteFolder","params":[{"name":"folder_id","type":"int"}],"type":"Updates"},{"id":"1932455680","method":"messages.getSearchCounters","params":[{"name":"peer","type":"InputPeer"},{"name":"filters","type":"Vector"}],"type":"Vector"},{"id":"-170208392","method":"channels.getGroupsForDiscussion","params":[],"type":"messages.Chats"},{"id":"1079520178","method":"channels.setDiscussionGroup","params":[{"name":"broadcast","type":"InputChannel"},{"name":"group","type":"InputChannel"}],"type":"Bool"},{"id":"-482388461","method":"messages.requestUrlAuth","params":[{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"button_id","type":"int"}],"type":"UrlAuthResult"},{"id":"-148247912","method":"messages.acceptUrlAuth","params":[{"name":"flags","type":"#"},{"name":"write_allowed","type":"flags.0?true"},{"name":"peer","type":"InputPeer"},{"name":"msg_id","type":"int"},{"name":"button_id","type":"int"}],"type":"UrlAuthResult"},{"id":"1336717624","method":"messages.hidePeerSettingsBar","params":[{"name":"peer","type":"InputPeer"}],"type":"Bool"},{"id":"-386636848","method":"contacts.addContact","params":[{"name":"flags","type":"#"},{"name":"add_phone_privacy_exception","type":"flags.0?true"},{"name":"id","type":"InputUser"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"phone","type":"string"}],"type":"Updates"},{"id":"-130964977","method":"contacts.acceptContact","params":[{"name":"id","type":"InputUser"}],"type":"Updates"},{"id":"-1892102881","method":"channels.editCreator","params":[{"name":"channel","type":"InputChannel"},{"name":"user_id","type":"InputUser"},{"name":"password","type":"InputCheckPasswordSRP"}],"type":"Updates"},{"id":"171270230","method":"contacts.getLocated","params":[{"name":"geo_point","type":"InputGeoPoint"}],"type":"Updates"},{"id":"1491484525","method":"channels.editLocation","params":[{"name":"channel","type":"InputChannel"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"address","type":"string"}],"type":"Bool"},{"id":"-304832784","method":"channels.toggleSlowMode","params":[{"name":"channel","type":"InputChannel"},{"name":"seconds","type":"int"}],"type":"Updates"},{"id":"-490575781","method":"messages.getScheduledHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"hash","type":"int"}],"type":"messages.Messages"},{"id":"-1111817116","method":"messages.getScheduledMessages","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"}],"type":"messages.Messages"},{"id":"-1120369398","method":"messages.sendScheduledMessages","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"}],"type":"Updates"},{"id":"1504586518","method":"messages.deleteScheduledMessages","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"}],"type":"Updates"},{"id":"473805619","method":"account.uploadTheme","params":[{"name":"flags","type":"#"},{"name":"file","type":"InputFile"},{"name":"thumb","type":"flags.0?InputFile"},{"name":"file_name","type":"string"},{"name":"mime_type","type":"string"}],"type":"Document"},{"id":"-2077048289","method":"account.createTheme","params":[{"name":"flags","type":"#"},{"name":"slug","type":"string"},{"name":"title","type":"string"},{"name":"document","type":"flags.2?InputDocument"},{"name":"settings","type":"flags.3?InputThemeSettings"}],"type":"Theme"},{"id":"1555261397","method":"account.updateTheme","params":[{"name":"flags","type":"#"},{"name":"format","type":"string"},{"name":"theme","type":"InputTheme"},{"name":"slug","type":"flags.0?string"},{"name":"title","type":"flags.1?string"},{"name":"document","type":"flags.2?InputDocument"},{"name":"settings","type":"flags.3?InputThemeSettings"}],"type":"Theme"},{"id":"-229175188","method":"account.saveTheme","params":[{"name":"theme","type":"InputTheme"},{"name":"unsave","type":"Bool"}],"type":"Bool"},{"id":"2061776695","method":"account.installTheme","params":[{"name":"flags","type":"#"},{"name":"dark","type":"flags.0?true"},{"name":"format","type":"flags.1?string"},{"name":"theme","type":"flags.1?InputTheme"}],"type":"Bool"},{"id":"-1919060949","method":"account.getTheme","params":[{"name":"format","type":"string"},{"name":"theme","type":"InputTheme"},{"name":"document_id","type":"long"}],"type":"Theme"},{"id":"676939512","method":"account.getThemes","params":[{"name":"format","type":"string"},{"name":"hash","type":"int"}],"type":"account.Themes"},{"id":"-1313598185","method":"auth.exportLoginToken","params":[{"name":"api_id","type":"int"},{"name":"api_hash","type":"string"},{"name":"except_ids","type":"Vector"}],"type":"auth.LoginToken"},{"id":"-1783866140","method":"auth.importLoginToken","params":[{"name":"token","type":"bytes"}],"type":"auth.LoginToken"},{"id":"-392909491","method":"auth.acceptLoginToken","params":[{"name":"token","type":"bytes"}],"type":"Authorization"},{"id":"-1250643605","method":"account.setContentSettings","params":[{"name":"flags","type":"#"},{"name":"sensitive_enabled","type":"flags.0?true"}],"type":"Bool"},{"id":"-1952756306","method":"account.getContentSettings","params":[],"type":"account.ContentSettings"},{"id":"300429806","method":"channels.getInactiveChannels","params":[],"type":"messages.InactiveChats"},{"id":"1705865692","method":"account.getMultiWallPapers","params":[{"name":"wallpapers","type":"Vector"}],"type":"Vector"}]}, + "layer": 108 +} \ No newline at end of file diff --git a/src/lib/tl_utils.ts b/src/lib/mtproto/tl_utils.ts similarity index 92% rename from src/lib/tl_utils.ts rename to src/lib/mtproto/tl_utils.ts index 5c0b22f7..3d7adcf7 100644 --- a/src/lib/tl_utils.ts +++ b/src/lib/mtproto/tl_utils.ts @@ -1,765 +1,765 @@ -/*! - * Webogram v0.7.0 - messaging web application for MTProto - * https://github.com/zhukov/webogram - * Copyright (C) 2014 Igor Zhukov - * https://github.com/zhukov/webogram/blob/master/LICENSE - */ - -import {bigint, intToUint, bigStringInt, bytesToHex, gzipUncompress, uintToInt} from './bin_utils'; -import {isObject} from './utils'; -import * as Config from './config'; - -const boolFalse = +Config.Schema.API.constructors.find((c: any) => c.predicate == 'boolFalse').id >>> 0; -const boolTrue = +Config.Schema.API.constructors.find((c: any) => c.predicate == 'boolTrue').id >>> 0; -const vector = +Config.Schema.API.constructors.find((c: any) => c.predicate == 'vector').id >>> 0; -const gzipPacked = +Config.Schema.MTProto.constructors.find((c: any) => c.predicate == 'gzip_packed').id >>> 0; - -//console.log('boolFalse', boolFalse == 0xbc799737); - -class TLSerialization { - public maxLength = 2048; // 2Kb - public offset = 0; // in bytes - public mtproto = false; - private debug = false;//Config.Modes.debug; - - public buffer: ArrayBuffer; - public intView: Int32Array; - public byteView: Uint8Array; - - constructor(options: any = {}) { - this.maxLength = options.startMaxLength || 2048 // 2Kb - this.mtproto = options.mtproto || false; - this.createBuffer(); - } - - public createBuffer() { - this.buffer = new ArrayBuffer(this.maxLength); - this.intView = new Int32Array(this.buffer); - this.byteView = new Uint8Array(this.buffer); - } - - public getArray() { - let resultBuffer = new ArrayBuffer(this.offset); - let resultArray = new Int32Array(resultBuffer); - - resultArray.set(this.intView.subarray(0, this.offset / 4)); - - return resultArray; - } - - public getBuffer() { - return this.getArray().buffer; - } - - public getBytes(typed: true): Uint8Array; - public getBytes(typed?: false): number[]; - public getBytes(typed?: boolean): number[] | Uint8Array { - if(typed) { - let resultBuffer = new ArrayBuffer(this.offset); - let resultArray = new Uint8Array(resultBuffer); - - resultArray.set(this.byteView.subarray(0, this.offset)); - - return resultArray; - } - - let bytes: number[] = []; - for(var i = 0; i < this.offset; i++) { - bytes.push(this.byteView[i]); - } - return bytes; - } - - public checkLength(needBytes: number) { - if(this.offset + needBytes < this.maxLength) { - return; - } - - ///console.trace('Increase buffer', this.offset, needBytes, this.maxLength); - this.maxLength = Math.ceil(Math.max(this.maxLength * 2, this.offset + needBytes + 16) / 4) * 4; - var previousBuffer = this.buffer; - var previousArray = new Int32Array(previousBuffer); - - this.createBuffer(); - - new Int32Array(this.buffer).set(previousArray); - } - - public writeInt(i: number, field: string) { - this.debug && console.log('>>>', i.toString(16), i, field); - - this.checkLength(4); - this.intView[this.offset / 4] = i; - this.offset += 4; - } - - public storeInt(i: number, field?: string) { - this.writeInt(i, (field || '') + ':int'); - } - - public storeBool(i: boolean, field?: string) { - if(i) { - this.writeInt(boolTrue, (field || '') + ':bool'); - } else { - this.writeInt(boolFalse, (field || '') + ':bool'); - } - } - - public storeLongP(iHigh: number, iLow: number, field?: string) { - this.writeInt(iLow, (field || '') + ':long[low]'); - this.writeInt(iHigh, (field || '') + ':long[high]'); - } - - public storeLong(sLong: Array | string | number, field?: string) { - if(Array.isArray(sLong)) { - if(sLong.length == 2) { - return this.storeLongP(sLong[0], sLong[1], field); - } else { - return this.storeIntBytes(sLong, 64, field); - } - } - - if(typeof sLong != 'string') { - sLong = sLong ? sLong.toString() : '0'; - } - var divRem = bigStringInt(sLong).divideAndRemainder(bigint(0x100000000)); - - this.writeInt(intToUint(divRem[1].intValue()), (field || '') + ':long[low]'); - this.writeInt(intToUint(divRem[0].intValue()), (field || '') + ':long[high]'); - } - - public storeDouble(f: any, field?: string) { - var buffer = new ArrayBuffer(8); - var intView = new Int32Array(buffer); - var doubleView = new Float64Array(buffer); - - doubleView[0] = f; - - this.writeInt(intView[0], (field || '') + ':double[low]'); - this.writeInt(intView[1], (field || '') + ':double[high]'); - } - - public storeString(s: string, field?: string) { - this.debug && console.log('>>>', s, (field || '') + ':string'); - - if(s === undefined) { - s = ''; - } - var sUTF8 = unescape(encodeURIComponent(s)); - - this.checkLength(sUTF8.length + 8); - - var len = sUTF8.length; - if(len <= 253) { - this.byteView[this.offset++] = len; - } else { - this.byteView[this.offset++] = 254; - this.byteView[this.offset++] = len & 0xFF; - this.byteView[this.offset++] = (len & 0xFF00) >> 8; - this.byteView[this.offset++] = (len & 0xFF0000) >> 16; - } - for(var i = 0; i < len; i++) { - this.byteView[this.offset++] = sUTF8.charCodeAt(i); - } - - // Padding - while(this.offset % 4) { - this.byteView[this.offset++] = 0; - } - } - - public storeBytes(bytes: any, field?: string) { - if(bytes instanceof ArrayBuffer) { - bytes = new Uint8Array(bytes); - } else if(bytes === undefined) { - bytes = []; - } - this.debug && console.log('>>>', bytesToHex(bytes), (field || '') + ':bytes'); - - // if uint8array were json.stringified, then will be: {'0': 123, '1': 123} - var len = bytes.byteLength || bytes.length; - this.checkLength(len + 8) - if(len <= 253) { - this.byteView[this.offset++] = len; - } else { - this.byteView[this.offset++] = 254; - this.byteView[this.offset++] = len & 0xFF; - this.byteView[this.offset++] = (len & 0xFF00) >> 8; - this.byteView[this.offset++] = (len & 0xFF0000) >> 16; - } - - this.byteView.set(bytes, this.offset); - this.offset += len; - - // Padding - while(this.offset % 4) { - this.byteView[this.offset++] = 0; - } - } - - public storeIntBytes(bytes: any, bits: any, field?: string) { - if(bytes instanceof ArrayBuffer) { - bytes = new Uint8Array(bytes); - } - - var len = bytes.length; - if((bits % 32) || (len * 8) != bits) { - throw new Error('Invalid bits: ' + bits + ', ' + bytes.length); - } - - this.debug && console.log('>>>', bytesToHex(bytes), (field || '') + ':int' + bits); - this.checkLength(len); - - this.byteView.set(bytes, this.offset); - this.offset += len; - } - - public storeRawBytes(bytes: any, field?: string) { - if(bytes instanceof ArrayBuffer) { - bytes = new Uint8Array(bytes); - } - - var len = bytes.length; - - this.debug && console.log('>>>', bytesToHex(bytes), (field || '')); - this.checkLength(len); - - this.byteView.set(bytes, this.offset); - this.offset += len; - } - - public storeMethod(methodName: string, params: any) { - var schema = this.mtproto ? Config.Schema.MTProto : Config.Schema.API; - var methodData: any = false, - i; - - for(i = 0; i < schema.methods.length; i++) { - if(schema.methods[i].method == methodName) { - methodData = schema.methods[i]; - break; - } - } - if(!methodData) { - throw new Error('No method ' + methodName + ' found'); - } - - this.storeInt(intToUint(methodData.id), methodName + '[id]'); - - var param, type; - var i, condType; - var fieldBit; - var len = methodData.params.length; - //console.log('storeMethod', len, methodData); - for(i = 0; i < len; i++) { - param = methodData.params[i]; - type = param.type; - if(type.indexOf('?') !== -1) { - condType = type.split('?'); - fieldBit = condType[0].split('.'); - if(!(params[fieldBit[0]] & (1 << fieldBit[1]))) { - continue; - } - type = condType[1]; - } - - this.storeObject(params[param.name], type, methodName + '[' + param.name + ']'); - } - - return methodData.type; - } - - public storeObject(obj: any, type: string, field?: string) { - //console.log('storeObject', obj, type, field, this.offset, this.getBytes(true).hex); - switch(type) { - case '#': - case 'int': - return this.storeInt(obj, field); - case 'long': - return this.storeLong(obj, field); - case 'int128': - return this.storeIntBytes(obj, 128, field); - case 'int256': - return this.storeIntBytes(obj, 256, field); - case 'int512': - return this.storeIntBytes(obj, 512, field); - case 'string': - return this.storeString(obj, field); - case 'bytes': - return this.storeBytes(obj, field); - case 'double': - return this.storeDouble(obj, field); - case 'Bool': - return this.storeBool(obj, field); - case 'true': - return - } - - if(Array.isArray(obj)) { - if(type.substr(0, 6) == 'Vector') { - this.writeInt(vector, field + '[id]'); - } else if (type.substr(0, 6) != 'vector') { - throw new Error('Invalid vector type ' + type); - } - - var itemType = type.substr(7, type.length - 8); // for "Vector" - this.writeInt(obj.length, field + '[count]'); - for(var i = 0; i < obj.length; i++) { - this.storeObject(obj[i], itemType, field + '[' + i + ']'); - } - - return true; - } else if (type.substr(0, 6).toLowerCase() == 'vector') { - throw new Error('Invalid vector object'); - } - - if(!isObject(obj)) { - throw new Error('Invalid object for type ' + type); - } - - var schema = this.mtproto ? Config.Schema.MTProto : Config.Schema.API; - var predicate = obj['_']; - var isBare = false; - var constructorData: any = false; - - if(isBare = (type.charAt(0) == '%')) { - type = type.substr(1); - } - - for(i = 0; i < schema.constructors.length; i++) { - if(schema.constructors[i].predicate == predicate) { - constructorData = schema.constructors[i]; - break; - } - } - if(!constructorData) { - throw new Error('No predicate ' + predicate + ' found'); - } - - if(predicate == type) { - isBare = true; - } - - if(!isBare) { - this.writeInt(intToUint(constructorData.id), field + '[' + predicate + '][id]'); - } - - var param, type: string; - var condType; - var fieldBit; - var len = constructorData.params.length; - //console.log('storeObject', len, constructorData); - for(i = 0; i < len; i++) { - param = constructorData.params[i]; - type = param.type; - - //console.log('storeObject', param, type); - if(type.indexOf('?') !== -1) { - condType = type.split('?'); - fieldBit = condType[0].split('.'); - //console.log('storeObject fieldBit', fieldBit, obj[fieldBit[0]]); - if(!(obj[fieldBit[0]] & (1 << +fieldBit[1]))) { - continue; - } - type = condType[1]; - } - //console.log('storeObject', param, type); - - this.storeObject(obj[param.name], type, field + '[' + predicate + '][' + param.name + ']'); - } - - return constructorData.type; - } -} - -class TLDeserialization { - public offset = 0; // in bytes - public override: any; - - public buffer: ArrayBuffer; - //public intView: Uint32Array; - public byteView: Uint8Array; - - // this.debug = - public mtproto: boolean = false; - private debug: boolean; - - constructor(buffer: ArrayBuffer | Uint8Array, options: any = {}) { - //buffer = addPadding(buffer, 4, true); // fix 21.01.2020 for wss - if(buffer instanceof ArrayBuffer) { - this.buffer = buffer; - this.byteView = new Uint8Array(this.buffer); - } else { - this.buffer = buffer.buffer; - this.byteView = buffer; - } - - //console.log("TCL: TLDeserialization -> constructor -> buffer", buffer, this.byteView, this.byteView.hex); - /* this.buffer = buffer; - //this.intView = new Uint32Array(this.buffer); - this.byteView = new Uint8Array(this.buffer); */ - - //console.log(this.intView); - - this.override = 'override' in options ? options.override : {}; - this.mtproto = 'mtproto' in options ? options.mtproto : false; - this.debug = options.debug !== undefined ? options.debug : /* Config.Modes.debug */false; - } - - public readInt(field: string) { - //if(this.offset >= this.intView.length * 4) { - if((this.byteView.length - this.offset) < 4) { - console.error(this.byteView, this.offset); - throw new Error('Nothing to fetch: ' + field); - } - - //var i = this.intView[this.offset / 4]; - let i = new Uint32Array(this.byteView.buffer.slice(this.offset, this.offset + 4))[0]; - - this.debug/* || field.includes('[dialog][read_outbox_max_id]') */ - && console.log('<<<', i.toString(16), i, field, - this.byteView.slice(this.offset - 16, this.offset + 16), - this.byteView.slice(this.offset - 16, this.offset + 16).hex); - - this.offset += 4; - - return i; - } - - public fetchInt(field?: string) { - return this.readInt((field || '') + ':int'); - } - - public fetchDouble(field?: string) { - var buffer = new ArrayBuffer(8); - var intView = new Int32Array(buffer); - var doubleView = new Float64Array(buffer); - - intView[0] = this.readInt((field || '') + ':double[low]'), - intView[1] = this.readInt((field || '') + ':double[high]'); - - return doubleView[0]; - } - - public fetchLong(field?: string) { - var iLow = this.readInt((field || '') + ':long[low]'); - var iHigh = this.readInt((field || '') + ':long[high]'); - - var longDec = bigint(iHigh).shiftLeft(32).add(bigint(iLow)).toString(); - - return longDec; - } - - public fetchBool(field?: string) { - var i = this.readInt((field || '') + ':bool'); - if(i == boolTrue) { - return true; - } else if(i == boolFalse) { - return false; - } - - this.offset -= 4; - return this.fetchObject('Object', field); - } - - public fetchString(field?: string) { - var len = this.byteView[this.offset++]; - - if(len == 254) { - var len = this.byteView[this.offset++] | - (this.byteView[this.offset++] << 8) | - (this.byteView[this.offset++] << 16); - } - - var sUTF8 = ''; - for(var i = 0; i < len; i++) { - sUTF8 += String.fromCharCode(this.byteView[this.offset++]); - } - - // Padding - while(this.offset % 4) { - this.offset++; - } - - try { - var s = decodeURIComponent(escape(sUTF8)); - } catch (e) { - var s = sUTF8; - } - - this.debug && console.log('<<<', s, (field || '') + ':string'); - - return s; - } - - public fetchBytes(field?: string) { - var len = this.byteView[this.offset++]; - - if(len == 254) { - len = this.byteView[this.offset++] | - (this.byteView[this.offset++] << 8) | - (this.byteView[this.offset++] << 16); - } - - var bytes = this.byteView.subarray(this.offset, this.offset + len); - this.offset += len; - - // Padding - while(this.offset % 4) { - this.offset++; - } - - this.debug && console.log('<<<', bytesToHex(bytes), (field || '') + ':bytes'); - - return bytes; - } - - public fetchIntBytes(bits: number, typed: true, field?: string): Uint8Array; - public fetchIntBytes(bits: number, typed?: false, field?: string): number[]; - public fetchIntBytes(bits: number, typed?: boolean, field?: string) { - if(bits % 32) { - throw new Error('Invalid bits: ' + bits); - } - - var len = bits / 8; - if(typed) { - var result = this.byteView.subarray(this.offset, this.offset + len); - this.offset += len; - return result; - } - - var bytes = []; - for(var i = 0; i < len; i++) { - bytes.push(this.byteView[this.offset++]); - } - - this.debug && console.log('<<<', bytesToHex(bytes), (field || '') + ':int' + bits); - - return bytes; - } - - public fetchRawBytes(len: any, typed: true, field: string): Uint8Array; - public fetchRawBytes(len: any, typed: false, field: string): number[]; - public fetchRawBytes(len: any, typed: boolean, field: string) { - if(len === false) { - len = this.readInt((field || '') + '_length'); - if(len > this.byteView.byteLength) { - throw new Error('Invalid raw bytes length: ' + len + ', buffer len: ' + this.byteView.byteLength); - } - } - - if(typed) { - let bytes = new Uint8Array(len); - bytes.set(this.byteView.subarray(this.offset, this.offset + len)); - this.offset += len; - return bytes; - } - - var bytes = []; - for(var i = 0; i < len; i++) { - bytes.push(this.byteView[this.offset++]); - } - - this.debug && console.log('<<<', bytesToHex(bytes), (field || '')); - - return bytes; - } - - public fetchObject(type: any, field?: string): any { - switch(type) { - case '#': - case 'int': - return this.fetchInt(field); - case 'long': - return this.fetchLong(field); - case 'int128': - return this.fetchIntBytes(128, false, field); - case 'int256': - return this.fetchIntBytes(256, false, field); - case 'int512': - return this.fetchIntBytes(512, false, field); - case 'string': - return this.fetchString(field); - case 'bytes': - return this.fetchBytes(field); - case 'double': - return this.fetchDouble(field); - case 'Bool': - return this.fetchBool(field); - case 'true': - return true; - } - - field = field || type || 'Object'; - - if(type.substr(0, 6) == 'Vector' || type.substr(0, 6) == 'vector') { - if(type.charAt(0) == 'V') { - var constructor = this.readInt(field + '[id]'); - var constructorCmp = uintToInt(constructor); - - if(constructorCmp == gzipPacked) { // Gzip packed - var compressed = this.fetchBytes(field + '[packed_string]'); - var uncompressed = gzipUncompress(compressed); - var newDeserializer = new TLDeserialization(uncompressed); - - return newDeserializer.fetchObject(type, field); - } - - if(constructorCmp != vector) { - throw new Error('Invalid vector constructor ' + constructor); - } - } - - var len = this.readInt(field + '[count]'); - var result: any = []; - if(len > 0) { - var itemType = type.substr(7, type.length - 8); // for "Vector" - for(var i = 0; i < len; i++) { - result.push(this.fetchObject(itemType, field + '[' + i + ']')); - } - } - - return result; - } - - var schema = (this.mtproto ? Config.Schema.MTProto : Config.Schema.API) as any; - var predicate = false; - var constructorData: any = false; - - if(type.charAt(0) == '%') { - var checkType = type.substr(1); - for(var i = 0; i < schema.constructors.length; i++) { - if(schema.constructors[i].type == checkType) { - constructorData = schema.constructors[i]; - break; - } - } - - if(!constructorData) { - throw new Error('Constructor not found for type: ' + type); - } - } else if(type.charAt(0) >= 97 && type.charAt(0) <= 122) { - for(var i = 0; i < schema.constructors.length; i++) { - if(schema.constructors[i].predicate == type) { - constructorData = schema.constructors[i]; - break; - } - } - - if(!constructorData) { - throw new Error('Constructor not found for predicate: ' + type); - } - } else { - var constructor = this.readInt(field + '[id]'); - var constructorCmp = uintToInt(constructor); - - if(constructorCmp == gzipPacked) { // Gzip packed - var compressed = this.fetchBytes(field + '[packed_string]'); - var uncompressed = gzipUncompress(compressed); - var newDeserializer = new TLDeserialization(uncompressed); - - return newDeserializer.fetchObject(type, field); - } - - var index = schema.constructorsIndex; - if(!index) { - schema.constructorsIndex = index = {}; - for(var i = 0; i < schema.constructors.length; i++) { - index[schema.constructors[i].id] = i; - } - } - - var i: number = index[constructorCmp]; - if(i) { - constructorData = schema.constructors[i]; - } - - var fallback = false; - if(!constructorData && this.mtproto) { - var schemaFallback = Config.Schema.API; - for(i = 0; i < schemaFallback.constructors.length; i++) { - if(+schemaFallback.constructors[i].id == constructorCmp) { - constructorData = schemaFallback.constructors[i]; - - delete this.mtproto; - fallback = true; - break; - } - } - } - - if(!constructorData) { - throw new Error('Constructor not found: ' + constructor + ' ' + this.fetchInt() + ' ' + this.fetchInt() + ' ' + field); - } - } - - predicate = constructorData.predicate; - - var result: any = {'_': predicate}; - var overrideKey = (this.mtproto ? 'mt_' : '') + predicate; - var self = this; - - if(this.override[overrideKey]) { - this.override[overrideKey].apply(this, [result, field + '[' + predicate + ']']); - } else { - var i: number, param; - var type, isCond; - var condType, fieldBit; - var value; - var len: number = constructorData.params.length; - for(i = 0; i < len; i++) { - param = constructorData.params[i]; - type = param.type; - - if(type == '#' && result.pFlags === undefined) { - result.pFlags = {}; - } - - if(isCond = (type.indexOf('?') !== -1)) { - condType = type.split('?'); - fieldBit = condType[0].split('.'); - - if(!(result[fieldBit[0]] & (1 << fieldBit[1]))) { - //console.log('fetchObject bad', constructorData, result[fieldBit[0]], fieldBit); - continue; - } - - //console.log('fetchObject good', constructorData, result[fieldBit[0]], fieldBit); - - type = condType[1]; - } - - value = self.fetchObject(type, field + '[' + predicate + '][' + param.name + ']'); - - if(isCond && type === 'true') { - result.pFlags[param.name] = value; - } else { - /* if(param.name == 'read_outbox_max_id') { - console.log(result, param.name, value, field + '[' + predicate + '][' + param.name + ']'); - } */ - - result[param.name] = value; - } - } - } - - if(fallback) { - this.mtproto = true; - } - - return result; - } - - public getOffset() { - return this.offset; - } - - public fetchEnd() { - if(this.offset != this.byteView.length) { - throw new Error('Fetch end with non-empty buffer'); - } - - return true; - } -} - -export {TLDeserialization, TLSerialization}; +/*! + * Webogram v0.7.0 - messaging web application for MTProto + * https://github.com/zhukov/webogram + * Copyright (C) 2014 Igor Zhukov + * https://github.com/zhukov/webogram/blob/master/LICENSE + */ + +import {bigint, intToUint, bigStringInt, bytesToHex, gzipUncompress, uintToInt} from '../bin_utils'; +import {isObject} from '../utils'; +import Schema from './schema'; + +const boolFalse = +Schema.API.constructors.find((c: any) => c.predicate == 'boolFalse').id >>> 0; +const boolTrue = +Schema.API.constructors.find((c: any) => c.predicate == 'boolTrue').id >>> 0; +const vector = +Schema.API.constructors.find((c: any) => c.predicate == 'vector').id >>> 0; +const gzipPacked = +Schema.MTProto.constructors.find((c: any) => c.predicate == 'gzip_packed').id >>> 0; + +//console.log('boolFalse', boolFalse == 0xbc799737); + +class TLSerialization { + public maxLength = 2048; // 2Kb + public offset = 0; // in bytes + public mtproto = false; + private debug = false;//Modes.debug; + + public buffer: ArrayBuffer; + public intView: Int32Array; + public byteView: Uint8Array; + + constructor(options: any = {}) { + this.maxLength = options.startMaxLength || 2048 // 2Kb + this.mtproto = options.mtproto || false; + this.createBuffer(); + } + + public createBuffer() { + this.buffer = new ArrayBuffer(this.maxLength); + this.intView = new Int32Array(this.buffer); + this.byteView = new Uint8Array(this.buffer); + } + + public getArray() { + let resultBuffer = new ArrayBuffer(this.offset); + let resultArray = new Int32Array(resultBuffer); + + resultArray.set(this.intView.subarray(0, this.offset / 4)); + + return resultArray; + } + + public getBuffer() { + return this.getArray().buffer; + } + + public getBytes(typed: true): Uint8Array; + public getBytes(typed?: false): number[]; + public getBytes(typed?: boolean): number[] | Uint8Array { + if(typed) { + let resultBuffer = new ArrayBuffer(this.offset); + let resultArray = new Uint8Array(resultBuffer); + + resultArray.set(this.byteView.subarray(0, this.offset)); + + return resultArray; + } + + let bytes: number[] = []; + for(var i = 0; i < this.offset; i++) { + bytes.push(this.byteView[i]); + } + return bytes; + } + + public checkLength(needBytes: number) { + if(this.offset + needBytes < this.maxLength) { + return; + } + + ///console.trace('Increase buffer', this.offset, needBytes, this.maxLength); + this.maxLength = Math.ceil(Math.max(this.maxLength * 2, this.offset + needBytes + 16) / 4) * 4; + var previousBuffer = this.buffer; + var previousArray = new Int32Array(previousBuffer); + + this.createBuffer(); + + new Int32Array(this.buffer).set(previousArray); + } + + public writeInt(i: number, field: string) { + this.debug && console.log('>>>', i.toString(16), i, field); + + this.checkLength(4); + this.intView[this.offset / 4] = i; + this.offset += 4; + } + + public storeInt(i: number, field?: string) { + this.writeInt(i, (field || '') + ':int'); + } + + public storeBool(i: boolean, field?: string) { + if(i) { + this.writeInt(boolTrue, (field || '') + ':bool'); + } else { + this.writeInt(boolFalse, (field || '') + ':bool'); + } + } + + public storeLongP(iHigh: number, iLow: number, field?: string) { + this.writeInt(iLow, (field || '') + ':long[low]'); + this.writeInt(iHigh, (field || '') + ':long[high]'); + } + + public storeLong(sLong: Array | string | number, field?: string) { + if(Array.isArray(sLong)) { + if(sLong.length == 2) { + return this.storeLongP(sLong[0], sLong[1], field); + } else { + return this.storeIntBytes(sLong, 64, field); + } + } + + if(typeof sLong != 'string') { + sLong = sLong ? sLong.toString() : '0'; + } + var divRem = bigStringInt(sLong).divideAndRemainder(bigint(0x100000000)); + + this.writeInt(intToUint(divRem[1].intValue()), (field || '') + ':long[low]'); + this.writeInt(intToUint(divRem[0].intValue()), (field || '') + ':long[high]'); + } + + public storeDouble(f: any, field?: string) { + var buffer = new ArrayBuffer(8); + var intView = new Int32Array(buffer); + var doubleView = new Float64Array(buffer); + + doubleView[0] = f; + + this.writeInt(intView[0], (field || '') + ':double[low]'); + this.writeInt(intView[1], (field || '') + ':double[high]'); + } + + public storeString(s: string, field?: string) { + this.debug && console.log('>>>', s, (field || '') + ':string'); + + if(s === undefined) { + s = ''; + } + var sUTF8 = unescape(encodeURIComponent(s)); + + this.checkLength(sUTF8.length + 8); + + var len = sUTF8.length; + if(len <= 253) { + this.byteView[this.offset++] = len; + } else { + this.byteView[this.offset++] = 254; + this.byteView[this.offset++] = len & 0xFF; + this.byteView[this.offset++] = (len & 0xFF00) >> 8; + this.byteView[this.offset++] = (len & 0xFF0000) >> 16; + } + for(var i = 0; i < len; i++) { + this.byteView[this.offset++] = sUTF8.charCodeAt(i); + } + + // Padding + while(this.offset % 4) { + this.byteView[this.offset++] = 0; + } + } + + public storeBytes(bytes: any, field?: string) { + if(bytes instanceof ArrayBuffer) { + bytes = new Uint8Array(bytes); + } else if(bytes === undefined) { + bytes = []; + } + this.debug && console.log('>>>', bytesToHex(bytes), (field || '') + ':bytes'); + + // if uint8array were json.stringified, then will be: {'0': 123, '1': 123} + var len = bytes.byteLength || bytes.length; + this.checkLength(len + 8) + if(len <= 253) { + this.byteView[this.offset++] = len; + } else { + this.byteView[this.offset++] = 254; + this.byteView[this.offset++] = len & 0xFF; + this.byteView[this.offset++] = (len & 0xFF00) >> 8; + this.byteView[this.offset++] = (len & 0xFF0000) >> 16; + } + + this.byteView.set(bytes, this.offset); + this.offset += len; + + // Padding + while(this.offset % 4) { + this.byteView[this.offset++] = 0; + } + } + + public storeIntBytes(bytes: any, bits: any, field?: string) { + if(bytes instanceof ArrayBuffer) { + bytes = new Uint8Array(bytes); + } + + var len = bytes.length; + if((bits % 32) || (len * 8) != bits) { + throw new Error('Invalid bits: ' + bits + ', ' + bytes.length); + } + + this.debug && console.log('>>>', bytesToHex(bytes), (field || '') + ':int' + bits); + this.checkLength(len); + + this.byteView.set(bytes, this.offset); + this.offset += len; + } + + public storeRawBytes(bytes: any, field?: string) { + if(bytes instanceof ArrayBuffer) { + bytes = new Uint8Array(bytes); + } + + var len = bytes.length; + + this.debug && console.log('>>>', bytesToHex(bytes), (field || '')); + this.checkLength(len); + + this.byteView.set(bytes, this.offset); + this.offset += len; + } + + public storeMethod(methodName: string, params: any) { + var schema = this.mtproto ? Schema.MTProto : Schema.API; + var methodData: any = false, + i; + + for(i = 0; i < schema.methods.length; i++) { + if(schema.methods[i].method == methodName) { + methodData = schema.methods[i]; + break; + } + } + if(!methodData) { + throw new Error('No method ' + methodName + ' found'); + } + + this.storeInt(intToUint(methodData.id), methodName + '[id]'); + + var param, type; + var i, condType; + var fieldBit; + var len = methodData.params.length; + //console.log('storeMethod', len, methodData); + for(i = 0; i < len; i++) { + param = methodData.params[i]; + type = param.type; + if(type.indexOf('?') !== -1) { + condType = type.split('?'); + fieldBit = condType[0].split('.'); + if(!(params[fieldBit[0]] & (1 << fieldBit[1]))) { + continue; + } + type = condType[1]; + } + + this.storeObject(params[param.name], type, methodName + '[' + param.name + ']'); + } + + return methodData.type; + } + + public storeObject(obj: any, type: string, field?: string) { + //console.log('storeObject', obj, type, field, this.offset, this.getBytes(true).hex); + switch(type) { + case '#': + case 'int': + return this.storeInt(obj, field); + case 'long': + return this.storeLong(obj, field); + case 'int128': + return this.storeIntBytes(obj, 128, field); + case 'int256': + return this.storeIntBytes(obj, 256, field); + case 'int512': + return this.storeIntBytes(obj, 512, field); + case 'string': + return this.storeString(obj, field); + case 'bytes': + return this.storeBytes(obj, field); + case 'double': + return this.storeDouble(obj, field); + case 'Bool': + return this.storeBool(obj, field); + case 'true': + return + } + + if(Array.isArray(obj)) { + if(type.substr(0, 6) == 'Vector') { + this.writeInt(vector, field + '[id]'); + } else if (type.substr(0, 6) != 'vector') { + throw new Error('Invalid vector type ' + type); + } + + var itemType = type.substr(7, type.length - 8); // for "Vector" + this.writeInt(obj.length, field + '[count]'); + for(var i = 0; i < obj.length; i++) { + this.storeObject(obj[i], itemType, field + '[' + i + ']'); + } + + return true; + } else if (type.substr(0, 6).toLowerCase() == 'vector') { + throw new Error('Invalid vector object'); + } + + if(!isObject(obj)) { + throw new Error('Invalid object for type ' + type); + } + + var schema = this.mtproto ? Schema.MTProto : Schema.API; + var predicate = obj['_']; + var isBare = false; + var constructorData: any = false; + + if(isBare = (type.charAt(0) == '%')) { + type = type.substr(1); + } + + for(i = 0; i < schema.constructors.length; i++) { + if(schema.constructors[i].predicate == predicate) { + constructorData = schema.constructors[i]; + break; + } + } + if(!constructorData) { + throw new Error('No predicate ' + predicate + ' found'); + } + + if(predicate == type) { + isBare = true; + } + + if(!isBare) { + this.writeInt(intToUint(constructorData.id), field + '[' + predicate + '][id]'); + } + + var param, type: string; + var condType; + var fieldBit; + var len = constructorData.params.length; + //console.log('storeObject', len, constructorData); + for(i = 0; i < len; i++) { + param = constructorData.params[i]; + type = param.type; + + //console.log('storeObject', param, type); + if(type.indexOf('?') !== -1) { + condType = type.split('?'); + fieldBit = condType[0].split('.'); + //console.log('storeObject fieldBit', fieldBit, obj[fieldBit[0]]); + if(!(obj[fieldBit[0]] & (1 << +fieldBit[1]))) { + continue; + } + type = condType[1]; + } + //console.log('storeObject', param, type); + + this.storeObject(obj[param.name], type, field + '[' + predicate + '][' + param.name + ']'); + } + + return constructorData.type; + } +} + +class TLDeserialization { + public offset = 0; // in bytes + public override: any; + + public buffer: ArrayBuffer; + //public intView: Uint32Array; + public byteView: Uint8Array; + + // this.debug = + public mtproto: boolean = false; + private debug: boolean; + + constructor(buffer: ArrayBuffer | Uint8Array, options: any = {}) { + //buffer = addPadding(buffer, 4, true); // fix 21.01.2020 for wss + if(buffer instanceof ArrayBuffer) { + this.buffer = buffer; + this.byteView = new Uint8Array(this.buffer); + } else { + this.buffer = buffer.buffer; + this.byteView = buffer; + } + + //console.log("TCL: TLDeserialization -> constructor -> buffer", buffer, this.byteView, this.byteView.hex); + /* this.buffer = buffer; + //this.intView = new Uint32Array(this.buffer); + this.byteView = new Uint8Array(this.buffer); */ + + //console.log(this.intView); + + this.override = 'override' in options ? options.override : {}; + this.mtproto = 'mtproto' in options ? options.mtproto : false; + this.debug = options.debug !== undefined ? options.debug : /* Modes.debug */false; + } + + public readInt(field: string) { + //if(this.offset >= this.intView.length * 4) { + if((this.byteView.length - this.offset) < 4) { + console.error(this.byteView, this.offset); + throw new Error('Nothing to fetch: ' + field); + } + + //var i = this.intView[this.offset / 4]; + let i = new Uint32Array(this.byteView.buffer.slice(this.offset, this.offset + 4))[0]; + + this.debug/* || field.includes('[dialog][read_outbox_max_id]') */ + && console.log('<<<', i.toString(16), i, field, + this.byteView.slice(this.offset - 16, this.offset + 16), + this.byteView.slice(this.offset - 16, this.offset + 16).hex); + + this.offset += 4; + + return i; + } + + public fetchInt(field?: string) { + return this.readInt((field || '') + ':int'); + } + + public fetchDouble(field?: string) { + var buffer = new ArrayBuffer(8); + var intView = new Int32Array(buffer); + var doubleView = new Float64Array(buffer); + + intView[0] = this.readInt((field || '') + ':double[low]'), + intView[1] = this.readInt((field || '') + ':double[high]'); + + return doubleView[0]; + } + + public fetchLong(field?: string) { + var iLow = this.readInt((field || '') + ':long[low]'); + var iHigh = this.readInt((field || '') + ':long[high]'); + + var longDec = bigint(iHigh).shiftLeft(32).add(bigint(iLow)).toString(); + + return longDec; + } + + public fetchBool(field?: string) { + var i = this.readInt((field || '') + ':bool'); + if(i == boolTrue) { + return true; + } else if(i == boolFalse) { + return false; + } + + this.offset -= 4; + return this.fetchObject('Object', field); + } + + public fetchString(field?: string) { + var len = this.byteView[this.offset++]; + + if(len == 254) { + var len = this.byteView[this.offset++] | + (this.byteView[this.offset++] << 8) | + (this.byteView[this.offset++] << 16); + } + + var sUTF8 = ''; + for(var i = 0; i < len; i++) { + sUTF8 += String.fromCharCode(this.byteView[this.offset++]); + } + + // Padding + while(this.offset % 4) { + this.offset++; + } + + try { + var s = decodeURIComponent(escape(sUTF8)); + } catch (e) { + var s = sUTF8; + } + + this.debug && console.log('<<<', s, (field || '') + ':string'); + + return s; + } + + public fetchBytes(field?: string) { + var len = this.byteView[this.offset++]; + + if(len == 254) { + len = this.byteView[this.offset++] | + (this.byteView[this.offset++] << 8) | + (this.byteView[this.offset++] << 16); + } + + var bytes = this.byteView.subarray(this.offset, this.offset + len); + this.offset += len; + + // Padding + while(this.offset % 4) { + this.offset++; + } + + this.debug && console.log('<<<', bytesToHex(bytes), (field || '') + ':bytes'); + + return bytes; + } + + public fetchIntBytes(bits: number, typed: true, field?: string): Uint8Array; + public fetchIntBytes(bits: number, typed?: false, field?: string): number[]; + public fetchIntBytes(bits: number, typed?: boolean, field?: string) { + if(bits % 32) { + throw new Error('Invalid bits: ' + bits); + } + + var len = bits / 8; + if(typed) { + var result = this.byteView.subarray(this.offset, this.offset + len); + this.offset += len; + return result; + } + + var bytes = []; + for(var i = 0; i < len; i++) { + bytes.push(this.byteView[this.offset++]); + } + + this.debug && console.log('<<<', bytesToHex(bytes), (field || '') + ':int' + bits); + + return bytes; + } + + public fetchRawBytes(len: any, typed: true, field: string): Uint8Array; + public fetchRawBytes(len: any, typed: false, field: string): number[]; + public fetchRawBytes(len: any, typed: boolean, field: string) { + if(len === false) { + len = this.readInt((field || '') + '_length'); + if(len > this.byteView.byteLength) { + throw new Error('Invalid raw bytes length: ' + len + ', buffer len: ' + this.byteView.byteLength); + } + } + + if(typed) { + let bytes = new Uint8Array(len); + bytes.set(this.byteView.subarray(this.offset, this.offset + len)); + this.offset += len; + return bytes; + } + + var bytes = []; + for(var i = 0; i < len; i++) { + bytes.push(this.byteView[this.offset++]); + } + + this.debug && console.log('<<<', bytesToHex(bytes), (field || '')); + + return bytes; + } + + public fetchObject(type: any, field?: string): any { + switch(type) { + case '#': + case 'int': + return this.fetchInt(field); + case 'long': + return this.fetchLong(field); + case 'int128': + return this.fetchIntBytes(128, false, field); + case 'int256': + return this.fetchIntBytes(256, false, field); + case 'int512': + return this.fetchIntBytes(512, false, field); + case 'string': + return this.fetchString(field); + case 'bytes': + return this.fetchBytes(field); + case 'double': + return this.fetchDouble(field); + case 'Bool': + return this.fetchBool(field); + case 'true': + return true; + } + + field = field || type || 'Object'; + + if(type.substr(0, 6) == 'Vector' || type.substr(0, 6) == 'vector') { + if(type.charAt(0) == 'V') { + var constructor = this.readInt(field + '[id]'); + var constructorCmp = uintToInt(constructor); + + if(constructorCmp == gzipPacked) { // Gzip packed + var compressed = this.fetchBytes(field + '[packed_string]'); + var uncompressed = gzipUncompress(compressed); + var newDeserializer = new TLDeserialization(uncompressed); + + return newDeserializer.fetchObject(type, field); + } + + if(constructorCmp != vector) { + throw new Error('Invalid vector constructor ' + constructor); + } + } + + var len = this.readInt(field + '[count]'); + var result: any = []; + if(len > 0) { + var itemType = type.substr(7, type.length - 8); // for "Vector" + for(var i = 0; i < len; i++) { + result.push(this.fetchObject(itemType, field + '[' + i + ']')); + } + } + + return result; + } + + var schema = (this.mtproto ? Schema.MTProto : Schema.API) as any; + var predicate = false; + var constructorData: any = false; + + if(type.charAt(0) == '%') { + var checkType = type.substr(1); + for(var i = 0; i < schema.constructors.length; i++) { + if(schema.constructors[i].type == checkType) { + constructorData = schema.constructors[i]; + break; + } + } + + if(!constructorData) { + throw new Error('Constructor not found for type: ' + type); + } + } else if(type.charAt(0) >= 97 && type.charAt(0) <= 122) { + for(var i = 0; i < schema.constructors.length; i++) { + if(schema.constructors[i].predicate == type) { + constructorData = schema.constructors[i]; + break; + } + } + + if(!constructorData) { + throw new Error('Constructor not found for predicate: ' + type); + } + } else { + var constructor = this.readInt(field + '[id]'); + var constructorCmp = uintToInt(constructor); + + if(constructorCmp == gzipPacked) { // Gzip packed + var compressed = this.fetchBytes(field + '[packed_string]'); + var uncompressed = gzipUncompress(compressed); + var newDeserializer = new TLDeserialization(uncompressed); + + return newDeserializer.fetchObject(type, field); + } + + var index = schema.constructorsIndex; + if(!index) { + schema.constructorsIndex = index = {}; + for(var i = 0; i < schema.constructors.length; i++) { + index[schema.constructors[i].id] = i; + } + } + + var i: number = index[constructorCmp]; + if(i) { + constructorData = schema.constructors[i]; + } + + var fallback = false; + if(!constructorData && this.mtproto) { + var schemaFallback = Schema.API; + for(i = 0; i < schemaFallback.constructors.length; i++) { + if(+schemaFallback.constructors[i].id == constructorCmp) { + constructorData = schemaFallback.constructors[i]; + + delete this.mtproto; + fallback = true; + break; + } + } + } + + if(!constructorData) { + throw new Error('Constructor not found: ' + constructor + ' ' + this.fetchInt() + ' ' + this.fetchInt() + ' ' + field); + } + } + + predicate = constructorData.predicate; + + var result: any = {'_': predicate}; + var overrideKey = (this.mtproto ? 'mt_' : '') + predicate; + var self = this; + + if(this.override[overrideKey]) { + this.override[overrideKey].apply(this, [result, field + '[' + predicate + ']']); + } else { + var i: number, param; + var type, isCond; + var condType, fieldBit; + var value; + var len: number = constructorData.params.length; + for(i = 0; i < len; i++) { + param = constructorData.params[i]; + type = param.type; + + if(type == '#' && result.pFlags === undefined) { + result.pFlags = {}; + } + + if(isCond = (type.indexOf('?') !== -1)) { + condType = type.split('?'); + fieldBit = condType[0].split('.'); + + if(!(result[fieldBit[0]] & (1 << fieldBit[1]))) { + //console.log('fetchObject bad', constructorData, result[fieldBit[0]], fieldBit); + continue; + } + + //console.log('fetchObject good', constructorData, result[fieldBit[0]], fieldBit); + + type = condType[1]; + } + + value = self.fetchObject(type, field + '[' + predicate + '][' + param.name + ']'); + + if(isCond && type === 'true') { + result.pFlags[param.name] = value; + } else { + /* if(param.name == 'read_outbox_max_id') { + console.log(result, param.name, value, field + '[' + predicate + '][' + param.name + ']'); + } */ + + result[param.name] = value; + } + } + } + + if(fallback) { + this.mtproto = true; + } + + return result; + } + + public getOffset() { + return this.offset; + } + + public fetchEnd() { + if(this.offset != this.byteView.length) { + throw new Error('Fetch end with non-empty buffer'); + } + + return true; + } +} + +export {TLDeserialization, TLSerialization}; diff --git a/src/lib/richtextprocessor.js b/src/lib/richtextprocessor.js index bb117692..074a1e22 100644 --- a/src/lib/richtextprocessor.js +++ b/src/lib/richtextprocessor.js @@ -1,4 +1,5 @@ import {encodeEntities, copy/* , emojiUnicode */} from './utils'; +import Config from './config'; var EmojiHelper = { emojiMap: (code) => { return code; }, diff --git a/src/lib/storage.ts b/src/lib/storage.ts index 45361e0a..4f0b3fc4 100644 --- a/src/lib/storage.ts +++ b/src/lib/storage.ts @@ -1,26 +1,205 @@ -import {Storage as ConfigStorage, Modes} from './config'; +import { Modes } from './mtproto/mtproto_config'; + +class ConfigStorage { + public keyPrefix = ''; + public noPrefix = false; + private cache: {[key: string]: any} = {}; + private useLs = true; + + storageGetPrefix() { + if(this.noPrefix) { + this.noPrefix = false; + return ''; + } + + return this.keyPrefix; + } + + get(keys: any, callback: any) { + var single = false; + if(!Array.isArray(keys)) { + keys = Array.prototype.slice.call(arguments); + callback = keys.pop(); + single = keys.length == 1; + } + var result = [], + value; + var allFound = true; + var prefix = this.storageGetPrefix(), + i, key; + + for(i = 0; i < keys.length; i++) { + key = keys[i] = prefix + keys[i]; + if(key.substr(0, 3) != 'xt_' && this.cache[key] !== undefined) { + result.push(this.cache[key]); + } else if(this.useLs) { + try { + value = localStorage.getItem(key); + } catch(e) { + this.useLs = false; + } + + try { + value = (value === undefined || value === null) ? false : JSON.parse(value); + } catch(e) { + value = false; + } + result.push(this.cache[key] = value); + } else { + allFound = false; + } + } + + if(allFound) { + return callback(single ? result[0] : result); + } + } + + set(obj: any, callback: any) { + var keyValues: any = {}; + var prefix = this.storageGetPrefix(), + key, value; + + //console.log('storageSetValue', obj, callback, arguments); + + for(key in obj) { + if(obj.hasOwnProperty(key)) { + value = obj[key]; + key = prefix + key; + this.cache[key] = value; + //value = value instanceof Uint8Array ? Array.from(value) : JSON.stringify(value); + value = JSON.stringify(value); + if(this.useLs) { + try { + //console.log('setItem', key, value); + localStorage.setItem(key, value); + } catch (e) { + this.useLs = false; + } + } else { + keyValues[key] = value; + } + } + } + + if(this.useLs) { + if(callback) { + callback(); + } + + return; + } + } + + remove(keys: any, callback: any) { + if(!Array.isArray(keys)) { + keys = Array.prototype.slice.call(arguments) + if(typeof keys[keys.length - 1] === 'function') { + callback = keys.pop(); + } + } + + var prefix = this.storageGetPrefix(), + i, key; + + for(i = 0; i < keys.length; i++) { + key = keys[i] = prefix + keys[i]; + delete this.cache[key]; + if(this.useLs) { + try { + localStorage.removeItem(key); + } catch(e) { + this.useLs = false; + } + } + } + + if(callback) { + callback(); + } + } + + clear(callback: any) { + if(this.useLs) { + try { + localStorage.clear(); + } catch (e) { + this.useLs = false; + } + } + + this.cache = {}; + callback(); + } +} + +const configStorage = new ConfigStorage(); + +/* private cache: {[key: string]: any} = {}; +private request: Promise; +private cacheURL: string; +constructor(cacheName: string) { + this.request = new Promise((resolve, reject) => { + let promise = caches.open(cacheName); + promise.then(cache => { + cache.keys().then(requests => { + if(!requests.length) { + return cache.put(this.cacheURL = '/session/' + Date.now(), new Response('{}')); + } else { + this.cacheURL = requests[0].url; + return cache.match(requests[0]).then(response => response.json()).then(j => this.cache = j); + } + }).then(() => { + resolve(promise); + }); + }) + }); +} */ class AppStorage { + private isWebWorker: boolean; + private taskID = 0; + private tasks: {[taskID: number]: (result: any) => void} = {}; + + constructor() { + if(Modes.test) { + this.setPrefix('t_'); + } + + // @ts-ignore + this.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope; + } + public setPrefix(newPrefix: string) { - ConfigStorage.prefix(newPrefix); + configStorage.keyPrefix = newPrefix; } public noPrefix() { - ConfigStorage.noPrefix(); + configStorage.noPrefix = true; } - private proxy(methodName: string, ..._args: any[]) { - let args = Array.prototype.slice.call(_args); + public finishTask(taskID: number, result: any) { + this.tasks[taskID](result); + delete this.tasks[taskID]; + } - let promise = new Promise((resolve, reject) => { - args.push((result: T) => { - resolve(result); - }); + private proxy(methodName: string, ..._args: any[]) { + return new Promise((resolve, reject) => { + if(this.isWebWorker) { + this.tasks[this.taskID] = resolve; + // @ts-ignore + self.postMessage({useLs: true, task: methodName, taskID: this.taskID, args: _args}); + this.taskID++; + } else { + let args = Array.prototype.slice.call(_args); + args.push((result: T) => { + resolve(result); + }); - ConfigStorage[methodName].apply(ConfigStorage, args); + // @ts-ignore + configStorage[methodName].apply(configStorage, args); + } }); - - return promise; } public get(...args: any[]) { @@ -39,12 +218,6 @@ class AppStorage { public clear(...args: any[]) { return this.proxy('clear', ...args); } - - constructor() { - if(Modes.test) { - this.setPrefix('t_'); - } - } } export default new AppStorage(); diff --git a/src/lib/utils.js b/src/lib/utils.js index 089b659c..995b3be3 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -394,8 +394,8 @@ export function isObject(object) { } export function tsNow (seconds) { - var t = +new Date() + (window.tsOffset || 0) - return seconds ? Math.floor(t / 1000) : t + var t = +new Date(); + return seconds ? Math.floor(t / 1000) : t; } export function safeReplaceObject (wasObject, newObject) { @@ -888,7 +888,7 @@ function versionCompare (ver1, ver2) { cleanUsername: cleanUsername, search: search }; - window.SearchIndexManager = SearchIndexManager; + //window.SearchIndexManager = SearchIndexManager; export {SearchIndexManager}; //})(window) diff --git a/src/pages/pageAuthCode.ts b/src/pages/pageAuthCode.ts index 9c4e1985..945e083c 100644 --- a/src/pages/pageAuthCode.ts +++ b/src/pages/pageAuthCode.ts @@ -2,10 +2,12 @@ import pageSignIn from './pageSignIn'; import pageSignUp from './pageSignUp'; import pageIm from './pageIm'; import pagePassword from './pagePassword'; -import CryptoWorker from '../lib/crypto/cryptoworker'; import LottieLoader from '../lib/lottieLoader'; -import apiManager from '../lib/mtproto/apiManager'; +//import CryptoWorker from '../lib/crypto/cryptoworker'; +//import apiManager from '../lib/mtproto/apiManager'; +import apiManager from '../lib/mtproto/mtprotoworker'; import Page from './page'; +import { App } from '../lib/mtproto/mtproto_config'; let authCode: { _: string, // 'auth.sentCode' @@ -49,8 +51,8 @@ let onFirstMount = (): Promise => { changePhonePromise = apiManager.invokeApi('auth.sendCode', { /* flags: 0, */ phone_number: phone_number, - api_id: Config.App.id, - api_hash: Config.App.hash, + api_id: App.id, + api_hash: App.hash, settings: { _: 'codeSettings', // that's how we sending Type flags: 0 @@ -122,7 +124,7 @@ let onFirstMount = (): Promise => { console.log('invoking auth.signIn with params:', params); - apiManager.invokeApi('auth.signIn', params) + apiManager.invokeApi('auth.signIn', params, {ignoreErrors: true}) .then((response: any) => { console.log('auth.signIn response:', response); @@ -220,7 +222,7 @@ let onFirstMount = (): Promise => { fetch('assets/img/TwoFactorSetupMonkeyTracking.tgs') .then(res => res.arrayBuffer()) - .then(data => CryptoWorker.gzipUncompress(data, true)) + .then(data => apiManager.gzipUncompress(data, true)) .then(str => LottieLoader.loadAnimation({ container: page.pageEl.querySelector('.auth-image'), renderer: 'svg', diff --git a/src/pages/pagePassword.ts b/src/pages/pagePassword.ts index beb715c7..ab1ffee7 100644 --- a/src/pages/pagePassword.ts +++ b/src/pages/pagePassword.ts @@ -1,10 +1,11 @@ import pageIm from './pageIm'; -import CryptoWorker from '../lib/crypto/cryptoworker'; +//import CryptoWorker from '../lib/crypto/cryptoworker'; +//import apiManager from '../lib/mtproto/apiManager'; import { putPreloader } from '../components/misc'; import LottieLoader from '../lib/lottieLoader'; -import passwordManager from '../lib/mtproto/passwordManager'; -import apiManager from '../lib/mtproto/apiManager'; +//import passwordManager from '../lib/mtproto/passwordManager'; +import apiManager from '../lib/mtproto/mtprotoworker'; import Page from './page'; let onFirstMount = (): Promise => { @@ -58,27 +59,23 @@ let onFirstMount = (): Promise => { this.textContent = 'PLEASE WAIT...'; putPreloader(this); - passwordManager.getState() - .then(state => { - console.log(state); - passwordManager.check(state, value).then((response: any) => { - console.log('passwordManager response:', response); + apiManager.checkPassword(value).then((response: any) => { + console.log('passwordManager response:', response); - switch(response._) { - case 'auth.authorization': - apiManager.setUserAuth({ - id: response.user.id - }); - - pageIm.mount(); - if(animation) animation.destroy(); - break; - default: - btnNext.removeAttribute('disabled'); - btnNext.innerText = response._; - break; - } - }).catch(handleError); + switch(response._) { + case 'auth.authorization': + apiManager.setUserAuth({ + id: response.user.id + }); + + pageIm.mount(); + if(animation) animation.destroy(); + break; + default: + btnNext.removeAttribute('disabled'); + btnNext.innerText = response._; + break; + } }).catch(handleError); }); @@ -98,7 +95,7 @@ let onFirstMount = (): Promise => { fetch('assets/img/TwoFactorSetupMonkeyClose.tgs') .then(res => res.arrayBuffer()) - .then(data => CryptoWorker.gzipUncompress(data, true)) + .then(data => apiManager.gzipUncompress(data, true)) .then(str => LottieLoader.loadAnimation({ container: page.pageEl.querySelector('.auth-image'), renderer: 'svg', diff --git a/src/pages/pageSignIn.ts b/src/pages/pageSignIn.ts index c11b2a8c..f7c11137 100644 --- a/src/pages/pageSignIn.ts +++ b/src/pages/pageSignIn.ts @@ -1,12 +1,14 @@ import { putPreloader, formatPhoneNumber } from "../components/misc"; import Scrollable from '../components/scrollable'; import {RichTextProcessor} from '../lib/richtextprocessor'; -import * as Config from '../lib/config'; +import Config from '../lib/config'; import { findUpTag } from "../lib/utils"; import pageAuthCode from "./pageAuthCode"; -import apiManager from "../lib/mtproto/apiManager"; +//import apiManager from "../lib/mtproto/apiManager"; +import apiManager from "../lib/mtproto/mtprotoworker"; import Page from "./page"; +import { App, Modes } from "../lib/mtproto/mtproto_config"; type Country = { name: string, @@ -21,6 +23,18 @@ type Country = { let btnNext: HTMLButtonElement = null; let onFirstMount = () => { + if(Modes.test) { + Config.Countries.push({ + name: 'Test Country', + phoneCode: '999 66', + code: 'TC', + emoji: '🤔', + pattern: '999 66 XXX XX' + }); + + console.log('Added test country to list!'); + } + //const countries: Country[] = _countries.default.filter(c => c.emoji); const countries: Country[] = Config.Countries.filter(c => c.emoji).sort((a, b) => a.name.localeCompare(b.name)); @@ -189,15 +203,15 @@ let onFirstMount = () => { let phone_number = telEl.value; apiManager.invokeApi('auth.sendCode', { - /* flags: 0, */ + //flags: 0, phone_number: phone_number, - api_id: Config.App.id, - api_hash: Config.App.hash, + api_id: App.id, + api_hash: App.hash, settings: { _: 'codeSettings', // that's how we sending Type flags: 0 } - /* lang_code: navigator.language || 'en' */ + //lang_code: navigator.language || 'en' }).then((code: any) => { console.log('got code', code); diff --git a/src/pages/pageSignUp.ts b/src/pages/pageSignUp.ts index 1a0b190b..62f6e5a3 100644 --- a/src/pages/pageSignUp.ts +++ b/src/pages/pageSignUp.ts @@ -1,7 +1,8 @@ import {putPreloader} from '../components/misc'; import resizeableImage from '../lib/cropper'; import pageIm from './pageIm'; -import apiManager from '../lib/mtproto/apiManager'; +//import apiManager from '../lib/mtproto/apiManager'; +import apiManager from '../lib/mtproto/mtprotoworker'; import apiFileManager from '../lib/mtproto/apiFileManager'; import Page from './page'; diff --git a/stats.json b/stats.json index 7709658c..0ec9656b 100644 --- a/stats.json +++ b/stats.json @@ -1,41 +1,40 @@ { "errors": [], "warnings": [ - "asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).\nThis can impact web performance.\nAssets: \n index.bundle.js (749 KiB)\n npm.webp-hero.chunk.js (310 KiB)", - "entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.\nEntrypoints:\n index (1.07 MiB)\n npm.aes-js.chunk.js\n npm.jsbn.chunk.js\n npm.leemon.chunk.js\n npm.lottie-web.chunk.js\n npm.web-streams-polyfill.chunk.js\n vendors~index.chunk.js\n index.bundle.js\n webp (317 KiB)\n npm.webp-hero.chunk.js\n webp.bundle.js\n", + "asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).\nThis can impact web performance.\nAssets: \n 13e15c04959af0ca33a5.worker.js (344 KiB)\n index.bundle.js (533 KiB)\n npm.webp-hero.chunk.js (310 KiB)", + "entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.\nEntrypoints:\n index (579 KiB)\n npm.jsbn.chunk.js\n vendors~index.chunk.js\n index.bundle.js\n webp (317 KiB)\n npm.webp-hero.chunk.js\n webp.bundle.js\n", "webpack performance recommendations: \nYou can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.\nFor more info visit https://webpack.js.org/guides/code-splitting/" ], - "version": "4.41.2", - "hash": "e28785388f6334731d60", - "time": 8981, - "builtAt": 1581916641211, + "version": "4.42.1", + "hash": "5fda6c1df88831bade37", + "time": 9193, + "builtAt": 1587894287504, "publicPath": "", - "outputPath": "/Users/kuzmenko/Documents/projects/tweb/public", + "outputPath": "F:\\tweb\\public", "assetsByChunkName": { "index": "index.bundle.js", - "npm.aes-js": "npm.aes-js.chunk.js", + "lottie": "lottie.bundle.js", "npm.jsbn": "npm.jsbn.chunk.js", - "npm.leemon": "npm.leemon.chunk.js", "npm.lottie-web": "npm.lottie-web.chunk.js", - "npm.web-streams-polyfill": "npm.web-streams-polyfill.chunk.js", "npm.webp-hero": "npm.webp-hero.chunk.js", "vendors~index": "vendors~index.chunk.js", "webp": "webp.bundle.js" }, "assets": [ { - "name": "69d45fed4230730b6030.worker.js", - "size": 79262, + "name": "13e15c04959af0ca33a5.worker.js", + "size": 352154, "chunks": [], "chunkNames": [], "info": { "immutable": true }, - "emitted": true + "emitted": true, + "isOverSizeLimit": true }, { - "name": "69d45fed4230730b6030.worker.js.gz", - "size": 26698, + "name": "13e15c04959af0ca33a5.worker.js.gz", + "size": 82986, "chunks": [], "chunkNames": [], "info": {}, @@ -51,7 +50,7 @@ }, { "name": "assets/fonts/tgico.svg", - "size": 85141, + "size": 85248, "chunks": [], "chunkNames": [], "info": {}, @@ -59,7 +58,7 @@ }, { "name": "assets/fonts/tgico.svg.gz", - "size": 24074, + "size": 24076, "chunks": [], "chunkNames": [], "info": {}, @@ -82,8 +81,8 @@ "emitted": true }, { - "name": "assets/img/camomile.jpg", - "size": 107703, + "name": "assets/img/camomile_blurred.jpg", + "size": 19994, "chunks": [], "chunkNames": [], "info": {}, @@ -91,7 +90,7 @@ }, { "name": "assets/img/doc-in.svg", - "size": 1080, + "size": 1089, "chunks": [], "chunkNames": [], "info": {}, @@ -115,7 +114,7 @@ }, { "name": "index.bundle.js", - "size": 767165, + "size": 546094, "chunks": [ 0 ], @@ -128,7 +127,7 @@ }, { "name": "index.bundle.js.gz", - "size": 172484, + "size": 128995, "chunks": [], "chunkNames": [], "info": {}, @@ -136,7 +135,7 @@ }, { "name": "index.html", - "size": 24479, + "size": 27296, "chunks": [], "chunkNames": [], "info": {}, @@ -144,35 +143,27 @@ }, { "name": "index.html.gz", - "size": 5560, + "size": 6100, "chunks": [], "chunkNames": [], "info": {}, "emitted": true }, { - "name": "npm.aes-js.chunk.js", - "size": 43937, + "name": "lottie.bundle.js", + "size": 1713, "chunks": [ 1 ], "chunkNames": [ - "npm.aes-js" + "lottie" ], "info": {}, "emitted": true }, - { - "name": "npm.aes-js.chunk.js.gz", - "size": 18149, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - }, { "name": "npm.jsbn.chunk.js", - "size": 19047, + "size": 19042, "chunks": [ 2 ], @@ -184,27 +175,7 @@ }, { "name": "npm.jsbn.chunk.js.gz", - "size": 6583, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - }, - { - "name": "npm.leemon.chunk.js", - "size": 14391, - "chunks": [ - 3 - ], - "chunkNames": [ - "npm.leemon" - ], - "info": {}, - "emitted": true - }, - { - "name": "npm.leemon.chunk.js.gz", - "size": 4668, + "size": 6584, "chunks": [], "chunkNames": [], "info": {}, @@ -212,9 +183,9 @@ }, { "name": "npm.lottie-web.chunk.js", - "size": 202543, + "size": 202900, "chunks": [ - 4 + 3 ], "chunkNames": [ "npm.lottie-web" @@ -224,27 +195,7 @@ }, { "name": "npm.lottie-web.chunk.js.gz", - "size": 52399, - "chunks": [], - "chunkNames": [], - "info": {}, - "emitted": true - }, - { - "name": "npm.web-streams-polyfill.chunk.js", - "size": 42988, - "chunks": [ - 5 - ], - "chunkNames": [ - "npm.web-streams-polyfill" - ], - "info": {}, - "emitted": true - }, - { - "name": "npm.web-streams-polyfill.chunk.js.gz", - "size": 9949, + "size": 52454, "chunks": [], "chunkNames": [], "info": {}, @@ -252,9 +203,9 @@ }, { "name": "npm.webp-hero.chunk.js", - "size": 317799, + "size": 317227, "chunks": [ - 6 + 4 ], "chunkNames": [ "npm.webp-hero" @@ -265,7 +216,7 @@ }, { "name": "npm.webp-hero.chunk.js.gz", - "size": 96803, + "size": 96622, "chunks": [], "chunkNames": [], "info": {}, @@ -273,9 +224,9 @@ }, { "name": "vendors~index.chunk.js", - "size": 29816, + "size": 27977, "chunks": [ - 7 + 5 ], "chunkNames": [ "vendors~index" @@ -285,7 +236,7 @@ }, { "name": "vendors~index.chunk.js.gz", - "size": 10700, + "size": 9900, "chunks": [], "chunkNames": [], "info": {}, @@ -293,9 +244,9 @@ }, { "name": "webp.bundle.js", - "size": 7173, + "size": 7166, "chunks": [ - 8 + 6 ], "chunkNames": [ "webp" @@ -308,20 +259,12 @@ "entrypoints": { "index": { "chunks": [ - 1, 2, - 3, - 4, 5, - 7, 0 ], "assets": [ - "npm.aes-js.chunk.js", "npm.jsbn.chunk.js", - "npm.leemon.chunk.js", - "npm.lottie-web.chunk.js", - "npm.web-streams-polyfill.chunk.js", "vendors~index.chunk.js", "index.bundle.js" ], @@ -331,8 +274,8 @@ }, "webp": { "chunks": [ - 6, - 8 + 4, + 6 ], "assets": [ "npm.webp-hero.chunk.js", @@ -341,25 +284,29 @@ "children": {}, "childAssets": {}, "isOverSizeLimit": true + }, + "lottie": { + "chunks": [ + 3, + 1 + ], + "assets": [ + "npm.lottie-web.chunk.js", + "lottie.bundle.js" + ], + "children": {}, + "childAssets": {} } }, "namedChunkGroups": { "index": { "chunks": [ - 1, 2, - 3, - 4, 5, - 7, 0 ], "assets": [ - "npm.aes-js.chunk.js", "npm.jsbn.chunk.js", - "npm.leemon.chunk.js", - "npm.lottie-web.chunk.js", - "npm.web-streams-polyfill.chunk.js", "vendors~index.chunk.js", "index.bundle.js" ], @@ -369,8 +316,8 @@ }, "webp": { "chunks": [ - 6, - 8 + 4, + 6 ], "assets": [ "npm.webp-hero.chunk.js", @@ -379,6 +326,18 @@ "children": {}, "childAssets": {}, "isOverSizeLimit": true + }, + "lottie": { + "chunks": [ + 3, + 1 + ], + "assets": [ + "npm.lottie-web.chunk.js", + "lottie.bundle.js" + ], + "children": {}, + "childAssets": {} } }, "chunks": [ @@ -387,21 +346,17 @@ "rendered": true, "initial": true, "entry": true, - "size": 1315562, + "size": 1058919, "names": [ "index" ], "files": [ "index.bundle.js" ], - "hash": "235eb41a21132db1e2b8", + "hash": "2dc4877609df7b7188fc", "siblings": [ - 1, 2, - 3, - 4, - 5, - 7 + 5 ], "parents": [], "children": [], @@ -409,11 +364,11 @@ "modules": [ { "id": 0, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/utils.js", + "identifier": "F:\\tweb\\src\\lib\\utils.js", "name": "./src/lib/utils.js", - "index": 18, - "index2": 17, - "size": 22613, + "index": 22, + "index2": 19, + "size": 24136, "cacheable": true, "built": true, "optional": false, @@ -421,24 +376,24 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "issuerId": 52, + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "issuerId": 44, "issuerName": "./src/index.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } } ], "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 }, "failed": false, "errors": 0, @@ -447,16 +402,16 @@ "reasons": [ { "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "module": "./src/lib/mtproto/mtprotoworker.ts", + "moduleName": "./src/lib/mtproto/mtprotoworker.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "27:16-35" + "loc": "13:16-35" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony side effect evaluation", @@ -464,170 +419,197 @@ "loc": "1:0-65" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "347:32-36" + "loc": "348:32-36" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "369:11-25" + "loc": "370:11-25" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "400:8-22" + "loc": "401:8-22" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "428:10-24" + "loc": "429:10-24" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "441:10-24" + "loc": "442:10-24" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "459:10-24" + "loc": "460:10-24" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "470:10-24" + "loc": "471:10-24" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "472:10-24" + "loc": "473:10-24" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "485:18-32" + "loc": "486:18-32" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "492:12-26" + "loc": "493:12-26" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "517:56-70" + "loc": "518:56-70" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "523:82-96" + "loc": "524:82-96" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "543:10-24" + "loc": "544:10-24" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "545:10-24" + "loc": "546:10-24" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "566:10-24" + "loc": "583:20-34" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "572:65-79" + "loc": "589:10-24" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "573:10-24" + "loc": "595:20-34" }, { - "moduleId": 3, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", + "module": "./src/lib/richtextprocessor.js", + "moduleName": "./src/lib/richtextprocessor.js", + "type": "harmony import specifier", + "userRequest": "./utils", + "loc": "600:65-79" + }, + { + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", + "module": "./src/lib/richtextprocessor.js", + "moduleName": "./src/lib/richtextprocessor.js", + "type": "harmony import specifier", + "userRequest": "./utils", + "loc": "601:10-24" + }, + { + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", "module": "./src/lib/richtextprocessor.js", "moduleName": "./src/lib/richtextprocessor.js", "type": "harmony import specifier", "userRequest": "./utils", - "loc": "583:12-26" + "loc": "611:12-26" + }, + { + "moduleId": 3, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\misc.ts", + "module": "./src/components/misc.ts", + "moduleName": "./src/components/misc.ts", + "type": "cjs require", + "userRequest": "../lib/utils", + "loc": "6:16-39" }, { "moduleId": 4, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appUsersManager.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", "module": "./src/lib/appManagers/appUsersManager.ts", "moduleName": "./src/lib/appManagers/appUsersManager.ts", "type": "cjs require", @@ -636,16 +618,7 @@ }, { "moduleId": 5, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/misc.ts", - "module": "./src/components/misc.ts", - "moduleName": "./src/components/misc.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "7:16-39" - }, - { - "moduleId": 10, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPeersManager.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", "module": "./src/lib/appManagers/appPeersManager.ts", "moduleName": "./src/lib/appManagers/appPeersManager.ts", "type": "cjs require", @@ -653,229 +626,229 @@ "loc": "8:16-35" }, { - "moduleId": 11, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", + "moduleId": 6, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", "module": "./src/lib/appManagers/appPhotosManager.ts", "moduleName": "./src/lib/appManagers/appPhotosManager.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "16:16-35" - }, - { - "moduleId": 12, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appChatsManager.ts", - "module": "./src/lib/appManagers/appChatsManager.ts", - "moduleName": "./src/lib/appManagers/appChatsManager.ts", - "type": "cjs require", - "userRequest": "../utils", - "loc": "6:16-35" + "loc": "7:16-35" }, { - "moduleId": 14, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/scrollable.ts", + "moduleId": 8, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\scrollable.ts", "module": "./src/components/scrollable.ts", "moduleName": "./src/components/scrollable.ts", "type": "cjs require", "userRequest": "../lib/utils", - "loc": "3:16-39" + "loc": "6:16-39" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "moduleId": 11, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\lottieLoader.ts", + "module": "./src/lib/lottieLoader.ts", + "moduleName": "./src/lib/lottieLoader.ts", "type": "cjs require", - "userRequest": "../utils", - "loc": "15:16-35" + "userRequest": "./utils", + "loc": "12:16-34" }, { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "15:16-35" + "loc": "8:16-35" }, { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", + "moduleId": 13, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appChatsManager.ts", + "module": "./src/lib/appManagers/appChatsManager.ts", + "moduleName": "./src/lib/appManagers/appChatsManager.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "23:16-35" + "loc": "6:16-35" }, { - "moduleId": 20, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/lottieLoader.ts", - "module": "./src/lib/lottieLoader.ts", - "moduleName": "./src/lib/lottieLoader.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./utils", - "loc": "19:16-34" + "userRequest": "../utils", + "loc": "15:16-35" }, { - "moduleId": 23, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/serverTimeManager.ts", - "module": "./src/lib/mtproto/serverTimeManager.ts", - "moduleName": "./src/lib/mtproto/serverTimeManager.ts", + "moduleId": 20, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\preloader.ts", + "module": "./src/components/preloader.ts", + "moduleName": "./src/components/preloader.ts", "type": "cjs require", - "userRequest": "../utils", - "loc": "7:16-35" + "userRequest": "../lib/utils", + "loc": "3:16-39" }, { - "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "20:16-35" + "loc": "15:16-35" }, { - "moduleId": 27, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/apiUpdatesManager.ts", + "moduleId": 24, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", "module": "./src/lib/appManagers/apiUpdatesManager.ts", "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "8:16-35" + "loc": "9:16-35" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", + "moduleId": 26, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", "module": "./src/lib/appManagers/appDialogsManager.ts", "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "17:16-35" - }, - { - "moduleId": 29, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/preloader.ts", - "module": "./src/components/preloader.ts", - "moduleName": "./src/components/preloader.ts", - "type": "cjs require", - "userRequest": "../lib/utils", - "loc": "3:16-39" + "loc": "15:16-35" }, { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", "module": "./src/components/wrappers.ts", "moduleName": "./src/components/wrappers.ts", "type": "cjs require", "userRequest": "../lib/utils", - "loc": "20:16-39" - }, - { - "moduleId": 35, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/tl_utils.ts", - "module": "./src/lib/tl_utils.ts", - "moduleName": "./src/lib/tl_utils.ts", - "type": "cjs require", - "userRequest": "./utils", - "loc": "17:16-34" + "loc": "28:16-39" }, { - "moduleId": 36, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/timeManager.ts", - "module": "./src/lib/mtproto/timeManager.ts", - "moduleName": "./src/lib/mtproto/timeManager.ts", + "moduleId": 30, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts", + "module": "./src/lib/mtproto/serverTimeManager.ts", + "moduleName": "./src/lib/mtproto/serverTimeManager.ts", "type": "cjs require", "userRequest": "../utils", "loc": "7:16-35" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "6:16-35" + "loc": "12:16-35" }, { - "moduleId": 40, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "module": "./src/components/pageSignIn.ts", - "moduleName": "./src/components/pageSignIn.ts", + "moduleId": 32, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", + "module": "./src/components/lazyLoadQueue.ts", + "moduleName": "./src/components/lazyLoadQueue.ts", "type": "cjs require", "userRequest": "../lib/utils", - "loc": "17:16-39" + "loc": "12:16-39" }, { - "moduleId": 44, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", "type": "cjs require", - "userRequest": "../utils", - "loc": "19:16-35" + "userRequest": "../lib/utils", + "loc": "10:16-39" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 37, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", + "module": "./src/lib/appManagers/appWebPagesManager.ts", + "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "8:16-35" + "loc": "6:16-35" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "14:16-35" + "loc": "15:16-35" }, { - "moduleId": 48, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/lazyLoadQueue.ts", - "module": "./src/components/lazyLoadQueue.ts", - "moduleName": "./src/components/lazyLoadQueue.ts", + "moduleId": 41, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "module": "./src/components/appSearch.ts", + "moduleName": "./src/components/appSearch.ts", "type": "cjs require", "userRequest": "../lib/utils", "loc": "12:16-39" }, { - "moduleId": 49, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appWebPagesManager.ts", - "module": "./src/lib/appManagers/appWebPagesManager.ts", - "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", + "moduleId": 42, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", + "module": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "6:16-35" + "loc": "15:16-35" }, { - "moduleId": 52, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "moduleId": 44, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "module": "./src/index.ts", "moduleName": "./src/index.ts", "type": "cjs require", "userRequest": "./lib/utils", - "loc": "23:16-38" + "loc": "79:75-97" + }, + { + "moduleId": 65, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagesManager.ts", + "module": "./src/pages/pagesManager.ts", + "moduleName": "./src/pages/pagesManager.ts", + "type": "cjs require", + "userRequest": "../lib/utils", + "loc": "6:16-39" }, { "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.ts", + "module": "./src/lib/mtproto/mtproto.ts", + "moduleName": "./src/lib/mtproto/mtproto.ts", "type": "cjs require", "userRequest": "../utils", - "loc": "22:16-35" + "loc": "7:16-35" + }, + { + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", + "type": "cjs require", + "userRequest": "../lib/utils", + "loc": "19:16-39" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", "module": "./src/components/emoticonsDropdown.ts", "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", "userRequest": "../lib/utils", "loc": "18:16-39" + }, + { + "moduleId": 72, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\bubbleGroups.ts", + "module": "./src/components/bubbleGroups.ts", + "moduleName": "./src/components/bubbleGroups.ts", + "type": "cjs require", + "userRequest": "../lib/utils", + "loc": "3:16-39" } ], "usedExports": true, @@ -885,7 +858,6 @@ "isInDOM", "checkDragEvent", "cancelEvent", - "onCtrlEnter", "setFieldSelection", "getFieldSelection", "getRichValue", @@ -895,6 +867,7 @@ "setRichFocus", "getSelectedText", "$rootScope", + "generatePathData", "langPack", "_", "isObject", @@ -912,6 +885,7 @@ "deepEqual", "listMergeSorted", "listUniqSorted", + "escapeRegExp", "encodeEntities", "calcImageInBox", "countryCodeEmoji", @@ -919,18 +893,18 @@ "SearchIndexManager" ], "optimizationBailout": [ - "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/components/emoticonsDropdown.ts (referenced with cjs require), ./src/components/lazyLoadQueue.ts (referenced with cjs require), ./src/components/misc.ts (referenced with cjs require), ./src/components/pageSignIn.ts (referenced with cjs require), ./src/components/preloader.ts (referenced with cjs require), ./src/components/scrollable.ts (referenced with cjs require), ./src/components/wrappers.ts (referenced with cjs require), ./src/index.ts (referenced with cjs require), ./src/lib/appManagers/apiUpdatesManager.ts (referenced with cjs require), ./src/lib/appManagers/appChatsManager.ts (referenced with cjs require), ./src/lib/appManagers/appDialogsManager.ts (referenced with cjs require), ./src/lib/appManagers/appImManager.ts (referenced with cjs require), ./src/lib/appManagers/appMediaViewer.ts (referenced with cjs require), ./src/lib/appManagers/appMessagesManager.ts (referenced with cjs require), ./src/lib/appManagers/appPeersManager.ts (referenced with cjs require), ./src/lib/appManagers/appPhotosManager.ts (referenced with cjs require), ./src/lib/appManagers/appProfileManager.ts (referenced with cjs require), ./src/lib/appManagers/appSidebarLeft.ts (referenced with cjs require), ./src/lib/appManagers/appSidebarRight.ts (referenced with cjs require), ./src/lib/appManagers/appUsersManager.ts (referenced with cjs require), ./src/lib/appManagers/appWebPagesManager.ts (referenced with cjs require), ./src/lib/lottieLoader.ts (referenced with cjs require), ./src/lib/mtproto/apiManager.ts (referenced with cjs require), ./src/lib/mtproto/authorizer.ts (referenced with cjs require), ./src/lib/mtproto/mtproto.ts (referenced with cjs require), ./src/lib/mtproto/networker.ts (referenced with cjs require), ./src/lib/mtproto/serverTimeManager.ts (referenced with cjs require), ./src/lib/mtproto/timeManager.ts (referenced with cjs require), ./src/lib/tl_utils.ts (referenced with cjs require)" + "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/components/appSearch.ts (referenced with cjs require), ./src/components/bubbleGroups.ts (referenced with cjs require), ./src/components/chatInput.ts (referenced with cjs require), ./src/components/emoticonsDropdown.ts (referenced with cjs require), ./src/components/lazyLoadQueue.ts (referenced with cjs require), ./src/components/misc.ts (referenced with cjs require), ./src/components/preloader.ts (referenced with cjs require), ./src/components/scrollable.ts (referenced with cjs require), ./src/components/wrappers.ts (referenced with cjs require), ./src/index.ts (referenced with cjs require), ./src/lib/appManagers/apiUpdatesManager.ts (referenced with cjs require), ./src/lib/appManagers/appChatsManager.ts (referenced with cjs require), ./src/lib/appManagers/appDialogsManager.ts (referenced with cjs require), ./src/lib/appManagers/appImManager.ts (referenced with cjs require), ./src/lib/appManagers/appMediaViewer.ts (referenced with cjs require), ./src/lib/appManagers/appMessagesManager.ts (referenced with cjs require), ./src/lib/appManagers/appPeersManager.ts (referenced with cjs require), ./src/lib/appManagers/appPhotosManager.ts (referenced with cjs require), ./src/lib/appManagers/appProfileManager.ts (referenced with cjs require), ./src/lib/appManagers/appSidebarLeft.ts (referenced with cjs require), ./src/lib/appManagers/appSidebarRight.ts (referenced with cjs require), ./src/lib/appManagers/appUsersManager.ts (referenced with cjs require), ./src/lib/appManagers/appWebPagesManager.ts (referenced with cjs require), ./src/lib/lottieLoader.ts (referenced with cjs require), ./src/lib/mtproto/mtproto.ts (referenced with cjs require), ./src/lib/mtproto/mtprotoworker.ts (referenced with cjs require), ./src/lib/mtproto/serverTimeManager.ts (referenced with cjs require), ./src/pages/pageSignIn.ts (referenced with cjs require), ./src/pages/pagesManager.ts (referenced with cjs require)" ], "depth": 1, - "source": "/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nvar _logTimer = (new Date()).getTime()\r\nexport function dT () {\r\n return '[' + (((new Date()).getTime() - _logTimer) / 1000).toFixed(3) + ']'\r\n}\r\n\r\nexport function checkClick (e, noprevent) {\r\n if (e.which == 1 && (e.ctrlKey || e.metaKey) || e.which == 2) {\r\n return true\r\n }\r\n\r\n if (!noprevent) {\r\n e.preventDefault()\r\n }\r\n\r\n return false\r\n}\r\n\r\nexport function isInDOM (element, parentNode) {\r\n if (!element) {\r\n return false\r\n }\r\n parentNode = parentNode || document.body\r\n if (element == parentNode) {\r\n return true\r\n }\r\n return isInDOM(element.parentNode, parentNode)\r\n}\r\n\r\nexport function checkDragEvent(e) {\r\n if (!e || e.target && (e.target.tagName == 'IMG' || e.target.tagName == 'A')) return false\r\n if (e.dataTransfer && e.dataTransfer.types) {\r\n for (var i = 0; i < e.dataTransfer.types.length; i++) {\r\n if (e.dataTransfer.types[i] == 'Files') {\r\n return true\r\n }\r\n }\r\n } else {\r\n return true\r\n }\r\n\r\n return false\r\n}\r\n\r\nexport function cancelEvent (event) {\r\n event = event || window.event\r\n if (event) {\r\n event = event.originalEvent || event\r\n\r\n if (event.stopPropagation) event.stopPropagation()\r\n if (event.preventDefault) event.preventDefault()\r\n event.returnValue = false\r\n event.cancelBubble = true\r\n }\r\n\r\n return false\r\n}\r\n\r\nexport function onCtrlEnter (textarea, cb) {\r\n $(textarea).on('keydown', function (e) {\r\n if (e.keyCode == 13 && (e.ctrlKey || e.metaKey)) {\r\n cb()\r\n return cancelEvent(e)\r\n }\r\n })\r\n}\r\n\r\nexport function setFieldSelection (field, from, to) {\r\n field = $(field)[0]\r\n try {\r\n field.focus()\r\n if (from === undefined || from === false) {\r\n from = field.value.length\r\n }\r\n if (to === undefined || to === false) {\r\n to = from\r\n }\r\n if (field.createTextRange) {\r\n var range = field.createTextRange()\r\n range.collapse(true)\r\n range.moveEnd('character', to)\r\n range.moveStart('character', from)\r\n range.select()\r\n }\r\n else if (field.setSelectionRange) {\r\n field.setSelectionRange(from, to)\r\n }\r\n } catch(e) {}\r\n}\r\n\r\nexport function getFieldSelection (field) {\r\n if (field.selectionStart) {\r\n return field.selectionStart\r\n }\r\n else if (!document.selection) {\r\n return 0\r\n }\r\n\r\n var c = '\\x01'\r\n var sel = document.selection.createRange()\r\n var txt = sel.text\r\n var dup = sel.duplicate()\r\n var len = 0\r\n\r\n try {\r\n dup.moveToElementText(field)\r\n } catch(e) {\r\n return 0\r\n }\r\n\r\n sel.text = txt + c\r\n len = dup.text.indexOf(c)\r\n sel.moveStart('character', -1)\r\n sel.text = ''\r\n\r\n // if (browser.msie && len == -1) {\r\n // return field.value.length\r\n // }\r\n return len\r\n}\r\n\r\nexport function getRichValue (field) {\r\n if (!field) {\r\n return ''\r\n }\r\n var lines = []\r\n var line = []\r\n\r\n getRichElementValue(field, lines, line)\r\n if (line.length) {\r\n lines.push(line.join(''))\r\n }\r\n\r\n var value = lines.join('\\n')\r\n value = value.replace(/\\u00A0/g, ' ')\r\n\r\n return value\r\n}\r\n\r\nexport function placeCaretAtEnd(el) {\r\n el.focus();\r\n if (typeof window.getSelection != \"undefined\"\r\n && typeof document.createRange != \"undefined\") {\r\n var range = document.createRange();\r\n range.selectNodeContents(el);\r\n range.collapse(false);\r\n var sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n } else if (typeof document.body.createTextRange != \"undefined\") {\r\n var textRange = document.body.createTextRange();\r\n textRange.moveToElementText(el);\r\n textRange.collapse(false);\r\n textRange.select();\r\n }\r\n}\r\n\r\nexport function getRichValueWithCaret (field) {\r\n if (!field) {\r\n return []\r\n }\r\n var lines = []\r\n var line = []\r\n\r\n var sel = window.getSelection ? window.getSelection() : false\r\n var selNode\r\n var selOffset\r\n if (sel && sel.rangeCount) {\r\n var range = sel.getRangeAt(0)\r\n /* if (range.startContainer &&\r\n range.startContainer == range.endContainer &&\r\n range.startOffset == range.endOffset) { */\r\n selNode = range.startContainer\r\n selOffset = range.startOffset\r\n //}\r\n }\r\n\r\n getRichElementValue(field, lines, line, selNode, selOffset)\r\n\r\n if (line.length) {\r\n lines.push(line.join(''))\r\n }\r\n\r\n var value = lines.join('\\n')\r\n var caretPos = value.indexOf('\\x01')\r\n if (caretPos != -1) {\r\n value = value.substr(0, caretPos) + value.substr(caretPos + 1)\r\n }\r\n value = value.replace(/\\u00A0/g, ' ')\r\n\r\n return [value, caretPos]\r\n}\r\n\r\nexport function getRichElementValue (node, lines, line, selNode, selOffset) {\r\n if (node.nodeType == 3) { // TEXT\r\n if (selNode === node) {\r\n var value = node.nodeValue\r\n line.push(value.substr(0, selOffset) + '\\x01' + value.substr(selOffset))\r\n } else {\r\n line.push(node.nodeValue)\r\n }\r\n return\r\n }\r\n if (node.nodeType != 1) { // NON-ELEMENT\r\n return\r\n }\r\n var isSelected = (selNode === node)\r\n var isBlock = node.tagName == 'DIV' || node.tagName == 'P'\r\n var curChild\r\n if (isBlock && line.length || node.tagName == 'BR') {\r\n lines.push(line.join(''))\r\n line.splice(0, line.length)\r\n }\r\n else if (node.tagName == 'IMG') {\r\n if (node.alt) {\r\n line.push(node.alt)\r\n }\r\n }\r\n if (isSelected && !selOffset) {\r\n line.push('\\x01')\r\n }\r\n var curChild = node.firstChild\r\n while (curChild) {\r\n getRichElementValue(curChild, lines, line, selNode, selOffset)\r\n curChild = curChild.nextSibling\r\n }\r\n if (isSelected && selOffset) {\r\n line.push('\\x01')\r\n }\r\n if (isBlock && line.length) {\r\n lines.push(line.join(''))\r\n line.splice(0, line.length)\r\n }\r\n}\r\n\r\nexport function setRichFocus (field, selectNode, noCollapse) {\r\n field.focus()\r\n if (selectNode &&\r\n selectNode.parentNode == field &&\r\n !selectNode.nextSibling &&\r\n !noCollapse) {\r\n field.removeChild(selectNode)\r\n selectNode = null\r\n }\r\n if (window.getSelection && document.createRange) {\r\n var range = document.createRange()\r\n if (selectNode) {\r\n range.selectNode(selectNode)\r\n } else {\r\n range.selectNodeContents(field)\r\n }\r\n if (!noCollapse) {\r\n range.collapse(false)\r\n }\r\n\r\n var sel = window.getSelection()\r\n sel.removeAllRanges()\r\n sel.addRange(range)\r\n }\r\n else if (document.body.createTextRange !== undefined) {\r\n var textRange = document.body.createTextRange()\r\n textRange.moveToElementText(selectNode || field)\r\n if (!noCollapse) {\r\n textRange.collapse(false)\r\n }\r\n textRange.select()\r\n }\r\n}\r\n\r\nexport function getSelectedText() {\r\n var sel = (\r\n window.getSelection && window.getSelection() ||\r\n document.getSelection && document.getSelection() ||\r\n document.selection && document.selection.createRange().text || ''\r\n ).toString().replace(/^\\s+|\\s+$/g, '')\r\n\r\n return sel\r\n}\r\n\r\n/* if (Config.Modes.animations &&\r\n typeof window.requestAnimationFrame == 'function') {\r\n window.onAnimationFrameCallback = function (cb) {\r\n return (function () {\r\n window.requestAnimationFrame(cb)\r\n })\r\n }\r\n} else {\r\n window.onAnimationFrameCallback = function (cb) {\r\n return cb\r\n }\r\n} */\r\n\r\nexport const $rootScope = {\r\n $broadcast: (name/* : string */, detail/*? : any */) => {\r\n ////console.log(dT(), 'Broadcasting ' + name + ' event, with args:', detail);\r\n //console.trace();\r\n let myCustomEvent = new CustomEvent(name, {detail});\r\n document.dispatchEvent(myCustomEvent);\r\n },\r\n $on: (name/* : string */, callback/* : any */) => {\r\n document.addEventListener(name, callback);\r\n },\r\n\r\n selectedPeerID: 0,\r\n idle: {\r\n isIDLE: false\r\n }\r\n};\r\n\r\nexport const langPack = {\r\n \"messageActionChatCreate\": \"created the group\",\r\n\t\"messageActionChatEditTitle\": \"changed group name\",\r\n\t\"messageActionChatEditPhoto\": \"changed group photo\",\r\n\t\"messageActionChatDeletePhoto\": \"removed group photo\",\r\n\t\"messageActionChatReturn\": \"returned to group\",\r\n\t\"messageActionChatJoined\": \"joined the group\",\r\n \"messageActionChatAddUser\": \"invited {user}\",\r\n \"messageActionChatAddUsers\": \"invited {} users\",\r\n\t\"messageActionChatLeave\": \"left group\",\r\n\t\"messageActionChatDeleteUser\": \"removed user\",\r\n\t\"messageActionChatJoinedByLink\": \"joined the group\",\r\n\t\"messageActionPinMessage\": \"pinned message\",\r\n\t\"messageActionChannelCreate\": \"Channel created\",\r\n\t\"messageActionChannelEditTitle\": \"Channel renamed\",\r\n\t\"messageActionChannelEditPhoto\": \"Channel photo updated\",\r\n \"messageActionChannelDeletePhoto\": \"Channel photo removed\",\r\n \"messageActionHistoryClear\": \"History cleared\",\r\n\r\n \"messageActionPhoneCall.in_ok\": \"Incoming Call\",\r\n\t\"messageActionPhoneCall.out_ok\": \"Outgoing Call\",\r\n\t\"messageActionPhoneCall.in_missed\": \"Missed Call\",\r\n\t\"messageActionPhoneCall.out_missed\": \"Cancelled Call\",\r\n};\r\n\r\nexport const _ = (str/* : string */) => {\r\n str = str.replace('_raw', '');\r\n\r\n return langPack[str] ? langPack[str] : str;\r\n};\r\n\r\nexport function isObject(object) {\r\n return typeof(object) === 'object' && object !== null;\r\n}\r\n\r\nexport function tsNow (seconds) {\r\n var t = +new Date() + (window.tsOffset || 0)\r\n return seconds ? Math.floor(t / 1000) : t\r\n}\r\n\r\nexport function safeReplaceObject (wasObject, newObject) {\r\n for (var key in wasObject) {\r\n if (!newObject.hasOwnProperty(key) && key.charAt(0) != '$') {\r\n delete wasObject[key]\r\n }\r\n }\r\n for (var key in newObject) {\r\n if (newObject.hasOwnProperty(key)) {\r\n wasObject[key] = newObject[key]\r\n }\r\n }\r\n}\r\n\r\nexport function numberWithCommas(x) {\r\n var parts = x.toString().split(\".\");\r\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n return parts.join(\".\");\r\n}\r\n\r\nexport function findUpClassName(el, className) {\r\n if(el.classList.contains(className)) return el; // 03.02.2020\r\n\r\n while(el.parentNode) {\r\n el = el.parentNode;\r\n if(el.classList.contains(className)) \r\n return el;\r\n }\r\n return null;\r\n}\r\n\r\nexport function findUpTag(el, tag) {\r\n if(el.tagName == tag) return el; // 03.02.2020\r\n\r\n while(el.parentNode) {\r\n el = el.parentNode;\r\n if(el.tagName === tag) \r\n return el;\r\n }\r\n return null;\r\n}\r\n\r\nexport function isElementInViewport(el) {\r\n var rect = el.getBoundingClientRect(),\r\n vWidth = window.innerWidth || document.documentElement.clientWidth,\r\n vHeight = window.innerHeight || document.documentElement.clientHeight,\r\n efp = function(x, y) { return document.elementFromPoint(x, y) }; \r\n\r\n // Return false if it's not in the viewport\r\n if(rect.right < 0 || rect.bottom < 0 \r\n || rect.left > vWidth || rect.top > vHeight \r\n || !rect.width || !rect.height) {\r\n return false;\r\n }\r\n\r\n let elements = [\r\n efp(rect.left + 1, rect.top + 1),\r\n efp(rect.right - 1, rect.top + 1),\r\n efp(rect.right - 1, rect.bottom - 1),\r\n efp(rect.left + 1, rect.bottom - 1)\r\n ];\r\n\r\n // Return true if any of its four corners are visible\r\n return elements.find(e => el.contains(e) || el.parentElement == e) !== undefined;\r\n}\r\n\r\nexport function isScrolledIntoView(el) {\r\n var rect = el.getBoundingClientRect();\r\n var elemTop = rect.top;\r\n var elemBottom = rect.bottom;\r\n\r\n // Only completely visible elements return true:\r\n //var isVisible = (elemTop >= 0) && (elemBottom <= window.innerHeight);\r\n // Partially visible elements return true:\r\n var isVisible = elemTop < window.innerHeight && elemBottom >= 0;\r\n return isVisible;\r\n}\r\n\r\n/* export function isScrolledIntoView(el) {\r\n var rect = el.getBoundingClientRect(), top = rect.top, height = rect.height, \r\n el = el.parentNode\r\n // Check if bottom of the element is off the page\r\n if (rect.bottom < 0) return false\r\n // Check its within the document viewport\r\n if (top > document.documentElement.clientHeight) return false\r\n do {\r\n rect = el.getBoundingClientRect()\r\n if (top <= rect.bottom === false) return false\r\n // Check if the element is out of view due to a container scrolling\r\n if ((top + height) <= rect.top) return false\r\n el = el.parentNode\r\n } while (el != document.body)\r\n return true\r\n}; */\r\n\r\nexport function whichChild(elem/* : Node */) {\r\n let i = 0;\r\n // @ts-ignore\r\n while((elem = elem.previousElementSibling) != null) ++i;\r\n return i;\r\n};\r\n\r\nexport function copy(obj) {\r\n //in case of premitives\r\n if(obj===null || typeof obj !== \"object\"){\r\n return obj;\r\n }\r\n \r\n //date objects should be \r\n if(obj instanceof Date){\r\n return new Date(obj.getTime());\r\n }\r\n \r\n //handle Array\r\n if(Array.isArray(obj)){\r\n var clonedArr = [];\r\n obj.forEach(function(element){\r\n clonedArr.push(copy(element))\r\n });\r\n return clonedArr;\r\n }\r\n \r\n //lastly, handle objects\r\n let clonedObj = new obj.constructor();\r\n for(var prop in obj){\r\n if(obj.hasOwnProperty(prop)){\r\n clonedObj[prop] = copy(obj[prop]);\r\n }\r\n }\r\n return clonedObj;\r\n}\r\n\r\n/* export function ripple(elem) {\r\n elem.addEventListener('mousedown', function(e) {\r\n let rect = this.getBoundingClientRect();\r\n\r\n const startTime = Date.now();\r\n const animationTime = 350;\r\n\r\n let X = e.clientX - rect.left;\r\n let Y = e.clientY - rect.top;\r\n let rippleDiv = document.createElement(\"div\");\r\n rippleDiv.classList.add(\"ripple\");\r\n rippleDiv.setAttribute(\"style\", \"top:\" + Y + \"px; left:\" + X + \"px;\");\r\n this.appendChild(rippleDiv);\r\n\r\n elem.addEventListener('mouseup', () => {\r\n let elapsed = Date.now() - startTime;\r\n\r\n setTimeout(() => {\r\n rippleDiv.parentElement.removeChild(rippleDiv);\r\n }, elapsed < animationTime ? animationTime - elapsed : 0);\r\n }, {once: true});\r\n });\r\n}; */\r\n\r\nexport function formatBytes(bytes, decimals = 2) {\r\n if (bytes === 0) return '0 Bytes';\r\n\r\n const k = 1024;\r\n const dm = decimals < 0 ? 0 : decimals;\r\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\r\n\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\r\n}\r\n\r\nexport function formatNumber(bytes, decimals = 2) {\r\n if(bytes === 0) return '0';\r\n\r\n const k = 1000;\r\n const dm = decimals < 0 ? 0 : decimals;\r\n const sizes = ['', 'K', 'M', 'B', 'T'];\r\n\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + sizes[i];\r\n}\r\n\r\nexport function deepEqual(x, y) {\r\n const ok = Object.keys, tx = typeof x, ty = typeof y;\r\n return x && y && tx === 'object' && tx === ty ? (\r\n ok(x).length === ok(y).length &&\r\n ok(x).every(key => deepEqual(x[key], y[key]))\r\n ) : (x === y);\r\n}\r\n\r\nexport function listMergeSorted (list1, list2) {\r\n list1 = list1 || []\r\n list2 = list2 || []\r\n\r\n var result = copy(list1);\r\n\r\n var minID = list1.length ? list1[list1.length - 1] : 0xFFFFFFFF\r\n for (var i = 0; i < list2.length; i++) {\r\n if (list2[i] < minID) {\r\n result.push(list2[i])\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\nexport function listUniqSorted (list) {\r\n list = list || []\r\n var resultList = []\r\n var prev = false\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i] !== prev) {\r\n resultList.push(list[i])\r\n }\r\n prev = list[i]\r\n }\r\n\r\n return resultList\r\n}\r\n\r\nexport function encodeEntities (value) {\r\n return value.replace(/&/g, '&').replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g, function (value) {\r\n var hi = value.charCodeAt(0)\r\n var low = value.charCodeAt(1)\r\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'\r\n }).replace(/([^\\#-~| |!])/g, function (value) { // non-alphanumeric\r\n return '&#' + value.charCodeAt(0) + ';'\r\n }).replace(//g, '>')\r\n}\r\n\r\nexport function calcImageInBox (imageW, imageH, boxW, boxH, noZooom) {\r\n if(imageW < boxW && imageH < boxH) {\r\n return {w: imageW, h: imageH};\r\n }\r\n\r\n var boxedImageW = boxW\r\n var boxedImageH = boxH\r\n\r\n if((imageW / imageH) > (boxW / boxH)) {\r\n boxedImageH = parseInt(imageH * boxW / imageW)\r\n } else {\r\n boxedImageW = parseInt(imageW * boxH / imageH)\r\n if(boxedImageW > boxW) {\r\n boxedImageH = parseInt(boxedImageH * boxW / boxedImageW)\r\n boxedImageW = boxW\r\n }\r\n }\r\n\r\n // if (Config.Navigator.retina) {\r\n // imageW = Math.floor(imageW / 2)\r\n // imageH = Math.floor(imageH / 2)\r\n // }\r\n\r\n if(noZooom && boxedImageW >= imageW && boxedImageH >= imageH) {\r\n boxedImageW = imageW\r\n boxedImageH = imageH\r\n }\r\n\r\n return {w: boxedImageW, h: boxedImageH}\r\n}\r\n\r\n/**\r\n * emojiUnicode\r\n * Get the unicode code of an emoji in base 16.\r\n *\r\n * @name emojiUnicode\r\n * @function\r\n * @param {String} input The emoji character.\r\n * @returns {String} The base 16 unicode code.\r\n */\r\n/* export function emojiUnicode (input) {\r\n let pairs = emojiUnicode.raw(input).split(' ').map(val => parseInt(val).toString(16));\r\n if(pairs[0].length == 2) pairs[0] = '00' + pairs[0];\r\n return pairs.join('-').toUpperCase();\r\n} */\r\n\r\n/**\r\n* emojiunicode.raw\r\n* Get the unicode code points of an emoji in base 16.\r\n*\r\n* @name emojiunicode.raw\r\n* @function\r\n* @param {String} input The emoji character.\r\n* @returns {String} The unicode code points.\r\n*/\r\n/* emojiUnicode.raw = function (input) {\r\n if(input.length === 1) {\r\n return input.charCodeAt(0).toString();\r\n } else if(input.length > 1) {\r\n const pairs = [];\r\n for(var i = 0; i < input.length; i++) {\r\n // high surrogate\r\n if(input.charCodeAt(i) >= 0xd800 && input.charCodeAt(i) <= 0xdbff) {\r\n if(input.charCodeAt(i + 1) >= 0xdc00 && input.charCodeAt(i + 1) <= 0xdfff) {\r\n // low surrogate\r\n pairs.push(\r\n (input.charCodeAt(i) - 0xd800) * 0x400\r\n + (input.charCodeAt(i + 1) - 0xdc00) + 0x10000\r\n );\r\n }\r\n } else if (input.charCodeAt(i) < 0xd800 || input.charCodeAt(i) > 0xdfff) {\r\n // modifiers and joiners\r\n pairs.push(input.charCodeAt(i))\r\n }\r\n }\r\n\r\n return pairs.join(' ');\r\n }\r\n\r\n return '';\r\n}; */\r\n\r\n// country code regex\r\nconst CC_REGEX = /^[a-z]{2}$/i;\r\n\r\n// offset between uppercase ascii and regional indicator symbols\r\nconst OFFSET = 127397;\r\n\r\n/**\r\n * convert country code to corresponding emoji flag\r\n * @param {string} cc - country code string\r\n * @returns {string} country code emoji\r\n */\r\nexport function countryCodeEmoji(cc/* : string */) {\r\n if(!CC_REGEX.test(cc)) {\r\n const type = typeof cc;\r\n throw new TypeError(\r\n `cc argument must be an ISO 3166-1 alpha-2 string, but got '${\r\n type === 'string' ? cc : type\r\n }' instead.`,\r\n );\r\n }\r\n\r\n const chars = [...cc.toUpperCase()].map(c => c.charCodeAt(0) + OFFSET);\r\n //console.log(chars);\r\n return String.fromCodePoint(...chars);\r\n}\r\n\r\nexport function unifiedCountryCodeEmoji(cc/* : string */) {\r\n if(!CC_REGEX.test(cc)) {\r\n const type = typeof cc;\r\n throw new TypeError(\r\n `cc argument must be an ISO 3166-1 alpha-2 string, but got '${\r\n type === 'string' ? cc : type\r\n }' instead.`,\r\n );\r\n }\r\n\r\n const chars = [...cc.toUpperCase()].map(c => c.charCodeAt(0) + OFFSET);\r\n return chars.map(c => c.toString(16).toUpperCase()).join('-');\r\n}\r\n\r\nfunction versionCompare (ver1, ver2) {\r\n if (typeof ver1 !== 'string') {\r\n ver1 = ''\r\n }\r\n if (typeof ver2 !== 'string') {\r\n ver2 = ''\r\n }\r\n ver1 = ver1.replace(/^\\s+|\\s+$/g, '').split('.')\r\n ver2 = ver2.replace(/^\\s+|\\s+$/g, '').split('.')\r\n\r\n var a = Math.max(ver1.length, ver2.length), i\r\n\r\n for (i = 0; i < a; i++) {\r\n if (ver1[i] == ver2[i]) {\r\n continue\r\n }\r\n if (ver1[i] > ver2[i]) {\r\n return 1\r\n } else {\r\n return -1\r\n }\r\n }\r\n\r\n return 0\r\n}\r\n\r\n\r\n var badCharsRe = /[`~!@#$%^&*()\\-_=+\\[\\]\\\\|{}'\";:\\/?.>,<\\s]+/g,\r\n trimRe = /^\\s+|\\s$/g\r\n\r\n function createIndex () {\r\n return {\r\n shortIndexes: {},\r\n fullTexts: {}\r\n }\r\n }\r\n\r\n function cleanSearchText (text) {\r\n var hasTag = text.charAt(0) == '%'\r\n text = text.replace(badCharsRe, ' ').replace(trimRe, '')\r\n text = text.replace(/[^A-Za-z0-9]/g, function (ch) {\r\n var latinizeCh = Config.LatinizeMap[ch]\r\n return latinizeCh !== undefined ? latinizeCh : ch\r\n })\r\n text = text.toLowerCase()\r\n if (hasTag) {\r\n text = '%' + text\r\n }\r\n\r\n return text\r\n }\r\n\r\n function cleanUsername (username) {\r\n return username && username.toLowerCase() || ''\r\n }\r\n\r\n function indexObject (id, searchText, searchIndex) {\r\n if (searchIndex.fullTexts[id] !== undefined) {\r\n return false\r\n }\r\n\r\n searchText = cleanSearchText(searchText)\r\n\r\n if (!searchText.length) {\r\n return false\r\n }\r\n\r\n var shortIndexes = searchIndex.shortIndexes\r\n\r\n searchIndex.fullTexts[id] = searchText\r\n\r\n searchText.split(' ').forEach(function(searchWord) {\r\n var len = Math.min(searchWord.length, 3),\r\n wordPart, i\r\n for (i = 1; i <= len; i++) {\r\n wordPart = searchWord.substr(0, i)\r\n if (shortIndexes[wordPart] === undefined) {\r\n shortIndexes[wordPart] = [id]\r\n } else {\r\n shortIndexes[wordPart].push(id)\r\n }\r\n }\r\n })\r\n }\r\n\r\n function search (query, searchIndex) {\r\n var shortIndexes = searchIndex.shortIndexes\r\n var fullTexts = searchIndex.fullTexts\r\n\r\n query = cleanSearchText(query)\r\n\r\n var queryWords = query.split(' ')\r\n var foundObjs = false,\r\n newFoundObjs, i\r\n var j, searchText\r\n var found\r\n\r\n for (i = 0; i < queryWords.length; i++) {\r\n newFoundObjs = shortIndexes[queryWords[i].substr(0, 3)]\r\n if (!newFoundObjs) {\r\n foundObjs = []\r\n break\r\n }\r\n if (foundObjs === false || foundObjs.length > newFoundObjs.length) {\r\n foundObjs = newFoundObjs\r\n }\r\n }\r\n\r\n newFoundObjs = {}\r\n\r\n for (j = 0; j < foundObjs.length; j++) {\r\n found = true\r\n searchText = fullTexts[foundObjs[j]]\r\n for (i = 0; i < queryWords.length; i++) {\r\n if (searchText.indexOf(queryWords[i]) == -1) {\r\n found = false\r\n break\r\n }\r\n }\r\n if (found) {\r\n newFoundObjs[foundObjs[j]] = true\r\n }\r\n }\r\n\r\n return newFoundObjs\r\n }\r\n\r\n let SearchIndexManager = {\r\n createIndex: createIndex,\r\n indexObject: indexObject,\r\n cleanSearchText: cleanSearchText,\r\n cleanUsername: cleanUsername,\r\n search: search\r\n };\r\n window.SearchIndexManager = SearchIndexManager;\r\n\r\n export {SearchIndexManager};\r\n//})(window)\r\n" + "source": "/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nvar _logTimer = (new Date()).getTime()\r\nexport function dT () {\r\n return '[' + (((new Date()).getTime() - _logTimer) / 1000).toFixed(3) + ']'\r\n}\r\n\r\nexport function checkClick (e, noprevent) {\r\n if (e.which == 1 && (e.ctrlKey || e.metaKey) || e.which == 2) {\r\n return true\r\n }\r\n\r\n if (!noprevent) {\r\n e.preventDefault()\r\n }\r\n\r\n return false\r\n}\r\n\r\nexport function isInDOM (element, parentNode) {\r\n if (!element) {\r\n return false\r\n }\r\n parentNode = parentNode || document.body\r\n if (element == parentNode) {\r\n return true\r\n }\r\n return isInDOM(element.parentNode, parentNode)\r\n}\r\n\r\nexport function checkDragEvent(e) {\r\n if (!e || e.target && (e.target.tagName == 'IMG' || e.target.tagName == 'A')) return false\r\n if (e.dataTransfer && e.dataTransfer.types) {\r\n for (var i = 0; i < e.dataTransfer.types.length; i++) {\r\n if (e.dataTransfer.types[i] == 'Files') {\r\n return true\r\n }\r\n }\r\n } else {\r\n return true\r\n }\r\n\r\n return false\r\n}\r\n\r\nexport function cancelEvent (event) {\r\n event = event || window.event\r\n if (event) {\r\n event = event.originalEvent || event\r\n\r\n if (event.stopPropagation) event.stopPropagation()\r\n if (event.preventDefault) event.preventDefault()\r\n event.returnValue = false\r\n event.cancelBubble = true\r\n }\r\n\r\n return false\r\n}\r\n\r\nexport function setFieldSelection (field, from, to) {\r\n field = $(field)[0]\r\n try {\r\n field.focus()\r\n if (from === undefined || from === false) {\r\n from = field.value.length\r\n }\r\n if (to === undefined || to === false) {\r\n to = from\r\n }\r\n if (field.createTextRange) {\r\n var range = field.createTextRange()\r\n range.collapse(true)\r\n range.moveEnd('character', to)\r\n range.moveStart('character', from)\r\n range.select()\r\n }\r\n else if (field.setSelectionRange) {\r\n field.setSelectionRange(from, to)\r\n }\r\n } catch(e) {}\r\n}\r\n\r\nexport function getFieldSelection (field) {\r\n if (field.selectionStart) {\r\n return field.selectionStart\r\n }\r\n else if (!document.selection) {\r\n return 0\r\n }\r\n\r\n var c = '\\x01'\r\n var sel = document.selection.createRange()\r\n var txt = sel.text\r\n var dup = sel.duplicate()\r\n var len = 0\r\n\r\n try {\r\n dup.moveToElementText(field)\r\n } catch(e) {\r\n return 0\r\n }\r\n\r\n sel.text = txt + c\r\n len = dup.text.indexOf(c)\r\n sel.moveStart('character', -1)\r\n sel.text = ''\r\n\r\n // if (browser.msie && len == -1) {\r\n // return field.value.length\r\n // }\r\n return len\r\n}\r\n\r\nexport function getRichValue (field) {\r\n if (!field) {\r\n return ''\r\n }\r\n var lines = []\r\n var line = []\r\n\r\n getRichElementValue(field, lines, line)\r\n if (line.length) {\r\n lines.push(line.join(''))\r\n }\r\n\r\n var value = lines.join('\\n')\r\n value = value.replace(/\\u00A0/g, ' ')\r\n\r\n return value\r\n}\r\n\r\nexport function placeCaretAtEnd(el) {\r\n el.focus();\r\n if (typeof window.getSelection != \"undefined\"\r\n && typeof document.createRange != \"undefined\") {\r\n var range = document.createRange();\r\n range.selectNodeContents(el);\r\n range.collapse(false);\r\n var sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n } else if (typeof document.body.createTextRange != \"undefined\") {\r\n var textRange = document.body.createTextRange();\r\n textRange.moveToElementText(el);\r\n textRange.collapse(false);\r\n textRange.select();\r\n }\r\n}\r\n\r\nexport function getRichValueWithCaret (field) {\r\n if (!field) {\r\n return []\r\n }\r\n var lines = []\r\n var line = []\r\n\r\n var sel = window.getSelection ? window.getSelection() : false\r\n var selNode\r\n var selOffset\r\n if (sel && sel.rangeCount) {\r\n var range = sel.getRangeAt(0)\r\n /* if (range.startContainer &&\r\n range.startContainer == range.endContainer &&\r\n range.startOffset == range.endOffset) { */\r\n selNode = range.startContainer\r\n selOffset = range.startOffset\r\n //}\r\n }\r\n\r\n getRichElementValue(field, lines, line, selNode, selOffset)\r\n\r\n if (line.length) {\r\n lines.push(line.join(''))\r\n }\r\n\r\n var value = lines.join('\\n')\r\n var caretPos = value.indexOf('\\x01')\r\n if (caretPos != -1) {\r\n value = value.substr(0, caretPos) + value.substr(caretPos + 1)\r\n }\r\n value = value.replace(/\\u00A0/g, ' ')\r\n\r\n return [value, caretPos]\r\n}\r\n\r\nexport function getRichElementValue (node, lines, line, selNode, selOffset) {\r\n if (node.nodeType == 3) { // TEXT\r\n if (selNode === node) {\r\n var value = node.nodeValue\r\n line.push(value.substr(0, selOffset) + '\\x01' + value.substr(selOffset))\r\n } else {\r\n line.push(node.nodeValue)\r\n }\r\n return\r\n }\r\n if (node.nodeType != 1) { // NON-ELEMENT\r\n return\r\n }\r\n var isSelected = (selNode === node)\r\n var isBlock = node.tagName == 'DIV' || node.tagName == 'P'\r\n var curChild\r\n if (isBlock && line.length || node.tagName == 'BR') {\r\n lines.push(line.join(''))\r\n line.splice(0, line.length)\r\n }\r\n else if (node.tagName == 'IMG') {\r\n if (node.alt) {\r\n line.push(node.alt)\r\n }\r\n }\r\n if (isSelected && !selOffset) {\r\n line.push('\\x01')\r\n }\r\n var curChild = node.firstChild\r\n while (curChild) {\r\n getRichElementValue(curChild, lines, line, selNode, selOffset)\r\n curChild = curChild.nextSibling\r\n }\r\n if (isSelected && selOffset) {\r\n line.push('\\x01')\r\n }\r\n if (isBlock && line.length) {\r\n lines.push(line.join(''))\r\n line.splice(0, line.length)\r\n }\r\n}\r\n\r\nexport function setRichFocus (field, selectNode, noCollapse) {\r\n field.focus()\r\n if (selectNode &&\r\n selectNode.parentNode == field &&\r\n !selectNode.nextSibling &&\r\n !noCollapse) {\r\n field.removeChild(selectNode)\r\n selectNode = null\r\n }\r\n if (window.getSelection && document.createRange) {\r\n var range = document.createRange()\r\n if (selectNode) {\r\n range.selectNode(selectNode)\r\n } else {\r\n range.selectNodeContents(field)\r\n }\r\n if (!noCollapse) {\r\n range.collapse(false)\r\n }\r\n\r\n var sel = window.getSelection()\r\n sel.removeAllRanges()\r\n sel.addRange(range)\r\n }\r\n else if (document.body.createTextRange !== undefined) {\r\n var textRange = document.body.createTextRange()\r\n textRange.moveToElementText(selectNode || field)\r\n if (!noCollapse) {\r\n textRange.collapse(false)\r\n }\r\n textRange.select()\r\n }\r\n}\r\n\r\nexport function getSelectedText() {\r\n var sel = (\r\n window.getSelection && window.getSelection() ||\r\n document.getSelection && document.getSelection() ||\r\n document.selection && document.selection.createRange().text || ''\r\n ).toString().replace(/^\\s+|\\s+$/g, '')\r\n\r\n return sel\r\n}\r\n\r\n/* if (Config.Modes.animations &&\r\n typeof window.requestAnimationFrame == 'function') {\r\n window.onAnimationFrameCallback = function (cb) {\r\n return (function () {\r\n window.requestAnimationFrame(cb)\r\n })\r\n }\r\n} else {\r\n window.onAnimationFrameCallback = function (cb) {\r\n return cb\r\n }\r\n} */\r\n\r\nexport const $rootScope = {\r\n $broadcast: (name/* : string */, detail/*? : any */) => {\r\n //console.log(dT(), 'Broadcasting ' + name + ' event, with args:', detail);\r\n //console.trace();\r\n let myCustomEvent = new CustomEvent(name, {detail});\r\n document.dispatchEvent(myCustomEvent);\r\n },\r\n $on: (name/* : string */, callback/* : any */) => {\r\n document.addEventListener(name, callback);\r\n },\r\n\r\n selectedPeerID: 0,\r\n myID: 0,\r\n idle: {\r\n isIDLE: false\r\n }\r\n};\r\n\r\n// generate a path's arc data parameter\r\n// http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands\r\nvar arcParameter = function(rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) {\r\n return [rx, ',', ry, ' ',\r\n xAxisRotation, ' ',\r\n largeArcFlag, ',',\r\n sweepFlag, ' ',\r\n x, ',', y ].join('');\r\n};\r\n\r\nexport function generatePathData( x, y, width, height, tl, tr, br, bl ) {\r\n var data = [];\r\n\r\n // start point in top-middle of the rectangle\r\n data.push('M' + (x + width / 2) + ',' + y);\r\n\r\n // next we go to the right\r\n data.push('H' + (x + width - tr));\r\n\r\n if (tr > 0) {\r\n // now we draw the arc in the top-right corner\r\n data.push('A' + arcParameter(tr, tr, 0, 0, 1, (x + width), (y + tr)));\r\n }\r\n\r\n // next we go down\r\n data.push('V' + (y + height - br));\r\n\r\n if (br > 0) {\r\n // now we draw the arc in the lower-right corner\r\n data.push('A' + arcParameter(br, br, 0, 0, 1, (x + width - br), (y + height)));\r\n }\r\n\r\n // now we go to the left\r\n data.push('H' + (x + bl));\r\n\r\n if (bl > 0) {\r\n // now we draw the arc in the lower-left corner\r\n data.push('A' + arcParameter(bl, bl, 0, 0, 1, (x + 0), (y + height - bl)));\r\n }\r\n\r\n // next we go up\r\n data.push('V' + (y + tl));\r\n\r\n if (tl > 0) {\r\n // now we draw the arc in the top-left corner\r\n data.push('A' + arcParameter(tl, tl, 0, 0, 1, (x + tl), (y + 0)));\r\n }\r\n\r\n // and we close the path\r\n data.push('Z');\r\n\r\n return data.join(' ');\r\n};\r\n\r\nexport const langPack = {\r\n \"messageActionChatCreate\": \"created the group\",\r\n\t\"messageActionChatEditTitle\": \"changed group name\",\r\n\t\"messageActionChatEditPhoto\": \"changed group photo\",\r\n\t\"messageActionChatDeletePhoto\": \"removed group photo\",\r\n\t\"messageActionChatReturn\": \"returned to group\",\r\n\t\"messageActionChatJoined\": \"joined the group\",\r\n \"messageActionChatAddUser\": \"invited {user}\",\r\n \"messageActionChatAddUsers\": \"invited {} users\",\r\n\t\"messageActionChatLeave\": \"left group\",\r\n\t\"messageActionChatDeleteUser\": \"removed user\",\r\n\t\"messageActionChatJoinedByLink\": \"joined the group\",\r\n\t\"messageActionPinMessage\": \"pinned message\",\r\n\t\"messageActionChannelCreate\": \"Channel created\",\r\n\t\"messageActionChannelEditTitle\": \"Channel renamed\",\r\n\t\"messageActionChannelEditPhoto\": \"Channel photo updated\",\r\n \"messageActionChannelDeletePhoto\": \"Channel photo removed\",\r\n \"messageActionHistoryClear\": \"History cleared\",\r\n\r\n \"messageActionPhoneCall.in_ok\": \"Incoming Call\",\r\n\t\"messageActionPhoneCall.out_ok\": \"Outgoing Call\",\r\n\t\"messageActionPhoneCall.in_missed\": \"Missed Call\",\r\n\t\"messageActionPhoneCall.out_missed\": \"Cancelled Call\",\r\n};\r\n\r\nexport const _ = (str/* : string */) => {\r\n str = str.replace('_raw', '');\r\n\r\n return langPack[str] ? langPack[str] : str;\r\n};\r\n\r\nexport function isObject(object) {\r\n return typeof(object) === 'object' && object !== null;\r\n}\r\n\r\nexport function tsNow (seconds) {\r\n var t = +new Date();\r\n return seconds ? Math.floor(t / 1000) : t;\r\n}\r\n\r\nexport function safeReplaceObject (wasObject, newObject) {\r\n for (var key in wasObject) {\r\n if (!newObject.hasOwnProperty(key) && key.charAt(0) != '$') {\r\n delete wasObject[key]\r\n }\r\n }\r\n for (var key in newObject) {\r\n if (newObject.hasOwnProperty(key)) {\r\n wasObject[key] = newObject[key]\r\n }\r\n }\r\n}\r\n\r\nexport function numberWithCommas(x) {\r\n var parts = x.toString().split(\".\");\r\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n return parts.join(\".\");\r\n}\r\n\r\nexport function findUpClassName(el, className) {\r\n if(el.classList.contains(className)) return el; // 03.02.2020\r\n\r\n while(el.parentElement) {\r\n el = el.parentElement;\r\n if(el.classList.contains(className)) \r\n return el;\r\n }\r\n return null;\r\n}\r\n\r\nexport function findUpTag(el, tag) {\r\n if(el.tagName == tag) return el; // 03.02.2020\r\n\r\n while(el.parentElement) {\r\n el = el.parentElement;\r\n if(el.tagName === tag) \r\n return el;\r\n }\r\n return null;\r\n}\r\n\r\nexport function isElementInViewport(el) {\r\n var rect = el.getBoundingClientRect(),\r\n vWidth = window.innerWidth || document.documentElement.clientWidth,\r\n vHeight = window.innerHeight || document.documentElement.clientHeight,\r\n efp = function(x, y) { return document.elementFromPoint(x, y) }; \r\n\r\n // Return false if it's not in the viewport\r\n if(rect.right < 0 || rect.bottom < 0 \r\n || rect.left > vWidth || rect.top > vHeight \r\n || !rect.width || !rect.height) {\r\n return false;\r\n }\r\n\r\n let elements = [\r\n efp(rect.left + 1, rect.top + 1),\r\n efp(rect.right - 1, rect.top + 1),\r\n efp(rect.right - 1, rect.bottom - 1),\r\n efp(rect.left + 1, rect.bottom - 1)\r\n ];\r\n\r\n // Return true if any of its four corners are visible\r\n return elements.find(e => el.contains(e) || el.parentElement == e) !== undefined;\r\n}\r\n\r\nexport function isScrolledIntoView(el) {\r\n var rect = el.getBoundingClientRect();\r\n var elemTop = rect.top;\r\n var elemBottom = rect.bottom;\r\n\r\n // Only completely visible elements return true:\r\n //var isVisible = (elemTop >= 0) && (elemBottom <= window.innerHeight);\r\n // Partially visible elements return true:\r\n var isVisible = elemTop < window.innerHeight && elemBottom >= 0;\r\n return isVisible;\r\n}\r\n\r\n/* export function isScrolledIntoView(el) {\r\n var rect = el.getBoundingClientRect(), top = rect.top, height = rect.height, \r\n el = el.parentNode\r\n // Check if bottom of the element is off the page\r\n if (rect.bottom < 0) return false\r\n // Check its within the document viewport\r\n if (top > document.documentElement.clientHeight) return false\r\n do {\r\n rect = el.getBoundingClientRect()\r\n if (top <= rect.bottom === false) return false\r\n // Check if the element is out of view due to a container scrolling\r\n if ((top + height) <= rect.top) return false\r\n el = el.parentNode\r\n } while (el != document.body)\r\n return true\r\n}; */\r\n\r\nexport function whichChild(elem/* : Node */) {\r\n let i = 0;\r\n // @ts-ignore\r\n while((elem = elem.previousElementSibling) != null) ++i;\r\n return i;\r\n};\r\n\r\nexport function copy(obj) {\r\n //in case of premitives\r\n if(obj===null || typeof obj !== \"object\"){\r\n return obj;\r\n }\r\n \r\n //date objects should be \r\n if(obj instanceof Date){\r\n return new Date(obj.getTime());\r\n }\r\n \r\n //handle Array\r\n if(Array.isArray(obj)){\r\n var clonedArr = [];\r\n obj.forEach(function(element){\r\n clonedArr.push(copy(element))\r\n });\r\n return clonedArr;\r\n }\r\n \r\n //lastly, handle objects\r\n let clonedObj = new obj.constructor();\r\n for(var prop in obj){\r\n if(obj.hasOwnProperty(prop)){\r\n clonedObj[prop] = copy(obj[prop]);\r\n }\r\n }\r\n return clonedObj;\r\n}\r\n\r\n/* export function ripple(elem) {\r\n elem.addEventListener('mousedown', function(e) {\r\n let rect = this.getBoundingClientRect();\r\n\r\n const startTime = Date.now();\r\n const animationTime = 350;\r\n\r\n let X = e.clientX - rect.left;\r\n let Y = e.clientY - rect.top;\r\n let rippleDiv = document.createElement(\"div\");\r\n rippleDiv.classList.add(\"ripple\");\r\n rippleDiv.setAttribute(\"style\", \"top:\" + Y + \"px; left:\" + X + \"px;\");\r\n this.appendChild(rippleDiv);\r\n\r\n elem.addEventListener('mouseup', () => {\r\n let elapsed = Date.now() - startTime;\r\n\r\n setTimeout(() => {\r\n rippleDiv.parentElement.removeChild(rippleDiv);\r\n }, elapsed < animationTime ? animationTime - elapsed : 0);\r\n }, {once: true});\r\n });\r\n}; */\r\n\r\nexport function formatBytes(bytes, decimals = 2) {\r\n if (bytes === 0) return '0 Bytes';\r\n\r\n const k = 1024;\r\n const dm = decimals < 0 ? 0 : decimals;\r\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\r\n\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\r\n}\r\n\r\nexport function formatNumber(bytes, decimals = 2) {\r\n if(bytes === 0) return '0';\r\n\r\n const k = 1000;\r\n const dm = decimals < 0 ? 0 : decimals;\r\n const sizes = ['', 'K', 'M', 'B', 'T'];\r\n\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + sizes[i];\r\n}\r\n\r\nexport function deepEqual(x, y) {\r\n const ok = Object.keys, tx = typeof x, ty = typeof y;\r\n return x && y && tx === 'object' && tx === ty ? (\r\n ok(x).length === ok(y).length &&\r\n ok(x).every(key => deepEqual(x[key], y[key]))\r\n ) : (x === y);\r\n}\r\n\r\nexport function listMergeSorted (list1, list2) {\r\n list1 = list1 || []\r\n list2 = list2 || []\r\n\r\n var result = copy(list1);\r\n\r\n var minID = list1.length ? list1[list1.length - 1] : 0xFFFFFFFF\r\n for (var i = 0; i < list2.length; i++) {\r\n if (list2[i] < minID) {\r\n result.push(list2[i])\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\nexport function listUniqSorted (list) {\r\n list = list || []\r\n var resultList = []\r\n var prev = false\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i] !== prev) {\r\n resultList.push(list[i])\r\n }\r\n prev = list[i]\r\n }\r\n\r\n return resultList\r\n}\r\n\r\n// credits to https://github.com/sindresorhus/escape-string-regexp/blob/master/index.js\r\nexport function escapeRegExp(str) {\r\n return str\r\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\r\n .replace(/-/g, '\\\\x2d');\r\n}\r\n\r\nexport function encodeEntities (value) {\r\n return value.replace(/&/g, '&').replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g, function (value) {\r\n var hi = value.charCodeAt(0)\r\n var low = value.charCodeAt(1)\r\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'\r\n }).replace(/([^\\#-~| |!])/g, function (value) { // non-alphanumeric\r\n return '&#' + value.charCodeAt(0) + ';'\r\n }).replace(//g, '>')\r\n}\r\n\r\nexport function calcImageInBox (imageW, imageH, boxW, boxH, noZooom) {\r\n if(imageW < boxW && imageH < boxH) {\r\n return {w: imageW, h: imageH};\r\n }\r\n\r\n var boxedImageW = boxW\r\n var boxedImageH = boxH\r\n\r\n if((imageW / imageH) > (boxW / boxH)) {\r\n boxedImageH = parseInt(imageH * boxW / imageW)\r\n } else {\r\n boxedImageW = parseInt(imageW * boxH / imageH)\r\n if(boxedImageW > boxW) {\r\n boxedImageH = parseInt(boxedImageH * boxW / boxedImageW)\r\n boxedImageW = boxW\r\n }\r\n }\r\n\r\n // if (Config.Navigator.retina) {\r\n // imageW = Math.floor(imageW / 2)\r\n // imageH = Math.floor(imageH / 2)\r\n // }\r\n\r\n if(noZooom && boxedImageW >= imageW && boxedImageH >= imageH) {\r\n boxedImageW = imageW\r\n boxedImageH = imageH\r\n }\r\n\r\n return {w: boxedImageW, h: boxedImageH}\r\n}\r\n\r\n/**\r\n * emojiUnicode\r\n * Get the unicode code of an emoji in base 16.\r\n *\r\n * @name emojiUnicode\r\n * @function\r\n * @param {String} input The emoji character.\r\n * @returns {String} The base 16 unicode code.\r\n */\r\n/* export function emojiUnicode (input) {\r\n let pairs = emojiUnicode.raw(input).split(' ').map(val => parseInt(val).toString(16));\r\n if(pairs[0].length == 2) pairs[0] = '00' + pairs[0];\r\n return pairs.join('-').toUpperCase();\r\n} */\r\n\r\n/**\r\n* emojiunicode.raw\r\n* Get the unicode code points of an emoji in base 16.\r\n*\r\n* @name emojiunicode.raw\r\n* @function\r\n* @param {String} input The emoji character.\r\n* @returns {String} The unicode code points.\r\n*/\r\n/* emojiUnicode.raw = function (input) {\r\n if(input.length === 1) {\r\n return input.charCodeAt(0).toString();\r\n } else if(input.length > 1) {\r\n const pairs = [];\r\n for(var i = 0; i < input.length; i++) {\r\n // high surrogate\r\n if(input.charCodeAt(i) >= 0xd800 && input.charCodeAt(i) <= 0xdbff) {\r\n if(input.charCodeAt(i + 1) >= 0xdc00 && input.charCodeAt(i + 1) <= 0xdfff) {\r\n // low surrogate\r\n pairs.push(\r\n (input.charCodeAt(i) - 0xd800) * 0x400\r\n + (input.charCodeAt(i + 1) - 0xdc00) + 0x10000\r\n );\r\n }\r\n } else if (input.charCodeAt(i) < 0xd800 || input.charCodeAt(i) > 0xdfff) {\r\n // modifiers and joiners\r\n pairs.push(input.charCodeAt(i))\r\n }\r\n }\r\n\r\n return pairs.join(' ');\r\n }\r\n\r\n return '';\r\n}; */\r\n\r\n// country code regex\r\nconst CC_REGEX = /^[a-z]{2}$/i;\r\n\r\n// offset between uppercase ascii and regional indicator symbols\r\nconst OFFSET = 127397;\r\n\r\n/**\r\n * convert country code to corresponding emoji flag\r\n * @param {string} cc - country code string\r\n * @returns {string} country code emoji\r\n */\r\nexport function countryCodeEmoji(cc/* : string */) {\r\n if(!CC_REGEX.test(cc)) {\r\n const type = typeof cc;\r\n throw new TypeError(\r\n `cc argument must be an ISO 3166-1 alpha-2 string, but got '${\r\n type === 'string' ? cc : type\r\n }' instead.`,\r\n );\r\n }\r\n\r\n const chars = [...cc.toUpperCase()].map(c => c.charCodeAt(0) + OFFSET);\r\n //console.log(chars);\r\n return String.fromCodePoint(...chars);\r\n}\r\n\r\nexport function unifiedCountryCodeEmoji(cc/* : string */) {\r\n if(!CC_REGEX.test(cc)) {\r\n const type = typeof cc;\r\n throw new TypeError(\r\n `cc argument must be an ISO 3166-1 alpha-2 string, but got '${\r\n type === 'string' ? cc : type\r\n }' instead.`,\r\n );\r\n }\r\n\r\n const chars = [...cc.toUpperCase()].map(c => c.charCodeAt(0) + OFFSET);\r\n return chars.map(c => c.toString(16).toUpperCase()).join('-');\r\n}\r\n\r\nfunction versionCompare (ver1, ver2) {\r\n if (typeof ver1 !== 'string') {\r\n ver1 = ''\r\n }\r\n if (typeof ver2 !== 'string') {\r\n ver2 = ''\r\n }\r\n ver1 = ver1.replace(/^\\s+|\\s+$/g, '').split('.')\r\n ver2 = ver2.replace(/^\\s+|\\s+$/g, '').split('.')\r\n\r\n var a = Math.max(ver1.length, ver2.length), i\r\n\r\n for (i = 0; i < a; i++) {\r\n if (ver1[i] == ver2[i]) {\r\n continue\r\n }\r\n if (ver1[i] > ver2[i]) {\r\n return 1\r\n } else {\r\n return -1\r\n }\r\n }\r\n\r\n return 0\r\n}\r\n\r\n\r\n var badCharsRe = /[`~!@#$%^&*()\\-_=+\\[\\]\\\\|{}'\";:\\/?.>,<\\s]+/g,\r\n trimRe = /^\\s+|\\s$/g\r\n\r\n function createIndex () {\r\n return {\r\n shortIndexes: {},\r\n fullTexts: {}\r\n }\r\n }\r\n\r\n function cleanSearchText (text) {\r\n var hasTag = text.charAt(0) == '%'\r\n text = text.replace(badCharsRe, ' ').replace(trimRe, '')\r\n text = text.replace(/[^A-Za-z0-9]/g, function (ch) {\r\n var latinizeCh = Config.LatinizeMap[ch]\r\n return latinizeCh !== undefined ? latinizeCh : ch\r\n })\r\n text = text.toLowerCase()\r\n if (hasTag) {\r\n text = '%' + text\r\n }\r\n\r\n return text\r\n }\r\n\r\n function cleanUsername (username) {\r\n return username && username.toLowerCase() || ''\r\n }\r\n\r\n function indexObject (id, searchText, searchIndex) {\r\n if (searchIndex.fullTexts[id] !== undefined) {\r\n return false\r\n }\r\n\r\n searchText = cleanSearchText(searchText)\r\n\r\n if (!searchText.length) {\r\n return false\r\n }\r\n\r\n var shortIndexes = searchIndex.shortIndexes\r\n\r\n searchIndex.fullTexts[id] = searchText\r\n\r\n searchText.split(' ').forEach(function(searchWord) {\r\n var len = Math.min(searchWord.length, 3),\r\n wordPart, i\r\n for (i = 1; i <= len; i++) {\r\n wordPart = searchWord.substr(0, i)\r\n if (shortIndexes[wordPart] === undefined) {\r\n shortIndexes[wordPart] = [id]\r\n } else {\r\n shortIndexes[wordPart].push(id)\r\n }\r\n }\r\n })\r\n }\r\n\r\n function search (query, searchIndex) {\r\n var shortIndexes = searchIndex.shortIndexes\r\n var fullTexts = searchIndex.fullTexts\r\n\r\n query = cleanSearchText(query)\r\n\r\n var queryWords = query.split(' ')\r\n var foundObjs = false,\r\n newFoundObjs, i\r\n var j, searchText\r\n var found\r\n\r\n for (i = 0; i < queryWords.length; i++) {\r\n newFoundObjs = shortIndexes[queryWords[i].substr(0, 3)]\r\n if (!newFoundObjs) {\r\n foundObjs = []\r\n break\r\n }\r\n if (foundObjs === false || foundObjs.length > newFoundObjs.length) {\r\n foundObjs = newFoundObjs\r\n }\r\n }\r\n\r\n newFoundObjs = {}\r\n\r\n for (j = 0; j < foundObjs.length; j++) {\r\n found = true\r\n searchText = fullTexts[foundObjs[j]]\r\n for (i = 0; i < queryWords.length; i++) {\r\n if (searchText.indexOf(queryWords[i]) == -1) {\r\n found = false\r\n break\r\n }\r\n }\r\n if (found) {\r\n newFoundObjs[foundObjs[j]] = true\r\n }\r\n }\r\n\r\n return newFoundObjs\r\n }\r\n\r\n let SearchIndexManager = {\r\n createIndex: createIndex,\r\n indexObject: indexObject,\r\n cleanSearchText: cleanSearchText,\r\n cleanUsername: cleanUsername,\r\n search: search\r\n };\r\n //window.SearchIndexManager = SearchIndexManager;\r\n\r\n export {SearchIndexManager};\r\n//})(window)\r\n" }, { "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "index": 23, - "index2": 47, - "size": 15303, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "name": "./src/lib/mtproto/mtprotoworker.ts", + "index": 40, + "index2": 36, + "size": 4561, "cacheable": true, "built": true, "optional": false, @@ -938,33 +912,33 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "issuerId": 40, - "issuerName": "./src/components/pageSignIn.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "issuerId": 35, + "issuerName": "./src/pages/pageSignIn.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } } ], "profile": { - "factory": 392, - "building": 505, + "factory": 527, + "building": 1006, "dependencies": 2 }, "failed": false, @@ -974,156 +948,147 @@ "reasons": [ { "moduleId": 4, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appUsersManager.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", "module": "./src/lib/appManagers/appUsersManager.ts", "moduleName": "./src/lib/appManagers/appUsersManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiManager", - "loc": "9:37-69" - }, - { - "moduleId": 5, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/misc.ts", - "module": "./src/components/misc.ts", - "moduleName": "./src/components/misc.ts", - "type": "cjs require", - "userRequest": "../lib/mtproto/apiManager", - "loc": "6:37-73" + "userRequest": "../mtproto/mtprotoworker", + "loc": "10:40-75" }, { - "moduleId": 9, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", + "moduleId": 6, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", + "module": "./src/lib/appManagers/appPhotosManager.ts", + "moduleName": "./src/lib/appManagers/appPhotosManager.ts", "type": "cjs require", - "userRequest": "./apiManager", - "loc": "18:37-60" + "userRequest": "../mtproto/mtprotoworker", + "loc": "12:40-75" }, { - "moduleId": 11, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiManager", - "loc": "20:37-69" + "userRequest": "../mtproto/mtprotoworker", + "loc": "7:40-75" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", "module": "./src/lib/appManagers/appMessagesManager.ts", "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiManager", - "loc": "32:37-69" + "userRequest": "../mtproto/mtprotoworker", + "loc": "33:40-75" }, { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 15, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", + "module": "./src/lib/mtproto/apiFileManager.ts", + "moduleName": "./src/lib/mtproto/apiFileManager.ts", "type": "cjs require", - "userRequest": "./apiManager", - "loc": "23:37-60" + "userRequest": "./mtprotoworker", + "loc": "19:40-66" }, { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiManager", - "loc": "22:37-69" + "userRequest": "../mtproto/mtprotoworker", + "loc": "25:40-75" }, { - "moduleId": 27, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/apiUpdatesManager.ts", + "moduleId": 24, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", "module": "./src/lib/appManagers/apiUpdatesManager.ts", "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiManager", - "loc": "6:37-69" + "userRequest": "../mtproto/mtprotoworker", + "loc": "7:40-75" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "module": "./src/components/wrappers.ts", + "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "../mtproto/apiManager", - "loc": "15:37-69" + "userRequest": "../lib/mtproto/mtprotoworker", + "loc": "24:40-79" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 33, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", + "module": "./src/lib/appManagers/appStickersManager.ts", + "moduleName": "./src/lib/appManagers/appStickersManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiManager", - "loc": "15:37-69" + "userRequest": "../mtproto/mtprotoworker", + "loc": "17:40-75" }, { - "moduleId": 38, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", "type": "cjs require", - "userRequest": "../mtproto/apiManager", - "loc": "16:37-69" + "userRequest": "../lib/mtproto/mtprotoworker", + "loc": "13:40-79" }, { - "moduleId": 40, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "module": "./src/components/pageSignIn.ts", - "moduleName": "./src/components/pageSignIn.ts", + "moduleId": 42, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", + "module": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", "type": "cjs require", - "userRequest": "../lib/mtproto/apiManager", - "loc": "19:37-73" + "userRequest": "../mtproto/mtprotoworker", + "loc": "18:40-75" }, { - "moduleId": 41, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/passwordManager.ts", - "module": "./src/lib/mtproto/passwordManager.ts", - "moduleName": "./src/lib/mtproto/passwordManager.ts", + "moduleId": 62, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "module": "./src/pages/pageAuthCode.ts", + "moduleName": "./src/pages/pageAuthCode.ts", "type": "cjs require", - "userRequest": "./apiManager", - "loc": "15:37-60" + "userRequest": "../lib/mtproto/mtprotoworker", + "loc": "13:40-79" }, { - "moduleId": 77, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "module": "./src/components/pageAuthCode.ts", - "moduleName": "./src/components/pageAuthCode.ts", + "moduleId": 63, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "module": "./src/pages/pageSignUp.ts", + "moduleName": "./src/pages/pageSignUp.ts", "type": "cjs require", - "userRequest": "../lib/mtproto/apiManager", - "loc": "21:37-73" + "userRequest": "../lib/mtproto/mtprotoworker", + "loc": "10:40-79" }, { - "moduleId": 78, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "module": "./src/components/pageSignUp.ts", - "moduleName": "./src/components/pageSignUp.ts", + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", "type": "cjs require", - "userRequest": "../lib/mtproto/apiManager", - "loc": "11:37-73" + "userRequest": "../lib/mtproto/mtprotoworker", + "loc": "16:40-79" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", "module": "./src/components/emoticonsDropdown.ts", "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "../lib/mtproto/apiManager", - "loc": "21:37-73" + "userRequest": "../lib/mtproto/mtprotoworker", + "loc": "22:40-79" }, { - "moduleId": 84, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pagePassword.ts", - "module": "./src/components/pagePassword.ts", - "moduleName": "./src/components/pagePassword.ts", + "moduleId": 74, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagePassword.ts", + "module": "./src/pages/pagePassword.ts", + "moduleName": "./src/pages/pagePassword.ts", "type": "cjs require", - "userRequest": "../lib/mtproto/apiManager", - "loc": "20:37-73" + "userRequest": "../lib/mtproto/mtprotoworker", + "loc": "12:40-79" } ], "usedExports": true, @@ -1132,15 +1097,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst storage_1 = __importDefault(require(\"../storage\"));\nconst bin_utils_1 = require(\"../bin_utils\");\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\nconst mtproto_1 = require(\"./mtproto\");\nconst authorizer_1 = __importDefault(require(\"./authorizer\"));\nconst utils_1 = require(\"../utils\");\nconst Config = __importStar(require(\"../config\"));\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\nconst http_1 = __importDefault(require(\"./transports/http\"));\nconst polyfill_1 = require(\"../polyfill\");\nclass ApiManager {\n constructor() {\n //MtpSingleInstanceService.start();\n this.cachedNetworkers = {};\n this.cachedUploadNetworkers = {};\n this.cachedExportPromise = {};\n this.gettingNetworkers = {};\n this.baseDcID = 0;\n this.telegramMeNotified = false;\n this.log = polyfill_1.logger('API');\n /* AppStorage.get('dc').then((dcID) => {\n if(dcID) {\n this.baseDcID = dcID;\n }\n }); */\n }\n telegramMeNotify(newValue) {\n if (this.telegramMeNotified !== newValue) {\n this.telegramMeNotified = newValue;\n mtproto_1.telegramMeWebService.setAuthorized(this.telegramMeNotified);\n }\n }\n // mtpSetUserAuth\n setUserAuth(userAuth) {\n var fullUserAuth = Object.assign({ dcID: this.baseDcID }, userAuth);\n storage_1.default.set({\n dc: this.baseDcID,\n user_auth: fullUserAuth\n });\n this.telegramMeNotify(true);\n utils_1.$rootScope.$broadcast('user_auth', fullUserAuth);\n }\n // mtpLogOut\n logOut() {\n return __awaiter(this, void 0, void 0, function* () {\n let storageKeys = [];\n let prefix = Config.Modes.test ? 't_dc' : 'dc';\n for (let dcID = 1; dcID <= 5; dcID++) {\n storageKeys.push(prefix + dcID + '_auth_key');\n //storageKeys.push('dc' + dcID + '_auth_keyID');\n //storageKeys.push('t_dc' + dcID + '_auth_key');\n //storageKeys.push('t_dc' + dcID + '_auth_keyID');\n }\n // WebPushApiManager.forceUnsubscribe(); // WARNING\n let storageResult = yield storage_1.default.get(storageKeys);\n let logoutPromises = [];\n for (let i = 0; i < storageResult.length; i++) {\n if (storageResult[i]) {\n logoutPromises.push(this.invokeApi('auth.logOut', {}, { dcID: i + 1, ignoreErrors: true }));\n }\n }\n return Promise.all(logoutPromises).then(() => {\n storage_1.default.remove('dc', 'user_auth', 'stickerSets');\n this.baseDcID = 0;\n this.telegramMeNotify(false);\n return this.mtpClearStorage();\n }, (error) => {\n storageKeys.push('dc', 'user_auth', 'stickerSets');\n storage_1.default.remove(storageKeys);\n this.baseDcID = 0;\n error.handled = true;\n this.telegramMeNotify(false);\n return this.mtpClearStorage();\n });\n });\n }\n mtpClearStorage() {\n var saveKeys = ['user_auth', 't_user_auth', 'dc', 't_dc'];\n for (var dcID = 1; dcID <= 5; dcID++) {\n saveKeys.push('dc' + dcID + '_auth_key');\n saveKeys.push('dc' + dcID + '_auth_keyID');\n saveKeys.push('dc' + dcID + '_server_salt'); // new\n saveKeys.push('t_dc' + dcID + '_auth_key');\n saveKeys.push('t_dc' + dcID + '_auth_keyID');\n saveKeys.push('t_dc' + dcID + '_server_salt'); // new\n }\n storage_1.default.noPrefix();\n storage_1.default.get(saveKeys).then((values) => {\n storage_1.default.clear().then(() => {\n var restoreObj = {};\n saveKeys.forEach((key, i) => {\n var value = values[i];\n if (value !== false && value !== undefined) {\n restoreObj[key] = value;\n }\n });\n storage_1.default.noPrefix();\n return storage_1.default.set(restoreObj);\n });\n });\n }\n // mtpGetNetworker\n getNetworker(dcID, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n let upload = (options.fileUpload || options.fileDownload)\n && (dcConfigurator_1.default.chooseServer(dcID, true) instanceof http_1.default || Config.Modes.multipleConnections);\n let cache = upload ? this.cachedUploadNetworkers : this.cachedNetworkers;\n if (!dcID) {\n throw new Error('get Networker without dcID');\n }\n if (cache[dcID] !== undefined) {\n return cache[dcID];\n }\n let getKey = dcID + '-' + +upload;\n if (this.gettingNetworkers[getKey]) {\n return this.gettingNetworkers[getKey];\n }\n return this.gettingNetworkers[getKey] = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n var ak = 'dc' + dcID + '_auth_key';\n var akID = 'dc' + dcID + '_auth_keyID';\n var ss = 'dc' + dcID + '_server_salt';\n let result = yield storage_1.default.get([ak, akID, ss]);\n let [authKeyHex, authKeyIDHex, serverSaltHex] = result;\n if (authKeyHex && !authKeyIDHex && serverSaltHex) {\n this.log.warn('Updating to new version (+akID)');\n yield storage_1.default.remove(ak, akID, ss);\n authKeyHex = serverSaltHex = '';\n }\n if (authKeyHex && authKeyHex.length == 512) {\n if (!serverSaltHex || serverSaltHex.length != 16) {\n serverSaltHex = 'AAAAAAAAAAAAAAAA';\n }\n var authKey = bin_utils_1.bytesFromHex(authKeyHex);\n var authKeyID = new Uint8Array(bin_utils_1.bytesFromHex(authKeyIDHex));\n var serverSalt = bin_utils_1.bytesFromHex(serverSaltHex);\n resolve(cache[dcID] = networkerFactory_1.default.getNetworker(dcID, authKey, authKeyID, serverSalt, options));\n }\n else\n try {\n let auth = yield authorizer_1.default.auth(dcID);\n let storeObj = {\n [ak]: bin_utils_1.bytesToHex(auth.authKey),\n [akID]: auth.authKeyID.hex,\n [ss]: bin_utils_1.bytesToHex(auth.serverSalt)\n };\n storage_1.default.set(storeObj);\n resolve(cache[dcID] = networkerFactory_1.default.getNetworker(dcID, auth.authKey, auth.authKeyID, auth.serverSalt, options));\n }\n catch (error) {\n this.log('Get networker error', error, error.stack);\n reject(error);\n }\n delete this.gettingNetworkers[getKey];\n }));\n });\n }\n // mtpInvokeApi\n invokeApi(method, params = {}, options = {}) {\n ///////this.log('Invoke api', method, params, options);\n return new Promise((resolve, reject) => {\n let rejectPromise = (error) => {\n if (!error) {\n error = { type: 'ERROR_EMPTY' };\n }\n else if (!utils_1.isObject(error)) {\n error = { message: error };\n }\n reject(error);\n if (options.ignoreErrors) {\n return;\n }\n if (error.code == 406) {\n error.handled = true;\n }\n if (!options.noErrorBox) {\n error.input = method;\n error.stack = stack || (error.originalError && error.originalError.stack) || error.stack || (new Error()).stack;\n setTimeout(() => {\n if (!error.handled) {\n if (error.code == 401) {\n // @ts-ignore WARNING!\n this.logOut().finally(() => {\n if (location.protocol == 'http:' &&\n !Config.Modes.http &&\n Config.App.domains.indexOf(location.hostname) != -1) {\n location.href = location.href.replace(/^http:/, 'https:');\n }\n else {\n location.hash = '/login';\n // AppRuntimeManager.reload(); // WARNING\n }\n });\n }\n else {\n // ErrorService.show({error: error}); // WARNING\n }\n error.handled = true;\n }\n }, 100);\n }\n };\n var dcID;\n var cachedNetworker;\n var stack = (new Error()).stack || 'empty stack';\n var performRequest = (networker) => {\n return (cachedNetworker = networker)\n .wrapApiCall(method, params, options)\n .then(resolve, (error) => {\n this.log.error('Error', error.code, error.type, this.baseDcID, dcID);\n if (error.code == 401 && this.baseDcID == dcID) {\n storage_1.default.remove('dc', 'user_auth');\n this.telegramMeNotify(false);\n rejectPromise(error);\n }\n else if (error.code == 401 && this.baseDcID && dcID != this.baseDcID) {\n if (this.cachedExportPromise[dcID] === undefined) {\n let promise = new Promise((exportResolve, exportReject) => {\n this.invokeApi('auth.exportAuthorization', { dc_id: dcID }, { noErrorBox: true }).then((exportedAuth) => {\n this.invokeApi('auth.importAuthorization', {\n id: exportedAuth.id,\n bytes: exportedAuth.bytes\n }, { dcID: dcID, noErrorBox: true }).then(exportResolve, exportReject);\n }, exportReject);\n });\n this.cachedExportPromise[dcID] = promise;\n }\n this.cachedExportPromise[dcID].then(() => {\n (cachedNetworker = networker).wrapApiCall(method, params, options).then(resolve, rejectPromise);\n }, rejectPromise);\n }\n else if (error.code == 303) {\n var newDcID = error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_|USER_MIGRATE_)(\\d+)/)[2];\n if (newDcID != dcID) {\n if (options.dcID) {\n options.dcID = newDcID;\n }\n else {\n storage_1.default.set({ dc: this.baseDcID = newDcID });\n }\n this.getNetworker(newDcID, options).then((networker) => {\n networker.wrapApiCall(method, params, options).then(resolve, rejectPromise);\n }, rejectPromise);\n }\n }\n else if (!options.rawError && error.code == 420) {\n var waitTime = error.type.match(/^FLOOD_WAIT_(\\d+)/)[1] || 10;\n if (waitTime > (options.timeout || 60)) {\n return rejectPromise(error);\n }\n setTimeout(() => {\n performRequest(cachedNetworker);\n }, (waitTime + 5) * 1000); // 03.02.2020\n }\n else if (!options.rawError && (error.code == 500 || error.type == 'MSG_WAIT_FAILED')) {\n var now = utils_1.tsNow();\n if (options.stopTime) {\n if (now >= options.stopTime) {\n return rejectPromise(error);\n }\n }\n else {\n options.stopTime = now + (options.timeout !== undefined ? options.timeout : 10) * 1000;\n }\n options.waitTime = options.waitTime ? Math.min(60, options.waitTime * 1.5) : 1;\n setTimeout(() => {\n performRequest(cachedNetworker);\n }, options.waitTime * 1000);\n }\n else {\n rejectPromise(error);\n }\n });\n };\n if (dcID = (options.dcID || this.baseDcID)) {\n this.getNetworker(dcID, options).then(performRequest, rejectPromise);\n }\n else {\n storage_1.default.get('dc').then((baseDcID) => {\n this.getNetworker(this.baseDcID = dcID = baseDcID || Config.App.baseDcID, options).then(performRequest, rejectPromise);\n });\n }\n });\n }\n // mtpGetUserID\n getUserID() {\n return storage_1.default.get('user_auth').then((auth) => {\n this.telegramMeNotify(auth && auth.id > 0 || false);\n return auth.id || 0;\n });\n }\n}\nexports.ApiManager = ApiManager;\nexports.default = new ApiManager();\n" + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../utils\");\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst crypto_methods_1 = __importDefault(require(\"../crypto/crypto_methods\"));\r\nclass ApiManagerProxy extends crypto_methods_1.default {\r\n constructor() {\r\n super();\r\n this.webWorker = false;\r\n this.taskID = 0;\r\n this.awaiting = {};\r\n this.pending = [];\r\n this.debug = true;\r\n this.updatesProcessor = null;\r\n console.log(utils_1.dT(), 'ApiManagerProxy constructor');\r\n if (window.Worker) {\r\n Promise.resolve().then(() => __importStar(require('./mtproto.worker.js'))).then((worker) => {\r\n var tmpWorker = new worker.default();\r\n tmpWorker.onmessage = (e) => {\r\n if (!this.webWorker) {\r\n this.webWorker = tmpWorker;\r\n console.info(utils_1.dT(), 'ApiManagerProxy set webWorker');\r\n this.releasePending();\r\n }\r\n if (!utils_1.isObject(e.data)) {\r\n return;\r\n }\r\n if (e.data.useLs) {\r\n // @ts-ignore\r\n storage_1.default[e.data.task](...e.data.args).then(res => {\r\n this.webWorker.postMessage({ useLs: true, taskID: e.data.taskID, args: res });\r\n });\r\n }\r\n else if (e.data.update) {\r\n if (this.updatesProcessor) {\r\n this.updatesProcessor(e.data.update.obj, e.data.update.bool);\r\n }\r\n }\r\n else {\r\n this.finalizeTask(e.data.taskID, e.data.result, e.data.error);\r\n }\r\n };\r\n tmpWorker.onerror = (error) => {\r\n console.error('ApiManagerProxy error', error);\r\n this.webWorker = false;\r\n };\r\n });\r\n }\r\n }\r\n finalizeTask(taskID, result, error) {\r\n let deferred = this.awaiting[taskID];\r\n if (deferred !== undefined) {\r\n this.debug && console.log(utils_1.dT(), 'ApiManagerProxy done', deferred.taskName, result, error);\r\n result ? deferred.resolve(result) : deferred.reject(error);\r\n delete this.awaiting[taskID];\r\n }\r\n }\r\n performTaskWorker(task, ...args) {\r\n this.debug && console.log(utils_1.dT(), 'ApiManagerProxy start', task, args);\r\n return new Promise((resolve, reject) => {\r\n this.awaiting[this.taskID] = { resolve, reject, taskName: task };\r\n let params = {\r\n task,\r\n taskID: this.taskID,\r\n args\r\n };\r\n //(this.webWorker as Worker).postMessage(params);\r\n this.pending.push(params);\r\n this.releasePending();\r\n this.taskID++;\r\n });\r\n }\r\n releasePending() {\r\n if (this.webWorker) {\r\n this.pending.forEach(pending => {\r\n this.webWorker.postMessage(pending);\r\n });\r\n this.pending.length = 0;\r\n }\r\n }\r\n setUpdatesProcessor(callback) {\r\n this.updatesProcessor = callback;\r\n }\r\n invokeApi(method, params = {}, options = {}) {\r\n return this.performTaskWorker('invokeApi', method, params, options);\r\n }\r\n setUserAuth(userAuth) {\r\n return this.performTaskWorker('setUserAuth', userAuth);\r\n }\r\n getNetworker(dc_id) {\r\n return this.performTaskWorker('getNetworker', dc_id);\r\n }\r\n getUserID() {\r\n return this.performTaskWorker('getUserID');\r\n }\r\n logOut() {\r\n return this.performTaskWorker('logOut');\r\n }\r\n checkPassword(value) {\r\n return this.performTaskWorker('checkPassword', value);\r\n }\r\n}\r\nconst apiManagerProxy = new ApiManagerProxy();\r\nwindow.apiManagerProxy = apiManagerProxy;\r\nexports.default = apiManagerProxy;\r\n" }, { "id": 2, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/bin_utils.ts", - "name": "./src/lib/bin_utils.ts", - "index": 24, - "index2": 22, - "size": 10929, + "identifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", + "name": "./src/lib/richtextprocessor.js", + "index": 31, + "index2": 29, + "size": 39702, "cacheable": true, "built": true, "optional": false, @@ -1148,44 +1113,34 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "issuerId": 1, - "issuerName": "./src/lib/mtproto/apiManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "issuerId": 35, + "issuerName": "./src/pages/pageSignIn.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "dependencies": 1062 } } ], "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 527, + "building": 1006, + "dependencies": 2 }, "failed": false, "errors": 0, @@ -1193,165 +1148,158 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", - "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "23:20-43" - }, - { - "moduleId": 7, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/crypto/cryptoworker.ts", - "module": "./src/lib/crypto/cryptoworker.ts", - "moduleName": "./src/lib/crypto/cryptoworker.ts", + "moduleId": 4, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", + "module": "./src/lib/appManagers/appUsersManager.ts", + "moduleName": "./src/lib/appManagers/appUsersManager.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "10:20-43" + "userRequest": "../richtextprocessor", + "loc": "7:28-59" }, { - "moduleId": 8, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/polyfill.ts", - "module": "./src/lib/polyfill.ts", - "moduleName": "./src/lib/polyfill.ts", + "moduleId": 5, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", + "module": "./src/lib/appManagers/appPeersManager.ts", + "moduleName": "./src/lib/appManagers/appPeersManager.ts", "type": "cjs require", - "userRequest": "./bin_utils", - "loc": "3:20-42" + "userRequest": "../richtextprocessor", + "loc": "9:28-59" }, { - "moduleId": 9, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "15:20-43" + "userRequest": "../richtextprocessor", + "loc": "14:28-59" }, { - "moduleId": 11, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", + "moduleId": 13, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appChatsManager.ts", + "module": "./src/lib/appManagers/appChatsManager.ts", + "moduleName": "./src/lib/appManagers/appChatsManager.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "18:20-43" + "userRequest": "../richtextprocessor", + "loc": "7:28-59" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", "module": "./src/lib/appManagers/appMessagesManager.ts", "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "20:20-43" + "userRequest": "../richtextprocessor", + "loc": "19:28-59" }, { - "moduleId": 24, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/filemanager.ts", - "module": "./src/lib/filemanager.ts", - "moduleName": "./src/lib/filemanager.ts", + "moduleId": 16, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", + "module": "./src/lib/appManagers/appDocsManager.ts", + "moduleName": "./src/lib/appManagers/appDocsManager.ts", "type": "cjs require", - "userRequest": "./bin_utils", - "loc": "15:20-42" + "userRequest": "../richtextprocessor", + "loc": "17:28-59" }, { - "moduleId": 34, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/http.ts", - "module": "./src/lib/mtproto/transports/http.ts", - "moduleName": "./src/lib/mtproto/transports/http.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "../../bin_utils", - "loc": "7:20-46" + "userRequest": "../richtextprocessor", + "loc": "20:28-59" }, { - "moduleId": 35, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/tl_utils.ts", - "module": "./src/lib/tl_utils.ts", - "moduleName": "./src/lib/tl_utils.ts", + "moduleId": 26, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", + "module": "./src/lib/appManagers/appDialogsManager.ts", + "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", - "userRequest": "./bin_utils", - "loc": "16:20-42" + "userRequest": "../richtextprocessor", + "loc": "20:28-59" }, { - "moduleId": 36, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/timeManager.ts", - "module": "./src/lib/mtproto/timeManager.ts", - "moduleName": "./src/lib/mtproto/timeManager.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "module": "./src/components/wrappers.ts", + "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "8:20-43" + "userRequest": "../lib/richtextprocessor", + "loc": "33:28-63" }, { - "moduleId": 41, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/passwordManager.ts", - "module": "./src/lib/mtproto/passwordManager.ts", - "moduleName": "./src/lib/mtproto/passwordManager.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "16:20-43" + "userRequest": "../richtextprocessor", + "loc": "9:28-59" }, { - "moduleId": 43, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/rsaKeysManager.ts", - "module": "./src/lib/mtproto/rsaKeysManager.ts", - "moduleName": "./src/lib/mtproto/rsaKeysManager.ts", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "16:20-43" + "userRequest": "../lib/richtextprocessor", + "loc": "8:28-63" }, { - "moduleId": 44, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", + "moduleId": 37, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", + "module": "./src/lib/appManagers/appWebPagesManager.ts", + "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "17:20-43" + "userRequest": "../richtextprocessor", + "loc": "9:28-59" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "../bin_utils", - "loc": "23:20-43" + "userRequest": "../richtextprocessor", + "loc": "21:28-59" }, { - "moduleId": 73, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/abridged.ts", - "module": "./src/lib/mtproto/transports/abridged.ts", - "moduleName": "./src/lib/mtproto/transports/abridged.ts", + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", "type": "cjs require", - "userRequest": "../../bin_utils", - "loc": "3:20-46" + "userRequest": "../lib/richtextprocessor", + "loc": "14:28-63" }, { - "moduleId": 74, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/idb.ts", - "module": "./src/lib/idb.ts", - "moduleName": "./src/lib/idb.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "module": "./src/components/emoticonsDropdown.ts", + "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "./bin_utils", - "loc": "6:20-42" + "userRequest": "../lib/richtextprocessor", + "loc": "19:28-63" } ], "usedExports": true, - "providedExports": null, + "providedExports": [ + "RichTextProcessor" + ], "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" + "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/components/chatInput.ts (referenced with cjs require), ./src/components/emoticonsDropdown.ts (referenced with cjs require), ./src/components/wrappers.ts (referenced with cjs require), ./src/lib/appManagers/appChatsManager.ts (referenced with cjs require), ./src/lib/appManagers/appDialogsManager.ts (referenced with cjs require), ./src/lib/appManagers/appDocsManager.ts (referenced with cjs require), ./src/lib/appManagers/appImManager.ts (referenced with cjs require), ./src/lib/appManagers/appMediaViewer.ts (referenced with cjs require), ./src/lib/appManagers/appMessagesManager.ts (referenced with cjs require), ./src/lib/appManagers/appPeersManager.ts (referenced with cjs require), ./src/lib/appManagers/appProfileManager.ts (referenced with cjs require), ./src/lib/appManagers/appSidebarRight.ts (referenced with cjs require), ./src/lib/appManagers/appUsersManager.ts (referenced with cjs require), ./src/lib/appManagers/appWebPagesManager.ts (referenced with cjs require), ./src/pages/pageSignIn.ts (referenced with cjs require)" ], - "depth": 3, - "source": "\"use strict\";\n/*!\n * Webogram v0.7.0 - messaging web application for MTProto\n * https://github.com/zhukov/webogram\n * Copyright (C) 2014 Igor Zhukov \n * https://github.com/zhukov/webogram/blob/master/LICENSE\n */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// @ts-ignore\nconst jsbn_1 = require(\"jsbn\");\n// @ts-ignore\nconst pako_inflate_min_js_1 = __importDefault(require(\"pako/dist/pako_inflate.min.js\"));\n//import { dT } from './utils.js';\n/* import './closure_long.js';\n//var goog = window ? window.goog as any : this.goog;\nvar goog = typeof(window) !== 'undefined' ? window.goog : this.goog; */\nvar _logTimer = (new Date()).getTime();\nfunction dT() {\n return '[' + (((new Date()).getTime() - _logTimer) / 1000).toFixed(3) + ']';\n}\nexports.dT = dT;\nfunction bigint(num) {\n return new jsbn_1.BigInteger(num.toString(16), 16);\n}\nexports.bigint = bigint;\nfunction bigStringInt(strNum) {\n return new jsbn_1.BigInteger(strNum, 10);\n}\nexports.bigStringInt = bigStringInt;\nfunction bytesToHex(bytes) {\n bytes = bytes || [];\n var arr = [];\n for (var i = 0; i < bytes.length; i++) {\n arr.push((bytes[i] < 16 ? '0' : '') + (bytes[i] || 0).toString(16));\n }\n return arr.join('');\n}\nexports.bytesToHex = bytesToHex;\nfunction bytesFromHex(hexString) {\n var len = hexString.length, i;\n var start = 0;\n var bytes = [];\n if (hexString.length % 2) {\n bytes.push(parseInt(hexString.charAt(0), 16));\n start++;\n }\n for (i = start; i < len; i += 2) {\n bytes.push(parseInt(hexString.substr(i, 2), 16));\n }\n return bytes;\n}\nexports.bytesFromHex = bytesFromHex;\nfunction bytesToBase64(bytes) {\n var mod3;\n var result = '';\n for (var nLen = bytes.length, nUint24 = 0, nIdx = 0; nIdx < nLen; nIdx++) {\n mod3 = nIdx % 3;\n nUint24 |= bytes[nIdx] << (16 >>> mod3 & 24);\n if (mod3 === 2 || nLen - nIdx === 1) {\n result += String.fromCharCode(uint6ToBase64(nUint24 >>> 18 & 63), uint6ToBase64(nUint24 >>> 12 & 63), uint6ToBase64(nUint24 >>> 6 & 63), uint6ToBase64(nUint24 & 63));\n nUint24 = 0;\n }\n }\n return result.replace(/A(?=A$|$)/g, '=');\n}\nexports.bytesToBase64 = bytesToBase64;\nfunction uint6ToBase64(nUint6) {\n return nUint6 < 26\n ? nUint6 + 65\n : nUint6 < 52\n ? nUint6 + 71\n : nUint6 < 62\n ? nUint6 - 4\n : nUint6 === 62\n ? 43\n : nUint6 === 63\n ? 47\n : 65;\n}\nexports.uint6ToBase64 = uint6ToBase64;\nfunction base64ToBlob(base64str, mimeType) {\n var sliceSize = 1024;\n var byteCharacters = atob(base64str);\n var bytesLength = byteCharacters.length;\n var slicesCount = Math.ceil(bytesLength / sliceSize);\n var byteArrays = new Array(slicesCount);\n for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {\n var begin = sliceIndex * sliceSize;\n var end = Math.min(begin + sliceSize, bytesLength);\n var bytes = new Array(end - begin);\n for (var offset = begin, i = 0; offset < end; ++i, ++offset) {\n bytes[i] = byteCharacters[offset].charCodeAt(0);\n }\n byteArrays[sliceIndex] = new Uint8Array(bytes);\n }\n return blobConstruct(byteArrays, mimeType);\n}\nexports.base64ToBlob = base64ToBlob;\nfunction dataUrlToBlob(url) {\n // var name = 'b64blob ' + url.length\n // console.time(name)\n var urlParts = url.split(',');\n var base64str = urlParts[1];\n var mimeType = urlParts[0].split(':')[1].split(';')[0];\n var blob = base64ToBlob(base64str, mimeType);\n // console.timeEnd(name)\n return blob;\n}\nexports.dataUrlToBlob = dataUrlToBlob;\nfunction blobConstruct(blobParts, mimeType = '') {\n var blob;\n var safeMimeType = blobSafeMimeType(mimeType);\n try {\n blob = new Blob(blobParts, { type: safeMimeType });\n }\n catch (e) {\n // @ts-ignore\n var bb = new BlobBuilder;\n blobParts.forEach(function (blobPart) {\n bb.append(blobPart);\n });\n blob = bb.getBlob(safeMimeType);\n }\n return blob;\n}\nexports.blobConstruct = blobConstruct;\nfunction blobSafeMimeType(mimeType) {\n if ([\n 'image/jpeg',\n 'image/png',\n 'image/gif',\n 'image/webp',\n 'image/bmp',\n 'video/mp4',\n 'video/webm',\n 'video/quicktime',\n 'audio/ogg',\n 'audio/mpeg',\n 'audio/mp4',\n ].indexOf(mimeType) === -1) {\n return 'application/octet-stream';\n }\n return mimeType;\n}\nexports.blobSafeMimeType = blobSafeMimeType;\nfunction bytesCmp(bytes1, bytes2) {\n var len = bytes1.length;\n if (len != bytes2.length) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n if (bytes1[i] != bytes2[i]) {\n return false;\n }\n }\n return true;\n}\nexports.bytesCmp = bytesCmp;\nfunction bytesXor(bytes1, bytes2) {\n var len = bytes1.length;\n var bytes = [];\n for (var i = 0; i < len; ++i) {\n bytes[i] = bytes1[i] ^ bytes2[i];\n }\n return bytes;\n}\nexports.bytesXor = bytesXor;\nfunction bytesFromBigInt(bigInt, len) {\n var bytes = bigInt.toByteArray();\n if (len && bytes.length < len) {\n var padding = [];\n for (var i = 0, needPadding = len - bytes.length; i < needPadding; i++) {\n padding[i] = 0;\n }\n if (bytes instanceof ArrayBuffer) {\n bytes = bufferConcat(padding, bytes);\n }\n else {\n bytes = padding.concat(bytes);\n }\n }\n else {\n while (!bytes[0] && (!len || bytes.length > len)) {\n bytes = bytes.slice(1);\n }\n }\n return bytes;\n}\nexports.bytesFromBigInt = bytesFromBigInt;\nfunction bytesToArrayBuffer(b) {\n return (new Uint8Array(b)).buffer;\n}\nexports.bytesToArrayBuffer = bytesToArrayBuffer;\nfunction convertToArrayBuffer(bytes) {\n // Be careful with converting subarrays!!\n if (bytes instanceof ArrayBuffer) {\n return bytes;\n }\n if (bytes.buffer !== undefined &&\n bytes.buffer.byteLength == bytes.length * bytes.BYTES_PER_ELEMENT) {\n return bytes.buffer;\n }\n return bytesToArrayBuffer(bytes);\n}\nexports.convertToArrayBuffer = convertToArrayBuffer;\nfunction convertToUint8Array(bytes) {\n if (bytes.buffer !== undefined) {\n return bytes;\n }\n return new Uint8Array(bytes);\n}\nexports.convertToUint8Array = convertToUint8Array;\nfunction convertToByteArray(bytes) {\n if (Array.isArray(bytes)) {\n return bytes;\n }\n bytes = convertToUint8Array(bytes);\n var newBytes = [];\n for (var i = 0, len = bytes.length; i < len; i++) {\n newBytes.push(bytes[i]);\n }\n return newBytes;\n}\nexports.convertToByteArray = convertToByteArray;\nfunction bytesFromArrayBuffer(buffer) {\n var len = buffer.byteLength;\n var byteView = new Uint8Array(buffer);\n var bytes = [];\n for (var i = 0; i < len; ++i) {\n bytes[i] = byteView[i];\n }\n return bytes;\n}\nexports.bytesFromArrayBuffer = bytesFromArrayBuffer;\nfunction bufferConcat(buffer1, buffer2) {\n var l1 = buffer1.byteLength || buffer1.length;\n var l2 = buffer2.byteLength || buffer2.length;\n var tmp = new Uint8Array(l1 + l2);\n tmp.set(buffer1 instanceof ArrayBuffer ? new Uint8Array(buffer1) : buffer1, 0);\n tmp.set(buffer2 instanceof ArrayBuffer ? new Uint8Array(buffer2) : buffer2, l1);\n return tmp.buffer;\n}\nexports.bufferConcat = bufferConcat;\nfunction bufferConcats(...args) {\n let length = 0;\n args.forEach(b => length += b.byteLength || b.length);\n var tmp = new Uint8Array(length);\n let lastLength = 0;\n args.forEach(b => {\n tmp.set(b instanceof ArrayBuffer ? new Uint8Array(b) : b, lastLength);\n lastLength += b.byteLength || b.length;\n });\n return tmp /* .buffer */;\n}\nexports.bufferConcats = bufferConcats;\nfunction longToInts(sLong) {\n var divRem = bigStringInt(sLong).divideAndRemainder(bigint(0x100000000));\n return [divRem[0].intValue(), divRem[1].intValue()];\n}\nexports.longToInts = longToInts;\nfunction bytesFromWords(wordArray) {\n var words = wordArray.words;\n var sigBytes = wordArray.sigBytes;\n var bytes = [];\n for (var i = 0; i < sigBytes; i++) {\n bytes.push((words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff);\n }\n return bytes;\n}\nexports.bytesFromWords = bytesFromWords;\nfunction longToBytes(sLong) {\n return bytesFromWords({ words: longToInts(sLong), sigBytes: 8 }).reverse();\n}\nexports.longToBytes = longToBytes;\nfunction longFromInts(high, low) {\n return bigint(high).shiftLeft(32).add(bigint(low)).toString(10);\n}\nexports.longFromInts = longFromInts;\nfunction intToUint(val) {\n if (typeof (val) === 'string')\n val = parseInt(val);\n if (val < 0) {\n val = val + 4294967296;\n }\n return val;\n}\nexports.intToUint = intToUint;\nfunction uintToInt(val) {\n if (val > 2147483647) {\n val = val - 4294967296;\n }\n return val;\n}\nexports.uintToInt = uintToInt;\nfunction addPadding(bytes, blockSize = 16, zeroes, full = false, prepend = false) {\n let len = bytes.byteLength || bytes.length;\n let needPadding = blockSize - (len % blockSize);\n if (needPadding > 0 && (needPadding < blockSize || full)) {\n ////console.log('addPadding()', len, blockSize, needPadding);\n let padding = new Array(needPadding);\n if (zeroes) {\n for (let i = 0; i < needPadding; i++) {\n padding[i] = 0;\n }\n }\n else {\n (new jsbn_1.SecureRandom()).nextBytes(padding);\n }\n if (bytes instanceof ArrayBuffer) {\n bytes = prepend ? bufferConcat(padding, bytes) : bufferConcat(bytes, padding);\n }\n else if (bytes instanceof Uint8Array) {\n let _bytes = new Uint8Array(bytes.length + padding.length);\n if (prepend) {\n _bytes.set(padding);\n _bytes.set(bytes, padding.length);\n }\n else {\n _bytes.set(bytes);\n _bytes.set(padding, bytes.length);\n }\n bytes = _bytes;\n }\n else {\n bytes = prepend ? padding.concat(bytes) : bytes.concat(padding);\n }\n }\n return bytes;\n}\nexports.addPadding = addPadding;\nfunction gzipUncompress(bytes, toString) {\n //console.log(dT(), 'Gzip uncompress start');\n var result = pako_inflate_min_js_1.default.inflate(bytes, toString ? { to: 'string' } : undefined);\n //console.log(dT(), 'Gzip uncompress finish'/* , result */);\n return result;\n}\nexports.gzipUncompress = gzipUncompress;\nfunction nextRandomInt(maxValue) {\n return Math.floor(Math.random() * maxValue);\n}\nexports.nextRandomInt = nextRandomInt;\n" + "depth": 2, + "source": "import {encodeEntities, copy/* , emojiUnicode */} from './utils';\r\nimport Config from './config';\r\n\r\nvar EmojiHelper = {\r\n emojiMap: (code) => { return code; },\r\n shortcuts: [],\r\n emojis: []\r\n};\r\n\r\nvar emojiData = Config.Emoji;\r\nvar emojiIconSize = emojiData.img_size;\r\nvar emojiSupported = navigator.userAgent.search(/OS X|iPhone|iPad|iOS|Android/i) != -1/* && false */,\r\n emojiCode;\r\n//var emojiRegExp = '\\\\u0023\\\\u20E3|\\\\u00a9|\\\\u00ae|\\\\u203c|\\\\u2049|\\\\u2139|[\\\\u2194-\\\\u2199]|\\\\u21a9|\\\\u21aa|\\\\u231a|\\\\u231b|\\\\u23e9|[\\\\u23ea-\\\\u23ec]|\\\\u23f0|\\\\u24c2|\\\\u25aa|\\\\u25ab|\\\\u25b6|\\\\u2611|\\\\u2614|\\\\u26fd|\\\\u2705|\\\\u2709|[\\\\u2795-\\\\u2797]|\\\\u27a1|\\\\u27b0|\\\\u27bf|\\\\u2934|\\\\u2935|[\\\\u2b05-\\\\u2b07]|\\\\u2b1b|\\\\u2b1c|\\\\u2b50|\\\\u2b55|\\\\u3030|\\\\u303d|\\\\u3297|\\\\u3299|[\\\\uE000-\\\\uF8FF\\\\u270A-\\\\u2764\\\\u2122\\\\u25C0\\\\u25FB-\\\\u25FE\\\\u2615\\\\u263a\\\\u2648-\\\\u2653\\\\u2660-\\\\u2668\\\\u267B\\\\u267F\\\\u2693\\\\u261d\\\\u26A0-\\\\u26FA\\\\u2708\\\\u2702\\\\u2601\\\\u260E]|[\\\\u2600\\\\u26C4\\\\u26BE\\\\u23F3\\\\u2764]|\\\\uD83D[\\\\uDC00-\\\\uDFFF]|\\\\uD83C[\\\\uDDE8-\\\\uDDFA\\uDDEC]\\\\uD83C[\\\\uDDEA-\\\\uDDFA\\uDDE7]|[0-9]\\\\u20e3|\\\\uD83C[\\\\uDC00-\\\\uDFFF]';\r\n//var emojiRegExp = '\\\\u00a9|\\\\u00ae|[\\\\u2000-\\\\u3300]|\\\\ud83c[\\\\ud000-\\\\udfff]|\\\\ud83d[\\\\ud000-\\\\udfff]|\\\\ud83e[\\\\ud000-\\\\udfff]';\r\nvar emojiRegExp = '\\\\uD83C\\\\uDFF4\\\\uDB40\\\\uDC67\\\\uDB40\\\\uDC62(?:\\\\uDB40\\\\uDC77\\\\uDB40\\\\uDC6C\\\\uDB40\\\\uDC73|\\\\uDB40\\\\uDC73\\\\uDB40\\\\uDC63\\\\uDB40\\\\uDC74|\\\\uDB40\\\\uDC65\\\\uDB40\\\\uDC6E\\\\uDB40\\\\uDC67)\\\\uDB40\\\\uDC7F|(?:\\\\uD83E\\\\uDDD1\\\\uD83C\\\\uDFFB\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1|\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFC\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC69)\\\\uD83C\\\\uDFFB|\\\\uD83D\\\\uDC68(?:\\\\uD83C\\\\uDFFC\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68\\\\uD83C\\\\uDFFB|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFF\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFE])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFE\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFD])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFD\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB\\\\uDFFC])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\u200D(?:\\\\u2764\\\\uFE0F\\\\u200D(?:\\\\uD83D\\\\uDC8B\\\\u200D)?\\\\uD83D\\\\uDC68|(?:\\\\uD83D[\\\\uDC68\\\\uDC69])\\\\u200D(?:\\\\uD83D\\\\uDC66\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC67\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67]))|\\\\uD83D\\\\uDC66\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC67\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67])|(?:\\\\uD83D[\\\\uDC68\\\\uDC69])\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67])|[\\\\u2695\\\\u2696\\\\u2708]\\\\uFE0F|\\\\uD83D[\\\\uDC66\\\\uDC67]|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|(?:\\\\uD83C\\\\uDFFB\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFF\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFE\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFD\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFC\\\\u200D[\\\\u2695\\\\u2696\\\\u2708])\\\\uFE0F|\\\\uD83C\\\\uDFFB\\\\u200D(?:\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|\\\\uD83E\\\\uDDD1(?:\\\\uD83C\\\\uDFFF\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1)|\\\\uD83D\\\\uDC69(?:\\\\uD83C\\\\uDFFE\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFD\\\\uDFFF])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFD\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB\\\\uDFFC\\\\uDFFE\\\\uDFFF])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFC\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB\\\\uDFFD-\\\\uDFFF])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFB\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFC-\\\\uDFFF])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\u200D(?:\\\\u2764\\\\uFE0F\\\\u200D(?:\\\\uD83D\\\\uDC8B\\\\u200D(?:\\\\uD83D[\\\\uDC68\\\\uDC69])|\\\\uD83D[\\\\uDC68\\\\uDC69])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFF\\\\u200D(?:\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD]))|(?:\\\\uD83E\\\\uDDD1\\\\uD83C\\\\uDFFE\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1|\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFF\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D(?:\\\\uD83D[\\\\uDC68\\\\uDC69]))(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFE])|(?:\\\\uD83E\\\\uDDD1\\\\uD83C\\\\uDFFD\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1|\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFE\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC69)(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFD])|(?:\\\\uD83E\\\\uDDD1\\\\uD83C\\\\uDFFC\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1|\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFD\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC69)(?:\\\\uD83C[\\\\uDFFB\\\\uDFFC])|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC69\\\\u200D(?:\\\\uD83D\\\\uDC66\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC67\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67]))|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC66\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC69\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67])|(?:\\\\uD83D\\\\uDC41\\\\uFE0F\\\\u200D\\\\uD83D\\\\uDDE8|\\\\uD83D\\\\uDC69(?:\\\\uD83C\\\\uDFFF\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFE\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFD\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFC\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFB\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\u200D[\\\\u2695\\\\u2696\\\\u2708])|(?:\\\\uD83C[\\\\uDFC3\\\\uDFC4\\\\uDFCA]|\\\\uD83D[\\\\uDC6E\\\\uDC71\\\\uDC73\\\\uDC77\\\\uDC81\\\\uDC82\\\\uDC86\\\\uDC87\\\\uDE45-\\\\uDE47\\\\uDE4B\\\\uDE4D\\\\uDE4E\\\\uDEA3\\\\uDEB4-\\\\uDEB6]|\\\\uD83E[\\\\uDD26\\\\uDD37-\\\\uDD39\\\\uDD3D\\\\uDD3E\\\\uDDB8\\\\uDDB9\\\\uDDCD-\\\\uDDCF\\\\uDDD6-\\\\uDDDD])(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])\\\\u200D[\\\\u2640\\\\u2642]|(?:\\\\u26F9|\\\\uD83C[\\\\uDFCB\\\\uDFCC]|\\\\uD83D\\\\uDD75)(?:\\\\uFE0F\\\\u200D[\\\\u2640\\\\u2642]|(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])\\\\u200D[\\\\u2640\\\\u2642])|\\\\uD83C\\\\uDFF4\\\\u200D\\\\u2620|(?:\\\\uD83C[\\\\uDFC3\\\\uDFC4\\\\uDFCA]|\\\\uD83D[\\\\uDC6E\\\\uDC6F\\\\uDC71\\\\uDC73\\\\uDC77\\\\uDC81\\\\uDC82\\\\uDC86\\\\uDC87\\\\uDE45-\\\\uDE47\\\\uDE4B\\\\uDE4D\\\\uDE4E\\\\uDEA3\\\\uDEB4-\\\\uDEB6]|\\\\uD83E[\\\\uDD26\\\\uDD37-\\\\uDD39\\\\uDD3C-\\\\uDD3E\\\\uDDB8\\\\uDDB9\\\\uDDCD-\\\\uDDCF\\\\uDDD6-\\\\uDDDF])\\\\u200D[\\\\u2640\\\\u2642])\\\\uFE0F|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC67\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67])|\\\\uD83C\\\\uDFF3\\\\uFE0F\\\\u200D\\\\uD83C\\\\uDF08|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC67|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC15\\\\u200D\\\\uD83E\\\\uDDBA|\\\\uD83C\\\\uDDFD\\\\uD83C\\\\uDDF0|\\\\uD83C\\\\uDDF6\\\\uD83C\\\\uDDE6|\\\\uD83C\\\\uDDF4\\\\uD83C\\\\uDDF2|\\\\uD83E\\\\uDDD1(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|\\\\uD83D\\\\uDC69(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|\\\\uD83C\\\\uDDFF(?:\\\\uD83C[\\\\uDDE6\\\\uDDF2\\\\uDDFC])|\\\\uD83C\\\\uDDFE(?:\\\\uD83C[\\\\uDDEA\\\\uDDF9])|\\\\uD83C\\\\uDDFC(?:\\\\uD83C[\\\\uDDEB\\\\uDDF8])|\\\\uD83C\\\\uDDFB(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDEA\\\\uDDEC\\\\uDDEE\\\\uDDF3\\\\uDDFA])|\\\\uD83C\\\\uDDFA(?:\\\\uD83C[\\\\uDDE6\\\\uDDEC\\\\uDDF2\\\\uDDF3\\\\uDDF8\\\\uDDFE\\\\uDDFF])|\\\\uD83C\\\\uDDF9(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDE9\\\\uDDEB-\\\\uDDED\\\\uDDEF-\\\\uDDF4\\\\uDDF7\\\\uDDF9\\\\uDDFB\\\\uDDFC\\\\uDDFF])|\\\\uD83C\\\\uDDF8(?:\\\\uD83C[\\\\uDDE6-\\\\uDDEA\\\\uDDEC-\\\\uDDF4\\\\uDDF7-\\\\uDDF9\\\\uDDFB\\\\uDDFD-\\\\uDDFF])|\\\\uD83C\\\\uDDF7(?:\\\\uD83C[\\\\uDDEA\\\\uDDF4\\\\uDDF8\\\\uDDFA\\\\uDDFC])|\\\\uD83C\\\\uDDF5(?:\\\\uD83C[\\\\uDDE6\\\\uDDEA-\\\\uDDED\\\\uDDF0-\\\\uDDF3\\\\uDDF7-\\\\uDDF9\\\\uDDFC\\\\uDDFE])|\\\\uD83C\\\\uDDF3(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDEA-\\\\uDDEC\\\\uDDEE\\\\uDDF1\\\\uDDF4\\\\uDDF5\\\\uDDF7\\\\uDDFA\\\\uDDFF])|\\\\uD83C\\\\uDDF2(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8-\\\\uDDED\\\\uDDF0-\\\\uDDFF])|\\\\uD83C\\\\uDDF1(?:\\\\uD83C[\\\\uDDE6-\\\\uDDE8\\\\uDDEE\\\\uDDF0\\\\uDDF7-\\\\uDDFB\\\\uDDFE])|\\\\uD83C\\\\uDDF0(?:\\\\uD83C[\\\\uDDEA\\\\uDDEC-\\\\uDDEE\\\\uDDF2\\\\uDDF3\\\\uDDF5\\\\uDDF7\\\\uDDFC\\\\uDDFE\\\\uDDFF])|\\\\uD83C\\\\uDDEF(?:\\\\uD83C[\\\\uDDEA\\\\uDDF2\\\\uDDF4\\\\uDDF5])|\\\\uD83C\\\\uDDEE(?:\\\\uD83C[\\\\uDDE8-\\\\uDDEA\\\\uDDF1-\\\\uDDF4\\\\uDDF6-\\\\uDDF9])|\\\\uD83C\\\\uDDED(?:\\\\uD83C[\\\\uDDF0\\\\uDDF2\\\\uDDF3\\\\uDDF7\\\\uDDF9\\\\uDDFA])|\\\\uD83C\\\\uDDEC(?:\\\\uD83C[\\\\uDDE6\\\\uDDE7\\\\uDDE9-\\\\uDDEE\\\\uDDF1-\\\\uDDF3\\\\uDDF5-\\\\uDDFA\\\\uDDFC\\\\uDDFE])|\\\\uD83C\\\\uDDEB(?:\\\\uD83C[\\\\uDDEE-\\\\uDDF0\\\\uDDF2\\\\uDDF4\\\\uDDF7])|\\\\uD83C\\\\uDDEA(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDEA\\\\uDDEC\\\\uDDED\\\\uDDF7-\\\\uDDFA])|\\\\uD83C\\\\uDDE9(?:\\\\uD83C[\\\\uDDEA\\\\uDDEC\\\\uDDEF\\\\uDDF0\\\\uDDF2\\\\uDDF4\\\\uDDFF])|\\\\uD83C\\\\uDDE8(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDE9\\\\uDDEB-\\\\uDDEE\\\\uDDF0-\\\\uDDF5\\\\uDDF7\\\\uDDFA-\\\\uDDFF])|\\\\uD83C\\\\uDDE7(?:\\\\uD83C[\\\\uDDE6\\\\uDDE7\\\\uDDE9-\\\\uDDEF\\\\uDDF1-\\\\uDDF4\\\\uDDF6-\\\\uDDF9\\\\uDDFB\\\\uDDFC\\\\uDDFE\\\\uDDFF])|\\\\uD83C\\\\uDDE6(?:\\\\uD83C[\\\\uDDE8-\\\\uDDEC\\\\uDDEE\\\\uDDF1\\\\uDDF2\\\\uDDF4\\\\uDDF6-\\\\uDDFA\\\\uDDFC\\\\uDDFD\\\\uDDFF])|[#\\\\*0-9]\\\\uFE0F\\\\u20E3|(?:\\\\uD83C[\\\\uDFC3\\\\uDFC4\\\\uDFCA]|\\\\uD83D[\\\\uDC6E\\\\uDC71\\\\uDC73\\\\uDC77\\\\uDC81\\\\uDC82\\\\uDC86\\\\uDC87\\\\uDE45-\\\\uDE47\\\\uDE4B\\\\uDE4D\\\\uDE4E\\\\uDEA3\\\\uDEB4-\\\\uDEB6]|\\\\uD83E[\\\\uDD26\\\\uDD37-\\\\uDD39\\\\uDD3D\\\\uDD3E\\\\uDDB8\\\\uDDB9\\\\uDDCD-\\\\uDDCF\\\\uDDD6-\\\\uDDDD])(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|(?:\\\\u26F9|\\\\uD83C[\\\\uDFCB\\\\uDFCC]|\\\\uD83D\\\\uDD75)(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|(?:[\\\\u261D\\\\u270A-\\\\u270D]|\\\\uD83C[\\\\uDF85\\\\uDFC2\\\\uDFC7]|\\\\uD83D[\\\\uDC42\\\\uDC43\\\\uDC46-\\\\uDC50\\\\uDC66\\\\uDC67\\\\uDC6B-\\\\uDC6D\\\\uDC70\\\\uDC72\\\\uDC74-\\\\uDC76\\\\uDC78\\\\uDC7C\\\\uDC83\\\\uDC85\\\\uDCAA\\\\uDD74\\\\uDD7A\\\\uDD90\\\\uDD95\\\\uDD96\\\\uDE4C\\\\uDE4F\\\\uDEC0\\\\uDECC]|\\\\uD83E[\\\\uDD0F\\\\uDD18-\\\\uDD1C\\\\uDD1E\\\\uDD1F\\\\uDD30-\\\\uDD36\\\\uDDB5\\\\uDDB6\\\\uDDBB\\\\uDDD2-\\\\uDDD5])(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|(?:[\\\\u231A\\\\u231B\\\\u23E9-\\\\u23EC\\\\u23F0\\\\u23F3\\\\u25FD\\\\u25FE\\\\u2614\\\\u2615\\\\u2648-\\\\u2653\\\\u267F\\\\u2693\\\\u26A1\\\\u26AA\\\\u26AB\\\\u26BD\\\\u26BE\\\\u26C4\\\\u26C5\\\\u26CE\\\\u26D4\\\\u26EA\\\\u26F2\\\\u26F3\\\\u26F5\\\\u26FA\\\\u26FD\\\\u2705\\\\u270A\\\\u270B\\\\u2728\\\\u274C\\\\u274E\\\\u2753-\\\\u2755\\\\u2757\\\\u2795-\\\\u2797\\\\u27B0\\\\u27BF\\\\u2B1B\\\\u2B1C\\\\u2B50\\\\u2B55]|\\\\uD83C[\\\\uDC04\\\\uDCCF\\\\uDD8E\\\\uDD91-\\\\uDD9A\\\\uDDE6-\\\\uDDFF\\\\uDE01\\\\uDE1A\\\\uDE2F\\\\uDE32-\\\\uDE36\\\\uDE38-\\\\uDE3A\\\\uDE50\\\\uDE51\\\\uDF00-\\\\uDF20\\\\uDF2D-\\\\uDF35\\\\uDF37-\\\\uDF7C\\\\uDF7E-\\\\uDF93\\\\uDFA0-\\\\uDFCA\\\\uDFCF-\\\\uDFD3\\\\uDFE0-\\\\uDFF0\\\\uDFF4\\\\uDFF8-\\\\uDFFF]|\\\\uD83D[\\\\uDC00-\\\\uDC3E\\\\uDC40\\\\uDC42-\\\\uDCFC\\\\uDCFF-\\\\uDD3D\\\\uDD4B-\\\\uDD4E\\\\uDD50-\\\\uDD67\\\\uDD7A\\\\uDD95\\\\uDD96\\\\uDDA4\\\\uDDFB-\\\\uDE4F\\\\uDE80-\\\\uDEC5\\\\uDECC\\\\uDED0-\\\\uDED2\\\\uDED5\\\\uDEEB\\\\uDEEC\\\\uDEF4-\\\\uDEFA\\\\uDFE0-\\\\uDFEB]|\\\\uD83E[\\\\uDD0D-\\\\uDD3A\\\\uDD3C-\\\\uDD45\\\\uDD47-\\\\uDD71\\\\uDD73-\\\\uDD76\\\\uDD7A-\\\\uDDA2\\\\uDDA5-\\\\uDDAA\\\\uDDAE-\\\\uDDCA\\\\uDDCD-\\\\uDDFF\\\\uDE70-\\\\uDE73\\\\uDE78-\\\\uDE7A\\\\uDE80-\\\\uDE82\\\\uDE90-\\\\uDE95])|(?:[#\\\\*0-9\\\\xA9\\\\xAE\\\\u203C\\\\u2049\\\\u2122\\\\u2139\\\\u2194-\\\\u2199\\\\u21A9\\\\u21AA\\\\u231A\\\\u231B\\\\u2328\\\\u23CF\\\\u23E9-\\\\u23F3\\\\u23F8-\\\\u23FA\\\\u24C2\\\\u25AA\\\\u25AB\\\\u25B6\\\\u25C0\\\\u25FB-\\\\u25FE\\\\u2600-\\\\u2604\\\\u260E\\\\u2611\\\\u2614\\\\u2615\\\\u2618\\\\u261D\\\\u2620\\\\u2622\\\\u2623\\\\u2626\\\\u262A\\\\u262E\\\\u262F\\\\u2638-\\\\u263A\\\\u2640\\\\u2642\\\\u2648-\\\\u2653\\\\u265F\\\\u2660\\\\u2663\\\\u2665\\\\u2666\\\\u2668\\\\u267B\\\\u267E\\\\u267F\\\\u2692-\\\\u2697\\\\u2699\\\\u269B\\\\u269C\\\\u26A0\\\\u26A1\\\\u26AA\\\\u26AB\\\\u26B0\\\\u26B1\\\\u26BD\\\\u26BE\\\\u26C4\\\\u26C5\\\\u26C8\\\\u26CE\\\\u26CF\\\\u26D1\\\\u26D3\\\\u26D4\\\\u26E9\\\\u26EA\\\\u26F0-\\\\u26F5\\\\u26F7-\\\\u26FA\\\\u26FD\\\\u2702\\\\u2705\\\\u2708-\\\\u270D\\\\u270F\\\\u2712\\\\u2714\\\\u2716\\\\u271D\\\\u2721\\\\u2728\\\\u2733\\\\u2734\\\\u2744\\\\u2747\\\\u274C\\\\u274E\\\\u2753-\\\\u2755\\\\u2757\\\\u2763\\\\u2764\\\\u2795-\\\\u2797\\\\u27A1\\\\u27B0\\\\u27BF\\\\u2934\\\\u2935\\\\u2B05-\\\\u2B07\\\\u2B1B\\\\u2B1C\\\\u2B50\\\\u2B55\\\\u3030\\\\u303D\\\\u3297\\\\u3299]|\\\\uD83C[\\\\uDC04\\\\uDCCF\\\\uDD70\\\\uDD71\\\\uDD7E\\\\uDD7F\\\\uDD8E\\\\uDD91-\\\\uDD9A\\\\uDDE6-\\\\uDDFF\\\\uDE01\\\\uDE02\\\\uDE1A\\\\uDE2F\\\\uDE32-\\\\uDE3A\\\\uDE50\\\\uDE51\\\\uDF00-\\\\uDF21\\\\uDF24-\\\\uDF93\\\\uDF96\\\\uDF97\\\\uDF99-\\\\uDF9B\\\\uDF9E-\\\\uDFF0\\\\uDFF3-\\\\uDFF5\\\\uDFF7-\\\\uDFFF]|\\\\uD83D[\\\\uDC00-\\\\uDCFD\\\\uDCFF-\\\\uDD3D\\\\uDD49-\\\\uDD4E\\\\uDD50-\\\\uDD67\\\\uDD6F\\\\uDD70\\\\uDD73-\\\\uDD7A\\\\uDD87\\\\uDD8A-\\\\uDD8D\\\\uDD90\\\\uDD95\\\\uDD96\\\\uDDA4\\\\uDDA5\\\\uDDA8\\\\uDDB1\\\\uDDB2\\\\uDDBC\\\\uDDC2-\\\\uDDC4\\\\uDDD1-\\\\uDDD3\\\\uDDDC-\\\\uDDDE\\\\uDDE1\\\\uDDE3\\\\uDDE8\\\\uDDEF\\\\uDDF3\\\\uDDFA-\\\\uDE4F\\\\uDE80-\\\\uDEC5\\\\uDECB-\\\\uDED2\\\\uDED5\\\\uDEE0-\\\\uDEE5\\\\uDEE9\\\\uDEEB\\\\uDEEC\\\\uDEF0\\\\uDEF3-\\\\uDEFA\\\\uDFE0-\\\\uDFEB]|\\\\uD83E[\\\\uDD0D-\\\\uDD3A\\\\uDD3C-\\\\uDD45\\\\uDD47-\\\\uDD71\\\\uDD73-\\\\uDD76\\\\uDD7A-\\\\uDDA2\\\\uDDA5-\\\\uDDAA\\\\uDDAE-\\\\uDDCA\\\\uDDCD-\\\\uDDFF\\\\uDE70-\\\\uDE73\\\\uDE78-\\\\uDE7A\\\\uDE80-\\\\uDE82\\\\uDE90-\\\\uDE95])\\\\uFE0F|(?:[\\\\u261D\\\\u26F9\\\\u270A-\\\\u270D]|\\\\uD83C[\\\\uDF85\\\\uDFC2-\\\\uDFC4\\\\uDFC7\\\\uDFCA-\\\\uDFCC]|\\\\uD83D[\\\\uDC42\\\\uDC43\\\\uDC46-\\\\uDC50\\\\uDC66-\\\\uDC78\\\\uDC7C\\\\uDC81-\\\\uDC83\\\\uDC85-\\\\uDC87\\\\uDC8F\\\\uDC91\\\\uDCAA\\\\uDD74\\\\uDD75\\\\uDD7A\\\\uDD90\\\\uDD95\\\\uDD96\\\\uDE45-\\\\uDE47\\\\uDE4B-\\\\uDE4F\\\\uDEA3\\\\uDEB4-\\\\uDEB6\\\\uDEC0\\\\uDECC]|\\\\uD83E[\\\\uDD0F\\\\uDD18-\\\\uDD1F\\\\uDD26\\\\uDD30-\\\\uDD39\\\\uDD3C-\\\\uDD3E\\\\uDDB5\\\\uDDB6\\\\uDDB8\\\\uDDB9\\\\uDDBB\\\\uDDCD-\\\\uDDCF\\\\uDDD1-\\\\uDDDD])';\r\nvar alphaCharsRegExp = 'a-z' +\r\n '\\\\u00c0-\\\\u00d6\\\\u00d8-\\\\u00f6\\\\u00f8-\\\\u00ff' + // Latin-1\r\n '\\\\u0100-\\\\u024f' + // Latin Extended A and B\r\n '\\\\u0253\\\\u0254\\\\u0256\\\\u0257\\\\u0259\\\\u025b\\\\u0263\\\\u0268\\\\u026f\\\\u0272\\\\u0289\\\\u028b' + // IPA Extensions\r\n '\\\\u02bb' + // Hawaiian\r\n '\\\\u0300-\\\\u036f' + // Combining diacritics\r\n '\\\\u1e00-\\\\u1eff' + // Latin Extended Additional (mostly for Vietnamese)\r\n '\\\\u0400-\\\\u04ff\\\\u0500-\\\\u0527' + // Cyrillic\r\n '\\\\u2de0-\\\\u2dff\\\\ua640-\\\\ua69f' + // Cyrillic Extended A/B\r\n '\\\\u0591-\\\\u05bf\\\\u05c1-\\\\u05c2\\\\u05c4-\\\\u05c5\\\\u05c7' +\r\n '\\\\u05d0-\\\\u05ea\\\\u05f0-\\\\u05f4' + // Hebrew\r\n '\\\\ufb1d-\\\\ufb28\\\\ufb2a-\\\\ufb36\\\\ufb38-\\\\ufb3c\\\\ufb3e\\\\ufb40-\\\\ufb41' +\r\n '\\\\ufb43-\\\\ufb44\\\\ufb46-\\\\ufb4f' + // Hebrew Pres. Forms\r\n '\\\\u0610-\\\\u061a\\\\u0620-\\\\u065f\\\\u066e-\\\\u06d3\\\\u06d5-\\\\u06dc' +\r\n '\\\\u06de-\\\\u06e8\\\\u06ea-\\\\u06ef\\\\u06fa-\\\\u06fc\\\\u06ff' + // Arabic\r\n '\\\\u0750-\\\\u077f\\\\u08a0\\\\u08a2-\\\\u08ac\\\\u08e4-\\\\u08fe' + // Arabic Supplement and Extended A\r\n '\\\\ufb50-\\\\ufbb1\\\\ufbd3-\\\\ufd3d\\\\ufd50-\\\\ufd8f\\\\ufd92-\\\\ufdc7\\\\ufdf0-\\\\ufdfb' + // Pres. Forms A\r\n '\\\\ufe70-\\\\ufe74\\\\ufe76-\\\\ufefc' + // Pres. Forms B\r\n '\\\\u200c' + // Zero-Width Non-Joiner\r\n '\\\\u0e01-\\\\u0e3a\\\\u0e40-\\\\u0e4e' + // Thai\r\n '\\\\u1100-\\\\u11ff\\\\u3130-\\\\u3185\\\\uA960-\\\\uA97F\\\\uAC00-\\\\uD7AF\\\\uD7B0-\\\\uD7FF' + // Hangul (Korean)\r\n '\\\\u3003\\\\u3005\\\\u303b' + // Kanji/Han iteration marks\r\n '\\\\uff21-\\\\uff3a\\\\uff41-\\\\uff5a' + // full width Alphabet\r\n '\\\\uff66-\\\\uff9f' + // half width Katakana\r\n '\\\\uffa1-\\\\uffdc'; // half width Hangul (Korean)\r\nvar alphaNumericRegExp = '0-9\\_' + alphaCharsRegExp;\r\nvar domainAddChars = '\\u00b7';\r\n// Based on Regular Expression for URL validation by Diego Perini\r\nvar urlRegExp = '((?:https?|ftp)://|mailto:)?' +\r\n // user:pass authentication\r\n '(?:\\\\S{1,64}(?::\\\\S{0,64})?@)?' +\r\n '(?:' +\r\n // sindresorhus/ip-regexp\r\n '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}' +\r\n '|' +\r\n // host name\r\n '[' + alphaCharsRegExp + '0-9][' + alphaCharsRegExp + domainAddChars + '0-9\\-]{0,64}' +\r\n // domain name\r\n '(?:\\\\.[' + alphaCharsRegExp + '0-9][' + alphaCharsRegExp + domainAddChars + '0-9\\-]{0,64}){0,10}' +\r\n // TLD identifier\r\n '(?:\\\\.(xn--[0-9a-z]{2,16}|[' + alphaCharsRegExp + ']{2,24}))' +\r\n ')' +\r\n // port number\r\n '(?::\\\\d{2,5})?' +\r\n // resource path\r\n '(?:/(?:\\\\S{0,255}[^\\\\s.;,(\\\\[\\\\]{}<>\"\\'])?)?'\r\nvar usernameRegExp = '[a-zA-Z\\\\d_]{5,32}'\r\nvar botCommandRegExp = '\\\\/([a-zA-Z\\\\d_]{1,32})(?:@(' + usernameRegExp + '))?(\\\\b|$)'\r\nvar fullRegExp = new RegExp('(^| )(@)(' + usernameRegExp + ')|(' + urlRegExp + ')|(\\\\n)|(' + emojiRegExp + ')|(^|[\\\\s\\\\(\\\\]])(#[' + alphaNumericRegExp + ']{2,64})|(^|\\\\s)' + botCommandRegExp, 'i')\r\nvar emailRegExp = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\r\nvar youtubeRegExp = /^(?:https?:\\/\\/)?(?:www\\.)?youtu(?:|\\.be|be\\.com|\\.b)(?:\\/v\\/|\\/watch\\\\?v=|e\\/|(?:\\/\\??#)?\\/watch(?:.+)v=)(.{11})(?:\\&[^\\s]*)?/\r\nvar vimeoRegExp = /^(?:https?:\\/\\/)?(?:www\\.)?vimeo\\.com\\/(\\d+)/\r\nvar instagramRegExp = /^https?:\\/\\/(?:instagr\\.am\\/p\\/|instagram\\.com\\/p\\/)([a-zA-Z0-9\\-\\_]+)/i\r\nvar vineRegExp = /^https?:\\/\\/vine\\.co\\/v\\/([a-zA-Z0-9\\-\\_]+)/i\r\nvar twitterRegExp = /^https?:\\/\\/twitter\\.com\\/.+?\\/status\\/\\d+/i\r\nvar facebookRegExp = /^https?:\\/\\/(?:www\\.|m\\.)?facebook\\.com\\/(?:.+?\\/posts\\/\\d+|(?:story\\.php|permalink\\.php)\\?story_fbid=(\\d+)(?:&substory_index=\\d+)?&id=(\\d+))/i\r\nvar gplusRegExp = /^https?:\\/\\/plus\\.google\\.com\\/\\d+\\/posts\\/[a-zA-Z0-9\\-\\_]+/i\r\nvar soundcloudRegExp = /^https?:\\/\\/(?:soundcloud\\.com|snd\\.sc)\\/([a-zA-Z0-9%\\-\\_]+)\\/([a-zA-Z0-9%\\-\\_]+)/i\r\nvar spotifyRegExp = /(https?:\\/\\/(open\\.spotify\\.com|play\\.spotify\\.com|spoti\\.fi)\\/(.+)|spotify:(.+))/i\r\nvar markdownTestRegExp = /[`_*@]/\r\nvar markdownRegExp = /(^|\\s|\\n)(````?)([\\s\\S]+?)(````?)([\\s\\n\\.,:?!;]|$)|(^|\\s)(`|\\*\\*|__)([^\\n]+?)\\7([\\s\\.,:?!;]|$)|@(\\d+)\\s*\\((.+?)\\)/m\r\nvar siteHashtags = {\r\n Telegram: 'tg://search_hashtag?hashtag={1}',\r\n Twitter: 'https://twitter.com/hashtag/{1}',\r\n Instagram: 'https://instagram.com/explore/tags/{1}/',\r\n 'Google Plus': 'https://plus.google.com/explore/{1}'\r\n}\r\nvar siteMentions = {\r\n Telegram: '#/im?p=%40{1}',\r\n Twitter: 'https://twitter.com/{1}',\r\n Instagram: 'https://instagram.com/{1}/',\r\n GitHub: 'https://github.com/{1}'\r\n}\r\nvar markdownEntities = {\r\n '`': 'messageEntityCode',\r\n '**': 'messageEntityBold',\r\n '__': 'messageEntityItalic'\r\n}\r\nfunction getEmojiSpritesheetCoords(emojiCode) {\r\n //////////////emojiCode = emojiUnicode(emojiCode);\r\n\r\n let emojiInfo = emojiData.emoji[emojiCode];\r\n if(!emojiInfo) {\r\n //console.error('no emoji by code:', emojiCode, emojiCode.length, new TextEncoder().encode(emojiCode));\r\n return null;\r\n }\r\n\r\n let sheetX = 0;\r\n let sheetNo = '';\r\n if(emojiData.splitted) {\r\n sheetX = emojiInfo[emojiData.keyX] % 6;\r\n sheetNo = (emojiInfo[emojiData.keyX] / 6 | 0) + 1;\r\n } else {\r\n sheetX = emojiInfo[emojiData.keyX];\r\n }\r\n\r\n /* let xPos = 100 * (((emojiInfo.sheet_x * (img_size + 2)) + 1) / (sheetSizeX - img_size));\r\n let yPos = 100 * (((emojiInfo.sheet_y * (img_size + 2)) + 1) / (sheetSizeY - img_size)); */\r\n let xPos = sheetX * emojiData.multiplyX;\r\n let yPos = 100 / emojiData.side * emojiInfo[emojiData.keyY];\r\n\r\n if(emojiData.splitted) {\r\n /* if(sheetX != 2 && sheetX != 3) {\r\n xPos += ((sheetX + 1) > (6 / 2) ? -1 : 1) * 100 / 204;\r\n } */\r\n\r\n if(sheetNo == 9) {\r\n xPos = sheetX * 100 / 5;\r\n } else {\r\n xPos = sheetX * 100 / 6;\r\n }\r\n }\r\n\r\n //console.log({row: yPos, column: xPos, sheetNo});\r\n\r\n return {row: yPos, column: xPos, sheetNo};\r\n}\r\nfunction parseEntities (text, options) {\r\n options = options || {}\r\n var match\r\n var raw = text,\r\n url\r\n var entities = [],\r\n emojiCode = '',\r\n emojiCoords,\r\n matchIndex\r\n var rawOffset = 0\r\n // var start = tsNow()\r\n while ((match = raw.match(fullRegExp))) {\r\n matchIndex = rawOffset + match.index;\r\n\r\n if(match[3]) { // mentions\r\n entities.push({\r\n _: 'messageEntityMention',\r\n offset: matchIndex + match[1].length,\r\n length: match[2].length + match[3].length\r\n });\r\n } else if(match[4]) {\r\n if(emailRegExp.test(match[4])) { // email\r\n entities.push({\r\n _: 'messageEntityEmail',\r\n offset: matchIndex,\r\n length: match[4].length\r\n });\r\n } else {\r\n var url = false;\r\n var protocol = match[5];\r\n var tld = match[6];\r\n var excluded = '';\r\n if(tld) { // URL\r\n if(!protocol && (tld.substr(0, 4) === 'xn--' || Config.TLD.indexOf(tld.toLowerCase()) !== -1)) {\r\n protocol = 'http://';\r\n }\r\n\r\n if(protocol) {\r\n var balanced = checkBrackets(match[4]);\r\n if (balanced.length !== match[4].length) {\r\n excluded = match[4].substring(balanced.length);\r\n match[4] = balanced;\r\n }\r\n\r\n url = (match[5] ? '' : protocol) + match[4];\r\n }\r\n } else { // IP address\r\n url = (match[5] ? '' : 'http://') + match[4];\r\n }\r\n\r\n if (url) {\r\n entities.push({\r\n _: 'messageEntityUrl',\r\n offset: matchIndex,\r\n length: match[4].length\r\n });\r\n }\r\n }\r\n } else if(match[7]) { // New line\r\n entities.push({\r\n _: 'messageEntityLinebreak',\r\n offset: matchIndex,\r\n length: 1\r\n });\r\n } else if(match[8]/* && !emojiSupported */) { // Emoji\r\n if(emojiCode) matchIndex -= match[8].length;\r\n emojiCode += match[8];\r\n //console.log('hit', match[8], emojiCode.length);\r\n if((emojiCoords = getEmojiSpritesheetCoords(emojiCode))) {\r\n entities.push({\r\n _: 'messageEntityEmoji',\r\n offset: matchIndex,\r\n length: emojiCode.length,\r\n coords: emojiCoords/* ,\r\n title: emojiData[emojiCode][1][0] */\r\n });\r\n\r\n emojiCode = '';\r\n }\r\n } else if(match[10]) { // Hashtag\r\n entities.push({\r\n _: 'messageEntityHashtag',\r\n offset: matchIndex + match[9].length,\r\n length: match[10].length\r\n });\r\n } else if(match[12]) { // Bot command\r\n entities.push({\r\n _: 'messageEntityBotCommand',\r\n offset: matchIndex + match[11].length,\r\n length: 1 + match[12].length + (match[13] ? 1 + match[13].length : 0)\r\n });\r\n }\r\n\r\n raw = raw.substr(match.index + match[0].length);\r\n rawOffset += match.index + match[0].length;\r\n }\r\n\r\n // if (entities.length) {\r\n // console.log('parse entities', text, entities.slice())\r\n // }\r\n return entities\r\n}\r\nfunction parseEmojis (text) {\r\n return text.replace(/:([a-z0-9\\-\\+\\*_]+?):/gi, function (all, shortcut) {\r\n var emojiCode = EmojiHelper.shortcuts[shortcut]\r\n if (emojiCode !== undefined) {\r\n return EmojiHelper.emojis[emojiCode][0]\r\n }\r\n return all\r\n })\r\n}\r\nfunction parseMarkdown (text, entities, noTrim) {\r\n  if (!markdownTestRegExp.test(text)) {\r\n return noTrim ? text : text.trim()\r\n }\r\n var raw = text\r\n var match\r\n var newText = []\r\n var rawOffset = 0\r\n var matchIndex\r\n while (match = raw.match(markdownRegExp)) {\r\n matchIndex = rawOffset + match.index\r\n newText.push(raw.substr(0, match.index))\r\n var text = (match[3] || match[8] || match[11])\r\n rawOffset -= text.length\r\n text = text.replace(/^\\s+|\\s+$/g, '')\r\n rawOffset += text.length\r\n if (text.match(/^`*$/)) {\r\n newText.push(match[0])\r\n }\r\n else if (match[3]) { // pre\r\n if (match[5] == '\\n') {\r\n match[5] = ''\r\n rawOffset -= 1\r\n }\r\n newText.push(match[1] + text + match[5])\r\n entities.push({\r\n _: 'messageEntityPre',\r\n language: '',\r\n offset: matchIndex + match[1].length,\r\n length: text.length\r\n })\r\n rawOffset -= match[2].length + match[4].length\r\n } else if (match[7]) { // code|italic|bold\r\n newText.push(match[6] + text + match[9])\r\n entities.push({\r\n _: markdownEntities[match[7]],\r\n offset: matchIndex + match[6].length,\r\n length: text.length\r\n })\r\n rawOffset -= match[7].length * 2\r\n } else if (match[11]) { // custom mention\r\n newText.push(text)\r\n entities.push({\r\n _: 'messageEntityMentionName',\r\n user_id: match[10],\r\n offset: matchIndex,\r\n length: text.length\r\n })\r\n rawOffset -= match[0].length - text.length\r\n }\r\n raw = raw.substr(match.index + match[0].length)\r\n rawOffset += match.index + match[0].length\r\n }\r\n newText.push(raw)\r\n newText = newText.join('')\r\n if (!newText.replace(/\\s+/g, '').length) {\r\n newText = text\r\n entities.splice(0, entities.length)\r\n }\r\n if (!entities.length && !noTrim) {\r\n newText = newText.trim()\r\n }\r\n return newText\r\n}\r\nfunction mergeEntities (currentEntities, newEntities, fromApi) {\r\n var totalEntities = newEntities.slice()\r\n var i\r\n var len = currentEntities.length\r\n var j\r\n var len2 = newEntities.length\r\n var startJ = 0\r\n var curEntity\r\n var newEntity\r\n var start, end\r\n var cStart, cEnd\r\n var bad\r\n for (i = 0; i < len; i++) {\r\n curEntity = currentEntities[i]\r\n if (fromApi &&\r\n curEntity._ != 'messageEntityLinebreak' &&\r\n curEntity._ != 'messageEntityEmoji') {\r\n continue\r\n }\r\n // console.log('s', curEntity, newEntities)\r\n start = curEntity.offset\r\n end = start + curEntity.length\r\n bad = false\r\n for (j = startJ; j < len2; j++) {\r\n newEntity = newEntities[j]\r\n cStart = newEntity.offset\r\n cEnd = cStart + newEntity.length\r\n if (cStart <= start) {\r\n startJ = j\r\n }\r\n if (start >= cStart && start < cEnd ||\r\n end > cStart && end <= cEnd) {\r\n // console.log('bad', curEntity, newEntity)\r\n if (fromApi &&\r\n start >= cStart && end <= cEnd) {\r\n if (newEntity.nested === undefined) {\r\n newEntity.nested = []\r\n }\r\n curEntity.offset -= cStart\r\n newEntity.nested.push(copy(curEntity))\r\n }\r\n bad = true\r\n break\r\n }\r\n if (cStart >= end) {\r\n break\r\n }\r\n }\r\n if (bad) {\r\n continue\r\n }\r\n totalEntities.push(curEntity)\r\n }\r\n totalEntities.sort(function (a, b) {\r\n return a.offset - b.offset\r\n })\r\n // console.log('merge', currentEntities, newEntities, totalEntities)\r\n return totalEntities\r\n}\r\nfunction wrapRichNestedText (text, nested, options) {\r\n if (nested === undefined) {\r\n return encodeEntities(text)\r\n }\r\n options.hasNested = true\r\n return wrapRichText(text, {entities: nested, nested: true})\r\n}\r\nfunction wrapRichText (text, options = {}) {\r\n if(!text || !text.length) {\r\n return ''\r\n }\r\n\r\n var entities = options.entities;\r\n var contextSite = options.contextSite || 'Telegram';\r\n var contextExternal = contextSite != 'Telegram';\r\n var emojiFound = false;\r\n if(entities === undefined) {\r\n entities = parseEntities(text, options);\r\n }\r\n\r\n //console.log('wrapRichText got entities:', text, entities);\r\n var len = entities.length;\r\n var entity;\r\n var entityText;\r\n var skipEntity;\r\n var url;\r\n var html = [];\r\n var lastOffset = 0;\r\n var curEmojiSize = options.emojiIconSize || emojiIconSize;\r\n for(var i = 0; i < len; i++) {\r\n entity = entities[i];\r\n if(entity.offset > lastOffset) {\r\n html.push(\r\n encodeEntities(text.substr(lastOffset, entity.offset - lastOffset))\r\n );\r\n } else if(entity.offset < lastOffset) {\r\n continue;\r\n }\r\n\r\n skipEntity = false;\r\n entityText = text.substr(entity.offset, entity.length);\r\n switch(entity._) {\r\n case 'messageEntityMention':\r\n var contextUrl = !options.noLinks && siteMentions[contextSite]\r\n if (!contextUrl) {\r\n skipEntity = true\r\n break\r\n }\r\n var username = entityText.substr(1)\r\n var attr = ''\r\n if (options.highlightUsername &&\r\n options.highlightUsername.toLowerCase() == username.toLowerCase()) {\r\n attr = 'class=\"im_message_mymention\"'\r\n }\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityMentionName':\r\n if (options.noLinks) {\r\n skipEntity = true\r\n break\r\n }\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityHashtag':\r\n var contextUrl = !options.noLinks && siteHashtags[contextSite]\r\n if (!contextUrl) {\r\n skipEntity = true\r\n break\r\n }\r\n var hashtag = entityText.substr(1)\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityEmail':\r\n if (options.noLinks) {\r\n skipEntity = true\r\n break\r\n }\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityUrl':\r\n case 'messageEntityTextUrl':\r\n var inner\r\n if (entity._ == 'messageEntityTextUrl') {\r\n url = entity.url\r\n url = wrapUrl(url, true)\r\n inner = wrapRichNestedText(entityText, entity.nested, options)\r\n } else {\r\n url = wrapUrl(entityText, false)\r\n inner = encodeEntities(replaceUrlEncodings(entityText))\r\n }\r\n if (options.noLinks) {\r\n html.push(inner);\r\n } else {\r\n html.push(\r\n '',\r\n inner,\r\n ''\r\n )\r\n }\r\n break\r\n case 'messageEntityLinebreak':\r\n html.push(options.noLinebreaks ? ' ' : '
')\r\n break\r\n case 'messageEntityEmoji':\r\n \r\n /* var inner = `${encodeEntities(entityText)}`; */\r\n /* var inner = `\\u200B`; */\r\n\r\n /* if(emojiSupported) {\r\n html.push(encodeEntities(entityText));\r\n } else {\r\n *///html.push(`${emojiSupported ? encodeEntities(entityText) : inner}\\u200B`);\r\n //}\r\n\r\n inner = `\"${encodeEntities(entityText)}\"`;\r\n\r\n //html.push(`${emojiSupported ? encodeEntities(entityText) : inner}\\u200B`);\r\n\r\n html.push(emojiSupported ? `${encodeEntities(entityText)}` : inner);\r\n\r\n emojiFound = true;\r\n break\r\n case 'messageEntityBotCommand':\r\n if (options.noLinks || options.noCommands || contextExternal) {\r\n skipEntity = true\r\n break\r\n }\r\n var command = entityText.substr(1)\r\n var bot\r\n var atPos\r\n if ((atPos = command.indexOf('@')) != -1) {\r\n bot = command.substr(atPos + 1)\r\n command = command.substr(0, atPos)\r\n } else {\r\n bot = options.fromBot\r\n }\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityBold':\r\n if(options.noTextFormat) {\r\n html.push(wrapRichNestedText(entityText, entity.nested, options));\r\n break;\r\n }\r\n \r\n html.push(\r\n '',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n ''\r\n )\r\n break\r\n case 'messageEntityItalic':\r\n if(options.noTextFormat) {\r\n html.push(wrapRichNestedText(entityText, entity.nested, options));\r\n break;\r\n }\r\n\r\n html.push(\r\n '',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n ''\r\n )\r\n break\r\n case 'messageEntityHighlight':\r\n html.push(\r\n '',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n ''\r\n )\r\n break;\r\n case 'messageEntityCode':\r\n if(options.noTextFormat) {\r\n html.push(encodeEntities(entityText));\r\n break;\r\n }\r\n\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityPre':\r\n if(options.noTextFormat) {\r\n html.push(encodeEntities(entityText));\r\n break;\r\n }\r\n \r\n html.push(\r\n '
',\r\n          encodeEntities(entityText),\r\n          '
'\r\n )\r\n break\r\n default:\r\n skipEntity = true\r\n }\r\n lastOffset = entity.offset + (skipEntity ? 0 : entity.length)\r\n }\r\n\r\n html.push(encodeEntities(text.substr(lastOffset))); // may be empty string\r\n //console.log(html);\r\n text = html.join('')//$sanitize(html.join(''))\r\n /* if (!options.nested && (emojiFound || options.hasNested)) {\r\n text = text.replace(/\\ufe0f|️|�|‍/g, '', text)\r\n var emojiSizeClass = curEmojiSize == 18 ? '' : (' emoji-w' + curEmojiSize)\r\n text = text.replace(/]*)?) class=\"emoji emoji-(\\d)-(\\d+)-(\\d+)\"(.+?)<\\/span>/g,\r\n '')\r\n } */\r\n return text;//$sce.trustAs('html', text)\r\n}\r\nfunction wrapDraftText (text, options) {\r\n if (!text || !text.length) {\r\n return ''\r\n }\r\n options = options || {}\r\n var entities = options.entities\r\n if (entities === undefined) {\r\n entities = parseEntities(text, options)\r\n }\r\n var i = 0\r\n var len = entities.length\r\n var entity\r\n var entityText\r\n var skipEntity\r\n var code = []\r\n var lastOffset = 0\r\n for (i = 0; i < len; i++) {\r\n entity = entities[i]\r\n if (entity.offset > lastOffset) {\r\n code.push(\r\n text.substr(lastOffset, entity.offset - lastOffset)\r\n )\r\n }\r\n else if (entity.offset < lastOffset) {\r\n continue\r\n }\r\n skipEntity = false\r\n entityText = text.substr(entity.offset, entity.length)\r\n switch (entity._) {\r\n case 'messageEntityEmoji':\r\n code.push(\r\n ':',\r\n entity.title,\r\n ':'\r\n )\r\n break\r\n case 'messageEntityCode':\r\n code.push(\r\n '`', entityText, '`'\r\n )\r\n break\r\n case 'messageEntityBold':\r\n code.push(\r\n '**', entityText, '**'\r\n )\r\n break\r\n case 'messageEntityItalic':\r\n code.push(\r\n '__', entityText, '__'\r\n )\r\n break\r\n case 'messageEntityPre':\r\n code.push(\r\n '```', entityText, '```'\r\n )\r\n break\r\n case 'messageEntityMentionName':\r\n code.push(\r\n '@', entity.user_id, ' (', entityText, ')'\r\n )\r\n break\r\n default:\r\n skipEntity = true\r\n }\r\n lastOffset = entity.offset + (skipEntity ? 0 : entity.length)\r\n }\r\n code.push(text.substr(lastOffset))\r\n return code.join('')\r\n}\r\nfunction checkBrackets (url) {\r\n var urlLength = url.length\r\n var urlOpenBrackets = url.split('(').length - 1\r\n var urlCloseBrackets = url.split(')').length - 1\r\n while (urlCloseBrackets > urlOpenBrackets &&\r\n url.charAt(urlLength - 1) === ')') {\r\n url = url.substr(0, urlLength - 1)\r\n urlCloseBrackets--\r\n urlLength--\r\n }\r\n if (urlOpenBrackets > urlCloseBrackets) {\r\n url = url.replace(/\\)+$/, '')\r\n }\r\n return url\r\n}\r\n\r\nfunction replaceUrlEncodings(urlWithEncoded) {\r\n return urlWithEncoded.replace(/(%[A-Z\\d]{2})+/g, function (str) {\r\n try {\r\n return decodeURIComponent(str);\r\n } catch (e) {\r\n return str;\r\n }\r\n });\r\n}\r\n\r\nfunction wrapPlainText(text, options = {}) {\r\n if(emojiSupported) {\r\n return text;\r\n }\r\n\r\n if(!text || !text.length) {\r\n return '';\r\n }\r\n\r\n text = text.replace(/\\ufe0f/g, '', text);\r\n var match;\r\n var raw = text;\r\n var text = [],\r\n emojiTitle;\r\n while((match = raw.match(fullRegExp))) {\r\n text.push(raw.substr(0, match.index))\r\n if(match[8]) {\r\n if((emojiCode = EmojiHelper.emojiMap[match[8]]) &&\r\n (emojiTitle = emojiData[emojiCode][1][0])) {\r\n text.push(':' + emojiTitle + ':');\r\n } else {\r\n text.push(match[0]);\r\n }\r\n } else {\r\n text.push(match[0]);\r\n }\r\n\r\n raw = raw.substr(match.index + match[0].length);\r\n }\r\n text.push(raw);\r\n return text.join('');\r\n}\r\nfunction wrapEmojiText(text) {\r\n if(!text) return '';\r\n\r\n let entities = parseEntities(text).filter(e => e._ == 'messageEntityEmoji');\r\n return wrapRichText(text, {entities});\r\n}\r\nfunction wrapUrl (url, unsafe) {\r\n if (!url.match(/^https?:\\/\\//i)) {\r\n url = 'http://' + url\r\n }\r\n var tgMeMatch\r\n var telescoPeMatch\r\n if (unsafe == 2) {\r\n url = 'tg://unsafe_url?url=' + encodeURIComponent(url)\r\n }\r\n else if ((tgMeMatch = url.match(/^https?:\\/\\/t(?:elegram)?\\.me\\/(.+)/))) {\r\n var fullPath = tgMeMatch[1]\r\n var path = fullPath.split('/')\r\n switch (path[0]) {\r\n case 'joinchat':\r\n url = 'tg://join?invite=' + path[1]\r\n break\r\n case 'addstickers':\r\n url = 'tg://addstickers?set=' + path[1]\r\n break\r\n default:\r\n if (path[1] && path[1].match(/^\\d+$/)) {\r\n url = 'tg://resolve?domain=' + path[0] + '&post=' + path[1]\r\n }\r\n else if (path.length == 1) {\r\n var domainQuery = path[0].split('?')\r\n var domain = domainQuery[0]\r\n var query = domainQuery[1]\r\n if (domain == 'iv') {\r\n var match = (query || '').match(/url=([^&=]+)/)\r\n if (match) {\r\n url = match[1]\r\n try {\r\n url = decodeURIComponent(url)\r\n } catch (e) {}\r\n return wrapUrl(url, unsafe)\r\n }\r\n }\r\n url = 'tg://resolve?domain=' + domain + (query ? '&' + query : '')\r\n }\r\n }\r\n }\r\n else if ((telescoPeMatch = url.match(/^https?:\\/\\/telesco\\.pe\\/([^/?]+)\\/(\\d+)/))) {\r\n url = 'tg://resolve?domain=' + telescoPeMatch[1] + '&post=' + telescoPeMatch[2]\r\n }\r\n else if (unsafe) {\r\n url = 'tg://unsafe_url?url=' + encodeURIComponent(url)\r\n }\r\n return url\r\n}\r\n\r\nlet RichTextProcessor = {\r\n wrapRichText: wrapRichText,\r\n wrapPlainText: wrapPlainText,\r\n wrapDraftText: wrapDraftText,\r\n wrapUrl: wrapUrl,\r\n wrapEmojiText: wrapEmojiText,\r\n parseEntities: parseEntities,\r\n parseMarkdown: parseMarkdown,\r\n parseEmojis: parseEmojis,\r\n mergeEntities: mergeEntities,\r\n getEmojiSpritesheetCoords: getEmojiSpritesheetCoords,\r\n emojiSupported: emojiSupported\r\n};\r\n\r\nwindow.RichTextProcessor = RichTextProcessor;\r\n\r\nexport {RichTextProcessor};\r\n\r\n" }, { "id": 3, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/richtextprocessor.js", - "name": "./src/lib/richtextprocessor.js", - "index": 52, - "index2": 50, - "size": 38942, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\misc.ts", + "name": "./src/components/misc.ts", + "index": 21, + "index2": 21, + "size": 11511, "cacheable": true, "built": true, "optional": false, @@ -1359,33 +1307,33 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "issuerId": 40, - "issuerName": "./src/components/pageSignIn.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "issuerId": 35, + "issuerName": "./src/pages/pageSignIn.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } } ], "profile": { - "factory": 392, - "building": 505, + "factory": 527, + "building": 1006, "dependencies": 2 }, "failed": false, @@ -1393,150 +1341,139 @@ "warnings": 0, "assets": [], "reasons": [ - { - "moduleId": 4, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "7:28-59" - }, - { - "moduleId": 10, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "9:28-59" - }, { "moduleId": 12, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appChatsManager.ts", - "module": "./src/lib/appManagers/appChatsManager.ts", - "moduleName": "./src/lib/appManagers/appChatsManager.ts", - "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "7:28-59" - }, - { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "19:28-59" + "userRequest": "../../components/misc", + "loc": "26:15-47" }, { - "moduleId": 18, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "17:28-59" + "userRequest": "../../components/misc", + "loc": "27:15-47" }, { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", + "moduleId": 23, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "module": "./src/pages/pageIm.ts", + "moduleName": "./src/pages/pageIm.ts", "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "30:28-59" + "userRequest": "../components/misc", + "loc": "13:15-44" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", + "moduleId": 26, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", "module": "./src/lib/appManagers/appDialogsManager.ts", "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "22:28-59" + "userRequest": "../../components/misc", + "loc": "21:15-47" }, { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", "module": "./src/components/wrappers.ts", "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "25:28-63" + "userRequest": "./misc", + "loc": "34:15-32" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "11:28-59" + "userRequest": "../../components/misc", + "loc": "15:15-47" }, { - "moduleId": 40, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "module": "./src/components/pageSignIn.ts", - "moduleName": "./src/components/pageSignIn.ts", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "15:28-63" + "userRequest": "../components/misc", + "loc": "6:15-44" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", "module": "./src/lib/appManagers/appSidebarRight.ts", "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "14:28-59" + "userRequest": "../../components/misc", + "loc": "13:15-47" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 41, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "module": "./src/components/appSearch.ts", + "moduleName": "./src/components/appSearch.ts", "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "10:28-59" + "userRequest": "./misc", + "loc": "13:15-32" }, { - "moduleId": 49, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appWebPagesManager.ts", - "module": "./src/lib/appManagers/appWebPagesManager.ts", - "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", + "moduleId": 63, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "module": "./src/pages/pageSignUp.ts", + "moduleName": "./src/pages/pageSignUp.ts", "type": "cjs require", - "userRequest": "../richtextprocessor", - "loc": "9:28-59" + "userRequest": "../components/misc", + "loc": "6:15-44" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", + "moduleId": 65, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagesManager.ts", + "module": "./src/pages/pagesManager.ts", + "moduleName": "./src/pages/pagesManager.ts", + "type": "cjs require", + "userRequest": "../components/misc", + "loc": "7:15-44" + }, + { + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", "module": "./src/components/emoticonsDropdown.ts", "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "../lib/richtextprocessor", - "loc": "19:28-63" + "userRequest": "./misc", + "loc": "15:15-32" + }, + { + "moduleId": 74, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagePassword.ts", + "module": "./src/pages/pagePassword.ts", + "moduleName": "./src/pages/pagePassword.ts", + "type": "cjs require", + "userRequest": "../components/misc", + "loc": "9:15-44" } ], "usedExports": true, - "providedExports": [ - "RichTextProcessor" - ], + "providedExports": null, "optimizationBailout": [ - "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/components/emoticonsDropdown.ts (referenced with cjs require), ./src/components/pageSignIn.ts (referenced with cjs require), ./src/components/wrappers.ts (referenced with cjs require), ./src/lib/appManagers/appChatsManager.ts (referenced with cjs require), ./src/lib/appManagers/appDialogsManager.ts (referenced with cjs require), ./src/lib/appManagers/appDocsManager.ts (referenced with cjs require), ./src/lib/appManagers/appImManager.ts (referenced with cjs require), ./src/lib/appManagers/appMediaViewer.ts (referenced with cjs require), ./src/lib/appManagers/appMessagesManager.ts (referenced with cjs require), ./src/lib/appManagers/appPeersManager.ts (referenced with cjs require), ./src/lib/appManagers/appProfileManager.ts (referenced with cjs require), ./src/lib/appManagers/appSidebarRight.ts (referenced with cjs require), ./src/lib/appManagers/appUsersManager.ts (referenced with cjs require), ./src/lib/appManagers/appWebPagesManager.ts (referenced with cjs require)" + "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2, - "source": "import {encodeEntities, copy/* , emojiUnicode */} from './utils';\r\n\r\nvar EmojiHelper = {\r\n emojiMap: (code) => { return code; },\r\n shortcuts: [],\r\n emojis: []\r\n};\r\n\r\nvar emojiData = Config.Emoji;\r\nvar emojiIconSize = emojiData.img_size;\r\nvar emojiSupported = navigator.userAgent.search(/OS X|iPhone|iPad|iOS|Android/i) != -1/* && false */,\r\n emojiCode;\r\n//var emojiRegExp = '\\\\u0023\\\\u20E3|\\\\u00a9|\\\\u00ae|\\\\u203c|\\\\u2049|\\\\u2139|[\\\\u2194-\\\\u2199]|\\\\u21a9|\\\\u21aa|\\\\u231a|\\\\u231b|\\\\u23e9|[\\\\u23ea-\\\\u23ec]|\\\\u23f0|\\\\u24c2|\\\\u25aa|\\\\u25ab|\\\\u25b6|\\\\u2611|\\\\u2614|\\\\u26fd|\\\\u2705|\\\\u2709|[\\\\u2795-\\\\u2797]|\\\\u27a1|\\\\u27b0|\\\\u27bf|\\\\u2934|\\\\u2935|[\\\\u2b05-\\\\u2b07]|\\\\u2b1b|\\\\u2b1c|\\\\u2b50|\\\\u2b55|\\\\u3030|\\\\u303d|\\\\u3297|\\\\u3299|[\\\\uE000-\\\\uF8FF\\\\u270A-\\\\u2764\\\\u2122\\\\u25C0\\\\u25FB-\\\\u25FE\\\\u2615\\\\u263a\\\\u2648-\\\\u2653\\\\u2660-\\\\u2668\\\\u267B\\\\u267F\\\\u2693\\\\u261d\\\\u26A0-\\\\u26FA\\\\u2708\\\\u2702\\\\u2601\\\\u260E]|[\\\\u2600\\\\u26C4\\\\u26BE\\\\u23F3\\\\u2764]|\\\\uD83D[\\\\uDC00-\\\\uDFFF]|\\\\uD83C[\\\\uDDE8-\\\\uDDFA\\uDDEC]\\\\uD83C[\\\\uDDEA-\\\\uDDFA\\uDDE7]|[0-9]\\\\u20e3|\\\\uD83C[\\\\uDC00-\\\\uDFFF]';\r\n//var emojiRegExp = '\\\\u00a9|\\\\u00ae|[\\\\u2000-\\\\u3300]|\\\\ud83c[\\\\ud000-\\\\udfff]|\\\\ud83d[\\\\ud000-\\\\udfff]|\\\\ud83e[\\\\ud000-\\\\udfff]';\r\nvar emojiRegExp = '\\\\uD83C\\\\uDFF4\\\\uDB40\\\\uDC67\\\\uDB40\\\\uDC62(?:\\\\uDB40\\\\uDC77\\\\uDB40\\\\uDC6C\\\\uDB40\\\\uDC73|\\\\uDB40\\\\uDC73\\\\uDB40\\\\uDC63\\\\uDB40\\\\uDC74|\\\\uDB40\\\\uDC65\\\\uDB40\\\\uDC6E\\\\uDB40\\\\uDC67)\\\\uDB40\\\\uDC7F|(?:\\\\uD83E\\\\uDDD1\\\\uD83C\\\\uDFFB\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1|\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFC\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC69)\\\\uD83C\\\\uDFFB|\\\\uD83D\\\\uDC68(?:\\\\uD83C\\\\uDFFC\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68\\\\uD83C\\\\uDFFB|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFF\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFE])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFE\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFD])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFD\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB\\\\uDFFC])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\u200D(?:\\\\u2764\\\\uFE0F\\\\u200D(?:\\\\uD83D\\\\uDC8B\\\\u200D)?\\\\uD83D\\\\uDC68|(?:\\\\uD83D[\\\\uDC68\\\\uDC69])\\\\u200D(?:\\\\uD83D\\\\uDC66\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC67\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67]))|\\\\uD83D\\\\uDC66\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC67\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67])|(?:\\\\uD83D[\\\\uDC68\\\\uDC69])\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67])|[\\\\u2695\\\\u2696\\\\u2708]\\\\uFE0F|\\\\uD83D[\\\\uDC66\\\\uDC67]|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|(?:\\\\uD83C\\\\uDFFB\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFF\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFE\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFD\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFC\\\\u200D[\\\\u2695\\\\u2696\\\\u2708])\\\\uFE0F|\\\\uD83C\\\\uDFFB\\\\u200D(?:\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|\\\\uD83E\\\\uDDD1(?:\\\\uD83C\\\\uDFFF\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1)|\\\\uD83D\\\\uDC69(?:\\\\uD83C\\\\uDFFE\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFD\\\\uDFFF])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFD\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB\\\\uDFFC\\\\uDFFE\\\\uDFFF])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFC\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFB\\\\uDFFD-\\\\uDFFF])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFB\\\\u200D(?:\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC68(?:\\\\uD83C[\\\\uDFFC-\\\\uDFFF])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\u200D(?:\\\\u2764\\\\uFE0F\\\\u200D(?:\\\\uD83D\\\\uDC8B\\\\u200D(?:\\\\uD83D[\\\\uDC68\\\\uDC69])|\\\\uD83D[\\\\uDC68\\\\uDC69])|\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD])|\\\\uD83C\\\\uDFFF\\\\u200D(?:\\\\uD83C[\\\\uDF3E\\\\uDF73\\\\uDF93\\\\uDFA4\\\\uDFA8\\\\uDFEB\\\\uDFED]|\\\\uD83D[\\\\uDCBB\\\\uDCBC\\\\uDD27\\\\uDD2C\\\\uDE80\\\\uDE92]|\\\\uD83E[\\\\uDDAF-\\\\uDDB3\\\\uDDBC\\\\uDDBD]))|(?:\\\\uD83E\\\\uDDD1\\\\uD83C\\\\uDFFE\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1|\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFF\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D(?:\\\\uD83D[\\\\uDC68\\\\uDC69]))(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFE])|(?:\\\\uD83E\\\\uDDD1\\\\uD83C\\\\uDFFD\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1|\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFE\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC69)(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFD])|(?:\\\\uD83E\\\\uDDD1\\\\uD83C\\\\uDFFC\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83E\\\\uDDD1|\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFD\\\\u200D\\\\uD83E\\\\uDD1D\\\\u200D\\\\uD83D\\\\uDC69)(?:\\\\uD83C[\\\\uDFFB\\\\uDFFC])|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC69\\\\u200D(?:\\\\uD83D\\\\uDC66\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC67\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67]))|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC66\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC69\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67])|(?:\\\\uD83D\\\\uDC41\\\\uFE0F\\\\u200D\\\\uD83D\\\\uDDE8|\\\\uD83D\\\\uDC69(?:\\\\uD83C\\\\uDFFF\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFE\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFD\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFC\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\uD83C\\\\uDFFB\\\\u200D[\\\\u2695\\\\u2696\\\\u2708]|\\\\u200D[\\\\u2695\\\\u2696\\\\u2708])|(?:\\\\uD83C[\\\\uDFC3\\\\uDFC4\\\\uDFCA]|\\\\uD83D[\\\\uDC6E\\\\uDC71\\\\uDC73\\\\uDC77\\\\uDC81\\\\uDC82\\\\uDC86\\\\uDC87\\\\uDE45-\\\\uDE47\\\\uDE4B\\\\uDE4D\\\\uDE4E\\\\uDEA3\\\\uDEB4-\\\\uDEB6]|\\\\uD83E[\\\\uDD26\\\\uDD37-\\\\uDD39\\\\uDD3D\\\\uDD3E\\\\uDDB8\\\\uDDB9\\\\uDDCD-\\\\uDDCF\\\\uDDD6-\\\\uDDDD])(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])\\\\u200D[\\\\u2640\\\\u2642]|(?:\\\\u26F9|\\\\uD83C[\\\\uDFCB\\\\uDFCC]|\\\\uD83D\\\\uDD75)(?:\\\\uFE0F\\\\u200D[\\\\u2640\\\\u2642]|(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])\\\\u200D[\\\\u2640\\\\u2642])|\\\\uD83C\\\\uDFF4\\\\u200D\\\\u2620|(?:\\\\uD83C[\\\\uDFC3\\\\uDFC4\\\\uDFCA]|\\\\uD83D[\\\\uDC6E\\\\uDC6F\\\\uDC71\\\\uDC73\\\\uDC77\\\\uDC81\\\\uDC82\\\\uDC86\\\\uDC87\\\\uDE45-\\\\uDE47\\\\uDE4B\\\\uDE4D\\\\uDE4E\\\\uDEA3\\\\uDEB4-\\\\uDEB6]|\\\\uD83E[\\\\uDD26\\\\uDD37-\\\\uDD39\\\\uDD3C-\\\\uDD3E\\\\uDDB8\\\\uDDB9\\\\uDDCD-\\\\uDDCF\\\\uDDD6-\\\\uDDDF])\\\\u200D[\\\\u2640\\\\u2642])\\\\uFE0F|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC67\\\\u200D(?:\\\\uD83D[\\\\uDC66\\\\uDC67])|\\\\uD83C\\\\uDFF3\\\\uFE0F\\\\u200D\\\\uD83C\\\\uDF08|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC67|\\\\uD83D\\\\uDC69\\\\u200D\\\\uD83D\\\\uDC66|\\\\uD83D\\\\uDC15\\\\u200D\\\\uD83E\\\\uDDBA|\\\\uD83C\\\\uDDFD\\\\uD83C\\\\uDDF0|\\\\uD83C\\\\uDDF6\\\\uD83C\\\\uDDE6|\\\\uD83C\\\\uDDF4\\\\uD83C\\\\uDDF2|\\\\uD83E\\\\uDDD1(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|\\\\uD83D\\\\uDC69(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|\\\\uD83C\\\\uDDFF(?:\\\\uD83C[\\\\uDDE6\\\\uDDF2\\\\uDDFC])|\\\\uD83C\\\\uDDFE(?:\\\\uD83C[\\\\uDDEA\\\\uDDF9])|\\\\uD83C\\\\uDDFC(?:\\\\uD83C[\\\\uDDEB\\\\uDDF8])|\\\\uD83C\\\\uDDFB(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDEA\\\\uDDEC\\\\uDDEE\\\\uDDF3\\\\uDDFA])|\\\\uD83C\\\\uDDFA(?:\\\\uD83C[\\\\uDDE6\\\\uDDEC\\\\uDDF2\\\\uDDF3\\\\uDDF8\\\\uDDFE\\\\uDDFF])|\\\\uD83C\\\\uDDF9(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDE9\\\\uDDEB-\\\\uDDED\\\\uDDEF-\\\\uDDF4\\\\uDDF7\\\\uDDF9\\\\uDDFB\\\\uDDFC\\\\uDDFF])|\\\\uD83C\\\\uDDF8(?:\\\\uD83C[\\\\uDDE6-\\\\uDDEA\\\\uDDEC-\\\\uDDF4\\\\uDDF7-\\\\uDDF9\\\\uDDFB\\\\uDDFD-\\\\uDDFF])|\\\\uD83C\\\\uDDF7(?:\\\\uD83C[\\\\uDDEA\\\\uDDF4\\\\uDDF8\\\\uDDFA\\\\uDDFC])|\\\\uD83C\\\\uDDF5(?:\\\\uD83C[\\\\uDDE6\\\\uDDEA-\\\\uDDED\\\\uDDF0-\\\\uDDF3\\\\uDDF7-\\\\uDDF9\\\\uDDFC\\\\uDDFE])|\\\\uD83C\\\\uDDF3(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDEA-\\\\uDDEC\\\\uDDEE\\\\uDDF1\\\\uDDF4\\\\uDDF5\\\\uDDF7\\\\uDDFA\\\\uDDFF])|\\\\uD83C\\\\uDDF2(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8-\\\\uDDED\\\\uDDF0-\\\\uDDFF])|\\\\uD83C\\\\uDDF1(?:\\\\uD83C[\\\\uDDE6-\\\\uDDE8\\\\uDDEE\\\\uDDF0\\\\uDDF7-\\\\uDDFB\\\\uDDFE])|\\\\uD83C\\\\uDDF0(?:\\\\uD83C[\\\\uDDEA\\\\uDDEC-\\\\uDDEE\\\\uDDF2\\\\uDDF3\\\\uDDF5\\\\uDDF7\\\\uDDFC\\\\uDDFE\\\\uDDFF])|\\\\uD83C\\\\uDDEF(?:\\\\uD83C[\\\\uDDEA\\\\uDDF2\\\\uDDF4\\\\uDDF5])|\\\\uD83C\\\\uDDEE(?:\\\\uD83C[\\\\uDDE8-\\\\uDDEA\\\\uDDF1-\\\\uDDF4\\\\uDDF6-\\\\uDDF9])|\\\\uD83C\\\\uDDED(?:\\\\uD83C[\\\\uDDF0\\\\uDDF2\\\\uDDF3\\\\uDDF7\\\\uDDF9\\\\uDDFA])|\\\\uD83C\\\\uDDEC(?:\\\\uD83C[\\\\uDDE6\\\\uDDE7\\\\uDDE9-\\\\uDDEE\\\\uDDF1-\\\\uDDF3\\\\uDDF5-\\\\uDDFA\\\\uDDFC\\\\uDDFE])|\\\\uD83C\\\\uDDEB(?:\\\\uD83C[\\\\uDDEE-\\\\uDDF0\\\\uDDF2\\\\uDDF4\\\\uDDF7])|\\\\uD83C\\\\uDDEA(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDEA\\\\uDDEC\\\\uDDED\\\\uDDF7-\\\\uDDFA])|\\\\uD83C\\\\uDDE9(?:\\\\uD83C[\\\\uDDEA\\\\uDDEC\\\\uDDEF\\\\uDDF0\\\\uDDF2\\\\uDDF4\\\\uDDFF])|\\\\uD83C\\\\uDDE8(?:\\\\uD83C[\\\\uDDE6\\\\uDDE8\\\\uDDE9\\\\uDDEB-\\\\uDDEE\\\\uDDF0-\\\\uDDF5\\\\uDDF7\\\\uDDFA-\\\\uDDFF])|\\\\uD83C\\\\uDDE7(?:\\\\uD83C[\\\\uDDE6\\\\uDDE7\\\\uDDE9-\\\\uDDEF\\\\uDDF1-\\\\uDDF4\\\\uDDF6-\\\\uDDF9\\\\uDDFB\\\\uDDFC\\\\uDDFE\\\\uDDFF])|\\\\uD83C\\\\uDDE6(?:\\\\uD83C[\\\\uDDE8-\\\\uDDEC\\\\uDDEE\\\\uDDF1\\\\uDDF2\\\\uDDF4\\\\uDDF6-\\\\uDDFA\\\\uDDFC\\\\uDDFD\\\\uDDFF])|[#\\\\*0-9]\\\\uFE0F\\\\u20E3|(?:\\\\uD83C[\\\\uDFC3\\\\uDFC4\\\\uDFCA]|\\\\uD83D[\\\\uDC6E\\\\uDC71\\\\uDC73\\\\uDC77\\\\uDC81\\\\uDC82\\\\uDC86\\\\uDC87\\\\uDE45-\\\\uDE47\\\\uDE4B\\\\uDE4D\\\\uDE4E\\\\uDEA3\\\\uDEB4-\\\\uDEB6]|\\\\uD83E[\\\\uDD26\\\\uDD37-\\\\uDD39\\\\uDD3D\\\\uDD3E\\\\uDDB8\\\\uDDB9\\\\uDDCD-\\\\uDDCF\\\\uDDD6-\\\\uDDDD])(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|(?:\\\\u26F9|\\\\uD83C[\\\\uDFCB\\\\uDFCC]|\\\\uD83D\\\\uDD75)(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|(?:[\\\\u261D\\\\u270A-\\\\u270D]|\\\\uD83C[\\\\uDF85\\\\uDFC2\\\\uDFC7]|\\\\uD83D[\\\\uDC42\\\\uDC43\\\\uDC46-\\\\uDC50\\\\uDC66\\\\uDC67\\\\uDC6B-\\\\uDC6D\\\\uDC70\\\\uDC72\\\\uDC74-\\\\uDC76\\\\uDC78\\\\uDC7C\\\\uDC83\\\\uDC85\\\\uDCAA\\\\uDD74\\\\uDD7A\\\\uDD90\\\\uDD95\\\\uDD96\\\\uDE4C\\\\uDE4F\\\\uDEC0\\\\uDECC]|\\\\uD83E[\\\\uDD0F\\\\uDD18-\\\\uDD1C\\\\uDD1E\\\\uDD1F\\\\uDD30-\\\\uDD36\\\\uDDB5\\\\uDDB6\\\\uDDBB\\\\uDDD2-\\\\uDDD5])(?:\\\\uD83C[\\\\uDFFB-\\\\uDFFF])|(?:[\\\\u231A\\\\u231B\\\\u23E9-\\\\u23EC\\\\u23F0\\\\u23F3\\\\u25FD\\\\u25FE\\\\u2614\\\\u2615\\\\u2648-\\\\u2653\\\\u267F\\\\u2693\\\\u26A1\\\\u26AA\\\\u26AB\\\\u26BD\\\\u26BE\\\\u26C4\\\\u26C5\\\\u26CE\\\\u26D4\\\\u26EA\\\\u26F2\\\\u26F3\\\\u26F5\\\\u26FA\\\\u26FD\\\\u2705\\\\u270A\\\\u270B\\\\u2728\\\\u274C\\\\u274E\\\\u2753-\\\\u2755\\\\u2757\\\\u2795-\\\\u2797\\\\u27B0\\\\u27BF\\\\u2B1B\\\\u2B1C\\\\u2B50\\\\u2B55]|\\\\uD83C[\\\\uDC04\\\\uDCCF\\\\uDD8E\\\\uDD91-\\\\uDD9A\\\\uDDE6-\\\\uDDFF\\\\uDE01\\\\uDE1A\\\\uDE2F\\\\uDE32-\\\\uDE36\\\\uDE38-\\\\uDE3A\\\\uDE50\\\\uDE51\\\\uDF00-\\\\uDF20\\\\uDF2D-\\\\uDF35\\\\uDF37-\\\\uDF7C\\\\uDF7E-\\\\uDF93\\\\uDFA0-\\\\uDFCA\\\\uDFCF-\\\\uDFD3\\\\uDFE0-\\\\uDFF0\\\\uDFF4\\\\uDFF8-\\\\uDFFF]|\\\\uD83D[\\\\uDC00-\\\\uDC3E\\\\uDC40\\\\uDC42-\\\\uDCFC\\\\uDCFF-\\\\uDD3D\\\\uDD4B-\\\\uDD4E\\\\uDD50-\\\\uDD67\\\\uDD7A\\\\uDD95\\\\uDD96\\\\uDDA4\\\\uDDFB-\\\\uDE4F\\\\uDE80-\\\\uDEC5\\\\uDECC\\\\uDED0-\\\\uDED2\\\\uDED5\\\\uDEEB\\\\uDEEC\\\\uDEF4-\\\\uDEFA\\\\uDFE0-\\\\uDFEB]|\\\\uD83E[\\\\uDD0D-\\\\uDD3A\\\\uDD3C-\\\\uDD45\\\\uDD47-\\\\uDD71\\\\uDD73-\\\\uDD76\\\\uDD7A-\\\\uDDA2\\\\uDDA5-\\\\uDDAA\\\\uDDAE-\\\\uDDCA\\\\uDDCD-\\\\uDDFF\\\\uDE70-\\\\uDE73\\\\uDE78-\\\\uDE7A\\\\uDE80-\\\\uDE82\\\\uDE90-\\\\uDE95])|(?:[#\\\\*0-9\\\\xA9\\\\xAE\\\\u203C\\\\u2049\\\\u2122\\\\u2139\\\\u2194-\\\\u2199\\\\u21A9\\\\u21AA\\\\u231A\\\\u231B\\\\u2328\\\\u23CF\\\\u23E9-\\\\u23F3\\\\u23F8-\\\\u23FA\\\\u24C2\\\\u25AA\\\\u25AB\\\\u25B6\\\\u25C0\\\\u25FB-\\\\u25FE\\\\u2600-\\\\u2604\\\\u260E\\\\u2611\\\\u2614\\\\u2615\\\\u2618\\\\u261D\\\\u2620\\\\u2622\\\\u2623\\\\u2626\\\\u262A\\\\u262E\\\\u262F\\\\u2638-\\\\u263A\\\\u2640\\\\u2642\\\\u2648-\\\\u2653\\\\u265F\\\\u2660\\\\u2663\\\\u2665\\\\u2666\\\\u2668\\\\u267B\\\\u267E\\\\u267F\\\\u2692-\\\\u2697\\\\u2699\\\\u269B\\\\u269C\\\\u26A0\\\\u26A1\\\\u26AA\\\\u26AB\\\\u26B0\\\\u26B1\\\\u26BD\\\\u26BE\\\\u26C4\\\\u26C5\\\\u26C8\\\\u26CE\\\\u26CF\\\\u26D1\\\\u26D3\\\\u26D4\\\\u26E9\\\\u26EA\\\\u26F0-\\\\u26F5\\\\u26F7-\\\\u26FA\\\\u26FD\\\\u2702\\\\u2705\\\\u2708-\\\\u270D\\\\u270F\\\\u2712\\\\u2714\\\\u2716\\\\u271D\\\\u2721\\\\u2728\\\\u2733\\\\u2734\\\\u2744\\\\u2747\\\\u274C\\\\u274E\\\\u2753-\\\\u2755\\\\u2757\\\\u2763\\\\u2764\\\\u2795-\\\\u2797\\\\u27A1\\\\u27B0\\\\u27BF\\\\u2934\\\\u2935\\\\u2B05-\\\\u2B07\\\\u2B1B\\\\u2B1C\\\\u2B50\\\\u2B55\\\\u3030\\\\u303D\\\\u3297\\\\u3299]|\\\\uD83C[\\\\uDC04\\\\uDCCF\\\\uDD70\\\\uDD71\\\\uDD7E\\\\uDD7F\\\\uDD8E\\\\uDD91-\\\\uDD9A\\\\uDDE6-\\\\uDDFF\\\\uDE01\\\\uDE02\\\\uDE1A\\\\uDE2F\\\\uDE32-\\\\uDE3A\\\\uDE50\\\\uDE51\\\\uDF00-\\\\uDF21\\\\uDF24-\\\\uDF93\\\\uDF96\\\\uDF97\\\\uDF99-\\\\uDF9B\\\\uDF9E-\\\\uDFF0\\\\uDFF3-\\\\uDFF5\\\\uDFF7-\\\\uDFFF]|\\\\uD83D[\\\\uDC00-\\\\uDCFD\\\\uDCFF-\\\\uDD3D\\\\uDD49-\\\\uDD4E\\\\uDD50-\\\\uDD67\\\\uDD6F\\\\uDD70\\\\uDD73-\\\\uDD7A\\\\uDD87\\\\uDD8A-\\\\uDD8D\\\\uDD90\\\\uDD95\\\\uDD96\\\\uDDA4\\\\uDDA5\\\\uDDA8\\\\uDDB1\\\\uDDB2\\\\uDDBC\\\\uDDC2-\\\\uDDC4\\\\uDDD1-\\\\uDDD3\\\\uDDDC-\\\\uDDDE\\\\uDDE1\\\\uDDE3\\\\uDDE8\\\\uDDEF\\\\uDDF3\\\\uDDFA-\\\\uDE4F\\\\uDE80-\\\\uDEC5\\\\uDECB-\\\\uDED2\\\\uDED5\\\\uDEE0-\\\\uDEE5\\\\uDEE9\\\\uDEEB\\\\uDEEC\\\\uDEF0\\\\uDEF3-\\\\uDEFA\\\\uDFE0-\\\\uDFEB]|\\\\uD83E[\\\\uDD0D-\\\\uDD3A\\\\uDD3C-\\\\uDD45\\\\uDD47-\\\\uDD71\\\\uDD73-\\\\uDD76\\\\uDD7A-\\\\uDDA2\\\\uDDA5-\\\\uDDAA\\\\uDDAE-\\\\uDDCA\\\\uDDCD-\\\\uDDFF\\\\uDE70-\\\\uDE73\\\\uDE78-\\\\uDE7A\\\\uDE80-\\\\uDE82\\\\uDE90-\\\\uDE95])\\\\uFE0F|(?:[\\\\u261D\\\\u26F9\\\\u270A-\\\\u270D]|\\\\uD83C[\\\\uDF85\\\\uDFC2-\\\\uDFC4\\\\uDFC7\\\\uDFCA-\\\\uDFCC]|\\\\uD83D[\\\\uDC42\\\\uDC43\\\\uDC46-\\\\uDC50\\\\uDC66-\\\\uDC78\\\\uDC7C\\\\uDC81-\\\\uDC83\\\\uDC85-\\\\uDC87\\\\uDC8F\\\\uDC91\\\\uDCAA\\\\uDD74\\\\uDD75\\\\uDD7A\\\\uDD90\\\\uDD95\\\\uDD96\\\\uDE45-\\\\uDE47\\\\uDE4B-\\\\uDE4F\\\\uDEA3\\\\uDEB4-\\\\uDEB6\\\\uDEC0\\\\uDECC]|\\\\uD83E[\\\\uDD0F\\\\uDD18-\\\\uDD1F\\\\uDD26\\\\uDD30-\\\\uDD39\\\\uDD3C-\\\\uDD3E\\\\uDDB5\\\\uDDB6\\\\uDDB8\\\\uDDB9\\\\uDDBB\\\\uDDCD-\\\\uDDCF\\\\uDDD1-\\\\uDDDD])';\r\nvar alphaCharsRegExp = 'a-z' +\r\n '\\\\u00c0-\\\\u00d6\\\\u00d8-\\\\u00f6\\\\u00f8-\\\\u00ff' + // Latin-1\r\n '\\\\u0100-\\\\u024f' + // Latin Extended A and B\r\n '\\\\u0253\\\\u0254\\\\u0256\\\\u0257\\\\u0259\\\\u025b\\\\u0263\\\\u0268\\\\u026f\\\\u0272\\\\u0289\\\\u028b' + // IPA Extensions\r\n '\\\\u02bb' + // Hawaiian\r\n '\\\\u0300-\\\\u036f' + // Combining diacritics\r\n '\\\\u1e00-\\\\u1eff' + // Latin Extended Additional (mostly for Vietnamese)\r\n '\\\\u0400-\\\\u04ff\\\\u0500-\\\\u0527' + // Cyrillic\r\n '\\\\u2de0-\\\\u2dff\\\\ua640-\\\\ua69f' + // Cyrillic Extended A/B\r\n '\\\\u0591-\\\\u05bf\\\\u05c1-\\\\u05c2\\\\u05c4-\\\\u05c5\\\\u05c7' +\r\n '\\\\u05d0-\\\\u05ea\\\\u05f0-\\\\u05f4' + // Hebrew\r\n '\\\\ufb1d-\\\\ufb28\\\\ufb2a-\\\\ufb36\\\\ufb38-\\\\ufb3c\\\\ufb3e\\\\ufb40-\\\\ufb41' +\r\n '\\\\ufb43-\\\\ufb44\\\\ufb46-\\\\ufb4f' + // Hebrew Pres. Forms\r\n '\\\\u0610-\\\\u061a\\\\u0620-\\\\u065f\\\\u066e-\\\\u06d3\\\\u06d5-\\\\u06dc' +\r\n '\\\\u06de-\\\\u06e8\\\\u06ea-\\\\u06ef\\\\u06fa-\\\\u06fc\\\\u06ff' + // Arabic\r\n '\\\\u0750-\\\\u077f\\\\u08a0\\\\u08a2-\\\\u08ac\\\\u08e4-\\\\u08fe' + // Arabic Supplement and Extended A\r\n '\\\\ufb50-\\\\ufbb1\\\\ufbd3-\\\\ufd3d\\\\ufd50-\\\\ufd8f\\\\ufd92-\\\\ufdc7\\\\ufdf0-\\\\ufdfb' + // Pres. Forms A\r\n '\\\\ufe70-\\\\ufe74\\\\ufe76-\\\\ufefc' + // Pres. Forms B\r\n '\\\\u200c' + // Zero-Width Non-Joiner\r\n '\\\\u0e01-\\\\u0e3a\\\\u0e40-\\\\u0e4e' + // Thai\r\n '\\\\u1100-\\\\u11ff\\\\u3130-\\\\u3185\\\\uA960-\\\\uA97F\\\\uAC00-\\\\uD7AF\\\\uD7B0-\\\\uD7FF' + // Hangul (Korean)\r\n '\\\\u3003\\\\u3005\\\\u303b' + // Kanji/Han iteration marks\r\n '\\\\uff21-\\\\uff3a\\\\uff41-\\\\uff5a' + // full width Alphabet\r\n '\\\\uff66-\\\\uff9f' + // half width Katakana\r\n '\\\\uffa1-\\\\uffdc'; // half width Hangul (Korean)\r\nvar alphaNumericRegExp = '0-9\\_' + alphaCharsRegExp;\r\nvar domainAddChars = '\\u00b7';\r\n// Based on Regular Expression for URL validation by Diego Perini\r\nvar urlRegExp = '((?:https?|ftp)://|mailto:)?' +\r\n // user:pass authentication\r\n '(?:\\\\S{1,64}(?::\\\\S{0,64})?@)?' +\r\n '(?:' +\r\n // sindresorhus/ip-regexp\r\n '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}' +\r\n '|' +\r\n // host name\r\n '[' + alphaCharsRegExp + '0-9][' + alphaCharsRegExp + domainAddChars + '0-9\\-]{0,64}' +\r\n // domain name\r\n '(?:\\\\.[' + alphaCharsRegExp + '0-9][' + alphaCharsRegExp + domainAddChars + '0-9\\-]{0,64}){0,10}' +\r\n // TLD identifier\r\n '(?:\\\\.(xn--[0-9a-z]{2,16}|[' + alphaCharsRegExp + ']{2,24}))' +\r\n ')' +\r\n // port number\r\n '(?::\\\\d{2,5})?' +\r\n // resource path\r\n '(?:/(?:\\\\S{0,255}[^\\\\s.;,(\\\\[\\\\]{}<>\"\\'])?)?'\r\nvar usernameRegExp = '[a-zA-Z\\\\d_]{5,32}'\r\nvar botCommandRegExp = '\\\\/([a-zA-Z\\\\d_]{1,32})(?:@(' + usernameRegExp + '))?(\\\\b|$)'\r\nvar fullRegExp = new RegExp('(^| )(@)(' + usernameRegExp + ')|(' + urlRegExp + ')|(\\\\n)|(' + emojiRegExp + ')|(^|[\\\\s\\\\(\\\\]])(#[' + alphaNumericRegExp + ']{2,64})|(^|\\\\s)' + botCommandRegExp, 'i')\r\nvar emailRegExp = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\r\nvar youtubeRegExp = /^(?:https?:\\/\\/)?(?:www\\.)?youtu(?:|\\.be|be\\.com|\\.b)(?:\\/v\\/|\\/watch\\\\?v=|e\\/|(?:\\/\\??#)?\\/watch(?:.+)v=)(.{11})(?:\\&[^\\s]*)?/\r\nvar vimeoRegExp = /^(?:https?:\\/\\/)?(?:www\\.)?vimeo\\.com\\/(\\d+)/\r\nvar instagramRegExp = /^https?:\\/\\/(?:instagr\\.am\\/p\\/|instagram\\.com\\/p\\/)([a-zA-Z0-9\\-\\_]+)/i\r\nvar vineRegExp = /^https?:\\/\\/vine\\.co\\/v\\/([a-zA-Z0-9\\-\\_]+)/i\r\nvar twitterRegExp = /^https?:\\/\\/twitter\\.com\\/.+?\\/status\\/\\d+/i\r\nvar facebookRegExp = /^https?:\\/\\/(?:www\\.|m\\.)?facebook\\.com\\/(?:.+?\\/posts\\/\\d+|(?:story\\.php|permalink\\.php)\\?story_fbid=(\\d+)(?:&substory_index=\\d+)?&id=(\\d+))/i\r\nvar gplusRegExp = /^https?:\\/\\/plus\\.google\\.com\\/\\d+\\/posts\\/[a-zA-Z0-9\\-\\_]+/i\r\nvar soundcloudRegExp = /^https?:\\/\\/(?:soundcloud\\.com|snd\\.sc)\\/([a-zA-Z0-9%\\-\\_]+)\\/([a-zA-Z0-9%\\-\\_]+)/i\r\nvar spotifyRegExp = /(https?:\\/\\/(open\\.spotify\\.com|play\\.spotify\\.com|spoti\\.fi)\\/(.+)|spotify:(.+))/i\r\nvar markdownTestRegExp = /[`_*@]/\r\nvar markdownRegExp = /(^|\\s|\\n)(````?)([\\s\\S]+?)(````?)([\\s\\n\\.,:?!;]|$)|(^|\\s)(`|\\*\\*|__)([^\\n]+?)\\7([\\s\\.,:?!;]|$)|@(\\d+)\\s*\\((.+?)\\)/m\r\nvar siteHashtags = {\r\n Telegram: 'tg://search_hashtag?hashtag={1}',\r\n Twitter: 'https://twitter.com/hashtag/{1}',\r\n Instagram: 'https://instagram.com/explore/tags/{1}/',\r\n 'Google Plus': 'https://plus.google.com/explore/{1}'\r\n}\r\nvar siteMentions = {\r\n Telegram: '#/im?p=%40{1}',\r\n Twitter: 'https://twitter.com/{1}',\r\n Instagram: 'https://instagram.com/{1}/',\r\n GitHub: 'https://github.com/{1}'\r\n}\r\nvar markdownEntities = {\r\n '`': 'messageEntityCode',\r\n '**': 'messageEntityBold',\r\n '__': 'messageEntityItalic'\r\n}\r\nfunction getEmojiSpritesheetCoords(emojiCode) {\r\n //////////////emojiCode = emojiUnicode(emojiCode);\r\n\r\n let emojiInfo = emojiData.emoji[emojiCode];\r\n if(!emojiInfo) {\r\n //console.error('no emoji by code:', emojiCode, emojiCode.length, new TextEncoder().encode(emojiCode));\r\n return null;\r\n }\r\n\r\n let sheetX = 0;\r\n let sheetNo = '';\r\n if(emojiData.splitted) {\r\n sheetX = emojiInfo[emojiData.keyX] % 6;\r\n sheetNo = (emojiInfo[emojiData.keyX] / 6 | 0) + 1;\r\n } else {\r\n sheetX = emojiInfo[emojiData.keyX];\r\n }\r\n\r\n /* let xPos = 100 * (((emojiInfo.sheet_x * (img_size + 2)) + 1) / (sheetSizeX - img_size));\r\n let yPos = 100 * (((emojiInfo.sheet_y * (img_size + 2)) + 1) / (sheetSizeY - img_size)); */\r\n let xPos = sheetX * emojiData.multiplyX;\r\n let yPos = 100 / emojiData.side * emojiInfo[emojiData.keyY];\r\n\r\n if(emojiData.splitted) {\r\n /* if(sheetX != 2 && sheetX != 3) {\r\n xPos += ((sheetX + 1) > (6 / 2) ? -1 : 1) * 100 / 204;\r\n } */\r\n\r\n if(sheetNo == 9) {\r\n xPos = sheetX * 100 / 5;\r\n } else {\r\n xPos = sheetX * 100 / 6;\r\n }\r\n }\r\n\r\n //console.log({row: yPos, column: xPos, sheetNo});\r\n\r\n return {row: yPos, column: xPos, sheetNo};\r\n}\r\nfunction parseEntities (text, options) {\r\n options = options || {}\r\n var match\r\n var raw = text,\r\n url\r\n var entities = [],\r\n emojiCode = '',\r\n emojiCoords,\r\n matchIndex\r\n var rawOffset = 0\r\n // var start = tsNow()\r\n while ((match = raw.match(fullRegExp))) {\r\n matchIndex = rawOffset + match.index;\r\n\r\n if(match[3]) { // mentions\r\n entities.push({\r\n _: 'messageEntityMention',\r\n offset: matchIndex + match[1].length,\r\n length: match[2].length + match[3].length\r\n });\r\n } else if(match[4]) {\r\n if(emailRegExp.test(match[4])) { // email\r\n entities.push({\r\n _: 'messageEntityEmail',\r\n offset: matchIndex,\r\n length: match[4].length\r\n });\r\n } else {\r\n var url = false;\r\n var protocol = match[5];\r\n var tld = match[6];\r\n var excluded = '';\r\n if(tld) { // URL\r\n if(!protocol && (tld.substr(0, 4) === 'xn--' || Config.TLD.indexOf(tld.toLowerCase()) !== -1)) {\r\n protocol = 'http://';\r\n }\r\n\r\n if(protocol) {\r\n var balanced = checkBrackets(match[4]);\r\n if (balanced.length !== match[4].length) {\r\n excluded = match[4].substring(balanced.length);\r\n match[4] = balanced;\r\n }\r\n\r\n url = (match[5] ? '' : protocol) + match[4];\r\n }\r\n } else { // IP address\r\n url = (match[5] ? '' : 'http://') + match[4];\r\n }\r\n\r\n if (url) {\r\n entities.push({\r\n _: 'messageEntityUrl',\r\n offset: matchIndex,\r\n length: match[4].length\r\n });\r\n }\r\n }\r\n } else if(match[7]) { // New line\r\n entities.push({\r\n _: 'messageEntityLinebreak',\r\n offset: matchIndex,\r\n length: 1\r\n });\r\n } else if(match[8]/* && !emojiSupported */) { // Emoji\r\n if(emojiCode) matchIndex -= match[8].length;\r\n emojiCode += match[8];\r\n //console.log('hit', match[8], emojiCode.length);\r\n if((emojiCoords = getEmojiSpritesheetCoords(emojiCode))) {\r\n entities.push({\r\n _: 'messageEntityEmoji',\r\n offset: matchIndex,\r\n length: emojiCode.length,\r\n coords: emojiCoords/* ,\r\n title: emojiData[emojiCode][1][0] */\r\n });\r\n\r\n emojiCode = '';\r\n }\r\n } else if(match[10]) { // Hashtag\r\n entities.push({\r\n _: 'messageEntityHashtag',\r\n offset: matchIndex + match[9].length,\r\n length: match[10].length\r\n });\r\n } else if(match[12]) { // Bot command\r\n entities.push({\r\n _: 'messageEntityBotCommand',\r\n offset: matchIndex + match[11].length,\r\n length: 1 + match[12].length + (match[13] ? 1 + match[13].length : 0)\r\n });\r\n }\r\n\r\n raw = raw.substr(match.index + match[0].length);\r\n rawOffset += match.index + match[0].length;\r\n }\r\n\r\n // if (entities.length) {\r\n // console.log('parse entities', text, entities.slice())\r\n // }\r\n return entities\r\n}\r\nfunction parseEmojis (text) {\r\n return text.replace(/:([a-z0-9\\-\\+\\*_]+?):/gi, function (all, shortcut) {\r\n var emojiCode = EmojiHelper.shortcuts[shortcut]\r\n if (emojiCode !== undefined) {\r\n return EmojiHelper.emojis[emojiCode][0]\r\n }\r\n return all\r\n })\r\n}\r\nfunction parseMarkdown (text, entities, noTrim) {\r\n  if (!markdownTestRegExp.test(text)) {\r\n return noTrim ? text : text.trim()\r\n }\r\n var raw = text\r\n var match\r\n var newText = []\r\n var rawOffset = 0\r\n var matchIndex\r\n while (match = raw.match(markdownRegExp)) {\r\n matchIndex = rawOffset + match.index\r\n newText.push(raw.substr(0, match.index))\r\n var text = (match[3] || match[8] || match[11])\r\n rawOffset -= text.length\r\n text = text.replace(/^\\s+|\\s+$/g, '')\r\n rawOffset += text.length\r\n if (text.match(/^`*$/)) {\r\n newText.push(match[0])\r\n }\r\n else if (match[3]) { // pre\r\n if (match[5] == '\\n') {\r\n match[5] = ''\r\n rawOffset -= 1\r\n }\r\n newText.push(match[1] + text + match[5])\r\n entities.push({\r\n _: 'messageEntityPre',\r\n language: '',\r\n offset: matchIndex + match[1].length,\r\n length: text.length\r\n })\r\n rawOffset -= match[2].length + match[4].length\r\n } else if (match[7]) { // code|italic|bold\r\n newText.push(match[6] + text + match[9])\r\n entities.push({\r\n _: markdownEntities[match[7]],\r\n offset: matchIndex + match[6].length,\r\n length: text.length\r\n })\r\n rawOffset -= match[7].length * 2\r\n } else if (match[11]) { // custom mention\r\n newText.push(text)\r\n entities.push({\r\n _: 'messageEntityMentionName',\r\n user_id: match[10],\r\n offset: matchIndex,\r\n length: text.length\r\n })\r\n rawOffset -= match[0].length - text.length\r\n }\r\n raw = raw.substr(match.index + match[0].length)\r\n rawOffset += match.index + match[0].length\r\n }\r\n newText.push(raw)\r\n newText = newText.join('')\r\n if (!newText.replace(/\\s+/g, '').length) {\r\n newText = text\r\n entities.splice(0, entities.length)\r\n }\r\n if (!entities.length && !noTrim) {\r\n newText = newText.trim()\r\n }\r\n return newText\r\n}\r\nfunction mergeEntities (currentEntities, newEntities, fromApi) {\r\n var totalEntities = newEntities.slice()\r\n var i\r\n var len = currentEntities.length\r\n var j\r\n var len2 = newEntities.length\r\n var startJ = 0\r\n var curEntity\r\n var newEntity\r\n var start, end\r\n var cStart, cEnd\r\n var bad\r\n for (i = 0; i < len; i++) {\r\n curEntity = currentEntities[i]\r\n if (fromApi &&\r\n curEntity._ != 'messageEntityLinebreak' &&\r\n curEntity._ != 'messageEntityEmoji') {\r\n continue\r\n }\r\n // console.log('s', curEntity, newEntities)\r\n start = curEntity.offset\r\n end = start + curEntity.length\r\n bad = false\r\n for (j = startJ; j < len2; j++) {\r\n newEntity = newEntities[j]\r\n cStart = newEntity.offset\r\n cEnd = cStart + newEntity.length\r\n if (cStart <= start) {\r\n startJ = j\r\n }\r\n if (start >= cStart && start < cEnd ||\r\n end > cStart && end <= cEnd) {\r\n // console.log('bad', curEntity, newEntity)\r\n if (fromApi &&\r\n start >= cStart && end <= cEnd) {\r\n if (newEntity.nested === undefined) {\r\n newEntity.nested = []\r\n }\r\n curEntity.offset -= cStart\r\n newEntity.nested.push(copy(curEntity))\r\n }\r\n bad = true\r\n break\r\n }\r\n if (cStart >= end) {\r\n break\r\n }\r\n }\r\n if (bad) {\r\n continue\r\n }\r\n totalEntities.push(curEntity)\r\n }\r\n totalEntities.sort(function (a, b) {\r\n return a.offset - b.offset\r\n })\r\n // console.log('merge', currentEntities, newEntities, totalEntities)\r\n return totalEntities\r\n}\r\nfunction wrapRichNestedText (text, nested, options) {\r\n if (nested === undefined) {\r\n return encodeEntities(text)\r\n }\r\n options.hasNested = true\r\n return wrapRichText(text, {entities: nested, nested: true})\r\n}\r\nfunction wrapRichText (text, options = {}) {\r\n if(!text || !text.length) {\r\n return ''\r\n }\r\n\r\n var entities = options.entities;\r\n var contextSite = options.contextSite || 'Telegram';\r\n var contextExternal = contextSite != 'Telegram';\r\n var emojiFound = false;\r\n if(entities === undefined) {\r\n entities = parseEntities(text, options);\r\n }\r\n\r\n //console.log('wrapRichText got entities:', text, entities);\r\n var len = entities.length;\r\n var entity;\r\n var entityText;\r\n var skipEntity;\r\n var url;\r\n var html = [];\r\n var lastOffset = 0;\r\n var curEmojiSize = options.emojiIconSize || emojiIconSize;\r\n for(var i = 0; i < len; i++) {\r\n entity = entities[i];\r\n if(entity.offset > lastOffset) {\r\n html.push(\r\n encodeEntities(text.substr(lastOffset, entity.offset - lastOffset))\r\n );\r\n } else if(entity.offset < lastOffset) {\r\n continue;\r\n }\r\n\r\n skipEntity = false;\r\n entityText = text.substr(entity.offset, entity.length);\r\n switch(entity._) {\r\n case 'messageEntityMention':\r\n var contextUrl = !options.noLinks && siteMentions[contextSite]\r\n if (!contextUrl) {\r\n skipEntity = true\r\n break\r\n }\r\n var username = entityText.substr(1)\r\n var attr = ''\r\n if (options.highlightUsername &&\r\n options.highlightUsername.toLowerCase() == username.toLowerCase()) {\r\n attr = 'class=\"im_message_mymention\"'\r\n }\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityMentionName':\r\n if (options.noLinks) {\r\n skipEntity = true\r\n break\r\n }\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityHashtag':\r\n var contextUrl = !options.noLinks && siteHashtags[contextSite]\r\n if (!contextUrl) {\r\n skipEntity = true\r\n break\r\n }\r\n var hashtag = entityText.substr(1)\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityEmail':\r\n if (options.noLinks) {\r\n skipEntity = true\r\n break\r\n }\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityUrl':\r\n case 'messageEntityTextUrl':\r\n var inner\r\n if (entity._ == 'messageEntityTextUrl') {\r\n url = entity.url\r\n url = wrapUrl(url, true)\r\n inner = wrapRichNestedText(entityText, entity.nested, options)\r\n } else {\r\n url = wrapUrl(entityText, false)\r\n inner = encodeEntities(replaceUrlEncodings(entityText))\r\n }\r\n if (options.noLinks) {\r\n html.push(inner);\r\n } else {\r\n html.push(\r\n '',\r\n inner,\r\n ''\r\n )\r\n }\r\n break\r\n case 'messageEntityLinebreak':\r\n html.push(options.noLinebreaks ? ' ' : '
')\r\n break\r\n case 'messageEntityEmoji':\r\n \r\n /* var inner = `${encodeEntities(entityText)}`; */\r\n /* var inner = `\\u200B`; */\r\n\r\n /* if(emojiSupported) {\r\n html.push(encodeEntities(entityText));\r\n } else {\r\n *///html.push(`${emojiSupported ? encodeEntities(entityText) : inner}\\u200B`);\r\n //}\r\n\r\n inner = `\"${encodeEntities(entityText)}\"`;\r\n\r\n //html.push(`${emojiSupported ? encodeEntities(entityText) : inner}\\u200B`);\r\n\r\n html.push(emojiSupported ? `${encodeEntities(entityText)}` : inner);\r\n\r\n emojiFound = true;\r\n break\r\n case 'messageEntityBotCommand':\r\n if (options.noLinks || options.noCommands || contextExternal) {\r\n skipEntity = true\r\n break\r\n }\r\n var command = entityText.substr(1)\r\n var bot\r\n var atPos\r\n if ((atPos = command.indexOf('@')) != -1) {\r\n bot = command.substr(atPos + 1)\r\n command = command.substr(0, atPos)\r\n } else {\r\n bot = options.fromBot\r\n }\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityBold':\r\n html.push(\r\n '',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n ''\r\n )\r\n break\r\n case 'messageEntityItalic':\r\n html.push(\r\n '',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n ''\r\n )\r\n break\r\n case 'messageEntityCode':\r\n html.push(\r\n '',\r\n encodeEntities(entityText),\r\n ''\r\n )\r\n break\r\n case 'messageEntityPre':\r\n html.push(\r\n '
',\r\n          encodeEntities(entityText),\r\n          '
'\r\n )\r\n break\r\n default:\r\n skipEntity = true\r\n }\r\n lastOffset = entity.offset + (skipEntity ? 0 : entity.length)\r\n }\r\n\r\n html.push(encodeEntities(text.substr(lastOffset))); // may be empty string\r\n //console.log(html);\r\n text = html.join('')//$sanitize(html.join(''))\r\n /* if (!options.nested && (emojiFound || options.hasNested)) {\r\n text = text.replace(/\\ufe0f|️|�|‍/g, '', text)\r\n var emojiSizeClass = curEmojiSize == 18 ? '' : (' emoji-w' + curEmojiSize)\r\n text = text.replace(/]*)?) class=\"emoji emoji-(\\d)-(\\d+)-(\\d+)\"(.+?)<\\/span>/g,\r\n '')\r\n } */\r\n return text;//$sce.trustAs('html', text)\r\n}\r\nfunction wrapDraftText (text, options) {\r\n if (!text || !text.length) {\r\n return ''\r\n }\r\n options = options || {}\r\n var entities = options.entities\r\n if (entities === undefined) {\r\n entities = parseEntities(text, options)\r\n }\r\n var i = 0\r\n var len = entities.length\r\n var entity\r\n var entityText\r\n var skipEntity\r\n var code = []\r\n var lastOffset = 0\r\n for (i = 0; i < len; i++) {\r\n entity = entities[i]\r\n if (entity.offset > lastOffset) {\r\n code.push(\r\n text.substr(lastOffset, entity.offset - lastOffset)\r\n )\r\n }\r\n else if (entity.offset < lastOffset) {\r\n continue\r\n }\r\n skipEntity = false\r\n entityText = text.substr(entity.offset, entity.length)\r\n switch (entity._) {\r\n case 'messageEntityEmoji':\r\n code.push(\r\n ':',\r\n entity.title,\r\n ':'\r\n )\r\n break\r\n case 'messageEntityCode':\r\n code.push(\r\n '`', entityText, '`'\r\n )\r\n break\r\n case 'messageEntityBold':\r\n code.push(\r\n '**', entityText, '**'\r\n )\r\n break\r\n case 'messageEntityItalic':\r\n code.push(\r\n '__', entityText, '__'\r\n )\r\n break\r\n case 'messageEntityPre':\r\n code.push(\r\n '```', entityText, '```'\r\n )\r\n break\r\n case 'messageEntityMentionName':\r\n code.push(\r\n '@', entity.user_id, ' (', entityText, ')'\r\n )\r\n break\r\n default:\r\n skipEntity = true\r\n }\r\n lastOffset = entity.offset + (skipEntity ? 0 : entity.length)\r\n }\r\n code.push(text.substr(lastOffset))\r\n return code.join('')\r\n}\r\nfunction checkBrackets (url) {\r\n var urlLength = url.length\r\n var urlOpenBrackets = url.split('(').length - 1\r\n var urlCloseBrackets = url.split(')').length - 1\r\n while (urlCloseBrackets > urlOpenBrackets &&\r\n url.charAt(urlLength - 1) === ')') {\r\n url = url.substr(0, urlLength - 1)\r\n urlCloseBrackets--\r\n urlLength--\r\n }\r\n if (urlOpenBrackets > urlCloseBrackets) {\r\n url = url.replace(/\\)+$/, '')\r\n }\r\n return url\r\n}\r\n\r\nfunction replaceUrlEncodings(urlWithEncoded) {\r\n return urlWithEncoded.replace(/(%[A-Z\\d]{2})+/g, function (str) {\r\n try {\r\n return decodeURIComponent(str);\r\n } catch (e) {\r\n return str;\r\n }\r\n });\r\n}\r\n\r\nfunction wrapPlainText(text, options = {}) {\r\n if(emojiSupported) {\r\n return text;\r\n }\r\n\r\n if(!text || !text.length) {\r\n return '';\r\n }\r\n\r\n text = text.replace(/\\ufe0f/g, '', text);\r\n var match;\r\n var raw = text;\r\n var text = [],\r\n emojiTitle;\r\n while((match = raw.match(fullRegExp))) {\r\n text.push(raw.substr(0, match.index))\r\n if(match[8]) {\r\n if((emojiCode = EmojiHelper.emojiMap[match[8]]) &&\r\n (emojiTitle = emojiData[emojiCode][1][0])) {\r\n text.push(':' + emojiTitle + ':');\r\n } else {\r\n text.push(match[0]);\r\n }\r\n } else {\r\n text.push(match[0]);\r\n }\r\n\r\n raw = raw.substr(match.index + match[0].length);\r\n }\r\n text.push(raw);\r\n return text.join('');\r\n}\r\nfunction wrapEmojiText(text) {\r\n if(!text) return '';\r\n\r\n let entities = parseEntities(text).filter(e => e._ == 'messageEntityEmoji');\r\n return wrapRichText(text, {entities});\r\n}\r\nfunction wrapUrl (url, unsafe) {\r\n if (!url.match(/^https?:\\/\\//i)) {\r\n url = 'http://' + url\r\n }\r\n var tgMeMatch\r\n var telescoPeMatch\r\n if (unsafe == 2) {\r\n url = 'tg://unsafe_url?url=' + encodeURIComponent(url)\r\n }\r\n else if ((tgMeMatch = url.match(/^https?:\\/\\/t(?:elegram)?\\.me\\/(.+)/))) {\r\n var fullPath = tgMeMatch[1]\r\n var path = fullPath.split('/')\r\n switch (path[0]) {\r\n case 'joinchat':\r\n url = 'tg://join?invite=' + path[1]\r\n break\r\n case 'addstickers':\r\n url = 'tg://addstickers?set=' + path[1]\r\n break\r\n default:\r\n if (path[1] && path[1].match(/^\\d+$/)) {\r\n url = 'tg://resolve?domain=' + path[0] + '&post=' + path[1]\r\n }\r\n else if (path.length == 1) {\r\n var domainQuery = path[0].split('?')\r\n var domain = domainQuery[0]\r\n var query = domainQuery[1]\r\n if (domain == 'iv') {\r\n var match = (query || '').match(/url=([^&=]+)/)\r\n if (match) {\r\n url = match[1]\r\n try {\r\n url = decodeURIComponent(url)\r\n } catch (e) {}\r\n return wrapUrl(url, unsafe)\r\n }\r\n }\r\n url = 'tg://resolve?domain=' + domain + (query ? '&' + query : '')\r\n }\r\n }\r\n }\r\n else if ((telescoPeMatch = url.match(/^https?:\\/\\/telesco\\.pe\\/([^/?]+)\\/(\\d+)/))) {\r\n url = 'tg://resolve?domain=' + telescoPeMatch[1] + '&post=' + telescoPeMatch[2]\r\n }\r\n else if (unsafe) {\r\n url = 'tg://unsafe_url?url=' + encodeURIComponent(url)\r\n }\r\n return url\r\n}\r\n\r\nlet RichTextProcessor = {\r\n wrapRichText: wrapRichText,\r\n wrapPlainText: wrapPlainText,\r\n wrapDraftText: wrapDraftText,\r\n wrapUrl: wrapUrl,\r\n wrapEmojiText: wrapEmojiText,\r\n parseEntities: parseEntities,\r\n parseMarkdown: parseMarkdown,\r\n parseEmojis: parseEmojis,\r\n mergeEntities: mergeEntities,\r\n getEmojiSpritesheetCoords: getEmojiSpritesheetCoords,\r\n emojiSupported: emojiSupported\r\n};\r\n\r\nwindow.RichTextProcessor = RichTextProcessor;\r\n\r\nexport {RichTextProcessor};\r\n\r\n" + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst config_1 = __importDefault(require(\"../lib/config\"));\r\nlet rippleClickID = 0;\r\nfunction ripple(elem, callback = () => Promise.resolve(), onEnd = null) {\r\n let r = document.createElement('div');\r\n r.classList.add('c-ripple');\r\n elem.append(r);\r\n elem.addEventListener('mousedown', (e) => {\r\n if (elem.dataset.ripple == '0') {\r\n return false;\r\n }\r\n let startTime = Date.now();\r\n let span = document.createElement('span');\r\n let clickID = rippleClickID++;\r\n console.log('ripple mousedown');\r\n let handler = () => {\r\n let elapsedTime = Date.now() - startTime;\r\n if (elapsedTime < 700) {\r\n let delay = Math.max(700 - elapsedTime, 350);\r\n setTimeout(() => span.classList.add('hiding'), Math.max(delay - 350, 0));\r\n setTimeout(() => {\r\n //console.log('ripple elapsedTime total pre-remove:', Date.now() - startTime);\r\n span.remove();\r\n if (onEnd)\r\n onEnd(clickID);\r\n }, delay);\r\n }\r\n else {\r\n span.classList.add('hiding');\r\n setTimeout(() => {\r\n //console.log('ripple elapsedTime total pre-remove:', Date.now() - startTime);\r\n span.remove();\r\n if (onEnd)\r\n onEnd(clickID);\r\n }, 350);\r\n }\r\n };\r\n callback && callback(clickID);\r\n /* callback().then((bad) => {\r\n if(bad) {\r\n span.remove();\r\n return;\r\n } */\r\n //console.log('ripple after promise', Date.now() - startTime);\r\n //console.log('ripple tooSlow:', tooSlow);\r\n /* if(tooSlow) {\r\n span.remove();\r\n return;\r\n } */\r\n window.requestAnimationFrame(() => {\r\n span.classList.add('c-ripple__circle');\r\n let rect = r.getBoundingClientRect();\r\n let clickX = e.clientX - rect.left;\r\n let clickY = e.clientY - rect.top;\r\n let size, clickPos;\r\n if (rect.width > rect.height) {\r\n size = rect.width;\r\n clickPos = clickX;\r\n }\r\n else {\r\n size = rect.height;\r\n clickPos = clickY;\r\n }\r\n let offsetFromCenter = clickPos > (size / 2) ? size - clickPos : clickPos;\r\n size = size - offsetFromCenter;\r\n size *= 1.1;\r\n // center of circle\r\n let x = clickX - size / 2;\r\n let y = clickY - size / 2;\r\n //console.log('ripple click', offsetFromCenter, size, clickX, clickY);\r\n span.style.width = span.style.height = size + 'px';\r\n span.style.left = x + 'px';\r\n span.style.top = y + 'px';\r\n r.append(span);\r\n //r.classList.add('active');\r\n //handler();\r\n });\r\n //});\r\n window.addEventListener('mouseup', () => {\r\n //console.time('appImManager: pre render start');\r\n handler();\r\n }, { once: true });\r\n });\r\n}\r\nexports.ripple = ripple;\r\nlet loadedURLs = {};\r\nlet set = (elem, url) => {\r\n if (elem instanceof HTMLImageElement || elem instanceof HTMLSourceElement)\r\n elem.src = url;\r\n else if (elem instanceof SVGImageElement)\r\n elem.setAttributeNS(null, 'href', url);\r\n else\r\n elem.style.backgroundImage = 'url(' + url + ')';\r\n};\r\nfunction renderImageFromUrl(elem, url) {\r\n if (loadedURLs[url])\r\n return set(elem, url);\r\n if (elem instanceof HTMLSourceElement) {\r\n return elem.src = url;\r\n }\r\n else {\r\n let loader = new Image();\r\n loader.src = url;\r\n loader.onload = () => {\r\n set(elem, url);\r\n loadedURLs[url] = true;\r\n };\r\n }\r\n}\r\nexports.renderImageFromUrl = renderImageFromUrl;\r\nfunction putPreloader(elem, returnDiv = false) {\r\n const html = `\r\n \r\n \r\n `;\r\n if (returnDiv) {\r\n let div = document.createElement('div');\r\n div.classList.add('preloader');\r\n div.innerHTML = html;\r\n if (elem) {\r\n elem.appendChild(div);\r\n }\r\n return div;\r\n }\r\n elem.innerHTML += html;\r\n}\r\nexports.putPreloader = putPreloader;\r\nfunction horizontalMenu(tabs, content, onClick, onTransitionEnd, transitionTime = 300) {\r\n let hideTimeout = 0;\r\n let prevTabContent = null;\r\n let prevId = -1;\r\n let children = Array.from(content.children);\r\n let tabsChildren = tabs ? Array.from(tabs.firstElementChild.children) : [];\r\n let activeInSlide = new Set();\r\n let selectTab = (id) => {\r\n if (id == prevId)\r\n return false;\r\n let p = prevTabContent;\r\n /* children.forEach(child => {\r\n if(child != p) {\r\n child.classList.remove('active');\r\n }\r\n }); */\r\n let tabContent = content.children[id];\r\n tabContent.classList.add('active');\r\n if (!activeInSlide.has(tabContent)) {\r\n activeInSlide.add(tabContent);\r\n }\r\n //content.style.marginLeft = id > 0 ? (-id * 100) + '%' : '';\r\n let toRight = prevId < id;\r\n if (prevId != -1) {\r\n content.style.cssText = `width: ${activeInSlide.size * 100}%; will-change: width, transform; transform: translateX(-${100 - 100 / activeInSlide.size}%);`;\r\n //////console.log('mambo rap setting', toRight);\r\n content.classList.remove('animated');\r\n if (toRight) {\r\n content.classList.add('animated');\r\n }\r\n else {\r\n window.requestAnimationFrame(() => {\r\n content.classList.add('animated');\r\n content.style.transform = '';\r\n });\r\n }\r\n }\r\n if (hideTimeout)\r\n clearTimeout(hideTimeout);\r\n if (p /* && false */) {\r\n //if(tabs) tabs.classList.add('disable-hover');\r\n if (tabs) {\r\n tabsChildren.forEach((c, idx) => {\r\n if (idx != prevId && idx != id) {\r\n c.dataset.ripple = '0';\r\n }\r\n });\r\n }\r\n hideTimeout = setTimeout(() => {\r\n children.forEach(child => {\r\n if (child != tabContent) {\r\n child.classList.remove('active');\r\n activeInSlide.delete(child);\r\n }\r\n });\r\n if (tabs) {\r\n tabsChildren.forEach(c => {\r\n delete c.dataset.ripple;\r\n });\r\n }\r\n content.classList.remove('animated');\r\n content.style.cssText = '';\r\n hideTimeout = 0;\r\n if (onTransitionEnd)\r\n onTransitionEnd();\r\n //if(tabs) tabs.classList.remove('disable-hover');\r\n }, transitionTime);\r\n }\r\n prevId = id;\r\n prevTabContent = tabContent;\r\n };\r\n if (tabs) {\r\n let activeStripe = document.createElement('span');\r\n activeStripe.classList.add('menu-horizontal__stripe');\r\n tabs.append(activeStripe);\r\n tabs.addEventListener('click', function (e) {\r\n let target = e.target;\r\n if (target.tagName != 'LI') {\r\n target = utils_1.findUpTag(target, 'LI');\r\n }\r\n //console.log('tabs click:', target);\r\n if (!target)\r\n return false;\r\n let id = utils_1.whichChild(target);\r\n let tabContent = content.children[id];\r\n if (activeInSlide.size >= 2 && !activeInSlide.has(tabContent)) {\r\n return false;\r\n }\r\n if (onClick)\r\n onClick(id, tabContent);\r\n if (target.classList.contains('active') || id == prevId) {\r\n return false;\r\n }\r\n let prev = tabs.querySelector('li.active');\r\n prev && prev.classList.remove('active');\r\n let tabsRect = tabs.getBoundingClientRect();\r\n let textRect = target.firstElementChild.getBoundingClientRect();\r\n activeStripe.style.cssText = `width: ${textRect.width + (2 * 2)}px; transform: translateX(${textRect.left - tabsRect.left}px);`;\r\n //activeStripe.style.transform = `scaleX(${textRect.width}) translateX(${(textRect.left - tabsRect.left) / textRect.width + 0.5}px)`;\r\n console.log('tabs click:', tabsRect, textRect);\r\n target.classList.add('active');\r\n selectTab(id);\r\n });\r\n }\r\n return selectTab;\r\n}\r\nexports.horizontalMenu = horizontalMenu;\r\nfunction formatPhoneNumber(str) {\r\n str = str.replace(/\\D/g, '');\r\n let phoneCode = str.slice(0, 6);\r\n ////console.log('str', str, phoneCode);\r\n let sortedCountries = config_1.default.Countries.slice().sort((a, b) => b.phoneCode.length - a.phoneCode.length);\r\n let country = sortedCountries.find((c) => {\r\n return c.phoneCode.split(' and ').find((c) => phoneCode.indexOf(c.replace(/\\D/g, '')) == 0);\r\n });\r\n let pattern = country ? country.pattern || country.phoneCode : '';\r\n if (country) {\r\n pattern.split('').forEach((symbol, idx) => {\r\n if (symbol == ' ' && str[idx] != ' ' && str.length > idx) {\r\n str = str.slice(0, idx) + ' ' + str.slice(idx);\r\n }\r\n });\r\n if (country.pattern) {\r\n str = str.slice(0, country.pattern.length);\r\n }\r\n }\r\n return { formatted: str, country };\r\n}\r\nexports.formatPhoneNumber = formatPhoneNumber;\r\nlet onMouseMove = (e) => {\r\n let rect = openedMenu.getBoundingClientRect();\r\n let { clientX, clientY } = e;\r\n let diffX = clientX >= rect.right ? clientX - rect.right : rect.left - clientX;\r\n let diffY = clientY >= rect.bottom ? clientY - rect.bottom : rect.top - clientY;\r\n if (diffX >= 100 || diffY >= 100) {\r\n openedMenu.classList.remove('active');\r\n openedMenu.parentElement.classList.remove('menu-open');\r\n //openedMenu.parentElement.click();\r\n }\r\n //console.log('mousemove', diffX, diffY);\r\n};\r\nlet openedMenu = null;\r\nfunction openBtnMenu(menuElement) {\r\n if (openedMenu) {\r\n openedMenu.classList.remove('active');\r\n openedMenu.parentElement.classList.remove('menu-open');\r\n }\r\n openedMenu = menuElement;\r\n openedMenu.classList.add('active');\r\n openedMenu.parentElement.classList.add('menu-open');\r\n window.addEventListener('click', () => {\r\n if (openedMenu) {\r\n openedMenu.parentElement.classList.remove('menu-open');\r\n openedMenu.classList.remove('active');\r\n openedMenu = null;\r\n }\r\n window.removeEventListener('mousemove', onMouseMove);\r\n }, { once: true });\r\n window.addEventListener('mousemove', onMouseMove);\r\n}\r\nexports.openBtnMenu = openBtnMenu;\r\n" }, { "id": 4, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appUsersManager.ts", + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", "name": "./src/lib/appManagers/appUsersManager.ts", - "index": 62, - "index2": 54, - "size": 16398, + "index": 43, + "index2": 39, + "size": 16901, "cacheable": true, "built": true, "optional": false, @@ -1544,44 +1481,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "name": "./src/lib/services.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -1589,8 +1526,8 @@ "assets": [], "reasons": [ { - "moduleId": 10, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPeersManager.ts", + "moduleId": 5, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", "module": "./src/lib/appManagers/appPeersManager.ts", "moduleName": "./src/lib/appManagers/appPeersManager.ts", "type": "cjs require", @@ -1598,17 +1535,26 @@ "loc": "6:42-70" }, { - "moduleId": 11, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", + "moduleId": 6, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", "module": "./src/lib/appManagers/appPhotosManager.ts", "moduleName": "./src/lib/appManagers/appPhotosManager.ts", "type": "cjs require", "userRequest": "./appUsersManager", - "loc": "15:42-70" + "loc": "6:42-70" }, { "moduleId": 12, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appChatsManager.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", + "type": "cjs require", + "userRequest": "./appUsersManager", + "loc": "9:42-70" + }, + { + "moduleId": 13, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appChatsManager.ts", "module": "./src/lib/appManagers/appChatsManager.ts", "moduleName": "./src/lib/appManagers/appChatsManager.ts", "type": "cjs require", @@ -1616,8 +1562,8 @@ "loc": "8:42-70" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", "module": "./src/lib/appManagers/appMessagesManager.ts", "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", @@ -1625,62 +1571,53 @@ "loc": "18:42-70" }, { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "24:42-70" - }, - { - "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", "userRequest": "./appUsersManager", - "loc": "23:42-70" + "loc": "19:42-70" }, { - "moduleId": 27, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/apiUpdatesManager.ts", + "moduleId": 24, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", "module": "./src/lib/appManagers/apiUpdatesManager.ts", "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", "type": "cjs require", "userRequest": "./appUsersManager", - "loc": "10:42-70" + "loc": "11:42-70" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", + "moduleId": 26, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", "module": "./src/lib/appManagers/appDialogsManager.ts", "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", "userRequest": "./appUsersManager", - "loc": "21:42-70" + "loc": "19:42-70" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", "userRequest": "./appUsersManager", - "loc": "10:42-70" + "loc": "19:42-70" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 41, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "module": "./src/components/appSearch.ts", + "moduleName": "./src/components/appSearch.ts", "type": "cjs require", - "userRequest": "./appUsersManager", - "loc": "12:42-70" + "userRequest": "../lib/appManagers/appUsersManager", + "loc": "9:42-87" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "module": "./src/lib/services.ts", "moduleName": "./src/lib/services.ts", "type": "cjs require", @@ -1694,15 +1631,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\nconst apiManager_1 = __importDefault(require(\"../mtproto/apiManager\"));\nconst serverTimeManager_1 = __importDefault(require(\"../mtproto/serverTimeManager\"));\nclass AppUsersManager {\n constructor() {\n this.users = {};\n this.usernames = {};\n this.userAccess = {};\n this.cachedPhotoLocations = {};\n this.contactsIndex = utils_1.SearchIndexManager.createIndex();\n apiManager_1.default.getUserID().then((id) => {\n this.myID = id;\n });\n utils_1.$rootScope.$on('user_auth', (e) => {\n let userAuth = e.detail;\n this.myID = userAuth ? userAuth.id : 0;\n });\n setInterval(this.updateUsersStatuses.bind(this), 60000);\n utils_1.$rootScope.$on('stateSynchronized', this.updateUsersStatuses.bind(this));\n utils_1.$rootScope.$on('apiUpdate', (e) => {\n let update = e.detail;\n //console.log('on apiUpdate', update);\n switch (update._) {\n case 'updateUserStatus':\n var userID = update.user_id;\n var user = this.users[userID];\n if (user) {\n user.status = update.status;\n if (user.status) {\n if (user.status.expires) {\n user.status.expires -= serverTimeManager_1.default.serverTimeOffset;\n }\n if (user.status.was_online) {\n user.status.was_online -= serverTimeManager_1.default.serverTimeOffset;\n }\n }\n user.sortStatus = this.getUserStatusForSort(user.status);\n utils_1.$rootScope.$broadcast('user_update', userID);\n } //////else console.warn('No user by id:', userID);\n break;\n case 'updateUserPhoto':\n var userID = update.user_id;\n var user = this.users[userID];\n if (user) {\n this.forceUserOnline(userID);\n if (!user.photo) {\n user.photo = update.photo;\n }\n else {\n utils_1.safeReplaceObject(user.photo, update.photo);\n }\n if (this.cachedPhotoLocations[userID] !== undefined) {\n utils_1.safeReplaceObject(this.cachedPhotoLocations[userID], update.photo ?\n update.photo : { empty: true });\n }\n utils_1.$rootScope.$broadcast('user_update', userID);\n }\n else\n console.warn('No user by id:', userID);\n break;\n case 'updateContactLink':\n this.onContactUpdated(update.user_id, update.my_link._ == 'contactLinkContact');\n break;\n }\n });\n }\n /* public fillContacts () {\n if(this.contactsFillPromise) {\n return this.contactsFillPromise;\n }\n \n return this.contactsFillPromise = MTProto.apiManager.invokeApi('contacts.getContacts', {\n hash: 0\n }).then((result: any) => {\n var userID, searchText;\n var i;\n this.contactsList = [];\n this.saveApiUsers(result.users);\n \n for(var i = 0; i < result.contacts.length; i++) {\n userID = result.contacts[i].user_id\n this.contactsList.push(userID);\n //SearchIndexManager.indexObject(userID, getUserSearchText(userID), contactsIndex); WARNING\n }\n \n return this.contactsList;\n })\n } */\n getUserSearchText(id) {\n var user = this.users[id];\n if (!user) {\n return false;\n }\n var serviceText = '';\n if (user.pFlags.self) {\n serviceText = 'user_name_saved_msgs_raw';\n }\n return (user.first_name || '') +\n ' ' + (user.last_name || '') +\n ' ' + (user.phone || '') +\n ' ' + (user.username || '') +\n ' ' + serviceText;\n }\n /* function getContacts (query) {\n return fillContacts().then(function (contactsList) {\n if (angular.isString(query) && query.length) {\n var results = SearchIndexManager.search(query, contactsIndex)\n var filteredContactsList = []\n \n for (var i = 0; i < contactsList.length; i++) {\n if (results[contactsList[i]]) {\n filteredContactsList.push(contactsList[i])\n }\n }\n contactsList = filteredContactsList\n }\n \n contactsList.sort(function (userID1, userID2) {\n var sortName1 = (users[userID1] || {}.sortName) || ''\n var sortName2 = (users[userID2] || {}.sortName) || ''\n if (sortName1 == sortName2) {\n return 0\n }\n return sortName1 > sortName2 ? 1 : -1\n })\n \n return contactsList\n })\n } */\n resolveUsername(username) {\n return this.usernames[username] || 0;\n }\n saveApiUsers(apiUsers) {\n apiUsers.forEach((user) => this.saveApiUser(user));\n }\n saveApiUser(apiUser, noReplace) {\n if (!utils_1.isObject(apiUser) ||\n noReplace && utils_1.isObject(this.users[apiUser.id]) && this.users[apiUser.id].first_name) {\n return;\n }\n var userID = apiUser.id;\n var result = this.users[userID];\n if (apiUser.pFlags === undefined) {\n apiUser.pFlags = {};\n }\n if (apiUser.pFlags.min) {\n if (result !== undefined) {\n return;\n }\n }\n if (apiUser.phone) {\n //apiUser.rPhone = $filter('phoneNumber')(apiUser.phone); // warning\n }\n apiUser.num = (Math.abs(userID) % 8) + 1;\n if (apiUser.first_name) {\n apiUser.rFirstName = richtextprocessor_1.RichTextProcessor.wrapRichText(apiUser.first_name, { noLinks: true, noLinebreaks: true });\n apiUser.rFullName = apiUser.last_name ? richtextprocessor_1.RichTextProcessor.wrapRichText(apiUser.first_name + ' ' + (apiUser.last_name || ''), { noLinks: true, noLinebreaks: true }) : apiUser.rFirstName;\n }\n else {\n apiUser.rFirstName = richtextprocessor_1.RichTextProcessor.wrapRichText(apiUser.last_name, { noLinks: true, noLinebreaks: true }) || apiUser.rPhone || 'user_first_name_deleted';\n apiUser.rFullName = richtextprocessor_1.RichTextProcessor.wrapRichText(apiUser.last_name, { noLinks: true, noLinebreaks: true }) || apiUser.rPhone || 'user_name_deleted';\n }\n if (apiUser.username) {\n var searchUsername = utils_1.SearchIndexManager.cleanUsername(apiUser.username);\n this.usernames[searchUsername] = userID;\n }\n apiUser.sortName = apiUser.pFlags.deleted ? '' : utils_1.SearchIndexManager.cleanSearchText(apiUser.first_name + ' ' + (apiUser.last_name || ''));\n var nameWords = apiUser.sortName.split(' ');\n var firstWord = nameWords.shift();\n var lastWord = nameWords.pop();\n apiUser.initials = firstWord.charAt(0) + (lastWord ? lastWord.charAt(0) : firstWord.charAt(1));\n if (apiUser.status) {\n if (apiUser.status.expires) {\n apiUser.status.expires -= serverTimeManager_1.default.serverTimeOffset;\n }\n if (apiUser.status.was_online) {\n apiUser.status.was_online -= serverTimeManager_1.default.serverTimeOffset;\n }\n }\n if (apiUser.pFlags.bot) {\n apiUser.sortStatus = -1;\n }\n else {\n apiUser.sortStatus = this.getUserStatusForSort(apiUser.status);\n }\n var result = this.users[userID];\n if (result === undefined) {\n result = this.users[userID] = apiUser;\n }\n else {\n utils_1.safeReplaceObject(result, apiUser);\n }\n utils_1.$rootScope.$broadcast('user_update', userID);\n if (this.cachedPhotoLocations[userID] !== undefined) {\n utils_1.safeReplaceObject(this.cachedPhotoLocations[userID], apiUser &&\n apiUser.photo ? apiUser.photo : { empty: true });\n }\n }\n saveUserAccess(id, accessHash) {\n this.userAccess[id] = accessHash;\n }\n getUserStatusForSort(status) {\n if (status) {\n var expires = status.expires || status.was_online;\n if (expires) {\n return expires;\n }\n var timeNow = utils_1.tsNow(true);\n switch (status._) {\n case 'userStatusRecently':\n return timeNow - 86400 * 3;\n case 'userStatusLastWeek':\n return timeNow - 86400 * 7;\n case 'userStatusLastMonth':\n return timeNow - 86400 * 30;\n }\n }\n return 0;\n }\n getUser(id) {\n if (utils_1.isObject(id)) {\n return id;\n }\n return this.users[id] || { id: id, deleted: true, num: 1, access_hash: this.userAccess[id] };\n }\n getSelf() {\n return this.getUser(this.myID);\n }\n isBot(id) {\n return this.users[id] && this.users[id].pFlags.bot;\n }\n hasUser(id, allowMin) {\n var user = this.users[id];\n return utils_1.isObject(user) && (allowMin || !user.pFlags.min);\n }\n getUserPhoto(id) {\n var user = this.getUser(id);\n if (this.cachedPhotoLocations[id] === undefined) {\n this.cachedPhotoLocations[id] = user && user.photo ? user.photo : { empty: true };\n }\n return this.cachedPhotoLocations[id];\n }\n getUserString(id) {\n var user = this.getUser(id);\n return 'u' + id + (user.access_hash ? '_' + user.access_hash : '');\n }\n getUserInput(id) {\n var user = this.getUser(id);\n if (user.pFlags && user.pFlags.self) {\n return { _: 'inputUserSelf' };\n }\n return {\n _: 'inputUser',\n user_id: id,\n access_hash: user.access_hash || 0\n };\n }\n updateUsersStatuses() {\n var timestampNow = utils_1.tsNow(true);\n for (let i in this.users) {\n let user = this.users[i];\n if (user.status &&\n user.status._ == 'userStatusOnline' &&\n user.status.expires < timestampNow) {\n user.status = user.status.wasStatus || { _: 'userStatusOffline', was_online: user.status.expires };\n delete user.status.wasStatus;\n utils_1.$rootScope.$broadcast('user_update', user.id);\n }\n }\n }\n forceUserOnline(id) {\n if (this.isBot(id)) {\n return;\n }\n var user = this.getUser(id);\n if (user &&\n user.status &&\n user.status._ != 'userStatusOnline' &&\n user.status._ != 'userStatusEmpty') {\n var wasStatus;\n if (user.status._ != 'userStatusOffline') {\n delete user.status.wasStatus;\n wasStatus = utils_1.copy(user.status);\n }\n user.status = {\n _: 'userStatusOnline',\n expires: utils_1.tsNow(true) + 60,\n wasStatus: wasStatus\n };\n user.sortStatus = this.getUserStatusForSort(user.status);\n utils_1.$rootScope.$broadcast('user_update', id);\n }\n }\n wrapForFull(id) {\n var user = this.getUser(id);\n return user;\n }\n /* function importContact (phone, firstName, lastName) {\n return MtpApiManager.invokeApi('contacts.importContacts', {\n contacts: [{\n _: 'inputPhoneContact',\n client_id: '1',\n phone: phone,\n first_name: firstName,\n last_name: lastName\n }],\n replace: false\n }).then(function (importedContactsResult) {\n saveApiUsers(importedContactsResult.users)\n \n var foundUserID = false\n angular.forEach(importedContactsResult.imported, function (importedContact) {\n onContactUpdated(foundUserID = importedContact.user_id, true)\n })\n \n return foundUserID || false\n })\n }\n \n function importContacts (contacts) {\n var inputContacts = [],\n i\n var j\n \n for (i = 0; i < contacts.length; i++) {\n for (j = 0; j < contacts[i].phones.length; j++) {\n inputContacts.push({\n _: 'inputPhoneContact',\n client_id: (i << 16 | j).toString(10),\n phone: contacts[i].phones[j],\n first_name: contacts[i].first_name,\n last_name: contacts[i].last_name\n })\n }\n }\n \n return MtpApiManager.invokeApi('contacts.importContacts', {\n contacts: inputContacts,\n replace: false\n }).then(function (importedContactsResult) {\n saveApiUsers(importedContactsResult.users)\n \n var result = []\n angular.forEach(importedContactsResult.imported, function (importedContact) {\n onContactUpdated(importedContact.user_id, true)\n result.push(importedContact.user_id)\n })\n \n return result\n })\n } */\n deleteContacts(userIDs) {\n var ids = [];\n userIDs.forEach((userID) => {\n ids.push(this.getUserInput(userID));\n });\n return apiManager_1.default.invokeApi('contacts.deleteContacts', {\n id: ids\n }).then(() => {\n userIDs.forEach((userID) => {\n this.onContactUpdated(userID, false);\n });\n });\n }\n getTopPeers() {\n return apiManager_1.default.invokeApi('contacts.getTopPeers', {\n flags: 1,\n correspondents: true,\n offset: 0,\n limit: 5,\n hash: 0,\n }).then((peers) => {\n //console.log(peers);\n this.saveApiUsers(peers.users);\n appChatsManager_1.default.saveApiChats(peers.chats);\n return peers.categories;\n });\n }\n searchContacts(query, limit = 20) {\n return apiManager_1.default.invokeApi('contacts.search', {\n q: query,\n limit\n }).then((peers) => {\n //console.log(peers);\n this.saveApiUsers(peers.users);\n appChatsManager_1.default.saveApiChats(peers.chats);\n return peers;\n });\n }\n onContactUpdated(userID, isContact) {\n userID = parseInt('' + userID);\n if (Array.isArray(this.contactsList)) {\n var curPos = this.contactsList.indexOf(userID);\n var curIsContact = curPos != -1;\n if (isContact != curIsContact) {\n if (isContact) {\n this.contactsList.push(userID);\n utils_1.SearchIndexManager.indexObject(userID, this.getUserSearchText(userID), this.contactsIndex);\n }\n else {\n this.contactsList.splice(curPos, 1);\n }\n utils_1.$rootScope.$broadcast('contacts_update', userID);\n }\n }\n }\n setUserStatus(userID, offline) {\n if (this.isBot(userID)) {\n return;\n }\n var user = this.users[userID];\n if (user) {\n var status = offline ? {\n _: 'userStatusOffline',\n was_online: utils_1.tsNow(true)\n } : {\n _: 'userStatusOnline',\n expires: utils_1.tsNow(true) + 500\n };\n user.status = status;\n user.sortStatus = this.getUserStatusForSort(user.status);\n utils_1.$rootScope.$broadcast('user_update', userID);\n }\n }\n}\nexports.AppUsersManager = AppUsersManager;\nexports.default = new AppUsersManager();\n" + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../utils\");\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\n//import apiManager from '../mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst serverTimeManager_1 = __importDefault(require(\"../mtproto/serverTimeManager\"));\r\nclass AppUsersManager {\r\n constructor() {\r\n this.users = {};\r\n this.usernames = {};\r\n this.userAccess = {};\r\n this.cachedPhotoLocations = {};\r\n this.contactsIndex = utils_1.SearchIndexManager.createIndex();\r\n mtprotoworker_1.default.getUserID().then((id) => {\r\n this.myID = id;\r\n });\r\n utils_1.$rootScope.$on('user_auth', (e) => {\r\n let userAuth = e.detail;\r\n this.myID = userAuth ? userAuth.id : 0;\r\n });\r\n setInterval(this.updateUsersStatuses.bind(this), 60000);\r\n utils_1.$rootScope.$on('stateSynchronized', this.updateUsersStatuses.bind(this));\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n let update = e.detail;\r\n //console.log('on apiUpdate', update);\r\n switch (update._) {\r\n case 'updateUserStatus':\r\n var userID = update.user_id;\r\n var user = this.users[userID];\r\n if (user) {\r\n user.status = update.status;\r\n if (user.status) {\r\n if (user.status.expires) {\r\n user.status.expires -= serverTimeManager_1.default.serverTimeOffset;\r\n }\r\n if (user.status.was_online) {\r\n user.status.was_online -= serverTimeManager_1.default.serverTimeOffset;\r\n }\r\n }\r\n user.sortStatus = this.getUserStatusForSort(user.status);\r\n utils_1.$rootScope.$broadcast('user_update', userID);\r\n } //////else console.warn('No user by id:', userID);\r\n break;\r\n case 'updateUserPhoto':\r\n var userID = update.user_id;\r\n var user = this.users[userID];\r\n if (user) {\r\n this.forceUserOnline(userID);\r\n if (!user.photo) {\r\n user.photo = update.photo;\r\n }\r\n else {\r\n utils_1.safeReplaceObject(user.photo, update.photo);\r\n }\r\n if (this.cachedPhotoLocations[userID] !== undefined) {\r\n utils_1.safeReplaceObject(this.cachedPhotoLocations[userID], update.photo ?\r\n update.photo : { empty: true });\r\n }\r\n utils_1.$rootScope.$broadcast('user_update', userID);\r\n }\r\n else\r\n console.warn('No user by id:', userID);\r\n break;\r\n case 'updateContactLink':\r\n this.onContactUpdated(update.user_id, update.my_link._ == 'contactLinkContact');\r\n break;\r\n }\r\n });\r\n }\r\n /* public fillContacts () {\r\n if(this.contactsFillPromise) {\r\n return this.contactsFillPromise;\r\n }\r\n \r\n return this.contactsFillPromise = MTProto.apiManager.invokeApi('contacts.getContacts', {\r\n hash: 0\r\n }).then((result: any) => {\r\n var userID, searchText;\r\n var i;\r\n this.contactsList = [];\r\n this.saveApiUsers(result.users);\r\n \r\n for(var i = 0; i < result.contacts.length; i++) {\r\n userID = result.contacts[i].user_id\r\n this.contactsList.push(userID);\r\n //SearchIndexManager.indexObject(userID, getUserSearchText(userID), contactsIndex); WARNING\r\n }\r\n \r\n return this.contactsList;\r\n })\r\n } */\r\n getUserSearchText(id) {\r\n var user = this.users[id];\r\n if (!user) {\r\n return false;\r\n }\r\n var serviceText = '';\r\n if (user.pFlags.self) {\r\n serviceText = 'user_name_saved_msgs_raw';\r\n }\r\n return (user.first_name || '') +\r\n ' ' + (user.last_name || '') +\r\n ' ' + (user.phone || '') +\r\n ' ' + (user.username || '') +\r\n ' ' + serviceText;\r\n }\r\n /* function getContacts (query) {\r\n return fillContacts().then(function (contactsList) {\r\n if (angular.isString(query) && query.length) {\r\n var results = SearchIndexManager.search(query, contactsIndex)\r\n var filteredContactsList = []\r\n \r\n for (var i = 0; i < contactsList.length; i++) {\r\n if (results[contactsList[i]]) {\r\n filteredContactsList.push(contactsList[i])\r\n }\r\n }\r\n contactsList = filteredContactsList\r\n }\r\n \r\n contactsList.sort(function (userID1, userID2) {\r\n var sortName1 = (users[userID1] || {}.sortName) || ''\r\n var sortName2 = (users[userID2] || {}.sortName) || ''\r\n if (sortName1 == sortName2) {\r\n return 0\r\n }\r\n return sortName1 > sortName2 ? 1 : -1\r\n })\r\n \r\n return contactsList\r\n })\r\n } */\r\n resolveUsername(username) {\r\n return this.usernames[username] || 0;\r\n }\r\n saveApiUsers(apiUsers) {\r\n apiUsers.forEach((user) => this.saveApiUser(user));\r\n }\r\n saveApiUser(apiUser, noReplace) {\r\n if (!utils_1.isObject(apiUser) ||\r\n noReplace && utils_1.isObject(this.users[apiUser.id]) && this.users[apiUser.id].first_name) {\r\n return;\r\n }\r\n var userID = apiUser.id;\r\n var result = this.users[userID];\r\n if (apiUser.pFlags === undefined) {\r\n apiUser.pFlags = {};\r\n }\r\n if (apiUser.pFlags.min) {\r\n if (result !== undefined) {\r\n return;\r\n }\r\n }\r\n if (apiUser.phone) {\r\n //apiUser.rPhone = $filter('phoneNumber')(apiUser.phone); // warning\r\n }\r\n apiUser.num = (Math.abs(userID) % 8) + 1;\r\n if (apiUser.first_name) {\r\n apiUser.rFirstName = richtextprocessor_1.RichTextProcessor.wrapRichText(apiUser.first_name, { noLinks: true, noLinebreaks: true });\r\n apiUser.rFullName = apiUser.last_name ? richtextprocessor_1.RichTextProcessor.wrapRichText(apiUser.first_name + ' ' + (apiUser.last_name || ''), { noLinks: true, noLinebreaks: true }) : apiUser.rFirstName;\r\n }\r\n else {\r\n apiUser.rFirstName = richtextprocessor_1.RichTextProcessor.wrapRichText(apiUser.last_name, { noLinks: true, noLinebreaks: true }) || apiUser.rPhone || 'user_first_name_deleted';\r\n apiUser.rFullName = richtextprocessor_1.RichTextProcessor.wrapRichText(apiUser.last_name, { noLinks: true, noLinebreaks: true }) || apiUser.rPhone || 'user_name_deleted';\r\n }\r\n if (apiUser.username) {\r\n var searchUsername = utils_1.SearchIndexManager.cleanUsername(apiUser.username);\r\n this.usernames[searchUsername] = userID;\r\n }\r\n apiUser.sortName = apiUser.pFlags.deleted ? '' : utils_1.SearchIndexManager.cleanSearchText(apiUser.first_name + ' ' + (apiUser.last_name || ''));\r\n var nameWords = apiUser.sortName.split(' ');\r\n var firstWord = nameWords.shift();\r\n var lastWord = nameWords.pop();\r\n apiUser.initials = firstWord.charAt(0) + (lastWord ? lastWord.charAt(0) : firstWord.charAt(1));\r\n if (apiUser.status) {\r\n if (apiUser.status.expires) {\r\n apiUser.status.expires -= serverTimeManager_1.default.serverTimeOffset;\r\n }\r\n if (apiUser.status.was_online) {\r\n apiUser.status.was_online -= serverTimeManager_1.default.serverTimeOffset;\r\n }\r\n }\r\n if (apiUser.pFlags.bot) {\r\n apiUser.sortStatus = -1;\r\n }\r\n else {\r\n apiUser.sortStatus = this.getUserStatusForSort(apiUser.status);\r\n }\r\n var result = this.users[userID];\r\n if (result === undefined) {\r\n result = this.users[userID] = apiUser;\r\n }\r\n else {\r\n utils_1.safeReplaceObject(result, apiUser);\r\n }\r\n utils_1.$rootScope.$broadcast('user_update', userID);\r\n if (this.cachedPhotoLocations[userID] !== undefined) {\r\n utils_1.safeReplaceObject(this.cachedPhotoLocations[userID], apiUser &&\r\n apiUser.photo ? apiUser.photo : { empty: true });\r\n }\r\n }\r\n saveUserAccess(id, accessHash) {\r\n this.userAccess[id] = accessHash;\r\n }\r\n getUserStatusForSort(status) {\r\n if (status) {\r\n var expires = status.expires || status.was_online;\r\n if (expires) {\r\n return expires;\r\n }\r\n var timeNow = utils_1.tsNow(true);\r\n switch (status._) {\r\n case 'userStatusRecently':\r\n return timeNow - 86400 * 3;\r\n case 'userStatusLastWeek':\r\n return timeNow - 86400 * 7;\r\n case 'userStatusLastMonth':\r\n return timeNow - 86400 * 30;\r\n }\r\n }\r\n return 0;\r\n }\r\n getUser(id) {\r\n if (utils_1.isObject(id)) {\r\n return id;\r\n }\r\n return this.users[id] || { id: id, deleted: true, num: 1, access_hash: this.userAccess[id] };\r\n }\r\n getSelf() {\r\n return this.getUser(this.myID);\r\n }\r\n isBot(id) {\r\n return this.users[id] && this.users[id].pFlags.bot;\r\n }\r\n hasUser(id, allowMin) {\r\n var user = this.users[id];\r\n return utils_1.isObject(user) && (allowMin || !user.pFlags.min);\r\n }\r\n getUserPhoto(id) {\r\n var user = this.getUser(id);\r\n if (this.cachedPhotoLocations[id] === undefined) {\r\n this.cachedPhotoLocations[id] = user && user.photo ? user.photo : { empty: true };\r\n }\r\n return this.cachedPhotoLocations[id];\r\n }\r\n getUserString(id) {\r\n var user = this.getUser(id);\r\n return 'u' + id + (user.access_hash ? '_' + user.access_hash : '');\r\n }\r\n getUserInput(id) {\r\n var user = this.getUser(id);\r\n if (user.pFlags && user.pFlags.self) {\r\n return { _: 'inputUserSelf' };\r\n }\r\n return {\r\n _: 'inputUser',\r\n user_id: id,\r\n access_hash: user.access_hash || 0\r\n };\r\n }\r\n updateUsersStatuses() {\r\n var timestampNow = utils_1.tsNow(true);\r\n for (let i in this.users) {\r\n let user = this.users[i];\r\n if (user.status &&\r\n user.status._ == 'userStatusOnline' &&\r\n user.status.expires < timestampNow) {\r\n user.status = user.status.wasStatus || { _: 'userStatusOffline', was_online: user.status.expires };\r\n delete user.status.wasStatus;\r\n utils_1.$rootScope.$broadcast('user_update', user.id);\r\n }\r\n }\r\n }\r\n forceUserOnline(id) {\r\n if (this.isBot(id)) {\r\n return;\r\n }\r\n var user = this.getUser(id);\r\n if (user &&\r\n user.status &&\r\n user.status._ != 'userStatusOnline' &&\r\n user.status._ != 'userStatusEmpty') {\r\n var wasStatus;\r\n if (user.status._ != 'userStatusOffline') {\r\n delete user.status.wasStatus;\r\n wasStatus = utils_1.copy(user.status);\r\n }\r\n user.status = {\r\n _: 'userStatusOnline',\r\n expires: utils_1.tsNow(true) + 60,\r\n wasStatus: wasStatus\r\n };\r\n user.sortStatus = this.getUserStatusForSort(user.status);\r\n utils_1.$rootScope.$broadcast('user_update', id);\r\n }\r\n }\r\n wrapForFull(id) {\r\n var user = this.getUser(id);\r\n return user;\r\n }\r\n /* function importContact (phone, firstName, lastName) {\r\n return MtpApiManager.invokeApi('contacts.importContacts', {\r\n contacts: [{\r\n _: 'inputPhoneContact',\r\n client_id: '1',\r\n phone: phone,\r\n first_name: firstName,\r\n last_name: lastName\r\n }],\r\n replace: false\r\n }).then(function (importedContactsResult) {\r\n saveApiUsers(importedContactsResult.users)\r\n \r\n var foundUserID = false\r\n angular.forEach(importedContactsResult.imported, function (importedContact) {\r\n onContactUpdated(foundUserID = importedContact.user_id, true)\r\n })\r\n \r\n return foundUserID || false\r\n })\r\n }\r\n \r\n function importContacts (contacts) {\r\n var inputContacts = [],\r\n i\r\n var j\r\n \r\n for (i = 0; i < contacts.length; i++) {\r\n for (j = 0; j < contacts[i].phones.length; j++) {\r\n inputContacts.push({\r\n _: 'inputPhoneContact',\r\n client_id: (i << 16 | j).toString(10),\r\n phone: contacts[i].phones[j],\r\n first_name: contacts[i].first_name,\r\n last_name: contacts[i].last_name\r\n })\r\n }\r\n }\r\n \r\n return MtpApiManager.invokeApi('contacts.importContacts', {\r\n contacts: inputContacts,\r\n replace: false\r\n }).then(function (importedContactsResult) {\r\n saveApiUsers(importedContactsResult.users)\r\n \r\n var result = []\r\n angular.forEach(importedContactsResult.imported, function (importedContact) {\r\n onContactUpdated(importedContact.user_id, true)\r\n result.push(importedContact.user_id)\r\n })\r\n \r\n return result\r\n })\r\n } */\r\n deleteContacts(userIDs) {\r\n var ids = [];\r\n userIDs.forEach((userID) => {\r\n ids.push(this.getUserInput(userID));\r\n });\r\n return mtprotoworker_1.default.invokeApi('contacts.deleteContacts', {\r\n id: ids\r\n }).then(() => {\r\n userIDs.forEach((userID) => {\r\n this.onContactUpdated(userID, false);\r\n });\r\n });\r\n }\r\n getTopPeers() {\r\n return mtprotoworker_1.default.invokeApi('contacts.getTopPeers', {\r\n flags: 1,\r\n correspondents: true,\r\n offset: 0,\r\n limit: 5,\r\n hash: 0,\r\n }).then((peers) => {\r\n //console.log(peers);\r\n this.saveApiUsers(peers.users);\r\n appChatsManager_1.default.saveApiChats(peers.chats);\r\n return peers.categories;\r\n });\r\n }\r\n searchContacts(query, limit = 20) {\r\n return mtprotoworker_1.default.invokeApi('contacts.search', {\r\n q: query,\r\n limit\r\n }).then((peers) => {\r\n //console.log(peers);\r\n this.saveApiUsers(peers.users);\r\n appChatsManager_1.default.saveApiChats(peers.chats);\r\n return peers;\r\n });\r\n }\r\n onContactUpdated(userID, isContact) {\r\n userID = parseInt('' + userID);\r\n if (Array.isArray(this.contactsList)) {\r\n var curPos = this.contactsList.indexOf(userID);\r\n var curIsContact = curPos != -1;\r\n if (isContact != curIsContact) {\r\n if (isContact) {\r\n this.contactsList.push(userID);\r\n utils_1.SearchIndexManager.indexObject(userID, this.getUserSearchText(userID), this.contactsIndex);\r\n }\r\n else {\r\n this.contactsList.splice(curPos, 1);\r\n }\r\n utils_1.$rootScope.$broadcast('contacts_update', userID);\r\n }\r\n }\r\n }\r\n setUserStatus(userID, offline) {\r\n if (this.isBot(userID)) {\r\n return;\r\n }\r\n var user = this.users[userID];\r\n if (user) {\r\n var status = offline ? {\r\n _: 'userStatusOffline',\r\n was_online: utils_1.tsNow(true)\r\n } : {\r\n _: 'userStatusOnline',\r\n expires: utils_1.tsNow(true) + 500\r\n };\r\n user.status = status;\r\n user.sortStatus = this.getUserStatusForSort(user.status);\r\n utils_1.$rootScope.$broadcast('user_update', userID);\r\n }\r\n }\r\n}\r\nexports.AppUsersManager = AppUsersManager;\r\nexports.default = new AppUsersManager();\r\n" }, { "id": 5, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/misc.ts", - "name": "./src/components/misc.ts", - "index": 22, - "index2": 48, - "size": 7241, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", + "name": "./src/lib/appManagers/appPeersManager.ts", + "index": 50, + "index2": 42, + "size": 5915, "cacheable": true, "built": true, "optional": false, @@ -1710,24 +1647,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "issuerId": 52, - "issuerName": "./src/index.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 + } + }, + { + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", + "profile": { + "factory": 842, + "building": 0, + "dependencies": 1062 + } + }, + { + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -1735,94 +1692,85 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", "module": "./src/lib/appManagers/appImManager.ts", "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "44:15-47" + "userRequest": "./appPeersManager", + "loc": "11:42-70" }, { - "moduleId": 25, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "module": "./src/components/pageIm.ts", - "moduleName": "./src/components/pageIm.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./misc", - "loc": "14:15-32" + "userRequest": "./appPeersManager", + "loc": "25:42-70" }, { - "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "16:15-47" + "userRequest": "./appPeersManager", + "loc": "21:42-70" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", + "moduleId": 24, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", + "module": "./src/lib/appManagers/apiUpdatesManager.ts", + "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", + "type": "cjs require", + "userRequest": "./appPeersManager", + "loc": "10:42-70" + }, + { + "moduleId": 26, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", "module": "./src/lib/appManagers/appDialogsManager.ts", "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "23:15-47" + "userRequest": "./appPeersManager", + "loc": "17:42-70" }, { - "moduleId": 40, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "module": "./src/components/pageSignIn.ts", - "moduleName": "./src/components/pageSignIn.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "./misc", - "loc": "13:15-32" + "userRequest": "./appPeersManager", + "loc": "6:42-70" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", "module": "./src/lib/appManagers/appSidebarRight.ts", "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "../../components/misc", - "loc": "6:15-47" - }, - { - "moduleId": 52, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", - "type": "cjs require", - "userRequest": "./components/misc", - "loc": "77:63-91" - }, - { - "moduleId": 78, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "module": "./src/components/pageSignUp.ts", - "moduleName": "./src/components/pageSignUp.ts", - "type": "cjs require", - "userRequest": "./misc", - "loc": "6:15-32" + "userRequest": "./appPeersManager", + "loc": "18:42-70" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "module": "./src/components/emoticonsDropdown.ts", - "moduleName": "./src/components/emoticonsDropdown.ts", + "moduleId": 41, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "module": "./src/components/appSearch.ts", + "moduleName": "./src/components/appSearch.ts", "type": "cjs require", - "userRequest": "./misc", - "loc": "15:15-32" + "userRequest": "../lib/appManagers/appPeersManager", + "loc": "10:42-87" }, { - "moduleId": 84, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pagePassword.ts", - "module": "./src/components/pagePassword.ts", - "moduleName": "./src/components/pagePassword.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "./misc", - "loc": "17:15-32" + "userRequest": "./appManagers/appPeersManager", + "loc": "16:42-82" } ], "usedExports": true, @@ -1830,16 +1778,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 1, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst apiManager_1 = __importDefault(require(\"../lib/mtproto/apiManager\"));\nconst utils_1 = require(\"../lib/utils\");\nlet onRippleClick = function (e) {\n var $circle = this.firstElementChild; //this.querySelector('.c-ripple__circle') as HTMLSpanElement;\n var rect = this.parentElement.getBoundingClientRect();\n var x = e.clientX - rect.left; //x position within the element.\n var y = e.clientY - rect.top;\n /* var x = e.pageX - this.parentElement.offsetLeft;\n var y = e.pageY - this.parentElement.offsetTop - this.parentElement.scrollHeight; */\n $circle.style.top = y + 'px';\n $circle.style.left = x + 'px';\n this.classList.add('active');\n //console.log('onrippleclick', e/* e.pageY, this.parentElement.offsetTop */);\n};\nfunction ripple(elem) {\n /* elem.addEventListener('click', function(e) {\n var $circle = elem.querySelector('.c-ripple__circle') as HTMLSpanElement;\n \n var x = e.pageX - elem.offsetLeft;\n var y = e.pageY - elem.offsetTop;\n \n $circle.style.top = y + 'px';\n $circle.style.left = x + 'px';\n \n elem.classList.add('active');\n }); */\n let r = document.createElement('div');\n r.classList.add('c-ripple');\n let span = document.createElement('span');\n span.classList.add('c-ripple__circle');\n r.append(span);\n elem.append(r);\n r.addEventListener('click', onRippleClick);\n let onEnd = () => {\n r.classList.remove('active');\n };\n for (let type of ['animationend', 'webkitAnimationEnd', 'oanimationend', 'MSAnimationEnd']) {\n r.addEventListener(type, onEnd);\n }\n}\nexports.ripple = ripple;\nfunction putPreloader(elem) {\n const html = `\r\n \r\n \r\n `;\n elem.innerHTML += html;\n}\nexports.putPreloader = putPreloader;\nfunction horizontalMenu(tabs, content, onClick, onTransitionEnd) {\n let hideTimeout = 0;\n let prevTabContent = null;\n let prevId = -1;\n tabs.addEventListener('click', function (e) {\n let target = e.target;\n if (target.tagName != 'LI') {\n target = utils_1.findUpTag(target, 'LI');\n }\n ///////console.log('tabs click:', target);\n if (!target || target.classList.contains('active'))\n return false;\n let prev = tabs.querySelector('li.active');\n prev && prev.classList.remove('active');\n target.classList.add('active');\n let id = utils_1.whichChild(target);\n if (id == prevId)\n return false;\n let tabContent = content.children[id];\n tabContent.classList.add('active');\n /////console.log('mambo rap', prevId, id);\n //content.style.marginLeft = id > 0 ? (-id * 100) + '%' : '';\n let toRight = prevId < id;\n if (prevId != -1) {\n content.style.width = '200%';\n //////console.log('mambo rap setting', toRight);\n content.classList.remove('animated');\n if (toRight) {\n content.classList.add('animated');\n content.style.marginLeft = '-100%';\n }\n else {\n content.style.marginLeft = '-100%';\n setTimeout(() => {\n content.classList.add('animated');\n content.style.marginLeft = '';\n }, 10);\n }\n }\n prevId = id;\n let p = prevTabContent;\n clearTimeout(hideTimeout);\n if (p)\n hideTimeout = setTimeout(() => {\n if (toRight) {\n p.classList.remove('active');\n content.classList.remove('animated');\n content.style.width = '100%';\n }\n /* content.style.marginLeft = '0%';\n content.style.width = '100%'; */\n if (!toRight) {\n p.classList.remove('active');\n content.classList.remove('animated');\n content.style.width = '100%';\n }\n content.style.marginLeft = '';\n if (onTransitionEnd)\n onTransitionEnd();\n }, 200);\n if (onClick)\n onClick(id, tabContent);\n prevTabContent = tabContent;\n });\n}\nexports.horizontalMenu = horizontalMenu;\nfunction getNearestDc() {\n return apiManager_1.default.invokeApi('help.getNearestDc').then((nearestDcResult) => {\n if (nearestDcResult.nearest_dc != nearestDcResult.this_dc) {\n //MTProto.apiManager.baseDcID = nearestDcResult.nearest_dc;\n apiManager_1.default.getNetworker(nearestDcResult.nearest_dc);\n }\n return nearestDcResult;\n });\n}\nexports.getNearestDc = getNearestDc;\nfunction formatPhoneNumber(str) {\n str = str.replace(/\\D/g, '');\n let phoneCode = str.slice(0, 6);\n ////console.log('str', str, phoneCode);\n let sortedCountries = Config.Countries.slice().sort((a, b) => b.phoneCode.length - a.phoneCode.length);\n let country = sortedCountries.find((c) => {\n return c.phoneCode.split(' and ').find((c) => phoneCode.indexOf(c.replace(/\\D/g, '')) == 0);\n });\n let pattern = country ? country.pattern || country.phoneCode : '';\n if (country) {\n pattern.split('').forEach((symbol, idx) => {\n if (symbol == ' ' && str[idx] != ' ' && str.length > idx) {\n str = str.slice(0, idx) + ' ' + str.slice(idx);\n }\n });\n if (country.pattern) {\n str = str.slice(0, country.pattern.length);\n }\n }\n return { formatted: str, country };\n}\nexports.formatPhoneNumber = formatPhoneNumber;\nlet onMouseMove = (e) => {\n let rect = openedMenu.getBoundingClientRect();\n let { clientX, clientY } = e;\n let diffX = clientX >= rect.right ? clientX - rect.right : rect.left - clientX;\n let diffY = clientY >= rect.bottom ? clientY - rect.bottom : rect.top - clientY;\n if (diffX >= 100 || diffY >= 100) {\n openedMenu.classList.remove('active');\n openedMenu.parentElement.classList.remove('menu-open');\n //openedMenu.parentElement.click();\n }\n //console.log('mousemove', diffX, diffY);\n};\nlet openedMenu = null;\nfunction openBtnMenu(menuElement) {\n if (openedMenu) {\n openedMenu.classList.remove('active');\n openedMenu.parentElement.classList.remove('menu-open');\n }\n openedMenu = menuElement;\n openedMenu.classList.add('active');\n openedMenu.parentElement.classList.add('menu-open');\n window.addEventListener('click', () => {\n if (openedMenu) {\n openedMenu.parentElement.classList.remove('menu-open');\n openedMenu.classList.remove('active');\n openedMenu = null;\n }\n window.removeEventListener('mousemove', onMouseMove);\n }, { once: true });\n window.addEventListener('mousemove', onMouseMove);\n}\nexports.openBtnMenu = openBtnMenu;\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\n// https://github.com/eelcohn/Telegram-API/wiki/Calculating-color-for-a-Telegram-user-on-IRC\r\n/*\r\n HTML-color IRC-color Description\r\n #c03d33 4 red\r\n #4fad2d 3 green\r\n #d09306 7 yellow\r\n #168acd 10 blue\r\n #8544d6 6 purple\r\n #cd4073 13 pink\r\n #2996ad 11 sea\r\n #ce671b 5 orange\r\n */\r\nconst DialogColorsFg = ['#c03d33', '#4fad2d', '#d09306', '#168acd', '#8544d6', '#cd4073', '#2996ad', '#ce671b'];\r\nconst DialogColors = ['#e17076', '#7bc862', '#e5ca77', '#65AADD', '#a695e7', '#ee7aae', '#6ec9cb', '#faa774'];\r\nconst DialogColorsMap = [0, 7, 4, 1, 6, 3, 5];\r\nconst AppPeersManager = {\r\n getPeerPhoto: (peerID) => {\r\n return peerID > 0\r\n ? appUsersManager_1.default.getUserPhoto(peerID)\r\n : appChatsManager_1.default.getChatPhoto(-peerID);\r\n },\r\n getPeerMigratedTo: (peerID) => {\r\n if (peerID >= 0) {\r\n return false;\r\n }\r\n var chat = appChatsManager_1.default.getChat(-peerID);\r\n if (chat && chat.migrated_to && chat.pFlags.deactivated) {\r\n return AppPeersManager.getPeerID(chat.migrated_to);\r\n }\r\n return false;\r\n },\r\n getPeerTitle: (peerID, plainText = false) => {\r\n let peer = {};\r\n if (!utils_1.isObject(peerID)) {\r\n peer = AppPeersManager.getPeer(peerID);\r\n }\r\n else\r\n peer = peerID;\r\n let title = '';\r\n if (peerID > 0) {\r\n if (peer.first_name)\r\n title += peer.first_name;\r\n if (peer.last_name)\r\n title += ' ' + peer.last_name;\r\n if (!title)\r\n title = peer.pFlags.deleted ? 'Deleted account' : peer.username;\r\n else\r\n title = title.trim();\r\n }\r\n else {\r\n title = peer.title;\r\n }\r\n return plainText ? title : richtextprocessor_1.RichTextProcessor.wrapEmojiText(title);\r\n },\r\n getOutputPeer: (peerID) => {\r\n if (peerID > 0) {\r\n return { _: 'peerUser', user_id: peerID };\r\n }\r\n var chatID = -peerID;\r\n if (appChatsManager_1.default.isChannel(chatID)) {\r\n return { _: 'peerChannel', channel_id: chatID };\r\n }\r\n return { _: 'peerChat', chat_id: chatID };\r\n },\r\n getPeerString: (peerID) => {\r\n if (peerID > 0) {\r\n return appUsersManager_1.default.getUserString(peerID);\r\n }\r\n return appChatsManager_1.default.getChatString(-peerID);\r\n },\r\n getPeerUsername: (peerID) => {\r\n if (peerID > 0) {\r\n return appUsersManager_1.default.getUser(peerID).username || '';\r\n }\r\n return appChatsManager_1.default.getChat(-peerID).username || '';\r\n },\r\n getPeer: (peerID) => {\r\n return peerID > 0\r\n ? appUsersManager_1.default.getUser(peerID)\r\n : appChatsManager_1.default.getChat(-peerID);\r\n },\r\n getPeerID: (peerString) => {\r\n if (utils_1.isObject(peerString)) {\r\n return peerString.user_id\r\n ? peerString.user_id\r\n : -(peerString.channel_id || peerString.chat_id);\r\n }\r\n var isUser = peerString.charAt(0) == 'u';\r\n var peerParams = peerString.substr(1).split('_');\r\n return isUser ? peerParams[0] : -peerParams[0] || 0;\r\n },\r\n isChannel: (peerID) => {\r\n return (peerID < 0) && appChatsManager_1.default.isChannel(-peerID);\r\n },\r\n isMegagroup: (peerID) => {\r\n return (peerID < 0) && appChatsManager_1.default.isMegagroup(-peerID);\r\n },\r\n isAnyGroup: (peerID) => {\r\n return (peerID < 0) && !appChatsManager_1.default.isBroadcast(-peerID);\r\n },\r\n isBroadcast: (id) => {\r\n return AppPeersManager.isChannel(id) && !AppPeersManager.isMegagroup(id);\r\n },\r\n isBot: (peerID) => {\r\n return (peerID > 0) && appUsersManager_1.default.isBot(peerID);\r\n },\r\n getInputPeerByID: (peerID) => {\r\n if (!peerID) {\r\n return { _: 'inputPeerEmpty' };\r\n }\r\n if (peerID < 0) {\r\n var chatID = -peerID;\r\n if (!appChatsManager_1.default.isChannel(chatID)) {\r\n return {\r\n _: 'inputPeerChat',\r\n chat_id: chatID\r\n };\r\n }\r\n else {\r\n return {\r\n _: 'inputPeerChannel',\r\n channel_id: chatID,\r\n access_hash: appChatsManager_1.default.getChat(chatID).access_hash || 0\r\n };\r\n }\r\n }\r\n return {\r\n _: 'inputPeerUser',\r\n user_id: peerID,\r\n access_hash: appUsersManager_1.default.getUser(peerID).access_hash || 0\r\n };\r\n },\r\n getPeerColorByID: (peerID, pic = true) => {\r\n let idx = DialogColorsMap[(peerID < 0 ? -peerID : peerID) % 7];\r\n let color = (pic ? DialogColors : DialogColorsFg)[idx];\r\n return color;\r\n },\r\n getPeerSearchText: (peerID) => {\r\n var text;\r\n if (peerID > 0) {\r\n text = '%pu ' + appUsersManager_1.default.getUserSearchText(peerID);\r\n }\r\n else if (peerID < 0) {\r\n var chat = appChatsManager_1.default.getChat(-peerID);\r\n text = '%pg ' + (chat.title || '');\r\n }\r\n return text;\r\n }\r\n};\r\nexports.default = AppPeersManager;\r\n" }, { "id": 6, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/storage.ts", - "name": "./src/lib/storage.ts", - "index": 19, - "index2": 19, - "size": 1074, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", + "name": "./src/lib/appManagers/appPhotosManager.ts", + "index": 51, + "index2": 47, + "size": 13543, "cacheable": true, "built": true, "optional": false, @@ -1847,24 +1795,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "issuerId": 52, - "issuerName": "./src/index.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 + } + }, + { + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", + "profile": { + "factory": 842, + "building": 0, + "dependencies": 1062 + } + }, + { + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -1872,85 +1840,76 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../storage", - "loc": "22:34-55" + "userRequest": "./appPhotosManager", + "loc": "15:43-72" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", "module": "./src/lib/appManagers/appMessagesManager.ts", "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "../storage", - "loc": "24:34-55" + "userRequest": "./appPhotosManager", + "loc": "23:43-72" }, { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "../storage", - "loc": "14:34-55" + "userRequest": "./appPhotosManager", + "loc": "18:43-72" }, { - "moduleId": 23, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/serverTimeManager.ts", - "module": "./src/lib/mtproto/serverTimeManager.ts", - "moduleName": "./src/lib/mtproto/serverTimeManager.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "module": "./src/components/wrappers.ts", + "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "../storage", - "loc": "6:34-55" + "userRequest": "../lib/appManagers/appPhotosManager", + "loc": "22:43-89" }, { - "moduleId": 36, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/timeManager.ts", - "module": "./src/lib/mtproto/timeManager.ts", - "moduleName": "./src/lib/mtproto/timeManager.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "../storage", - "loc": "6:34-55" + "userRequest": "./appPhotosManager", + "loc": "7:43-72" }, { "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", + "module": "./src/lib/appManagers/appWebPagesManager.ts", + "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", "type": "cjs require", - "userRequest": "../storage", - "loc": "14:34-55" + "userRequest": "./appPhotosManager", + "loc": "7:43-72" }, { "moduleId": 38, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", - "type": "cjs require", - "userRequest": "../storage", - "loc": "15:34-55" - }, - { - "moduleId": 52, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "./lib/storage", - "loc": "67:70-94" + "userRequest": "./appPhotosManager", + "loc": "17:43-72" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "../storage", - "loc": "27:34-55" + "userRequest": "./appManagers/appPhotosManager", + "loc": "11:43-84" } ], "usedExports": true, @@ -1958,16 +1917,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 1, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst config_1 = require(\"./config\");\nclass AppStorage {\n setPrefix(newPrefix) {\n config_1.Storage.prefix(newPrefix);\n }\n noPrefix() {\n config_1.Storage.noPrefix();\n }\n proxy(methodName, ..._args) {\n let args = Array.prototype.slice.call(_args);\n let promise = new Promise((resolve, reject) => {\n args.push((result) => {\n resolve(result);\n });\n config_1.Storage[methodName].apply(config_1.Storage, args);\n });\n return promise;\n }\n get(...args) {\n return this.proxy('get', ...args);\n }\n set(...args) {\n //console.trace(...args);\n return this.proxy('set', ...args);\n }\n remove(...args) {\n return this.proxy('remove', ...args);\n }\n clear(...args) {\n return this.proxy('clear', ...args);\n }\n constructor() {\n if (config_1.Modes.test) {\n this.setPrefix('t_');\n }\n }\n}\nexports.default = new AppStorage();\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\r\n//import apiManager from '../mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nclass AppPhotosManager {\r\n constructor() {\r\n this.photos = {};\r\n this.windowW = 0;\r\n this.windowH = 0;\r\n window.addEventListener('resize', (e) => {\r\n this.windowW = document.body.scrollWidth;\r\n this.windowH = document.body.scrollHeight;\r\n });\r\n this.windowW = document.body.scrollWidth;\r\n this.windowH = document.body.scrollHeight;\r\n }\r\n savePhoto(photo, context) {\r\n if (this.photos[photo.id])\r\n return this.photos[photo.id];\r\n /* if(context) {\r\n Object.assign(photo, context);\r\n } */ // warning\r\n if (!photo.id) {\r\n console.warn('no apiPhoto.id', photo);\r\n }\r\n else\r\n this.photos[photo.id] = photo;\r\n /* if(!('sizes' in photo)) return;\r\n \r\n photo.sizes.forEach((photoSize: any) => {\r\n if(photoSize._ == 'photoCachedSize') {\r\n apiFileManager.saveSmallFile(photoSize.location, photoSize.bytes);\r\n \r\n console.log('clearing photo cached size', photo);\r\n \r\n // Memory\r\n photoSize.size = photoSize.bytes.length;\r\n delete photoSize.bytes;\r\n photoSize._ = 'photoSize';\r\n }\r\n }); */\r\n /* if(!photo.downloaded) {\r\n photo.downloaded = apiFileManager.isFileExists({\r\n _: 'inputPhotoFileLocation',\r\n id: photo.id,\r\n access_hash: photo.access_hash,\r\n file_reference: photo.file_reference\r\n });\r\n // apiFileManager.isFileExists({\r\n // _: 'inputPhotoFileLocation',\r\n // id: photo.id,\r\n // access_hash: photo.access_hash,\r\n // file_reference: photo.file_reference\r\n // }).then(downloaded => {\r\n // photo.downloaded = downloaded;\r\n // });\r\n } */\r\n return photo;\r\n }\r\n choosePhotoSize(photo, width = 0, height = 0) {\r\n //if(Config.Navigator.retina) {\r\n if (window.devicePixelRatio > 1) {\r\n width *= 2;\r\n height *= 2;\r\n }\r\n /*\r\n s\tbox\t100x100\r\n m\tbox\t320x320\r\n x\tbox\t800x800\r\n y\tbox\t1280x1280\r\n w\tbox\t2560x2560\r\n a\tcrop\t160x160\r\n b\tcrop\t320x320\r\n c\tcrop\t640x640\r\n d\tcrop\t1280x1280 */\r\n let bestPhotoSize = { _: 'photoSizeEmpty' };\r\n let bestDiff = 0xFFFFFF;\r\n //console.log('choosePhotoSize', photo);\r\n let sizes = photo.sizes || photo.thumbs;\r\n if (!sizes)\r\n return bestPhotoSize;\r\n sizes.forEach((photoSize) => {\r\n if (!photoSize.w || !photoSize.h)\r\n return;\r\n let diff = Math.abs(photoSize.w * photoSize.h - width * height);\r\n if (diff < bestDiff) {\r\n bestPhotoSize = photoSize;\r\n bestDiff = diff;\r\n }\r\n //console.log('diff', diff, photoSize, bestPhotoSize);\r\n });\r\n //console.log('choosing', photo, width, height, bestPhotoSize);\r\n return bestPhotoSize;\r\n }\r\n getUserPhotos(userID, maxID, limit) {\r\n var inputUser = appUsersManager_1.default.getUserInput(userID);\r\n return mtprotoworker_1.default.invokeApi('photos.getUserPhotos', {\r\n user_id: inputUser,\r\n offset: 0,\r\n limit: limit || 20,\r\n max_id: maxID || 0\r\n }).then((photosResult) => {\r\n appUsersManager_1.default.saveApiUsers(photosResult.users);\r\n var photoIDs = [];\r\n var context = { user_id: userID };\r\n for (var i = 0; i < photosResult.photos.length; i++) {\r\n //this.savePhoto(photosResult.photos[i], context);\r\n photosResult.photos[i] = this.savePhoto(photosResult.photos[i], context);\r\n photoIDs.push(photosResult.photos[i].id);\r\n }\r\n return {\r\n count: photosResult.count || photosResult.photos.length,\r\n photos: photoIDs\r\n };\r\n });\r\n }\r\n setAttachmentPreview(bytes, element, isSticker = false, background = false) {\r\n let arr;\r\n if (!isSticker) {\r\n arr = AppPhotosManager.jf.concat(bytes.slice(3), AppPhotosManager.Df);\r\n arr[164] = bytes[1];\r\n arr[166] = bytes[2];\r\n }\r\n else {\r\n arr = bytes;\r\n }\r\n //console.log('setAttachmentPreview', bytes, arr, div, isSticker);\r\n let blob = new Blob([arr], { type: \"image/jpeg\" });\r\n if (background) {\r\n let url = URL.createObjectURL(blob);\r\n let img = new Image();\r\n img.src = url;\r\n img.onload = () => {\r\n element.style.backgroundImage = 'url(' + url + ')';\r\n };\r\n //element.style.backgroundImage = 'url(' + url + ')';\r\n }\r\n else {\r\n if (element instanceof SVGSVGElement) {\r\n let image = element.firstElementChild || document.createElementNS(\"http://www.w3.org/2000/svg\", \"image\");\r\n image.setAttributeNS(null, 'href', URL.createObjectURL(blob));\r\n element.append(image);\r\n }\r\n else {\r\n let image = new Image();\r\n image.src = URL.createObjectURL(blob);\r\n image.style.width = '100%';\r\n image.style.height = '100%';\r\n element.append(image);\r\n }\r\n }\r\n }\r\n setAttachmentSize(photoID, element, boxWidth = 380, boxHeight = 380, isSticker = false) {\r\n let photo = /* MTDocument | MTPhoto */ null;\r\n if (typeof (photoID) === 'string') {\r\n photo = this.photos[photoID];\r\n if (!photo)\r\n return { _: 'photoEmpty' };\r\n }\r\n else {\r\n photo = photoID;\r\n }\r\n let photoSize = this.choosePhotoSize(photo, boxWidth, boxHeight);\r\n //console.log('setAttachmentSize', photo, photo.sizes[0].bytes, div);\r\n let sizes = photo.sizes || photo.thumbs;\r\n if ((!photo.downloaded || (isSticker && photo.animated)) && sizes && sizes[0].bytes) {\r\n this.setAttachmentPreview(sizes[0].bytes, element, isSticker);\r\n }\r\n let width;\r\n let height;\r\n if (photo._ == 'document') {\r\n width = photo.w || 512;\r\n height = photo.h || 512;\r\n }\r\n else {\r\n width = photoSize.w || 100;\r\n height = photoSize.h || 100;\r\n }\r\n let { w, h } = utils_1.calcImageInBox(width, height, boxWidth, boxHeight);\r\n if (element instanceof SVGSVGElement) {\r\n element.setAttributeNS(null, 'width', '' + w);\r\n element.setAttributeNS(null, 'height', '' + h);\r\n console.log('set dimensions to svg element:', element, w, h);\r\n if (element.firstElementChild) {\r\n let imageSvg = element.firstElementChild;\r\n imageSvg.setAttributeNS(null, 'width', '' + w);\r\n imageSvg.setAttributeNS(null, 'height', '' + h);\r\n }\r\n }\r\n else {\r\n element.style.width = w + 'px';\r\n element.style.height = h + 'px';\r\n }\r\n return photoSize;\r\n }\r\n preloadPhoto(photoID, photoSize) {\r\n let photo = this.getPhoto(photoID);\r\n if (!photoSize) {\r\n let fullWidth = this.windowW;\r\n let fullHeight = this.windowH;\r\n photoSize = this.choosePhotoSize(photo, fullWidth, fullHeight);\r\n }\r\n if (photo.downloaded >= photoSize.size && photo.url) {\r\n return Promise.resolve();\r\n }\r\n if (!photoSize || photoSize._ == 'photoSizeEmpty') {\r\n console.error('no photoSize by photo:', photo);\r\n return Promise.reject('no photoSize');\r\n }\r\n // maybe it's a thumb\r\n let isPhoto = photoSize.size && photo.access_hash && photo.file_reference;\r\n let location = isPhoto ? {\r\n _: photo._ == 'document' ? 'inputDocumentFileLocation' : 'inputPhotoFileLocation',\r\n id: photo.id,\r\n access_hash: photo.access_hash,\r\n file_reference: photo.file_reference,\r\n thumb_size: photoSize.type\r\n } : photoSize.location;\r\n let promise;\r\n if (isPhoto /* && photoSize.size >= 1e6 */) {\r\n //console.log('Photos downloadFile exec', photo);\r\n promise = apiFileManager_1.default.downloadFile(photo.dc_id, location, photoSize.size);\r\n }\r\n else {\r\n //console.log('Photos downloadSmallFile exec', photo, location);\r\n promise = apiFileManager_1.default.downloadSmallFile(location);\r\n }\r\n if (typeof (photoID) === 'string') {\r\n let photo = this.photos[photoID];\r\n promise.then(blob => {\r\n if (!photo.downloaded || photo.downloaded < blob.size) {\r\n photo.downloaded = blob.size;\r\n photo.url = URL.createObjectURL(blob);\r\n console.log('wrote photo:', photo, photoSize, blob);\r\n }\r\n });\r\n }\r\n return promise;\r\n }\r\n getPhoto(photoID) {\r\n return utils_1.isObject(photoID) ? photoID : this.photos[photoID];\r\n }\r\n downloadPhoto(photoID) {\r\n var photo = this.photos[photoID];\r\n var ext = 'jpg';\r\n var mimeType = 'image/jpeg';\r\n var fileName = 'photo' + photoID + '.' + ext;\r\n var fullWidth = this.windowW;\r\n var fullHeight = this.windowH;\r\n var fullPhotoSize = this.choosePhotoSize(photo, fullWidth, fullHeight);\r\n var inputFileLocation = {\r\n // @ts-ignore\r\n _: photo._ == 'document' ? 'inputDocumentFileLocation' : 'inputPhotoFileLocation',\r\n id: photo.id,\r\n access_hash: photo.access_hash,\r\n file_reference: photo.file_reference,\r\n thumb_size: fullPhotoSize.type\r\n };\r\n try { // photo.dc_id, location, photoSize.size\r\n let writer = filemanager_1.default.chooseSaveFile(fileName, ext, mimeType, fullPhotoSize.size);\r\n writer.ready.then(() => {\r\n console.log('ready');\r\n apiFileManager_1.default.downloadFile(photo.dc_id, inputFileLocation, fullPhotoSize.size, {\r\n mimeType: mimeType,\r\n toFileEntry: writer\r\n }).then(() => {\r\n writer.close();\r\n //writer.abort();\r\n console.log('file save done', fileName, ext, mimeType, writer);\r\n }, (e) => {\r\n console.log('photo download failed', e);\r\n });\r\n });\r\n }\r\n catch (err) {\r\n console.error('err', err);\r\n var cachedBlob = apiFileManager_1.default.getCachedFile(inputFileLocation);\r\n if (cachedBlob) {\r\n return filemanager_1.default.download(cachedBlob, mimeType, fileName);\r\n }\r\n apiFileManager_1.default.downloadFile(photo.dc_id, inputFileLocation, fullPhotoSize.size, { mimeType: mimeType })\r\n .then((blob) => {\r\n filemanager_1.default.download(blob, mimeType, fileName);\r\n }, (e) => {\r\n console.log('photo download failed', e);\r\n });\r\n }\r\n }\r\n}\r\nexports.AppPhotosManager = AppPhotosManager;\r\nAppPhotosManager.jf = new Uint8Array(bin_utils_1.bytesFromHex('ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e19282321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2d2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc00011080000000003012200021101031101ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b5100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090a0bffc400b51100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00'));\r\nAppPhotosManager.Df = bin_utils_1.bytesFromHex('ffd9');\r\nexports.default = new AppPhotosManager();\r\n" }, { "id": 7, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/crypto/cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", - "index": 31, - "index2": 24, - "size": 6765, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\storage.ts", + "name": "./src/lib/storage.ts", + "index": 18, + "index2": 18, + "size": 6234, "cacheable": true, "built": true, "optional": false, @@ -1975,44 +1934,24 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "issuerId": 77, - "issuerName": "./src/components/pageAuthCode.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "issuerId": 44, + "issuerName": "./src/index.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 - } - }, - { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", - "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 - } - }, - { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 44, + "building": 1570 } } ], "profile": { - "factory": 278, - "building": 994, - "dependencies": 0 + "factory": 842, + "building": 0, + "dependencies": 1062 }, "failed": false, "errors": 0, @@ -2020,76 +1959,67 @@ "assets": [], "reasons": [ { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/crypto/cryptoworker", - "loc": "16:39-76" - }, - { - "moduleId": 41, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/passwordManager.ts", - "module": "./src/lib/mtproto/passwordManager.ts", - "moduleName": "./src/lib/mtproto/passwordManager.ts", + "moduleId": 1, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "module": "./src/lib/mtproto/mtprotoworker.ts", + "moduleName": "./src/lib/mtproto/mtprotoworker.ts", "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "17:39-72" + "userRequest": "../storage", + "loc": "14:34-55" }, { - "moduleId": 43, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/rsaKeysManager.ts", - "module": "./src/lib/mtproto/rsaKeysManager.ts", - "moduleName": "./src/lib/mtproto/rsaKeysManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "17:39-72" + "userRequest": "../storage", + "loc": "24:34-55" }, { - "moduleId": 44, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "23:39-72" + "userRequest": "../storage", + "loc": "23:34-55" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 30, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts", + "module": "./src/lib/mtproto/serverTimeManager.ts", + "moduleName": "./src/lib/mtproto/serverTimeManager.ts", "type": "cjs require", - "userRequest": "../crypto/cryptoworker", - "loc": "26:39-72" + "userRequest": "../storage", + "loc": "6:34-55" }, { - "moduleId": 77, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "module": "./src/components/pageAuthCode.ts", - "moduleName": "./src/components/pageAuthCode.ts", + "moduleId": 33, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", + "module": "./src/lib/appManagers/appStickersManager.ts", + "moduleName": "./src/lib/appManagers/appStickersManager.ts", "type": "cjs require", - "userRequest": "../lib/crypto/cryptoworker", - "loc": "19:39-76" + "userRequest": "../storage", + "loc": "15:34-55" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "module": "./src/components/emoticonsDropdown.ts", - "moduleName": "./src/components/emoticonsDropdown.ts", + "moduleId": 44, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "module": "./src/index.ts", + "moduleName": "./src/index.ts", "type": "cjs require", - "userRequest": "../lib/crypto/cryptoworker", - "loc": "22:39-76" + "userRequest": "./lib/storage", + "loc": "41:70-94" }, { - "moduleId": 84, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pagePassword.ts", - "module": "./src/components/pagePassword.ts", - "moduleName": "./src/components/pagePassword.ts", + "moduleId": 68, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.ts", + "module": "./src/lib/mtproto/mtproto.ts", + "moduleName": "./src/lib/mtproto/mtproto.ts", "type": "cjs require", - "userRequest": "../lib/crypto/cryptoworker", - "loc": "16:39-76" + "userRequest": "../storage", + "loc": "6:34-55" } ], "usedExports": true, @@ -2097,16 +2027,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst bin_utils_1 = require(\"../bin_utils\");\nclass CryptoWorker {\n // @ts-ignore\n // private webCrypto = Config.Modes.webcrypto && window.crypto && (window.crypto.subtle || window.crypto.webkitSubtle); /* || window.msCrypto && window.msCrypto.subtle*/\n // private useSha1Crypto = this.webCrypto && this.webCrypto.digest !== undefined;\n // private useSha256Crypto = this.webCrypto && this.webCrypto.digest !== undefined;\n constructor() {\n this.webWorker = false;\n this.taskID = 0;\n this.awaiting = {};\n this.pending = [];\n this.debug = false;\n console.log(bin_utils_1.dT(), 'CW constructor');\n if (window.Worker /* && 1 == 2 */) {\n Promise.resolve().then(() => __importStar(require('./crypto.worker.js'))).then((CryptoWebWorker) => {\n //console.log(CryptoWebWorker);\n var tmpWorker = new CryptoWebWorker.default();\n //var tmpWorker = new Worker();\n tmpWorker.onmessage = (e) => {\n if (!this.webWorker) {\n this.webWorker = tmpWorker;\n console.info(bin_utils_1.dT(), 'CW set webWorker');\n this.releasePending();\n }\n else {\n this.finalizeTask(e.data.taskID, e.data.result);\n }\n };\n tmpWorker.onerror = (error) => {\n console.error('CW error', error /* , error.stack */);\n this.webWorker = false;\n };\n });\n }\n }\n finalizeTask(taskID, result) {\n let deferred = this.awaiting[taskID];\n if (deferred !== undefined) {\n this.debug && console.log(bin_utils_1.dT(), 'CW done', deferred.taskName, result);\n deferred.resolve(result);\n delete this.awaiting[taskID];\n }\n }\n performTaskWorker(task, ...args) {\n this.debug && console.log(bin_utils_1.dT(), 'CW start', task, args);\n return new Promise((resolve, reject) => {\n this.awaiting[this.taskID] = { resolve, reject, taskName: task };\n let params = {\n task,\n taskID: this.taskID,\n args\n };\n //(this.webWorker as Worker).postMessage(params);\n this.pending.push(params);\n this.releasePending();\n this.taskID++;\n });\n }\n releasePending() {\n if (this.webWorker) {\n this.pending.forEach(pending => {\n this.webWorker.postMessage(pending);\n });\n this.pending.length = 0;\n }\n }\n sha1Hash(bytes) {\n //if(this.webWorker) {\n return this.performTaskWorker('sha1-hash', bytes);\n //}\n /* if(this.useSha1Crypto) {\n console.error('usesha1crypto');\n // We don't use buffer since typedArray.subarray(...).buffer gives the whole buffer and not sliced one. webCrypto.digest supports typed array\n return new Promise((resolve, reject) => {\n var bytesTyped = Array.isArray(bytes) ? convertToUint8Array(bytes) : bytes;\n // console.log(dT(), 'Native sha1 start')\n \n this.webCrypto.digest({name: 'SHA-1'}, bytesTyped).then((digest: ArrayBuffer) => {\n // console.log(dT(), 'Native sha1 done')\n resolve(digest);\n }, (e: ErrorEvent) => {\n console.error('Crypto digest error', e);\n this.useSha1Crypto = false;\n resolve(sha1HashSync(bytes));\n })\n });\n }\n \n return Promise.resolve(sha1HashSync(bytes)); */\n }\n sha256Hash(bytes) {\n //if(this.webWorker) {\n return this.performTaskWorker('sha256-hash', bytes);\n //}\n /* if(this.useSha256Crypto) {\n return new Promise((resolve, reject) => {\n var bytesTyped = Array.isArray(bytes) ? convertToUint8Array(bytes) : bytes;\n // console.log(dT(), 'Native sha1 start')\n this.webCrypto.digest({name: 'SHA-256'}, bytesTyped).then((digest: ArrayBuffer) => {\n // console.log(dT(), 'Native sha1 done')\n resolve(digest);\n }, (e: ErrorEvent) => {\n console.error('Crypto digest error', e);\n this.useSha256Crypto = false;\n resolve(sha256HashSync(bytes));\n })\n });\n }\n \n return Promise.resolve(sha256HashSync(bytes)); */\n }\n pbkdf2(buffer, salt, iterations) {\n //if(this.webWorker) {\n return this.performTaskWorker('pbkdf2', buffer, salt, iterations);\n //}\n //return hash_pbkdf2(buffer, salt, iterations);\n }\n aesEncrypt(bytes, keyBytes, ivBytes) {\n //if(this.webWorker) {\n return this.performTaskWorker('aes-encrypt', bin_utils_1.convertToArrayBuffer(bytes), bin_utils_1.convertToArrayBuffer(keyBytes), bin_utils_1.convertToArrayBuffer(ivBytes));\n //}\n //return Promise.resolve(convertToArrayBuffer(aesEncryptSync(bytes, keyBytes, ivBytes)));\n }\n aesDecrypt(encryptedBytes, keyBytes, ivBytes) {\n //if(this.webWorker) {\n return this.performTaskWorker('aes-decrypt', encryptedBytes, keyBytes, ivBytes)\n .then(bytes => bin_utils_1.convertToArrayBuffer(bytes));\n //}\n //return Promise.resolve(convertToArrayBuffer(aesDecryptSync(encryptedBytes, keyBytes, ivBytes)));\n }\n rsaEncrypt(publicKey, bytes) {\n return this.performTaskWorker('rsa-encrypt', publicKey, bytes);\n }\n factorize(bytes) {\n bytes = bin_utils_1.convertToByteArray(bytes);\n //if(this.webWorker) {\n return this.performTaskWorker('factorize', bytes);\n //}\n //return Promise.resolve(pqPrimeFactorization(bytes));\n }\n modPow(x, y, m) {\n //if(this.webWorker) {\n return this.performTaskWorker('mod-pow', x, y, m);\n //}\n //return Promise.resolve(bytesModPow(x, y, m));\n }\n gzipUncompress(bytes, toString) {\n //if(this.webWorker) {\n return this.performTaskWorker('unzip', bytes, toString);\n //}\n //return Promise.resolve(gzipUncompress(bytes, toString) as T);\n }\n}\nconst cryptoWorker = new CryptoWorker();\nwindow.CryptoWorker = cryptoWorker;\nexports.default = cryptoWorker;\n" + "depth": 1, + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst mtproto_config_1 = require(\"./mtproto/mtproto_config\");\r\nclass ConfigStorage {\r\n constructor() {\r\n this.keyPrefix = '';\r\n this.noPrefix = false;\r\n this.cache = {};\r\n this.useLs = true;\r\n }\r\n storageGetPrefix() {\r\n if (this.noPrefix) {\r\n this.noPrefix = false;\r\n return '';\r\n }\r\n return this.keyPrefix;\r\n }\r\n get(keys, callback) {\r\n var single = false;\r\n if (!Array.isArray(keys)) {\r\n keys = Array.prototype.slice.call(arguments);\r\n callback = keys.pop();\r\n single = keys.length == 1;\r\n }\r\n var result = [], value;\r\n var allFound = true;\r\n var prefix = this.storageGetPrefix(), i, key;\r\n for (i = 0; i < keys.length; i++) {\r\n key = keys[i] = prefix + keys[i];\r\n if (key.substr(0, 3) != 'xt_' && this.cache[key] !== undefined) {\r\n result.push(this.cache[key]);\r\n }\r\n else if (this.useLs) {\r\n try {\r\n value = localStorage.getItem(key);\r\n }\r\n catch (e) {\r\n this.useLs = false;\r\n }\r\n try {\r\n value = (value === undefined || value === null) ? false : JSON.parse(value);\r\n }\r\n catch (e) {\r\n value = false;\r\n }\r\n result.push(this.cache[key] = value);\r\n }\r\n else {\r\n allFound = false;\r\n }\r\n }\r\n if (allFound) {\r\n return callback(single ? result[0] : result);\r\n }\r\n }\r\n set(obj, callback) {\r\n var keyValues = {};\r\n var prefix = this.storageGetPrefix(), key, value;\r\n //console.log('storageSetValue', obj, callback, arguments);\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) {\r\n value = obj[key];\r\n key = prefix + key;\r\n this.cache[key] = value;\r\n //value = value instanceof Uint8Array ? Array.from(value) : JSON.stringify(value);\r\n value = JSON.stringify(value);\r\n if (this.useLs) {\r\n try {\r\n //console.log('setItem', key, value);\r\n localStorage.setItem(key, value);\r\n }\r\n catch (e) {\r\n this.useLs = false;\r\n }\r\n }\r\n else {\r\n keyValues[key] = value;\r\n }\r\n }\r\n }\r\n if (this.useLs) {\r\n if (callback) {\r\n callback();\r\n }\r\n return;\r\n }\r\n }\r\n remove(keys, callback) {\r\n if (!Array.isArray(keys)) {\r\n keys = Array.prototype.slice.call(arguments);\r\n if (typeof keys[keys.length - 1] === 'function') {\r\n callback = keys.pop();\r\n }\r\n }\r\n var prefix = this.storageGetPrefix(), i, key;\r\n for (i = 0; i < keys.length; i++) {\r\n key = keys[i] = prefix + keys[i];\r\n delete this.cache[key];\r\n if (this.useLs) {\r\n try {\r\n localStorage.removeItem(key);\r\n }\r\n catch (e) {\r\n this.useLs = false;\r\n }\r\n }\r\n }\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n clear(callback) {\r\n if (this.useLs) {\r\n try {\r\n localStorage.clear();\r\n }\r\n catch (e) {\r\n this.useLs = false;\r\n }\r\n }\r\n this.cache = {};\r\n callback();\r\n }\r\n}\r\nconst configStorage = new ConfigStorage();\r\n/* private cache: {[key: string]: any} = {};\r\nprivate request: Promise;\r\nprivate cacheURL: string;\r\nconstructor(cacheName: string) {\r\n this.request = new Promise((resolve, reject) => {\r\n let promise = caches.open(cacheName);\r\n promise.then(cache => {\r\n cache.keys().then(requests => {\r\n if(!requests.length) {\r\n return cache.put(this.cacheURL = '/session/' + Date.now(), new Response('{}'));\r\n } else {\r\n this.cacheURL = requests[0].url;\r\n return cache.match(requests[0]).then(response => response.json()).then(j => this.cache = j);\r\n }\r\n }).then(() => {\r\n resolve(promise);\r\n });\r\n })\r\n });\r\n} */\r\nclass AppStorage {\r\n constructor() {\r\n this.taskID = 0;\r\n this.tasks = {};\r\n if (mtproto_config_1.Modes.test) {\r\n this.setPrefix('t_');\r\n }\r\n // @ts-ignore\r\n this.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\r\n }\r\n setPrefix(newPrefix) {\r\n configStorage.keyPrefix = newPrefix;\r\n }\r\n noPrefix() {\r\n configStorage.noPrefix = true;\r\n }\r\n finishTask(taskID, result) {\r\n this.tasks[taskID](result);\r\n delete this.tasks[taskID];\r\n }\r\n proxy(methodName, ..._args) {\r\n return new Promise((resolve, reject) => {\r\n if (this.isWebWorker) {\r\n this.tasks[this.taskID] = resolve;\r\n // @ts-ignore\r\n self.postMessage({ useLs: true, task: methodName, taskID: this.taskID, args: _args });\r\n this.taskID++;\r\n }\r\n else {\r\n let args = Array.prototype.slice.call(_args);\r\n args.push((result) => {\r\n resolve(result);\r\n });\r\n // @ts-ignore\r\n configStorage[methodName].apply(configStorage, args);\r\n }\r\n });\r\n }\r\n get(...args) {\r\n return this.proxy('get', ...args);\r\n }\r\n set(...args) {\r\n //console.trace(...args);\r\n return this.proxy('set', ...args);\r\n }\r\n remove(...args) {\r\n return this.proxy('remove', ...args);\r\n }\r\n clear(...args) {\r\n return this.proxy('clear', ...args);\r\n }\r\n}\r\nexports.default = new AppStorage();\r\n" }, { "id": 8, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/polyfill.ts", - "name": "./src/lib/polyfill.ts", - "index": 39, - "index2": 30, - "size": 1324, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\scrollable.ts", + "name": "./src/components/scrollable.ts", + "index": 24, + "index2": 28, + "size": 40193, "cacheable": true, "built": true, "optional": false, @@ -2114,44 +2044,34 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "issuerId": 1, - "issuerName": "./src/lib/mtproto/apiManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "issuerId": 35, + "issuerName": "./src/pages/pageSignIn.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "dependencies": 1062 } } ], "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 527, + "building": 1006, + "dependencies": 2 }, "failed": false, "errors": 0, @@ -2159,76 +2079,67 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", - "type": "cjs require", - "userRequest": "../polyfill", - "loc": "31:19-41" - }, - { - "moduleId": 9, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", - "type": "cjs require", - "userRequest": "../polyfill", - "loc": "19:19-41" - }, - { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", "module": "./src/lib/appManagers/appImManager.ts", "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../polyfill", - "loc": "34:19-41" + "userRequest": "../../components/scrollable", + "loc": "28:37-75" }, { "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", + "module": "./src/lib/appManagers/appDialogsManager.ts", + "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", - "userRequest": "../polyfill", - "loc": "15:19-41" + "userRequest": "../../components/scrollable", + "loc": "22:37-75" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", + "type": "cjs require", + "userRequest": "../components/scrollable", + "loc": "7:37-72" + }, + { + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", "module": "./src/lib/appManagers/appSidebarRight.ts", "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "../polyfill", - "loc": "15:19-41" + "userRequest": "../../components/scrollable", + "loc": "14:37-75" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 41, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "module": "./src/components/appSearch.ts", + "moduleName": "./src/components/appSearch.ts", "type": "cjs require", - "userRequest": "../polyfill", - "loc": "11:19-41" + "userRequest": "./scrollable", + "loc": "7:37-60" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", "type": "cjs require", - "userRequest": "../polyfill", - "loc": "33:19-41" + "userRequest": "./scrollable", + "loc": "13:37-60" }, { "moduleId": 71, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/websocket.ts", - "module": "./src/lib/mtproto/transports/websocket.ts", - "moduleName": "./src/lib/mtproto/transports/websocket.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "module": "./src/components/emoticonsDropdown.ts", + "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "../../polyfill", - "loc": "9:19-44" + "userRequest": "./scrollable", + "loc": "17:37-60" } ], "usedExports": true, @@ -2236,16 +2147,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst bin_utils_1 = require(\"./bin_utils\");\nconst mtproto_1 = require(\"./mtproto/mtproto\");\nfunction logger(prefix) {\n function Log(...args) {\n return console.log(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\n }\n Log.warn = function (...args) {\n return console.warn(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\n };\n Log.info = function (...args) {\n return console.info(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\n };\n Log.error = function (...args) {\n return console.error(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\n };\n Log.trace = function (...args) {\n return console.trace(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\n };\n return Log;\n}\nexports.logger = logger;\n;\nObject.defineProperty(Uint8Array.prototype, 'hex', {\n get: function () {\n return bin_utils_1.bytesToHex([...this]);\n },\n set: function (str) {\n this.set(bin_utils_1.bytesFromHex(str));\n },\n enumerable: true,\n configurable: true\n});\nUint8Array.prototype.randomize = function () {\n mtproto_1.MTProto.secureRandom.nextBytes(this);\n return this;\n};\nUint8Array.prototype.concat = function (...args) {\n return bin_utils_1.bufferConcats(this, ...args);\n};\n" + "depth": 2, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../lib/utils\");\r\nrequire(\"fastdom/fastdom.min\");\r\n//import 'fastdom/src/fastdom-strict'; // exclude in production\r\nconst fastdom_promised_1 = __importDefault(require(\"fastdom/extensions/fastdom-promised\"));\r\nconst polyfill_1 = require(\"../lib/polyfill\");\r\n//const fastdom = FastDom.extend(FastDomPromised);\r\nconst fastdom = window.fastdom.extend(fastdom_promised_1.default);\r\n//(window as any).fastdom.strict(false);\r\nsetTimeout(() => {\r\n //(window as any).fastdom.strict(true);\r\n}, 5e3);\r\n/*\r\nvar el = $0;\r\nvar height = 0;\r\nvar checkUp = false;\r\n\r\ndo {\r\n height += el.scrollHeight;\r\n} while(el = (checkUp ? el.previousElementSibling : el.nextElementSibling));\r\nconsole.log(height);\r\n*/\r\nclass Scrollable {\r\n constructor(el, axis = 'y', splitOffset = 300, logPrefix = '', appendTo = el, onScrollOffset = splitOffset) {\r\n this.el = el;\r\n this.splitOffset = splitOffset;\r\n this.appendTo = appendTo;\r\n this.onScrollOffset = onScrollOffset;\r\n this.scrollSize = -1; // it will be scrollHeight\r\n this.size = 0; // it will be outerHeight of container (not scrollHeight)\r\n this.thumbSize = 0;\r\n this.visibleElements = [];\r\n this.hiddenElements = {\r\n up: [],\r\n down: []\r\n };\r\n this.paddings = { up: 0, down: 0 };\r\n this.onAddedBottom = null;\r\n this.onScrolledTop = null;\r\n this.onScrolledBottom = null;\r\n this.onScrolledTopFired = false;\r\n this.onScrolledBottomFired = false;\r\n this.splitMeasureTop = null;\r\n this.splitMeasureBottom = null;\r\n this.splitMeasureAdd = null;\r\n this.splitMeasureRemoveBad = null;\r\n this.splitMutateTop = null;\r\n this.splitMutateBottom = null;\r\n this.splitMutateRemoveBad = null;\r\n this.splitMutateIntersectionTop = null;\r\n this.splitMutateIntersectionBottom = null;\r\n this.getScrollHeightPromises = [];\r\n this.onScrollMeasure = null;\r\n this.lastScrollTop = 0;\r\n this.scrollTopOffset = 0;\r\n this.disableHoverTimeout = 0;\r\n this.debug = false;\r\n this.prependLocked = false;\r\n this.appendLocked = false;\r\n this.prependFragment = null;\r\n this.appendFragment = null;\r\n this.prependFragmentId = 0;\r\n this.appendFragmentId = 0;\r\n this.container = document.createElement('div');\r\n this.container.classList.add('scrollable');\r\n if (!appendTo) {\r\n this.appendTo = this.container;\r\n }\r\n this.log = polyfill_1.logger('SCROLL' + (logPrefix ? '-' + logPrefix : ''));\r\n this.measureMutex = polyfill_1.deferredPromise();\r\n this.measureMutex.resolve();\r\n if (axis == 'x') {\r\n this.container.classList.add('scrollable-x');\r\n this.type = 'width';\r\n this.side = 'left';\r\n this.translate = 'translateX';\r\n this.scrollType = 'scrollWidth';\r\n this.scrollSide = 'scrollLeft';\r\n this.clientAxis = 'clientX';\r\n this.clientSize = 'clientWidth';\r\n let scrollHorizontally = (e) => {\r\n e = window.event || e;\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n this.container.scrollLeft -= (delta * 20);\r\n e.preventDefault();\r\n };\r\n if (this.container.addEventListener) {\r\n // IE9, Chrome, Safari, Opera\r\n this.container.addEventListener(\"mousewheel\", scrollHorizontally, false);\r\n // Firefox\r\n this.container.addEventListener(\"DOMMouseScroll\", scrollHorizontally, false);\r\n }\r\n else {\r\n // IE 6/7/8\r\n // @ts-ignore\r\n this.container.attachEvent(\"onmousewheel\", scrollHorizontally);\r\n }\r\n }\r\n else if (axis == 'y') {\r\n this.container.classList.add('scrollable-y');\r\n this.type = 'height';\r\n this.side = 'top';\r\n this.translate = 'translateY';\r\n this.scrollType = 'scrollHeight';\r\n this.scrollSide = 'scrollTop';\r\n this.clientAxis = 'clientY';\r\n this.clientSize = 'clientHeight';\r\n }\r\n else {\r\n throw new Error('no side for scroll');\r\n }\r\n this.thumb = document.createElement('div');\r\n this.thumb.className = 'scrollbar-thumb';\r\n // @ts-ignore\r\n this.thumb.style[this.type] = '30px';\r\n // mouse scroll\r\n let onMouseMove = (e) => {\r\n let rect = this.thumb.getBoundingClientRect();\r\n let diff;\r\n // @ts-ignore\r\n diff = e[this.clientAxis] - rect[this.side];\r\n // @ts-ignore\r\n this.container[this.scrollSide] += diff * 0.5;\r\n // console.log('onMouseMove', e, diff);\r\n utils_1.cancelEvent(e);\r\n };\r\n this.thumb.addEventListener('mousedown', () => {\r\n window.addEventListener('mousemove', onMouseMove);\r\n window.addEventListener('mouseup', () => {\r\n window.removeEventListener('mousemove', onMouseMove);\r\n }, { once: true });\r\n });\r\n //this.container.addEventListener('mouseover', this.resize.bind(this)); // omg\r\n window.addEventListener('resize', () => {\r\n setTimeout(() => {\r\n // @ts-ignore\r\n this.size = this.container[this.clientSize];\r\n this.onScroll();\r\n this.resize();\r\n }, 0);\r\n });\r\n this.paddingTopDiv = document.createElement('div');\r\n this.paddingTopDiv.classList.add('scroll-padding');\r\n this.paddingBottomDiv = document.createElement('div');\r\n this.paddingBottomDiv.classList.add('scroll-padding');\r\n this.container.addEventListener('scroll', () => this.onScroll(), { passive: true, capture: true });\r\n Array.from(el.children).forEach(c => this.container.append(c));\r\n el.append(this.container);\r\n window.requestAnimationFrame(() => {\r\n // @ts-ignore\r\n this.size = this.container[this.clientSize];\r\n this.resize();\r\n });\r\n this.container.parentElement.append(this.thumb);\r\n }\r\n detachTop(fromIndex, needHeight = 0, detachAll = false) {\r\n //if(this.splitMeasureBottom) fastdom.clear(this.splitMeasureBottom);\r\n if (this.splitMutateBottom)\r\n fastdom.clear(this.splitMutateBottom);\r\n if (this.prependLocked)\r\n return;\r\n //return this.splitMeasureBottom = fastdom.measure(() => {\r\n return this.splitMutateBottom = fastdom.mutate(() => {\r\n if (this.prependLocked)\r\n return;\r\n let spliceTo = -1;\r\n let needToDetachHeight = needHeight;\r\n for (; fromIndex >= 0; --fromIndex) {\r\n let child = this.visibleElements[fromIndex];\r\n if (needHeight > 0) {\r\n needHeight -= child.height;\r\n }\r\n else {\r\n needToDetachHeight -= child.height;\r\n if (spliceTo === -1) {\r\n spliceTo = fromIndex;\r\n }\r\n }\r\n }\r\n if ((needToDetachHeight > 0 && !detachAll) || spliceTo === -1)\r\n return;\r\n //if(this.splitMutateBottom) fastdom.clear(this.splitMutateBottom);\r\n //return this.splitMutateBottom = fastdom.mutate(() => {\r\n let spliced = this.visibleElements.splice(0, spliceTo + 1);\r\n if (this.debug) {\r\n this.log('spliced up', spliced);\r\n }\r\n spliced.forEach((child, idx) => {\r\n if (!child.element.parentElement) {\r\n this.log.error('no child in splitUp (up):', child, child.element, 0, spliceTo + 1, idx, spliced);\r\n }\r\n this.paddings.up += child.height;\r\n this.splitUp.removeChild(child.element);\r\n });\r\n this.hiddenElements.up.push(...spliced);\r\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\r\n //});\r\n });\r\n }\r\n detachBottom(fromIndex, needHeight = 0, detachAll = false) {\r\n //if(this.splitMeasureBottom) fastdom.clear(this.splitMeasureBottom);\r\n if (this.splitMutateBottom)\r\n fastdom.clear(this.splitMutateBottom);\r\n if (this.appendLocked)\r\n return;\r\n //return this.splitMeasureBottom = fastdom.measure(() => {\r\n return this.splitMutateBottom = fastdom.mutate(() => {\r\n if (this.appendLocked)\r\n return;\r\n let spliceFrom = -1;\r\n let spliceTo = 0;\r\n let needToDetachHeight = needHeight;\r\n let length = this.visibleElements.length;\r\n for (; fromIndex < length; ++fromIndex) {\r\n let child = this.visibleElements[fromIndex];\r\n if (needHeight > 0) {\r\n needHeight -= child.height;\r\n }\r\n else {\r\n needToDetachHeight -= child.height;\r\n if (spliceFrom === -1)\r\n spliceFrom = fromIndex;\r\n spliceTo = fromIndex;\r\n }\r\n }\r\n if ((needToDetachHeight > 0 && !detachAll) || spliceFrom === -1)\r\n return;\r\n //if(this.splitMutateBottom) fastdom.clear(this.splitMutateBottom);\r\n //return this.splitMutateBottom = fastdom.mutate(() => {\r\n let spliced = this.visibleElements.splice(spliceFrom, spliceTo - spliceFrom + 1);\r\n if (this.debug) {\r\n this.log('spliced down', spliced, spliceFrom, spliceTo - spliceFrom + 1, length);\r\n }\r\n spliced.forEach((child, idx) => {\r\n if (!child.element.parentElement) {\r\n this.log.error('no child in splitUp (down):', child, child.element, spliceFrom, spliceTo - spliceFrom + 1, idx, spliced);\r\n }\r\n this.paddings.down += child.height;\r\n this.splitUp.removeChild(child.element);\r\n });\r\n this.hiddenElements.down.unshift(...spliced);\r\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\r\n //});\r\n });\r\n }\r\n resize() {\r\n //console.time('scroll resize');\r\n //fastdom.mutate(() => {\r\n if (!this.size || this.size == this.scrollSize) {\r\n this.thumbSize = 0;\r\n // @ts-ignore\r\n this.thumb.style[this.type] = this.thumbSize + 'px';\r\n //console.timeEnd('scroll resize');\r\n return;\r\n }\r\n //if(!height) return;\r\n let divider = this.scrollSize / this.size / 0.5;\r\n this.thumbSize = this.size / divider;\r\n if (this.thumbSize < 20)\r\n this.thumbSize = 20;\r\n // @ts-ignore\r\n this.thumb.style[this.type] = this.thumbSize + 'px';\r\n //});\r\n //console.timeEnd('scroll resize');\r\n // @ts-ignore\r\n //console.log('onresize', thumb.style[type], thumbHeight, height);\r\n }\r\n setVirtualContainer(el) {\r\n this.splitUp = el;\r\n this.onScrolledBottomFired = this.onScrolledTopFired = false;\r\n this.hiddenElements.up.length = this.hiddenElements.down.length = this.visibleElements.length = 0;\r\n this.paddings.up = this.paddings.down = 0;\r\n this.lastScrollTop = 0;\r\n this.paddingTopDiv.style.height = '';\r\n this.paddingBottomDiv.style.height = '';\r\n this.log('setVirtualContainer:', el, this);\r\n this.getScrollTopOffset();\r\n if (el) {\r\n fastdom.mutate(() => {\r\n el.parentElement.insertBefore(this.paddingTopDiv, el);\r\n el.parentNode.insertBefore(this.paddingBottomDiv, el.nextSibling);\r\n });\r\n }\r\n else {\r\n this.paddingTopDiv.remove();\r\n this.paddingBottomDiv.remove();\r\n }\r\n }\r\n get state() {\r\n return {\r\n hiddenElements: {\r\n up: this.hiddenElements.up.slice(),\r\n down: this.hiddenElements.down.slice(),\r\n },\r\n paddings: {\r\n up: this.paddings.up,\r\n down: this.paddings.down\r\n },\r\n visibleElements: this.visibleElements.slice(),\r\n scrollSize: this.scrollSize\r\n };\r\n }\r\n set state(state) {\r\n this.visibleElements = state.visibleElements;\r\n this.hiddenElements = state.hiddenElements;\r\n this.paddings = state.paddings;\r\n this.scrollSize = state.scrollSize;\r\n fastdom.mutate(() => {\r\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\r\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\r\n this.onScroll();\r\n });\r\n }\r\n getScrollTopOffset() {\r\n if (this.splitUp && this.splitUp.parentElement && this.splitUp.parentElement != this.container) { // need to find offset\r\n fastdom.measure(() => {\r\n let rect = this.splitUp.getBoundingClientRect();\r\n let containerRect = this.container.getBoundingClientRect();\r\n this.scrollTopOffset = rect.top - containerRect.top;\r\n this.log('set scrollTopOffset to:', this.scrollTopOffset);\r\n });\r\n }\r\n else {\r\n this.scrollTopOffset = 0;\r\n }\r\n }\r\n onScroll() {\r\n //return;\r\n if (this.debug) {\r\n this.log('onScroll call', this.onScrollMeasure);\r\n }\r\n let appendTo = this.splitUp || this.appendTo;\r\n clearTimeout(this.disableHoverTimeout);\r\n if (this.el != this.appendTo && this.appendTo != this.container) {\r\n if (!appendTo.classList.contains('disable-hover')) {\r\n appendTo.classList.add('disable-hover');\r\n }\r\n }\r\n this.disableHoverTimeout = setTimeout(() => {\r\n appendTo.classList.remove('disable-hover');\r\n if (!this.measureMutex.isFulfilled) {\r\n this.measureMutex.resolve();\r\n }\r\n }, 100);\r\n if (this.onScrollMeasure)\r\n return; //window.cancelAnimationFrame(this.onScrollMeasure);\r\n this.onScrollMeasure = window.requestAnimationFrame(() => {\r\n // @ts-ignore\r\n let scrollPos = this.container[this.scrollSide];\r\n if (this.measureMutex.isFulfilled) {\r\n // @ts-ignore quick brown fix\r\n this.size = this.container[this.clientSize];\r\n // @ts-ignore\r\n let scrollSize = this.container[this.scrollType];\r\n if (scrollSize != this.scrollSize || this.thumbSize == 0) {\r\n this.scrollSize = scrollSize;\r\n this.resize();\r\n }\r\n else\r\n this.scrollSize = scrollSize;\r\n this.measureMutex = polyfill_1.deferredPromise();\r\n }\r\n // let value = scrollPos / (this.scrollSize - this.size) * 100;\r\n // let maxValue = 100 - (this.thumbSize / this.size * 100);\r\n let value = scrollPos / (this.scrollSize - this.size) * this.size;\r\n let maxValue = this.size - this.thumbSize;\r\n //this.log(scrollPos, this.scrollSize, this.size, value, scrollPos / (this.scrollSize - this.size) * this.size);\r\n let scrollTop = scrollPos - this.scrollTopOffset;\r\n let maxScrollTop = this.scrollSize - this.scrollTopOffset - this.size;\r\n // @ts-ignore\r\n this.thumb.style.transform = this.translate + '(' + (value >= maxValue ? maxValue : value) + 'px)';\r\n if (this.onScrolledBottom) {\r\n if (!this.hiddenElements.down.length && (maxScrollTop - scrollTop) <= this.onScrollOffset) {\r\n //if(!this.onScrolledBottomFired) {\r\n this.onScrolledBottomFired = true;\r\n this.onScrolledBottom();\r\n //}\r\n }\r\n else {\r\n this.onScrolledBottomFired = false;\r\n }\r\n }\r\n if (this.onScrolledTop) {\r\n //this.log('onScrolledTop:', scrollTop, this.onScrollOffset);\r\n if (!this.hiddenElements.up.length && scrollTop <= this.onScrollOffset) {\r\n if ( /* !this.onScrolledTopFired */!this.prependLocked) {\r\n this.onScrolledTopFired = true;\r\n this.onScrolledTop();\r\n }\r\n }\r\n else {\r\n this.onScrolledTopFired = false;\r\n }\r\n }\r\n if (!this.splitUp) {\r\n this.onScrollMeasure = 0;\r\n return;\r\n }\r\n let perf = performance.now();\r\n if (scrollTop < 0)\r\n scrollTop = 0;\r\n else if (scrollTop > maxScrollTop)\r\n scrollTop = maxScrollTop;\r\n let toBottom = scrollTop > this.lastScrollTop;\r\n let visibleFrom = scrollTop - this.paddings.up;\r\n let visibleUntil = visibleFrom + this.size;\r\n let sum = 0;\r\n let firstVisibleElementIndex = -1;\r\n let lastVisibleElementIndex = -1;\r\n let needHeight = this.splitOffset;\r\n let length = this.visibleElements.length;\r\n this.visibleElements.forEach((child, idx) => {\r\n if (sum < visibleUntil && (sum + child.height) >= visibleFrom && firstVisibleElementIndex === -1) { // if any part is in viewport\r\n firstVisibleElementIndex = idx;\r\n }\r\n if (sum < visibleUntil && firstVisibleElementIndex !== -1) {\r\n lastVisibleElementIndex = idx;\r\n }\r\n sum += child.height;\r\n //this.log(sum, element);\r\n });\r\n if (lastVisibleElementIndex === -1 && firstVisibleElementIndex !== -1) {\r\n lastVisibleElementIndex = firstVisibleElementIndex;\r\n }\r\n // возможно устанавливать прошлый скролл нужно уже после этого промиса, т.к. он может очиститься\r\n if (scrollTop == this.lastScrollTop) {\r\n if (this.debug) {\r\n this.log('onScroll ==', (performance.now() - perf).toFixed(3), length, scrollTop, maxScrollTop, toBottom, firstVisibleElementIndex, lastVisibleElementIndex, visibleFrom, visibleUntil, this.scrollTopOffset, this.scrollSize);\r\n }\r\n this.lastScrollTop = scrollTop;\r\n if (firstVisibleElementIndex !== -1)\r\n this.detachTop(firstVisibleElementIndex, needHeight);\r\n if (lastVisibleElementIndex !== -1)\r\n this.detachBottom(lastVisibleElementIndex, needHeight);\r\n this.onScrollMeasure = 0;\r\n return;\r\n }\r\n /* {\r\n this.log('onScroll', (performance.now() - perf).toFixed(3), length, scrollTop,\r\n toBottom, firstVisibleElement, lastVisibleElement, visibleFrom, visibleUntil);\r\n return {value, maxValue};\r\n } */\r\n if (toBottom) { // scrolling bottom\r\n if (firstVisibleElementIndex !== -1) {\r\n if (this.debug) {\r\n this.log('will detach top by:', firstVisibleElementIndex, needHeight);\r\n }\r\n this.detachTop(firstVisibleElementIndex, needHeight);\r\n for (let i = lastVisibleElementIndex + 1; i < length; ++i) {\r\n needHeight -= this.visibleElements[i].height;\r\n }\r\n if (needHeight >= this.splitOffset) {\r\n //this.detachTop(firstVisibleElementIndex, this.splitOffset);\r\n this.onBottomIntersection(needHeight);\r\n }\r\n }\r\n else if (length) { // scrolled manually or safari\r\n if (this.debug) {\r\n this.log.warn('will detach all of top', length, this.splitUp.childElementCount, maxScrollTop, this.paddings, this.lastScrollTop);\r\n }\r\n this.detachTop(this.visibleElements.length - 1, 0, true).then(() => {\r\n this.onManualScrollBottom(scrollTop, needHeight);\r\n });\r\n }\r\n else if (this.paddings.down) { // scrolled manually or safari\r\n if (this.debug) {\r\n this.log.warn('seems manually scrolled bottom', this.paddings.up, this.lastScrollTop);\r\n }\r\n this.onManualScrollBottom(scrollTop, needHeight);\r\n }\r\n }\r\n else { // scrolling top\r\n if (lastVisibleElementIndex !== -1) {\r\n if (this.debug) {\r\n this.log('will detach bottom by:', lastVisibleElementIndex, needHeight);\r\n }\r\n //if((lastVisibleElementIndex + 1) < length) {\r\n this.detachBottom(lastVisibleElementIndex, needHeight);\r\n //}\r\n for (let i = firstVisibleElementIndex - 1; i >= 0; --i) {\r\n needHeight -= this.visibleElements[i].height;\r\n }\r\n if (needHeight >= this.splitOffset) {\r\n //this.detachBottom(lastVisibleElementIndex, this.splitOffset);\r\n this.onTopIntersection(needHeight);\r\n }\r\n }\r\n else if (length) { // scrolled manually or safari\r\n if (this.debug) {\r\n this.log.warn('will detach all of bottom', length, this.splitUp.childElementCount, maxScrollTop, this.paddings, this.lastScrollTop);\r\n }\r\n this.detachBottom(0, 0, true).then(() => {\r\n this.onManualScrollTop(scrollTop, needHeight, maxScrollTop);\r\n });\r\n }\r\n else if (this.paddings.up) {\r\n if (this.debug) {\r\n this.log.warn('seems manually scrolled top', this.paddings.down, this.lastScrollTop);\r\n }\r\n this.onManualScrollTop(scrollTop, needHeight, maxScrollTop);\r\n }\r\n }\r\n if (this.debug) {\r\n this.log('onScroll', (performance.now() - perf).toFixed(3), length, scrollTop, maxScrollTop, toBottom, firstVisibleElementIndex, lastVisibleElementIndex, visibleFrom, visibleUntil, this.scrollTopOffset);\r\n }\r\n this.lastScrollTop = scrollTop;\r\n this.onScrollMeasure = 0;\r\n });\r\n }\r\n onManualScrollTop(scrollTop, needHeight, maxScrollTop) {\r\n //if(this.splitMutateRemoveBad) fastdom.clear(this.splitMutateRemoveBad);\r\n this.splitMutateRemoveBad = fastdom.mutate(() => {\r\n let h = maxScrollTop - (scrollTop + this.size);\r\n while (this.paddings.down < h && this.paddings.up) {\r\n let child = this.hiddenElements.up.pop();\r\n this.hiddenElements.down.unshift(child);\r\n this.paddings.down += child.height;\r\n this.paddings.up -= child.height;\r\n }\r\n if (this.debug) {\r\n this.log.warn('manual scroll top', this, length, this.splitUp.childElementCount, scrollTop, this.paddings.up, h);\r\n }\r\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\r\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\r\n if (!this.paddings.up)\r\n this.onBottomIntersection((this.size * 2) + (needHeight * 2));\r\n else\r\n this.onTopIntersection((this.size * 2) + (needHeight * 2));\r\n });\r\n }\r\n onManualScrollBottom(scrollTop, needHeight) {\r\n //if(this.splitMutateRemoveBad) fastdom.clear(this.splitMutateRemoveBad);\r\n this.splitMutateRemoveBad = fastdom.mutate(() => {\r\n let h = scrollTop - needHeight;\r\n while (this.paddings.up < h && this.paddings.down) {\r\n let child = this.hiddenElements.down.shift();\r\n this.hiddenElements.up.push(child);\r\n this.paddings.up += child.height;\r\n this.paddings.down -= child.height;\r\n }\r\n if (this.debug) {\r\n this.log.warn('manual scroll bottom', this, length, this.splitUp.childElementCount, scrollTop, this.paddings.down, h);\r\n }\r\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\r\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\r\n if (!this.paddings.down)\r\n this.onTopIntersection(this.size + (needHeight * 2));\r\n else\r\n this.onBottomIntersection(this.size + (needHeight * 2));\r\n });\r\n }\r\n onTopIntersection(needHeight) {\r\n if (this.debug) {\r\n this.log('onTopIntersection', needHeight, this);\r\n }\r\n if (this.splitMutateIntersectionBottom)\r\n fastdom.clear(this.splitMutateIntersectionBottom);\r\n this.splitMutateIntersectionBottom = fastdom.mutate(() => {\r\n if (this.hiddenElements.up.length && this.paddings.up) {\r\n let fragment = document.createDocumentFragment();\r\n while (needHeight > 0 && this.paddings.up) {\r\n let child = this.hiddenElements.up.pop();\r\n // console.log('top returning from hidden', child);\r\n if (!child) {\r\n this.paddings.up = 0;\r\n break;\r\n }\r\n this.visibleElements.unshift(child);\r\n fragment.prepend(child.element);\r\n needHeight -= child.height;\r\n this.paddings.up -= child.height;\r\n }\r\n this.splitUp.prepend(fragment);\r\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\r\n }\r\n else {\r\n this.paddingTopDiv.style.height = '0px';\r\n }\r\n });\r\n }\r\n onBottomIntersection(needHeight) {\r\n if (this.debug) {\r\n this.log('onBottomIntersection', needHeight, this);\r\n }\r\n if (this.splitMutateIntersectionBottom)\r\n fastdom.clear(this.splitMutateIntersectionBottom);\r\n this.splitMutateIntersectionBottom = fastdom.mutate(() => {\r\n if (this.hiddenElements.down.length && this.paddings.down) {\r\n let fragment = document.createDocumentFragment();\r\n while (needHeight > 0 && this.paddings.down) {\r\n let child = this.hiddenElements.down.shift();\r\n if (!child) {\r\n this.paddings.down = 0;\r\n break;\r\n }\r\n this.visibleElements.push(child);\r\n fragment.appendChild(child.element);\r\n needHeight -= child.height;\r\n this.paddings.down -= child.height;\r\n }\r\n this.splitUp.appendChild(fragment);\r\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\r\n /* if(this.debug) {\r\n this.log('onBottomIntersection append:', fragment, needHeight);\r\n } */\r\n if (this.onAddedBottom)\r\n this.onAddedBottom();\r\n }\r\n else {\r\n this.paddingBottomDiv.style.height = '0px';\r\n }\r\n });\r\n }\r\n prepend(element) {\r\n if (this.splitUp) {\r\n this.removeElement(element);\r\n if (this.hiddenElements.up.length && !this.prependLocked) {\r\n this.splitUp.prepend(element);\r\n let height = element.scrollHeight;\r\n this.log('will append element to up hidden', element, height);\r\n this.paddings.up += height;\r\n this.hiddenElements.up.unshift({\r\n element: element,\r\n height: height\r\n });\r\n element.parentElement.removeChild(element);\r\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\r\n this.onScroll();\r\n }\r\n else {\r\n this.splitUp.prepend(element);\r\n let el = { element, height: 0 };\r\n this.visibleElements.unshift(el);\r\n fastdom.measure(() => {\r\n if (!element.parentElement)\r\n return;\r\n let height = element.scrollHeight;\r\n el.height = height;\r\n this.scrollSize += height;\r\n });\r\n this.onScroll();\r\n }\r\n }\r\n else {\r\n this.appendTo.prepend(element);\r\n this.visibleElements.unshift({ element, height: 0 });\r\n //this.onScroll();\r\n }\r\n //this.onScroll();\r\n }\r\n append(element) {\r\n if (this.splitUp) {\r\n this.removeElement(element);\r\n if (this.hiddenElements.down.length && !this.appendLocked) {\r\n fastdom.mutate(() => {\r\n this.splitUp.append(element);\r\n }).then(() => {\r\n return fastdom.measure(() => {\r\n let height = element.scrollHeight;\r\n this.log('will append element to down hidden', element, height);\r\n this.paddings.down += height;\r\n this.hiddenElements.down.push({\r\n element: element,\r\n height: height\r\n });\r\n });\r\n }).then(() => {\r\n fastdom.mutate(() => {\r\n if (element.parentElement) {\r\n element.parentElement.removeChild(element);\r\n }\r\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\r\n this.onScroll();\r\n });\r\n });\r\n }\r\n else {\r\n this.splitUp.append(element);\r\n let el = { element, height: 0 };\r\n this.visibleElements.push(el);\r\n fastdom.measure(() => {\r\n if (!element.parentElement)\r\n return;\r\n let height = element.scrollHeight;\r\n el.height = height;\r\n this.scrollSize += height;\r\n });\r\n this.onScroll();\r\n }\r\n }\r\n else {\r\n this.appendTo.append(element);\r\n this.visibleElements.push({ element, height: 0 });\r\n //this.onScroll();\r\n }\r\n //this.onScroll();\r\n }\r\n prependByBatch(element) {\r\n var _a;\r\n let perf = performance.now();\r\n let fragment = (_a = this.prependFragment) !== null && _a !== void 0 ? _a : (this.prependFragment = document.createDocumentFragment());\r\n fragment.prepend(element);\r\n if (this.prependFragmentId)\r\n window.cancelAnimationFrame(this.prependFragmentId);\r\n this.prependFragmentId = window.requestAnimationFrame(() => {\r\n this.prependFragment = null;\r\n this.prependFragmentId = 0;\r\n for (let length = fragment.childElementCount, i = length - 1; i >= 0; --i) {\r\n let element = fragment.children[i];\r\n this.visibleElements.unshift({ element, height: 0 });\r\n }\r\n this.log('prependByBatch perf:', performance.now() - perf, fragment.childElementCount);\r\n this.appendTo.prepend(fragment);\r\n //this.onScroll();\r\n });\r\n }\r\n appendByBatch(element) {\r\n var _a;\r\n let fragment = (_a = this.appendFragment) !== null && _a !== void 0 ? _a : (this.appendFragment = document.createDocumentFragment());\r\n fragment.append(element);\r\n if (this.appendFragmentId)\r\n window.cancelAnimationFrame(this.appendFragmentId);\r\n this.appendFragmentId = window.requestAnimationFrame(() => {\r\n this.appendFragment = null;\r\n this.appendFragmentId = 0;\r\n for (let i = 0, length = fragment.childElementCount; i < length; ++i) {\r\n let element = fragment.children[i];\r\n this.visibleElements.push({ element, height: 0 });\r\n }\r\n this.appendTo.append(fragment);\r\n //this.onScroll();\r\n });\r\n }\r\n contains(element) {\r\n if (!this.splitUp) {\r\n return this.appendTo.contains(element);\r\n }\r\n return !!element.parentElement || !!this.hiddenElements.up.find(c => c.element == element) || !!this.hiddenElements.down.find(c => c.element == element);\r\n }\r\n removeElement(element) {\r\n if (!this.splitUp) {\r\n if (element.parentElement) {\r\n element.remove();\r\n }\r\n return;\r\n }\r\n else {\r\n if (this.splitUp.contains(element)) {\r\n //fastdom.mutate(() => this.splitUp.removeChild(element));\r\n this.splitUp.removeChild(element);\r\n return;\r\n }\r\n }\r\n let child = this.hiddenElements.up.findAndSplice(c => c.element == element);\r\n let foundUp = false;\r\n if (child) {\r\n this.paddings.up -= child.height;\r\n foundUp = true;\r\n }\r\n else {\r\n child = this.hiddenElements.down.findAndSplice(c => c.element == element);\r\n if (child) {\r\n this.paddings.down -= child.height;\r\n }\r\n }\r\n if (!child)\r\n return;\r\n //fastdom.mutate(() => { \r\n if (foundUp) {\r\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\r\n }\r\n else {\r\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\r\n }\r\n //});\r\n return child;\r\n }\r\n insertBefore(newChild, refChild, height) {\r\n this.log('insertBefore', newChild, newChild.textContent, refChild);\r\n //return;\r\n if (!this.splitUp) {\r\n let ret = this.appendTo.insertBefore(newChild, refChild);\r\n this.onScroll();\r\n return ret;\r\n }\r\n if (this.splitUp) {\r\n let index = -1;\r\n index = this.hiddenElements.up.findIndex(c => c.element == refChild);\r\n let child = this.removeElement(newChild);\r\n if (child) {\r\n height = child.height;\r\n }\r\n else if (height === undefined) {\r\n let p = this.getScrollHeightPromises.find(p => p.element == newChild);\r\n if (!p)\r\n p = { element: newChild, task: null };\r\n else\r\n fastdom.clear(p.task);\r\n let promise;\r\n return p.task = promise = fastdom.mutate(() => {\r\n this.splitUp.append(newChild);\r\n return fastdom.measure(() => {\r\n if (p.task != promise)\r\n return;\r\n let height = newChild.scrollHeight;\r\n return fastdom.mutate(() => {\r\n if (p.task != promise || !newChild.parentElement)\r\n return;\r\n this.splitUp.removeChild(newChild);\r\n this.insertBefore(newChild, refChild, height);\r\n this.getScrollHeightPromises = this.getScrollHeightPromises.filter(p => p.element != newChild);\r\n return height;\r\n });\r\n });\r\n });\r\n }\r\n if (index !== -1) {\r\n this.hiddenElements.up.splice(index, 0, { element: newChild, height: height });\r\n this.paddings.up += height;\r\n fastdom.mutate(() => {\r\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\r\n this.onScroll();\r\n });\r\n return index;\r\n }\r\n else {\r\n index = this.hiddenElements.down.findIndex(c => c.element == refChild);\r\n if (index !== -1) {\r\n this.hiddenElements.down.splice(index, 0, { element: newChild, height: height });\r\n this.paddings.down += height;\r\n fastdom.mutate(() => {\r\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\r\n this.onScroll();\r\n });\r\n return index;\r\n }\r\n }\r\n fastdom.mutate(() => {\r\n this.log('inserting', newChild, 'before', refChild, this.splitUp.contains(refChild));\r\n if (!this.splitUp.contains(refChild)) {\r\n this.log.error('no refChild in splitUp', refChild, newChild, this.hiddenElements);\r\n return;\r\n }\r\n this.splitUp.insertBefore(newChild, refChild);\r\n this.onScroll();\r\n });\r\n return;\r\n }\r\n }\r\n scrollIntoView(element) {\r\n if (element.parentElement) {\r\n element.scrollIntoView();\r\n }\r\n else if (this.splitUp) {\r\n let index = this.hiddenElements.up.findIndex(e => e.element == element);\r\n let y = 0;\r\n if (index !== -1) {\r\n for (let i = 0; i < index; ++i) {\r\n y += this.hiddenElements.up[i].height;\r\n }\r\n this.scrollTop = y;\r\n }\r\n else if ((index = this.hiddenElements.down.findIndex(e => e.element == element)) !== -1) {\r\n y += this.paddings.up + this.size;\r\n for (let i = 0; i < index; ++i) {\r\n y += this.hiddenElements.down[i].height;\r\n }\r\n this.scrollTop = y;\r\n }\r\n }\r\n }\r\n lock(side = 'down') {\r\n if (side == 'top')\r\n this.prependLocked = true;\r\n else if (side == 'down')\r\n this.appendLocked = true;\r\n else\r\n this.prependLocked = this.appendLocked = true;\r\n }\r\n unlock(side = 'down') {\r\n if (side == 'top')\r\n this.prependLocked = false;\r\n else if (side == 'down')\r\n this.appendLocked = false;\r\n else\r\n this.prependLocked = this.appendLocked = false;\r\n }\r\n set scrollTop(y) {\r\n //fastdom.mutate(() => {\r\n this.container.scrollTop = y;\r\n //});\r\n }\r\n get scrollTop() {\r\n return this.container.scrollTop;\r\n }\r\n get scrollHeight() {\r\n return this.container.scrollHeight;\r\n }\r\n get innerHeight() {\r\n return this.size;\r\n }\r\n get parentElement() {\r\n return this.container.parentElement;\r\n }\r\n get offsetHeight() {\r\n return this.container.offsetHeight;\r\n }\r\n get length() {\r\n return this.hiddenElements.up.length + this.visibleElements.length + this.hiddenElements.down.length;\r\n }\r\n}\r\nexports.default = Scrollable;\r\n" }, { "id": 9, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "index": 46, - "index2": 43, - "size": 22788, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\polyfill.ts", + "name": "./src/lib/polyfill.ts", + "index": 27, + "index2": 27, + "size": 3041, "cacheable": true, "built": true, "optional": false, @@ -2253,54 +2164,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "issuerId": 78, - "issuerName": "./src/components/pageSignUp.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\scrollable.ts", + "issuerId": 8, + "issuerName": "./src/components/scrollable.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", + "id": 8, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\scrollable.ts", + "name": "./src/components/scrollable.ts", "profile": { - "factory": 392, - "building": 505, + "factory": 527, + "building": 1006, "dependencies": 2 } - }, - { - "id": 78, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "name": "./src/components/pageSignUp.ts", - "profile": { - "factory": 278, - "building": 994, - "dependencies": 0 - } } ], "profile": { - "factory": 1027, - "building": 121, - "dependencies": 1 + "factory": 1401, + "building": 7, + "dependencies": 194 }, "failed": false, "errors": 0, @@ -2308,76 +2209,67 @@ "assets": [], "reasons": [ { - "moduleId": 11, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", + "moduleId": 8, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\scrollable.ts", + "module": "./src/components/scrollable.ts", + "moduleName": "./src/components/scrollable.ts", "type": "cjs require", - "userRequest": "../mtproto/apiFileManager", - "loc": "19:41-77" + "userRequest": "../lib/polyfill", + "loc": "10:19-45" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiFileManager", - "loc": "27:41-77" + "userRequest": "../polyfill", + "loc": "17:19-41" }, { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./apiFileManager", - "loc": "24:41-68" + "userRequest": "../polyfill", + "loc": "35:19-41" }, { - "moduleId": 18, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDocsManager.ts", - "module": "./src/lib/appManagers/appDocsManager.ts", - "moduleName": "./src/lib/appManagers/appDocsManager.ts", + "moduleId": 15, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", + "module": "./src/lib/mtproto/apiFileManager.ts", + "moduleName": "./src/lib/mtproto/apiFileManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiFileManager", - "loc": "15:41-77" + "userRequest": "../polyfill", + "loc": "20:19-41" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", + "moduleId": 26, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", "module": "./src/lib/appManagers/appDialogsManager.ts", "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", - "userRequest": "../mtproto/apiFileManager", - "loc": "16:41-77" + "userRequest": "../polyfill", + "loc": "24:19-41" }, { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "../lib/mtproto/apiFileManager", - "loc": "22:41-81" + "userRequest": "../polyfill", + "loc": "10:19-41" }, { "moduleId": 38, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appStickersManager.ts", - "module": "./src/lib/appManagers/appStickersManager.ts", - "moduleName": "./src/lib/appManagers/appStickersManager.ts", - "type": "cjs require", - "userRequest": "../mtproto/apiFileManager", - "loc": "17:41-77" - }, - { - "moduleId": 78, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "module": "./src/components/pageSignUp.ts", - "moduleName": "./src/components/pageSignUp.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "../lib/mtproto/apiFileManager", - "loc": "12:41-81" + "userRequest": "../polyfill", + "loc": "22:19-41" } ], "usedExports": true, @@ -2385,16 +2277,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst bin_utils_1 = require(\"../bin_utils\");\nconst idb_1 = __importDefault(require(\"../idb\"));\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\nconst polyfill_1 = require(\"../polyfill\");\nclass ApiFileManager {\n constructor() {\n this.cachedFs = false;\n this.cachedFsPromise = false;\n this.cachedSavePromises = {};\n this.cachedDownloadPromises = {};\n this.cachedDownloads = {};\n this.downloadPulls = {};\n this.downloadActives = {};\n this.index = 0;\n this.log = polyfill_1.logger('AFM');\n }\n downloadRequest(dcID, cb, activeDelta) {\n if (this.downloadPulls[dcID] === undefined) {\n this.downloadPulls[dcID] = [];\n this.downloadActives[dcID] = 0;\n }\n var downloadPull = this.downloadPulls[dcID];\n let promise = new Promise((resolve, reject) => {\n // WARNING deferred!\n downloadPull.push({ cb: cb, deferred: { resolve, reject }, activeDelta: activeDelta });\n }).catch(() => { });\n setTimeout(() => {\n this.downloadCheck(dcID);\n }, 0);\n return promise;\n }\n downloadCheck(dcID) {\n var downloadPull = this.downloadPulls[dcID];\n var downloadLimit = dcID == 'upload' ? 11 : 5;\n if (this.downloadActives[dcID] >= downloadLimit || !downloadPull || !downloadPull.length) {\n return false;\n }\n var data = downloadPull.shift();\n var activeDelta = data.activeDelta || 1;\n this.downloadActives[dcID] += activeDelta;\n this.index++;\n data.cb()\n .then((result) => {\n this.downloadActives[dcID] -= activeDelta;\n this.downloadCheck(dcID);\n data.deferred.resolve(result);\n }, (error) => {\n if (error) {\n this.log.error('downloadCheck error:', error);\n }\n this.downloadActives[dcID] -= activeDelta;\n this.downloadCheck(dcID);\n data.deferred.reject(error);\n });\n }\n getFileName(location) {\n switch (location._) {\n case 'inputDocumentFileLocation':\n var fileName = (location.file_name || '').split('.');\n var ext = fileName[fileName.length - 1] || '';\n if (location.stickerType == 1 /* && !WebpManager.isWebpSupported() */) { // warning\n ext += 'webp'; /* 'png'; */\n }\n else if (location.stickerType == 2) {\n ext += 'tgs';\n }\n var versionPart = location.version ? ('v' + location.version) : '';\n return (fileName[0] ? fileName[0] + '_' : '') + location.id + versionPart + (ext ? '.' + ext : ext);\n default:\n if (!location.volume_id && !location.file_reference) {\n this.log.trace('Empty location', location);\n }\n var ext = 'jpg';\n if (location.stickerType == 1) {\n ext = 'webp' /* WebpManager.isWebpSupported() ? 'webp' : 'png'*/;\n }\n else if (location.stickerType == 2) {\n ext += 'tgs';\n }\n if (location.volume_id) {\n return location.volume_id + '_' + location.local_id /* + '_' + location.secret */ + '.' + ext;\n }\n else {\n return location.id + '_' + location.access_hash + '.' + ext;\n }\n }\n }\n getTempFileName(file) {\n var size = file.size || -1;\n var random = bin_utils_1.nextRandomInt(0xFFFFFFFF);\n return '_temp' + random + '_' + size;\n }\n getCachedFile(location) {\n if (!location) {\n return false;\n }\n var fileName = this.getFileName(location);\n return this.cachedDownloads[fileName] || false;\n }\n getFileStorage() {\n if (!Config.Modes.memory_only) {\n /* if(TmpfsFileStorage.isAvailable()) {\n return TmpfsFileStorage;\n } */\n if (idb_1.default.isAvailable()) {\n return idb_1.default;\n }\n }\n return idb_1.default /* MemoryFileStorage */;\n }\n saveSmallFile(location, bytes) {\n var fileName = this.getFileName(location);\n if (!this.cachedSavePromises[fileName]) {\n this.cachedSavePromises[fileName] = this.getFileStorage().saveFile(fileName, bytes).then((blob) => {\n return this.cachedDownloads[fileName] = blob;\n }, (error) => {\n delete this.cachedSavePromises[fileName];\n });\n }\n return this.cachedSavePromises[fileName];\n }\n downloadSmallFile(location, options = {}) {\n if (!filemanager_1.default.isAvailable()) {\n return Promise.reject({ type: 'BROWSER_BLOB_NOT_SUPPORTED' });\n }\n //this.log('downloadSmallFile', location, options);\n let dcID = options.dcID || location.dc_id;\n let mimeType = options.mimeType || 'image/jpeg';\n var fileName = this.getFileName(location);\n var cachedPromise = this.cachedSavePromises[fileName] || this.cachedDownloadPromises[fileName];\n //this.log('downloadSmallFile!', location, options, fileName, cachedPromise);\n if (cachedPromise) {\n return cachedPromise;\n }\n var fileStorage = this.getFileStorage();\n return this.cachedDownloadPromises[fileName] = fileStorage.getFile(fileName).then((blob) => {\n return this.cachedDownloads[fileName] = blob;\n }, () => {\n var downloadPromise = this.downloadRequest(dcID, () => {\n var inputLocation = location;\n if (!inputLocation._ || inputLocation._ == 'fileLocation') {\n inputLocation = Object.assign({}, location, { _: 'inputFileLocation' });\n }\n let params = {\n flags: 0,\n location: inputLocation,\n offset: 0,\n limit: 1024 * 1024\n };\n //this.log('next small promise', params);\n return apiManager_1.default.invokeApi('upload.getFile', params, {\n dcID: dcID,\n fileDownload: true,\n noErrorBox: true\n });\n }, dcID);\n var processDownloaded = (bytes) => {\n //this.log('processDownloaded', location, bytes);\n return Promise.resolve(bytes);\n /* if(!location.sticker || WebpManager.isWebpSupported()) {\n return qSync.when(bytes);\n }\n \n return WebpManager.getPngBlobFromWebp(bytes); */\n };\n return fileStorage.getFileWriter(fileName, mimeType).then((fileWriter) => {\n return downloadPromise.then((result) => {\n return processDownloaded(result.bytes).then((proccessedResult) => {\n return filemanager_1.default.write(fileWriter, proccessedResult).then(() => {\n return this.cachedDownloads[fileName] = fileWriter.finalize();\n });\n });\n });\n });\n });\n }\n getDownloadedFile(location, size) {\n var fileStorage = this.getFileStorage();\n var fileName = typeof (location) !== 'string' ? this.getFileName(location) : location;\n //console.log('getDownloadedFile', location, fileName);\n return fileStorage.getFile(fileName, size);\n }\n downloadFile(dcID, location, size, options = {}) {\n if (!filemanager_1.default.isAvailable()) {\n return Promise.reject({ type: 'BROWSER_BLOB_NOT_SUPPORTED' });\n }\n /* var processSticker = false;\n if(location.sticker && !WebpManager.isWebpSupported()) {\n if(options.toFileEntry || size > 524288) {\n delete location.sticker;\n } else {\n processSticker = true;\n options.mime = 'image/png';\n }\n } */\n // this.log('Dload file', dcID, location, size)\n var fileName = this.getFileName(location);\n var toFileEntry = options.toFileEntry || null;\n var cachedPromise = this.cachedSavePromises[fileName] || this.cachedDownloadPromises[fileName];\n var fileStorage = this.getFileStorage();\n //this.log('downloadFile', fileStorage.name, fileName, fileName.length, location, arguments);\n if (cachedPromise) {\n if (toFileEntry) {\n /* let blob = await cachedPromise;\n return FileManager.copy(blob, toFileEntry) as Promise; */\n return cachedPromise.then((blob) => {\n return filemanager_1.default.copy(blob, toFileEntry);\n });\n }\n //this.log('downloadFile cachedPromise');\n if (size) {\n /* let blob = await cachedPromise;\n if(blob.size < size) {\n this.log('downloadFile need to deleteFile, wrong size:', blob.size, size);\n await this.deleteFile(location);\n } else {\n return cachedPromise;\n } */\n return cachedPromise.then((blob) => {\n if (blob.size < size) {\n this.log('downloadFile need to deleteFile, wrong size:', blob.size, size);\n return this.deleteFile(location).then(() => {\n return this.downloadFile(dcID, location, size, options);\n }).catch(() => {\n return this.downloadFile(dcID, location, size, options);\n });\n }\n else {\n //return cachedPromise;\n return blob;\n }\n });\n }\n else {\n return cachedPromise;\n }\n }\n //this.log('arriba');\n //var deferred = $q.defer()\n let deferredHelper = { notify: () => { } };\n let deferred = new Promise((resolve, reject) => {\n deferredHelper.resolve = resolve;\n deferredHelper.reject = reject;\n });\n Object.assign(deferred, deferredHelper);\n //return;\n var canceled = false;\n var resolved = false;\n var mimeType = options.mimeType || 'image/jpeg', cacheFileWriter;\n var errorHandler = (error) => {\n deferred.reject(error);\n errorHandler = () => { };\n if (cacheFileWriter && (!error || error.type != 'DOWNLOAD_CANCELED')) {\n cacheFileWriter.truncate(0);\n }\n };\n fileStorage.getFile(fileName, size).then((blob) => __awaiter(this, void 0, void 0, function* () {\n //this.log('is that i wanted');\n if (blob.size < size) {\n this.log('downloadFile need to deleteFile 2, wrong size:', blob.size, size);\n yield this.deleteFile(location);\n throw false;\n }\n if (toFileEntry) {\n filemanager_1.default.copy(blob, toFileEntry).then(() => {\n deferred.resolve();\n }, errorHandler);\n }\n else {\n deferred.resolve(this.cachedDownloads[fileName] = blob);\n }\n //}, () => {\n })).catch(() => {\n //this.log('not i wanted');\n //var fileWriterPromise = toFileEntry ? FileManager.getFileWriter(toFileEntry) : fileStorage.getFileWriter(fileName, mimeType);\n var fileWriterPromise = toFileEntry ? Promise.resolve(toFileEntry) : fileStorage.getFileWriter(fileName, mimeType);\n var processDownloaded = (bytes) => {\n return Promise.resolve(bytes);\n /* if(!processSticker) {\n return Promise.resolve(bytes);\n }\n \n return WebpManager.getPngBlobFromWebp(bytes); */\n };\n fileWriterPromise.then((fileWriter) => {\n cacheFileWriter = fileWriter;\n var limit = options.limitPart || 524288, offset;\n var startOffset = 0;\n var writeFilePromise = Promise.resolve(), writeFileDeferred;\n if (fileWriter.length) {\n startOffset = fileWriter.length;\n if (startOffset >= size) {\n if (toFileEntry) {\n deferred.resolve();\n }\n else {\n deferred.resolve(this.cachedDownloads[fileName] = fileWriter.finalize());\n }\n return;\n }\n fileWriter.seek(startOffset);\n deferred.notify({ done: startOffset, total: size });\n /////this.log('deferred notify 1:', {done: startOffset, total: size});\n }\n for (offset = startOffset; offset < size; offset += limit) {\n //writeFileDeferred = $q.defer();\n let writeFileDeferredHelper = {};\n writeFileDeferred = new Promise((resolve, reject) => {\n writeFileDeferredHelper.resolve = resolve;\n writeFileDeferredHelper.reject = reject;\n });\n Object.assign(writeFileDeferred, writeFileDeferredHelper);\n ////this.log('offset:', startOffset);\n ;\n ((isFinal, offset, writeFileDeferred, writeFilePromise) => {\n return this.downloadRequest(dcID, () => {\n if (canceled) {\n return Promise.resolve();\n }\n return apiManager_1.default.invokeApi('upload.getFile', {\n flags: 0,\n location: location,\n offset: offset,\n limit: limit\n }, {\n dcID: dcID,\n fileDownload: true,\n singleInRequest: 'safari' in window\n });\n }, dcID).then((result) => {\n writeFilePromise.then(() => {\n if (canceled) {\n return Promise.resolve();\n }\n return processDownloaded(result.bytes).then((processedResult) => {\n return filemanager_1.default.write(fileWriter, processedResult).then(() => {\n writeFileDeferred.resolve();\n }, errorHandler).then(() => {\n if (isFinal) {\n resolved = true;\n if (toFileEntry) {\n deferred.resolve();\n }\n else {\n deferred.resolve(this.cachedDownloads[fileName] = fileWriter.finalize());\n }\n }\n else {\n ////this.log('deferred notify 2:', {done: offset + limit, total: size}, deferred);\n deferred.notify({ done: offset + limit, total: size });\n }\n });\n });\n });\n });\n })(offset + limit >= size, offset, writeFileDeferred, writeFilePromise);\n writeFilePromise = writeFileDeferred;\n }\n });\n });\n deferred.cancel = () => {\n if (!canceled && !resolved) {\n canceled = true;\n delete this.cachedDownloadPromises[fileName];\n errorHandler({ type: 'DOWNLOAD_CANCELED' });\n if (toFileEntry) {\n toFileEntry.abort();\n }\n }\n };\n //console.log(deferred, deferred.notify, deferred.cancel);\n if (!toFileEntry) {\n this.cachedDownloadPromises[fileName] = deferred;\n }\n return deferred;\n }\n deleteFile(fileName) {\n fileName = typeof (fileName) == 'string' ? fileName : this.getFileName(fileName);\n this.log('will delete file:', fileName);\n delete this.cachedDownloadPromises[fileName];\n delete this.cachedDownloads[fileName];\n delete this.cachedSavePromises[fileName];\n return this.getFileStorage().deleteFile(fileName);\n }\n uploadFile(file) {\n var fileSize = file.size, isBigFile = fileSize >= 10485760, canceled = false, resolved = false, doneParts = 0, partSize = 262144, // 256 Kb\n activeDelta = 2;\n if (fileSize > 67108864) {\n partSize = 524288;\n activeDelta = 4;\n }\n else if (fileSize < 102400) {\n partSize = 32768;\n activeDelta = 1;\n }\n var totalParts = Math.ceil(fileSize / partSize);\n var fileID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\n //var deferred = $q.defer();\n var _part = 0, resultInputFile = {\n _: isBigFile ? 'inputFileBig' : 'inputFile',\n id: fileID,\n parts: totalParts,\n name: file instanceof File ? file.name : '',\n md5_checksum: ''\n };\n /* let deferred: {\n then?: any,\n resolve?: (input: typeof resultInputFile) => void,\n reject?: (error: any) => void,\n promise?: any,\n \n cancel?: () => void,\n notify?: (details: {done: number, total: number}) => void\n } = {\n \n };\n \n deferred.promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n }); */\n let deferredHelper = {\n notify: (details) => { }\n };\n let deferred = new Promise((resolve, reject) => {\n if (totalParts > 3000) {\n return reject({ type: 'FILE_TOO_BIG' });\n }\n deferredHelper.resolve = resolve;\n deferredHelper.reject = reject;\n //return Promise.resolve();\n });\n Object.assign(deferred, deferredHelper);\n if (totalParts > 3000) {\n return deferred;\n }\n let errorHandler = (error) => {\n this.log.error('Up Error', error);\n deferred.reject(error);\n canceled = true;\n errorHandler = () => { };\n };\n let method = isBigFile ? 'upload.saveBigFilePart' : 'upload.saveFilePart';\n for (let offset = 0; offset < fileSize; offset += partSize) {\n let part = _part++; // 0, 1\n this.downloadRequest('upload', () => {\n return new Promise((uploadResolve, uploadReject) => {\n var reader = new FileReader();\n var blob = file.slice(offset, offset + partSize);\n reader.onloadend = (e) => {\n if (canceled) {\n uploadReject();\n return;\n }\n if (e.target.readyState != FileReader.DONE) {\n this.log.error('wrong readyState!');\n return;\n }\n //////this.log('Starting to upload file, isBig:', isBigFile, fileID, part, e.target.result);\n apiManager_1.default.invokeApi(method, {\n file_id: fileID,\n file_part: part,\n file_total_parts: totalParts,\n bytes: e.target.result\n }, {\n startMaxLength: partSize + 256,\n fileUpload: true,\n singleInRequest: true\n }).then((result) => {\n doneParts++;\n uploadResolve();\n //////this.log('Progress', doneParts * partSize / fileSize);\n if (doneParts >= totalParts) {\n deferred.resolve(resultInputFile);\n resolved = true;\n }\n else {\n deferred.notify({ done: doneParts * partSize, total: fileSize });\n }\n }, errorHandler);\n };\n reader.readAsArrayBuffer(blob);\n });\n }, activeDelta);\n }\n deferred.cancel = () => {\n this.log('cancel upload', canceled, resolved);\n if (!canceled && !resolved) {\n canceled = true;\n errorHandler({ type: 'UPLOAD_CANCELED' });\n }\n };\n return deferred;\n }\n}\nexports.ApiFileManager = ApiFileManager;\nexports.default = new ApiFileManager();\n" + "depth": 3, + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst bin_utils_1 = require(\"./bin_utils\");\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\nexports.secureRandom = new jsbn_1.SecureRandom();\r\nfunction logger(prefix) {\r\n function Log(...args) {\r\n return console.log(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\r\n }\r\n Log.warn = function (...args) {\r\n return console.warn(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.info = function (...args) {\r\n return console.info(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.error = function (...args) {\r\n return console.error(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\r\n };\r\n Log.trace = function (...args) {\r\n return console.trace(bin_utils_1.dT(), '[' + prefix + ']:', ...args);\r\n };\r\n return Log;\r\n}\r\nexports.logger = logger;\r\n;\r\nfunction deferredPromise() {\r\n let deferredHelper = { notify: () => { }, isFulfilled: false, isRejected: false };\r\n let deferred = new Promise((resolve, reject) => {\r\n deferredHelper.resolve = (value) => {\r\n if (deferred.isFulfilled)\r\n return;\r\n deferred.isFulfilled = true;\r\n resolve(value);\r\n };\r\n deferredHelper.reject = (...args) => {\r\n if (deferred.isRejected)\r\n return;\r\n deferred.isRejected = true;\r\n reject(...args);\r\n };\r\n });\r\n Object.assign(deferred, deferredHelper);\r\n return deferred;\r\n}\r\nexports.deferredPromise = deferredPromise;\r\nObject.defineProperty(Uint8Array.prototype, 'hex', {\r\n get: function () {\r\n return bin_utils_1.bytesToHex([...this]);\r\n },\r\n set: function (str) {\r\n this.set(bin_utils_1.bytesFromHex(str));\r\n },\r\n enumerable: true,\r\n configurable: true\r\n});\r\nUint8Array.prototype.randomize = function () {\r\n exports.secureRandom.nextBytes(this);\r\n return this;\r\n};\r\nUint8Array.prototype.concat = function (...args) {\r\n return bin_utils_1.bufferConcats(this, ...args);\r\n};\r\nUint8Array.prototype.toString = function () {\r\n return String.fromCharCode.apply(null, [...this]);\r\n};\r\nArray.prototype.forEachReverse = function (callback) {\r\n let length = this.length;\r\n for (var i = length - 1; i >= 0; --i) {\r\n callback(this[i], i, this);\r\n }\r\n};\r\nArray.prototype.findAndSplice = function (verify) {\r\n let index = this.findIndex(verify);\r\n return index !== -1 ? this.splice(index, 1)[0] : undefined;\r\n};\r\nString.prototype.toHHMMSS = function (leadZero = false) {\r\n let sec_num = parseInt(this + '', 10);\r\n let hours = Math.floor(sec_num / 3600);\r\n let minutes = Math.floor((sec_num - (hours * 3600)) / 60);\r\n let seconds = sec_num - (hours * 3600) - (minutes * 60);\r\n if (hours < 10)\r\n hours = \"0\" + hours;\r\n if (minutes < 10)\r\n minutes = leadZero ? \"0\" + minutes : minutes;\r\n if (seconds < 10)\r\n seconds = \"0\" + seconds;\r\n return minutes + ':' + seconds;\r\n};\r\n" }, { "id": 10, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPeersManager.ts", - "name": "./src/lib/appManagers/appPeersManager.ts", - "index": 64, - "index2": 56, - "size": 5756, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\bin_utils.ts", + "name": "./src/lib/bin_utils.ts", + "index": 28, + "index2": 26, + "size": 11715, "cacheable": true, "built": true, "optional": false, @@ -2402,44 +2294,54 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", + "issuerId": 6, + "issuerName": "./src/lib/appManagers/appPhotosManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "name": "./src/lib/services.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 386, + "building": 1105, + "dependencies": 45 + } + }, + { + "id": 6, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", + "name": "./src/lib/appManagers/appPhotosManager.ts", + "profile": { + "factory": 576, + "building": 856, + "dependencies": 834 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 835, + "building": 185, + "dependencies": 1133 }, "failed": false, "errors": 0, @@ -2447,76 +2349,67 @@ "assets": [], "reasons": [ { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "25:42-70" - }, - { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", + "moduleId": 6, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", + "module": "./src/lib/appManagers/appPhotosManager.ts", + "moduleName": "./src/lib/appManagers/appPhotosManager.ts", "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "26:42-70" + "userRequest": "../bin_utils", + "loc": "9:20-43" }, { - "moduleId": 27, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", + "moduleId": 9, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\polyfill.ts", + "module": "./src/lib/polyfill.ts", + "moduleName": "./src/lib/polyfill.ts", "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "9:42-70" + "userRequest": "./bin_utils", + "loc": "3:20-42" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "19:42-70" + "userRequest": "../bin_utils", + "loc": "20:20-43" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 15, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", + "module": "./src/lib/mtproto/apiFileManager.ts", + "moduleName": "./src/lib/mtproto/apiFileManager.ts", "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "12:42-70" + "userRequest": "../bin_utils", + "loc": "15:20-43" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 25, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\filemanager.ts", + "module": "./src/lib/filemanager.ts", + "moduleName": "./src/lib/filemanager.ts", "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "11:42-70" + "userRequest": "./bin_utils", + "loc": "12:20-42" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 66, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\crypto\\crypto_methods.ts", + "module": "./src/lib/crypto/crypto_methods.ts", + "moduleName": "./src/lib/crypto/crypto_methods.ts", "type": "cjs require", - "userRequest": "./appPeersManager", - "loc": "6:42-70" + "userRequest": "../bin_utils", + "loc": "3:20-43" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 69, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\idb.ts", + "module": "./src/lib/idb.ts", + "moduleName": "./src/lib/idb.ts", "type": "cjs require", - "userRequest": "./appManagers/appPeersManager", - "loc": "16:42-82" + "userRequest": "./bin_utils", + "loc": "6:20-42" } ], "usedExports": true, @@ -2524,16 +2417,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\nconst utils_1 = require(\"../utils\");\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\n// https://github.com/eelcohn/Telegram-API/wiki/Calculating-color-for-a-Telegram-user-on-IRC\n/*\n HTML-color IRC-color Description\n #c03d33 4 red\n #4fad2d 3 green\n #d09306 7 yellow\n #168acd 10 blue\n #8544d6 6 purple\n #cd4073 13 pink\n #2996ad 11 sea\n #ce671b 5 orange\n */\nconst DialogColorsFg = ['#c03d33', '#4fad2d', '#d09306', '#168acd', '#8544d6', '#cd4073', '#2996ad', '#ce671b'];\nconst DialogColors = ['#e17076', '#7bc862', '#e5ca77', '#65AADD', '#a695e7', '#ee7aae', '#6ec9cb', '#faa774'];\nconst DialogColorsMap = [0, 7, 4, 1, 6, 3, 5];\nconst AppPeersManager = {\n getPeerPhoto: (peerID) => {\n return peerID > 0\n ? appUsersManager_1.default.getUserPhoto(peerID)\n : appChatsManager_1.default.getChatPhoto(-peerID);\n },\n getPeerMigratedTo: (peerID) => {\n if (peerID >= 0) {\n return false;\n }\n var chat = appChatsManager_1.default.getChat(-peerID);\n if (chat && chat.migrated_to && chat.pFlags.deactivated) {\n return AppPeersManager.getPeerID(chat.migrated_to);\n }\n return false;\n },\n getPeerTitle: (peerID, plainText = false) => {\n let peer = {};\n if (!utils_1.isObject(peerID)) {\n peer = AppPeersManager.getPeer(peerID);\n }\n else\n peer = peerID;\n let title = '';\n if (peerID > 0) {\n if (peer.first_name)\n title += peer.first_name;\n if (peer.last_name)\n title += ' ' + peer.last_name;\n if (!title)\n title = peer.pFlags.deleted ? 'Deleted account' : peer.username;\n else\n title = title.trim();\n }\n else {\n title = peer.title;\n }\n return plainText ? title : richtextprocessor_1.RichTextProcessor.wrapEmojiText(title);\n },\n getOutputPeer: (peerID) => {\n if (peerID > 0) {\n return { _: 'peerUser', user_id: peerID };\n }\n var chatID = -peerID;\n if (appChatsManager_1.default.isChannel(chatID)) {\n return { _: 'peerChannel', channel_id: chatID };\n }\n return { _: 'peerChat', chat_id: chatID };\n },\n getPeerString: (peerID) => {\n if (peerID > 0) {\n return appUsersManager_1.default.getUserString(peerID);\n }\n return appChatsManager_1.default.getChatString(-peerID);\n },\n getPeerUsername: (peerID) => {\n if (peerID > 0) {\n return appUsersManager_1.default.getUser(peerID).username || '';\n }\n return appChatsManager_1.default.getChat(-peerID).username || '';\n },\n getPeer: (peerID) => {\n return peerID > 0\n ? appUsersManager_1.default.getUser(peerID)\n : appChatsManager_1.default.getChat(-peerID);\n },\n getPeerID: (peerString) => {\n if (utils_1.isObject(peerString)) {\n return peerString.user_id\n ? peerString.user_id\n : -(peerString.channel_id || peerString.chat_id);\n }\n var isUser = peerString.charAt(0) == 'u';\n var peerParams = peerString.substr(1).split('_');\n return isUser ? peerParams[0] : -peerParams[0] || 0;\n },\n isChannel: (peerID) => {\n return (peerID < 0) && appChatsManager_1.default.isChannel(-peerID);\n },\n isMegagroup: (peerID) => {\n return (peerID < 0) && appChatsManager_1.default.isMegagroup(-peerID);\n },\n isAnyGroup: (peerID) => {\n return (peerID < 0) && !appChatsManager_1.default.isBroadcast(-peerID);\n },\n isBroadcast: (id) => {\n return AppPeersManager.isChannel(id) && !AppPeersManager.isMegagroup(id);\n },\n isBot: (peerID) => {\n return (peerID > 0) && appUsersManager_1.default.isBot(peerID);\n },\n getInputPeerByID: (peerID) => {\n if (!peerID) {\n return { _: 'inputPeerEmpty' };\n }\n if (peerID < 0) {\n var chatID = -peerID;\n if (!appChatsManager_1.default.isChannel(chatID)) {\n return {\n _: 'inputPeerChat',\n chat_id: chatID\n };\n }\n else {\n return {\n _: 'inputPeerChannel',\n channel_id: chatID,\n access_hash: appChatsManager_1.default.getChat(chatID).access_hash || 0\n };\n }\n }\n return {\n _: 'inputPeerUser',\n user_id: peerID,\n access_hash: appUsersManager_1.default.getUser(peerID).access_hash || 0\n };\n },\n getPeerColorByID: (peerID, pic = true) => {\n let idx = DialogColorsMap[(peerID < 0 ? -peerID : peerID) % 7];\n let color = (pic ? DialogColors : DialogColorsFg)[idx];\n return color;\n },\n getPeerSearchText: (peerID) => {\n var text;\n if (peerID > 0) {\n text = '%pu ' + appUsersManager_1.default.getUserSearchText(peerID);\n }\n else if (peerID < 0) {\n var chat = appChatsManager_1.default.getChat(-peerID);\n text = '%pg ' + (chat.title || '');\n }\n return text;\n }\n};\nexports.default = AppPeersManager;\n" + "depth": 4, + "source": "\"use strict\";\r\n/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\n// @ts-ignore\r\nconst pako_inflate_min_js_1 = __importDefault(require(\"pako/dist/pako_inflate.min.js\"));\r\nvar _logTimer = (new Date()).getTime();\r\nfunction dT() {\r\n return '[' + (((new Date()).getTime() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nexports.dT = dT;\r\nfunction bigint(num) {\r\n return new jsbn_1.BigInteger(num.toString(16), 16);\r\n}\r\nexports.bigint = bigint;\r\nfunction bigStringInt(strNum) {\r\n return new jsbn_1.BigInteger(strNum, 10);\r\n}\r\nexports.bigStringInt = bigStringInt;\r\nfunction bytesToHex(bytes) {\r\n bytes = bytes || [];\r\n var arr = [];\r\n for (var i = 0; i < bytes.length; i++) {\r\n arr.push((bytes[i] < 16 ? '0' : '') + (bytes[i] || 0).toString(16));\r\n }\r\n return arr.join('');\r\n}\r\nexports.bytesToHex = bytesToHex;\r\nfunction bytesFromHex(hexString) {\r\n var len = hexString.length, i;\r\n var start = 0;\r\n var bytes = [];\r\n if (hexString.length % 2) {\r\n bytes.push(parseInt(hexString.charAt(0), 16));\r\n start++;\r\n }\r\n for (i = start; i < len; i += 2) {\r\n bytes.push(parseInt(hexString.substr(i, 2), 16));\r\n }\r\n return bytes;\r\n}\r\nexports.bytesFromHex = bytesFromHex;\r\nfunction bytesToBase64(bytes) {\r\n var mod3;\r\n var result = '';\r\n for (var nLen = bytes.length, nUint24 = 0, nIdx = 0; nIdx < nLen; nIdx++) {\r\n mod3 = nIdx % 3;\r\n nUint24 |= bytes[nIdx] << (16 >>> mod3 & 24);\r\n if (mod3 === 2 || nLen - nIdx === 1) {\r\n result += String.fromCharCode(uint6ToBase64(nUint24 >>> 18 & 63), uint6ToBase64(nUint24 >>> 12 & 63), uint6ToBase64(nUint24 >>> 6 & 63), uint6ToBase64(nUint24 & 63));\r\n nUint24 = 0;\r\n }\r\n }\r\n return result.replace(/A(?=A$|$)/g, '=');\r\n}\r\nexports.bytesToBase64 = bytesToBase64;\r\nfunction uint6ToBase64(nUint6) {\r\n return nUint6 < 26\r\n ? nUint6 + 65\r\n : nUint6 < 52\r\n ? nUint6 + 71\r\n : nUint6 < 62\r\n ? nUint6 - 4\r\n : nUint6 === 62\r\n ? 43\r\n : nUint6 === 63\r\n ? 47\r\n : 65;\r\n}\r\nexports.uint6ToBase64 = uint6ToBase64;\r\nfunction base64ToBlob(base64str, mimeType) {\r\n var sliceSize = 1024;\r\n var byteCharacters = atob(base64str);\r\n var bytesLength = byteCharacters.length;\r\n var slicesCount = Math.ceil(bytesLength / sliceSize);\r\n var byteArrays = new Array(slicesCount);\r\n for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {\r\n var begin = sliceIndex * sliceSize;\r\n var end = Math.min(begin + sliceSize, bytesLength);\r\n var bytes = new Array(end - begin);\r\n for (var offset = begin, i = 0; offset < end; ++i, ++offset) {\r\n bytes[i] = byteCharacters[offset].charCodeAt(0);\r\n }\r\n byteArrays[sliceIndex] = new Uint8Array(bytes);\r\n }\r\n return blobConstruct(byteArrays, mimeType);\r\n}\r\nexports.base64ToBlob = base64ToBlob;\r\nfunction dataUrlToBlob(url) {\r\n // var name = 'b64blob ' + url.length\r\n // console.time(name)\r\n var urlParts = url.split(',');\r\n var base64str = urlParts[1];\r\n var mimeType = urlParts[0].split(':')[1].split(';')[0];\r\n var blob = base64ToBlob(base64str, mimeType);\r\n // console.timeEnd(name)\r\n return blob;\r\n}\r\nexports.dataUrlToBlob = dataUrlToBlob;\r\nfunction blobConstruct(blobParts, mimeType = '') {\r\n var blob;\r\n var safeMimeType = blobSafeMimeType(mimeType);\r\n try {\r\n blob = new Blob(blobParts, { type: safeMimeType });\r\n }\r\n catch (e) {\r\n // @ts-ignore\r\n var bb = new BlobBuilder;\r\n blobParts.forEach(function (blobPart) {\r\n bb.append(blobPart);\r\n });\r\n blob = bb.getBlob(safeMimeType);\r\n }\r\n return blob;\r\n}\r\nexports.blobConstruct = blobConstruct;\r\nfunction blobSafeMimeType(mimeType) {\r\n if ([\r\n 'image/jpeg',\r\n 'image/png',\r\n 'image/gif',\r\n 'image/webp',\r\n 'image/bmp',\r\n 'video/mp4',\r\n 'video/webm',\r\n 'video/quicktime',\r\n 'audio/ogg',\r\n 'audio/mpeg',\r\n 'audio/mp4',\r\n ].indexOf(mimeType) === -1) {\r\n return 'application/octet-stream';\r\n }\r\n return mimeType;\r\n}\r\nexports.blobSafeMimeType = blobSafeMimeType;\r\nfunction bytesCmp(bytes1, bytes2) {\r\n var len = bytes1.length;\r\n if (len != bytes2.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < len; i++) {\r\n if (bytes1[i] != bytes2[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nexports.bytesCmp = bytesCmp;\r\nfunction bytesXor(bytes1, bytes2) {\r\n var len = bytes1.length;\r\n var bytes = [];\r\n for (var i = 0; i < len; ++i) {\r\n bytes[i] = bytes1[i] ^ bytes2[i];\r\n }\r\n return bytes;\r\n}\r\nexports.bytesXor = bytesXor;\r\nfunction bytesFromBigInt(bigInt, len) {\r\n var bytes = bigInt.toByteArray();\r\n if (len && bytes.length < len) {\r\n var padding = [];\r\n for (var i = 0, needPadding = len - bytes.length; i < needPadding; i++) {\r\n padding[i] = 0;\r\n }\r\n if (bytes instanceof ArrayBuffer) {\r\n bytes = bufferConcat(padding, bytes);\r\n }\r\n else {\r\n bytes = padding.concat(bytes);\r\n }\r\n }\r\n else {\r\n while (!bytes[0] && (!len || bytes.length > len)) {\r\n bytes = bytes.slice(1);\r\n }\r\n }\r\n return bytes;\r\n}\r\nexports.bytesFromBigInt = bytesFromBigInt;\r\nfunction bytesToArrayBuffer(b) {\r\n return (new Uint8Array(b)).buffer;\r\n}\r\nexports.bytesToArrayBuffer = bytesToArrayBuffer;\r\nfunction convertToArrayBuffer(bytes) {\r\n // Be careful with converting subarrays!!\r\n if (bytes instanceof ArrayBuffer) {\r\n return bytes;\r\n }\r\n if (bytes.buffer !== undefined &&\r\n bytes.buffer.byteLength == bytes.length * bytes.BYTES_PER_ELEMENT) {\r\n return bytes.buffer;\r\n }\r\n return bytesToArrayBuffer(bytes);\r\n}\r\nexports.convertToArrayBuffer = convertToArrayBuffer;\r\nfunction convertToUint8Array(bytes) {\r\n if (bytes.buffer !== undefined) {\r\n return bytes;\r\n }\r\n return new Uint8Array(bytes);\r\n}\r\nexports.convertToUint8Array = convertToUint8Array;\r\nfunction convertToByteArray(bytes) {\r\n if (Array.isArray(bytes)) {\r\n return bytes;\r\n }\r\n bytes = convertToUint8Array(bytes);\r\n var newBytes = [];\r\n for (var i = 0, len = bytes.length; i < len; i++) {\r\n newBytes.push(bytes[i]);\r\n }\r\n return newBytes;\r\n}\r\nexports.convertToByteArray = convertToByteArray;\r\nfunction bytesFromArrayBuffer(buffer) {\r\n var len = buffer.byteLength;\r\n var byteView = new Uint8Array(buffer);\r\n var bytes = [];\r\n for (var i = 0; i < len; ++i) {\r\n bytes[i] = byteView[i];\r\n }\r\n return bytes;\r\n}\r\nexports.bytesFromArrayBuffer = bytesFromArrayBuffer;\r\nfunction bufferConcat(buffer1, buffer2) {\r\n var l1 = buffer1.byteLength || buffer1.length;\r\n var l2 = buffer2.byteLength || buffer2.length;\r\n var tmp = new Uint8Array(l1 + l2);\r\n tmp.set(buffer1 instanceof ArrayBuffer ? new Uint8Array(buffer1) : buffer1, 0);\r\n tmp.set(buffer2 instanceof ArrayBuffer ? new Uint8Array(buffer2) : buffer2, l1);\r\n return tmp.buffer;\r\n}\r\nexports.bufferConcat = bufferConcat;\r\nfunction bufferConcats(...args) {\r\n let length = 0;\r\n args.forEach(b => length += b.byteLength || b.length);\r\n var tmp = new Uint8Array(length);\r\n let lastLength = 0;\r\n args.forEach(b => {\r\n tmp.set(b instanceof ArrayBuffer ? new Uint8Array(b) : b, lastLength);\r\n lastLength += b.byteLength || b.length;\r\n });\r\n return tmp /* .buffer */;\r\n}\r\nexports.bufferConcats = bufferConcats;\r\nfunction longToInts(sLong) {\r\n var divRem = bigStringInt(sLong).divideAndRemainder(bigint(0x100000000));\r\n return [divRem[0].intValue(), divRem[1].intValue()];\r\n}\r\nexports.longToInts = longToInts;\r\nfunction bytesFromWords(wordArray) {\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n var bytes = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n bytes.push((words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff);\r\n }\r\n return bytes;\r\n}\r\nexports.bytesFromWords = bytesFromWords;\r\nfunction bytesFromWordss(input) {\r\n var o = [];\r\n for (var i = 0; i < input.length * 4; i++) {\r\n o.push((input[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff);\r\n }\r\n return o;\r\n}\r\nexports.bytesFromWordss = bytesFromWordss;\r\nfunction bytesToWordss(input) {\r\n let bytes;\r\n if (input instanceof ArrayBuffer)\r\n bytes = new Uint8Array(input);\r\n else\r\n bytes = input;\r\n var len = bytes.length;\r\n var words = [];\r\n var i;\r\n for (i = 0; i < len; i++) {\r\n words[i >>> 2] |= bytes[i] << (24 - (i % 4) * 8);\r\n }\r\n return new Uint32Array(words);\r\n}\r\nexports.bytesToWordss = bytesToWordss;\r\nfunction longToBytes(sLong) {\r\n return bytesFromWords({ words: longToInts(sLong), sigBytes: 8 }).reverse();\r\n}\r\nexports.longToBytes = longToBytes;\r\nfunction longFromInts(high, low) {\r\n return bigint(high).shiftLeft(32).add(bigint(low)).toString(10);\r\n}\r\nexports.longFromInts = longFromInts;\r\nfunction intToUint(val) {\r\n if (typeof (val) === 'string')\r\n val = parseInt(val);\r\n if (val < 0) {\r\n val = val + 4294967296;\r\n }\r\n return val;\r\n}\r\nexports.intToUint = intToUint;\r\nfunction uintToInt(val) {\r\n if (val > 2147483647) {\r\n val = val - 4294967296;\r\n }\r\n return val;\r\n}\r\nexports.uintToInt = uintToInt;\r\nfunction addPadding(bytes, blockSize = 16, zeroes, full = false, prepend = false) {\r\n let len = bytes.byteLength || bytes.length;\r\n let needPadding = blockSize - (len % blockSize);\r\n if (needPadding > 0 && (needPadding < blockSize || full)) {\r\n ////console.log('addPadding()', len, blockSize, needPadding);\r\n let padding = new Array(needPadding);\r\n if (zeroes) {\r\n for (let i = 0; i < needPadding; i++) {\r\n padding[i] = 0;\r\n }\r\n }\r\n else {\r\n (new jsbn_1.SecureRandom()).nextBytes(padding);\r\n }\r\n if (bytes instanceof ArrayBuffer) {\r\n bytes = prepend ? bufferConcat(padding, bytes) : bufferConcat(bytes, padding);\r\n }\r\n else if (bytes instanceof Uint8Array) {\r\n let _bytes = new Uint8Array(bytes.length + padding.length);\r\n if (prepend) {\r\n _bytes.set(padding);\r\n _bytes.set(bytes, padding.length);\r\n }\r\n else {\r\n _bytes.set(bytes);\r\n _bytes.set(padding, bytes.length);\r\n }\r\n bytes = _bytes;\r\n }\r\n else {\r\n bytes = prepend ? padding.concat(bytes) : bytes.concat(padding);\r\n }\r\n }\r\n return bytes;\r\n}\r\nexports.addPadding = addPadding;\r\nfunction gzipUncompress(bytes, toString) {\r\n //console.log(dT(), 'Gzip uncompress start');\r\n var result = pako_inflate_min_js_1.default.inflate(bytes, toString ? { to: 'string' } : undefined);\r\n //console.log(dT(), 'Gzip uncompress finish'/* , result */);\r\n return result;\r\n}\r\nexports.gzipUncompress = gzipUncompress;\r\nfunction nextRandomInt(maxValue) {\r\n return Math.floor(Math.random() * maxValue);\r\n}\r\nexports.nextRandomInt = nextRandomInt;\r\n" }, { "id": 11, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", - "name": "./src/lib/appManagers/appPhotosManager.ts", - "index": 65, - "index2": 58, - "size": 15031, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\lottieLoader.ts", + "name": "./src/lib/lottieLoader.ts", + "index": 38, + "index2": 31, + "size": 6081, "cacheable": true, "built": true, "optional": false, @@ -2541,44 +2434,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "issuerId": 62, + "issuerName": "./src/pages/pageAuthCode.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", + "id": 62, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "name": "./src/pages/pageAuthCode.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 527, + "building": 1006, + "dependencies": 2 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 913, + "building": 92, + "dependencies": 0 }, "failed": false, "errors": 0, @@ -2586,76 +2479,67 @@ "assets": [], "reasons": [ { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "23:43-72" - }, - { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", "module": "./src/lib/appManagers/appImManager.ts", "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "31:43-72" + "userRequest": "../lottieLoader", + "loc": "18:39-65" }, { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", "module": "./src/components/wrappers.ts", "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "../lib/appManagers/appPhotosManager", - "loc": "15:43-89" + "userRequest": "../lib/lottieLoader", + "loc": "25:39-69" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 62, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "module": "./src/pages/pageAuthCode.ts", + "moduleName": "./src/pages/pageAuthCode.ts", "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "9:43-72" + "userRequest": "../lib/lottieLoader", + "loc": "10:39-69" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 65, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagesManager.ts", + "module": "./src/pages/pagesManager.ts", + "moduleName": "./src/pages/pagesManager.ts", "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "10:43-72" + "userRequest": "../lib/lottieLoader", + "loc": "8:39-69" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "8:43-72" + "userRequest": "../lib/lottieLoader", + "loc": "23:39-69" }, { - "moduleId": 49, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appWebPagesManager.ts", - "module": "./src/lib/appManagers/appWebPagesManager.ts", - "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "module": "./src/components/emoticonsDropdown.ts", + "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "./appPhotosManager", - "loc": "7:43-72" + "userRequest": "../lib/lottieLoader", + "loc": "16:39-69" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 74, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagePassword.ts", + "module": "./src/pages/pagePassword.ts", + "moduleName": "./src/pages/pagePassword.ts", "type": "cjs require", - "userRequest": "./appManagers/appPhotosManager", - "loc": "11:43-84" + "userRequest": "../lib/lottieLoader", + "loc": "10:39-69" } ], "usedExports": true, @@ -2664,15 +2548,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst utils_1 = require(\"../utils\");\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\nconst bin_utils_1 = require(\"../bin_utils\");\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\nconst apiManager_1 = __importDefault(require(\"../mtproto/apiManager\"));\nclass AppPhotosManager {\n constructor() {\n this.photos = {};\n this.windowW = document.body.scrollWidth;\n this.windowH = document.body.scrollHeight;\n window.addEventListener('resize', (e) => {\n this.windowW = document.body.scrollWidth;\n this.windowH = document.body.scrollHeight;\n //console.log(`Set windowW, windowH: ${this.windowW}x${this.windowH}`);\n });\n /* $rootScope.openPhoto = openPhoto\n $rootScope.preloadPhoto = preloadPhoto; */\n }\n savePhoto(apiPhoto, context) {\n if (context) {\n Object.assign(apiPhoto, context);\n }\n if (!apiPhoto.id) {\n console.warn('no apiPhoto.id', apiPhoto);\n }\n else\n this.photos[apiPhoto.id] = apiPhoto;\n if (!('sizes' in apiPhoto))\n return;\n apiPhoto.sizes.forEach((photoSize) => {\n if (photoSize._ == 'photoCachedSize') {\n apiFileManager_1.default.saveSmallFile(photoSize.location, photoSize.bytes);\n console.log('clearing photo cached size', apiPhoto);\n // Memory\n photoSize.size = photoSize.bytes.length;\n delete photoSize.bytes;\n photoSize._ = 'photoSize';\n }\n });\n }\n choosePhotoSize(photo, width = 0, height = 0) {\n if (Config.Navigator.retina) {\n width *= 2;\n height *= 2;\n }\n /*\n s\tbox\t100x100\n m\tbox\t320x320\n x\tbox\t800x800\n y\tbox\t1280x1280\n w\tbox\t2560x2560\n a\tcrop\t160x160\n b\tcrop\t320x320\n c\tcrop\t640x640\n d\tcrop\t1280x1280 */\n let bestPhotoSize = { _: 'photoSizeEmpty' };\n let bestDiff = 0xFFFFFF;\n //console.log('choosePhotoSize', photo);\n let sizes = photo.sizes || photo.thumbs;\n if (!sizes)\n return bestPhotoSize;\n sizes.forEach((photoSize) => {\n if (!photoSize.w || !photoSize.h)\n return;\n let diff = Math.abs(photoSize.w * photoSize.h - width * height);\n if (diff < bestDiff) {\n bestPhotoSize = photoSize;\n bestDiff = diff;\n }\n //console.log('diff', diff, photoSize, bestPhotoSize);\n });\n //console.log('choosing', photo, width, height, bestPhotoSize);\n return bestPhotoSize;\n }\n getUserPhotos(userID, maxID, limit) {\n var inputUser = appUsersManager_1.default.getUserInput(userID);\n return apiManager_1.default.invokeApi('photos.getUserPhotos', {\n user_id: inputUser,\n offset: 0,\n limit: limit || 20,\n max_id: maxID || 0\n }).then((photosResult) => {\n appUsersManager_1.default.saveApiUsers(photosResult.users);\n var photoIDs = [];\n var context = { user_id: userID };\n for (var i = 0; i < photosResult.photos.length; i++) {\n this.savePhoto(photosResult.photos[i], context);\n photoIDs.push(photosResult.photos[i].id);\n }\n return {\n count: photosResult.count || photosResult.photos.length,\n photos: photoIDs\n };\n });\n }\n setAttachmentPreview(bytes, div, isSticker = false, background = false) {\n //image.src = \"data:image/jpeg;base64,\" + bytesToBase64(photo.sizes[0].bytes);\n //photo.sizes[0].bytes = new Uint8Array([...photo.sizes[0].bytes].reverse());\n let arr;\n if (!isSticker) {\n arr = AppPhotosManager.jf.concat(bytes.slice(3), AppPhotosManager.Df);\n arr[164] = bytes[1];\n arr[166] = bytes[2];\n }\n else {\n arr = bytes;\n }\n //console.log('setAttachmentPreview', bytes, arr, div, isSticker);\n let blob = new Blob([arr], { type: \"image/jpeg\" });\n if (background) {\n div.style.backgroundImage = 'url(' + URL.createObjectURL(blob) + ')';\n }\n else {\n let image = new Image();\n image.src = URL.createObjectURL(blob);\n image.style.width = '100%';\n image.style.height = '100%';\n div.append(image);\n }\n }\n setAttachmentSize(photoID, div, boxWidth = 380, boxHeight = 380, isSticker = false) {\n let photo = /* MTDocument | MTPhoto */ null;\n if (typeof (photoID) === 'string') {\n photo = this.photos[photoID];\n if (!photo)\n return { _: 'photoEmpty' };\n }\n else {\n photo = photoID;\n }\n let photoSize = this.choosePhotoSize(photo, boxWidth, boxHeight);\n //console.log('setAttachmentSize', photo, photo.sizes[0].bytes, div);\n let sizes = photo.sizes || photo.thumbs;\n if (sizes && sizes[0].bytes) {\n this.setAttachmentPreview(sizes[0].bytes, div, isSticker);\n }\n if (photo._ == 'document' /* && photo.type != 'video' */ /* && photo.type != 'gif' */) {\n let { w, h } = utils_1.calcImageInBox(photo.w || 512, photo.h || 512, boxWidth, boxHeight);\n div.style.width = w + 'px';\n div.style.height = h + 'px';\n }\n else {\n let { w, h } = utils_1.calcImageInBox(photoSize.w || 100, photoSize.h || 100, boxWidth, boxHeight);\n div.style.width = w + 'px';\n div.style.height = h + 'px';\n }\n return photoSize;\n }\n preloadPhoto(photoID, photoSize) {\n return __awaiter(this, void 0, void 0, function* () {\n let photo = null;\n if (typeof (photoID) === 'string') {\n photo = this.photos[photoID];\n if (!photo)\n return Promise.reject();\n }\n else {\n photo = photoID;\n }\n if (!photoSize) {\n let fullWidth = this.windowW /* - (Config.Mobile ? 20 : 32) */;\n let fullHeight = this.windowH /* - (Config.Mobile ? 150 : 116) */;\n photoSize = this.choosePhotoSize(photo, fullWidth, fullHeight);\n }\n if (photoSize && photoSize._ != 'photoSizeEmpty') {\n photoSize.preloaded = true;\n // maybe it's a thumb\n let isPhoto = photoSize.size && photo.access_hash && photo.file_reference;\n let location = isPhoto ? {\n _: photo._ == 'document' ? 'inputDocumentFileLocation' : 'inputPhotoFileLocation',\n id: photo.id,\n access_hash: photo.access_hash,\n file_reference: photo.file_reference,\n thumb_size: photoSize.type\n } : photoSize.location;\n /* if(overwrite) {\n await apiFileManager.deleteFile(location);\n console.log('Photos deleted file!');\n } */\n if (isPhoto /* && photoSize.size >= 1e6 */) {\n //console.log('Photos downloadFile exec', photo);\n /* let promise = apiFileManager.downloadFile(photo.dc_id, location, photoSize.size);\n \n let blob = await promise;\n if(blob.size < photoSize.size && overwrite) {\n await apiFileManager.deleteFile(location);\n console.log('Photos deleted file!');\n return apiFileManager.downloadFile(photo.dc_id, location, photoSize.size);\n }\n \n return blob; */\n return apiFileManager_1.default.downloadFile(photo.dc_id, location, photoSize.size);\n }\n else {\n //console.log('Photos downloadSmallFile exec', photo, location);\n return apiFileManager_1.default.downloadSmallFile(location);\n }\n }\n else\n return Promise.reject('no photoSize');\n });\n }\n getPhoto(photoID) {\n return this.photos[photoID] || { _: 'photoEmpty' };\n }\n wrapForHistory(photoID, options = {}) {\n var photo = utils_1.copy(this.photos[photoID]) || { _: 'photoEmpty' };\n var width = options.website ? 64 : Math.min(this.windowW - 80, Config.Mobile ? 210 : 260);\n var height = options.website ? 64 : Math.min(this.windowH - 100, Config.Mobile ? 210 : 260);\n var thumbPhotoSize = this.choosePhotoSize(photo, width, height);\n var thumb = {\n width: width,\n height: height\n };\n if (options.website && Config.Mobile) {\n width = 50;\n height = 50;\n }\n // console.log('chosen photo size', photoID, thumbPhotoSize)\n if (thumbPhotoSize && thumbPhotoSize._ != 'photoSizeEmpty') {\n var dim = utils_1.calcImageInBox(thumbPhotoSize.w, thumbPhotoSize.h, width, height);\n thumb.width = dim.w;\n thumb.height = dim.h;\n thumb.location = thumbPhotoSize.location;\n thumb.size = thumbPhotoSize.size;\n }\n else {\n thumb.width = 100;\n thumb.height = 100;\n }\n photo.thumb = thumb;\n return photo;\n }\n /* public wrapForFull(photoID: string) {\n var photo = this.wrapForHistory(photoID);\n var fullWidth = document.body.scrollWidth - (Config.Mobile ? 0 : 32);\n var fullHeight = document.body.scrollHeight - (Config.Mobile ? 0 : 116);\n if (!Config.Mobile && fullWidth > 800) {\n fullWidth -= 208;\n }\n var fullPhotoSize = this.choosePhotoSize(photo, fullWidth, fullHeight);\n var full: any = {};\n \n full.width = fullWidth;\n full.height = fullHeight;\n \n if (fullPhotoSize && fullPhotoSize._ != 'photoSizeEmpty') {\n var wh = calcImageInBox(fullPhotoSize.w, fullPhotoSize.h, fullWidth, fullHeight, true);\n full.width = wh.w;\n full.height = wh.h;\n \n full.modalWidth = Math.max(full.width, Math.min(400, fullWidth));\n \n full.location = fullPhotoSize.location;\n full.size = fullPhotoSize.size;\n }\n \n photo.full = full;\n \n return photo;\n } */\n downloadPhoto(photoID) {\n var photo = this.photos[photoID];\n var ext = 'jpg';\n var mimeType = 'image/jpeg';\n var fileName = 'photo' + photoID + '.' + ext;\n var fullWidth = this.windowW;\n var fullHeight = this.windowH;\n var fullPhotoSize = this.choosePhotoSize(photo, fullWidth, fullHeight);\n var inputFileLocation = {\n // @ts-ignore\n _: photo._ == 'document' ? 'inputDocumentFileLocation' : 'inputPhotoFileLocation',\n id: photo.id,\n access_hash: photo.access_hash,\n file_reference: photo.file_reference,\n thumb_size: fullPhotoSize.type\n };\n try { // photo.dc_id, location, photoSize.size\n let writer = filemanager_1.default.chooseSaveFile(fileName, ext, mimeType, fullPhotoSize.size);\n writer.ready.then(() => {\n console.log('ready');\n apiFileManager_1.default.downloadFile(photo.dc_id, inputFileLocation, fullPhotoSize.size, {\n mimeType: mimeType,\n toFileEntry: writer\n }).then(() => {\n writer.close();\n //writer.abort();\n console.log('file save done', fileName, ext, mimeType, writer);\n }, (e) => {\n console.log('photo download failed', e);\n });\n });\n }\n catch (err) {\n console.error('err', err);\n var cachedBlob = apiFileManager_1.default.getCachedFile(inputFileLocation);\n if (cachedBlob) {\n return filemanager_1.default.download(cachedBlob, mimeType, fileName);\n }\n apiFileManager_1.default.downloadFile(photo.dc_id, inputFileLocation, fullPhotoSize.size, { mimeType: mimeType })\n .then((blob) => {\n filemanager_1.default.download(blob, mimeType, fileName);\n }, (e) => {\n console.log('photo download failed', e);\n });\n }\n }\n}\nexports.AppPhotosManager = AppPhotosManager;\nAppPhotosManager.jf = new Uint8Array(bin_utils_1.bytesFromHex('ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e19282321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2d2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc00011080000000003012200021101031101ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b5100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090a0bffc400b51100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00'));\nAppPhotosManager.Df = bin_utils_1.bytesFromHex('ffd9');\nexports.default = new AppPhotosManager();\n" + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"./utils\");\r\nclass LottieLoader {\r\n constructor() {\r\n this.lottie = null;\r\n this.animations = {};\r\n this.debug = false;\r\n this.lastTimeLoad = 0;\r\n this.waitingTimeouts = 0;\r\n }\r\n loadLottie() {\r\n if (this.loaded)\r\n return this.loaded;\r\n this.loaded = new Promise((resolve, reject) => {\r\n window.lottieLoaded = () => {\r\n console.log('lottie loaded');\r\n this.lottie = window.lottie;\r\n resolve();\r\n };\r\n let sc = document.createElement('script');\r\n sc.src = 'npm.lottie-web.chunk.js';\r\n sc.async = true;\r\n sc.onload = window.lottieLoaded;\r\n document.body.appendChild(sc);\r\n });\r\n }\r\n checkAnimations(blurred, group, destroy = false) {\r\n let groups = group ? [group] : Object.keys(this.animations);\r\n if (group && !this.animations[group]) {\r\n console.warn('no animation group:', group);\r\n this.animations[group] = [];\r\n //return;\r\n }\r\n for (let group of groups) {\r\n let animations = this.animations[group];\r\n let length = animations.length;\r\n for (let i = length - 1; i >= 0; --i) {\r\n let { animation, container, paused, autoplay, canvas } = animations[i];\r\n if (destroy && !utils_1.isInDOM(container)) {\r\n this.debug && console.log('destroy animation');\r\n animation.destroy();\r\n animations.splice(i, 1);\r\n continue;\r\n }\r\n if (canvas) {\r\n let c = container.firstElementChild;\r\n if (!c) {\r\n console.warn('no canvas element for check!', container, animations[i]);\r\n continue;\r\n }\r\n if (!c.height && !c.width && utils_1.isElementInViewport(container)) {\r\n //console.log('lottie need resize');\r\n animation.resize();\r\n }\r\n }\r\n if (!autoplay)\r\n continue;\r\n if (blurred || !utils_1.isElementInViewport(container)) {\r\n if (!paused) {\r\n this.debug && console.log('pause animation', utils_1.isElementInViewport(container), container);\r\n animation.pause();\r\n animations[i].paused = true;\r\n }\r\n }\r\n else if (paused) {\r\n this.debug && console.log('play animation', container);\r\n animation.play();\r\n animations[i].paused = false;\r\n }\r\n }\r\n }\r\n }\r\n loadAnimation(params, group = '') {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n //params.autoplay = false;\r\n //if(group != 'auth') {\r\n params.renderer = 'canvas';\r\n //}\r\n params.rendererSettings = {\r\n //context: context, // the canvas context\r\n //preserveAspectRatio: 'xMinYMin slice', // Supports the same options as the svg element's preserveAspectRatio property\r\n clearCanvas: true,\r\n progressiveLoad: true,\r\n hideOnTransparent: true,\r\n };\r\n if (!this.lottie) {\r\n if (!this.loaded)\r\n this.loadLottie();\r\n yield this.loaded;\r\n this.lottie.setQuality('low');\r\n //this.lottie.setQuality(10);\r\n }\r\n let time = Date.now();\r\n let diff = time - this.lastTimeLoad;\r\n let delay = 150;\r\n if (diff < delay) {\r\n delay *= ++this.waitingTimeouts;\r\n console.log('lottieloader delay:', delay);\r\n //await new Promise((resolve) => setTimeout(resolve, delay));\r\n this.waitingTimeouts--;\r\n }\r\n let animation = this.lottie.loadAnimation(params);\r\n this.lastTimeLoad = Date.now();\r\n if (!this.animations[group])\r\n this.animations[group] = [];\r\n this.animations[group].push({\r\n animation,\r\n container: params.container,\r\n paused: !params.autoplay,\r\n autoplay: params.autoplay,\r\n canvas: params.renderer == 'canvas'\r\n });\r\n if (params.autoplay) {\r\n this.checkAnimations();\r\n }\r\n return animation;\r\n });\r\n }\r\n getAnimation(el, group = '') {\r\n let groups = group ? [group] : Object.keys(this.animations);\r\n //console.log('getAnimation', groups, this.animations);\r\n for (let group of groups) {\r\n let animations = this.animations[group];\r\n let animation = animations.find(a => a.container === el);\r\n if (animation)\r\n return animation.animation;\r\n }\r\n return null;\r\n }\r\n}\r\nconst lottieLoader = new LottieLoader();\r\n//(window as any).LottieLoader = lottieLoader;\r\nexports.default = lottieLoader;\r\n" }, { "id": 12, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appChatsManager.ts", - "name": "./src/lib/appManagers/appChatsManager.ts", - "index": 61, - "index2": 55, - "size": 8364, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "name": "./src/lib/appManagers/appImManager.ts", + "index": 39, + "index2": 66, + "size": 86326, "cacheable": true, "built": true, "optional": false, @@ -2680,44 +2564,34 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "issuerId": 23, + "issuerName": "./src/pages/pageIm.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "dependencies": 1062 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 386, + "building": 1105, + "dependencies": 45 }, "failed": false, "errors": 0, @@ -2725,67 +2599,67 @@ "assets": [], "reasons": [ { - "moduleId": 4, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "8:42-70" + "userRequest": "./appImManager", + "loc": "29:39-64" }, { - "moduleId": 10, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPeersManager.ts", - "module": "./src/lib/appManagers/appPeersManager.ts", - "moduleName": "./src/lib/appManagers/appPeersManager.ts", + "moduleId": 23, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "module": "./src/pages/pageIm.ts", + "moduleName": "./src/pages/pageIm.ts", "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "7:42-70" + "userRequest": "../lib/appManagers/appImManager", + "loc": "16:67-109" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "moduleId": 26, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", + "module": "./src/lib/appManagers/appDialogsManager.ts", + "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "17:42-70" + "userRequest": "./appImManager", + "loc": "16:39-64" }, { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "38:42-70" + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "type": "cjs require", + "userRequest": "./appImManager", + "loc": "23:39-64" }, { - "moduleId": 27, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", + "moduleId": 42, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", + "module": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "11:42-70" + "userRequest": "./appImManager", + "loc": "16:39-64" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", "type": "cjs require", - "userRequest": "./appChatsManager", - "loc": "8:42-70" + "userRequest": "../lib/appManagers/appImManager", + "loc": "18:39-81" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "module": "./src/lib/services.ts", "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "./appManagers/appChatsManager", - "loc": "8:42-82" + "userRequest": "./appManagers/appImManager", + "loc": "15:39-76" } ], "usedExports": true, @@ -2793,16 +2667,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nclass AppChatsManager {\n constructor() {\n this.chats = {};\n this.usernames = {};\n this.channelAccess = {};\n this.megagroups = {};\n this.cachedPhotoLocations = {};\n utils_1.$rootScope.$on('apiUpdate', (e) => {\n // console.log('on apiUpdate', update)\n let update = e.detail;\n switch (update._) {\n case 'updateChannel':\n var channelID = update.channel_id;\n utils_1.$rootScope.$broadcast('channel_settings', { channelID: channelID });\n break;\n }\n });\n }\n saveApiChats(apiChats) {\n apiChats.forEach(chat => this.saveApiChat(chat));\n }\n saveApiChat(apiChat) {\n if (!utils_1.isObject(apiChat)) {\n return;\n }\n apiChat.rTitle = apiChat.title || 'chat_title_deleted';\n apiChat.rTitle = richtextprocessor_1.RichTextProcessor.wrapRichText(apiChat.title, { noLinks: true, noLinebreaks: true }) || 'chat_title_deleted';\n var result = this.chats[apiChat.id];\n var titleWords = utils_1.SearchIndexManager.cleanSearchText(apiChat.title || '').split(' ');\n var firstWord = titleWords.shift();\n var lastWord = titleWords.pop();\n apiChat.initials = firstWord.charAt(0) + (lastWord ? lastWord.charAt(0) : firstWord.charAt(1));\n apiChat.num = (Math.abs(apiChat.id >> 1) % 8) + 1;\n if (apiChat.pFlags === undefined) {\n apiChat.pFlags = {};\n }\n if (apiChat.pFlags.min) {\n if (result !== undefined) {\n return;\n }\n }\n if (apiChat._ == 'channel' &&\n apiChat.participants_count === undefined &&\n result !== undefined &&\n result.participants_count) {\n apiChat.participants_count = result.participants_count;\n }\n if (apiChat.username) {\n var searchUsername = utils_1.SearchIndexManager.cleanUsername(apiChat.username);\n this.usernames[searchUsername] = apiChat.id;\n }\n if (result === undefined) {\n result = this.chats[apiChat.id] = apiChat;\n }\n else {\n utils_1.safeReplaceObject(result, apiChat);\n utils_1.$rootScope.$broadcast('chat_update', apiChat.id);\n }\n if (this.cachedPhotoLocations[apiChat.id] !== undefined) {\n utils_1.safeReplaceObject(this.cachedPhotoLocations[apiChat.id], apiChat &&\n apiChat.photo ? apiChat.photo : { empty: true });\n }\n }\n getChat(id) {\n return this.chats[id] || { id: id, deleted: true, access_hash: this.channelAccess[id] };\n }\n hasRights(id, action) {\n if (!(id in this.chats)) {\n return false;\n }\n var chat = this.getChat(id);\n if (chat._ == 'chatForbidden' ||\n chat._ == 'channelForbidden' ||\n chat.pFlags.kicked ||\n chat.pFlags.left) {\n return false;\n }\n if (chat.pFlags.creator) {\n return true;\n }\n switch (action) {\n case 'send':\n if (chat._ == 'channel' &&\n !chat.pFlags.megagroup &&\n !chat.pFlags.editor) {\n return false;\n }\n break;\n case 'edit_title':\n case 'edit_photo':\n case 'invite':\n if (chat._ == 'channel') {\n if (chat.pFlags.megagroup) {\n if (!chat.pFlags.editor &&\n !(action == 'invite' && chat.pFlags.democracy)) {\n return false;\n }\n }\n else {\n return false;\n }\n }\n else {\n if (chat.pFlags.admins_enabled &&\n !chat.pFlags.admin) {\n return false;\n }\n }\n break;\n }\n return true;\n }\n resolveUsername(username) {\n return this.usernames[username] || 0;\n }\n saveChannelAccess(id, accessHash) {\n this.channelAccess[id] = accessHash;\n }\n saveIsMegagroup(id) {\n this.megagroups[id] = true;\n }\n isChannel(id) {\n var chat = this.chats[id];\n if (chat && (chat._ == 'channel' || chat._ == 'channelForbidden') ||\n this.channelAccess[id]) {\n return true;\n }\n return false;\n }\n isMegagroup(id) {\n if (this.megagroups[id]) {\n return true;\n }\n var chat = this.chats[id];\n if (chat && chat._ == 'channel' && chat.pFlags.megagroup) {\n return true;\n }\n return false;\n }\n isBroadcast(id) {\n return this.isChannel(id) && !this.isMegagroup(id);\n }\n getChatInput(id) {\n return id || 0;\n }\n getChannelInput(id) {\n if (!id) {\n return { _: 'inputChannelEmpty' };\n }\n return {\n _: 'inputChannel',\n channel_id: id,\n access_hash: this.getChat(id).access_hash || this.channelAccess[id] || 0\n };\n }\n hasChat(id, allowMin) {\n var chat = this.chats[id];\n return utils_1.isObject(chat) && (allowMin || !chat.pFlags.min);\n }\n getChatPhoto(id) {\n var chat = this.getChat(id);\n if (this.cachedPhotoLocations[id] === undefined) {\n this.cachedPhotoLocations[id] = chat && chat.photo ? chat.photo : { empty: true };\n }\n return this.cachedPhotoLocations[id];\n }\n getChatString(id) {\n var chat = this.getChat(id);\n if (this.isChannel(id)) {\n return (this.isMegagroup(id) ? 's' : 'c') + id + '_' + chat.access_hash;\n }\n return 'g' + id;\n }\n wrapForFull(id, fullChat) {\n var chatFull = utils_1.copy(fullChat);\n var chat = this.getChat(id);\n if (!chatFull.participants_count) {\n chatFull.participants_count = chat.participants_count;\n }\n if (chatFull.participants &&\n chatFull.participants._ == 'chatParticipants') {\n chatFull.participants.participants = this.wrapParticipants(id, chatFull.participants.participants);\n }\n if (chatFull.about) {\n chatFull.rAbout = richtextprocessor_1.RichTextProcessor.wrapRichText(chatFull.about, { noLinebreaks: true });\n }\n chatFull.peerString = this.getChatString(id);\n chatFull.chat = chat;\n return chatFull;\n }\n wrapParticipants(id, participants) {\n var chat = this.getChat(id);\n var myID = appUsersManager_1.default.getSelf().id;\n if (this.isChannel(id)) {\n var isAdmin = chat.pFlags.creator || chat.pFlags.editor || chat.pFlags.moderator;\n participants.forEach((participant) => {\n participant.canLeave = myID == participant.user_id;\n participant.canKick = isAdmin && participant._ == 'channelParticipant';\n // just for order by last seen\n participant.user = appUsersManager_1.default.getUser(participant.user_id);\n });\n }\n else {\n var isAdmin = chat.pFlags.creator || chat.pFlags.admins_enabled && chat.pFlags.admin;\n participants.forEach((participant) => {\n participant.canLeave = myID == participant.user_id;\n participant.canKick = !participant.canLeave && (chat.pFlags.creator ||\n participant._ == 'chatParticipant' && (isAdmin || myID == participant.inviter_id));\n // just for order by last seen\n participant.user = appUsersManager_1.default.getUser(participant.user_id);\n });\n }\n return participants;\n }\n}\nexports.AppChatsManager = AppChatsManager;\nexports.default = new AppChatsManager();\n" + "depth": 2, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n//import apiManager from '../mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\r\nconst appDialogsManager_1 = __importDefault(require(\"./appDialogsManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst appSidebarRight_1 = __importDefault(require(\"./appSidebarRight\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst lottieLoader_1 = __importDefault(require(\"../lottieLoader\"));\r\nconst appMediaViewer_1 = __importDefault(require(\"./appMediaViewer\"));\r\nconst appSidebarLeft_1 = __importDefault(require(\"./appSidebarLeft\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst wrappers_1 = require(\"../../components/wrappers\");\r\nconst preloader_1 = __importDefault(require(\"../../components/preloader\"));\r\nconst misc_1 = require(\"../../components/misc\");\r\nconst chatInput_1 = require(\"../../components/chatInput\");\r\nconst scrollable_1 = __importDefault(require(\"../../components/scrollable\"));\r\nconst bubbleGroups_1 = __importDefault(require(\"../../components/bubbleGroups\"));\r\nconst lazyLoadQueue_1 = __importDefault(require(\"../../components/lazyLoadQueue\"));\r\nconsole.log('appImManager included!');\r\nappSidebarLeft_1.default; // just to include\r\nlet testScroll = false;\r\nclass AppImManager {\r\n constructor() {\r\n /* if(!lottieLoader.loaded) {\r\n lottieLoader.loadLottie();\r\n } */\r\n this.pageEl = document.querySelector('.page-chats');\r\n this.btnMute = this.pageEl.querySelector('.tool-mute');\r\n this.btnMenuMute = this.pageEl.querySelector('.menu-mute');\r\n this.avatarEl = document.getElementById('im-avatar');\r\n this.titleEl = document.getElementById('im-title');\r\n this.subtitleEl = document.getElementById('im-subtitle');\r\n this.bubblesContainer = document.getElementById('bubbles');\r\n this.chatInner = document.getElementById('bubbles-inner');\r\n this.searchBtn = this.pageEl.querySelector('.chat-search-button');\r\n this.goDownBtn = this.pageEl.querySelector('#bubbles-go-down');\r\n this.chatInputC = null;\r\n this.myID = 0;\r\n this.peerID = 0;\r\n this.muted = false;\r\n this.bubbles = {};\r\n this.dateMessages = {};\r\n this.unreaded = [];\r\n this.unreadOut = [];\r\n this.needUpdate = []; // if need wrapSingleMessage\r\n this.offline = false;\r\n this.updateStatusInterval = 0;\r\n this.pinnedMsgID = 0;\r\n this.pinnedMessageContainer = this.pageEl.querySelector('.pinned-message');\r\n this.pinnedMessageContent = this.pinnedMessageContainer.querySelector('.pinned-message-subtitle');\r\n this.firstTopMsgID = 0;\r\n this.lazyLoadQueue = new lazyLoadQueue_1.default();\r\n this.scroll = null;\r\n this.scrollable = null;\r\n this.preloader = null;\r\n this.typingTimeouts = {};\r\n this.typingUsers = {}; // to peerID\r\n this.topbar = null;\r\n this.chatInput = null;\r\n this.contextMenu = document.getElementById('bubble-contextmenu');\r\n this.contextMenuPin = this.contextMenu.querySelector('.menu-pin');\r\n this.contextMenuEdit = this.contextMenu.querySelector('.menu-edit');\r\n this.popupDeleteMessage = {};\r\n this.setPeerPromise = null;\r\n this.bubbleGroups = new bubbleGroups_1.default();\r\n this.scrolledDown = true;\r\n this.onScrollRAF = 0;\r\n this.isScrollingTimeout = 0;\r\n this.datesIntersectionObserver = null;\r\n this.lastDateMessageDiv = null;\r\n this.log = polyfill_1.logger('IM');\r\n this.chatInputC = new chatInput_1.ChatInput();\r\n this.preloader = new preloader_1.default(null, false);\r\n this.popupDeleteMessage.popupEl = this.pageEl.querySelector('.popup-delete-message');\r\n this.popupDeleteMessage.deleteBothBtn = this.popupDeleteMessage.popupEl.querySelector('.popup-delete-both');\r\n this.popupDeleteMessage.deleteMeBtn = this.popupDeleteMessage.popupEl.querySelector('.popup-delete-me');\r\n this.popupDeleteMessage.cancelBtn = this.popupDeleteMessage.popupEl.querySelector('.popup-close');\r\n mtprotoworker_1.default.getUserID().then((id) => {\r\n this.myID = utils_1.$rootScope.myID = id;\r\n });\r\n this.topbar = document.getElementById('topbar');\r\n this.chatInput = document.getElementById('chat-input');\r\n utils_1.$rootScope.$on('user_auth', (e) => {\r\n let userAuth = e.detail;\r\n this.myID = utils_1.$rootScope.myID = userAuth ? userAuth.id : 0;\r\n });\r\n // will call when message is sent (only 1)\r\n utils_1.$rootScope.$on('history_append', (e) => {\r\n let details = e.detail;\r\n this.renderNewMessagesByIDs([details.messageID]);\r\n });\r\n // will call when sent for update pos\r\n utils_1.$rootScope.$on('history_update', (e) => {\r\n let details = e.detail;\r\n if (details.mid && details.peerID == this.peerID) {\r\n let mid = details.mid;\r\n let bubble = this.bubbles[mid];\r\n if (!bubble)\r\n return;\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n //this.log('history_update', this.bubbles[mid], mid, message);\r\n let dateMessage = this.getDateContainerByMessage(message, false);\r\n dateMessage.container.append(bubble);\r\n this.bubbleGroups.addBubble(bubble, message, false);\r\n //this.renderMessage(message, false, false, bubble);\r\n }\r\n });\r\n utils_1.$rootScope.$on('history_multiappend', (e) => {\r\n let msgIDsByPeer = e.detail;\r\n if (!(this.peerID in msgIDsByPeer))\r\n return;\r\n let msgIDs = msgIDsByPeer[this.peerID];\r\n this.renderNewMessagesByIDs(msgIDs);\r\n });\r\n utils_1.$rootScope.$on('history_delete', (e) => {\r\n let detail = e.detail;\r\n this.deleteMessagesByIDs(Object.keys(detail.msgs).map(s => +s));\r\n });\r\n // Calls when message successfully sent and we have an ID\r\n utils_1.$rootScope.$on('message_sent', (e) => {\r\n let { tempID, mid } = e.detail;\r\n ////this.log('message_sent', e.detail);\r\n let bubble = this.bubbles[tempID];\r\n if (bubble) {\r\n this.bubbles[mid] = bubble;\r\n /////this.log('message_sent', bubble);\r\n // set cached url to media\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n if (message.media && message.media.photo) {\r\n let photo = appPhotosManager_1.default.getPhoto(tempID);\r\n if (photo) {\r\n let newPhoto = message.media.photo;\r\n newPhoto.downloaded = photo.downloaded;\r\n newPhoto.url = photo.url;\r\n }\r\n }\r\n bubble.classList.remove('is-sending');\r\n bubble.classList.add('is-sent');\r\n bubble.dataset.mid = mid;\r\n this.bubbleGroups.removeBubble(bubble, tempID);\r\n delete this.bubbles[tempID];\r\n }\r\n else {\r\n this.log.warn('message_sent there is no bubble', e.detail);\r\n }\r\n let length = this.unreadOut.length;\r\n for (let i = 0; i < length; i++) {\r\n if (this.unreadOut[i] == tempID) {\r\n this.unreadOut[i] = mid;\r\n }\r\n }\r\n });\r\n utils_1.$rootScope.$on('message_edit', (e) => {\r\n let { peerID, mid, id, justMedia } = e.detail;\r\n if (peerID != this.peerID)\r\n return;\r\n let bubble = this.bubbles[mid];\r\n if (!bubble)\r\n return;\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n this.renderMessage(message, true, false, bubble, false);\r\n });\r\n utils_1.$rootScope.$on('messages_downloaded', (e) => {\r\n let mids = e.detail;\r\n mids.forEach(mid => {\r\n if (this.pinnedMsgID == mid) {\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n /////this.log('setting pinned message', message);\r\n this.pinnedMessageContainer.dataset.mid = '' + mid;\r\n this.pinnedMessageContainer.style.display = '';\r\n this.pinnedMessageContent.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(message.message);\r\n }\r\n this.needUpdate.forEachReverse((obj, idx) => {\r\n if (obj.replyMid == mid) {\r\n let { mid, replyMid } = this.needUpdate.splice(idx, 1)[0];\r\n //this.log('messages_downloaded', mid, replyMid, i, this.needUpdate, this.needUpdate.length, mids, this.bubbles[mid]);\r\n let bubble = this.bubbles[mid];\r\n if (!bubble)\r\n return;\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n let repliedMessage = appMessagesManager_1.default.getMessage(replyMid);\r\n if (repliedMessage.deleted) { // чтобы не пыталось бесконечно загрузить удалённое сообщение\r\n delete message.reply_to_mid; // WARNING!\r\n }\r\n this.renderMessage(message, true, false, bubble, false);\r\n //this.renderMessage(message, true, true, bubble, false);\r\n }\r\n });\r\n });\r\n });\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n let update = e.detail;\r\n this.handleUpdate(update);\r\n });\r\n window.addEventListener('blur', () => {\r\n lottieLoader_1.default.checkAnimations(true);\r\n this.offline = true;\r\n this.updateStatus();\r\n clearInterval(this.updateStatusInterval);\r\n window.addEventListener('focus', () => {\r\n lottieLoader_1.default.checkAnimations(false);\r\n this.offline = false;\r\n this.updateStatus();\r\n this.updateStatusInterval = window.setInterval(() => this.updateStatus(), 50e3);\r\n }, { once: true });\r\n });\r\n this.pageEl.querySelector('.person').addEventListener('click', (e) => {\r\n appSidebarRight_1.default.toggleSidebar(true);\r\n });\r\n this.chatInner.addEventListener('click', (e) => {\r\n let target = e.target;\r\n let bubble = null;\r\n try {\r\n bubble = utils_1.findUpClassName(e.target, 'bubble');\r\n }\r\n catch (err) { }\r\n if (!bubble)\r\n return;\r\n if (['IMG', 'VIDEO', 'SVG', 'DIV', 'image'].indexOf(target.tagName) === -1)\r\n target = utils_1.findUpTag(target, 'DIV');\r\n if (target.tagName == 'DIV') {\r\n if (target.classList.contains('forward')) {\r\n let savedFrom = bubble.dataset.savedFrom;\r\n let splitted = savedFrom.split('_');\r\n let peerID = +splitted[0];\r\n let msgID = +splitted[1];\r\n ////this.log('savedFrom', peerID, msgID);\r\n this.setPeer(peerID, msgID, true);\r\n return;\r\n }\r\n else if (target.classList.contains('user-avatar') || target.classList.contains('name')) {\r\n let peerID = +target.dataset.peerID;\r\n if (!isNaN(peerID)) {\r\n this.setPeer(peerID);\r\n }\r\n return;\r\n }\r\n let isReplyClick = false;\r\n try {\r\n isReplyClick = !!utils_1.findUpClassName(e.target, 'reply');\r\n }\r\n catch (err) { }\r\n if (isReplyClick && bubble.classList.contains('is-reply') /* || bubble.classList.contains('forwarded') */) {\r\n let originalMessageID = +bubble.getAttribute('data-original-mid');\r\n this.setPeer(this.peerID, originalMessageID);\r\n }\r\n }\r\n else if (bubble.classList.contains('round')) {\r\n }\r\n else if (target.tagName == 'IMG' && target.parentElement.classList.contains('user-avatar')) {\r\n let peerID = +target.parentElement.dataset.peerID;\r\n if (!isNaN(peerID)) {\r\n this.setPeer(peerID);\r\n }\r\n }\r\n else if (((target.tagName == 'IMG' || target.tagName == 'image') && !target.classList.contains('emoji')) || target.tagName == 'VIDEO') {\r\n let messageID = 0;\r\n for (let mid in this.bubbles) {\r\n if (this.bubbles[mid] == bubble) {\r\n messageID = +mid;\r\n break;\r\n }\r\n }\r\n let message = appMessagesManager_1.default.getMessage(messageID);\r\n if (!message) {\r\n this.log.warn('no message by messageID:', messageID);\r\n return;\r\n }\r\n let ids = Object.keys(this.bubbles).map(k => +k).filter(id => {\r\n //if(!this.scrollable.visibleElements.find(e => e.element == this.bubbles[id])) return false;\r\n let message = appMessagesManager_1.default.getMessage(id);\r\n return message.media && (message.media.photo || (message.media.document && (message.media.document.type == 'video' || message.media.document.type == 'gif')) || (message.media.webpage && (message.media.webpage.document || message.media.webpage.photo)));\r\n }).sort();\r\n let idx = ids.findIndex(i => i == messageID);\r\n let targets = ids.map(id => ({\r\n //element: (this.bubbles[id].querySelector('img, video') || this.bubbles[id].querySelector('image')) as HTMLElement, \r\n element: this.bubbles[id].querySelector('.attachment img, .preview img, video, .bubble__media-container'),\r\n mid: id\r\n }));\r\n /////this.log('ids', ids, idx, this.bubbles[prev], this.bubbles[next]);\r\n appMediaViewer_1.default.openMedia(message, targets[idx].element, true, this.scroll.parentElement, targets.slice(0, idx), targets.slice(idx + 1));\r\n //appMediaViewer.openMedia(message, target as HTMLImageElement);\r\n }\r\n //console.log('chatInner click', e);\r\n });\r\n this.searchBtn.addEventListener('click', (e) => {\r\n if (this.peerID) {\r\n appSidebarRight_1.default.beginSearch();\r\n //appSidebarLeft.archivedCount;\r\n //appSidebarLeft.beginSearch(this.peerID);\r\n }\r\n });\r\n this.pinnedMessageContainer.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n let mid = +this.pinnedMessageContainer.getAttribute('data-mid');\r\n this.setPeer(this.peerID, mid);\r\n });\r\n this.btnMenuMute.addEventListener('click', () => this.mutePeer());\r\n this.btnMute.addEventListener('click', () => this.mutePeer());\r\n let onKeyDown = (e) => {\r\n let target = e.target;\r\n //if(target.tagName == 'INPUT') return;\r\n //this.log('onkeydown', e);\r\n if (this.chatInputC.attachMediaPopUp.container.classList.contains('active')) {\r\n if (target.tagName != 'INPUT') {\r\n this.chatInputC.attachMediaPopUp.captionInput.focus();\r\n }\r\n if (e.key == 'Enter') {\r\n this.chatInputC.attachMediaPopUp.sendBtn.click();\r\n }\r\n else if (e.key == 'Escape') {\r\n this.chatInputC.attachMediaPopUp.container.classList.remove('active');\r\n }\r\n return;\r\n }\r\n if (e.key == 'Meta' || e.key == 'Control') {\r\n return;\r\n }\r\n else if (e.key == 'c' && (e.ctrlKey || e.metaKey) && target.tagName != 'INPUT') {\r\n return;\r\n }\r\n if (e.target != this.chatInputC.messageInput && target.tagName != 'INPUT') {\r\n this.chatInputC.messageInput.focus();\r\n utils_1.placeCaretAtEnd(this.chatInputC.messageInput);\r\n }\r\n };\r\n document.body.addEventListener('keydown', onKeyDown);\r\n this.chatInner.addEventListener('contextmenu', e => {\r\n let bubble = null;\r\n try {\r\n bubble = utils_1.findUpClassName(e.target, 'bubble__container');\r\n }\r\n catch (e) { }\r\n if (bubble) {\r\n bubble = bubble.parentElement; // bc container\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n let msgID = 0;\r\n for (let id in this.bubbles) {\r\n if (this.bubbles[id] === bubble) {\r\n msgID = +id;\r\n break;\r\n }\r\n }\r\n if (!msgID)\r\n return;\r\n if (this.myID == this.peerID || (this.peerID < 0 && !appPeersManager_1.default.isChannel(this.peerID) && !appPeersManager_1.default.isMegagroup(this.peerID))) {\r\n this.contextMenuPin.style.display = '';\r\n }\r\n else\r\n this.contextMenuPin.style.display = 'none';\r\n this.contextMenuMsgID = msgID;\r\n let side = bubble.classList.contains('is-in') ? 'left' : 'right';\r\n this.contextMenuEdit.style.display = side == 'right' ? '' : 'none';\r\n this.contextMenu.classList.remove('bottom-left', 'bottom-right');\r\n this.contextMenu.classList.add(side == 'left' ? 'bottom-right' : 'bottom-left');\r\n let { clientX, clientY } = e;\r\n this.contextMenu.style.left = (side == 'right' ? clientX - this.contextMenu.scrollWidth : clientX) + 'px';\r\n if ((clientY + this.contextMenu.scrollHeight) > window.innerHeight) {\r\n this.contextMenu.style.top = (window.innerHeight - this.contextMenu.scrollHeight) + 'px';\r\n }\r\n else {\r\n this.contextMenu.style.top = clientY + 'px';\r\n }\r\n //this.contextMenu.classList.add('active');\r\n misc_1.openBtnMenu(this.contextMenu);\r\n /////this.log('contextmenu', e, bubble, msgID, side);\r\n }\r\n });\r\n this.contextMenu.querySelector('.menu-copy').addEventListener('click', () => {\r\n let message = appMessagesManager_1.default.getMessage(this.contextMenuMsgID);\r\n let str = message ? message.message : '';\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = str;\r\n textArea.style.position = \"fixed\"; //avoid scrolling to bottom\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n try {\r\n document.execCommand('copy');\r\n }\r\n catch (err) {\r\n console.error('Oops, unable to copy', err);\r\n }\r\n document.body.removeChild(textArea);\r\n });\r\n this.contextMenu.querySelector('.menu-delete').addEventListener('click', () => {\r\n if (this.peerID == this.myID) {\r\n this.popupDeleteMessage.deleteBothBtn.style.display = 'none';\r\n this.popupDeleteMessage.deleteMeBtn.innerText = 'DELETE';\r\n }\r\n else {\r\n this.popupDeleteMessage.deleteBothBtn.style.display = '';\r\n this.popupDeleteMessage.deleteMeBtn.innerText = 'DELETE JUST FOR ME';\r\n if (this.peerID > 0) {\r\n let title = appPeersManager_1.default.getPeerTitle(this.peerID);\r\n this.popupDeleteMessage.deleteBothBtn.innerHTML = 'DELETE FOR ME AND ' + title;\r\n }\r\n else {\r\n this.popupDeleteMessage.deleteBothBtn.innerText = 'DELETE FOR ALL';\r\n }\r\n }\r\n this.popupDeleteMessage.popupEl.classList.add('active');\r\n });\r\n this.contextMenu.querySelector('.menu-reply').addEventListener('click', () => {\r\n let message = appMessagesManager_1.default.getMessage(this.contextMenuMsgID);\r\n this.chatInputC.setTopInfo(appPeersManager_1.default.getPeerTitle(message.fromID, true), message.message, undefined, message.media);\r\n this.chatInputC.replyToMsgID = this.contextMenuMsgID;\r\n this.chatInputC.editMsgID = 0;\r\n });\r\n this.contextMenuEdit.addEventListener('click', () => {\r\n let message = appMessagesManager_1.default.getMessage(this.contextMenuMsgID);\r\n this.chatInputC.setTopInfo('Editing', message.message, message.message, message.media);\r\n this.chatInputC.replyToMsgID = 0;\r\n this.chatInputC.editMsgID = this.contextMenuMsgID;\r\n });\r\n this.contextMenuPin.addEventListener('click', () => {\r\n mtprotoworker_1.default.invokeApi('messages.updatePinnedMessage', {\r\n flags: 0,\r\n peer: appPeersManager_1.default.getInputPeerByID(this.peerID),\r\n id: this.contextMenuMsgID\r\n }).then(updates => {\r\n /////this.log('pinned updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n });\r\n this.popupDeleteMessage.deleteBothBtn.addEventListener('click', () => {\r\n this.deleteMessages(true);\r\n this.popupDeleteMessage.cancelBtn.click();\r\n });\r\n this.popupDeleteMessage.deleteMeBtn.addEventListener('click', () => {\r\n this.deleteMessages(false);\r\n this.popupDeleteMessage.cancelBtn.click();\r\n });\r\n this.goDownBtn.addEventListener('click', () => {\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\r\n if (dialog) {\r\n this.setPeer(this.peerID, dialog.top_message);\r\n }\r\n else {\r\n this.log('will scroll down 3');\r\n this.scroll.scrollTop = this.scroll.scrollHeight;\r\n }\r\n });\r\n this.updateStatusInterval = window.setInterval(() => this.updateStatus(), 50e3);\r\n this.updateStatus();\r\n setInterval(() => this.setPeerStatus(), 60e3);\r\n this.setScroll();\r\n apiUpdatesManager_1.default.attach();\r\n this.datesIntersectionObserver = new IntersectionObserver((entries) => {\r\n this.log('intersection', entries);\r\n let entry = entries.filter(entry => entry.boundingClientRect.top < 0).sort((a, b) => b.boundingClientRect.top - a.boundingClientRect.top)[0];\r\n if (!entry)\r\n return;\r\n let container = entry.isIntersecting ? entry.target : entry.target.nextElementSibling;\r\n for (let timestamp in this.dateMessages) {\r\n let dateMessage = this.dateMessages[timestamp];\r\n if (dateMessage.container == container) {\r\n if (this.lastDateMessageDiv) {\r\n this.lastDateMessageDiv.classList.remove('is-sticky');\r\n }\r\n dateMessage.div.classList.add('is-sticky');\r\n this.lastDateMessageDiv = dateMessage.div;\r\n break;\r\n }\r\n }\r\n } /* , {root: this.chatInner} */);\r\n }\r\n deleteMessages(revoke = false) {\r\n let flags = revoke ? 1 : 0;\r\n let ids = [this.contextMenuMsgID];\r\n mtprotoworker_1.default.invokeApi('messages.deleteMessages', {\r\n flags: flags,\r\n revoke: revoke,\r\n id: ids\r\n }).then((affectedMessages) => {\r\n /////this.log('deleted messages:', affectedMessages);\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updatePts',\r\n pts: affectedMessages.pts,\r\n pts_count: affectedMessages.pts_count\r\n }\r\n });\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateDeleteMessages',\r\n messages: ids\r\n }\r\n });\r\n });\r\n }\r\n updateStatus() {\r\n if (!this.myID)\r\n return Promise.resolve();\r\n appUsersManager_1.default.setUserStatus(this.myID, this.offline);\r\n return mtprotoworker_1.default.invokeApi('account.updateStatus', { offline: this.offline });\r\n }\r\n loadMoreHistory(top) {\r\n this.log('loadMoreHistory', top);\r\n if (!this.peerID || testScroll || this.setPeerPromise || (top && this.getHistoryTopPromise) || (!top && this.getHistoryBottomPromise))\r\n return;\r\n let history = Object.keys(this.bubbles).map(id => +id).sort();\r\n if (!history.length)\r\n return;\r\n /* let history = appMessagesManager.historiesStorage[this.peerID].history;\r\n let length = history.length; */\r\n // filter negative ids\r\n let lastBadIndex = -1;\r\n for (let i = 0; i < history.length; ++i) {\r\n if (history[i] <= 0)\r\n lastBadIndex = i;\r\n else\r\n break;\r\n }\r\n if (lastBadIndex != -1) {\r\n history = history.slice(lastBadIndex + 1);\r\n }\r\n if (top && !this.scrolledAll) {\r\n this.scrollable.lock('both');\r\n this.log('Will load more (up) history by id:', history[0], 'maxID:', history[history.length - 1], history);\r\n /* false && */ this.getHistory(history[0], true);\r\n }\r\n if (this.scrolledAllDown)\r\n return;\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\r\n /* if(!dialog) {\r\n this.log.warn('no dialog for load history');\r\n return;\r\n } */\r\n // if scroll down after search\r\n if (!top && (!dialog || history.indexOf(dialog.top_message) === -1)) {\r\n this.scrollable.lock('both');\r\n this.log('Will load more (down) history by maxID:', history[history.length - 1], history);\r\n /* false && */ this.getHistory(history[history.length - 1], false, true);\r\n }\r\n }\r\n onScroll() {\r\n if (this.onScrollRAF)\r\n window.cancelAnimationFrame(this.onScrollRAF);\r\n this.onScrollRAF = window.requestAnimationFrame(() => {\r\n let readed = [];\r\n this.unreaded.forEachReverse((msgID, idx) => {\r\n let bubble = this.bubbles[msgID];\r\n if (utils_1.isElementInViewport(bubble)) {\r\n readed.push(msgID);\r\n this.unreaded.splice(idx, 1);\r\n }\r\n });\r\n lottieLoader_1.default.checkAnimations(false, 'chat');\r\n if (readed.length) {\r\n let max = Math.max(...readed);\r\n let min = Math.min(...readed);\r\n if (this.peerID < 0) {\r\n max = appMessagesIDsManager_1.default.getMessageIDInfo(max)[0];\r\n min = appMessagesIDsManager_1.default.getMessageIDInfo(min)[0];\r\n }\r\n //appMessagesManager.readMessages(readed);\r\n appMessagesManager_1.default.readHistory(this.peerID, max, min).catch((err) => {\r\n this.log.error('readHistory err:', err);\r\n appMessagesManager_1.default.readHistory(this.peerID, max, min);\r\n });\r\n }\r\n if (this.isScrollingTimeout) {\r\n clearTimeout(this.isScrollingTimeout);\r\n }\r\n else {\r\n this.chatInner.classList.add('is-scrolling');\r\n }\r\n this.isScrollingTimeout = setTimeout(() => {\r\n this.chatInner.classList.remove('is-scrolling');\r\n this.isScrollingTimeout = 0;\r\n }, 300);\r\n if (this.scroll.scrollHeight - (this.scroll.scrollTop + this.scroll.offsetHeight) == 0 /* <= 5 */) {\r\n this.scroll.parentElement.classList.add('scrolled-down');\r\n this.scrolledDown = true;\r\n }\r\n else if (this.scroll.parentElement.classList.contains('scrolled-down')) {\r\n this.scroll.parentElement.classList.remove('scrolled-down');\r\n this.scrolledDown = false;\r\n }\r\n this.onScrollRAF = 0;\r\n });\r\n }\r\n setScroll() {\r\n this.scrollable = new scrollable_1.default(this.bubblesContainer, 'y', 750, 'IM', this.chatInner /* 1500 */, 300);\r\n this.scroll = this.scrollable.container;\r\n this.bubblesContainer.append(this.goDownBtn);\r\n //this.scrollable.setVirtualContainer(this.chatInner);\r\n this.scrollable.onScrolledTop = () => this.loadMoreHistory(true);\r\n this.scrollable.onScrolledBottom = () => this.loadMoreHistory(false);\r\n this.scroll.addEventListener('scroll', this.onScroll.bind(this));\r\n this.scroll.parentElement.classList.add('scrolled-down');\r\n }\r\n setPeerStatus(needClear = false) {\r\n if (!this.myID)\r\n return;\r\n if (this.peerID < 0) { // not human\r\n let chat = appPeersManager_1.default.getPeer(this.peerID);\r\n let isChannel = appPeersManager_1.default.isChannel(this.peerID) && !appPeersManager_1.default.isMegagroup(this.peerID);\r\n this.subtitleEl.classList.remove('online');\r\n appSidebarRight_1.default.profileElements.subtitle.classList.remove('online');\r\n ///////this.log('setPeerStatus', chat);\r\n if (needClear) {\r\n this.subtitleEl.innerText = appSidebarRight_1.default.profileElements.subtitle.innerText = '';\r\n }\r\n Promise.all([\r\n appPeersManager_1.default.isMegagroup(this.peerID) ? mtprotoworker_1.default.invokeApi('messages.getOnlines', {\r\n peer: appPeersManager_1.default.getInputPeerByID(this.peerID)\r\n }) : Promise.resolve(),\r\n // will redirect if wrong\r\n appProfileManager_1.default.getChatFull(chat.id)\r\n ]).then(results => {\r\n let [chatOnlines, chatInfo] = results;\r\n let onlines = chatOnlines ? chatOnlines.onlines : 1;\r\n ///////////this.log('chatInfo res:', chatInfo);\r\n if (chatInfo.pinned_msg_id) { // request pinned message\r\n this.pinnedMsgID = chatInfo.pinned_msg_id;\r\n appMessagesManager_1.default.wrapSingleMessage(chatInfo.pinned_msg_id);\r\n }\r\n let participants_count = chatInfo.participants_count || chatInfo.participants.participants.length;\r\n let subtitle = utils_1.numberWithCommas(participants_count) + ' ' + (isChannel ? 'subscribers' : 'members');\r\n if (onlines > 1) {\r\n subtitle += ', ' + utils_1.numberWithCommas(onlines) + ' online';\r\n }\r\n this.subtitleEl.innerText = appSidebarRight_1.default.profileElements.subtitle.innerText = subtitle;\r\n });\r\n }\r\n else if (!appUsersManager_1.default.isBot(this.peerID)) { // user\r\n let user = appUsersManager_1.default.getUser(this.peerID);\r\n if (this.myID == this.peerID) {\r\n this.subtitleEl.innerText = appSidebarRight_1.default.profileElements.subtitle.innerText = '';\r\n }\r\n else if (user && user.status) {\r\n let subtitle = '';\r\n switch (user.status._) {\r\n case 'userStatusRecently': {\r\n subtitle += 'last seen recently';\r\n break;\r\n }\r\n case 'userStatusOffline': {\r\n subtitle = 'last seen ';\r\n let date = user.status.was_online;\r\n let now = Date.now() / 1000;\r\n if ((now - date) < 60) {\r\n subtitle += ' just now';\r\n }\r\n else if ((now - date) < 3600) {\r\n subtitle += ((now - date) / 60 | 0) + ' minutes ago';\r\n }\r\n else if (now - date < 86400) {\r\n subtitle += ((now - date) / 3600 | 0) + ' hours ago';\r\n }\r\n else {\r\n let d = new Date(date * 1000);\r\n subtitle += ('0' + d.getDate()).slice(-2) + '.' + ('0' + (d.getMonth() + 1)).slice(-2) + ' at ' +\r\n ('0' + d.getHours()).slice(-2) + ':' + ('0' + d.getMinutes()).slice(-2);\r\n }\r\n break;\r\n }\r\n case 'userStatusOnline': {\r\n this.subtitleEl.classList.add('online');\r\n appSidebarRight_1.default.profileElements.subtitle.classList.add('online');\r\n subtitle = 'online';\r\n break;\r\n }\r\n }\r\n appSidebarRight_1.default.profileElements.subtitle.innerText = subtitle;\r\n if (this.typingUsers[this.peerID] == this.peerID) {\r\n this.subtitleEl.innerText = 'typing...';\r\n this.subtitleEl.classList.add('online');\r\n }\r\n else {\r\n this.subtitleEl.innerText = subtitle;\r\n if (subtitle != 'online') {\r\n this.subtitleEl.classList.remove('online');\r\n appSidebarRight_1.default.profileElements.subtitle.classList.remove('online');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n cleanup() {\r\n ////console.time('appImManager cleanup');\r\n this.peerID = utils_1.$rootScope.selectedPeerID = 0;\r\n this.scrolledAll = false;\r\n this.scrolledAllDown = false;\r\n this.muted = false;\r\n /* for(let i in this.bubbles) {\r\n let bubble = this.bubbles[i];\r\n bubble.remove();\r\n } */\r\n this.bubbles = {};\r\n this.dateMessages = {};\r\n this.bubbleGroups.cleanup();\r\n this.unreaded = [];\r\n this.unreadOut = [];\r\n this.needUpdate.length = 0;\r\n this.lazyLoadQueue.clear();\r\n // clear input \r\n this.chatInputC.messageInput.innerHTML = '';\r\n this.chatInputC.replyElements.cancelBtn.click();\r\n // clear messages\r\n this.chatInner.innerHTML = '';\r\n lottieLoader_1.default.checkAnimations(false, 'chat', true);\r\n this.getHistoryTopPromise = this.getHistoryBottomPromise = undefined;\r\n //this.scrollable.setVirtualContainer(this.chatInner);\r\n this.scrollable.setVirtualContainer(null);\r\n this.datesIntersectionObserver.disconnect();\r\n this.lastDateMessageDiv = null;\r\n ////console.timeEnd('appImManager cleanup');\r\n }\r\n setPeer(peerID, lastMsgID = 0, forwarding = false, fromClick = false) {\r\n //console.time('appImManager setPeer');\r\n //console.time('appImManager setPeer pre promise');\r\n ////console.time('appImManager: pre render start');\r\n if (peerID == 0) {\r\n appSidebarRight_1.default.toggleSidebar(false);\r\n this.topbar.style.display = this.chatInput.style.display = this.goDownBtn.style.display = 'none';\r\n this.cleanup();\r\n return false;\r\n }\r\n let samePeer = this.peerID == peerID;\r\n if (this.setPeerPromise && samePeer)\r\n return this.setPeerPromise;\r\n if (lastMsgID) {\r\n appMessagesManager_1.default.readHistory(peerID, lastMsgID); // lol\r\n }\r\n if (samePeer) {\r\n if (!testScroll && !lastMsgID) {\r\n return true;\r\n }\r\n if (this.bubbles[lastMsgID]) {\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n if (dialog && lastMsgID == dialog.top_message) {\r\n this.log('will scroll down', this.scroll.scrollTop, this.scroll.scrollHeight);\r\n this.scroll.scrollTop = this.scroll.scrollHeight;\r\n }\r\n else {\r\n //this.bubbles[lastMsgID].scrollIntoView();\r\n this.scrollable.scrollIntoView(this.bubbles[lastMsgID]);\r\n }\r\n return true;\r\n }\r\n }\r\n else {\r\n appSidebarRight_1.default.searchCloseBtn.click();\r\n }\r\n // clear \r\n this.cleanup();\r\n // set new\r\n this.peerID = utils_1.$rootScope.selectedPeerID = peerID;\r\n // no dialog\r\n /* if(!appMessagesManager.getDialogByPeerID(this.peerID).length) {\r\n this.log.error('No dialog by peerID:', this.peerID);\r\n return Promise.reject();\r\n } */\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0] || null;\r\n //////this.log('setPeer peerID:', this.peerID, dialog, lastMsgID);\r\n appProfileManager_1.default.putPhoto(this.avatarEl, this.peerID);\r\n appProfileManager_1.default.putPhoto(appSidebarRight_1.default.profileElements.avatar, this.peerID);\r\n this.firstTopMsgID = dialog ? dialog.top_message : 0;\r\n this.chatInner.style.visibility = 'hidden';\r\n this.chatInput.style.display = appPeersManager_1.default.isChannel(peerID) && !appPeersManager_1.default.isMegagroup(peerID) ? 'none' : '';\r\n this.topbar.style.display = '';\r\n if (appPeersManager_1.default.isAnyGroup(peerID))\r\n this.chatInner.classList.add('is-chat');\r\n else\r\n this.chatInner.classList.remove('is-chat');\r\n window.requestAnimationFrame(() => {\r\n //this.chatInner.style.visibility = 'hidden';\r\n let title = '';\r\n if (this.peerID == this.myID)\r\n title = 'Saved Messages';\r\n else\r\n title = appPeersManager_1.default.getPeerTitle(this.peerID);\r\n //this.titleEl.innerHTML = appSidebarRight.profileElements.name.innerHTML = dom.titleSpan.innerHTML;\r\n this.titleEl.innerHTML = appSidebarRight_1.default.profileElements.name.innerHTML = title;\r\n this.pinnedMessageContainer.style.display = 'none';\r\n this.goDownBtn.style.display = '';\r\n //this.topbar.style.display = this.goDownBtn.style.display = '';\r\n //this.chatInput.style.display = appPeersManager.isChannel(peerID) && !appPeersManager.isMegagroup(peerID) ? 'none' : '';\r\n //appSidebarRight.toggleSidebar(true);\r\n //if(appPeersManager.isAnyGroup(peerID)) this.chatInner.classList.add('is-chat');\r\n //else this.chatInner.classList.remove('is-chat');\r\n if (!fromClick) {\r\n if (!samePeer && appDialogsManager_1.default.lastActiveListElement) {\r\n appDialogsManager_1.default.lastActiveListElement.classList.remove('active');\r\n }\r\n let dom = appDialogsManager_1.default.getDialogDom(this.peerID);\r\n if (dom) {\r\n appDialogsManager_1.default.lastActiveListElement = dom.listEl;\r\n dom.listEl.classList.add('active');\r\n }\r\n }\r\n this.setPeerStatus(true);\r\n });\r\n // add last message, bc in getHistory will load < max_id\r\n let additionMsgID = 0;\r\n if (lastMsgID && !forwarding)\r\n additionMsgID = lastMsgID;\r\n else if (dialog && dialog.top_message)\r\n additionMsgID = dialog.top_message;\r\n /* this.setPeerPromise = null;\r\n this.preloader.detach();\r\n return true; */\r\n //////appSidebarRight.toggleSidebar(true);\r\n //console.timeEnd('appImManager setPeer pre promise');\r\n this.preloader.attach(this.bubblesContainer);\r\n return this.setPeerPromise = Promise.all([\r\n this.getHistory(forwarding ? lastMsgID + 1 : lastMsgID, true, false, additionMsgID).then(() => {\r\n ////this.log('setPeer removing preloader');\r\n if (lastMsgID) {\r\n if (!dialog || lastMsgID != dialog.top_message) {\r\n let bubble = this.bubbles[lastMsgID];\r\n if (bubble)\r\n this.bubbles[lastMsgID].scrollIntoView();\r\n else\r\n this.log.warn('no bubble by lastMsgID:', lastMsgID);\r\n }\r\n else {\r\n this.log('will scroll down 2');\r\n this.scroll.scrollTop = this.scroll.scrollHeight;\r\n }\r\n }\r\n /* this.onScroll();\r\n this.scrollable.onScroll();*/\r\n this.preloader.detach();\r\n this.chatInner.style.visibility = '';\r\n //console.timeEnd('appImManager setPeer');\r\n //setTimeout(() => {\r\n //appSidebarRight.fillProfileElements();\r\n //appSidebarRight.loadSidebarMedia(true);\r\n //}, 500);\r\n return true;\r\n }) /* .catch(err => {\r\n this.log.error(err);\r\n }) */,\r\n appSidebarRight_1.default.fillProfileElements() /* ,\r\n appSidebarRight.loadSidebarMedia(true) */\r\n ]).catch(err => {\r\n this.log.error('setPeer promises error:', err);\r\n this.preloader.detach();\r\n return false;\r\n }).then(res => {\r\n if (this.peerID == peerID) {\r\n this.setPeerPromise = null;\r\n }\r\n return !!res;\r\n });\r\n }\r\n setTyping(action) {\r\n if (!this.peerID)\r\n return Promise.resolve(false);\r\n if (typeof (action) == 'string') {\r\n action = { _: action };\r\n }\r\n let input = appPeersManager_1.default.getInputPeerByID(this.peerID);\r\n return mtprotoworker_1.default.invokeApi('messages.setTyping', {\r\n peer: input,\r\n action: action\r\n });\r\n }\r\n updateUnreadByDialog(dialog) {\r\n let maxID = this.peerID == this.myID ? dialog.read_inbox_max_id : dialog.read_outbox_max_id;\r\n ///////this.log('updateUnreadByDialog', maxID, dialog, this.unreadOut);\r\n this.unreadOut.forEachReverse((msgID, idx) => {\r\n if (msgID > 0 && msgID <= maxID) {\r\n let bubble = this.bubbles[msgID];\r\n bubble.classList.remove('is-sent');\r\n bubble.classList.add('is-read');\r\n this.unreadOut.splice(idx, 1);\r\n }\r\n });\r\n }\r\n deleteMessagesByIDs(msgIDs) {\r\n msgIDs.forEach(id => {\r\n if (this.firstTopMsgID == id) {\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\r\n if (dialog) {\r\n ///////this.log('setting firstTopMsgID after delete:', id, dialog.top_message, dialog);\r\n this.firstTopMsgID = dialog.top_message;\r\n }\r\n }\r\n if (!(id in this.bubbles))\r\n return;\r\n let bubble = this.bubbles[id];\r\n delete this.bubbles[id];\r\n this.scrollable.removeElement(bubble);\r\n //bubble.remove();\r\n });\r\n lottieLoader_1.default.checkAnimations();\r\n }\r\n renderNewMessagesByIDs(msgIDs) {\r\n if (!this.bubbles[this.firstTopMsgID] && Object.keys(this.bubbles).length) { // seems search active\r\n //////this.log('seems search is active, skipping render:', msgIDs);\r\n return;\r\n }\r\n let scrolledDown = this.scrolledDown;\r\n msgIDs.forEach((msgID) => {\r\n let message = appMessagesManager_1.default.getMessage(msgID);\r\n /////////this.log('got new message to append:', message);\r\n //this.unreaded.push(msgID);\r\n this.renderMessage(message);\r\n });\r\n if (scrolledDown)\r\n this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n }\r\n getDateContainerByMessage(message, reverse) {\r\n let date = new Date(message.date * 1000);\r\n let justDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n let dateTimestamp = justDate.getTime();\r\n if (!(dateTimestamp in this.dateMessages)) {\r\n let str = '';\r\n let today = new Date();\r\n today.setHours(0);\r\n today.setMinutes(0);\r\n today.setSeconds(0);\r\n if (today < date) {\r\n str = 'Today';\r\n }\r\n else {\r\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\r\n str = justDate.getFullYear() == new Date().getFullYear() ?\r\n months[justDate.getMonth()] + ' ' + justDate.getDate() :\r\n justDate.toISOString().split('T')[0].split('-').reverse().join('.');\r\n }\r\n let div = document.createElement('div');\r\n div.className = 'bubble service is-date';\r\n div.innerHTML = `
${str}
`;\r\n ////////this.log('need to render date message', dateTimestamp, str);\r\n let container = document.createElement('div');\r\n container.className = 'bubbles-date-group';\r\n this.dateMessages[dateTimestamp] = {\r\n div,\r\n container,\r\n firstTimestamp: date.getTime()\r\n };\r\n container.append(div);\r\n if (reverse) {\r\n let scrollTopPrevious = this.scrollable.scrollTop;\r\n this.scrollable.prepend(container);\r\n if (!scrollTopPrevious) {\r\n this.scrollable.scrollTop += container.scrollHeight;\r\n }\r\n }\r\n else {\r\n this.scrollable.append(container);\r\n }\r\n this.datesIntersectionObserver.observe(container);\r\n }\r\n return this.dateMessages[dateTimestamp];\r\n }\r\n // reverse means top\r\n renderMessage(message, reverse = false, multipleRender = false, bubble = null, updatePosition = true) {\r\n this.log('message to render:', message);\r\n if (message.deleted)\r\n return;\r\n let peerID = this.peerID;\r\n let our = message.fromID == this.myID;\r\n let messageDiv = document.createElement('div');\r\n messageDiv.classList.add('message');\r\n //messageDiv.innerText = message.message;\r\n let bubbleContainer;\r\n // bubble\r\n if (!bubble) {\r\n bubbleContainer = document.createElement('div');\r\n bubbleContainer.classList.add('bubble__container');\r\n bubble = document.createElement('div');\r\n bubble.classList.add('bubble');\r\n bubble.appendChild(bubbleContainer);\r\n this.bubbles[+message.mid] = bubble;\r\n }\r\n else {\r\n bubble.className = 'bubble';\r\n bubbleContainer = bubble.firstElementChild;\r\n bubbleContainer.innerHTML = '';\r\n //bubble.innerHTML = '';\r\n }\r\n bubble.dataset.mid = message.mid;\r\n if (message._ == 'messageService') {\r\n bubble.className = 'bubble service';\r\n let action = message.action;\r\n let title = appPeersManager_1.default.getPeerTitle(message.fromID);\r\n let name = document.createElement('div');\r\n name.classList.add('name');\r\n name.dataset.peerID = message.fromID;\r\n name.innerHTML = title;\r\n let _ = action._;\r\n if (_ == \"messageActionPhoneCall\") {\r\n _ += '.' + action.type;\r\n }\r\n // @ts-ignore\r\n let str = (name.innerText ? name.outerHTML + ' ' : '') + utils_1.langPack[_];\r\n bubbleContainer.innerHTML = `
${str}
`;\r\n /* if(!updatePosition) {\r\n if(!multipleRender) {\r\n this.scrollPosition.restore(); // лагает из-за этого\r\n }\r\n } else if(reverse) {\r\n this.scrollable.prepend(bubble);\r\n } else {\r\n this.scrollable.append(bubble);\r\n } */\r\n let dateContainer = this.getDateContainerByMessage(message, reverse);\r\n if (!updatePosition) {\r\n }\r\n else if (reverse) {\r\n dateContainer.container.insertBefore(bubble, dateContainer.div.nextSibling);\r\n }\r\n else {\r\n dateContainer.container.append(bubble);\r\n }\r\n return bubble;\r\n }\r\n // time section\r\n let date = new Date(message.date * 1000);\r\n let time = ('0' + date.getHours()).slice(-2) + ':' + ('0' + date.getMinutes()).slice(-2);\r\n if (message.views) {\r\n bubble.classList.add('channel-post');\r\n time = utils_1.formatNumber(message.views, 1) + ' ' + time;\r\n }\r\n if (message.edit_date) {\r\n bubble.classList.add('is-edited');\r\n time = 'edited ' + time;\r\n }\r\n let timeSpan = document.createElement('span');\r\n timeSpan.classList.add('time');\r\n let timeInner = document.createElement('div');\r\n timeInner.classList.add('inner', 'tgico');\r\n timeInner.innerHTML = time;\r\n let richText = richtextprocessor_1.RichTextProcessor.wrapRichText(message.message, {\r\n entities: message.totalEntities\r\n });\r\n if (message.totalEntities) {\r\n let emojiEntities = message.totalEntities.filter((e) => e._ == 'messageEntityEmoji');\r\n let strLength = message.message.length;\r\n let emojiStrLength = emojiEntities.reduce((acc, curr) => acc + curr.length, 0);\r\n if (emojiStrLength == strLength && emojiEntities.length <= 3) {\r\n let attachmentDiv = document.createElement('div');\r\n attachmentDiv.classList.add('attachment');\r\n attachmentDiv.innerHTML = richText;\r\n bubble.classList.add('is-message-empty', 'emoji-' + emojiEntities.length + 'x', 'emoji-big');\r\n bubbleContainer.append(attachmentDiv);\r\n }\r\n else {\r\n messageDiv.innerHTML = richText;\r\n }\r\n /* if(strLength == emojiStrLength) {\r\n messageDiv.classList.add('emoji-only');\r\n messageDiv.classList.add('message-empty');\r\n } */\r\n }\r\n else {\r\n messageDiv.innerHTML = richText;\r\n }\r\n timeSpan.appendChild(timeInner);\r\n messageDiv.append(timeSpan);\r\n bubbleContainer.prepend(messageDiv);\r\n //bubble.prepend(timeSpan, messageDiv); // that's bad\r\n if (our) {\r\n if (message.pFlags.unread || message.mid < 0)\r\n this.unreadOut.push(message.mid); // message.mid < 0 added 11.02.2020\r\n let status = '';\r\n if (message.mid < 0)\r\n status = 'is-sending';\r\n else\r\n status = message.pFlags.unread ? 'is-sent' : 'is-read';\r\n bubble.classList.add(status);\r\n }\r\n else {\r\n //this.log('not our message', message, message.pFlags.unread);\r\n if (message.pFlags.unread) {\r\n this.unreaded.push(message.mid);\r\n }\r\n }\r\n // media\r\n if (message.media) {\r\n let attachmentDiv = document.createElement('div');\r\n attachmentDiv.classList.add('attachment');\r\n if (!message.message) {\r\n bubble.classList.add('is-message-empty');\r\n }\r\n let processingWebPage = false;\r\n switch (message.media._) {\r\n case 'messageMediaPending': {\r\n let pending = message.media;\r\n let preloader = pending.preloader;\r\n switch (pending.type) {\r\n case 'photo': {\r\n if (pending.size < 5e6) {\r\n this.log('will wrap pending photo:', pending, message, appPhotosManager_1.default.getPhoto(message.id));\r\n wrappers_1.wrapPhoto(message.id, message, attachmentDiv, undefined, undefined, true, true, this.lazyLoadQueue, null);\r\n preloader.attach(attachmentDiv, false);\r\n bubble.classList.add('hide-name', 'photo');\r\n break;\r\n }\r\n }\r\n case 'audio':\r\n case 'document': {\r\n let docDiv = wrappers_1.wrapDocument(pending, false, true);\r\n let icoDiv = docDiv.querySelector('.document-ico');\r\n preloader.attach(icoDiv, false);\r\n bubble.classList.remove('is-message-empty');\r\n messageDiv.append(docDiv);\r\n processingWebPage = true;\r\n break;\r\n }\r\n }\r\n break;\r\n }\r\n case 'messageMediaPhoto': {\r\n let photo = message.media.photo;\r\n ////////this.log('messageMediaPhoto', photo);\r\n bubble.classList.add('hide-name', 'photo');\r\n wrappers_1.wrapPhoto(photo.id, message, attachmentDiv, undefined, undefined, true, our, this.lazyLoadQueue, () => {\r\n return this.peerID == peerID;\r\n });\r\n break;\r\n }\r\n case 'messageMediaWebPage': {\r\n processingWebPage = true;\r\n let webpage = message.media.webpage;\r\n ////////this.log('messageMediaWebPage', webpage);\r\n if (webpage._ == 'webPageEmpty') {\r\n break;\r\n }\r\n bubble.classList.add('webpage');\r\n let box = document.createElement('div');\r\n box.classList.add('box', 'web');\r\n let quote = document.createElement('div');\r\n quote.classList.add('quote');\r\n let nameEl = document.createElement('a');\r\n nameEl.classList.add('name');\r\n let titleDiv = document.createElement('div');\r\n titleDiv.classList.add('title');\r\n let textDiv = document.createElement('div');\r\n textDiv.classList.add('text');\r\n let preview = null;\r\n if (webpage.photo || webpage.document) {\r\n preview = document.createElement('div');\r\n preview.classList.add('preview');\r\n }\r\n let doc = null;\r\n if (webpage.document) {\r\n doc = webpage.document;\r\n if (doc.type == 'gif' || doc.type == 'video') {\r\n //if(doc.size <= 20e6) {\r\n bubble.classList.add('video');\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: preview,\r\n message,\r\n justLoader: true,\r\n preloader: null,\r\n round: false,\r\n boxWidth: 380,\r\n boxHeight: 300,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: () => {\r\n return this.peerID == peerID;\r\n }\r\n });\r\n //}\r\n }\r\n else {\r\n doc = null;\r\n }\r\n }\r\n if (webpage.photo && !doc) {\r\n bubble.classList.add('photo');\r\n wrappers_1.wrapPhoto(webpage.photo.id, message, preview, 380, 300, false, null, this.lazyLoadQueue, () => {\r\n return this.peerID == peerID;\r\n });\r\n }\r\n if (preview) {\r\n quote.append(preview);\r\n }\r\n nameEl.setAttribute('target', '_blank');\r\n nameEl.href = webpage.url || '#';\r\n nameEl.innerHTML = webpage.site_name ? richtextprocessor_1.RichTextProcessor.wrapEmojiText(webpage.site_name) : '';\r\n if (webpage.description) {\r\n textDiv.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.description);\r\n }\r\n if (webpage.title) {\r\n titleDiv.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.title);\r\n }\r\n quote.append(nameEl, titleDiv, textDiv);\r\n box.append(quote);\r\n //bubble.prepend(box);\r\n bubbleContainer.prepend(timeSpan, box);\r\n //this.log('night running', bubble.scrollHeight);\r\n break;\r\n }\r\n case 'messageMediaDocument': {\r\n let doc = message.media.document;\r\n this.log('messageMediaDocument', doc, bubble);\r\n if (doc.sticker /* && doc.size <= 1e6 */) {\r\n bubble.classList.add('sticker');\r\n if (doc.animated) {\r\n bubble.classList.add('sticker-animated');\r\n }\r\n appPhotosManager_1.default.setAttachmentSize(doc, attachmentDiv, undefined, undefined, true);\r\n //let preloader = new ProgressivePreloader(attachmentDiv, false);\r\n bubbleContainer.style.height = attachmentDiv.style.height;\r\n bubbleContainer.style.width = attachmentDiv.style.width;\r\n //appPhotosManager.setAttachmentSize(doc, bubble);\r\n wrappers_1.wrapSticker(doc, attachmentDiv, () => {\r\n if (this.peerID != peerID) {\r\n this.log.warn('peer changed, canceling sticker attach');\r\n return false;\r\n }\r\n return true;\r\n }, this.lazyLoadQueue, 'chat', false, !!message.pending || !multipleRender);\r\n break;\r\n }\r\n else if ((doc.type == 'video' || doc.type == 'gif' || doc.type == 'round') && doc.size <= 20e6) {\r\n this.log('never get free 2', doc);\r\n if (doc.type == 'round') {\r\n bubble.classList.add('round');\r\n }\r\n bubble.classList.add('hide-name', 'video');\r\n //wrapVideo.call(this, doc, attachmentDiv, message, true, null, false, doc.type == 'round', 380, 380, doc.type != 'round', our);\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n justLoader: true,\r\n preloader: null,\r\n round: doc.type == 'round',\r\n boxWidth: 380,\r\n boxHeight: 380,\r\n withTail: doc.type != 'round',\r\n isOut: our,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: () => {\r\n return this.peerID == peerID;\r\n }\r\n });\r\n break;\r\n }\r\n else if (doc.mime_type == 'audio/ogg') {\r\n let docDiv = wrappers_1.wrapDocument(doc);\r\n bubble.classList.remove('is-message-empty');\r\n bubble.classList.add('bubble-audio');\r\n messageDiv.append(docDiv);\r\n processingWebPage = true;\r\n break;\r\n }\r\n else {\r\n let docDiv = wrappers_1.wrapDocument(doc);\r\n bubble.classList.remove('is-message-empty');\r\n messageDiv.append(docDiv);\r\n processingWebPage = true;\r\n break;\r\n }\r\n }\r\n default:\r\n bubble.classList.remove('is-message-empty');\r\n messageDiv.innerHTML = 'unrecognized media type: ' + message.media._;\r\n messageDiv.append(timeSpan);\r\n this.log.warn('unrecognized media type:', message.media._, message);\r\n break;\r\n }\r\n if (!processingWebPage) {\r\n bubbleContainer.append(attachmentDiv);\r\n }\r\n }\r\n if ((this.peerID < 0 && !our) || message.fwd_from || message.reply_to_mid) { // chat\r\n let title = appPeersManager_1.default.getPeerTitle(message.fwdFromID || message.fromID);\r\n let isHidden = message.fwd_from && !message.fwd_from.from_id && !message.fwd_from.channel_id;\r\n if (isHidden) {\r\n ///////this.log('message to render hidden', message);\r\n title = message.fwd_from.from_name;\r\n bubble.classList.add('hidden-profile');\r\n }\r\n //this.log(title);\r\n if (message.fwdFromID || message.fwd_from) {\r\n bubble.classList.add('forwarded');\r\n if (message.savedFrom) {\r\n let fwd = document.createElement('div');\r\n fwd.classList.add('forward' /* , 'tgico-forward' */);\r\n fwd.innerHTML = `\r\n `;\r\n bubbleContainer.append(fwd);\r\n bubble.dataset.savedFrom = message.savedFrom;\r\n }\r\n if (!bubble.classList.contains('sticker')) {\r\n let nameDiv = document.createElement('div');\r\n nameDiv.classList.add('name');\r\n nameDiv.innerHTML = 'Forwarded from ' + title;\r\n nameDiv.dataset.peerID = message.fwdFromID;\r\n //nameDiv.style.color = appPeersManager.getPeerColorByID(message.fromID, false);\r\n bubbleContainer.append(nameDiv);\r\n }\r\n }\r\n else {\r\n if (message.reply_to_mid) {\r\n let originalMessage = appMessagesManager_1.default.getMessage(message.reply_to_mid);\r\n let originalPeerTitle = appPeersManager_1.default.getPeerTitle(originalMessage.fromID, true) || '';\r\n /////////this.log('message to render reply', originalMessage, originalPeerTitle, bubble, message);\r\n // need to download separately\r\n if (originalMessage._ == 'messageEmpty') {\r\n //////////this.log('message to render reply empty, need download', message, message.reply_to_mid);\r\n appMessagesManager_1.default.wrapSingleMessage(message.reply_to_mid);\r\n this.needUpdate.push({ replyMid: message.reply_to_mid, mid: message.mid });\r\n originalPeerTitle = 'Loading...';\r\n }\r\n if (originalMessage.mid) {\r\n bubble.setAttribute('data-original-mid', originalMessage.mid);\r\n }\r\n else {\r\n bubble.setAttribute('data-original-mid', message.reply_to_mid);\r\n }\r\n bubbleContainer.append(wrappers_1.wrapReply(originalPeerTitle, originalMessage.message || '', originalMessage.media));\r\n bubble.classList.add('is-reply');\r\n }\r\n if (!bubble.classList.contains('sticker') && (peerID < 0 && peerID != message.fromID)) {\r\n let nameDiv = document.createElement('div');\r\n nameDiv.classList.add('name');\r\n nameDiv.innerHTML = title;\r\n nameDiv.style.color = appPeersManager_1.default.getPeerColorByID(message.fromID, false);\r\n nameDiv.dataset.peerID = message.fromID;\r\n bubbleContainer.append(nameDiv);\r\n }\r\n else /* if(!message.reply_to_mid) */ {\r\n bubble.classList.add('hide-name');\r\n }\r\n }\r\n if (!our && this.peerID < 0 && (!appPeersManager_1.default.isChannel(this.peerID) || appPeersManager_1.default.isMegagroup(this.peerID))) {\r\n let avatarDiv = document.createElement('div');\r\n avatarDiv.classList.add('user-avatar');\r\n /////////this.log('exec loadDialogPhoto', message);\r\n if (message.fromID) { // if no - user hidden\r\n appProfileManager_1.default.putPhoto(avatarDiv, message.fromID);\r\n }\r\n else if (!title && message.fwd_from && message.fwd_from.from_name) {\r\n title = message.fwd_from.from_name;\r\n appProfileManager_1.default.putPhoto(avatarDiv, 0, false, title);\r\n }\r\n avatarDiv.dataset.peerID = message.fromID;\r\n bubbleContainer.append(avatarDiv);\r\n }\r\n }\r\n else {\r\n bubble.classList.add('hide-name');\r\n }\r\n bubble.classList.add(our ? 'is-out' : 'is-in');\r\n if (updatePosition) {\r\n this.bubbleGroups.addBubble(bubble, message, reverse);\r\n //window.requestAnimationFrame(() => {\r\n /* if(reverse) {\r\n this.scrollable.prependByBatch(bubble);\r\n } else {\r\n this.scrollable.appendByBatch(bubble);\r\n } */\r\n // раскомментировать ////// если рендер должен быть в другой функции (если хочешь сделать через requestAnimationFrame)\r\n //////if(!multipleRender) {\r\n /* if(reverse) {\r\n this.scrollable.prepend(bubble);\r\n } else {\r\n this.scrollable.append(bubble);\r\n } */\r\n //////}\r\n //});\r\n let dateMessage = this.getDateContainerByMessage(message, reverse);\r\n if (reverse) {\r\n dateMessage.container.insertBefore(bubble, dateMessage.div.nextSibling);\r\n }\r\n else {\r\n dateMessage.container.append(bubble);\r\n }\r\n }\r\n else {\r\n this.bubbleGroups.updateGroupByMessageID(message.mid);\r\n }\r\n /* if(bubble.classList.contains('webpage')) {\r\n this.log('night running', bubble, bubble.scrollHeight);\r\n } */\r\n return bubble;\r\n }\r\n performHistoryResult(history, reverse, isBackLimit, additionMsgID, resetPromises = false) {\r\n // commented bot getProfile in getHistory!\r\n if (!history /* .filter((id: number) => id > 0) */.length) {\r\n if (!isBackLimit) {\r\n this.scrolledAll = true;\r\n }\r\n else {\r\n this.scrolledAllDown = true;\r\n }\r\n }\r\n //history = history.slice(); // need\r\n if (additionMsgID) {\r\n history.unshift(additionMsgID);\r\n }\r\n //let method = reverse ? result.history.forEach : result.history.forEachReverse;\r\n let method = reverse ? Array.prototype.forEach : Array.prototype.forEachReverse;\r\n method = method.bind(history);\r\n //console.time('appImManager render history');\r\n this.log('getHistory method', method);\r\n let firstLoad = !!this.setPeerPromise && false;\r\n let peerID = this.peerID;\r\n return new Promise((resolve, reject) => {\r\n let resolved = false;\r\n /* let bubbles: HTMLDivElement[] = [];\r\n method((msgID) => {\r\n let message = appMessagesManager.getMessage(msgID);\r\n let bubble = this.renderMessage(message, reverse, true);\r\n bubbles.push(bubble);\r\n }); */\r\n let leftHeightToScroll = this.scrollable.innerHeight;\r\n //console.timeEnd('appImManager: pre render start');\r\n //this.log('start performHistoryResult, scrollTop:', this.scrollable.scrollTop, this.scrollable.scrollHeight, this.scrollable.innerHeight);\r\n let renderedFirstScreen = false;\r\n let r = () => {\r\n //let bubble = bubbles.shift();\r\n //if(!bubble && !resolved) return resolve();\r\n //if(!history.length) return resolve(true);\r\n /* let msgID = result.history.shift();\r\n if(!msgID && !resolved) return resolve();\r\n let message = appMessagesManager.getMessage(msgID); */\r\n if (this.peerID != peerID) {\r\n return reject('peer changed');\r\n }\r\n //let startTime = Date.now();\r\n //let elapsedTime = 0;\r\n //do {\r\n let msgID = history.shift();\r\n if (!msgID) {\r\n if (resetPromises) {\r\n (reverse ? this.getHistoryTopPromise = undefined : this.getHistoryBottomPromise = undefined);\r\n }\r\n this.scrollable.unlock('both');\r\n if (!resolved) {\r\n resolve(true);\r\n }\r\n return;\r\n }\r\n let message = appMessagesManager_1.default.getMessage(msgID);\r\n let bubble = this.renderMessage(message, reverse, true);\r\n if (bubble) {\r\n if (reverse) {\r\n ////////this.scrollable.prepend(bubble);\r\n //this.log('performHistoryResult scrollTop', this.scrollable.scrollTop, bubble.scrollHeight);\r\n /* if(innerHeight >= 0) {\r\n let height = bubble.scrollHeight;\r\n innerHeight -= height;\r\n this.scrollable.scrollTop += height;\r\n } */\r\n if (!renderedFirstScreen) {\r\n if (!this.scrollable.scrollTop) {\r\n let height = bubble.scrollHeight;\r\n //let height = Math.ceil(bubble.getBoundingClientRect().height);\r\n this.scrollable.scrollTop += height;\r\n //innerHeight -= height;\r\n }\r\n /* if(leftHeightToScroll >= 0) {\r\n let height = bubble.scrollHeight;\r\n leftHeightToScroll -= height;\r\n this.scrollable.scrollTop += height;\r\n } */ else {\r\n renderedFirstScreen = true;\r\n resolve();\r\n resolved = true;\r\n }\r\n }\r\n }\r\n else {\r\n ////////this.scrollable.append(bubble);\r\n }\r\n }\r\n //} while(cached && !this.scrollable.scrollTop);\r\n //} while((elapsedTime = Date.now() - startTime) < 3);\r\n /* let bubble = this.renderMessage(message, reverse, true);\r\n if(!bubble) return r();\r\n \r\n if(reverse) {\r\n this.scrollable.prepend(bubble);\r\n \r\n if(!this.scrollable.scrollTop) {\r\n let height = bubble.scrollHeight;\r\n this.scrollable.scrollTop += height;\r\n //innerHeight -= height;\r\n } else if(!resolved) {\r\n resolve();\r\n resolved = true;\r\n }\r\n } else {\r\n this.scrollable.append(bubble);\r\n } */\r\n firstLoad ? window.requestAnimationFrame(r) : r();\r\n };\r\n firstLoad ? window.requestAnimationFrame(r) : r();\r\n //r();\r\n /* method((msgID) => {\r\n let message = appMessagesManager.getMessage(msgID);\r\n \r\n window.requestAnimationFrame(() => {\r\n this.renderMessage(message, reverse, true);\r\n });\r\n }); */\r\n }) /* .then(() => {\r\n if(!isBackLimit) {\r\n this.scrollPosition.restore(() => {\r\n this.scrollable.unlock('both');\r\n });\r\n } else {\r\n this.scrollable.unlock('both');\r\n }\r\n \r\n //console.timeEnd('appImManager render history');\r\n \r\n return true;\r\n }) */;\r\n }\r\n // reverse means scroll up\r\n getHistory(maxID = 0, reverse = false, isBackLimit = false, additionMsgID = 0) {\r\n let peerID = this.peerID;\r\n //console.time('appImManager call getHistory');\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n if (!maxID && dialog && dialog.top_message) {\r\n maxID = dialog.top_message /* + 1 */;\r\n }\r\n let loadCount = Object.keys(this.bubbles).length > 0 ? 20 : this.scrollable.innerHeight / 38 /* * 1.25 */ | 0;\r\n /* if(testScroll) {\r\n loadCount = 5;\r\n if(Object.keys(this.bubbles).length > 0)\r\n return Promise.resolve(true);\r\n } */\r\n ////console.time('render history total');\r\n let backLimit = 0;\r\n if (isBackLimit) {\r\n backLimit = loadCount;\r\n loadCount = 0;\r\n maxID += 1;\r\n }\r\n let result = appMessagesManager_1.default.getHistory(this.peerID, maxID, loadCount, backLimit);\r\n /* if(!(result instanceof Promise)) {\r\n let _result = result;\r\n $rootScope.$broadcast('history_request'); // for ripple\r\n result = new Promise((resolve, reject) => setTimeout(() => resolve(_result), 150));\r\n } */\r\n if (result instanceof Promise) {\r\n let promise = result.then((result) => {\r\n this.log('getHistory result by maxID:', maxID, reverse, isBackLimit, result);\r\n //console.timeEnd('appImManager call getHistory');\r\n if (this.peerID != peerID) {\r\n this.log.warn('peer changed');\r\n ////console.timeEnd('render history total');\r\n return Promise.reject();\r\n }\r\n ////console.timeEnd('render history total');\r\n return this.performHistoryResult(result.history || [], reverse, isBackLimit, additionMsgID, true);\r\n }, (err) => {\r\n this.log.error('getHistory error:', err);\r\n (reverse ? this.getHistoryTopPromise = undefined : this.getHistoryBottomPromise = undefined);\r\n this.scrollable.unlock('both');\r\n return false;\r\n });\r\n return (reverse ? this.getHistoryTopPromise = promise : this.getHistoryBottomPromise = promise);\r\n }\r\n else {\r\n let promise = this.performHistoryResult(result.history || [], reverse, isBackLimit, additionMsgID, true);\r\n //return (reverse ? this.getHistoryTopPromise = promise : this.getHistoryBottomPromise = promise);\r\n return promise;\r\n //return this.performHistoryResult(result.history || [], reverse, isBackLimit, additionMsgID, true);\r\n }\r\n }\r\n setMutedState(muted = false) {\r\n appSidebarRight_1.default.profileElements.notificationsCheckbox.checked = !muted;\r\n appSidebarRight_1.default.profileElements.notificationsStatus.innerText = muted ? 'Disabled' : 'Enabled';\r\n let peerID = this.peerID;\r\n this.muted = muted;\r\n if (peerID < 0) { // not human\r\n let isChannel = appPeersManager_1.default.isChannel(peerID) && !appPeersManager_1.default.isMegagroup(peerID);\r\n if (isChannel) {\r\n this.btnMute.classList.remove('tgico-mute', 'tgico-unmute');\r\n this.btnMute.classList.add(muted ? 'tgico-unmute' : 'tgico-mute');\r\n this.btnMute.style.display = '';\r\n }\r\n else {\r\n this.btnMute.style.display = 'none';\r\n }\r\n }\r\n else {\r\n this.btnMute.style.display = 'none';\r\n }\r\n this.btnMenuMute.classList.remove('tgico-mute', 'tgico-unmute');\r\n this.btnMenuMute.classList.add(muted ? 'tgico-unmute' : 'tgico-mute');\r\n let rp = this.btnMenuMute.firstElementChild;\r\n this.btnMenuMute.innerText = muted ? 'Unmute' : 'Mute';\r\n this.btnMenuMute.appendChild(rp);\r\n }\r\n mutePeer() {\r\n let inputPeer = appPeersManager_1.default.getInputPeerByID(this.peerID);\r\n let inputNotifyPeer = {\r\n _: 'inputNotifyPeer',\r\n peer: inputPeer\r\n };\r\n let settings = {\r\n _: 'inputPeerNotifySettings',\r\n flags: 0,\r\n mute_until: 0\r\n };\r\n if (!this.muted) {\r\n settings.flags |= 1 << 2;\r\n settings.mute_until = 2147483646;\r\n }\r\n else {\r\n settings.flags |= 2;\r\n }\r\n mtprotoworker_1.default.invokeApi('account.updateNotifySettings', {\r\n peer: inputNotifyPeer,\r\n settings: settings\r\n }).then(res => {\r\n this.handleUpdate({ _: 'updateNotifySettings', peer: inputNotifyPeer, notify_settings: settings });\r\n });\r\n /* return apiManager.invokeApi('account.getNotifySettings', {\r\n peer: inputNotifyPeer\r\n }).then((settings: any) => {\r\n settings.flags |= 2 << 1;\r\n settings.mute_until = 2000000000; // 2147483646\r\n \r\n return apiManager.invokeApi('account.updateNotifySettings', {\r\n peer: inputNotifyPeer,\r\n settings: Object.assign(settings, {\r\n _: 'inputPeerNotifySettings'\r\n })\r\n }).then(res => {\r\n this.log('mute result:', res);\r\n });\r\n }); */\r\n }\r\n handleUpdate(update) {\r\n switch (update._) {\r\n case 'updateUserTyping':\r\n case 'updateChatUserTyping':\r\n if (this.myID == update.user_id) {\r\n return;\r\n }\r\n var peerID = update._ == 'updateUserTyping' ? update.user_id : -update.chat_id;\r\n this.typingUsers[update.user_id] = peerID;\r\n if (!appUsersManager_1.default.hasUser(update.user_id)) {\r\n if (update.chat_id && appChatsManager_1.default.hasChat(update.chat_id) && !appChatsManager_1.default.isChannel(update.chat_id)) {\r\n appProfileManager_1.default.getChatFull(update.chat_id);\r\n }\r\n //return;\r\n }\r\n appUsersManager_1.default.forceUserOnline(update.user_id);\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n let currentPeer = this.peerID == peerID;\r\n if (this.typingTimeouts[peerID])\r\n clearTimeout(this.typingTimeouts[peerID]);\r\n else if (dialog) {\r\n appDialogsManager_1.default.setTyping(dialog, appUsersManager_1.default.getUser(update.user_id));\r\n if (currentPeer) { // user\r\n this.setPeerStatus();\r\n }\r\n }\r\n this.typingTimeouts[peerID] = setTimeout(() => {\r\n this.typingTimeouts[peerID] = 0;\r\n delete this.typingUsers[update.user_id];\r\n if (dialog) {\r\n appDialogsManager_1.default.unsetTyping(dialog);\r\n }\r\n // лень просчитывать случаи\r\n this.setPeerStatus();\r\n }, 6000);\r\n break;\r\n case 'updateNotifySettings': {\r\n let { peer, notify_settings } = update;\r\n // peer was NotifyPeer\r\n peer = peer.peer;\r\n let peerID = appPeersManager_1.default.getPeerID(peer);\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n if (dialog) {\r\n dialog.notify_settings = notify_settings;\r\n }\r\n if (peerID == this.peerID) {\r\n let muted = notify_settings.mute_until ? new Date(notify_settings.mute_until * 1000) > new Date() : false;\r\n this.setMutedState(muted);\r\n }\r\n /////this.log('updateNotifySettings', peerID, notify_settings);\r\n break;\r\n }\r\n case 'updateChatPinnedMessage':\r\n case 'updateUserPinnedMessage': {\r\n let { id } = update;\r\n /////this.log('updateUserPinnedMessage', update);\r\n this.pinnedMsgID = id;\r\n // hz nado li tut appMessagesIDsManager.getFullMessageID(update.max_id, channelID);\r\n let peerID = update.user_id || -update.chat_id || -update.channel_id;\r\n if (peerID == this.peerID) {\r\n appMessagesManager_1.default.wrapSingleMessage(id);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n}\r\nexports.AppImManager = AppImManager;\r\nconst appImManager = new AppImManager();\r\nexports.default = appImManager;\r\n" }, { "id": 13, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/config.js", - "name": "./src/lib/config.js", - "index": 20, - "index2": 18, - "size": 400030, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appChatsManager.ts", + "name": "./src/lib/appManagers/appChatsManager.ts", + "index": 44, + "index2": 37, + "size": 8589, "cacheable": true, "built": true, "optional": false, @@ -2810,33 +2684,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/storage.ts", - "issuerId": 6, - "issuerName": "./src/lib/storage.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 6, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/storage.ts", - "name": "./src/lib/storage.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 + } + }, + { + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 559, - "building": 559 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -2844,58 +2729,67 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", + "moduleId": 4, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", + "module": "./src/lib/appManagers/appUsersManager.ts", + "moduleName": "./src/lib/appManagers/appUsersManager.ts", "type": "cjs require", - "userRequest": "../config", - "loc": "28:28-48" + "userRequest": "./appChatsManager", + "loc": "8:42-70" }, { - "moduleId": 6, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/storage.ts", - "module": "./src/lib/storage.ts", - "moduleName": "./src/lib/storage.ts", + "moduleId": 5, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPeersManager.ts", + "module": "./src/lib/appManagers/appPeersManager.ts", + "moduleName": "./src/lib/appManagers/appPeersManager.ts", "type": "cjs require", - "userRequest": "./config", - "loc": "3:17-36" + "userRequest": "./appChatsManager", + "loc": "7:42-70" }, { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../config", - "loc": "13:28-48" + "userRequest": "./appChatsManager", + "loc": "21:42-70" }, { - "moduleId": 35, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/tl_utils.ts", - "module": "./src/lib/tl_utils.ts", - "moduleName": "./src/lib/tl_utils.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./config", - "loc": "18:28-47" + "userRequest": "./appChatsManager", + "loc": "17:42-70" }, { - "moduleId": 40, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "module": "./src/components/pageSignIn.ts", - "moduleName": "./src/components/pageSignIn.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "../lib/config", - "loc": "16:28-52" + "userRequest": "./appChatsManager", + "loc": "17:42-70" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 24, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", + "module": "./src/lib/appManagers/apiUpdatesManager.ts", + "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", + "type": "cjs require", + "userRequest": "./appChatsManager", + "loc": "12:42-70" + }, + { + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "../config", - "loc": "28:28-48" + "userRequest": "./appManagers/appChatsManager", + "loc": "8:42-82" } ], "usedExports": true, @@ -2903,16 +2797,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 2, - "source": "/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\n\r\nConfig = window.Config || {};\r\n\r\n/*\r\n\r\n IMPORTANT NOTICE\r\n ================\r\n\r\n Do not publish your Webogram fork with my app credentials (below), or your application may be blocked.\r\n You can get your own api_id, api_hash at https://my.telegram.org, see manual at https://core.telegram.org/api/obtaining_api_id.\r\n\r\n*/\r\n\r\nConfig.App = {\r\n id: 1025907,\r\n hash: '452b0359b988148995f22ff0f4229750',\r\n version: '0.3.0',\r\n domains: [],\r\n baseDcID: 2\r\n};\r\n\r\nConfig.Modes = {\r\n test: location.search.indexOf('test=1') > 0/* || true */,\r\n debug: location.search.indexOf('debug=1') > 0,\r\n http: location.search.indexOf('http=1') > 0,\r\n ssl: location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:' && location.search.indexOf('ssl=0') == -1,\r\n force_mobile: location.search.indexOf('mobile=1') > 0,\r\n force_desktop: location.search.indexOf('desktop=1') > 0,\r\n webcrypto: location.search.indexOf('webcrypto=0') == -1 && 1 == 2,\r\n packed: location.protocol == 'app:' || location.protocol == 'chrome-extension:',\r\n ios_standalone: window.navigator.standalone && navigator.userAgent.match(/iOS|iPhone|iPad/),\r\n chrome_packed: window.chrome && chrome.app && chrome.app.window && true || false,\r\n animations: true,\r\n memory_only: false,\r\n allow_tmpfs: location.search.indexOf('tmpfs=yeahImSureIknowWhatImDoing') > 0 || false,\r\n push_api: location.search.indexOf('push=1') == -1,\r\n multipleConnections: true\r\n};\r\n\r\nConfig.Mobile = false;\r\n\r\nConfig.Navigator = {\r\n nativeEmoji: /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform || ''),\r\n osX: (navigator.platform || '').toLowerCase().indexOf('mac') != -1 ||\r\n (navigator.userAgent || '').toLowerCase().indexOf('mac') != -1,\r\n msie: (navigator.userAgent || '').search(/MSIE | Trident\\/|Edge\\//) != -1,\r\n retina: window.devicePixelRatio > 1,\r\n ffos: navigator.userAgent.search(/mobi.+Gecko/i) != -1,\r\n ffos2p: navigator.userAgent.search(/mobi.+Gecko\\/[34567]/i) != -1,\r\n touch: screen.width <= 768 || ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch,\r\n mobile: screen.width && screen.width < 480 || navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i) != -1\r\n};\r\n\r\nConfig.ExtCredentials = {\r\n gmaps: {\r\n api_key: 'AIzaSyC72t5GDcP-dob20d-ARwSwOQ41-zgbArg'\r\n }\r\n};\r\n\r\n{\r\n /* let img_size = 32;\r\n let side = 52;\r\n let sheetUrl = `assets/img/sheet_apple_${img_size}_`; // #.png\r\n let multiplyX = 100 / 6;\r\n let sheetSizeX = 6 * (img_size + 2); // size of image in pixels\r\n let sheetSizeY = side * (img_size + 2); // size of image in pixels\r\n let sizeX = 100 * (sheetSizeX / img_size);\r\n let sizeY = 100 * (sheetSizeY / img_size);\r\n let splitted = true; */\r\n\r\n let img_size = 64;\r\n let side = 56;\r\n let sheetUrl = `assets/img/sheet_apple_${img_size}`; // #.png\r\n let multiplyX = 100 / side;\r\n let sheetSizeX = side * (img_size + 2); // size of image in pixels\r\n let sheetSizeY = side * (img_size + 2); // size of image in pixels\r\n let sizeX = 100 * (sheetSizeX / img_size);\r\n let sizeY = 100 * (sheetSizeY / img_size);\r\n let splitted = false;\r\n\r\n Config.Emoji = {\r\n img_size,\r\n sheetUrl,\r\n multiplyX,\r\n sheetSizeX,\r\n sheetSizeY,\r\n sizeX,\r\n sizeY,\r\n side,\r\n splitted,\r\n keyCategory: 'category',\r\n keyX: 'sheet_x',\r\n keyY: 'sheet_y',\r\n /* keyCategory: '2',\r\n keyX: '0', // 'sheet_x'\r\n keyY: '1', // 'sheet_y' */\r\n\r\n emoji: {\"#️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":0,\"sort_order\":132},\"*️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":1,\"sort_order\":133},\"0️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":2,\"sort_order\":134},\"1️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":3,\"sort_order\":135},\"2️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":4,\"sort_order\":136},\"3️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":5,\"sort_order\":137},\"4️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":6,\"sort_order\":138},\"5️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":7,\"sort_order\":139},\"6️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":8,\"sort_order\":140},\"7️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":9,\"sort_order\":141},\"8️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":10,\"sort_order\":142},\"9️⃣\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":11,\"sort_order\":143},\"©️\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":12,\"sort_order\":129},\"®️\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":13,\"sort_order\":130},\"🀄\":{\"category\":\"Activities\",\"sheet_x\":0,\"sheet_y\":14,\"sort_order\":73},\"🃏\":{\"category\":\"Activities\",\"sheet_x\":0,\"sheet_y\":15,\"sort_order\":72},\"🅰️\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":16,\"sort_order\":150},\"🅱️\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":17,\"sort_order\":152},\"🅾️\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":18,\"sort_order\":161},\"🅿️\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":19,\"sort_order\":163},\"🆎\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":20,\"sort_order\":151},\"🆑\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":21,\"sort_order\":153},\"🆒\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":22,\"sort_order\":154},\"🆓\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":23,\"sort_order\":155},\"🆔\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":24,\"sort_order\":157},\"🆕\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":25,\"sort_order\":159},\"🆖\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":26,\"sort_order\":160},\"🆗\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":27,\"sort_order\":162},\"🆘\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":28,\"sort_order\":164},\"🆙\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":29,\"sort_order\":165},\"🆚\":{\"category\":\"Symbols\",\"sheet_x\":0,\"sheet_y\":30,\"sort_order\":166},\"🇦🇨\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":31,\"sort_order\":8},\"🇦🇩\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":32,\"sort_order\":9},\"🇦🇪\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":33,\"sort_order\":10},\"🇦🇫\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":34,\"sort_order\":11},\"🇦🇬\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":35,\"sort_order\":12},\"🇦🇮\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":36,\"sort_order\":13},\"🇦🇱\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":37,\"sort_order\":14},\"🇦🇲\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":38,\"sort_order\":15},\"🇦🇴\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":39,\"sort_order\":16},\"🇦🇶\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":40,\"sort_order\":17},\"🇦🇷\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":41,\"sort_order\":18},\"🇦🇸\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":42,\"sort_order\":19},\"🇦🇹\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":43,\"sort_order\":20},\"🇦🇺\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":44,\"sort_order\":21},\"🇦🇼\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":45,\"sort_order\":22},\"🇦🇽\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":46,\"sort_order\":23},\"🇦🇿\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":47,\"sort_order\":24},\"🇧🇦\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":48,\"sort_order\":25},\"🇧🇧\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":49,\"sort_order\":26},\"🇧🇩\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":50,\"sort_order\":27},\"🇧🇪\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":51,\"sort_order\":28},\"🇧🇫\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":52,\"sort_order\":29},\"🇧🇬\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":53,\"sort_order\":30},\"🇧🇭\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":54,\"sort_order\":31},\"🇧🇮\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":55,\"sort_order\":32},\"🇧🇯\":{\"category\":\"Flags\",\"sheet_x\":0,\"sheet_y\":56,\"sort_order\":33},\"🇧🇱\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":0,\"sort_order\":34},\"🇧🇲\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":1,\"sort_order\":35},\"🇧🇳\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":2,\"sort_order\":36},\"🇧🇴\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":3,\"sort_order\":37},\"🇧🇶\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":4,\"sort_order\":38},\"🇧🇷\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":5,\"sort_order\":39},\"🇧🇸\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":6,\"sort_order\":40},\"🇧🇹\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":7,\"sort_order\":41},\"🇧🇻\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":8,\"sort_order\":42},\"🇧🇼\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":9,\"sort_order\":43},\"🇧🇾\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":10,\"sort_order\":44},\"🇧🇿\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":11,\"sort_order\":45},\"🇨🇦\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":12,\"sort_order\":46},\"🇨🇨\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":13,\"sort_order\":47},\"🇨🇩\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":14,\"sort_order\":48},\"🇨🇫\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":15,\"sort_order\":49},\"🇨🇬\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":16,\"sort_order\":50},\"🇨🇭\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":17,\"sort_order\":51},\"🇨🇮\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":18,\"sort_order\":52},\"🇨🇰\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":19,\"sort_order\":53},\"🇨🇱\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":20,\"sort_order\":54},\"🇨🇲\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":21,\"sort_order\":55},\"🇨🇳\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":22,\"sort_order\":56},\"🇨🇴\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":23,\"sort_order\":57},\"🇨🇵\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":24,\"sort_order\":58},\"🇨🇷\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":25,\"sort_order\":59},\"🇨🇺\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":26,\"sort_order\":60},\"🇨🇻\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":27,\"sort_order\":61},\"🇨🇼\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":28,\"sort_order\":62},\"🇨🇽\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":29,\"sort_order\":63},\"🇨🇾\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":30,\"sort_order\":64},\"🇨🇿\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":31,\"sort_order\":65},\"🇩🇪\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":32,\"sort_order\":66},\"🇩🇬\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":33,\"sort_order\":67},\"🇩🇯\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":34,\"sort_order\":68},\"🇩🇰\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":35,\"sort_order\":69},\"🇩🇲\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":36,\"sort_order\":70},\"🇩🇴\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":37,\"sort_order\":71},\"🇩🇿\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":38,\"sort_order\":72},\"🇪🇦\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":39,\"sort_order\":73},\"🇪🇨\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":40,\"sort_order\":74},\"🇪🇪\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":41,\"sort_order\":75},\"🇪🇬\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":42,\"sort_order\":76},\"🇪🇭\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":43,\"sort_order\":77},\"🇪🇷\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":44,\"sort_order\":78},\"🇪🇸\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":45,\"sort_order\":79},\"🇪🇹\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":46,\"sort_order\":80},\"🇪🇺\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":47,\"sort_order\":81},\"🇫🇮\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":48,\"sort_order\":82},\"🇫🇯\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":49,\"sort_order\":83},\"🇫🇰\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":50,\"sort_order\":84},\"🇫🇲\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":51,\"sort_order\":85},\"🇫🇴\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":52,\"sort_order\":86},\"🇫🇷\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":53,\"sort_order\":87},\"🇬🇦\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":54,\"sort_order\":88},\"🇬🇧\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":55,\"sort_order\":89},\"🇬🇩\":{\"category\":\"Flags\",\"sheet_x\":1,\"sheet_y\":56,\"sort_order\":90},\"🇬🇪\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":0,\"sort_order\":91},\"🇬🇫\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":1,\"sort_order\":92},\"🇬🇬\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":2,\"sort_order\":93},\"🇬🇭\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":3,\"sort_order\":94},\"🇬🇮\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":4,\"sort_order\":95},\"🇬🇱\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":5,\"sort_order\":96},\"🇬🇲\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":6,\"sort_order\":97},\"🇬🇳\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":7,\"sort_order\":98},\"🇬🇵\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":8,\"sort_order\":99},\"🇬🇶\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":9,\"sort_order\":100},\"🇬🇷\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":10,\"sort_order\":101},\"🇬🇸\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":11,\"sort_order\":102},\"🇬🇹\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":12,\"sort_order\":103},\"🇬🇺\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":13,\"sort_order\":104},\"🇬🇼\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":14,\"sort_order\":105},\"🇬🇾\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":15,\"sort_order\":106},\"🇭🇰\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":16,\"sort_order\":107},\"🇭🇲\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":17,\"sort_order\":108},\"🇭🇳\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":18,\"sort_order\":109},\"🇭🇷\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":19,\"sort_order\":110},\"🇭🇹\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":20,\"sort_order\":111},\"🇭🇺\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":21,\"sort_order\":112},\"🇮🇨\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":22,\"sort_order\":113},\"🇮🇩\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":23,\"sort_order\":114},\"🇮🇪\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":24,\"sort_order\":115},\"🇮🇱\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":25,\"sort_order\":116},\"🇮🇲\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":26,\"sort_order\":117},\"🇮🇳\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":27,\"sort_order\":118},\"🇮🇴\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":28,\"sort_order\":119},\"🇮🇶\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":29,\"sort_order\":120},\"🇮🇷\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":30,\"sort_order\":121},\"🇮🇸\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":31,\"sort_order\":122},\"🇮🇹\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":32,\"sort_order\":123},\"🇯🇪\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":33,\"sort_order\":124},\"🇯🇲\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":34,\"sort_order\":125},\"🇯🇴\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":35,\"sort_order\":126},\"🇯🇵\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":36,\"sort_order\":127},\"🇰🇪\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":37,\"sort_order\":128},\"🇰🇬\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":38,\"sort_order\":129},\"🇰🇭\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":39,\"sort_order\":130},\"🇰🇮\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":40,\"sort_order\":131},\"🇰🇲\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":41,\"sort_order\":132},\"🇰🇳\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":42,\"sort_order\":133},\"🇰🇵\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":43,\"sort_order\":134},\"🇰🇷\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":44,\"sort_order\":135},\"🇰🇼\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":45,\"sort_order\":136},\"🇰🇾\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":46,\"sort_order\":137},\"🇰🇿\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":47,\"sort_order\":138},\"🇱🇦\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":48,\"sort_order\":139},\"🇱🇧\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":49,\"sort_order\":140},\"🇱🇨\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":50,\"sort_order\":141},\"🇱🇮\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":51,\"sort_order\":142},\"🇱🇰\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":52,\"sort_order\":143},\"🇱🇷\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":53,\"sort_order\":144},\"🇱🇸\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":54,\"sort_order\":145},\"🇱🇹\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":55,\"sort_order\":146},\"🇱🇺\":{\"category\":\"Flags\",\"sheet_x\":2,\"sheet_y\":56,\"sort_order\":147},\"🇱🇻\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":0,\"sort_order\":148},\"🇱🇾\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":1,\"sort_order\":149},\"🇲🇦\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":2,\"sort_order\":150},\"🇲🇨\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":3,\"sort_order\":151},\"🇲🇩\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":4,\"sort_order\":152},\"🇲🇪\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":5,\"sort_order\":153},\"🇲🇫\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":6,\"sort_order\":154},\"🇲🇬\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":7,\"sort_order\":155},\"🇲🇭\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":8,\"sort_order\":156},\"🇲🇰\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":9,\"sort_order\":157},\"🇲🇱\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":10,\"sort_order\":158},\"🇲🇲\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":11,\"sort_order\":159},\"🇲🇳\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":12,\"sort_order\":160},\"🇲🇴\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":13,\"sort_order\":161},\"🇲🇵\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":14,\"sort_order\":162},\"🇲🇶\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":15,\"sort_order\":163},\"🇲🇷\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":16,\"sort_order\":164},\"🇲🇸\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":17,\"sort_order\":165},\"🇲🇹\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":18,\"sort_order\":166},\"🇲🇺\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":19,\"sort_order\":167},\"🇲🇻\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":20,\"sort_order\":168},\"🇲🇼\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":21,\"sort_order\":169},\"🇲🇽\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":22,\"sort_order\":170},\"🇲🇾\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":23,\"sort_order\":171},\"🇲🇿\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":24,\"sort_order\":172},\"🇳🇦\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":25,\"sort_order\":173},\"🇳🇨\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":26,\"sort_order\":174},\"🇳🇪\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":27,\"sort_order\":175},\"🇳🇫\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":28,\"sort_order\":176},\"🇳🇬\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":29,\"sort_order\":177},\"🇳🇮\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":30,\"sort_order\":178},\"🇳🇱\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":31,\"sort_order\":179},\"🇳🇴\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":32,\"sort_order\":180},\"🇳🇵\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":33,\"sort_order\":181},\"🇳🇷\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":34,\"sort_order\":182},\"🇳🇺\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":35,\"sort_order\":183},\"🇳🇿\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":36,\"sort_order\":184},\"🇴🇲\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":37,\"sort_order\":185},\"🇵🇦\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":38,\"sort_order\":186},\"🇵🇪\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":39,\"sort_order\":187},\"🇵🇫\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":40,\"sort_order\":188},\"🇵🇬\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":41,\"sort_order\":189},\"🇵🇭\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":42,\"sort_order\":190},\"🇵🇰\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":43,\"sort_order\":191},\"🇵🇱\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":44,\"sort_order\":192},\"🇵🇲\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":45,\"sort_order\":193},\"🇵🇳\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":46,\"sort_order\":194},\"🇵🇷\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":47,\"sort_order\":195},\"🇵🇸\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":48,\"sort_order\":196},\"🇵🇹\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":49,\"sort_order\":197},\"🇵🇼\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":50,\"sort_order\":198},\"🇵🇾\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":51,\"sort_order\":199},\"🇶🇦\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":52,\"sort_order\":200},\"🇷🇪\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":53,\"sort_order\":201},\"🇷🇴\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":54,\"sort_order\":202},\"🇷🇸\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":55,\"sort_order\":203},\"🇷🇺\":{\"category\":\"Flags\",\"sheet_x\":3,\"sheet_y\":56,\"sort_order\":204},\"🇷🇼\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":0,\"sort_order\":205},\"🇸🇦\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":1,\"sort_order\":206},\"🇸🇧\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":2,\"sort_order\":207},\"🇸🇨\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":3,\"sort_order\":208},\"🇸🇩\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":4,\"sort_order\":209},\"🇸🇪\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":5,\"sort_order\":210},\"🇸🇬\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":6,\"sort_order\":211},\"🇸🇭\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":7,\"sort_order\":212},\"🇸🇮\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":8,\"sort_order\":213},\"🇸🇯\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":9,\"sort_order\":214},\"🇸🇰\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":10,\"sort_order\":215},\"🇸🇱\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":11,\"sort_order\":216},\"🇸🇲\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":12,\"sort_order\":217},\"🇸🇳\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":13,\"sort_order\":218},\"🇸🇴\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":14,\"sort_order\":219},\"🇸🇷\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":15,\"sort_order\":220},\"🇸🇸\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":16,\"sort_order\":221},\"🇸🇹\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":17,\"sort_order\":222},\"🇸🇻\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":18,\"sort_order\":223},\"🇸🇽\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":19,\"sort_order\":224},\"🇸🇾\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":20,\"sort_order\":225},\"🇸🇿\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":21,\"sort_order\":226},\"🇹🇦\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":22,\"sort_order\":227},\"🇹🇨\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":23,\"sort_order\":228},\"🇹🇩\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":24,\"sort_order\":229},\"🇹🇫\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":25,\"sort_order\":230},\"🇹🇬\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":26,\"sort_order\":231},\"🇹🇭\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":27,\"sort_order\":232},\"🇹🇯\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":28,\"sort_order\":233},\"🇹🇰\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":29,\"sort_order\":234},\"🇹🇱\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":30,\"sort_order\":235},\"🇹🇲\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":31,\"sort_order\":236},\"🇹🇳\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":32,\"sort_order\":237},\"🇹🇴\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":33,\"sort_order\":238},\"🇹🇷\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":34,\"sort_order\":239},\"🇹🇹\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":35,\"sort_order\":240},\"🇹🇻\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":36,\"sort_order\":241},\"🇹🇼\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":37,\"sort_order\":242},\"🇹🇿\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":38,\"sort_order\":243},\"🇺🇦\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":39,\"sort_order\":244},\"🇺🇬\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":40,\"sort_order\":245},\"🇺🇲\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":41,\"sort_order\":246},\"🇺🇳\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":42,\"sort_order\":247},\"🇺🇸\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":43,\"sort_order\":248},\"🇺🇾\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":44,\"sort_order\":249},\"🇺🇿\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":45,\"sort_order\":250},\"🇻🇦\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":46,\"sort_order\":251},\"🇻🇨\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":47,\"sort_order\":252},\"🇻🇪\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":48,\"sort_order\":253},\"🇻🇬\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":49,\"sort_order\":254},\"🇻🇮\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":50,\"sort_order\":255},\"🇻🇳\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":51,\"sort_order\":256},\"🇻🇺\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":52,\"sort_order\":257},\"🇼🇫\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":53,\"sort_order\":258},\"🇼🇸\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":54,\"sort_order\":259},\"🇽🇰\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":55,\"sort_order\":260},\"🇾🇪\":{\"category\":\"Flags\",\"sheet_x\":4,\"sheet_y\":56,\"sort_order\":261},\"🇾🇹\":{\"category\":\"Flags\",\"sheet_x\":5,\"sheet_y\":0,\"sort_order\":262},\"🇿🇦\":{\"category\":\"Flags\",\"sheet_x\":5,\"sheet_y\":1,\"sort_order\":263},\"🇿🇲\":{\"category\":\"Flags\",\"sheet_x\":5,\"sheet_y\":2,\"sort_order\":264},\"🇿🇼\":{\"category\":\"Flags\",\"sheet_x\":5,\"sheet_y\":3,\"sort_order\":265},\"🈁\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":4,\"sort_order\":167},\"🈂️\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":5,\"sort_order\":168},\"🈚\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":6,\"sort_order\":174},\"🈯\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":7,\"sort_order\":171},\"🈲\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":8,\"sort_order\":175},\"🈳\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":9,\"sort_order\":179},\"🈴\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":10,\"sort_order\":178},\"🈵\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":11,\"sort_order\":183},\"🈶\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":12,\"sort_order\":170},\"🈷️\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":13,\"sort_order\":169},\"🈸\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":14,\"sort_order\":177},\"🈹\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":15,\"sort_order\":173},\"🈺\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":16,\"sort_order\":182},\"🉐\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":17,\"sort_order\":172},\"🉑\":{\"category\":\"Symbols\",\"sheet_x\":5,\"sheet_y\":18,\"sort_order\":176},\"🌀\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":19,\"sort_order\":197},\"🌁\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":20,\"sort_order\":49},\"🌂\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":21,\"sort_order\":199},\"🌃\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":22,\"sort_order\":50},\"🌄\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":23,\"sort_order\":52},\"🌅\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":24,\"sort_order\":53},\"🌆\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":25,\"sort_order\":54},\"🌇\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":26,\"sort_order\":55},\"🌈\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":27,\"sort_order\":198},\"🌉\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":28,\"sort_order\":56},\"🌊\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":29,\"sort_order\":210},\"🌋\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":30,\"sort_order\":10},\"🌌\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":31,\"sort_order\":184},\"🌍\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":32,\"sort_order\":1},\"🌎\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":33,\"sort_order\":2},\"🌏\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":34,\"sort_order\":3},\"🌐\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":35,\"sort_order\":4},\"🌑\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":36,\"sort_order\":164},\"🌒\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":37,\"sort_order\":165},\"🌓\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":38,\"sort_order\":166},\"🌔\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":39,\"sort_order\":167},\"🌕\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":40,\"sort_order\":168},\"🌖\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":41,\"sort_order\":169},\"🌗\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":42,\"sort_order\":170},\"🌘\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":43,\"sort_order\":171},\"🌙\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":44,\"sort_order\":172},\"🌚\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":45,\"sort_order\":173},\"🌛\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":46,\"sort_order\":174},\"🌜\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":47,\"sort_order\":175},\"🌝\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":48,\"sort_order\":178},\"🌞\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":49,\"sort_order\":179},\"🌟\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":50,\"sort_order\":182},\"🌠\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":51,\"sort_order\":183},\"🌡️\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":52,\"sort_order\":176},\"🌤️\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":53,\"sort_order\":188},\"🌥️\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":54,\"sort_order\":189},\"🌦️\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":55,\"sort_order\":190},\"🌧️\":{\"category\":\"Travel & Places\",\"sheet_x\":5,\"sheet_y\":56,\"sort_order\":191},\"🌨️\":{\"category\":\"Travel & Places\",\"sheet_x\":6,\"sheet_y\":0,\"sort_order\":192},\"🌩️\":{\"category\":\"Travel & Places\",\"sheet_x\":6,\"sheet_y\":1,\"sort_order\":193},\"🌪️\":{\"category\":\"Travel & Places\",\"sheet_x\":6,\"sheet_y\":2,\"sort_order\":194},\"🌫️\":{\"category\":\"Travel & Places\",\"sheet_x\":6,\"sheet_y\":3,\"sort_order\":195},\"🌬️\":{\"category\":\"Travel & Places\",\"sheet_x\":6,\"sheet_y\":4,\"sort_order\":196},\"🌭\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":5,\"sort_order\":47},\"🌮\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":6,\"sort_order\":49},\"🌯\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":7,\"sort_order\":50},\"🌰\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":8,\"sort_order\":31},\"🌱\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":9,\"sort_order\":116},\"🌲\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":10,\"sort_order\":117},\"🌳\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":11,\"sort_order\":118},\"🌴\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":12,\"sort_order\":119},\"🌵\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":13,\"sort_order\":120},\"🌶️\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":14,\"sort_order\":23},\"🌷\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":15,\"sort_order\":115},\"🌸\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":16,\"sort_order\":107},\"🌹\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":17,\"sort_order\":110},\"🌺\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":18,\"sort_order\":112},\"🌻\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":19,\"sort_order\":113},\"🌼\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":20,\"sort_order\":114},\"🌽\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":21,\"sort_order\":22},\"🌾\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":22,\"sort_order\":121},\"🌿\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":23,\"sort_order\":122},\"🍀\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":24,\"sort_order\":124},\"🍁\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":25,\"sort_order\":125},\"🍂\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":26,\"sort_order\":126},\"🍃\":{\"category\":\"Animals & Nature\",\"sheet_x\":6,\"sheet_y\":27,\"sort_order\":127},\"🍄\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":28,\"sort_order\":29},\"🍅\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":29,\"sort_order\":16},\"🍆\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":30,\"sort_order\":19},\"🍇\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":31,\"sort_order\":1},\"🍈\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":32,\"sort_order\":2},\"🍉\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":33,\"sort_order\":3},\"🍊\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":34,\"sort_order\":4},\"🍋\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":35,\"sort_order\":5},\"🍌\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":36,\"sort_order\":6},\"🍍\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":37,\"sort_order\":7},\"🍎\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":38,\"sort_order\":9},\"🍏\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":39,\"sort_order\":10},\"🍐\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":40,\"sort_order\":11},\"🍑\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":41,\"sort_order\":12},\"🍒\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":42,\"sort_order\":13},\"🍓\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":43,\"sort_order\":14},\"🍔\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":44,\"sort_order\":44},\"🍕\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":45,\"sort_order\":46},\"🍖\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":46,\"sort_order\":40},\"🍗\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":47,\"sort_order\":41},\"🍘\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":48,\"sort_order\":64},\"🍙\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":49,\"sort_order\":65},\"🍚\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":50,\"sort_order\":66},\"🍛\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":51,\"sort_order\":67},\"🍜\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":52,\"sort_order\":68},\"🍝\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":53,\"sort_order\":69},\"🍞\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":54,\"sort_order\":32},\"🍟\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":55,\"sort_order\":45},\"🍠\":{\"category\":\"Food & Drink\",\"sheet_x\":6,\"sheet_y\":56,\"sort_order\":70},\"🍡\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":0,\"sort_order\":76},\"🍢\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":1,\"sort_order\":71},\"🍣\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":2,\"sort_order\":72},\"🍤\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":3,\"sort_order\":73},\"🍥\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":4,\"sort_order\":74},\"🍦\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":5,\"sort_order\":85},\"🍧\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":6,\"sort_order\":86},\"🍨\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":7,\"sort_order\":87},\"🍩\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":8,\"sort_order\":88},\"🍪\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":9,\"sort_order\":89},\"🍫\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":10,\"sort_order\":94},\"🍬\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":11,\"sort_order\":95},\"🍭\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":12,\"sort_order\":96},\"🍮\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":13,\"sort_order\":97},\"🍯\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":14,\"sort_order\":98},\"🍰\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":15,\"sort_order\":91},\"🍱\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":16,\"sort_order\":63},\"🍲\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":17,\"sort_order\":56},\"🍳\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":18,\"sort_order\":54},\"🍴\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":19,\"sort_order\":118},\"🍵\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":20,\"sort_order\":102},\"🍶\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":21,\"sort_order\":103},\"🍷\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":22,\"sort_order\":105},\"🍸\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":23,\"sort_order\":106},\"🍹\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":24,\"sort_order\":107},\"🍺\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":25,\"sort_order\":108},\"🍻\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":26,\"sort_order\":109},\"🍼\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":27,\"sort_order\":99},\"🍽️\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":28,\"sort_order\":117},\"🍾\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":29,\"sort_order\":104},\"🍿\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":30,\"sort_order\":59},\"🎀\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":31,\"sort_order\":17},\"🎁\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":32,\"sort_order\":18},\"🎂\":{\"category\":\"Food & Drink\",\"sheet_x\":7,\"sheet_y\":33,\"sort_order\":90},\"🎃\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":34,\"sort_order\":1},\"🎄\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":35,\"sort_order\":2},\"🎅\":{\"category\":\"People & Body\",\"sheet_x\":7,\"sheet_y\":36,\"sort_order\":177},\"🎆\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":42,\"sort_order\":3},\"🎇\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":43,\"sort_order\":4},\"🎈\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":44,\"sort_order\":7},\"🎉\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":45,\"sort_order\":8},\"🎊\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":46,\"sort_order\":9},\"🎋\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":47,\"sort_order\":10},\"🎌\":{\"category\":\"Flags\",\"sheet_x\":7,\"sheet_y\":48,\"sort_order\":3},\"🎍\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":49,\"sort_order\":11},\"🎎\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":50,\"sort_order\":12},\"🎏\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":51,\"sort_order\":13},\"🎐\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":52,\"sort_order\":14},\"🎑\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":53,\"sort_order\":15},\"🎒\":{\"category\":\"Objects\",\"sheet_x\":7,\"sheet_y\":54,\"sort_order\":25},\"🎓\":{\"category\":\"Objects\",\"sheet_x\":7,\"sheet_y\":55,\"sort_order\":37},\"🎖️\":{\"category\":\"Activities\",\"sheet_x\":7,\"sheet_y\":56,\"sort_order\":22},\"🎗️\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":0,\"sort_order\":19},\"🎙️\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":1,\"sort_order\":56},\"🎚️\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":2,\"sort_order\":57},\"🎛️\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":3,\"sort_order\":58},\"🎞️\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":4,\"sort_order\":89},\"🎟️\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":5,\"sort_order\":20},\"🎠\":{\"category\":\"Travel & Places\",\"sheet_x\":8,\"sheet_y\":6,\"sort_order\":58},\"🎡\":{\"category\":\"Travel & Places\",\"sheet_x\":8,\"sheet_y\":7,\"sort_order\":59},\"🎢\":{\"category\":\"Travel & Places\",\"sheet_x\":8,\"sheet_y\":8,\"sort_order\":60},\"🎣\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":9,\"sort_order\":49},\"🎤\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":10,\"sort_order\":59},\"🎥\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":11,\"sort_order\":88},\"🎦\":{\"category\":\"Symbols\",\"sheet_x\":8,\"sheet_y\":12,\"sort_order\":91},\"🎧\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":13,\"sort_order\":60},\"🎨\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":14,\"sort_order\":77},\"🎩\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":15,\"sort_order\":36},\"🎪\":{\"category\":\"Travel & Places\",\"sheet_x\":8,\"sheet_y\":16,\"sort_order\":62},\"🎫\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":17,\"sort_order\":21},\"🎬\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":18,\"sort_order\":91},\"🎭\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":19,\"sort_order\":75},\"🎮\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":20,\"sort_order\":61},\"🎯\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":21,\"sort_order\":55},\"🎰\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":22,\"sort_order\":63},\"🎱\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":23,\"sort_order\":58},\"🎲\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":24,\"sort_order\":64},\"🎳\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":25,\"sort_order\":37},\"🎴\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":26,\"sort_order\":74},\"🎵\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":27,\"sort_order\":54},\"🎶\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":28,\"sort_order\":55},\"🎷\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":29,\"sort_order\":62},\"🎸\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":30,\"sort_order\":63},\"🎹\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":31,\"sort_order\":64},\"🎺\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":32,\"sort_order\":65},\"🎻\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":33,\"sort_order\":66},\"🎼\":{\"category\":\"Objects\",\"sheet_x\":8,\"sheet_y\":34,\"sort_order\":53},\"🎽\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":35,\"sort_order\":51},\"🎾\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":36,\"sort_order\":35},\"🎿\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":37,\"sort_order\":52},\"🏀\":{\"category\":\"Activities\",\"sheet_x\":8,\"sheet_y\":38,\"sort_order\":31},\"🏁\":{\"category\":\"Flags\",\"sheet_x\":8,\"sheet_y\":39,\"sort_order\":1},\"🏂\":{\"category\":\"People & Body\",\"sheet_x\":8,\"sheet_y\":40,\"sort_order\":248},\"🏃‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":8,\"sheet_y\":46,\"sort_order\":232},\"🏃‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":8,\"sheet_y\":52,\"sort_order\":231},\"🏃\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":1,\"sort_order\":230},\"🏄‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":7,\"sort_order\":254},\"🏄‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":13,\"sort_order\":253},\"🏄\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":19,\"sort_order\":252},\"🏅\":{\"category\":\"Activities\",\"sheet_x\":9,\"sheet_y\":25,\"sort_order\":24},\"🏆\":{\"category\":\"Activities\",\"sheet_x\":9,\"sheet_y\":26,\"sort_order\":23},\"🏇\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":27,\"sort_order\":246},\"🏈\":{\"category\":\"Activities\",\"sheet_x\":9,\"sheet_y\":33,\"sort_order\":33},\"🏉\":{\"category\":\"Activities\",\"sheet_x\":9,\"sheet_y\":34,\"sort_order\":34},\"🏊‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":35,\"sort_order\":260},\"🏊‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":41,\"sort_order\":259},\"🏊\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":47,\"sort_order\":258},\"🏋️‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":9,\"sheet_y\":53,\"sort_order\":266},\"🏋️‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":10,\"sheet_y\":2,\"sort_order\":265},\"🏋️\":{\"category\":\"People & Body\",\"sheet_x\":10,\"sheet_y\":8,\"sort_order\":264},\"🏌️‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":10,\"sheet_y\":14,\"sort_order\":251},\"🏌️‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":10,\"sheet_y\":20,\"sort_order\":250},\"🏌️\":{\"category\":\"People & Body\",\"sheet_x\":10,\"sheet_y\":26,\"sort_order\":249},\"🏍️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":32,\"sort_order\":92},\"🏎️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":33,\"sort_order\":91},\"🏏\":{\"category\":\"Activities\",\"sheet_x\":10,\"sheet_y\":34,\"sort_order\":38},\"🏐\":{\"category\":\"Activities\",\"sheet_x\":10,\"sheet_y\":35,\"sort_order\":32},\"🏑\":{\"category\":\"Activities\",\"sheet_x\":10,\"sheet_y\":36,\"sort_order\":39},\"🏒\":{\"category\":\"Activities\",\"sheet_x\":10,\"sheet_y\":37,\"sort_order\":40},\"🏓\":{\"category\":\"Activities\",\"sheet_x\":10,\"sheet_y\":38,\"sort_order\":42},\"🏔️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":39,\"sort_order\":8},\"🏕️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":40,\"sort_order\":12},\"🏖️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":41,\"sort_order\":13},\"🏗️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":42,\"sort_order\":19},\"🏘️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":43,\"sort_order\":21},\"🏙️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":44,\"sort_order\":51},\"🏚️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":45,\"sort_order\":22},\"🏛️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":46,\"sort_order\":18},\"🏜️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":47,\"sort_order\":14},\"🏝️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":48,\"sort_order\":15},\"🏞️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":49,\"sort_order\":16},\"🏟️\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":50,\"sort_order\":17},\"🏠\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":51,\"sort_order\":23},\"🏡\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":52,\"sort_order\":24},\"🏢\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":53,\"sort_order\":25},\"🏣\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":54,\"sort_order\":26},\"🏤\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":55,\"sort_order\":27},\"🏥\":{\"category\":\"Travel & Places\",\"sheet_x\":10,\"sheet_y\":56,\"sort_order\":28},\"🏦\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":0,\"sort_order\":29},\"🏧\":{\"category\":\"Symbols\",\"sheet_x\":11,\"sheet_y\":1,\"sort_order\":1},\"🏨\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":2,\"sort_order\":30},\"🏩\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":3,\"sort_order\":31},\"🏪\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":4,\"sort_order\":32},\"🏫\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":5,\"sort_order\":33},\"🏬\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":6,\"sort_order\":34},\"🏭\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":7,\"sort_order\":35},\"🏮\":{\"category\":\"Objects\",\"sheet_x\":11,\"sheet_y\":8,\"sort_order\":102},\"🏯\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":9,\"sort_order\":36},\"🏰\":{\"category\":\"Travel & Places\",\"sheet_x\":11,\"sheet_y\":10,\"sort_order\":37},\"🏳️‍🌈\":{\"category\":\"Flags\",\"sheet_x\":11,\"sheet_y\":11,\"sort_order\":6},\"🏳️\":{\"category\":\"Flags\",\"sheet_x\":11,\"sheet_y\":12,\"sort_order\":5},\"🏴‍☠️\":{\"category\":\"Flags\",\"sheet_x\":11,\"sheet_y\":13,\"sort_order\":7},\"🏴󠁧󠁢󠁥󠁮󠁧󠁿\":{\"category\":\"Flags\",\"sheet_x\":11,\"sheet_y\":14,\"sort_order\":266},\"🏴󠁧󠁢󠁳󠁣󠁴󠁿\":{\"category\":\"Flags\",\"sheet_x\":11,\"sheet_y\":15,\"sort_order\":267},\"🏴󠁧󠁢󠁷󠁬󠁳󠁿\":{\"category\":\"Flags\",\"sheet_x\":11,\"sheet_y\":16,\"sort_order\":268},\"🏴\":{\"category\":\"Flags\",\"sheet_x\":11,\"sheet_y\":17,\"sort_order\":4},\"🏵️\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":18,\"sort_order\":109},\"🏷️\":{\"category\":\"Objects\",\"sheet_x\":11,\"sheet_y\":19,\"sort_order\":120},\"🏸\":{\"category\":\"Activities\",\"sheet_x\":11,\"sheet_y\":20,\"sort_order\":43},\"🏹\":{\"category\":\"Objects\",\"sheet_x\":11,\"sheet_y\":21,\"sort_order\":189},\"🏺\":{\"category\":\"Food & Drink\",\"sheet_x\":11,\"sheet_y\":22,\"sort_order\":121},\"🏻\":{\"category\":\"Skin Tones\",\"sheet_x\":11,\"sheet_y\":23,\"sort_order\":1},\"🏼\":{\"category\":\"Skin Tones\",\"sheet_x\":11,\"sheet_y\":24,\"sort_order\":2},\"🏽\":{\"category\":\"Skin Tones\",\"sheet_x\":11,\"sheet_y\":25,\"sort_order\":3},\"🏾\":{\"category\":\"Skin Tones\",\"sheet_x\":11,\"sheet_y\":26,\"sort_order\":4},\"🏿\":{\"category\":\"Skin Tones\",\"sheet_x\":11,\"sheet_y\":27,\"sort_order\":5},\"🐀\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":28,\"sort_order\":44},\"🐁\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":29,\"sort_order\":43},\"🐂\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":30,\"sort_order\":25},\"🐃\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":31,\"sort_order\":26},\"🐄\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":32,\"sort_order\":27},\"🐅\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":33,\"sort_order\":17},\"🐆\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":34,\"sort_order\":18},\"🐇\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":35,\"sort_order\":47},\"🐈\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":36,\"sort_order\":14},\"🐉\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":37,\"sort_order\":82},\"🐊\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":38,\"sort_order\":77},\"🐋\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":39,\"sort_order\":86},\"🐌\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":40,\"sort_order\":94},\"🐍\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":41,\"sort_order\":80},\"🐎\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":42,\"sort_order\":20},\"🐏\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":43,\"sort_order\":32},\"🐐\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":44,\"sort_order\":34},\"🐑\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":45,\"sort_order\":33},\"🐒\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":46,\"sort_order\":2},\"🐓\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":47,\"sort_order\":62},\"🐔\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":48,\"sort_order\":61},\"🐕‍🦺\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":49,\"sort_order\":8},\"🐕\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":50,\"sort_order\":6},\"🐖\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":51,\"sort_order\":29},\"🐗\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":52,\"sort_order\":30},\"🐘\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":53,\"sort_order\":39},\"🐙\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":54,\"sort_order\":92},\"🐚\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":55,\"sort_order\":93},\"🐛\":{\"category\":\"Animals & Nature\",\"sheet_x\":11,\"sheet_y\":56,\"sort_order\":96},\"🐜\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":0,\"sort_order\":97},\"🐝\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":1,\"sort_order\":98},\"🐞\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":2,\"sort_order\":99},\"🐟\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":3,\"sort_order\":88},\"🐠\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":4,\"sort_order\":89},\"🐡\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":5,\"sort_order\":90},\"🐢\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":6,\"sort_order\":78},\"🐣\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":7,\"sort_order\":63},\"🐤\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":8,\"sort_order\":64},\"🐥\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":9,\"sort_order\":65},\"🐦\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":10,\"sort_order\":66},\"🐧\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":11,\"sort_order\":67},\"🐨\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":12,\"sort_order\":52},\"🐩\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":13,\"sort_order\":9},\"🐪\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":14,\"sort_order\":35},\"🐫\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":15,\"sort_order\":36},\"🐬\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":16,\"sort_order\":87},\"🐭\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":17,\"sort_order\":42},\"🐮\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":18,\"sort_order\":24},\"🐯\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":19,\"sort_order\":16},\"🐰\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":20,\"sort_order\":46},\"🐱\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":21,\"sort_order\":13},\"🐲\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":22,\"sort_order\":81},\"🐳\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":23,\"sort_order\":85},\"🐴\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":24,\"sort_order\":19},\"🐵\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":25,\"sort_order\":1},\"🐶\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":26,\"sort_order\":5},\"🐷\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":27,\"sort_order\":28},\"🐸\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":28,\"sort_order\":76},\"🐹\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":29,\"sort_order\":45},\"🐺\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":30,\"sort_order\":10},\"🐻\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":31,\"sort_order\":51},\"🐼\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":32,\"sort_order\":53},\"🐽\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":33,\"sort_order\":31},\"🐾\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":34,\"sort_order\":59},\"🐿️\":{\"category\":\"Animals & Nature\",\"sheet_x\":12,\"sheet_y\":35,\"sort_order\":48},\"👀\":{\"category\":\"People & Body\",\"sheet_x\":12,\"sheet_y\":36,\"sort_order\":45},\"👁️‍🗨️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":12,\"sheet_y\":37,\"sort_order\":145},\"👁️\":{\"category\":\"People & Body\",\"sheet_x\":12,\"sheet_y\":38,\"sort_order\":46},\"👂\":{\"category\":\"People & Body\",\"sheet_x\":12,\"sheet_y\":39,\"sort_order\":39},\"👃\":{\"category\":\"People & Body\",\"sheet_x\":12,\"sheet_y\":45,\"sort_order\":41},\"👄\":{\"category\":\"People & Body\",\"sheet_x\":12,\"sheet_y\":51,\"sort_order\":48},\"👅\":{\"category\":\"People & Body\",\"sheet_x\":12,\"sheet_y\":52,\"sort_order\":47},\"👆\":{\"category\":\"People & Body\",\"sheet_x\":12,\"sheet_y\":53,\"sort_order\":15},\"👇\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":2,\"sort_order\":17},\"👈\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":8,\"sort_order\":13},\"👉\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":14,\"sort_order\":14},\"👊\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":20,\"sort_order\":22},\"👋\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":26,\"sort_order\":1},\"👌\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":32,\"sort_order\":6},\"👍\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":38,\"sort_order\":19},\"👎\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":44,\"sort_order\":20},\"👏\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":50,\"sort_order\":25},\"👐\":{\"category\":\"People & Body\",\"sheet_x\":13,\"sheet_y\":56,\"sort_order\":27},\"👑\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":5,\"sort_order\":34},\"👒\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":6,\"sort_order\":35},\"👓\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":7,\"sort_order\":1},\"👔\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":8,\"sort_order\":6},\"👕\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":9,\"sort_order\":7},\"👖\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":10,\"sort_order\":8},\"👗\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":11,\"sort_order\":13},\"👘\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":12,\"sort_order\":14},\"👙\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":13,\"sort_order\":19},\"👚\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":14,\"sort_order\":20},\"👛\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":15,\"sort_order\":21},\"👜\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":16,\"sort_order\":22},\"👝\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":17,\"sort_order\":23},\"👞\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":18,\"sort_order\":26},\"👟\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":19,\"sort_order\":27},\"👠\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":20,\"sort_order\":30},\"👡\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":21,\"sort_order\":31},\"👢\":{\"category\":\"Objects\",\"sheet_x\":14,\"sheet_y\":22,\"sort_order\":33},\"👣\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":23,\"sort_order\":334},\"👤\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":24,\"sort_order\":332},\"👥\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":25,\"sort_order\":333},\"👦\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":26,\"sort_order\":51},\"👧\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":32,\"sort_order\":52},\"👨‍🌾\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":38,\"sort_order\":118},\"👨‍🍳\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":44,\"sort_order\":121},\"👨‍🎓\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":50,\"sort_order\":109},\"👨‍🎤\":{\"category\":\"People & Body\",\"sheet_x\":14,\"sheet_y\":56,\"sort_order\":139},\"👨‍🎨\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":5,\"sort_order\":142},\"👨‍🏫\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":11,\"sort_order\":112},\"👨‍🏭\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":17,\"sort_order\":127},\"👨‍👦‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":23,\"sort_order\":322},\"👨‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":24,\"sort_order\":321},\"👨‍👧‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":25,\"sort_order\":324},\"👨‍👧‍👧\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":26,\"sort_order\":325},\"👨‍👧\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":27,\"sort_order\":323},\"👨‍👨‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":28,\"sort_order\":311},\"👨‍👨‍👦‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":29,\"sort_order\":314},\"👨‍👨‍👧\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":30,\"sort_order\":312},\"👨‍👨‍👧‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":31,\"sort_order\":313},\"👨‍👨‍👧‍👧\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":32,\"sort_order\":315},\"👨‍👩‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":33,\"sort_order\":306},\"👨‍👩‍👦‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":34,\"sort_order\":309},\"👨‍👩‍👧\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":35,\"sort_order\":307},\"👨‍👩‍👧‍👦\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":36,\"sort_order\":308},\"👨‍👩‍👧‍👧\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":37,\"sort_order\":310},\"👨‍💻\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":38,\"sort_order\":136},\"👨‍💼\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":44,\"sort_order\":130},\"👨‍🔧\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":50,\"sort_order\":124},\"👨‍🔬\":{\"category\":\"People & Body\",\"sheet_x\":15,\"sheet_y\":56,\"sort_order\":133},\"👨‍🚀\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":5,\"sort_order\":148},\"👨‍🚒\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":11,\"sort_order\":151},\"👨‍🦯\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":17,\"sort_order\":222},\"👨‍🦰\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":23,\"sort_order\":57},\"👨‍🦱\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":29,\"sort_order\":58},\"👨‍🦲\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":35,\"sort_order\":60},\"👨‍🦳\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":41,\"sort_order\":59},\"👨‍🦼\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":47,\"sort_order\":225},\"👨‍🦽\":{\"category\":\"People & Body\",\"sheet_x\":16,\"sheet_y\":53,\"sort_order\":228},\"👨‍⚕️\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":2,\"sort_order\":106},\"👨‍⚖️\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":8,\"sort_order\":115},\"👨‍✈️\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":14,\"sort_order\":145},\"👨‍❤️‍👨\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":20,\"sort_order\":303},\"👨‍❤️‍💋‍👨\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":21,\"sort_order\":299},\"👨\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":22,\"sort_order\":55},\"👩‍🌾\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":28,\"sort_order\":119},\"👩‍🍳\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":34,\"sort_order\":122},\"👩‍🎓\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":40,\"sort_order\":110},\"👩‍🎤\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":46,\"sort_order\":140},\"👩‍🎨\":{\"category\":\"People & Body\",\"sheet_x\":17,\"sheet_y\":52,\"sort_order\":143},\"👩‍🏫\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":1,\"sort_order\":113},\"👩‍🏭\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":7,\"sort_order\":128},\"👩‍👦‍👦\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":13,\"sort_order\":327},\"👩‍👦\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":14,\"sort_order\":326},\"👩‍👧‍👦\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":15,\"sort_order\":329},\"👩‍👧‍👧\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":16,\"sort_order\":330},\"👩‍👧\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":17,\"sort_order\":328},\"👩‍👩‍👦\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":18,\"sort_order\":316},\"👩‍👩‍👦‍👦\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":19,\"sort_order\":319},\"👩‍👩‍👧\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":20,\"sort_order\":317},\"👩‍👩‍👧‍👦\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":21,\"sort_order\":318},\"👩‍👩‍👧‍👧\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":22,\"sort_order\":320},\"👩‍💻\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":23,\"sort_order\":137},\"👩‍💼\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":29,\"sort_order\":131},\"👩‍🔧\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":35,\"sort_order\":125},\"👩‍🔬\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":41,\"sort_order\":134},\"👩‍🚀\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":47,\"sort_order\":149},\"👩‍🚒\":{\"category\":\"People & Body\",\"sheet_x\":18,\"sheet_y\":53,\"sort_order\":152},\"👩‍🦯\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":2,\"sort_order\":223},\"👩‍🦰\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":8,\"sort_order\":62},\"👩‍🦱\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":14,\"sort_order\":64},\"👩‍🦲\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":20,\"sort_order\":68},\"👩‍🦳\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":26,\"sort_order\":66},\"👩‍🦼\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":32,\"sort_order\":226},\"👩‍🦽\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":38,\"sort_order\":229},\"👩‍⚕️\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":44,\"sort_order\":107},\"👩‍⚖️\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":50,\"sort_order\":116},\"👩‍✈️\":{\"category\":\"People & Body\",\"sheet_x\":19,\"sheet_y\":56,\"sort_order\":146},\"👩‍❤️‍👨\":{\"category\":\"People & Body\",\"sheet_x\":20,\"sheet_y\":5,\"sort_order\":302},\"👩‍❤️‍👩\":{\"category\":\"People & Body\",\"sheet_x\":20,\"sheet_y\":6,\"sort_order\":304},\"👩‍❤️‍💋‍👨\":{\"category\":\"People & Body\",\"sheet_x\":20,\"sheet_y\":7,\"sort_order\":298},\"👩‍❤️‍💋‍👩\":{\"category\":\"People & Body\",\"sheet_x\":20,\"sheet_y\":8,\"sort_order\":300},\"👩\":{\"category\":\"People & Body\",\"sheet_x\":20,\"sheet_y\":9,\"sort_order\":61},\"👪\":{\"category\":\"People & Body\",\"sheet_x\":20,\"sheet_y\":15,\"sort_order\":305},\"👫\":{\"category\":\"People & Body\",\"sheet_x\":20,\"sheet_y\":16,\"sort_order\":295},\"👬\":{\"category\":\"People & Body\",\"sheet_x\":20,\"sheet_y\":42,\"sort_order\":296},\"👭\":{\"category\":\"People & Body\",\"sheet_x\":21,\"sheet_y\":11,\"sort_order\":294},\"👮‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":21,\"sheet_y\":37,\"sort_order\":155},\"👮‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":21,\"sheet_y\":43,\"sort_order\":154},\"👮\":{\"category\":\"People & Body\",\"sheet_x\":21,\"sheet_y\":49,\"sort_order\":153},\"👯‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":21,\"sheet_y\":55,\"sort_order\":238},\"👯‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":21,\"sheet_y\":56,\"sort_order\":237},\"👯\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":0,\"sort_order\":236},\"👰\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":1,\"sort_order\":173},\"👱‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":7,\"sort_order\":70},\"👱‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":13,\"sort_order\":71},\"👱\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":19,\"sort_order\":54},\"👲\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":25,\"sort_order\":170},\"👳‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":31,\"sort_order\":169},\"👳‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":37,\"sort_order\":168},\"👳\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":43,\"sort_order\":167},\"👴\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":49,\"sort_order\":73},\"👵\":{\"category\":\"People & Body\",\"sheet_x\":22,\"sheet_y\":55,\"sort_order\":74},\"👶\":{\"category\":\"People & Body\",\"sheet_x\":23,\"sheet_y\":4,\"sort_order\":49},\"👷‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":23,\"sheet_y\":10,\"sort_order\":164},\"👷‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":23,\"sheet_y\":16,\"sort_order\":163},\"👷\":{\"category\":\"People & Body\",\"sheet_x\":23,\"sheet_y\":22,\"sort_order\":162},\"👸\":{\"category\":\"People & Body\",\"sheet_x\":23,\"sheet_y\":28,\"sort_order\":166},\"👹\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":23,\"sheet_y\":34,\"sort_order\":97},\"👺\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":23,\"sheet_y\":35,\"sort_order\":98},\"👻\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":23,\"sheet_y\":36,\"sort_order\":99},\"👼\":{\"category\":\"People & Body\",\"sheet_x\":23,\"sheet_y\":37,\"sort_order\":176},\"👽\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":23,\"sheet_y\":43,\"sort_order\":100},\"👾\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":23,\"sheet_y\":44,\"sort_order\":101},\"👿\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":23,\"sheet_y\":45,\"sort_order\":92},\"💀\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":23,\"sheet_y\":46,\"sort_order\":93},\"💁‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":23,\"sheet_y\":47,\"sort_order\":89},\"💁‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":23,\"sheet_y\":53,\"sort_order\":88},\"💁\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":2,\"sort_order\":87},\"💂‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":8,\"sort_order\":161},\"💂‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":14,\"sort_order\":160},\"💂\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":20,\"sort_order\":159},\"💃\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":26,\"sort_order\":233},\"💄\":{\"category\":\"Objects\",\"sheet_x\":24,\"sheet_y\":32,\"sort_order\":41},\"💅\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":33,\"sort_order\":32},\"💆‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":39,\"sort_order\":208},\"💆‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":45,\"sort_order\":207},\"💆\":{\"category\":\"People & Body\",\"sheet_x\":24,\"sheet_y\":51,\"sort_order\":206},\"💇‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":25,\"sheet_y\":0,\"sort_order\":211},\"💇‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":25,\"sheet_y\":6,\"sort_order\":210},\"💇\":{\"category\":\"People & Body\",\"sheet_x\":25,\"sheet_y\":12,\"sort_order\":209},\"💈\":{\"category\":\"Travel & Places\",\"sheet_x\":25,\"sheet_y\":18,\"sort_order\":61},\"💉\":{\"category\":\"Objects\",\"sheet_x\":25,\"sheet_y\":19,\"sort_order\":208},\"💊\":{\"category\":\"Objects\",\"sheet_x\":25,\"sheet_y\":20,\"sort_order\":210},\"💋\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":21,\"sort_order\":115},\"💌\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":22,\"sort_order\":116},\"💍\":{\"category\":\"Objects\",\"sheet_x\":25,\"sheet_y\":23,\"sort_order\":42},\"💎\":{\"category\":\"Objects\",\"sheet_x\":25,\"sheet_y\":24,\"sort_order\":43},\"💏\":{\"category\":\"People & Body\",\"sheet_x\":25,\"sheet_y\":25,\"sort_order\":297},\"💐\":{\"category\":\"Animals & Nature\",\"sheet_x\":25,\"sheet_y\":26,\"sort_order\":106},\"💑\":{\"category\":\"People & Body\",\"sheet_x\":25,\"sheet_y\":27,\"sort_order\":301},\"💒\":{\"category\":\"Travel & Places\",\"sheet_x\":25,\"sheet_y\":28,\"sort_order\":38},\"💓\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":29,\"sort_order\":121},\"💔\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":30,\"sort_order\":126},\"💕\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":31,\"sort_order\":123},\"💖\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":32,\"sort_order\":119},\"💗\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":33,\"sort_order\":120},\"💘\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":34,\"sort_order\":117},\"💙\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":35,\"sort_order\":131},\"💚\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":36,\"sort_order\":130},\"💛\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":37,\"sort_order\":129},\"💜\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":38,\"sort_order\":132},\"💝\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":39,\"sort_order\":118},\"💞\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":40,\"sort_order\":122},\"💟\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":41,\"sort_order\":124},\"💠\":{\"category\":\"Symbols\",\"sheet_x\":25,\"sheet_y\":42,\"sort_order\":214},\"💡\":{\"category\":\"Objects\",\"sheet_x\":25,\"sheet_y\":43,\"sort_order\":100},\"💢\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":44,\"sort_order\":137},\"💣\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":45,\"sort_order\":143},\"💤\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":46,\"sort_order\":149},\"💥\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":47,\"sort_order\":138},\"💦\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":48,\"sort_order\":140},\"💧\":{\"category\":\"Travel & Places\",\"sheet_x\":25,\"sheet_y\":49,\"sort_order\":209},\"💨\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":50,\"sort_order\":141},\"💩\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":25,\"sheet_y\":51,\"sort_order\":95},\"💪\":{\"category\":\"People & Body\",\"sheet_x\":25,\"sheet_y\":52,\"sort_order\":34},\"💫\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":26,\"sheet_y\":1,\"sort_order\":139},\"💬\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":26,\"sheet_y\":2,\"sort_order\":144},\"💭\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":26,\"sheet_y\":3,\"sort_order\":148},\"💮\":{\"category\":\"Animals & Nature\",\"sheet_x\":26,\"sheet_y\":4,\"sort_order\":108},\"💯\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":26,\"sheet_y\":5,\"sort_order\":136},\"💰\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":6,\"sort_order\":121},\"💱\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":7,\"sort_order\":130},\"💲\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":8,\"sort_order\":131},\"💳\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":9,\"sort_order\":127},\"💴\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":10,\"sort_order\":122},\"💵\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":11,\"sort_order\":123},\"💶\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":12,\"sort_order\":124},\"💷\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":13,\"sort_order\":125},\"💸\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":14,\"sort_order\":126},\"💹\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":15,\"sort_order\":129},\"💺\":{\"category\":\"Travel & Places\",\"sheet_x\":26,\"sheet_y\":16,\"sort_order\":123},\"💻\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":17,\"sort_order\":77},\"💼\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":18,\"sort_order\":152},\"💽\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":19,\"sort_order\":83},\"💾\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":20,\"sort_order\":84},\"💿\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":21,\"sort_order\":85},\"📀\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":22,\"sort_order\":86},\"📁\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":23,\"sort_order\":153},\"📂\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":24,\"sort_order\":154},\"📃\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":25,\"sort_order\":113},\"📄\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":26,\"sort_order\":115},\"📅\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":27,\"sort_order\":156},\"📆\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":28,\"sort_order\":157},\"📇\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":29,\"sort_order\":160},\"📈\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":30,\"sort_order\":161},\"📉\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":31,\"sort_order\":162},\"📊\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":32,\"sort_order\":163},\"📋\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":33,\"sort_order\":164},\"📌\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":34,\"sort_order\":165},\"📍\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":35,\"sort_order\":166},\"📎\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":36,\"sort_order\":167},\"📏\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":37,\"sort_order\":169},\"📐\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":38,\"sort_order\":170},\"📑\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":39,\"sort_order\":118},\"📒\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":40,\"sort_order\":112},\"📓\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":41,\"sort_order\":111},\"📔\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":42,\"sort_order\":104},\"📕\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":43,\"sort_order\":105},\"📖\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":44,\"sort_order\":106},\"📗\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":45,\"sort_order\":107},\"📘\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":46,\"sort_order\":108},\"📙\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":47,\"sort_order\":109},\"📚\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":48,\"sort_order\":110},\"📛\":{\"category\":\"Symbols\",\"sheet_x\":26,\"sheet_y\":49,\"sort_order\":104},\"📜\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":50,\"sort_order\":114},\"📝\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":51,\"sort_order\":151},\"📞\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":52,\"sort_order\":72},\"📟\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":53,\"sort_order\":73},\"📠\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":54,\"sort_order\":74},\"📡\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":55,\"sort_order\":207},\"📢\":{\"category\":\"Objects\",\"sheet_x\":26,\"sheet_y\":56,\"sort_order\":48},\"📣\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":0,\"sort_order\":49},\"📤\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":1,\"sort_order\":136},\"📥\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":2,\"sort_order\":137},\"📦\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":3,\"sort_order\":138},\"📧\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":4,\"sort_order\":133},\"📨\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":5,\"sort_order\":134},\"📩\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":6,\"sort_order\":135},\"📪\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":7,\"sort_order\":140},\"📫\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":8,\"sort_order\":139},\"📬\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":9,\"sort_order\":141},\"📭\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":10,\"sort_order\":142},\"📮\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":11,\"sort_order\":143},\"📯\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":12,\"sort_order\":50},\"📰\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":13,\"sort_order\":116},\"📱\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":14,\"sort_order\":69},\"📲\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":15,\"sort_order\":70},\"📳\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":16,\"sort_order\":95},\"📴\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":17,\"sort_order\":96},\"📵\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":18,\"sort_order\":23},\"📶\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":19,\"sort_order\":94},\"📷\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":20,\"sort_order\":93},\"📸\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":21,\"sort_order\":94},\"📹\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":22,\"sort_order\":95},\"📺\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":23,\"sort_order\":92},\"📻\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":24,\"sort_order\":61},\"📼\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":25,\"sort_order\":96},\"📽️\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":26,\"sort_order\":90},\"📿\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":27,\"sort_order\":40},\"🔀\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":28,\"sort_order\":73},\"🔁\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":29,\"sort_order\":74},\"🔂\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":30,\"sort_order\":75},\"🔃\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":31,\"sort_order\":41},\"🔄\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":32,\"sort_order\":42},\"🔅\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":33,\"sort_order\":92},\"🔆\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":34,\"sort_order\":93},\"🔇\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":35,\"sort_order\":44},\"🔈\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":36,\"sort_order\":45},\"🔉\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":37,\"sort_order\":46},\"🔊\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":38,\"sort_order\":47},\"🔋\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":39,\"sort_order\":75},\"🔌\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":40,\"sort_order\":76},\"🔍\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":41,\"sort_order\":97},\"🔎\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":42,\"sort_order\":98},\"🔏\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":43,\"sort_order\":177},\"🔐\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":44,\"sort_order\":178},\"🔑\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":45,\"sort_order\":179},\"🔒\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":46,\"sort_order\":175},\"🔓\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":47,\"sort_order\":176},\"🔔\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":48,\"sort_order\":51},\"🔕\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":49,\"sort_order\":52},\"🔖\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":50,\"sort_order\":119},\"🔗\":{\"category\":\"Objects\",\"sheet_x\":27,\"sheet_y\":51,\"sort_order\":197},\"🔘\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":52,\"sort_order\":215},\"🔙\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":53,\"sort_order\":43},\"🔚\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":54,\"sort_order\":44},\"🔛\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":55,\"sort_order\":45},\"🔜\":{\"category\":\"Symbols\",\"sheet_x\":27,\"sheet_y\":56,\"sort_order\":46},\"🔝\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":0,\"sort_order\":47},\"🔞\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":1,\"sort_order\":24},\"🔟\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":2,\"sort_order\":144},\"🔠\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":3,\"sort_order\":145},\"🔡\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":4,\"sort_order\":146},\"🔢\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":5,\"sort_order\":147},\"🔣\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":6,\"sort_order\":148},\"🔤\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":7,\"sort_order\":149},\"🔥\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":8,\"sort_order\":208},\"🔦\":{\"category\":\"Objects\",\"sheet_x\":28,\"sheet_y\":9,\"sort_order\":101},\"🔧\":{\"category\":\"Objects\",\"sheet_x\":28,\"sheet_y\":10,\"sort_order\":191},\"🔨\":{\"category\":\"Objects\",\"sheet_x\":28,\"sheet_y\":11,\"sort_order\":181},\"🔩\":{\"category\":\"Objects\",\"sheet_x\":28,\"sheet_y\":12,\"sort_order\":192},\"🔪\":{\"category\":\"Food & Drink\",\"sheet_x\":28,\"sheet_y\":13,\"sort_order\":120},\"🔫\":{\"category\":\"Objects\",\"sheet_x\":28,\"sheet_y\":14,\"sort_order\":188},\"🔬\":{\"category\":\"Objects\",\"sheet_x\":28,\"sheet_y\":15,\"sort_order\":205},\"🔭\":{\"category\":\"Objects\",\"sheet_x\":28,\"sheet_y\":16,\"sort_order\":206},\"🔮\":{\"category\":\"Activities\",\"sheet_x\":28,\"sheet_y\":17,\"sort_order\":59},\"🔯\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":18,\"sort_order\":59},\"🔰\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":19,\"sort_order\":105},\"🔱\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":20,\"sort_order\":103},\"🔲\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":21,\"sort_order\":217},\"🔳\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":22,\"sort_order\":216},\"🔴\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":23,\"sort_order\":184},\"🔵\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":24,\"sort_order\":188},\"🔶\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":25,\"sort_order\":208},\"🔷\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":26,\"sort_order\":209},\"🔸\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":27,\"sort_order\":210},\"🔹\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":28,\"sort_order\":211},\"🔺\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":29,\"sort_order\":212},\"🔻\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":30,\"sort_order\":213},\"🔼\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":31,\"sort_order\":83},\"🔽\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":32,\"sort_order\":85},\"🕉️\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":33,\"sort_order\":50},\"🕊️\":{\"category\":\"Animals & Nature\",\"sheet_x\":28,\"sheet_y\":34,\"sort_order\":68},\"🕋\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":35,\"sort_order\":46},\"🕌\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":36,\"sort_order\":42},\"🕍\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":37,\"sort_order\":44},\"🕎\":{\"category\":\"Symbols\",\"sheet_x\":28,\"sheet_y\":38,\"sort_order\":58},\"🕐\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":39,\"sort_order\":142},\"🕑\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":40,\"sort_order\":144},\"🕒\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":41,\"sort_order\":146},\"🕓\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":42,\"sort_order\":148},\"🕔\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":43,\"sort_order\":150},\"🕕\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":44,\"sort_order\":152},\"🕖\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":45,\"sort_order\":154},\"🕗\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":46,\"sort_order\":156},\"🕘\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":47,\"sort_order\":158},\"🕙\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":48,\"sort_order\":160},\"🕚\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":49,\"sort_order\":162},\"🕛\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":50,\"sort_order\":140},\"🕜\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":51,\"sort_order\":143},\"🕝\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":52,\"sort_order\":145},\"🕞\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":53,\"sort_order\":147},\"🕟\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":54,\"sort_order\":149},\"🕠\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":55,\"sort_order\":151},\"🕡\":{\"category\":\"Travel & Places\",\"sheet_x\":28,\"sheet_y\":56,\"sort_order\":153},\"🕢\":{\"category\":\"Travel & Places\",\"sheet_x\":29,\"sheet_y\":0,\"sort_order\":155},\"🕣\":{\"category\":\"Travel & Places\",\"sheet_x\":29,\"sheet_y\":1,\"sort_order\":157},\"🕤\":{\"category\":\"Travel & Places\",\"sheet_x\":29,\"sheet_y\":2,\"sort_order\":159},\"🕥\":{\"category\":\"Travel & Places\",\"sheet_x\":29,\"sheet_y\":3,\"sort_order\":161},\"🕦\":{\"category\":\"Travel & Places\",\"sheet_x\":29,\"sheet_y\":4,\"sort_order\":163},\"🕧\":{\"category\":\"Travel & Places\",\"sheet_x\":29,\"sheet_y\":5,\"sort_order\":141},\"🕯️\":{\"category\":\"Objects\",\"sheet_x\":29,\"sheet_y\":6,\"sort_order\":99},\"🕰️\":{\"category\":\"Travel & Places\",\"sheet_x\":29,\"sheet_y\":7,\"sort_order\":139},\"🕳️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":29,\"sheet_y\":8,\"sort_order\":142},\"🕴️\":{\"category\":\"People & Body\",\"sheet_x\":29,\"sheet_y\":9,\"sort_order\":235},\"🕵️‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":29,\"sheet_y\":15,\"sort_order\":158},\"🕵️‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":29,\"sheet_y\":21,\"sort_order\":157},\"🕵️\":{\"category\":\"People & Body\",\"sheet_x\":29,\"sheet_y\":27,\"sort_order\":156},\"🕶️\":{\"category\":\"Objects\",\"sheet_x\":29,\"sheet_y\":33,\"sort_order\":2},\"🕷️\":{\"category\":\"Animals & Nature\",\"sheet_x\":29,\"sheet_y\":34,\"sort_order\":101},\"🕸️\":{\"category\":\"Animals & Nature\",\"sheet_x\":29,\"sheet_y\":35,\"sort_order\":102},\"🕹️\":{\"category\":\"Activities\",\"sheet_x\":29,\"sheet_y\":36,\"sort_order\":62},\"🕺\":{\"category\":\"People & Body\",\"sheet_x\":29,\"sheet_y\":37,\"sort_order\":234},\"🖇️\":{\"category\":\"Objects\",\"sheet_x\":29,\"sheet_y\":43,\"sort_order\":168},\"🖊️\":{\"category\":\"Objects\",\"sheet_x\":29,\"sheet_y\":44,\"sort_order\":148},\"🖋️\":{\"category\":\"Objects\",\"sheet_x\":29,\"sheet_y\":45,\"sort_order\":147},\"🖌️\":{\"category\":\"Objects\",\"sheet_x\":29,\"sheet_y\":46,\"sort_order\":149},\"🖍️\":{\"category\":\"Objects\",\"sheet_x\":29,\"sheet_y\":47,\"sort_order\":150},\"🖐️\":{\"category\":\"People & Body\",\"sheet_x\":29,\"sheet_y\":48,\"sort_order\":3},\"🖕\":{\"category\":\"People & Body\",\"sheet_x\":29,\"sheet_y\":54,\"sort_order\":16},\"🖖\":{\"category\":\"People & Body\",\"sheet_x\":30,\"sheet_y\":3,\"sort_order\":5},\"🖤\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":9,\"sort_order\":134},\"🖥️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":10,\"sort_order\":78},\"🖨️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":11,\"sort_order\":79},\"🖱️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":12,\"sort_order\":81},\"🖲️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":13,\"sort_order\":82},\"🖼️\":{\"category\":\"Activities\",\"sheet_x\":30,\"sheet_y\":14,\"sort_order\":76},\"🗂️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":15,\"sort_order\":155},\"🗃️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":16,\"sort_order\":172},\"🗄️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":17,\"sort_order\":173},\"🗑️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":18,\"sort_order\":174},\"🗒️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":19,\"sort_order\":158},\"🗓️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":20,\"sort_order\":159},\"🗜️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":21,\"sort_order\":194},\"🗝️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":22,\"sort_order\":180},\"🗞️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":23,\"sort_order\":117},\"🗡️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":24,\"sort_order\":186},\"🗣️\":{\"category\":\"People & Body\",\"sheet_x\":30,\"sheet_y\":25,\"sort_order\":331},\"🗨️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":26,\"sort_order\":146},\"🗯️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":27,\"sort_order\":147},\"🗳️\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":28,\"sort_order\":144},\"🗺️\":{\"category\":\"Travel & Places\",\"sheet_x\":30,\"sheet_y\":29,\"sort_order\":5},\"🗻\":{\"category\":\"Travel & Places\",\"sheet_x\":30,\"sheet_y\":30,\"sort_order\":11},\"🗼\":{\"category\":\"Travel & Places\",\"sheet_x\":30,\"sheet_y\":31,\"sort_order\":39},\"🗽\":{\"category\":\"Travel & Places\",\"sheet_x\":30,\"sheet_y\":32,\"sort_order\":40},\"🗾\":{\"category\":\"Travel & Places\",\"sheet_x\":30,\"sheet_y\":33,\"sort_order\":6},\"🗿\":{\"category\":\"Objects\",\"sheet_x\":30,\"sheet_y\":34,\"sort_order\":233},\"😀\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":35,\"sort_order\":1},\"😁\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":36,\"sort_order\":4},\"😂\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":37,\"sort_order\":8},\"😃\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":38,\"sort_order\":2},\"😄\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":39,\"sort_order\":3},\"😅\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":40,\"sort_order\":6},\"😆\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":41,\"sort_order\":5},\"😇\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":42,\"sort_order\":13},\"😈\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":43,\"sort_order\":91},\"😉\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":44,\"sort_order\":11},\"😊\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":45,\"sort_order\":12},\"😋\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":46,\"sort_order\":22},\"😌\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":47,\"sort_order\":42},\"😍\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":48,\"sort_order\":15},\"😎\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":49,\"sort_order\":60},\"😏\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":50,\"sort_order\":37},\"😐\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":51,\"sort_order\":34},\"😑\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":52,\"sort_order\":35},\"😒\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":53,\"sort_order\":38},\"😓\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":54,\"sort_order\":83},\"😔\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":55,\"sort_order\":43},\"😕\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":30,\"sheet_y\":56,\"sort_order\":63},\"😖\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":0,\"sort_order\":80},\"😗\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":1,\"sort_order\":18},\"😘\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":2,\"sort_order\":17},\"😙\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":3,\"sort_order\":21},\"😚\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":4,\"sort_order\":20},\"😛\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":5,\"sort_order\":23},\"😜\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":6,\"sort_order\":24},\"😝\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":7,\"sort_order\":26},\"😞\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":8,\"sort_order\":82},\"😟\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":9,\"sort_order\":64},\"😠\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":10,\"sort_order\":89},\"😡\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":11,\"sort_order\":88},\"😢\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":12,\"sort_order\":77},\"😣\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":13,\"sort_order\":81},\"😤\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":14,\"sort_order\":87},\"😥\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":15,\"sort_order\":76},\"😦\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":16,\"sort_order\":72},\"😧\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":17,\"sort_order\":73},\"😨\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":18,\"sort_order\":74},\"😩\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":19,\"sort_order\":84},\"😪\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":20,\"sort_order\":44},\"😫\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":21,\"sort_order\":85},\"😬\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":22,\"sort_order\":40},\"😭\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":23,\"sort_order\":78},\"😮\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":24,\"sort_order\":67},\"😯\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":25,\"sort_order\":68},\"😰\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":26,\"sort_order\":75},\"😱\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":27,\"sort_order\":79},\"😲\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":28,\"sort_order\":69},\"😳\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":29,\"sort_order\":70},\"😴\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":30,\"sort_order\":46},\"😵\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":31,\"sort_order\":56},\"😶\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":32,\"sort_order\":36},\"😷\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":33,\"sort_order\":47},\"😸\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":34,\"sort_order\":104},\"😹\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":35,\"sort_order\":105},\"😺\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":36,\"sort_order\":103},\"😻\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":37,\"sort_order\":106},\"😼\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":38,\"sort_order\":107},\"😽\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":39,\"sort_order\":108},\"😾\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":40,\"sort_order\":111},\"😿\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":41,\"sort_order\":110},\"🙀\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":42,\"sort_order\":109},\"🙁\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":43,\"sort_order\":65},\"🙂\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":44,\"sort_order\":9},\"🙃\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":45,\"sort_order\":10},\"🙄\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":31,\"sheet_y\":46,\"sort_order\":39},\"🙅‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":31,\"sheet_y\":47,\"sort_order\":83},\"🙅‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":31,\"sheet_y\":53,\"sort_order\":82},\"🙅\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":2,\"sort_order\":81},\"🙆‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":8,\"sort_order\":86},\"🙆‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":14,\"sort_order\":85},\"🙆\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":20,\"sort_order\":84},\"🙇‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":26,\"sort_order\":98},\"🙇‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":32,\"sort_order\":97},\"🙇\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":38,\"sort_order\":96},\"🙈\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":32,\"sheet_y\":44,\"sort_order\":112},\"🙉\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":32,\"sheet_y\":45,\"sort_order\":113},\"🙊\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":32,\"sheet_y\":46,\"sort_order\":114},\"🙋‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":47,\"sort_order\":92},\"🙋‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":32,\"sheet_y\":53,\"sort_order\":91},\"🙋\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":2,\"sort_order\":90},\"🙌\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":8,\"sort_order\":26},\"🙍‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":14,\"sort_order\":77},\"🙍‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":20,\"sort_order\":76},\"🙍\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":26,\"sort_order\":75},\"🙎‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":32,\"sort_order\":80},\"🙎‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":38,\"sort_order\":79},\"🙎\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":44,\"sort_order\":78},\"🙏\":{\"category\":\"People & Body\",\"sheet_x\":33,\"sheet_y\":50,\"sort_order\":30},\"🚀\":{\"category\":\"Travel & Places\",\"sheet_x\":33,\"sheet_y\":56,\"sort_order\":129},\"🚁\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":0,\"sort_order\":124},\"🚂\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":1,\"sort_order\":63},\"🚃\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":2,\"sort_order\":64},\"🚄\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":3,\"sort_order\":65},\"🚅\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":4,\"sort_order\":66},\"🚆\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":5,\"sort_order\":67},\"🚇\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":6,\"sort_order\":68},\"🚈\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":7,\"sort_order\":69},\"🚉\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":8,\"sort_order\":70},\"🚊\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":9,\"sort_order\":71},\"🚋\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":10,\"sort_order\":74},\"🚌\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":11,\"sort_order\":75},\"🚍\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":12,\"sort_order\":76},\"🚎\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":13,\"sort_order\":77},\"🚏\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":14,\"sort_order\":100},\"🚐\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":15,\"sort_order\":78},\"🚑\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":16,\"sort_order\":79},\"🚒\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":17,\"sort_order\":80},\"🚓\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":18,\"sort_order\":81},\"🚔\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":19,\"sort_order\":82},\"🚕\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":20,\"sort_order\":83},\"🚖\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":21,\"sort_order\":84},\"🚗\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":22,\"sort_order\":85},\"🚘\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":23,\"sort_order\":86},\"🚙\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":24,\"sort_order\":87},\"🚚\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":25,\"sort_order\":88},\"🚛\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":26,\"sort_order\":89},\"🚜\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":27,\"sort_order\":90},\"🚝\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":28,\"sort_order\":72},\"🚞\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":29,\"sort_order\":73},\"🚟\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":30,\"sort_order\":125},\"🚠\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":31,\"sort_order\":126},\"🚡\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":32,\"sort_order\":127},\"🚢\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":33,\"sort_order\":117},\"🚣‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":34,\"sheet_y\":34,\"sort_order\":257},\"🚣‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":34,\"sheet_y\":40,\"sort_order\":256},\"🚣\":{\"category\":\"People & Body\",\"sheet_x\":34,\"sheet_y\":46,\"sort_order\":255},\"🚤\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":52,\"sort_order\":113},\"🚥\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":53,\"sort_order\":106},\"🚦\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":54,\"sort_order\":107},\"🚧\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":55,\"sort_order\":109},\"🚨\":{\"category\":\"Travel & Places\",\"sheet_x\":34,\"sheet_y\":56,\"sort_order\":105},\"🚩\":{\"category\":\"Flags\",\"sheet_x\":35,\"sheet_y\":0,\"sort_order\":2},\"🚪\":{\"category\":\"Objects\",\"sheet_x\":35,\"sheet_y\":1,\"sort_order\":213},\"🚫\":{\"category\":\"Symbols\",\"sheet_x\":35,\"sheet_y\":2,\"sort_order\":17},\"🚬\":{\"category\":\"Objects\",\"sheet_x\":35,\"sheet_y\":3,\"sort_order\":230},\"🚭\":{\"category\":\"Symbols\",\"sheet_x\":35,\"sheet_y\":4,\"sort_order\":19},\"🚮\":{\"category\":\"Symbols\",\"sheet_x\":35,\"sheet_y\":5,\"sort_order\":2},\"🚯\":{\"category\":\"Symbols\",\"sheet_x\":35,\"sheet_y\":6,\"sort_order\":20},\"🚰\":{\"category\":\"Symbols\",\"sheet_x\":35,\"sheet_y\":7,\"sort_order\":3},\"🚱\":{\"category\":\"Symbols\",\"sheet_x\":35,\"sheet_y\":8,\"sort_order\":21},\"🚲\":{\"category\":\"Travel & Places\",\"sheet_x\":35,\"sheet_y\":9,\"sort_order\":97},\"🚳\":{\"category\":\"Symbols\",\"sheet_x\":35,\"sheet_y\":10,\"sort_order\":18},\"🚴‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":35,\"sheet_y\":11,\"sort_order\":269},\"🚴‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":35,\"sheet_y\":17,\"sort_order\":268},\"🚴\":{\"category\":\"People & Body\",\"sheet_x\":35,\"sheet_y\":23,\"sort_order\":267},\"🚵‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":35,\"sheet_y\":29,\"sort_order\":272},\"🚵‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":35,\"sheet_y\":35,\"sort_order\":271},\"🚵\":{\"category\":\"People & Body\",\"sheet_x\":35,\"sheet_y\":41,\"sort_order\":270},\"🚶‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":35,\"sheet_y\":47,\"sort_order\":214},\"🚶‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":35,\"sheet_y\":53,\"sort_order\":213},\"🚶\":{\"category\":\"People & Body\",\"sheet_x\":36,\"sheet_y\":2,\"sort_order\":212},\"🚷\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":8,\"sort_order\":22},\"🚸\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":9,\"sort_order\":15},\"🚹\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":10,\"sort_order\":5},\"🚺\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":11,\"sort_order\":6},\"🚻\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":12,\"sort_order\":7},\"🚼\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":13,\"sort_order\":8},\"🚽\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":14,\"sort_order\":217},\"🚾\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":15,\"sort_order\":9},\"🚿\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":16,\"sort_order\":218},\"🛀\":{\"category\":\"People & Body\",\"sheet_x\":36,\"sheet_y\":17,\"sort_order\":291},\"🛁\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":23,\"sort_order\":219},\"🛂\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":24,\"sort_order\":10},\"🛃\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":25,\"sort_order\":11},\"🛄\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":26,\"sort_order\":12},\"🛅\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":27,\"sort_order\":13},\"🛋️\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":28,\"sort_order\":215},\"🛌\":{\"category\":\"People & Body\",\"sheet_x\":36,\"sheet_y\":29,\"sort_order\":292},\"🛍️\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":35,\"sort_order\":24},\"🛎️\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":36,\"sort_order\":131},\"🛏️\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":37,\"sort_order\":214},\"🛐\":{\"category\":\"Symbols\",\"sheet_x\":36,\"sheet_y\":38,\"sort_order\":48},\"🛑\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":39,\"sort_order\":108},\"🛒\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":40,\"sort_order\":229},\"🛕\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":41,\"sort_order\":43},\"🛠️\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":42,\"sort_order\":185},\"🛡️\":{\"category\":\"Objects\",\"sheet_x\":36,\"sheet_y\":43,\"sort_order\":190},\"🛢️\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":44,\"sort_order\":103},\"🛣️\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":45,\"sort_order\":101},\"🛤️\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":46,\"sort_order\":102},\"🛥️\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":47,\"sort_order\":116},\"🛩️\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":48,\"sort_order\":119},\"🛫\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":49,\"sort_order\":120},\"🛬\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":50,\"sort_order\":121},\"🛰️\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":51,\"sort_order\":128},\"🛳️\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":52,\"sort_order\":114},\"🛴\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":53,\"sort_order\":98},\"🛵\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":54,\"sort_order\":93},\"🛶\":{\"category\":\"Travel & Places\",\"sheet_x\":36,\"sheet_y\":55,\"sort_order\":112},\"🛷\":{\"category\":\"Activities\",\"sheet_x\":36,\"sheet_y\":56,\"sort_order\":53},\"🛸\":{\"category\":\"Travel & Places\",\"sheet_x\":37,\"sheet_y\":0,\"sort_order\":130},\"🛹\":{\"category\":\"Travel & Places\",\"sheet_x\":37,\"sheet_y\":1,\"sort_order\":99},\"🛺\":{\"category\":\"Travel & Places\",\"sheet_x\":37,\"sheet_y\":2,\"sort_order\":96},\"🟠\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":3,\"sort_order\":185},\"🟡\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":4,\"sort_order\":186},\"🟢\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":5,\"sort_order\":187},\"🟣\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":6,\"sort_order\":189},\"🟤\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":7,\"sort_order\":190},\"🟥\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":8,\"sort_order\":193},\"🟦\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":9,\"sort_order\":197},\"🟧\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":10,\"sort_order\":194},\"🟨\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":11,\"sort_order\":195},\"🟩\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":12,\"sort_order\":196},\"🟪\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":13,\"sort_order\":198},\"🟫\":{\"category\":\"Symbols\",\"sheet_x\":37,\"sheet_y\":14,\"sort_order\":199},\"🤍\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":15,\"sort_order\":135},\"🤎\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":16,\"sort_order\":133},\"🤏\":{\"category\":\"People & Body\",\"sheet_x\":37,\"sheet_y\":17,\"sort_order\":7},\"🤐\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":23,\"sort_order\":32},\"🤑\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":24,\"sort_order\":27},\"🤒\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":25,\"sort_order\":48},\"🤓\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":26,\"sort_order\":61},\"🤔\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":27,\"sort_order\":31},\"🤕\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":28,\"sort_order\":49},\"🤖\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":29,\"sort_order\":102},\"🤗\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":37,\"sheet_y\":30,\"sort_order\":28},\"🤘\":{\"category\":\"People & Body\",\"sheet_x\":37,\"sheet_y\":31,\"sort_order\":11},\"🤙\":{\"category\":\"People & Body\",\"sheet_x\":37,\"sheet_y\":37,\"sort_order\":12},\"🤚\":{\"category\":\"People & Body\",\"sheet_x\":37,\"sheet_y\":43,\"sort_order\":2},\"🤛\":{\"category\":\"People & Body\",\"sheet_x\":37,\"sheet_y\":49,\"sort_order\":23},\"🤜\":{\"category\":\"People & Body\",\"sheet_x\":37,\"sheet_y\":55,\"sort_order\":24},\"🤝\":{\"category\":\"People & Body\",\"sheet_x\":38,\"sheet_y\":4,\"sort_order\":29},\"🤞\":{\"category\":\"People & Body\",\"sheet_x\":38,\"sheet_y\":5,\"sort_order\":9},\"🤟\":{\"category\":\"People & Body\",\"sheet_x\":38,\"sheet_y\":11,\"sort_order\":10},\"🤠\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":17,\"sort_order\":58},\"🤡\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":18,\"sort_order\":96},\"🤢\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":19,\"sort_order\":50},\"🤣\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":20,\"sort_order\":7},\"🤤\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":21,\"sort_order\":45},\"🤥\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":22,\"sort_order\":41},\"🤦‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":38,\"sheet_y\":23,\"sort_order\":101},\"🤦‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":38,\"sheet_y\":29,\"sort_order\":100},\"🤦\":{\"category\":\"People & Body\",\"sheet_x\":38,\"sheet_y\":35,\"sort_order\":99},\"🤧\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":41,\"sort_order\":52},\"🤨\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":42,\"sort_order\":33},\"🤩\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":43,\"sort_order\":16},\"🤪\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":44,\"sort_order\":25},\"🤫\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":45,\"sort_order\":30},\"🤬\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":46,\"sort_order\":90},\"🤭\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":47,\"sort_order\":29},\"🤮\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":48,\"sort_order\":51},\"🤯\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":38,\"sheet_y\":49,\"sort_order\":57},\"🤰\":{\"category\":\"People & Body\",\"sheet_x\":38,\"sheet_y\":50,\"sort_order\":174},\"🤱\":{\"category\":\"People & Body\",\"sheet_x\":38,\"sheet_y\":56,\"sort_order\":175},\"🤲\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":5,\"sort_order\":28},\"🤳\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":11,\"sort_order\":33},\"🤴\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":17,\"sort_order\":165},\"🤵\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":23,\"sort_order\":172},\"🤶\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":29,\"sort_order\":178},\"🤷‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":35,\"sort_order\":104},\"🤷‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":41,\"sort_order\":103},\"🤷\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":47,\"sort_order\":102},\"🤸‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":39,\"sheet_y\":53,\"sort_order\":275},\"🤸‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":2,\"sort_order\":274},\"🤸\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":8,\"sort_order\":273},\"🤹‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":14,\"sort_order\":287},\"🤹‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":20,\"sort_order\":286},\"🤹\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":26,\"sort_order\":285},\"🤺\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":32,\"sort_order\":245},\"🤼‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":33,\"sort_order\":278},\"🤼‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":34,\"sort_order\":277},\"🤼\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":35,\"sort_order\":276},\"🤽‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":36,\"sort_order\":281},\"🤽‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":42,\"sort_order\":280},\"🤽\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":48,\"sort_order\":279},\"🤾‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":40,\"sheet_y\":54,\"sort_order\":284},\"🤾‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":41,\"sheet_y\":3,\"sort_order\":283},\"🤾\":{\"category\":\"People & Body\",\"sheet_x\":41,\"sheet_y\":9,\"sort_order\":282},\"🤿\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":15,\"sort_order\":50},\"🥀\":{\"category\":\"Animals & Nature\",\"sheet_x\":41,\"sheet_y\":16,\"sort_order\":111},\"🥁\":{\"category\":\"Objects\",\"sheet_x\":41,\"sheet_y\":17,\"sort_order\":68},\"🥂\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":18,\"sort_order\":110},\"🥃\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":19,\"sort_order\":111},\"🥄\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":20,\"sort_order\":119},\"🥅\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":21,\"sort_order\":46},\"🥇\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":22,\"sort_order\":25},\"🥈\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":23,\"sort_order\":26},\"🥉\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":24,\"sort_order\":27},\"🥊\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":25,\"sort_order\":44},\"🥋\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":26,\"sort_order\":45},\"🥌\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":27,\"sort_order\":54},\"🥍\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":28,\"sort_order\":41},\"🥎\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":29,\"sort_order\":30},\"🥏\":{\"category\":\"Activities\",\"sheet_x\":41,\"sheet_y\":30,\"sort_order\":36},\"🥐\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":31,\"sort_order\":33},\"🥑\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":32,\"sort_order\":18},\"🥒\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":33,\"sort_order\":24},\"🥓\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":34,\"sort_order\":43},\"🥔\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":35,\"sort_order\":20},\"🥕\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":36,\"sort_order\":21},\"🥖\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":37,\"sort_order\":34},\"🥗\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":38,\"sort_order\":58},\"🥘\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":39,\"sort_order\":55},\"🥙\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":40,\"sort_order\":51},\"🥚\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":41,\"sort_order\":53},\"🥛\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":42,\"sort_order\":100},\"🥜\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":43,\"sort_order\":30},\"🥝\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":44,\"sort_order\":15},\"🥞\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":45,\"sort_order\":37},\"🥟\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":46,\"sort_order\":77},\"🥠\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":47,\"sort_order\":78},\"🥡\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":48,\"sort_order\":79},\"🥢\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":49,\"sort_order\":116},\"🥣\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":50,\"sort_order\":57},\"🥤\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":51,\"sort_order\":112},\"🥥\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":52,\"sort_order\":17},\"🥦\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":53,\"sort_order\":26},\"🥧\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":54,\"sort_order\":93},\"🥨\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":55,\"sort_order\":35},\"🥩\":{\"category\":\"Food & Drink\",\"sheet_x\":41,\"sheet_y\":56,\"sort_order\":42},\"🥪\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":0,\"sort_order\":48},\"🥫\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":1,\"sort_order\":62},\"🥬\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":2,\"sort_order\":25},\"🥭\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":3,\"sort_order\":8},\"🥮\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":4,\"sort_order\":75},\"🥯\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":5,\"sort_order\":36},\"🥰\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":42,\"sheet_y\":6,\"sort_order\":14},\"🥱\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":42,\"sheet_y\":7,\"sort_order\":86},\"🥳\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":42,\"sheet_y\":8,\"sort_order\":59},\"🥴\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":42,\"sheet_y\":9,\"sort_order\":55},\"🥵\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":42,\"sheet_y\":10,\"sort_order\":53},\"🥶\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":42,\"sheet_y\":11,\"sort_order\":54},\"🥺\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":42,\"sheet_y\":12,\"sort_order\":71},\"🥻\":{\"category\":\"Objects\",\"sheet_x\":42,\"sheet_y\":13,\"sort_order\":15},\"🥼\":{\"category\":\"Objects\",\"sheet_x\":42,\"sheet_y\":14,\"sort_order\":4},\"🥽\":{\"category\":\"Objects\",\"sheet_x\":42,\"sheet_y\":15,\"sort_order\":3},\"🥾\":{\"category\":\"Objects\",\"sheet_x\":42,\"sheet_y\":16,\"sort_order\":28},\"🥿\":{\"category\":\"Objects\",\"sheet_x\":42,\"sheet_y\":17,\"sort_order\":29},\"🦀\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":18,\"sort_order\":80},\"🦁\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":19,\"sort_order\":15},\"🦂\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":20,\"sort_order\":103},\"🦃\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":21,\"sort_order\":60},\"🦄\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":22,\"sort_order\":21},\"🦅\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":23,\"sort_order\":69},\"🦆\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":24,\"sort_order\":70},\"🦇\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":25,\"sort_order\":50},\"🦈\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":26,\"sort_order\":91},\"🦉\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":27,\"sort_order\":72},\"🦊\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":28,\"sort_order\":11},\"🦋\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":29,\"sort_order\":95},\"🦌\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":30,\"sort_order\":23},\"🦍\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":31,\"sort_order\":3},\"🦎\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":32,\"sort_order\":79},\"🦏\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":33,\"sort_order\":40},\"🦐\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":34,\"sort_order\":82},\"🦑\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":35,\"sort_order\":83},\"🦒\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":36,\"sort_order\":38},\"🦓\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":37,\"sort_order\":22},\"🦔\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":38,\"sort_order\":49},\"🦕\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":39,\"sort_order\":83},\"🦖\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":40,\"sort_order\":84},\"🦗\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":41,\"sort_order\":100},\"🦘\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":42,\"sort_order\":57},\"🦙\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":43,\"sort_order\":37},\"🦚\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":44,\"sort_order\":74},\"🦛\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":45,\"sort_order\":41},\"🦜\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":46,\"sort_order\":75},\"🦝\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":47,\"sort_order\":12},\"🦞\":{\"category\":\"Food & Drink\",\"sheet_x\":42,\"sheet_y\":48,\"sort_order\":81},\"🦟\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":49,\"sort_order\":104},\"🦠\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":50,\"sort_order\":105},\"🦡\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":51,\"sort_order\":58},\"🦢\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":52,\"sort_order\":71},\"🦥\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":53,\"sort_order\":54},\"🦦\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":54,\"sort_order\":55},\"🦧\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":55,\"sort_order\":4},\"🦨\":{\"category\":\"Animals & Nature\",\"sheet_x\":42,\"sheet_y\":56,\"sort_order\":56},\"🦩\":{\"category\":\"Animals & Nature\",\"sheet_x\":43,\"sheet_y\":0,\"sort_order\":73},\"🦪\":{\"category\":\"Food & Drink\",\"sheet_x\":43,\"sheet_y\":1,\"sort_order\":84},\"🦮\":{\"category\":\"Animals & Nature\",\"sheet_x\":43,\"sheet_y\":2,\"sort_order\":7},\"🦯\":{\"category\":\"Objects\",\"sheet_x\":43,\"sheet_y\":3,\"sort_order\":196},\"🦴\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":4,\"sort_order\":44},\"🦵\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":5,\"sort_order\":37},\"🦶\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":11,\"sort_order\":38},\"🦷\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":17,\"sort_order\":43},\"🦸‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":18,\"sort_order\":181},\"🦸‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":24,\"sort_order\":180},\"🦸\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":30,\"sort_order\":179},\"🦹‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":36,\"sort_order\":184},\"🦹‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":42,\"sort_order\":183},\"🦹\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":48,\"sort_order\":182},\"🦺\":{\"category\":\"Objects\",\"sheet_x\":43,\"sheet_y\":54,\"sort_order\":5},\"🦻\":{\"category\":\"People & Body\",\"sheet_x\":43,\"sheet_y\":55,\"sort_order\":40},\"🦼\":{\"category\":\"Travel & Places\",\"sheet_x\":44,\"sheet_y\":4,\"sort_order\":95},\"🦽\":{\"category\":\"Travel & Places\",\"sheet_x\":44,\"sheet_y\":5,\"sort_order\":94},\"🦾\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":6,\"sort_order\":35},\"🦿\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":7,\"sort_order\":36},\"🧀\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":8,\"sort_order\":39},\"🧁\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":9,\"sort_order\":92},\"🧂\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":10,\"sort_order\":61},\"🧃\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":11,\"sort_order\":113},\"🧄\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":12,\"sort_order\":27},\"🧅\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":13,\"sort_order\":28},\"🧆\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":14,\"sort_order\":52},\"🧇\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":15,\"sort_order\":38},\"🧈\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":16,\"sort_order\":60},\"🧉\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":17,\"sort_order\":114},\"🧊\":{\"category\":\"Food & Drink\",\"sheet_x\":44,\"sheet_y\":18,\"sort_order\":115},\"🧍‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":19,\"sort_order\":217},\"🧍‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":25,\"sort_order\":216},\"🧍\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":31,\"sort_order\":215},\"🧎‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":37,\"sort_order\":220},\"🧎‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":43,\"sort_order\":219},\"🧎\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":49,\"sort_order\":218},\"🧏‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":44,\"sheet_y\":55,\"sort_order\":95},\"🧏‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":4,\"sort_order\":94},\"🧏\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":10,\"sort_order\":93},\"🧐\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":45,\"sheet_y\":16,\"sort_order\":62},\"🧑‍🌾\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":17,\"sort_order\":117},\"🧑‍🍳\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":23,\"sort_order\":120},\"🧑‍🎓\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":29,\"sort_order\":108},\"🧑‍🎤\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":35,\"sort_order\":138},\"🧑‍🎨\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":41,\"sort_order\":141},\"🧑‍🏫\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":47,\"sort_order\":111},\"🧑‍🏭\":{\"category\":\"People & Body\",\"sheet_x\":45,\"sheet_y\":53,\"sort_order\":126},\"🧑‍💻\":{\"category\":\"People & Body\",\"sheet_x\":46,\"sheet_y\":2,\"sort_order\":135},\"🧑‍💼\":{\"category\":\"People & Body\",\"sheet_x\":46,\"sheet_y\":8,\"sort_order\":129},\"🧑‍🔧\":{\"category\":\"People & Body\",\"sheet_x\":46,\"sheet_y\":14,\"sort_order\":123},\"🧑‍🔬\":{\"category\":\"People & Body\",\"sheet_x\":46,\"sheet_y\":20,\"sort_order\":132},\"🧑‍🚀\":{\"category\":\"People & Body\",\"sheet_x\":46,\"sheet_y\":26,\"sort_order\":147},\"🧑‍🚒\":{\"category\":\"People & Body\",\"sheet_x\":46,\"sheet_y\":32,\"sort_order\":150},\"🧑‍🤝‍🧑\":{\"category\":\"People & Body\",\"sheet_x\":46,\"sheet_y\":38,\"sort_order\":293},\"🧑‍🦯\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":7,\"sort_order\":221},\"🧑‍🦰\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":13,\"sort_order\":63},\"🧑‍🦱\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":19,\"sort_order\":65},\"🧑‍🦲\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":25,\"sort_order\":69},\"🧑‍🦳\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":31,\"sort_order\":67},\"🧑‍🦼\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":37,\"sort_order\":224},\"🧑‍🦽\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":43,\"sort_order\":227},\"🧑‍⚕️\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":49,\"sort_order\":105},\"🧑‍⚖️\":{\"category\":\"People & Body\",\"sheet_x\":47,\"sheet_y\":55,\"sort_order\":114},\"🧑‍✈️\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":4,\"sort_order\":144},\"🧑\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":10,\"sort_order\":53},\"🧒\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":16,\"sort_order\":50},\"🧓\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":22,\"sort_order\":72},\"🧔\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":28,\"sort_order\":56},\"🧕\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":34,\"sort_order\":171},\"🧖‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":40,\"sort_order\":241},\"🧖‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":46,\"sort_order\":240},\"🧖\":{\"category\":\"People & Body\",\"sheet_x\":48,\"sheet_y\":52,\"sort_order\":239},\"🧗‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":1,\"sort_order\":244},\"🧗‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":7,\"sort_order\":243},\"🧗\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":13,\"sort_order\":242},\"🧘‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":19,\"sort_order\":290},\"🧘‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":25,\"sort_order\":289},\"🧘\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":31,\"sort_order\":288},\"🧙‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":37,\"sort_order\":187},\"🧙‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":43,\"sort_order\":186},\"🧙\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":49,\"sort_order\":185},\"🧚‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":49,\"sheet_y\":55,\"sort_order\":190},\"🧚‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":4,\"sort_order\":189},\"🧚\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":10,\"sort_order\":188},\"🧛‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":16,\"sort_order\":193},\"🧛‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":22,\"sort_order\":192},\"🧛\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":28,\"sort_order\":191},\"🧜‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":34,\"sort_order\":196},\"🧜‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":40,\"sort_order\":195},\"🧜\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":46,\"sort_order\":194},\"🧝‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":50,\"sheet_y\":52,\"sort_order\":199},\"🧝‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":1,\"sort_order\":198},\"🧝\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":7,\"sort_order\":197},\"🧞‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":13,\"sort_order\":202},\"🧞‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":14,\"sort_order\":201},\"🧞\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":15,\"sort_order\":200},\"🧟‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":16,\"sort_order\":205},\"🧟‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":17,\"sort_order\":204},\"🧟\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":18,\"sort_order\":203},\"🧠\":{\"category\":\"People & Body\",\"sheet_x\":51,\"sheet_y\":19,\"sort_order\":42},\"🧡\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":51,\"sheet_y\":20,\"sort_order\":128},\"🧢\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":21,\"sort_order\":38},\"🧣\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":22,\"sort_order\":9},\"🧤\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":23,\"sort_order\":10},\"🧥\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":24,\"sort_order\":11},\"🧦\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":25,\"sort_order\":12},\"🧧\":{\"category\":\"Activities\",\"sheet_x\":51,\"sheet_y\":26,\"sort_order\":16},\"🧨\":{\"category\":\"Activities\",\"sheet_x\":51,\"sheet_y\":27,\"sort_order\":5},\"🧩\":{\"category\":\"Activities\",\"sheet_x\":51,\"sheet_y\":28,\"sort_order\":65},\"🧪\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":29,\"sort_order\":202},\"🧫\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":30,\"sort_order\":203},\"🧬\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":31,\"sort_order\":204},\"🧭\":{\"category\":\"Travel & Places\",\"sheet_x\":51,\"sheet_y\":32,\"sort_order\":7},\"🧮\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":33,\"sort_order\":87},\"🧯\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":34,\"sort_order\":228},\"🧰\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":35,\"sort_order\":199},\"🧱\":{\"category\":\"Travel & Places\",\"sheet_x\":51,\"sheet_y\":36,\"sort_order\":20},\"🧲\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":37,\"sort_order\":200},\"🧳\":{\"category\":\"Travel & Places\",\"sheet_x\":51,\"sheet_y\":38,\"sort_order\":132},\"🧴\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":39,\"sort_order\":221},\"🧵\":{\"category\":\"Activities\",\"sheet_x\":51,\"sheet_y\":40,\"sort_order\":78},\"🧶\":{\"category\":\"Activities\",\"sheet_x\":51,\"sheet_y\":41,\"sort_order\":79},\"🧷\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":42,\"sort_order\":222},\"🧸\":{\"category\":\"Activities\",\"sheet_x\":51,\"sheet_y\":43,\"sort_order\":66},\"🧹\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":44,\"sort_order\":223},\"🧺\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":45,\"sort_order\":224},\"🧻\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":46,\"sort_order\":225},\"🧼\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":47,\"sort_order\":226},\"🧽\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":48,\"sort_order\":227},\"🧾\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":49,\"sort_order\":128},\"🧿\":{\"category\":\"Activities\",\"sheet_x\":51,\"sheet_y\":50,\"sort_order\":60},\"🩰\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":51,\"sort_order\":32},\"🩱\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":52,\"sort_order\":16},\"🩲\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":53,\"sort_order\":17},\"🩳\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":54,\"sort_order\":18},\"🩸\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":55,\"sort_order\":209},\"🩹\":{\"category\":\"Objects\",\"sheet_x\":51,\"sheet_y\":56,\"sort_order\":211},\"🩺\":{\"category\":\"Objects\",\"sheet_x\":52,\"sheet_y\":0,\"sort_order\":212},\"🪀\":{\"category\":\"Activities\",\"sheet_x\":52,\"sheet_y\":1,\"sort_order\":56},\"🪁\":{\"category\":\"Activities\",\"sheet_x\":52,\"sheet_y\":2,\"sort_order\":57},\"🪂\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":3,\"sort_order\":122},\"🪐\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":4,\"sort_order\":180},\"🪑\":{\"category\":\"Objects\",\"sheet_x\":52,\"sheet_y\":5,\"sort_order\":216},\"🪒\":{\"category\":\"Objects\",\"sheet_x\":52,\"sheet_y\":6,\"sort_order\":220},\"🪓\":{\"category\":\"Objects\",\"sheet_x\":52,\"sheet_y\":7,\"sort_order\":182},\"🪔\":{\"category\":\"Objects\",\"sheet_x\":52,\"sheet_y\":8,\"sort_order\":103},\"🪕\":{\"category\":\"Objects\",\"sheet_x\":52,\"sheet_y\":9,\"sort_order\":67},\"‼️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":10,\"sort_order\":122},\"⁉️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":11,\"sort_order\":123},\"™️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":12,\"sort_order\":131},\"ℹ️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":13,\"sort_order\":156},\"↔️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":14,\"sort_order\":36},\"↕️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":15,\"sort_order\":35},\"↖️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":16,\"sort_order\":34},\"↗️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":17,\"sort_order\":28},\"↘️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":18,\"sort_order\":30},\"↙️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":19,\"sort_order\":32},\"↩️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":20,\"sort_order\":37},\"↪️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":21,\"sort_order\":38},\"⌚\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":22,\"sort_order\":135},\"⌛\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":23,\"sort_order\":133},\"⌨️\":{\"category\":\"Objects\",\"sheet_x\":52,\"sheet_y\":24,\"sort_order\":80},\"⏏️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":25,\"sort_order\":90},\"⏩\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":26,\"sort_order\":77},\"⏪\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":27,\"sort_order\":81},\"⏫\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":28,\"sort_order\":84},\"⏬\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":29,\"sort_order\":86},\"⏭️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":30,\"sort_order\":78},\"⏮️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":31,\"sort_order\":82},\"⏯️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":32,\"sort_order\":79},\"⏰\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":33,\"sort_order\":136},\"⏱️\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":34,\"sort_order\":137},\"⏲️\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":35,\"sort_order\":138},\"⏳\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":36,\"sort_order\":134},\"⏸️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":37,\"sort_order\":87},\"⏹️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":38,\"sort_order\":88},\"⏺️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":39,\"sort_order\":89},\"Ⓜ️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":40,\"sort_order\":158},\"▪️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":41,\"sort_order\":206},\"▫️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":42,\"sort_order\":207},\"▶️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":43,\"sort_order\":76},\"◀️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":44,\"sort_order\":80},\"◻️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":45,\"sort_order\":203},\"◼️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":46,\"sort_order\":202},\"◽\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":47,\"sort_order\":205},\"◾\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":48,\"sort_order\":204},\"☀️\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":49,\"sort_order\":177},\"☁️\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":50,\"sort_order\":185},\"☂️\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":51,\"sort_order\":200},\"☃️\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":52,\"sort_order\":205},\"☄️\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":53,\"sort_order\":207},\"☎️\":{\"category\":\"Objects\",\"sheet_x\":52,\"sheet_y\":54,\"sort_order\":71},\"☑️\":{\"category\":\"Symbols\",\"sheet_x\":52,\"sheet_y\":55,\"sort_order\":108},\"☔\":{\"category\":\"Travel & Places\",\"sheet_x\":52,\"sheet_y\":56,\"sort_order\":201},\"☕\":{\"category\":\"Food & Drink\",\"sheet_x\":53,\"sheet_y\":0,\"sort_order\":101},\"☘️\":{\"category\":\"Animals & Nature\",\"sheet_x\":53,\"sheet_y\":1,\"sort_order\":123},\"☝️\":{\"category\":\"People & Body\",\"sheet_x\":53,\"sheet_y\":2,\"sort_order\":18},\"☠️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":53,\"sheet_y\":8,\"sort_order\":94},\"☢️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":9,\"sort_order\":25},\"☣️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":10,\"sort_order\":26},\"☦️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":11,\"sort_order\":55},\"☪️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":12,\"sort_order\":56},\"☮️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":13,\"sort_order\":57},\"☯️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":14,\"sort_order\":53},\"☸️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":15,\"sort_order\":52},\"☹️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":53,\"sheet_y\":16,\"sort_order\":66},\"☺️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":53,\"sheet_y\":17,\"sort_order\":19},\"♈\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":20,\"sort_order\":60},\"♉\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":21,\"sort_order\":61},\"♊\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":22,\"sort_order\":62},\"♋\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":23,\"sort_order\":63},\"♌\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":24,\"sort_order\":64},\"♍\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":25,\"sort_order\":65},\"♎\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":26,\"sort_order\":66},\"♏\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":27,\"sort_order\":67},\"♐\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":28,\"sort_order\":68},\"♑\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":29,\"sort_order\":69},\"♒\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":30,\"sort_order\":70},\"♓\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":31,\"sort_order\":71},\"♟️\":{\"category\":\"Activities\",\"sheet_x\":53,\"sheet_y\":32,\"sort_order\":71},\"♠️\":{\"category\":\"Activities\",\"sheet_x\":53,\"sheet_y\":33,\"sort_order\":67},\"♣️\":{\"category\":\"Activities\",\"sheet_x\":53,\"sheet_y\":34,\"sort_order\":70},\"♥️\":{\"category\":\"Activities\",\"sheet_x\":53,\"sheet_y\":35,\"sort_order\":68},\"♦️\":{\"category\":\"Activities\",\"sheet_x\":53,\"sheet_y\":36,\"sort_order\":69},\"♨️\":{\"category\":\"Travel & Places\",\"sheet_x\":53,\"sheet_y\":37,\"sort_order\":57},\"♻️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":38,\"sort_order\":101},\"♾️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":39,\"sort_order\":100},\"♿\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":40,\"sort_order\":4},\"⚒️\":{\"category\":\"Objects\",\"sheet_x\":53,\"sheet_y\":41,\"sort_order\":184},\"⚓\":{\"category\":\"Travel & Places\",\"sheet_x\":53,\"sheet_y\":42,\"sort_order\":110},\"⚔️\":{\"category\":\"Objects\",\"sheet_x\":53,\"sheet_y\":43,\"sort_order\":187},\"⚖️\":{\"category\":\"Objects\",\"sheet_x\":53,\"sheet_y\":45,\"sort_order\":195},\"⚗️\":{\"category\":\"Objects\",\"sheet_x\":53,\"sheet_y\":46,\"sort_order\":201},\"⚙️\":{\"category\":\"Objects\",\"sheet_x\":53,\"sheet_y\":47,\"sort_order\":193},\"⚛️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":48,\"sort_order\":49},\"⚜️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":49,\"sort_order\":102},\"⚠️\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":50,\"sort_order\":14},\"⚡\":{\"category\":\"Travel & Places\",\"sheet_x\":53,\"sheet_y\":51,\"sort_order\":203},\"⚪\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":52,\"sort_order\":192},\"⚫\":{\"category\":\"Symbols\",\"sheet_x\":53,\"sheet_y\":53,\"sort_order\":191},\"⚰️\":{\"category\":\"Objects\",\"sheet_x\":53,\"sheet_y\":54,\"sort_order\":231},\"⚱️\":{\"category\":\"Objects\",\"sheet_x\":53,\"sheet_y\":55,\"sort_order\":232},\"⚽\":{\"category\":\"Activities\",\"sheet_x\":53,\"sheet_y\":56,\"sort_order\":28},\"⚾\":{\"category\":\"Activities\",\"sheet_x\":54,\"sheet_y\":0,\"sort_order\":29},\"⛄\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":1,\"sort_order\":206},\"⛅\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":2,\"sort_order\":186},\"⛈️\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":3,\"sort_order\":187},\"⛎\":{\"category\":\"Symbols\",\"sheet_x\":54,\"sheet_y\":4,\"sort_order\":72},\"⛏️\":{\"category\":\"Objects\",\"sheet_x\":54,\"sheet_y\":5,\"sort_order\":183},\"⛑️\":{\"category\":\"Objects\",\"sheet_x\":54,\"sheet_y\":6,\"sort_order\":39},\"⛓️\":{\"category\":\"Objects\",\"sheet_x\":54,\"sheet_y\":7,\"sort_order\":198},\"⛔\":{\"category\":\"Symbols\",\"sheet_x\":54,\"sheet_y\":8,\"sort_order\":16},\"⛩️\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":9,\"sort_order\":45},\"⛪\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":10,\"sort_order\":41},\"⛰️\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":11,\"sort_order\":9},\"⛱️\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":12,\"sort_order\":202},\"⛲\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":13,\"sort_order\":47},\"⛳\":{\"category\":\"Activities\",\"sheet_x\":54,\"sheet_y\":14,\"sort_order\":47},\"⛴️\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":15,\"sort_order\":115},\"⛵\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":16,\"sort_order\":111},\"⛷️\":{\"category\":\"People & Body\",\"sheet_x\":54,\"sheet_y\":17,\"sort_order\":247},\"⛸️\":{\"category\":\"Activities\",\"sheet_x\":54,\"sheet_y\":18,\"sort_order\":48},\"⛹️‍♀️\":{\"category\":\"People & Body\",\"sheet_x\":54,\"sheet_y\":19,\"sort_order\":263},\"⛹️‍♂️\":{\"category\":\"People & Body\",\"sheet_x\":54,\"sheet_y\":25,\"sort_order\":262},\"⛹️\":{\"category\":\"People & Body\",\"sheet_x\":54,\"sheet_y\":31,\"sort_order\":261},\"⛺\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":37,\"sort_order\":48},\"⛽\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":38,\"sort_order\":104},\"✂️\":{\"category\":\"Objects\",\"sheet_x\":54,\"sheet_y\":39,\"sort_order\":171},\"✅\":{\"category\":\"Symbols\",\"sheet_x\":54,\"sheet_y\":40,\"sort_order\":107},\"✈️\":{\"category\":\"Travel & Places\",\"sheet_x\":54,\"sheet_y\":41,\"sort_order\":118},\"✉️\":{\"category\":\"Objects\",\"sheet_x\":54,\"sheet_y\":42,\"sort_order\":132},\"✊\":{\"category\":\"People & Body\",\"sheet_x\":54,\"sheet_y\":43,\"sort_order\":21},\"✋\":{\"category\":\"People & Body\",\"sheet_x\":54,\"sheet_y\":49,\"sort_order\":4},\"✌️\":{\"category\":\"People & Body\",\"sheet_x\":54,\"sheet_y\":55,\"sort_order\":8},\"✍️\":{\"category\":\"People & Body\",\"sheet_x\":55,\"sheet_y\":4,\"sort_order\":31},\"✏️\":{\"category\":\"Objects\",\"sheet_x\":55,\"sheet_y\":10,\"sort_order\":145},\"✒️\":{\"category\":\"Objects\",\"sheet_x\":55,\"sheet_y\":11,\"sort_order\":146},\"✔️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":12,\"sort_order\":109},\"✖️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":13,\"sort_order\":110},\"✝️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":14,\"sort_order\":54},\"✡️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":15,\"sort_order\":51},\"✨\":{\"category\":\"Activities\",\"sheet_x\":55,\"sheet_y\":16,\"sort_order\":6},\"✳️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":17,\"sort_order\":119},\"✴️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":18,\"sort_order\":120},\"❄️\":{\"category\":\"Travel & Places\",\"sheet_x\":55,\"sheet_y\":19,\"sort_order\":204},\"❇️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":20,\"sort_order\":121},\"❌\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":21,\"sort_order\":111},\"❎\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":22,\"sort_order\":112},\"❓\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":23,\"sort_order\":124},\"❔\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":24,\"sort_order\":125},\"❕\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":25,\"sort_order\":126},\"❗\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":26,\"sort_order\":127},\"❣️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":55,\"sheet_y\":27,\"sort_order\":125},\"❤️\":{\"category\":\"Smileys & Emotion\",\"sheet_x\":55,\"sheet_y\":28,\"sort_order\":127},\"➕\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":29,\"sort_order\":113},\"➖\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":30,\"sort_order\":114},\"➗\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":31,\"sort_order\":115},\"➡️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":32,\"sort_order\":29},\"➰\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":33,\"sort_order\":116},\"➿\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":34,\"sort_order\":117},\"⤴️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":35,\"sort_order\":39},\"⤵️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":36,\"sort_order\":40},\"⬅️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":37,\"sort_order\":33},\"⬆️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":38,\"sort_order\":27},\"⬇️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":39,\"sort_order\":31},\"⬛\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":40,\"sort_order\":200},\"⬜\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":41,\"sort_order\":201},\"⭐\":{\"category\":\"Travel & Places\",\"sheet_x\":55,\"sheet_y\":42,\"sort_order\":181},\"⭕\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":43,\"sort_order\":106},\"〰️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":44,\"sort_order\":128},\"〽️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":45,\"sort_order\":118},\"㊗️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":46,\"sort_order\":180},\"㊙️\":{\"category\":\"Symbols\",\"sheet_x\":55,\"sheet_y\":47,\"sort_order\":181}}\r\n };\r\n}\r\n\r\nConfig.Countries = [{\"phoneCode\":\"7 840\",\"code\":\"AB\",\"name\":\"Abkhazia\",\"pattern\":\"\",\"emoji\":\"\"},{\"phoneCode\":\"93\",\"code\":\"AF\",\"name\":\"Afghanistan\",\"pattern\":\"93 XXX XXX XXX\",\"emoji\":\"🇦🇫\"},{\"phoneCode\":\"358 18\",\"code\":\"AX\",\"name\":\"Aland Islands\",\"pattern\":\"\",\"emoji\":\"🇦🇽\"},{\"phoneCode\":\"355\",\"code\":\"AL\",\"name\":\"Albania\",\"pattern\":\"355 XX XXX XXXX\",\"emoji\":\"🇦🇱\"},{\"phoneCode\":\"213\",\"code\":\"DZ\",\"name\":\"Algeria\",\"pattern\":\"213 XXX XX XX XX\",\"emoji\":\"🇩🇿\"},{\"phoneCode\":\"1 684\",\"code\":\"AS\",\"name\":\"American Samoa\",\"pattern\":\"1684 XXX XXXX\",\"emoji\":\"🇦🇸\"},{\"phoneCode\":\"376\",\"code\":\"AD\",\"name\":\"Andorra\",\"pattern\":\"376 XX XX XX\",\"emoji\":\"🇦🇩\"},{\"phoneCode\":\"244\",\"code\":\"AO\",\"name\":\"Angola\",\"pattern\":\"244 XXX XXX XXX\",\"emoji\":\"🇦🇴\"},{\"phoneCode\":\"1 264\",\"code\":\"AI\",\"name\":\"Anguilla\",\"pattern\":\"1264 XXX XXXX\",\"emoji\":\"🇦🇮\"},{\"phoneCode\":\"1 268\",\"code\":\"AG\",\"name\":\"Antigua & Barbuda\",\"pattern\":\"1268 XXX XXXX\",\"emoji\":\"🇦🇬\"},{\"phoneCode\":\"54\",\"code\":\"AR\",\"name\":\"Argentina\",\"pattern\":\"\",\"emoji\":\"🇦🇷\"},{\"phoneCode\":\"374\",\"code\":\"AM\",\"name\":\"Armenia\",\"pattern\":\"374 XX XXX XXX\",\"emoji\":\"🇦🇲\"},{\"phoneCode\":\"297\",\"code\":\"AW\",\"name\":\"Aruba\",\"pattern\":\"297 XXX XXXX\",\"emoji\":\"🇦🇼\"},{\"phoneCode\":\"247\",\"code\":\"SH\",\"name\":\"Ascension\",\"pattern\":\"290 XX XXX\",\"emoji\":\"🇸🇭\"},{\"phoneCode\":\"61\",\"code\":\"AU\",\"name\":\"Australia\",\"pattern\":\"61 XXX XXX XXX\",\"emoji\":\"🇦🇺\"},{\"phoneCode\":\"672\",\"code\":\"AU\",\"name\":\"Australian External Territories\",\"pattern\":\"61 XXX XXX XXX\",\"emoji\":\"🇦🇺\"},{\"phoneCode\":\"43\",\"code\":\"AT\",\"name\":\"Austria\",\"pattern\":\"\",\"emoji\":\"🇦🇹\"},{\"phoneCode\":\"994\",\"code\":\"AZ\",\"name\":\"Azerbaijan\",\"pattern\":\"994 XX XXX XX XX\",\"emoji\":\"🇦🇿\"},{\"phoneCode\":\"1 242\",\"code\":\"BS\",\"name\":\"Bahamas\",\"pattern\":\"1242 XXX XXXX\",\"emoji\":\"🇧🇸\"},{\"phoneCode\":\"973\",\"code\":\"BH\",\"name\":\"Bahrain\",\"pattern\":\"973 XXXX XXXX\",\"emoji\":\"🇧🇭\"},{\"phoneCode\":\"880\",\"code\":\"BD\",\"name\":\"Bangladesh\",\"pattern\":\"\",\"emoji\":\"🇧🇩\"},{\"phoneCode\":\"1 246\",\"code\":\"BB\",\"name\":\"Barbados\",\"pattern\":\"1246 XXX XXXX\",\"emoji\":\"🇧🇧\"},{\"phoneCode\":\"1 268\",\"code\":\"AG\",\"name\":\"Barbuda\",\"pattern\":\"1268 XXX XXXX\",\"emoji\":\"🇦🇬\"},{\"phoneCode\":\"375\",\"code\":\"BY\",\"name\":\"Belarus\",\"pattern\":\"375 XX XXX XXXX\",\"emoji\":\"🇧🇾\"},{\"phoneCode\":\"32\",\"code\":\"BE\",\"name\":\"Belgium\",\"pattern\":\"32 XXX XX XX XX\",\"emoji\":\"🇧🇪\"},{\"phoneCode\":\"501\",\"code\":\"BZ\",\"name\":\"Belize\",\"pattern\":\"\",\"emoji\":\"🇧🇿\"},{\"phoneCode\":\"229\",\"code\":\"BJ\",\"name\":\"Benin\",\"pattern\":\"229 XX XXX XXX\",\"emoji\":\"🇧🇯\"},{\"phoneCode\":\"1 441\",\"code\":\"BM\",\"name\":\"Bermuda\",\"pattern\":\"1441 XXX XXXX\",\"emoji\":\"🇧🇲\"},{\"phoneCode\":\"975\",\"code\":\"BT\",\"name\":\"Bhutan\",\"pattern\":\"\",\"emoji\":\"🇧🇹\"},{\"phoneCode\":\"591\",\"code\":\"BO\",\"name\":\"Bolivia\",\"pattern\":\"591 X XXX XXXX\",\"emoji\":\"🇧🇴\"},{\"phoneCode\":\"599 7\",\"code\":\"BQ\",\"name\":\"Caribbean Netherlands\",\"pattern\":\"\",\"emoji\":\"🇧🇶\"},{\"phoneCode\":\"387\",\"code\":\"BA\",\"name\":\"Bosnia & Herzegovina\",\"pattern\":\"\",\"emoji\":\"🇧🇦\"},{\"phoneCode\":\"267\",\"code\":\"BW\",\"name\":\"Botswana\",\"pattern\":\"267 XX XXX XXX\",\"emoji\":\"🇧🇼\"},{\"phoneCode\":\"55\",\"code\":\"BR\",\"name\":\"Brazil\",\"pattern\":\"55 XX XXXXX XXXX\",\"emoji\":\"🇧🇷\"},{\"phoneCode\":\"246\",\"code\":\"IO\",\"name\":\"British Indian Ocean Territory\",\"pattern\":\"246 XXX XXXX\",\"emoji\":\"🇮🇴\"},{\"phoneCode\":\"1 284\",\"code\":\"VG\",\"name\":\"British Virgin Islands\",\"pattern\":\"1284 XXX XXXX\",\"emoji\":\"🇻🇬\"},{\"phoneCode\":\"673\",\"code\":\"BN\",\"name\":\"Brunei\",\"pattern\":\"673 XXX XXXX\",\"emoji\":\"🇧🇳\"},{\"phoneCode\":\"359\",\"code\":\"BG\",\"name\":\"Bulgaria\",\"pattern\":\"\",\"emoji\":\"🇧🇬\"},{\"phoneCode\":\"226\",\"code\":\"BF\",\"name\":\"Burkina Faso\",\"pattern\":\"226 XX XX XX XX\",\"emoji\":\"🇧🇫\"},{\"phoneCode\":\"95\",\"code\":\"MM\",\"name\":\"Myanmar (Burma)\",\"pattern\":\"\",\"emoji\":\"🇲🇲\"},{\"phoneCode\":\"257\",\"code\":\"BI\",\"name\":\"Burundi\",\"pattern\":\"257 XX XX XXXX\",\"emoji\":\"🇧🇮\"},{\"phoneCode\":\"855\",\"code\":\"KH\",\"name\":\"Cambodia\",\"pattern\":\"\",\"emoji\":\"🇰🇭\"},{\"phoneCode\":\"237\",\"code\":\"CM\",\"name\":\"Cameroon\",\"pattern\":\"237 XXXX XXXX\",\"emoji\":\"🇨🇲\"},{\"phoneCode\":\"1\",\"code\":\"CA\",\"name\":\"Canada\",\"pattern\":\"1 XXX XXX XXXX\",\"emoji\":\"🇨🇦\"},{\"phoneCode\":\"238\",\"code\":\"CV\",\"name\":\"Cape Verde\",\"pattern\":\"238 XXX XXXX\",\"emoji\":\"🇨🇻\"},{\"phoneCode\":\"1 345\",\"code\":\"KY\",\"name\":\"Cayman Islands\",\"pattern\":\"1345 XXX XXXX\",\"emoji\":\"🇰🇾\"},{\"phoneCode\":\"236\",\"code\":\"CF\",\"name\":\"Central African Republic\",\"pattern\":\"236 XX XX XX XX\",\"emoji\":\"🇨🇫\"},{\"phoneCode\":\"235\",\"code\":\"TD\",\"name\":\"Chad\",\"pattern\":\"235 XX XX XX XX\",\"emoji\":\"🇹🇩\"},{\"phoneCode\":\"56\",\"code\":\"CL\",\"name\":\"Chile\",\"pattern\":\"56 X XXXX XXXX\",\"emoji\":\"🇨🇱\"},{\"phoneCode\":\"86\",\"code\":\"CN\",\"name\":\"China\",\"pattern\":\"86 XXX XXXX XXXX\",\"emoji\":\"🇨🇳\"},{\"phoneCode\":\"61\",\"code\":\"CX\",\"name\":\"Christmas Island\",\"pattern\":\"\",\"emoji\":\"🇨🇽\"},{\"phoneCode\":\"61\",\"code\":\"CC\",\"name\":\"Cocos (Keeling) Islands\",\"pattern\":\"\",\"emoji\":\"🇨🇨\"},{\"phoneCode\":\"57\",\"code\":\"CO\",\"name\":\"Colombia\",\"pattern\":\"57 XXX XXX XXXX\",\"emoji\":\"🇨🇴\"},{\"phoneCode\":\"269\",\"code\":\"KM\",\"name\":\"Comoros\",\"pattern\":\"269 XXX XXXX\",\"emoji\":\"🇰🇲\"},{\"phoneCode\":\"242\",\"code\":\"CG\",\"name\":\"Congo - Brazzaville\",\"pattern\":\"242 XX XXX XXXX\",\"emoji\":\"🇨🇬\"},{\"phoneCode\":\"243\",\"code\":\"CD\",\"name\":\"Congo - Kinshasa\",\"pattern\":\"243 XX XXX XXXX\",\"emoji\":\"🇨🇩\"},{\"phoneCode\":\"682\",\"code\":\"CK\",\"name\":\"Cook Islands\",\"pattern\":\"\",\"emoji\":\"🇨🇰\"},{\"phoneCode\":\"506\",\"code\":\"CR\",\"name\":\"Costa Rica\",\"pattern\":\"\",\"emoji\":\"🇨🇷\"},{\"phoneCode\":\"225\",\"code\":\"CI\",\"name\":\"Cote d’Ivoire\",\"pattern\":\"225 XX XXX XXX\",\"emoji\":\"🇨🇮\"},{\"phoneCode\":\"385\",\"code\":\"HR\",\"name\":\"Croatia\",\"pattern\":\"\",\"emoji\":\"🇭🇷\"},{\"phoneCode\":\"53\",\"code\":\"CU\",\"name\":\"Cuba\",\"pattern\":\"53 XXXX XXXX\",\"emoji\":\"🇨🇺\"},{\"phoneCode\":\"599 9\",\"code\":\"CW\",\"name\":\"Curacao\",\"pattern\":\"\",\"emoji\":\"🇨🇼\"},{\"phoneCode\":\"357\",\"code\":\"CY\",\"name\":\"Cyprus\",\"pattern\":\"357 XXXX XXXX\",\"emoji\":\"🇨🇾\"},{\"phoneCode\":\"420\",\"code\":\"CZ\",\"name\":\"Czech Republic\",\"pattern\":\"\",\"emoji\":\"🇨🇿\"},{\"phoneCode\":\"45\",\"code\":\"DK\",\"name\":\"Denmark\",\"pattern\":\"45 XXXX XXXX\",\"emoji\":\"🇩🇰\"},{\"phoneCode\":\"246\",\"code\":\"DG\",\"name\":\"Diego Garcia\",\"pattern\":\"\",\"emoji\":\"🇩🇬\"},{\"phoneCode\":\"253\",\"code\":\"DJ\",\"name\":\"Djibouti\",\"pattern\":\"253 XX XX XX XX\",\"emoji\":\"🇩🇯\"},{\"phoneCode\":\"1 767\",\"code\":\"DM\",\"name\":\"Dominica\",\"pattern\":\"1767 XXX XXXX\",\"emoji\":\"🇩🇲\"},{\"phoneCode\":\"1 809 and 1 829\",\"code\":\"DO\",\"name\":\"Dominican Republic\",\"pattern\":\"1 XXX XXX XXXX\",\"emoji\":\"🇩🇴\"},{\"phoneCode\":\"670\",\"code\":\"TL\",\"name\":\"Timor-Leste\",\"pattern\":\"\",\"emoji\":\"🇹🇱\"},{\"phoneCode\":\"593\",\"code\":\"EC\",\"name\":\"Ecuador\",\"pattern\":\"\",\"emoji\":\"🇪🇨\"},{\"phoneCode\":\"20\",\"code\":\"EG\",\"name\":\"Egypt\",\"pattern\":\"20 XX XXX XXXX\",\"emoji\":\"🇪🇬\"},{\"phoneCode\":\"503\",\"code\":\"SV\",\"name\":\"El Salvador\",\"pattern\":\"503 XXXX XXXX\",\"emoji\":\"🇸🇻\"},{\"phoneCode\":\"240\",\"code\":\"GQ\",\"name\":\"Equatorial Guinea\",\"pattern\":\"240 XXX XXX XXX\",\"emoji\":\"🇬🇶\"},{\"phoneCode\":\"291\",\"code\":\"ER\",\"name\":\"Eritrea\",\"pattern\":\"291 X XXX XXX\",\"emoji\":\"🇪🇷\"},{\"phoneCode\":\"372\",\"code\":\"EE\",\"name\":\"Estonia\",\"pattern\":\"\",\"emoji\":\"🇪🇪\"},{\"phoneCode\":\"251\",\"code\":\"ET\",\"name\":\"Ethiopia\",\"pattern\":\"251 XX XXX XXXX\",\"emoji\":\"🇪🇹\"},{\"phoneCode\":\"500\",\"code\":\"FK\",\"name\":\"Falkland Islands\",\"pattern\":\"\",\"emoji\":\"🇫🇰\"},{\"phoneCode\":\"298\",\"code\":\"FO\",\"name\":\"Faroe Islands\",\"pattern\":\"298 XXX XXX\",\"emoji\":\"🇫🇴\"},{\"phoneCode\":\"679\",\"code\":\"FJ\",\"name\":\"Fiji\",\"pattern\":\"\",\"emoji\":\"🇫🇯\"},{\"phoneCode\":\"358\",\"code\":\"FI\",\"name\":\"Finland\",\"pattern\":\"\",\"emoji\":\"🇫🇮\"},{\"phoneCode\":\"33\",\"code\":\"FR\",\"name\":\"France\",\"pattern\":\"33 X XX XX XX XX\",\"emoji\":\"🇫🇷\"},{\"phoneCode\":\"594\",\"code\":\"GF\",\"name\":\"French Guiana\",\"pattern\":\"\",\"emoji\":\"🇬🇫\"},{\"phoneCode\":\"689\",\"code\":\"PF\",\"name\":\"French Polynesia\",\"pattern\":\"\",\"emoji\":\"🇵🇫\"},{\"phoneCode\":\"241\",\"code\":\"GA\",\"name\":\"Gabon\",\"pattern\":\"241 X XX XX XX\",\"emoji\":\"🇬🇦\"},{\"phoneCode\":\"220\",\"code\":\"GM\",\"name\":\"Gambia\",\"pattern\":\"220 XXX XXXX\",\"emoji\":\"🇬🇲\"},{\"phoneCode\":\"995\",\"code\":\"GE\",\"name\":\"Georgia\",\"pattern\":\"\",\"emoji\":\"🇬🇪\"},{\"phoneCode\":\"49\",\"code\":\"DE\",\"name\":\"Germany\",\"pattern\":\"49 XXX XXXXXXXX\",\"emoji\":\"🇩🇪\"},{\"phoneCode\":\"233\",\"code\":\"GH\",\"name\":\"Ghana\",\"pattern\":\"\",\"emoji\":\"🇬🇭\"},{\"phoneCode\":\"350\",\"code\":\"GI\",\"name\":\"Gibraltar\",\"pattern\":\"350 XXXX XXXX\",\"emoji\":\"🇬🇮\"},{\"phoneCode\":\"30\",\"code\":\"GR\",\"name\":\"Greece\",\"pattern\":\"30 XX XXXX XXXX\",\"emoji\":\"🇬🇷\"},{\"phoneCode\":\"299\",\"code\":\"GL\",\"name\":\"Greenland\",\"pattern\":\"299 XXX XXX\",\"emoji\":\"🇬🇱\"},{\"phoneCode\":\"1 473\",\"code\":\"GD\",\"name\":\"Grenada\",\"pattern\":\"1473 XXX XXXX\",\"emoji\":\"🇬🇩\"},{\"phoneCode\":\"590\",\"code\":\"GP\",\"name\":\"Guadeloupe\",\"pattern\":\"\",\"emoji\":\"🇬🇵\"},{\"phoneCode\":\"1 671\",\"code\":\"GU\",\"name\":\"Guam\",\"pattern\":\"1671 XXX XXXX\",\"emoji\":\"🇬🇺\"},{\"phoneCode\":\"502\",\"code\":\"GT\",\"name\":\"Guatemala\",\"pattern\":\"502 X XXX XXXX\",\"emoji\":\"🇬🇹\"},{\"phoneCode\":\"44\",\"code\":\"GG\",\"name\":\"Guernsey\",\"pattern\":\"\",\"emoji\":\"🇬🇬\"},{\"phoneCode\":\"224\",\"code\":\"GN\",\"name\":\"Guinea\",\"pattern\":\"224 XXX XXX XXX\",\"emoji\":\"🇬🇳\"},{\"phoneCode\":\"245\",\"code\":\"GW\",\"name\":\"Guinea-Bissau\",\"pattern\":\"245 XXX XXXX\",\"emoji\":\"🇬🇼\"},{\"phoneCode\":\"592\",\"code\":\"GY\",\"name\":\"Guyana\",\"pattern\":\"\",\"emoji\":\"🇬🇾\"},{\"phoneCode\":\"509\",\"code\":\"HT\",\"name\":\"Haiti\",\"pattern\":\"\",\"emoji\":\"🇭🇹\"},{\"phoneCode\":\"504\",\"code\":\"HN\",\"name\":\"Honduras\",\"pattern\":\"504 XXXX XXXX\",\"emoji\":\"🇭🇳\"},{\"phoneCode\":\"852\",\"code\":\"HK\",\"name\":\"Hong Kong SAR China\",\"pattern\":\"\",\"emoji\":\"🇭🇰\"},{\"phoneCode\":\"36\",\"code\":\"HU\",\"name\":\"Hungary\",\"pattern\":\"36 XX XXX XXXX\",\"emoji\":\"🇭🇺\"},{\"phoneCode\":\"354\",\"code\":\"IS\",\"name\":\"Iceland\",\"pattern\":\"354 XXX XXXX\",\"emoji\":\"🇮🇸\"},{\"phoneCode\":\"91\",\"code\":\"IN\",\"name\":\"India\",\"pattern\":\"91 XXXXX XXXXX\",\"emoji\":\"🇮🇳\"},{\"phoneCode\":\"62\",\"code\":\"ID\",\"name\":\"Indonesia\",\"pattern\":\"\",\"emoji\":\"🇮🇩\"},{\"phoneCode\":\"98\",\"code\":\"IR\",\"name\":\"Iran\",\"pattern\":\"98 XXX XXX XXXX\",\"emoji\":\"🇮🇷\"},{\"phoneCode\":\"964\",\"code\":\"IQ\",\"name\":\"Iraq\",\"pattern\":\"964 XXX XXX XXXX\",\"emoji\":\"🇮🇶\"},{\"phoneCode\":\"353\",\"code\":\"IE\",\"name\":\"Ireland\",\"pattern\":\"353 XX XXX XXXX\",\"emoji\":\"🇮🇪\"},{\"phoneCode\":\"972\",\"code\":\"IL\",\"name\":\"Israel\",\"pattern\":\"972 XX XXX XXXX\",\"emoji\":\"🇮🇱\"},{\"phoneCode\":\"39\",\"code\":\"IT\",\"name\":\"Italy\",\"pattern\":\"39 XXX XXX XXXX\",\"emoji\":\"🇮🇹\"},{\"phoneCode\":\"1 876\",\"code\":\"JM\",\"name\":\"Jamaica\",\"pattern\":\"1876 XXX XXXX\",\"emoji\":\"🇯🇲\"},{\"phoneCode\":\"47 79\",\"code\":\"SJ\",\"name\":\"Svalbard & Jan Mayen\",\"pattern\":\"\",\"emoji\":\"🇸🇯\"},{\"phoneCode\":\"81\",\"code\":\"JP\",\"name\":\"Japan\",\"pattern\":\"81 XX XXXX XXXX\",\"emoji\":\"🇯🇵\"},{\"phoneCode\":\"44\",\"code\":\"JE\",\"name\":\"Jersey\",\"pattern\":\"\",\"emoji\":\"🇯🇪\"},{\"phoneCode\":\"962\",\"code\":\"JO\",\"name\":\"Jordan\",\"pattern\":\"962 X XXXX XXXX\",\"emoji\":\"🇯🇴\"},{\"phoneCode\":\"7 7\",\"code\":\"KZ\",\"name\":\"Kazakhstan\",\"pattern\":\"7 XXX XXX XX XX\",\"emoji\":\"🇰🇿\"},{\"phoneCode\":\"254\",\"code\":\"KE\",\"name\":\"Kenya\",\"pattern\":\"254 XXX XXX XXX\",\"emoji\":\"🇰🇪\"},{\"phoneCode\":\"686\",\"code\":\"KI\",\"name\":\"Kiribati\",\"pattern\":\"\",\"emoji\":\"🇰🇮\"},{\"phoneCode\":\"850\",\"code\":\"KP\",\"name\":\"North Korea\",\"pattern\":\"\",\"emoji\":\"🇰🇵\"},{\"phoneCode\":\"82\",\"code\":\"KR\",\"name\":\"South Korea\",\"pattern\":\"\",\"emoji\":\"🇰🇷\"},{\"phoneCode\":\"965\",\"code\":\"KW\",\"name\":\"Kuwait\",\"pattern\":\"965 XXXX XXXX\",\"emoji\":\"🇰🇼\"},{\"phoneCode\":\"996\",\"code\":\"KG\",\"name\":\"Kyrgyzstan\",\"pattern\":\"\",\"emoji\":\"🇰🇬\"},{\"phoneCode\":\"856\",\"code\":\"LA\",\"name\":\"Laos\",\"pattern\":\"\",\"emoji\":\"🇱🇦\"},{\"phoneCode\":\"371\",\"code\":\"LV\",\"name\":\"Latvia\",\"pattern\":\"371 XXX XXXXX\",\"emoji\":\"🇱🇻\"},{\"phoneCode\":\"961\",\"code\":\"LB\",\"name\":\"Lebanon\",\"pattern\":\"\",\"emoji\":\"🇱🇧\"},{\"phoneCode\":\"266\",\"code\":\"LS\",\"name\":\"Lesotho\",\"pattern\":\"266 XX XXX XXX\",\"emoji\":\"🇱🇸\"},{\"phoneCode\":\"231\",\"code\":\"LR\",\"name\":\"Liberia\",\"pattern\":\"\",\"emoji\":\"🇱🇷\"},{\"phoneCode\":\"218\",\"code\":\"LY\",\"name\":\"Libya\",\"pattern\":\"218 XX XXX XXXX\",\"emoji\":\"🇱🇾\"},{\"phoneCode\":\"423\",\"code\":\"LI\",\"name\":\"Liechtenstein\",\"pattern\":\"\",\"emoji\":\"🇱🇮\"},{\"phoneCode\":\"370\",\"code\":\"LT\",\"name\":\"Lithuania\",\"pattern\":\"370 XXX XXXXX\",\"emoji\":\"🇱🇹\"},{\"phoneCode\":\"352\",\"code\":\"LU\",\"name\":\"Luxembourg\",\"pattern\":\"\",\"emoji\":\"🇱🇺\"},{\"phoneCode\":\"853\",\"code\":\"MO\",\"name\":\"Macau SAR China\",\"pattern\":\"\",\"emoji\":\"🇲🇴\"},{\"phoneCode\":\"389\",\"code\":\"MK\",\"name\":\"Macedonia\",\"pattern\":\"\",\"emoji\":\"🇲🇰\"},{\"phoneCode\":\"261\",\"code\":\"MG\",\"name\":\"Madagascar\",\"pattern\":\"261 XX XX XXX XX\",\"emoji\":\"🇲🇬\"},{\"phoneCode\":\"265\",\"code\":\"MW\",\"name\":\"Malawi\",\"pattern\":\"\",\"emoji\":\"🇲🇼\"},{\"phoneCode\":\"60\",\"code\":\"MM\",\"name\":\"Malaysia\",\"pattern\":\"\",\"emoji\":\"🇲🇲\"},{\"phoneCode\":\"960\",\"code\":\"MV\",\"name\":\"Maldives\",\"pattern\":\"\",\"emoji\":\"🇲🇻\"},{\"phoneCode\":\"223\",\"code\":\"ML\",\"name\":\"Mali\",\"pattern\":\"223 XXXX XXXX\",\"emoji\":\"🇲🇱\"},{\"phoneCode\":\"356\",\"code\":\"MT\",\"name\":\"Malta\",\"pattern\":\"356 XX XX XX XX\",\"emoji\":\"🇲🇹\"},{\"phoneCode\":\"692\",\"code\":\"MH\",\"name\":\"Marshall Islands\",\"pattern\":\"\",\"emoji\":\"🇲🇭\"},{\"phoneCode\":\"596\",\"code\":\"MQ\",\"name\":\"Martinique\",\"pattern\":\"\",\"emoji\":\"🇲🇶\"},{\"phoneCode\":\"222\",\"code\":\"MR\",\"name\":\"Mauritania\",\"pattern\":\"222 XXXX XXXX\",\"emoji\":\"🇲🇷\"},{\"phoneCode\":\"230\",\"code\":\"MU\",\"name\":\"Mauritius\",\"pattern\":\"\",\"emoji\":\"🇲🇺\"},{\"phoneCode\":\"262\",\"code\":\"YT\",\"name\":\"Mayotte\",\"pattern\":\"\",\"emoji\":\"🇾🇹\"},{\"phoneCode\":\"52\",\"code\":\"MX\",\"name\":\"Mexico\",\"pattern\":\"\",\"emoji\":\"🇲🇽\"},{\"phoneCode\":\"691\",\"code\":\"FM\",\"name\":\"Micronesia\",\"pattern\":\"\",\"emoji\":\"🇫🇲\"},{\"phoneCode\":\"373\",\"code\":\"MD\",\"name\":\"Moldova\",\"pattern\":\"373 XX XXX XXX\",\"emoji\":\"🇲🇩\"},{\"phoneCode\":\"377\",\"code\":\"MC\",\"name\":\"Monaco\",\"pattern\":\"377 XXXX XXXX\",\"emoji\":\"🇲🇨\"},{\"phoneCode\":\"976\",\"code\":\"MN\",\"name\":\"Mongolia\",\"pattern\":\"\",\"emoji\":\"🇲🇳\"},{\"phoneCode\":\"382\",\"code\":\"ME\",\"name\":\"Montenegro\",\"pattern\":\"\",\"emoji\":\"🇲🇪\"},{\"phoneCode\":\"1 664\",\"code\":\"MS\",\"name\":\"Montserrat\",\"pattern\":\"1664 XXX XXXX\",\"emoji\":\"🇲🇸\"},{\"phoneCode\":\"212\",\"code\":\"MA\",\"name\":\"Morocco\",\"pattern\":\"212 XX XXX XXXX\",\"emoji\":\"🇲🇦\"},{\"phoneCode\":\"258\",\"code\":\"MZ\",\"name\":\"Mozambique\",\"pattern\":\"258 XX XXX XXXX\",\"emoji\":\"🇲🇿\"},{\"phoneCode\":\"264\",\"code\":\"NA\",\"name\":\"Namibia\",\"pattern\":\"264 XX XXX XXXX\",\"emoji\":\"🇳🇦\"},{\"phoneCode\":\"674\",\"code\":\"NR\",\"name\":\"Nauru\",\"pattern\":\"\",\"emoji\":\"🇳🇷\"},{\"phoneCode\":\"977\",\"code\":\"NP\",\"name\":\"Nepal\",\"pattern\":\"\",\"emoji\":\"🇳🇵\"},{\"phoneCode\":\"31\",\"code\":\"NL\",\"name\":\"Netherlands\",\"pattern\":\"31 X XX XX XX XX\",\"emoji\":\"🇳🇱\"},{\"phoneCode\":\"687\",\"code\":\"NC\",\"name\":\"New Caledonia\",\"pattern\":\"\",\"emoji\":\"🇳🇨\"},{\"phoneCode\":\"64\",\"code\":\"NZ\",\"name\":\"New Zealand\",\"pattern\":\"\",\"emoji\":\"🇳🇿\"},{\"phoneCode\":\"505\",\"code\":\"NI\",\"name\":\"Nicaragua\",\"pattern\":\"505 XXXX XXXX\",\"emoji\":\"🇳🇮\"},{\"phoneCode\":\"227\",\"code\":\"NE\",\"name\":\"Niger\",\"pattern\":\"227 XX XX XX XX\",\"emoji\":\"🇳🇪\"},{\"phoneCode\":\"234\",\"code\":\"NG\",\"name\":\"Nigeria\",\"pattern\":\"\",\"emoji\":\"🇳🇬\"},{\"phoneCode\":\"683\",\"code\":\"NU\",\"name\":\"Niue\",\"pattern\":\"\",\"emoji\":\"🇳🇺\"},{\"phoneCode\":\"672\",\"code\":\"NF\",\"name\":\"Norfolk Island\",\"pattern\":\"\",\"emoji\":\"🇳🇫\"},{\"phoneCode\":\"1 670\",\"code\":\"MP\",\"name\":\"Northern Mariana Islands\",\"pattern\":\"1670 XXX XXXX\",\"emoji\":\"🇲🇵\"},{\"phoneCode\":\"47\",\"code\":\"NO\",\"name\":\"Norway\",\"pattern\":\"47 XXXX XXXX\",\"emoji\":\"🇳🇴\"},{\"phoneCode\":\"968\",\"code\":\"OM\",\"name\":\"Oman\",\"pattern\":\"968 XXXX XXXX\",\"emoji\":\"🇴🇲\"},{\"phoneCode\":\"92\",\"code\":\"PK\",\"name\":\"Pakistan\",\"pattern\":\"92 XXX XXX XXXX\",\"emoji\":\"🇵🇰\"},{\"phoneCode\":\"680\",\"code\":\"PW\",\"name\":\"Palau\",\"pattern\":\"\",\"emoji\":\"🇵🇼\"},{\"phoneCode\":\"970\",\"code\":\"PS\",\"name\":\"Palestinian Territories\",\"pattern\":\"970 XXX XX XXXX\",\"emoji\":\"🇵🇸\"},{\"phoneCode\":\"507\",\"code\":\"PA\",\"name\":\"Panama\",\"pattern\":\"507 XXXX XXXX\",\"emoji\":\"🇵🇦\"},{\"phoneCode\":\"675\",\"code\":\"PG\",\"name\":\"Papua New Guinea\",\"pattern\":\"\",\"emoji\":\"🇵🇬\"},{\"phoneCode\":\"595\",\"code\":\"PY\",\"name\":\"Paraguay\",\"pattern\":\"595 XXX XXX XXX\",\"emoji\":\"🇵🇾\"},{\"phoneCode\":\"51\",\"code\":\"PE\",\"name\":\"Peru\",\"pattern\":\"51 XXX XXX XXX\",\"emoji\":\"🇵🇪\"},{\"phoneCode\":\"63\",\"code\":\"PH\",\"name\":\"Philippines\",\"pattern\":\"63 XXX XXX XXXX\",\"emoji\":\"🇵🇭\"},{\"phoneCode\":\"64\",\"code\":\"PN\",\"name\":\"Pitcairn Islands\",\"pattern\":\"\",\"emoji\":\"🇵🇳\"},{\"phoneCode\":\"48\",\"code\":\"PL\",\"name\":\"Poland\",\"pattern\":\"48 XXX XXX XXX\",\"emoji\":\"🇵🇱\"},{\"phoneCode\":\"351\",\"code\":\"PT\",\"name\":\"Portugal\",\"pattern\":\"351 X XXXX XXXX\",\"emoji\":\"🇵🇹\"},{\"phoneCode\":\"1 787 and 1 939\",\"code\":\"PR\",\"name\":\"Puerto Rico\",\"pattern\":\"1 XXX XXX XXXX\",\"emoji\":\"🇵🇷\"},{\"phoneCode\":\"974\",\"code\":\"QA\",\"name\":\"Qatar\",\"pattern\":\"\",\"emoji\":\"🇶🇦\"},{\"phoneCode\":\"262\",\"code\":\"RE\",\"name\":\"Reunion\",\"pattern\":\"262 XXX XXX XXX\",\"emoji\":\"🇷🇪\"},{\"phoneCode\":\"40\",\"code\":\"RO\",\"name\":\"Romania\",\"pattern\":\"40 XXX XXX XXX\",\"emoji\":\"🇷🇴\"},{\"phoneCode\":\"7\",\"code\":\"RU\",\"name\":\"Russia\",\"pattern\":\"7 XXX XXX XX XX\",\"emoji\":\"🇷🇺\"},{\"phoneCode\":\"250\",\"code\":\"RW\",\"name\":\"Rwanda\",\"pattern\":\"250 XXX XXX XXX\",\"emoji\":\"🇷🇼\"},{\"phoneCode\":\"590\",\"code\":\"BL\",\"name\":\"St. Barthelemy\",\"pattern\":\"\",\"emoji\":\"🇧🇱\"},{\"phoneCode\":\"290\",\"code\":\"SH\",\"name\":\"St. Helena\",\"pattern\":\"290 XX XXX\",\"emoji\":\"🇸🇭\"},{\"phoneCode\":\"1 869\",\"code\":\"KN\",\"name\":\"St. Kitts & Nevis\",\"pattern\":\"1869 XXX XXXX\",\"emoji\":\"🇰🇳\"},{\"phoneCode\":\"1 758\",\"code\":\"LC\",\"name\":\"St. Lucia\",\"pattern\":\"1758 XXX XXXX\",\"emoji\":\"🇱🇨\"},{\"phoneCode\":\"590\",\"code\":\"MF\",\"name\":\"St. Martin (France)\",\"pattern\":\"\",\"emoji\":\"🇲🇫\"},{\"phoneCode\":\"508\",\"code\":\"PM\",\"name\":\"St. Pierre and Miquelon\",\"pattern\":\"\",\"emoji\":\"🇵🇲\"},{\"phoneCode\":\"1 784\",\"code\":\"VC\",\"name\":\"St. Vincent and the Grenadines\",\"pattern\":\"1784 XXX XXXX\",\"emoji\":\"🇻🇨\"},{\"phoneCode\":\"685\",\"code\":\"WS\",\"name\":\"Samoa\",\"pattern\":\"\",\"emoji\":\"🇼🇸\"},{\"phoneCode\":\"378\",\"code\":\"SM\",\"name\":\"San Marino\",\"pattern\":\"378 XXX XXX XXXX\",\"emoji\":\"🇸🇲\"},{\"phoneCode\":\"239\",\"code\":\"ST\",\"name\":\"São Tome & Principe\",\"pattern\":\"239 XX XXXXX\",\"emoji\":\"🇸🇹\"},{\"phoneCode\":\"966\",\"code\":\"SA\",\"name\":\"Saudi Arabia\",\"pattern\":\"\",\"emoji\":\"🇸🇦\"},{\"phoneCode\":\"221\",\"code\":\"SN\",\"name\":\"Senegal\",\"pattern\":\"221 XX XXX XXXX\",\"emoji\":\"🇸🇳\"},{\"phoneCode\":\"381\",\"code\":\"RS\",\"name\":\"Serbia\",\"pattern\":\"381 XX XXX XXXX\",\"emoji\":\"🇷🇸\"},{\"phoneCode\":\"248\",\"code\":\"SC\",\"name\":\"Seychelles\",\"pattern\":\"248 X XX XX XX\",\"emoji\":\"🇸🇨\"},{\"phoneCode\":\"232\",\"code\":\"SL\",\"name\":\"Sierra Leone\",\"pattern\":\"232 XX XXX XXX\",\"emoji\":\"🇸🇱\"},{\"phoneCode\":\"65\",\"code\":\"SG\",\"name\":\"Singapore\",\"pattern\":\"65 XXXX XXXX\",\"emoji\":\"🇸🇬\"},{\"phoneCode\":\"599 3\",\"code\":\"BQ\",\"name\":\"Sint Eustatius\",\"pattern\":\"\",\"emoji\":\"🇧🇶\"},{\"phoneCode\":\"1 721\",\"code\":\"SX\",\"name\":\"Sint Maarten\",\"pattern\":\"1721 XXX XXXX\",\"emoji\":\"🇸🇽\"},{\"phoneCode\":\"421\",\"code\":\"SK\",\"name\":\"Slovakia\",\"pattern\":\"\",\"emoji\":\"🇸🇰\"},{\"phoneCode\":\"386\",\"code\":\"SI\",\"name\":\"Slovenia\",\"pattern\":\"\",\"emoji\":\"🇸🇮\"},{\"phoneCode\":\"677\",\"code\":\"SB\",\"name\":\"Solomon Islands\",\"pattern\":\"\",\"emoji\":\"🇸🇧\"},{\"phoneCode\":\"252\",\"code\":\"SO\",\"name\":\"Somalia\",\"pattern\":\"252 XX XXX XXX\",\"emoji\":\"🇸🇴\"},{\"phoneCode\":\"27\",\"code\":\"ZA\",\"name\":\"South Africa\",\"pattern\":\"27 XX XXX XXXX\",\"emoji\":\"🇿🇦\"},{\"phoneCode\":\"500\",\"code\":\"GS\",\"name\":\"South Georgia & South Sandwich Islands\",\"pattern\":\"\",\"emoji\":\"🇬🇸\"},{\"phoneCode\":\"995 34\",\"code\":\"\",\"name\":\"South Ossetia\",\"pattern\":\"\",\"emoji\":\"\"},{\"phoneCode\":\"211\",\"code\":\"SS\",\"name\":\"South Sudan\",\"pattern\":\"211 XX XXX XXXX\",\"emoji\":\"🇸🇸\"},{\"phoneCode\":\"34\",\"code\":\"ES\",\"name\":\"Spain\",\"pattern\":\"34 XXX XXX XXX\",\"emoji\":\"🇪🇸\"},{\"phoneCode\":\"94\",\"code\":\"LK\",\"name\":\"Sri Lanka\",\"pattern\":\"94 XX XXX XXXX\",\"emoji\":\"🇱🇰\"},{\"phoneCode\":\"249\",\"code\":\"SD\",\"name\":\"Sudan\",\"pattern\":\"249 XX XXX XXXX\",\"emoji\":\"🇸🇩\"},{\"phoneCode\":\"597\",\"code\":\"SR\",\"name\":\"Suriname\",\"pattern\":\"597 XXX XXXX\",\"emoji\":\"🇸🇷\"},{\"phoneCode\":\"47 79\",\"code\":\"SJ\",\"name\":\"Svalbard\",\"pattern\":\"\",\"emoji\":\"🇸🇯\"},{\"phoneCode\":\"268\",\"code\":\"SZ\",\"name\":\"Swaziland\",\"pattern\":\"268 XXXX XXXX\",\"emoji\":\"🇸🇿\"},{\"phoneCode\":\"46\",\"code\":\"SE\",\"name\":\"Sweden\",\"pattern\":\"46 XX XXX XXXX\",\"emoji\":\"🇸🇪\"},{\"phoneCode\":\"41\",\"code\":\"CH\",\"name\":\"Switzerland\",\"pattern\":\"41 XX XXX XXXX\",\"emoji\":\"🇨🇭\"},{\"phoneCode\":\"963\",\"code\":\"SY\",\"name\":\"Syria\",\"pattern\":\"\",\"emoji\":\"🇸🇾\"},{\"phoneCode\":\"886\",\"code\":\"TW\",\"name\":\"Taiwan\",\"pattern\":\"\",\"emoji\":\"🇹🇼\"},{\"phoneCode\":\"992\",\"code\":\"TJ\",\"name\":\"Tajikistan\",\"pattern\":\"\",\"emoji\":\"🇹🇯\"},{\"phoneCode\":\"255\",\"code\":\"TZ\",\"name\":\"Tanzania\",\"pattern\":\"255 XX XXX XXXX\",\"emoji\":\"🇹🇿\"},{\"phoneCode\":\"66\",\"code\":\"TH\",\"name\":\"Thailand\",\"pattern\":\"66 X XXXX XXXX\",\"emoji\":\"🇹🇭\"},{\"phoneCode\":\"228\",\"code\":\"TG\",\"name\":\"Togo\",\"pattern\":\"228 XX XXX XXX\",\"emoji\":\"🇹🇬\"},{\"phoneCode\":\"690\",\"code\":\"TK\",\"name\":\"Tokelau\",\"pattern\":\"\",\"emoji\":\"🇹🇰\"},{\"phoneCode\":\"676\",\"code\":\"TO\",\"name\":\"Tonga\",\"pattern\":\"\",\"emoji\":\"🇹🇴\"},{\"phoneCode\":\"1 868\",\"code\":\"TT\",\"name\":\"Trinidad & Tobago\",\"pattern\":\"1868 XXX XXXX\",\"emoji\":\"🇹🇹\"},{\"phoneCode\":\"216\",\"code\":\"TN\",\"name\":\"Tunisia\",\"pattern\":\"216 XX XXX XXX\",\"emoji\":\"🇹🇳\"},{\"phoneCode\":\"90\",\"code\":\"TR\",\"name\":\"Turkey\",\"pattern\":\"90 XXX XXX XXXX\",\"emoji\":\"🇹🇷\"},{\"phoneCode\":\"993\",\"code\":\"TM\",\"name\":\"Turkmenistan\",\"pattern\":\"993 XX XXXXXX\",\"emoji\":\"🇹🇲\"},{\"phoneCode\":\"1 649\",\"code\":\"TC\",\"name\":\"Turks & Caicos Islands\",\"pattern\":\"1649 XXX XXXX\",\"emoji\":\"🇹🇨\"},{\"phoneCode\":\"688\",\"code\":\"TV\",\"name\":\"Tuvalu\",\"pattern\":\"\",\"emoji\":\"🇹🇻\"},{\"phoneCode\":\"256\",\"code\":\"UG\",\"name\":\"Uganda\",\"pattern\":\"256 XX XXX XXXX\",\"emoji\":\"🇺🇬\"},{\"phoneCode\":\"380\",\"code\":\"UA\",\"name\":\"Ukraine\",\"pattern\":\"380 XX XXX XX XX\",\"emoji\":\"🇺🇦\"},{\"phoneCode\":\"971\",\"code\":\"AE\",\"name\":\"United Arab Emirates\",\"pattern\":\"971 XX XXX XXXX\",\"emoji\":\"🇦🇪\"},{\"phoneCode\":\"44\",\"code\":\"GB\",\"name\":\"United Kingdom\",\"pattern\":\"44 XXXX XXXXXX\",\"emoji\":\"🇬🇧\"},{\"phoneCode\":\"1\",\"code\":\"US\",\"name\":\"United States\",\"pattern\":\"1 XXX XXX XXXX\",\"emoji\":\"🇺🇸\"},{\"phoneCode\":\"598\",\"code\":\"UY\",\"name\":\"Uruguay\",\"pattern\":\"598 XXXX XXXX\",\"emoji\":\"🇺🇾\"},{\"phoneCode\":\"1 340\",\"code\":\"VI\",\"name\":\"U.S. Virgin Islands\",\"pattern\":\"1340 XXX XXXX\",\"emoji\":\"🇻🇮\"},{\"phoneCode\":\"998\",\"code\":\"UZ\",\"name\":\"Uzbekistan\",\"pattern\":\"998 XX XXXXXXX\",\"emoji\":\"🇺🇿\"},{\"phoneCode\":\"678\",\"code\":\"VU\",\"name\":\"Vanuatu\",\"pattern\":\"\",\"emoji\":\"🇻🇺\"},{\"phoneCode\":\"58\",\"code\":\"VE\",\"name\":\"Venezuela\",\"pattern\":\"58 XXX XXX XXXX\",\"emoji\":\"🇻🇪\"},{\"phoneCode\":\"39 06 698\",\"code\":\"VA\",\"name\":\"Vatican City\",\"pattern\":\"\",\"emoji\":\"🇻🇦\"},{\"phoneCode\":\"84\",\"code\":\"VN\",\"name\":\"Vietnam\",\"pattern\":\"\",\"emoji\":\"🇻🇳\"},{\"phoneCode\":\"681\",\"code\":\"WF\",\"name\":\"Wallis & Futuna\",\"pattern\":\"\",\"emoji\":\"🇼🇫\"},{\"phoneCode\":\"967\",\"code\":\"YE\",\"name\":\"Yemen\",\"pattern\":\"967 XXX XXX XXX\",\"emoji\":\"🇾🇪\"},{\"phoneCode\":\"260\",\"code\":\"ZM\",\"name\":\"Zambia\",\"pattern\":\"260 XX XXX XXXX\",\"emoji\":\"🇿🇲\"},{\"phoneCode\":\"255\",\"code\":\"\",\"name\":\"Zanzibar\",\"pattern\":\"\",\"emoji\":\"\"},{\"phoneCode\":\"263\",\"code\":\"ZW\",\"name\":\"Zimbabwe\",\"pattern\":\"263 XX XXX XXXX\",\"emoji\":\"🇿🇼\"}];\r\n\r\nif(Config.Modes.test) {\r\n Config.Countries.push({\r\n name: 'Test Country',\r\n phoneCode: '999 66',\r\n code: 'TC',\r\n emoji: '🤔',\r\n pattern: '999 66 XXX XX'\r\n });\r\n\r\n console.log('Added test country to list!');\r\n}\r\n\r\nConfig.Schema = Config.Schema || {};\r\n\r\nConfig.Schema.MTProto = {\"constructors\":[{\"id\":\"481674261\",\"predicate\":\"vector\",\"params\":[],\"type\":\"Vector t\"},{\"id\":\"85337187\",\"predicate\":\"resPQ\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"pq\",\"type\":\"bytes\"},{\"name\":\"server_public_key_fingerprints\",\"type\":\"Vector\"}],\"type\":\"ResPQ\"},{\"id\":\"-2083955988\",\"predicate\":\"p_q_inner_data\",\"params\":[{\"name\":\"pq\",\"type\":\"bytes\"},{\"name\":\"p\",\"type\":\"bytes\"},{\"name\":\"q\",\"type\":\"bytes\"},{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"new_nonce\",\"type\":\"int256\"}],\"type\":\"P_Q_inner_data\"},{\"id\":\"1013613780\",\"predicate\":\"p_q_inner_data_temp\",\"params\":[{\"name\":\"pq\",\"type\":\"bytes\"},{\"name\":\"p\",\"type\":\"bytes\"},{\"name\":\"q\",\"type\":\"bytes\"},{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"new_nonce\",\"type\":\"int256\"},{\"name\":\"expires_in\",\"type\":\"int\"}],\"type\":\"P_Q_inner_data\"},{\"id\":\"2043348061\",\"predicate\":\"server_DH_params_fail\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"new_nonce_hash\",\"type\":\"int128\"}],\"type\":\"Server_DH_Params\"},{\"id\":\"-790100132\",\"predicate\":\"server_DH_params_ok\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"encrypted_answer\",\"type\":\"bytes\"}],\"type\":\"Server_DH_Params\"},{\"id\":\"-1249309254\",\"predicate\":\"server_DH_inner_data\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"g\",\"type\":\"int\"},{\"name\":\"dh_prime\",\"type\":\"bytes\"},{\"name\":\"g_a\",\"type\":\"bytes\"},{\"name\":\"server_time\",\"type\":\"int\"}],\"type\":\"Server_DH_inner_data\"},{\"id\":\"1715713620\",\"predicate\":\"client_DH_inner_data\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"retry_id\",\"type\":\"long\"},{\"name\":\"g_b\",\"type\":\"bytes\"}],\"type\":\"Client_DH_Inner_Data\"},{\"id\":\"1003222836\",\"predicate\":\"dh_gen_ok\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"new_nonce_hash1\",\"type\":\"int128\"}],\"type\":\"Set_client_DH_params_answer\"},{\"id\":\"1188831161\",\"predicate\":\"dh_gen_retry\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"new_nonce_hash2\",\"type\":\"int128\"}],\"type\":\"Set_client_DH_params_answer\"},{\"id\":\"-1499615742\",\"predicate\":\"dh_gen_fail\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"new_nonce_hash3\",\"type\":\"int128\"}],\"type\":\"Set_client_DH_params_answer\"},{\"id\":\"-212046591\",\"predicate\":\"rpc_result\",\"params\":[{\"name\":\"req_msg_id\",\"type\":\"long\"},{\"name\":\"result\",\"type\":\"Object\"}],\"type\":\"RpcResult\"},{\"id\":\"558156313\",\"predicate\":\"rpc_error\",\"params\":[{\"name\":\"error_code\",\"type\":\"int\"},{\"name\":\"error_message\",\"type\":\"string\"}],\"type\":\"RpcError\"},{\"id\":\"1579864942\",\"predicate\":\"rpc_answer_unknown\",\"params\":[],\"type\":\"RpcDropAnswer\"},{\"id\":\"-847714938\",\"predicate\":\"rpc_answer_dropped_running\",\"params\":[],\"type\":\"RpcDropAnswer\"},{\"id\":\"-1539647305\",\"predicate\":\"rpc_answer_dropped\",\"params\":[{\"name\":\"msg_id\",\"type\":\"long\"},{\"name\":\"seq_no\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"int\"}],\"type\":\"RpcDropAnswer\"},{\"id\":\"155834844\",\"predicate\":\"future_salt\",\"params\":[{\"name\":\"valid_since\",\"type\":\"int\"},{\"name\":\"valid_until\",\"type\":\"int\"},{\"name\":\"salt\",\"type\":\"long\"}],\"type\":\"FutureSalt\"},{\"id\":\"-1370486635\",\"predicate\":\"future_salts\",\"params\":[{\"name\":\"req_msg_id\",\"type\":\"long\"},{\"name\":\"now\",\"type\":\"int\"},{\"name\":\"salts\",\"type\":\"vector\"}],\"type\":\"FutureSalts\"},{\"id\":\"880243653\",\"predicate\":\"pong\",\"params\":[{\"name\":\"msg_id\",\"type\":\"long\"},{\"name\":\"ping_id\",\"type\":\"long\"}],\"type\":\"Pong\"},{\"id\":\"-501201412\",\"predicate\":\"destroy_session_ok\",\"params\":[{\"name\":\"session_id\",\"type\":\"long\"}],\"type\":\"DestroySessionRes\"},{\"id\":\"1658015945\",\"predicate\":\"destroy_session_none\",\"params\":[{\"name\":\"session_id\",\"type\":\"long\"}],\"type\":\"DestroySessionRes\"},{\"id\":\"-1631450872\",\"predicate\":\"new_session_created\",\"params\":[{\"name\":\"first_msg_id\",\"type\":\"long\"},{\"name\":\"unique_id\",\"type\":\"long\"},{\"name\":\"server_salt\",\"type\":\"long\"}],\"type\":\"NewSession\"},{\"id\":\"1945237724\",\"predicate\":\"msg_container\",\"params\":[{\"name\":\"messages\",\"type\":\"vector<%Message>\"}],\"type\":\"MessageContainer\"},{\"id\":\"1538843921\",\"predicate\":\"message\",\"params\":[{\"name\":\"msg_id\",\"type\":\"long\"},{\"name\":\"seqno\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"int\"},{\"name\":\"body\",\"type\":\"Object\"}],\"type\":\"Message\"},{\"id\":\"-530561358\",\"predicate\":\"msg_copy\",\"params\":[{\"name\":\"orig_message\",\"type\":\"Message\"}],\"type\":\"MessageCopy\"},{\"id\":\"812830625\",\"predicate\":\"gzip_packed\",\"params\":[{\"name\":\"packed_data\",\"type\":\"bytes\"}],\"type\":\"Object\"},{\"id\":\"1658238041\",\"predicate\":\"msgs_ack\",\"params\":[{\"name\":\"msg_ids\",\"type\":\"Vector\"}],\"type\":\"MsgsAck\"},{\"id\":\"-1477445615\",\"predicate\":\"bad_msg_notification\",\"params\":[{\"name\":\"bad_msg_id\",\"type\":\"long\"},{\"name\":\"bad_msg_seqno\",\"type\":\"int\"},{\"name\":\"error_code\",\"type\":\"int\"}],\"type\":\"BadMsgNotification\"},{\"id\":\"-307542917\",\"predicate\":\"bad_server_salt\",\"params\":[{\"name\":\"bad_msg_id\",\"type\":\"long\"},{\"name\":\"bad_msg_seqno\",\"type\":\"int\"},{\"name\":\"error_code\",\"type\":\"int\"},{\"name\":\"new_server_salt\",\"type\":\"long\"}],\"type\":\"BadMsgNotification\"},{\"id\":\"2105940488\",\"predicate\":\"msg_resend_req\",\"params\":[{\"name\":\"msg_ids\",\"type\":\"Vector\"}],\"type\":\"MsgResendReq\"},{\"id\":\"-630588590\",\"predicate\":\"msgs_state_req\",\"params\":[{\"name\":\"msg_ids\",\"type\":\"Vector\"}],\"type\":\"MsgsStateReq\"},{\"id\":\"81704317\",\"predicate\":\"msgs_state_info\",\"params\":[{\"name\":\"req_msg_id\",\"type\":\"long\"},{\"name\":\"info\",\"type\":\"bytes\"}],\"type\":\"MsgsStateInfo\"},{\"id\":\"-1933520591\",\"predicate\":\"msgs_all_info\",\"params\":[{\"name\":\"msg_ids\",\"type\":\"Vector\"},{\"name\":\"info\",\"type\":\"bytes\"}],\"type\":\"MsgsAllInfo\"},{\"id\":\"661470918\",\"predicate\":\"msg_detailed_info\",\"params\":[{\"name\":\"msg_id\",\"type\":\"long\"},{\"name\":\"answer_msg_id\",\"type\":\"long\"},{\"name\":\"bytes\",\"type\":\"int\"},{\"name\":\"status\",\"type\":\"int\"}],\"type\":\"MsgDetailedInfo\"},{\"id\":\"-2137147681\",\"predicate\":\"msg_new_detailed_info\",\"params\":[{\"name\":\"answer_msg_id\",\"type\":\"long\"},{\"name\":\"bytes\",\"type\":\"int\"},{\"name\":\"status\",\"type\":\"int\"}],\"type\":\"MsgDetailedInfo\"},{\"id\":\"1973679973\",\"predicate\":\"bind_auth_key_inner\",\"params\":[{\"name\":\"nonce\",\"type\":\"long\"},{\"name\":\"temp_auth_key_id\",\"type\":\"long\"},{\"name\":\"perm_auth_key_id\",\"type\":\"long\"},{\"name\":\"temp_session_id\",\"type\":\"long\"},{\"name\":\"expires_at\",\"type\":\"int\"}],\"type\":\"BindAuthKeyInner\"}],\"methods\":[{\"id\":\"3195965169\",\"method\":\"req_pq_multi\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"}],\"type\":\"ResPQ\"},{\"id\":\"1615239032\",\"method\":\"req_pq\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"}],\"type\":\"ResPQ\"},{\"id\":\"-686627650\",\"method\":\"req_DH_params\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"p\",\"type\":\"bytes\"},{\"name\":\"q\",\"type\":\"bytes\"},{\"name\":\"public_key_fingerprint\",\"type\":\"long\"},{\"name\":\"encrypted_data\",\"type\":\"bytes\"}],\"type\":\"Server_DH_Params\"},{\"id\":\"-184262881\",\"method\":\"set_client_DH_params\",\"params\":[{\"name\":\"nonce\",\"type\":\"int128\"},{\"name\":\"server_nonce\",\"type\":\"int128\"},{\"name\":\"encrypted_data\",\"type\":\"bytes\"}],\"type\":\"Set_client_DH_params_answer\"},{\"id\":\"1491380032\",\"method\":\"rpc_drop_answer\",\"params\":[{\"name\":\"req_msg_id\",\"type\":\"long\"}],\"type\":\"RpcDropAnswer\"},{\"id\":\"-1188971260\",\"method\":\"get_future_salts\",\"params\":[{\"name\":\"num\",\"type\":\"int\"}],\"type\":\"FutureSalts\"},{\"id\":\"2059302892\",\"method\":\"ping\",\"params\":[{\"name\":\"ping_id\",\"type\":\"long\"}],\"type\":\"Pong\"},{\"id\":\"-213746804\",\"method\":\"ping_delay_disconnect\",\"params\":[{\"name\":\"ping_id\",\"type\":\"long\"},{\"name\":\"disconnect_delay\",\"type\":\"int\"}],\"type\":\"Pong\"},{\"id\":\"-414113498\",\"method\":\"destroy_session\",\"params\":[{\"name\":\"session_id\",\"type\":\"long\"}],\"type\":\"DestroySessionRes\"},{\"id\":\"-1835453025\",\"method\":\"http_wait\",\"params\":[{\"name\":\"max_delay\",\"type\":\"int\"},{\"name\":\"wait_after\",\"type\":\"int\"},{\"name\":\"max_wait\",\"type\":\"int\"}],\"type\":\"HttpWait\"}]};\r\n\r\nConfig.Schema.API = {\"constructors\":[{\"id\":\"-1132882121\",\"predicate\":\"boolFalse\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"-1720552011\",\"predicate\":\"boolTrue\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"1072550713\",\"predicate\":\"true\",\"params\":[],\"type\":\"True\"},{\"id\":\"481674261\",\"predicate\":\"vector\",\"params\":[],\"type\":\"Vector t\"},{\"id\":\"-994444869\",\"predicate\":\"error\",\"params\":[{\"name\":\"code\",\"type\":\"int\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"Error\"},{\"id\":\"1450380236\",\"predicate\":\"null\",\"params\":[],\"type\":\"Null\"},{\"id\":\"2134579434\",\"predicate\":\"inputPeerEmpty\",\"params\":[],\"type\":\"InputPeer\"},{\"id\":\"2107670217\",\"predicate\":\"inputPeerSelf\",\"params\":[],\"type\":\"InputPeer\"},{\"id\":\"396093539\",\"predicate\":\"inputPeerChat\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"}],\"type\":\"InputPeer\"},{\"id\":\"-1182234929\",\"predicate\":\"inputUserEmpty\",\"params\":[],\"type\":\"InputUser\"},{\"id\":\"-138301121\",\"predicate\":\"inputUserSelf\",\"params\":[],\"type\":\"InputUser\"},{\"id\":\"-208488460\",\"predicate\":\"inputPhoneContact\",\"params\":[{\"name\":\"client_id\",\"type\":\"long\"},{\"name\":\"phone\",\"type\":\"string\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"}],\"type\":\"InputContact\"},{\"id\":\"-181407105\",\"predicate\":\"inputFile\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"parts\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"md5_checksum\",\"type\":\"string\"}],\"type\":\"InputFile\"},{\"id\":\"-1771768449\",\"predicate\":\"inputMediaEmpty\",\"params\":[],\"type\":\"InputMedia\"},{\"id\":\"505969924\",\"predicate\":\"inputMediaUploadedPhoto\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"file\",\"type\":\"InputFile\"},{\"name\":\"stickers\",\"type\":\"flags.0?Vector\"},{\"name\":\"ttl_seconds\",\"type\":\"flags.1?int\"}],\"type\":\"InputMedia\"},{\"id\":\"-1279654347\",\"predicate\":\"inputMediaPhoto\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"InputPhoto\"},{\"name\":\"ttl_seconds\",\"type\":\"flags.0?int\"}],\"type\":\"InputMedia\"},{\"id\":\"-104578748\",\"predicate\":\"inputMediaGeoPoint\",\"params\":[{\"name\":\"geo_point\",\"type\":\"InputGeoPoint\"}],\"type\":\"InputMedia\"},{\"id\":\"-122978821\",\"predicate\":\"inputMediaContact\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"},{\"name\":\"vcard\",\"type\":\"string\"}],\"type\":\"InputMedia\"},{\"id\":\"480546647\",\"predicate\":\"inputChatPhotoEmpty\",\"params\":[],\"type\":\"InputChatPhoto\"},{\"id\":\"-1837345356\",\"predicate\":\"inputChatUploadedPhoto\",\"params\":[{\"name\":\"file\",\"type\":\"InputFile\"}],\"type\":\"InputChatPhoto\"},{\"id\":\"-1991004873\",\"predicate\":\"inputChatPhoto\",\"params\":[{\"name\":\"id\",\"type\":\"InputPhoto\"}],\"type\":\"InputChatPhoto\"},{\"id\":\"-457104426\",\"predicate\":\"inputGeoPointEmpty\",\"params\":[],\"type\":\"InputGeoPoint\"},{\"id\":\"-206066487\",\"predicate\":\"inputGeoPoint\",\"params\":[{\"name\":\"lat\",\"type\":\"double\"},{\"name\":\"long\",\"type\":\"double\"}],\"type\":\"InputGeoPoint\"},{\"id\":\"483901197\",\"predicate\":\"inputPhotoEmpty\",\"params\":[],\"type\":\"InputPhoto\"},{\"id\":\"1001634122\",\"predicate\":\"inputPhoto\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"file_reference\",\"type\":\"bytes\"}],\"type\":\"InputPhoto\"},{\"id\":\"-539317279\",\"predicate\":\"inputFileLocation\",\"params\":[{\"name\":\"volume_id\",\"type\":\"long\"},{\"name\":\"local_id\",\"type\":\"int\"},{\"name\":\"secret\",\"type\":\"long\"},{\"name\":\"file_reference\",\"type\":\"bytes\"}],\"type\":\"InputFileLocation\"},{\"id\":\"-1649296275\",\"predicate\":\"peerUser\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"}],\"type\":\"Peer\"},{\"id\":\"-1160714821\",\"predicate\":\"peerChat\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"}],\"type\":\"Peer\"},{\"id\":\"-1432995067\",\"predicate\":\"storage.fileUnknown\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"1086091090\",\"predicate\":\"storage.filePartial\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"8322574\",\"predicate\":\"storage.fileJpeg\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"-891180321\",\"predicate\":\"storage.fileGif\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"172975040\",\"predicate\":\"storage.filePng\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"-1373745011\",\"predicate\":\"storage.filePdf\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"1384777335\",\"predicate\":\"storage.fileMp3\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"1258941372\",\"predicate\":\"storage.fileMov\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"-1278304028\",\"predicate\":\"storage.fileMp4\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"276907596\",\"predicate\":\"storage.fileWebp\",\"params\":[],\"type\":\"storage.FileType\"},{\"id\":\"537022650\",\"predicate\":\"userEmpty\",\"params\":[{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"User\"},{\"id\":\"1326562017\",\"predicate\":\"userProfilePhotoEmpty\",\"params\":[],\"type\":\"UserProfilePhoto\"},{\"id\":\"-321430132\",\"predicate\":\"userProfilePhoto\",\"params\":[{\"name\":\"photo_id\",\"type\":\"long\"},{\"name\":\"photo_small\",\"type\":\"FileLocation\"},{\"name\":\"photo_big\",\"type\":\"FileLocation\"},{\"name\":\"dc_id\",\"type\":\"int\"}],\"type\":\"UserProfilePhoto\"},{\"id\":\"164646985\",\"predicate\":\"userStatusEmpty\",\"params\":[],\"type\":\"UserStatus\"},{\"id\":\"-306628279\",\"predicate\":\"userStatusOnline\",\"params\":[{\"name\":\"expires\",\"type\":\"int\"}],\"type\":\"UserStatus\"},{\"id\":\"9203775\",\"predicate\":\"userStatusOffline\",\"params\":[{\"name\":\"was_online\",\"type\":\"int\"}],\"type\":\"UserStatus\"},{\"id\":\"-1683826688\",\"predicate\":\"chatEmpty\",\"params\":[{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"Chat\"},{\"id\":\"1004149726\",\"predicate\":\"chat\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"creator\",\"type\":\"flags.0?true\"},{\"name\":\"kicked\",\"type\":\"flags.1?true\"},{\"name\":\"left\",\"type\":\"flags.2?true\"},{\"name\":\"deactivated\",\"type\":\"flags.5?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"ChatPhoto\"},{\"name\":\"participants_count\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"version\",\"type\":\"int\"},{\"name\":\"migrated_to\",\"type\":\"flags.6?InputChannel\"},{\"name\":\"admin_rights\",\"type\":\"flags.14?ChatAdminRights\"},{\"name\":\"default_banned_rights\",\"type\":\"flags.18?ChatBannedRights\"}],\"type\":\"Chat\"},{\"id\":\"120753115\",\"predicate\":\"chatForbidden\",\"params\":[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"title\",\"type\":\"string\"}],\"type\":\"Chat\"},{\"id\":\"461151667\",\"predicate\":\"chatFull\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"can_set_username\",\"type\":\"flags.7?true\"},{\"name\":\"has_scheduled\",\"type\":\"flags.8?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"about\",\"type\":\"string\"},{\"name\":\"participants\",\"type\":\"ChatParticipants\"},{\"name\":\"chat_photo\",\"type\":\"flags.2?Photo\"},{\"name\":\"notify_settings\",\"type\":\"PeerNotifySettings\"},{\"name\":\"exported_invite\",\"type\":\"ExportedChatInvite\"},{\"name\":\"bot_info\",\"type\":\"flags.3?Vector\"},{\"name\":\"pinned_msg_id\",\"type\":\"flags.6?int\"},{\"name\":\"folder_id\",\"type\":\"flags.11?int\"}],\"type\":\"ChatFull\"},{\"id\":\"-925415106\",\"predicate\":\"chatParticipant\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"inviter_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"ChatParticipant\"},{\"id\":\"-57668565\",\"predicate\":\"chatParticipantsForbidden\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"self_participant\",\"type\":\"flags.0?ChatParticipant\"}],\"type\":\"ChatParticipants\"},{\"id\":\"1061556205\",\"predicate\":\"chatParticipants\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"participants\",\"type\":\"Vector\"},{\"name\":\"version\",\"type\":\"int\"}],\"type\":\"ChatParticipants\"},{\"id\":\"935395612\",\"predicate\":\"chatPhotoEmpty\",\"params\":[],\"type\":\"ChatPhoto\"},{\"id\":\"1197267925\",\"predicate\":\"chatPhoto\",\"params\":[{\"name\":\"photo_small\",\"type\":\"FileLocation\"},{\"name\":\"photo_big\",\"type\":\"FileLocation\"},{\"name\":\"dc_id\",\"type\":\"int\"}],\"type\":\"ChatPhoto\"},{\"id\":\"-2082087340\",\"predicate\":\"messageEmpty\",\"params\":[{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"Message\"},{\"id\":\"1160515173\",\"predicate\":\"message\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"out\",\"type\":\"flags.1?true\"},{\"name\":\"mentioned\",\"type\":\"flags.4?true\"},{\"name\":\"media_unread\",\"type\":\"flags.5?true\"},{\"name\":\"silent\",\"type\":\"flags.13?true\"},{\"name\":\"post\",\"type\":\"flags.14?true\"},{\"name\":\"from_scheduled\",\"type\":\"flags.18?true\"},{\"name\":\"legacy\",\"type\":\"flags.19?true\"},{\"name\":\"edit_hide\",\"type\":\"flags.21?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"from_id\",\"type\":\"flags.8?int\"},{\"name\":\"to_id\",\"type\":\"Peer\"},{\"name\":\"fwd_from\",\"type\":\"flags.2?MessageFwdHeader\"},{\"name\":\"via_bot_id\",\"type\":\"flags.11?int\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.3?int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"media\",\"type\":\"flags.9?MessageMedia\"},{\"name\":\"reply_markup\",\"type\":\"flags.6?ReplyMarkup\"},{\"name\":\"entities\",\"type\":\"flags.7?Vector\"},{\"name\":\"views\",\"type\":\"flags.10?int\"},{\"name\":\"edit_date\",\"type\":\"flags.15?int\"},{\"name\":\"post_author\",\"type\":\"flags.16?string\"},{\"name\":\"grouped_id\",\"type\":\"flags.17?long\"},{\"name\":\"restriction_reason\",\"type\":\"flags.22?Vector\"}],\"type\":\"Message\"},{\"id\":\"-1642487306\",\"predicate\":\"messageService\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"out\",\"type\":\"flags.1?true\"},{\"name\":\"mentioned\",\"type\":\"flags.4?true\"},{\"name\":\"media_unread\",\"type\":\"flags.5?true\"},{\"name\":\"silent\",\"type\":\"flags.13?true\"},{\"name\":\"post\",\"type\":\"flags.14?true\"},{\"name\":\"legacy\",\"type\":\"flags.19?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"from_id\",\"type\":\"flags.8?int\"},{\"name\":\"to_id\",\"type\":\"Peer\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.3?int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"action\",\"type\":\"MessageAction\"}],\"type\":\"Message\"},{\"id\":\"1038967584\",\"predicate\":\"messageMediaEmpty\",\"params\":[],\"type\":\"MessageMedia\"},{\"id\":\"1766936791\",\"predicate\":\"messageMediaPhoto\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"photo\",\"type\":\"flags.0?Photo\"},{\"name\":\"ttl_seconds\",\"type\":\"flags.2?int\"}],\"type\":\"MessageMedia\"},{\"id\":\"1457575028\",\"predicate\":\"messageMediaGeo\",\"params\":[{\"name\":\"geo\",\"type\":\"GeoPoint\"}],\"type\":\"MessageMedia\"},{\"id\":\"-873313984\",\"predicate\":\"messageMediaContact\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"},{\"name\":\"vcard\",\"type\":\"string\"},{\"name\":\"user_id\",\"type\":\"int\"}],\"type\":\"MessageMedia\"},{\"id\":\"-1618676578\",\"predicate\":\"messageMediaUnsupported\",\"params\":[],\"type\":\"MessageMedia\"},{\"id\":\"-1230047312\",\"predicate\":\"messageActionEmpty\",\"params\":[],\"type\":\"MessageAction\"},{\"id\":\"-1503425638\",\"predicate\":\"messageActionChatCreate\",\"params\":[{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"MessageAction\"},{\"id\":\"-1247687078\",\"predicate\":\"messageActionChatEditTitle\",\"params\":[{\"name\":\"title\",\"type\":\"string\"}],\"type\":\"MessageAction\"},{\"id\":\"2144015272\",\"predicate\":\"messageActionChatEditPhoto\",\"params\":[{\"name\":\"photo\",\"type\":\"Photo\"}],\"type\":\"MessageAction\"},{\"id\":\"-1780220945\",\"predicate\":\"messageActionChatDeletePhoto\",\"params\":[],\"type\":\"MessageAction\"},{\"id\":\"1217033015\",\"predicate\":\"messageActionChatAddUser\",\"params\":[{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"MessageAction\"},{\"id\":\"-1297179892\",\"predicate\":\"messageActionChatDeleteUser\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"}],\"type\":\"MessageAction\"},{\"id\":\"739712882\",\"predicate\":\"dialog\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"pinned\",\"type\":\"flags.2?true\"},{\"name\":\"unread_mark\",\"type\":\"flags.3?true\"},{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"top_message\",\"type\":\"int\"},{\"name\":\"read_inbox_max_id\",\"type\":\"int\"},{\"name\":\"read_outbox_max_id\",\"type\":\"int\"},{\"name\":\"unread_count\",\"type\":\"int\"},{\"name\":\"unread_mentions_count\",\"type\":\"int\"},{\"name\":\"notify_settings\",\"type\":\"PeerNotifySettings\"},{\"name\":\"pts\",\"type\":\"flags.0?int\"},{\"name\":\"draft\",\"type\":\"flags.1?DraftMessage\"},{\"name\":\"folder_id\",\"type\":\"flags.4?int\"}],\"type\":\"Dialog\"},{\"id\":\"590459437\",\"predicate\":\"photoEmpty\",\"params\":[{\"name\":\"id\",\"type\":\"long\"}],\"type\":\"Photo\"},{\"id\":\"-797637467\",\"predicate\":\"photo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"has_stickers\",\"type\":\"flags.0?true\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"file_reference\",\"type\":\"bytes\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"sizes\",\"type\":\"Vector\"},{\"name\":\"dc_id\",\"type\":\"int\"}],\"type\":\"Photo\"},{\"id\":\"236446268\",\"predicate\":\"photoSizeEmpty\",\"params\":[{\"name\":\"type\",\"type\":\"string\"}],\"type\":\"PhotoSize\"},{\"id\":\"2009052699\",\"predicate\":\"photoSize\",\"params\":[{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"location\",\"type\":\"FileLocation\"},{\"name\":\"w\",\"type\":\"int\"},{\"name\":\"h\",\"type\":\"int\"},{\"name\":\"size\",\"type\":\"int\"}],\"type\":\"PhotoSize\"},{\"id\":\"-374917894\",\"predicate\":\"photoCachedSize\",\"params\":[{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"location\",\"type\":\"FileLocation\"},{\"name\":\"w\",\"type\":\"int\"},{\"name\":\"h\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"PhotoSize\"},{\"id\":\"286776671\",\"predicate\":\"geoPointEmpty\",\"params\":[],\"type\":\"GeoPoint\"},{\"id\":\"43446532\",\"predicate\":\"geoPoint\",\"params\":[{\"name\":\"long\",\"type\":\"double\"},{\"name\":\"lat\",\"type\":\"double\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"GeoPoint\"},{\"id\":\"1577067778\",\"predicate\":\"auth.sentCode\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"type\",\"type\":\"auth.SentCodeType\"},{\"name\":\"phone_code_hash\",\"type\":\"string\"},{\"name\":\"next_type\",\"type\":\"flags.1?auth.CodeType\"},{\"name\":\"timeout\",\"type\":\"flags.2?int\"}],\"type\":\"auth.SentCode\"},{\"id\":\"-855308010\",\"predicate\":\"auth.authorization\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"tmp_sessions\",\"type\":\"flags.0?int\"},{\"name\":\"user\",\"type\":\"User\"}],\"type\":\"auth.Authorization\"},{\"id\":\"-543777747\",\"predicate\":\"auth.exportedAuthorization\",\"params\":[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"auth.ExportedAuthorization\"},{\"id\":\"-1195615476\",\"predicate\":\"inputNotifyPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"InputNotifyPeer\"},{\"id\":\"423314455\",\"predicate\":\"inputNotifyUsers\",\"params\":[],\"type\":\"InputNotifyPeer\"},{\"id\":\"1251338318\",\"predicate\":\"inputNotifyChats\",\"params\":[],\"type\":\"InputNotifyPeer\"},{\"id\":\"-1673717362\",\"predicate\":\"inputPeerNotifySettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"show_previews\",\"type\":\"flags.0?Bool\"},{\"name\":\"silent\",\"type\":\"flags.1?Bool\"},{\"name\":\"mute_until\",\"type\":\"flags.2?int\"},{\"name\":\"sound\",\"type\":\"flags.3?string\"}],\"type\":\"InputPeerNotifySettings\"},{\"id\":\"-1353671392\",\"predicate\":\"peerNotifySettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"show_previews\",\"type\":\"flags.0?Bool\"},{\"name\":\"silent\",\"type\":\"flags.1?Bool\"},{\"name\":\"mute_until\",\"type\":\"flags.2?int\"},{\"name\":\"sound\",\"type\":\"flags.3?string\"}],\"type\":\"PeerNotifySettings\"},{\"id\":\"-2122045747\",\"predicate\":\"peerSettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"report_spam\",\"type\":\"flags.0?true\"},{\"name\":\"add_contact\",\"type\":\"flags.1?true\"},{\"name\":\"block_contact\",\"type\":\"flags.2?true\"},{\"name\":\"share_contact\",\"type\":\"flags.3?true\"},{\"name\":\"need_contacts_exception\",\"type\":\"flags.4?true\"},{\"name\":\"report_geo\",\"type\":\"flags.5?true\"}],\"type\":\"PeerSettings\"},{\"id\":\"-1539849235\",\"predicate\":\"wallPaper\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"creator\",\"type\":\"flags.0?true\"},{\"name\":\"default\",\"type\":\"flags.1?true\"},{\"name\":\"pattern\",\"type\":\"flags.3?true\"},{\"name\":\"dark\",\"type\":\"flags.4?true\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"slug\",\"type\":\"string\"},{\"name\":\"document\",\"type\":\"Document\"},{\"name\":\"settings\",\"type\":\"flags.2?WallPaperSettings\"}],\"type\":\"WallPaper\"},{\"id\":\"1490799288\",\"predicate\":\"inputReportReasonSpam\",\"params\":[],\"type\":\"ReportReason\"},{\"id\":\"505595789\",\"predicate\":\"inputReportReasonViolence\",\"params\":[],\"type\":\"ReportReason\"},{\"id\":\"777640226\",\"predicate\":\"inputReportReasonPornography\",\"params\":[],\"type\":\"ReportReason\"},{\"id\":\"-1376497949\",\"predicate\":\"inputReportReasonChildAbuse\",\"params\":[],\"type\":\"ReportReason\"},{\"id\":\"-512463606\",\"predicate\":\"inputReportReasonOther\",\"params\":[{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"ReportReason\"},{\"id\":\"-302941166\",\"predicate\":\"userFull\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"blocked\",\"type\":\"flags.0?true\"},{\"name\":\"phone_calls_available\",\"type\":\"flags.4?true\"},{\"name\":\"phone_calls_private\",\"type\":\"flags.5?true\"},{\"name\":\"can_pin_message\",\"type\":\"flags.7?true\"},{\"name\":\"has_scheduled\",\"type\":\"flags.12?true\"},{\"name\":\"user\",\"type\":\"User\"},{\"name\":\"about\",\"type\":\"flags.1?string\"},{\"name\":\"settings\",\"type\":\"PeerSettings\"},{\"name\":\"profile_photo\",\"type\":\"flags.2?Photo\"},{\"name\":\"notify_settings\",\"type\":\"PeerNotifySettings\"},{\"name\":\"bot_info\",\"type\":\"flags.3?BotInfo\"},{\"name\":\"pinned_msg_id\",\"type\":\"flags.6?int\"},{\"name\":\"common_chats_count\",\"type\":\"int\"},{\"name\":\"folder_id\",\"type\":\"flags.11?int\"}],\"type\":\"UserFull\"},{\"id\":\"-116274796\",\"predicate\":\"contact\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"mutual\",\"type\":\"Bool\"}],\"type\":\"Contact\"},{\"id\":\"-805141448\",\"predicate\":\"importedContact\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"client_id\",\"type\":\"long\"}],\"type\":\"ImportedContact\"},{\"id\":\"1444661369\",\"predicate\":\"contactBlocked\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"ContactBlocked\"},{\"id\":\"-748155807\",\"predicate\":\"contactStatus\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"status\",\"type\":\"UserStatus\"}],\"type\":\"ContactStatus\"},{\"id\":\"-1219778094\",\"predicate\":\"contacts.contactsNotModified\",\"params\":[],\"type\":\"contacts.Contacts\"},{\"id\":\"-353862078\",\"predicate\":\"contacts.contacts\",\"params\":[{\"name\":\"contacts\",\"type\":\"Vector\"},{\"name\":\"saved_count\",\"type\":\"int\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"contacts.Contacts\"},{\"id\":\"2010127419\",\"predicate\":\"contacts.importedContacts\",\"params\":[{\"name\":\"imported\",\"type\":\"Vector\"},{\"name\":\"popular_invites\",\"type\":\"Vector\"},{\"name\":\"retry_contacts\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"contacts.ImportedContacts\"},{\"id\":\"471043349\",\"predicate\":\"contacts.blocked\",\"params\":[{\"name\":\"blocked\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"contacts.Blocked\"},{\"id\":\"-1878523231\",\"predicate\":\"contacts.blockedSlice\",\"params\":[{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"blocked\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"contacts.Blocked\"},{\"id\":\"364538944\",\"predicate\":\"messages.dialogs\",\"params\":[{\"name\":\"dialogs\",\"type\":\"Vector\"},{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"messages.Dialogs\"},{\"id\":\"1910543603\",\"predicate\":\"messages.dialogsSlice\",\"params\":[{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"dialogs\",\"type\":\"Vector\"},{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"messages.Dialogs\"},{\"id\":\"-1938715001\",\"predicate\":\"messages.messages\",\"params\":[{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"messages.Messages\"},{\"id\":\"-923939298\",\"predicate\":\"messages.messagesSlice\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"inexact\",\"type\":\"flags.1?true\"},{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"next_rate\",\"type\":\"flags.0?int\"},{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"messages.Messages\"},{\"id\":\"1694474197\",\"predicate\":\"messages.chats\",\"params\":[{\"name\":\"chats\",\"type\":\"Vector\"}],\"type\":\"messages.Chats\"},{\"id\":\"-438840932\",\"predicate\":\"messages.chatFull\",\"params\":[{\"name\":\"full_chat\",\"type\":\"ChatFull\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"messages.ChatFull\"},{\"id\":\"-1269012015\",\"predicate\":\"messages.affectedHistory\",\"params\":[{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"},{\"name\":\"offset\",\"type\":\"int\"}],\"type\":\"messages.AffectedHistory\"},{\"id\":\"1474492012\",\"predicate\":\"inputMessagesFilterEmpty\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"-1777752804\",\"predicate\":\"inputMessagesFilterPhotos\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"-1614803355\",\"predicate\":\"inputMessagesFilterVideo\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"1458172132\",\"predicate\":\"inputMessagesFilterPhotoVideo\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"-1629621880\",\"predicate\":\"inputMessagesFilterDocument\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"2129714567\",\"predicate\":\"inputMessagesFilterUrl\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"-3644025\",\"predicate\":\"inputMessagesFilterGif\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"522914557\",\"predicate\":\"updateNewMessage\",\"params\":[{\"name\":\"message\",\"type\":\"Message\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"1318109142\",\"predicate\":\"updateMessageID\",\"params\":[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"random_id\",\"type\":\"long\"}],\"type\":\"Update\"},{\"id\":\"-1576161051\",\"predicate\":\"updateDeleteMessages\",\"params\":[{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"1548249383\",\"predicate\":\"updateUserTyping\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"action\",\"type\":\"SendMessageAction\"}],\"type\":\"Update\"},{\"id\":\"-1704596961\",\"predicate\":\"updateChatUserTyping\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"action\",\"type\":\"SendMessageAction\"}],\"type\":\"Update\"},{\"id\":\"125178264\",\"predicate\":\"updateChatParticipants\",\"params\":[{\"name\":\"participants\",\"type\":\"ChatParticipants\"}],\"type\":\"Update\"},{\"id\":\"469489699\",\"predicate\":\"updateUserStatus\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"status\",\"type\":\"UserStatus\"}],\"type\":\"Update\"},{\"id\":\"-1489818765\",\"predicate\":\"updateUserName\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"},{\"name\":\"username\",\"type\":\"string\"}],\"type\":\"Update\"},{\"id\":\"-1791935732\",\"predicate\":\"updateUserPhoto\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"photo\",\"type\":\"UserProfilePhoto\"},{\"name\":\"previous\",\"type\":\"Bool\"}],\"type\":\"Update\"},{\"id\":\"-1519637954\",\"predicate\":\"updates.state\",\"params\":[{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"qts\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"seq\",\"type\":\"int\"},{\"name\":\"unread_count\",\"type\":\"int\"}],\"type\":\"updates.State\"},{\"id\":\"1567990072\",\"predicate\":\"updates.differenceEmpty\",\"params\":[{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"seq\",\"type\":\"int\"}],\"type\":\"updates.Difference\"},{\"id\":\"16030880\",\"predicate\":\"updates.difference\",\"params\":[{\"name\":\"new_messages\",\"type\":\"Vector\"},{\"name\":\"new_encrypted_messages\",\"type\":\"Vector\"},{\"name\":\"other_updates\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"},{\"name\":\"state\",\"type\":\"updates.State\"}],\"type\":\"updates.Difference\"},{\"id\":\"-1459938943\",\"predicate\":\"updates.differenceSlice\",\"params\":[{\"name\":\"new_messages\",\"type\":\"Vector\"},{\"name\":\"new_encrypted_messages\",\"type\":\"Vector\"},{\"name\":\"other_updates\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"},{\"name\":\"intermediate_state\",\"type\":\"updates.State\"}],\"type\":\"updates.Difference\"},{\"id\":\"-484987010\",\"predicate\":\"updatesTooLong\",\"params\":[],\"type\":\"Updates\"},{\"id\":\"-1857044719\",\"predicate\":\"updateShortMessage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"out\",\"type\":\"flags.1?true\"},{\"name\":\"mentioned\",\"type\":\"flags.4?true\"},{\"name\":\"media_unread\",\"type\":\"flags.5?true\"},{\"name\":\"silent\",\"type\":\"flags.13?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"fwd_from\",\"type\":\"flags.2?MessageFwdHeader\"},{\"name\":\"via_bot_id\",\"type\":\"flags.11?int\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.3?int\"},{\"name\":\"entities\",\"type\":\"flags.7?Vector\"}],\"type\":\"Updates\"},{\"id\":\"377562760\",\"predicate\":\"updateShortChatMessage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"out\",\"type\":\"flags.1?true\"},{\"name\":\"mentioned\",\"type\":\"flags.4?true\"},{\"name\":\"media_unread\",\"type\":\"flags.5?true\"},{\"name\":\"silent\",\"type\":\"flags.13?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"from_id\",\"type\":\"int\"},{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"fwd_from\",\"type\":\"flags.2?MessageFwdHeader\"},{\"name\":\"via_bot_id\",\"type\":\"flags.11?int\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.3?int\"},{\"name\":\"entities\",\"type\":\"flags.7?Vector\"}],\"type\":\"Updates\"},{\"id\":\"2027216577\",\"predicate\":\"updateShort\",\"params\":[{\"name\":\"update\",\"type\":\"Update\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"1918567619\",\"predicate\":\"updatesCombined\",\"params\":[{\"name\":\"updates\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"seq_start\",\"type\":\"int\"},{\"name\":\"seq\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"1957577280\",\"predicate\":\"updates\",\"params\":[{\"name\":\"updates\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"seq\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"-1916114267\",\"predicate\":\"photos.photos\",\"params\":[{\"name\":\"photos\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"photos.Photos\"},{\"id\":\"352657236\",\"predicate\":\"photos.photosSlice\",\"params\":[{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"photos\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"photos.Photos\"},{\"id\":\"539045032\",\"predicate\":\"photos.photo\",\"params\":[{\"name\":\"photo\",\"type\":\"Photo\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"photos.Photo\"},{\"id\":\"157948117\",\"predicate\":\"upload.file\",\"params\":[{\"name\":\"type\",\"type\":\"storage.FileType\"},{\"name\":\"mtime\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"upload.File\"},{\"id\":\"414687501\",\"predicate\":\"dcOption\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"ipv6\",\"type\":\"flags.0?true\"},{\"name\":\"media_only\",\"type\":\"flags.1?true\"},{\"name\":\"tcpo_only\",\"type\":\"flags.2?true\"},{\"name\":\"cdn\",\"type\":\"flags.3?true\"},{\"name\":\"static\",\"type\":\"flags.4?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ip_address\",\"type\":\"string\"},{\"name\":\"port\",\"type\":\"int\"},{\"name\":\"secret\",\"type\":\"flags.10?bytes\"}],\"type\":\"DcOption\"},{\"id\":\"856375399\",\"predicate\":\"config\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"phonecalls_enabled\",\"type\":\"flags.1?true\"},{\"name\":\"default_p2p_contacts\",\"type\":\"flags.3?true\"},{\"name\":\"preload_featured_stickers\",\"type\":\"flags.4?true\"},{\"name\":\"ignore_phone_entities\",\"type\":\"flags.5?true\"},{\"name\":\"revoke_pm_inbox\",\"type\":\"flags.6?true\"},{\"name\":\"blocked_mode\",\"type\":\"flags.8?true\"},{\"name\":\"pfs_enabled\",\"type\":\"flags.13?true\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"expires\",\"type\":\"int\"},{\"name\":\"test_mode\",\"type\":\"Bool\"},{\"name\":\"this_dc\",\"type\":\"int\"},{\"name\":\"dc_options\",\"type\":\"Vector\"},{\"name\":\"dc_txt_domain_name\",\"type\":\"string\"},{\"name\":\"chat_size_max\",\"type\":\"int\"},{\"name\":\"megagroup_size_max\",\"type\":\"int\"},{\"name\":\"forwarded_count_max\",\"type\":\"int\"},{\"name\":\"online_update_period_ms\",\"type\":\"int\"},{\"name\":\"offline_blur_timeout_ms\",\"type\":\"int\"},{\"name\":\"offline_idle_timeout_ms\",\"type\":\"int\"},{\"name\":\"online_cloud_timeout_ms\",\"type\":\"int\"},{\"name\":\"notify_cloud_delay_ms\",\"type\":\"int\"},{\"name\":\"notify_default_delay_ms\",\"type\":\"int\"},{\"name\":\"push_chat_period_ms\",\"type\":\"int\"},{\"name\":\"push_chat_limit\",\"type\":\"int\"},{\"name\":\"saved_gifs_limit\",\"type\":\"int\"},{\"name\":\"edit_time_limit\",\"type\":\"int\"},{\"name\":\"revoke_time_limit\",\"type\":\"int\"},{\"name\":\"revoke_pm_time_limit\",\"type\":\"int\"},{\"name\":\"rating_e_decay\",\"type\":\"int\"},{\"name\":\"stickers_recent_limit\",\"type\":\"int\"},{\"name\":\"stickers_faved_limit\",\"type\":\"int\"},{\"name\":\"channels_read_media_period\",\"type\":\"int\"},{\"name\":\"tmp_sessions\",\"type\":\"flags.0?int\"},{\"name\":\"pinned_dialogs_count_max\",\"type\":\"int\"},{\"name\":\"pinned_infolder_count_max\",\"type\":\"int\"},{\"name\":\"call_receive_timeout_ms\",\"type\":\"int\"},{\"name\":\"call_ring_timeout_ms\",\"type\":\"int\"},{\"name\":\"call_connect_timeout_ms\",\"type\":\"int\"},{\"name\":\"call_packet_timeout_ms\",\"type\":\"int\"},{\"name\":\"me_url_prefix\",\"type\":\"string\"},{\"name\":\"autoupdate_url_prefix\",\"type\":\"flags.7?string\"},{\"name\":\"gif_search_username\",\"type\":\"flags.9?string\"},{\"name\":\"venue_search_username\",\"type\":\"flags.10?string\"},{\"name\":\"img_search_username\",\"type\":\"flags.11?string\"},{\"name\":\"static_maps_provider\",\"type\":\"flags.12?string\"},{\"name\":\"caption_length_max\",\"type\":\"int\"},{\"name\":\"message_length_max\",\"type\":\"int\"},{\"name\":\"webfile_dc_id\",\"type\":\"int\"},{\"name\":\"suggested_lang_code\",\"type\":\"flags.2?string\"},{\"name\":\"lang_pack_version\",\"type\":\"flags.2?int\"},{\"name\":\"base_lang_pack_version\",\"type\":\"flags.2?int\"}],\"type\":\"Config\"},{\"id\":\"-1910892683\",\"predicate\":\"nearestDc\",\"params\":[{\"name\":\"country\",\"type\":\"string\"},{\"name\":\"this_dc\",\"type\":\"int\"},{\"name\":\"nearest_dc\",\"type\":\"int\"}],\"type\":\"NearestDc\"},{\"id\":\"497489295\",\"predicate\":\"help.appUpdate\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"can_not_skip\",\"type\":\"flags.0?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"version\",\"type\":\"string\"},{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"Vector\"},{\"name\":\"document\",\"type\":\"flags.1?Document\"},{\"name\":\"url\",\"type\":\"flags.2?string\"}],\"type\":\"help.AppUpdate\"},{\"id\":\"-1000708810\",\"predicate\":\"help.noAppUpdate\",\"params\":[],\"type\":\"help.AppUpdate\"},{\"id\":\"415997816\",\"predicate\":\"help.inviteText\",\"params\":[{\"name\":\"message\",\"type\":\"string\"}],\"type\":\"help.InviteText\"},{\"id\":\"314359194\",\"predicate\":\"updateNewEncryptedMessage\",\"params\":[{\"name\":\"message\",\"type\":\"EncryptedMessage\"},{\"name\":\"qts\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"386986326\",\"predicate\":\"updateEncryptedChatTyping\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1264392051\",\"predicate\":\"updateEncryption\",\"params\":[{\"name\":\"chat\",\"type\":\"EncryptedChat\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"956179895\",\"predicate\":\"updateEncryptedMessagesRead\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"max_date\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1417756512\",\"predicate\":\"encryptedChatEmpty\",\"params\":[{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"EncryptedChat\"},{\"id\":\"1006044124\",\"predicate\":\"encryptedChatWaiting\",\"params\":[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"admin_id\",\"type\":\"int\"},{\"name\":\"participant_id\",\"type\":\"int\"}],\"type\":\"EncryptedChat\"},{\"id\":\"-931638658\",\"predicate\":\"encryptedChatRequested\",\"params\":[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"admin_id\",\"type\":\"int\"},{\"name\":\"participant_id\",\"type\":\"int\"},{\"name\":\"g_a\",\"type\":\"bytes\"}],\"type\":\"EncryptedChat\"},{\"id\":\"-94974410\",\"predicate\":\"encryptedChat\",\"params\":[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"admin_id\",\"type\":\"int\"},{\"name\":\"participant_id\",\"type\":\"int\"},{\"name\":\"g_a_or_b\",\"type\":\"bytes\"},{\"name\":\"key_fingerprint\",\"type\":\"long\"}],\"type\":\"EncryptedChat\"},{\"id\":\"332848423\",\"predicate\":\"encryptedChatDiscarded\",\"params\":[{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"EncryptedChat\"},{\"id\":\"-247351839\",\"predicate\":\"inputEncryptedChat\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputEncryptedChat\"},{\"id\":\"-1038136962\",\"predicate\":\"encryptedFileEmpty\",\"params\":[],\"type\":\"EncryptedFile\"},{\"id\":\"1248893260\",\"predicate\":\"encryptedFile\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"size\",\"type\":\"int\"},{\"name\":\"dc_id\",\"type\":\"int\"},{\"name\":\"key_fingerprint\",\"type\":\"int\"}],\"type\":\"EncryptedFile\"},{\"id\":\"406307684\",\"predicate\":\"inputEncryptedFileEmpty\",\"params\":[],\"type\":\"InputEncryptedFile\"},{\"id\":\"1690108678\",\"predicate\":\"inputEncryptedFileUploaded\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"parts\",\"type\":\"int\"},{\"name\":\"md5_checksum\",\"type\":\"string\"},{\"name\":\"key_fingerprint\",\"type\":\"int\"}],\"type\":\"InputEncryptedFile\"},{\"id\":\"1511503333\",\"predicate\":\"inputEncryptedFile\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputEncryptedFile\"},{\"id\":\"-182231723\",\"predicate\":\"inputEncryptedFileLocation\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputFileLocation\"},{\"id\":\"-317144808\",\"predicate\":\"encryptedMessage\",\"params\":[{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"},{\"name\":\"file\",\"type\":\"EncryptedFile\"}],\"type\":\"EncryptedMessage\"},{\"id\":\"594758406\",\"predicate\":\"encryptedMessageService\",\"params\":[{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"EncryptedMessage\"},{\"id\":\"-1058912715\",\"predicate\":\"messages.dhConfigNotModified\",\"params\":[{\"name\":\"random\",\"type\":\"bytes\"}],\"type\":\"messages.DhConfig\"},{\"id\":\"740433629\",\"predicate\":\"messages.dhConfig\",\"params\":[{\"name\":\"g\",\"type\":\"int\"},{\"name\":\"p\",\"type\":\"bytes\"},{\"name\":\"version\",\"type\":\"int\"},{\"name\":\"random\",\"type\":\"bytes\"}],\"type\":\"messages.DhConfig\"},{\"id\":\"1443858741\",\"predicate\":\"messages.sentEncryptedMessage\",\"params\":[{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"messages.SentEncryptedMessage\"},{\"id\":\"-1802240206\",\"predicate\":\"messages.sentEncryptedFile\",\"params\":[{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"file\",\"type\":\"EncryptedFile\"}],\"type\":\"messages.SentEncryptedMessage\"},{\"id\":\"-95482955\",\"predicate\":\"inputFileBig\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"parts\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}],\"type\":\"InputFile\"},{\"id\":\"767652808\",\"predicate\":\"inputEncryptedFileBigUploaded\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"parts\",\"type\":\"int\"},{\"name\":\"key_fingerprint\",\"type\":\"int\"}],\"type\":\"InputEncryptedFile\"},{\"id\":\"-364179876\",\"predicate\":\"updateChatParticipantAdd\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"inviter_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"version\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"1851755554\",\"predicate\":\"updateChatParticipantDelete\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"version\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1906403213\",\"predicate\":\"updateDcOptions\",\"params\":[{\"name\":\"dc_options\",\"type\":\"Vector\"}],\"type\":\"Update\"},{\"id\":\"1530447553\",\"predicate\":\"inputMediaUploadedDocument\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"nosound_video\",\"type\":\"flags.3?true\"},{\"name\":\"file\",\"type\":\"InputFile\"},{\"name\":\"thumb\",\"type\":\"flags.2?InputFile\"},{\"name\":\"mime_type\",\"type\":\"string\"},{\"name\":\"attributes\",\"type\":\"Vector\"},{\"name\":\"stickers\",\"type\":\"flags.0?Vector\"},{\"name\":\"ttl_seconds\",\"type\":\"flags.1?int\"}],\"type\":\"InputMedia\"},{\"id\":\"598418386\",\"predicate\":\"inputMediaDocument\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"InputDocument\"},{\"name\":\"ttl_seconds\",\"type\":\"flags.0?int\"}],\"type\":\"InputMedia\"},{\"id\":\"-1666158377\",\"predicate\":\"messageMediaDocument\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"document\",\"type\":\"flags.0?Document\"},{\"name\":\"ttl_seconds\",\"type\":\"flags.2?int\"}],\"type\":\"MessageMedia\"},{\"id\":\"1928391342\",\"predicate\":\"inputDocumentEmpty\",\"params\":[],\"type\":\"InputDocument\"},{\"id\":\"448771445\",\"predicate\":\"inputDocument\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"file_reference\",\"type\":\"bytes\"}],\"type\":\"InputDocument\"},{\"id\":\"-1160743548\",\"predicate\":\"inputDocumentFileLocation\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"file_reference\",\"type\":\"bytes\"},{\"name\":\"thumb_size\",\"type\":\"string\"}],\"type\":\"InputFileLocation\"},{\"id\":\"922273905\",\"predicate\":\"documentEmpty\",\"params\":[{\"name\":\"id\",\"type\":\"long\"}],\"type\":\"Document\"},{\"id\":\"-1683841855\",\"predicate\":\"document\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"file_reference\",\"type\":\"bytes\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"mime_type\",\"type\":\"string\"},{\"name\":\"size\",\"type\":\"int\"},{\"name\":\"thumbs\",\"type\":\"flags.0?Vector\"},{\"name\":\"dc_id\",\"type\":\"int\"},{\"name\":\"attributes\",\"type\":\"Vector\"}],\"type\":\"Document\"},{\"id\":\"398898678\",\"predicate\":\"help.support\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"user\",\"type\":\"User\"}],\"type\":\"help.Support\"},{\"id\":\"-1613493288\",\"predicate\":\"notifyPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"}],\"type\":\"NotifyPeer\"},{\"id\":\"-1261946036\",\"predicate\":\"notifyUsers\",\"params\":[],\"type\":\"NotifyPeer\"},{\"id\":\"-1073230141\",\"predicate\":\"notifyChats\",\"params\":[],\"type\":\"NotifyPeer\"},{\"id\":\"-2131957734\",\"predicate\":\"updateUserBlocked\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"blocked\",\"type\":\"Bool\"}],\"type\":\"Update\"},{\"id\":\"-1094555409\",\"predicate\":\"updateNotifySettings\",\"params\":[{\"name\":\"peer\",\"type\":\"NotifyPeer\"},{\"name\":\"notify_settings\",\"type\":\"PeerNotifySettings\"}],\"type\":\"Update\"},{\"id\":\"381645902\",\"predicate\":\"sendMessageTypingAction\",\"params\":[],\"type\":\"SendMessageAction\"},{\"id\":\"-44119819\",\"predicate\":\"sendMessageCancelAction\",\"params\":[],\"type\":\"SendMessageAction\"},{\"id\":\"-1584933265\",\"predicate\":\"sendMessageRecordVideoAction\",\"params\":[],\"type\":\"SendMessageAction\"},{\"id\":\"-378127636\",\"predicate\":\"sendMessageUploadVideoAction\",\"params\":[{\"name\":\"progress\",\"type\":\"int\"}],\"type\":\"SendMessageAction\"},{\"id\":\"-718310409\",\"predicate\":\"sendMessageRecordAudioAction\",\"params\":[],\"type\":\"SendMessageAction\"},{\"id\":\"-212740181\",\"predicate\":\"sendMessageUploadAudioAction\",\"params\":[{\"name\":\"progress\",\"type\":\"int\"}],\"type\":\"SendMessageAction\"},{\"id\":\"-774682074\",\"predicate\":\"sendMessageUploadPhotoAction\",\"params\":[{\"name\":\"progress\",\"type\":\"int\"}],\"type\":\"SendMessageAction\"},{\"id\":\"-1441998364\",\"predicate\":\"sendMessageUploadDocumentAction\",\"params\":[{\"name\":\"progress\",\"type\":\"int\"}],\"type\":\"SendMessageAction\"},{\"id\":\"393186209\",\"predicate\":\"sendMessageGeoLocationAction\",\"params\":[],\"type\":\"SendMessageAction\"},{\"id\":\"1653390447\",\"predicate\":\"sendMessageChooseContactAction\",\"params\":[],\"type\":\"SendMessageAction\"},{\"id\":\"-1290580579\",\"predicate\":\"contacts.found\",\"params\":[{\"name\":\"my_results\",\"type\":\"Vector\"},{\"name\":\"results\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"contacts.Found\"},{\"id\":\"-337352679\",\"predicate\":\"updateServiceNotification\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"popup\",\"type\":\"flags.0?true\"},{\"name\":\"inbox_date\",\"type\":\"flags.1?int\"},{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"media\",\"type\":\"MessageMedia\"},{\"name\":\"entities\",\"type\":\"Vector\"}],\"type\":\"Update\"},{\"id\":\"-496024847\",\"predicate\":\"userStatusRecently\",\"params\":[],\"type\":\"UserStatus\"},{\"id\":\"129960444\",\"predicate\":\"userStatusLastWeek\",\"params\":[],\"type\":\"UserStatus\"},{\"id\":\"2011940674\",\"predicate\":\"userStatusLastMonth\",\"params\":[],\"type\":\"UserStatus\"},{\"id\":\"-298113238\",\"predicate\":\"updatePrivacy\",\"params\":[{\"name\":\"key\",\"type\":\"PrivacyKey\"},{\"name\":\"rules\",\"type\":\"Vector\"}],\"type\":\"Update\"},{\"id\":\"1335282456\",\"predicate\":\"inputPrivacyKeyStatusTimestamp\",\"params\":[],\"type\":\"InputPrivacyKey\"},{\"id\":\"-1137792208\",\"predicate\":\"privacyKeyStatusTimestamp\",\"params\":[],\"type\":\"PrivacyKey\"},{\"id\":\"218751099\",\"predicate\":\"inputPrivacyValueAllowContacts\",\"params\":[],\"type\":\"InputPrivacyRule\"},{\"id\":\"407582158\",\"predicate\":\"inputPrivacyValueAllowAll\",\"params\":[],\"type\":\"InputPrivacyRule\"},{\"id\":\"320652927\",\"predicate\":\"inputPrivacyValueAllowUsers\",\"params\":[{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"InputPrivacyRule\"},{\"id\":\"195371015\",\"predicate\":\"inputPrivacyValueDisallowContacts\",\"params\":[],\"type\":\"InputPrivacyRule\"},{\"id\":\"-697604407\",\"predicate\":\"inputPrivacyValueDisallowAll\",\"params\":[],\"type\":\"InputPrivacyRule\"},{\"id\":\"-1877932953\",\"predicate\":\"inputPrivacyValueDisallowUsers\",\"params\":[{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"InputPrivacyRule\"},{\"id\":\"-123988\",\"predicate\":\"privacyValueAllowContacts\",\"params\":[],\"type\":\"PrivacyRule\"},{\"id\":\"1698855810\",\"predicate\":\"privacyValueAllowAll\",\"params\":[],\"type\":\"PrivacyRule\"},{\"id\":\"1297858060\",\"predicate\":\"privacyValueAllowUsers\",\"params\":[{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"PrivacyRule\"},{\"id\":\"-125240806\",\"predicate\":\"privacyValueDisallowContacts\",\"params\":[],\"type\":\"PrivacyRule\"},{\"id\":\"-1955338397\",\"predicate\":\"privacyValueDisallowAll\",\"params\":[],\"type\":\"PrivacyRule\"},{\"id\":\"209668535\",\"predicate\":\"privacyValueDisallowUsers\",\"params\":[{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"PrivacyRule\"},{\"id\":\"1352683077\",\"predicate\":\"account.privacyRules\",\"params\":[{\"name\":\"rules\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"account.PrivacyRules\"},{\"id\":\"-1194283041\",\"predicate\":\"accountDaysTTL\",\"params\":[{\"name\":\"days\",\"type\":\"int\"}],\"type\":\"AccountDaysTTL\"},{\"id\":\"314130811\",\"predicate\":\"updateUserPhone\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"phone\",\"type\":\"string\"}],\"type\":\"Update\"},{\"id\":\"1815593308\",\"predicate\":\"documentAttributeImageSize\",\"params\":[{\"name\":\"w\",\"type\":\"int\"},{\"name\":\"h\",\"type\":\"int\"}],\"type\":\"DocumentAttribute\"},{\"id\":\"297109817\",\"predicate\":\"documentAttributeAnimated\",\"params\":[],\"type\":\"DocumentAttribute\"},{\"id\":\"1662637586\",\"predicate\":\"documentAttributeSticker\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"mask\",\"type\":\"flags.1?true\"},{\"name\":\"alt\",\"type\":\"string\"},{\"name\":\"stickerset\",\"type\":\"InputStickerSet\"},{\"name\":\"mask_coords\",\"type\":\"flags.0?MaskCoords\"}],\"type\":\"DocumentAttribute\"},{\"id\":\"250621158\",\"predicate\":\"documentAttributeVideo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"round_message\",\"type\":\"flags.0?true\"},{\"name\":\"supports_streaming\",\"type\":\"flags.1?true\"},{\"name\":\"duration\",\"type\":\"int\"},{\"name\":\"w\",\"type\":\"int\"},{\"name\":\"h\",\"type\":\"int\"}],\"type\":\"DocumentAttribute\"},{\"id\":\"-1739392570\",\"predicate\":\"documentAttributeAudio\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"voice\",\"type\":\"flags.10?true\"},{\"name\":\"duration\",\"type\":\"int\"},{\"name\":\"title\",\"type\":\"flags.0?string\"},{\"name\":\"performer\",\"type\":\"flags.1?string\"},{\"name\":\"waveform\",\"type\":\"flags.2?bytes\"}],\"type\":\"DocumentAttribute\"},{\"id\":\"358154344\",\"predicate\":\"documentAttributeFilename\",\"params\":[{\"name\":\"file_name\",\"type\":\"string\"}],\"type\":\"DocumentAttribute\"},{\"id\":\"-244016606\",\"predicate\":\"messages.stickersNotModified\",\"params\":[],\"type\":\"messages.Stickers\"},{\"id\":\"-463889475\",\"predicate\":\"messages.stickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"stickers\",\"type\":\"Vector\"}],\"type\":\"messages.Stickers\"},{\"id\":\"313694676\",\"predicate\":\"stickerPack\",\"params\":[{\"name\":\"emoticon\",\"type\":\"string\"},{\"name\":\"documents\",\"type\":\"Vector\"}],\"type\":\"StickerPack\"},{\"id\":\"-395967805\",\"predicate\":\"messages.allStickersNotModified\",\"params\":[],\"type\":\"messages.AllStickers\"},{\"id\":\"-302170017\",\"predicate\":\"messages.allStickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"sets\",\"type\":\"Vector\"}],\"type\":\"messages.AllStickers\"},{\"id\":\"-1667805217\",\"predicate\":\"updateReadHistoryInbox\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"folder_id\",\"type\":\"flags.0?int\"},{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"max_id\",\"type\":\"int\"},{\"name\":\"still_unread_count\",\"type\":\"int\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"791617983\",\"predicate\":\"updateReadHistoryOutbox\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"max_id\",\"type\":\"int\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-2066640507\",\"predicate\":\"messages.affectedMessages\",\"params\":[{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"messages.AffectedMessages\"},{\"id\":\"2139689491\",\"predicate\":\"updateWebPage\",\"params\":[{\"name\":\"webpage\",\"type\":\"WebPage\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-350980120\",\"predicate\":\"webPageEmpty\",\"params\":[{\"name\":\"id\",\"type\":\"long\"}],\"type\":\"WebPage\"},{\"id\":\"-981018084\",\"predicate\":\"webPagePending\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"WebPage\"},{\"id\":\"-94051982\",\"predicate\":\"webPage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"display_url\",\"type\":\"string\"},{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"type\",\"type\":\"flags.0?string\"},{\"name\":\"site_name\",\"type\":\"flags.1?string\"},{\"name\":\"title\",\"type\":\"flags.2?string\"},{\"name\":\"description\",\"type\":\"flags.3?string\"},{\"name\":\"photo\",\"type\":\"flags.4?Photo\"},{\"name\":\"embed_url\",\"type\":\"flags.5?string\"},{\"name\":\"embed_type\",\"type\":\"flags.5?string\"},{\"name\":\"embed_width\",\"type\":\"flags.6?int\"},{\"name\":\"embed_height\",\"type\":\"flags.6?int\"},{\"name\":\"duration\",\"type\":\"flags.7?int\"},{\"name\":\"author\",\"type\":\"flags.8?string\"},{\"name\":\"document\",\"type\":\"flags.9?Document\"},{\"name\":\"documents\",\"type\":\"flags.11?Vector\"},{\"name\":\"cached_page\",\"type\":\"flags.10?Page\"}],\"type\":\"WebPage\"},{\"id\":\"-1557277184\",\"predicate\":\"messageMediaWebPage\",\"params\":[{\"name\":\"webpage\",\"type\":\"WebPage\"}],\"type\":\"MessageMedia\"},{\"id\":\"-1392388579\",\"predicate\":\"authorization\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"current\",\"type\":\"flags.0?true\"},{\"name\":\"official_app\",\"type\":\"flags.1?true\"},{\"name\":\"password_pending\",\"type\":\"flags.2?true\"},{\"name\":\"hash\",\"type\":\"long\"},{\"name\":\"device_model\",\"type\":\"string\"},{\"name\":\"platform\",\"type\":\"string\"},{\"name\":\"system_version\",\"type\":\"string\"},{\"name\":\"api_id\",\"type\":\"int\"},{\"name\":\"app_name\",\"type\":\"string\"},{\"name\":\"app_version\",\"type\":\"string\"},{\"name\":\"date_created\",\"type\":\"int\"},{\"name\":\"date_active\",\"type\":\"int\"},{\"name\":\"ip\",\"type\":\"string\"},{\"name\":\"country\",\"type\":\"string\"},{\"name\":\"region\",\"type\":\"string\"}],\"type\":\"Authorization\"},{\"id\":\"307276766\",\"predicate\":\"account.authorizations\",\"params\":[{\"name\":\"authorizations\",\"type\":\"Vector\"}],\"type\":\"account.Authorizations\"},{\"id\":\"-1390001672\",\"predicate\":\"account.password\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"has_recovery\",\"type\":\"flags.0?true\"},{\"name\":\"has_secure_values\",\"type\":\"flags.1?true\"},{\"name\":\"has_password\",\"type\":\"flags.2?true\"},{\"name\":\"current_algo\",\"type\":\"flags.2?PasswordKdfAlgo\"},{\"name\":\"srp_B\",\"type\":\"flags.2?bytes\"},{\"name\":\"srp_id\",\"type\":\"flags.2?long\"},{\"name\":\"hint\",\"type\":\"flags.3?string\"},{\"name\":\"email_unconfirmed_pattern\",\"type\":\"flags.4?string\"},{\"name\":\"new_algo\",\"type\":\"PasswordKdfAlgo\"},{\"name\":\"new_secure_algo\",\"type\":\"SecurePasswordKdfAlgo\"},{\"name\":\"secure_random\",\"type\":\"bytes\"}],\"type\":\"account.Password\"},{\"id\":\"-1705233435\",\"predicate\":\"account.passwordSettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"email\",\"type\":\"flags.0?string\"},{\"name\":\"secure_settings\",\"type\":\"flags.1?SecureSecretSettings\"}],\"type\":\"account.PasswordSettings\"},{\"id\":\"-1036572727\",\"predicate\":\"account.passwordInputSettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"new_algo\",\"type\":\"flags.0?PasswordKdfAlgo\"},{\"name\":\"new_password_hash\",\"type\":\"flags.0?bytes\"},{\"name\":\"hint\",\"type\":\"flags.0?string\"},{\"name\":\"email\",\"type\":\"flags.1?string\"},{\"name\":\"new_secure_settings\",\"type\":\"flags.2?SecureSecretSettings\"}],\"type\":\"account.PasswordInputSettings\"},{\"id\":\"326715557\",\"predicate\":\"auth.passwordRecovery\",\"params\":[{\"name\":\"email_pattern\",\"type\":\"string\"}],\"type\":\"auth.PasswordRecovery\"},{\"id\":\"-1052959727\",\"predicate\":\"inputMediaVenue\",\"params\":[{\"name\":\"geo_point\",\"type\":\"InputGeoPoint\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"string\"},{\"name\":\"provider\",\"type\":\"string\"},{\"name\":\"venue_id\",\"type\":\"string\"},{\"name\":\"venue_type\",\"type\":\"string\"}],\"type\":\"InputMedia\"},{\"id\":\"784356159\",\"predicate\":\"messageMediaVenue\",\"params\":[{\"name\":\"geo\",\"type\":\"GeoPoint\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"string\"},{\"name\":\"provider\",\"type\":\"string\"},{\"name\":\"venue_id\",\"type\":\"string\"},{\"name\":\"venue_type\",\"type\":\"string\"}],\"type\":\"MessageMedia\"},{\"id\":\"-1551583367\",\"predicate\":\"receivedNotifyMessage\",\"params\":[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"flags\",\"type\":\"int\"}],\"type\":\"ReceivedNotifyMessage\"},{\"id\":\"1776236393\",\"predicate\":\"chatInviteEmpty\",\"params\":[],\"type\":\"ExportedChatInvite\"},{\"id\":\"-64092740\",\"predicate\":\"chatInviteExported\",\"params\":[{\"name\":\"link\",\"type\":\"string\"}],\"type\":\"ExportedChatInvite\"},{\"id\":\"1516793212\",\"predicate\":\"chatInviteAlready\",\"params\":[{\"name\":\"chat\",\"type\":\"Chat\"}],\"type\":\"ChatInvite\"},{\"id\":\"-540871282\",\"predicate\":\"chatInvite\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"channel\",\"type\":\"flags.0?true\"},{\"name\":\"broadcast\",\"type\":\"flags.1?true\"},{\"name\":\"public\",\"type\":\"flags.2?true\"},{\"name\":\"megagroup\",\"type\":\"flags.3?true\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"Photo\"},{\"name\":\"participants_count\",\"type\":\"int\"},{\"name\":\"participants\",\"type\":\"flags.4?Vector\"}],\"type\":\"ChatInvite\"},{\"id\":\"-123931160\",\"predicate\":\"messageActionChatJoinedByLink\",\"params\":[{\"name\":\"inviter_id\",\"type\":\"int\"}],\"type\":\"MessageAction\"},{\"id\":\"1757493555\",\"predicate\":\"updateReadMessagesContents\",\"params\":[{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-4838507\",\"predicate\":\"inputStickerSetEmpty\",\"params\":[],\"type\":\"InputStickerSet\"},{\"id\":\"-1645763991\",\"predicate\":\"inputStickerSetID\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputStickerSet\"},{\"id\":\"-2044933984\",\"predicate\":\"inputStickerSetShortName\",\"params\":[{\"name\":\"short_name\",\"type\":\"string\"}],\"type\":\"InputStickerSet\"},{\"id\":\"-290164953\",\"predicate\":\"stickerSet\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"archived\",\"type\":\"flags.1?true\"},{\"name\":\"official\",\"type\":\"flags.2?true\"},{\"name\":\"masks\",\"type\":\"flags.3?true\"},{\"name\":\"animated\",\"type\":\"flags.5?true\"},{\"name\":\"installed_date\",\"type\":\"flags.0?int\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"short_name\",\"type\":\"string\"},{\"name\":\"thumb\",\"type\":\"flags.4?PhotoSize\"},{\"name\":\"thumb_dc_id\",\"type\":\"flags.4?int\"},{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"StickerSet\"},{\"id\":\"-1240849242\",\"predicate\":\"messages.stickerSet\",\"params\":[{\"name\":\"set\",\"type\":\"StickerSet\"},{\"name\":\"packs\",\"type\":\"Vector\"},{\"name\":\"documents\",\"type\":\"Vector\"}],\"type\":\"messages.StickerSet\"},{\"id\":\"-1820043071\",\"predicate\":\"user\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"self\",\"type\":\"flags.10?true\"},{\"name\":\"contact\",\"type\":\"flags.11?true\"},{\"name\":\"mutual_contact\",\"type\":\"flags.12?true\"},{\"name\":\"deleted\",\"type\":\"flags.13?true\"},{\"name\":\"bot\",\"type\":\"flags.14?true\"},{\"name\":\"bot_chat_history\",\"type\":\"flags.15?true\"},{\"name\":\"bot_nochats\",\"type\":\"flags.16?true\"},{\"name\":\"verified\",\"type\":\"flags.17?true\"},{\"name\":\"restricted\",\"type\":\"flags.18?true\"},{\"name\":\"min\",\"type\":\"flags.20?true\"},{\"name\":\"bot_inline_geo\",\"type\":\"flags.21?true\"},{\"name\":\"support\",\"type\":\"flags.23?true\"},{\"name\":\"scam\",\"type\":\"flags.24?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"flags.0?long\"},{\"name\":\"first_name\",\"type\":\"flags.1?string\"},{\"name\":\"last_name\",\"type\":\"flags.2?string\"},{\"name\":\"username\",\"type\":\"flags.3?string\"},{\"name\":\"phone\",\"type\":\"flags.4?string\"},{\"name\":\"photo\",\"type\":\"flags.5?UserProfilePhoto\"},{\"name\":\"status\",\"type\":\"flags.6?UserStatus\"},{\"name\":\"bot_info_version\",\"type\":\"flags.14?int\"},{\"name\":\"restriction_reason\",\"type\":\"flags.18?Vector\"},{\"name\":\"bot_inline_placeholder\",\"type\":\"flags.19?string\"},{\"name\":\"lang_code\",\"type\":\"flags.22?string\"}],\"type\":\"User\"},{\"id\":\"-1032140601\",\"predicate\":\"botCommand\",\"params\":[{\"name\":\"command\",\"type\":\"string\"},{\"name\":\"description\",\"type\":\"string\"}],\"type\":\"BotCommand\"},{\"id\":\"-1729618630\",\"predicate\":\"botInfo\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"commands\",\"type\":\"Vector\"}],\"type\":\"BotInfo\"},{\"id\":\"-1560655744\",\"predicate\":\"keyboardButton\",\"params\":[{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"KeyboardButton\"},{\"id\":\"2002815875\",\"predicate\":\"keyboardButtonRow\",\"params\":[{\"name\":\"buttons\",\"type\":\"Vector\"}],\"type\":\"KeyboardButtonRow\"},{\"id\":\"-1606526075\",\"predicate\":\"replyKeyboardHide\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"selective\",\"type\":\"flags.2?true\"}],\"type\":\"ReplyMarkup\"},{\"id\":\"-200242528\",\"predicate\":\"replyKeyboardForceReply\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"single_use\",\"type\":\"flags.1?true\"},{\"name\":\"selective\",\"type\":\"flags.2?true\"}],\"type\":\"ReplyMarkup\"},{\"id\":\"889353612\",\"predicate\":\"replyKeyboardMarkup\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"resize\",\"type\":\"flags.0?true\"},{\"name\":\"single_use\",\"type\":\"flags.1?true\"},{\"name\":\"selective\",\"type\":\"flags.2?true\"},{\"name\":\"rows\",\"type\":\"Vector\"}],\"type\":\"ReplyMarkup\"},{\"id\":\"2072935910\",\"predicate\":\"inputPeerUser\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputPeer\"},{\"id\":\"-668391402\",\"predicate\":\"inputUser\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputUser\"},{\"id\":\"-1148011883\",\"predicate\":\"messageEntityUnknown\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"-100378723\",\"predicate\":\"messageEntityMention\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"1868782349\",\"predicate\":\"messageEntityHashtag\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"1827637959\",\"predicate\":\"messageEntityBotCommand\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"1859134776\",\"predicate\":\"messageEntityUrl\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"1692693954\",\"predicate\":\"messageEntityEmail\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"-1117713463\",\"predicate\":\"messageEntityBold\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"-2106619040\",\"predicate\":\"messageEntityItalic\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"681706865\",\"predicate\":\"messageEntityCode\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"1938967520\",\"predicate\":\"messageEntityPre\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"},{\"name\":\"language\",\"type\":\"string\"}],\"type\":\"MessageEntity\"},{\"id\":\"1990644519\",\"predicate\":\"messageEntityTextUrl\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"},{\"name\":\"url\",\"type\":\"string\"}],\"type\":\"MessageEntity\"},{\"id\":\"301019932\",\"predicate\":\"updateShortSentMessage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"out\",\"type\":\"flags.1?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"media\",\"type\":\"flags.9?MessageMedia\"},{\"name\":\"entities\",\"type\":\"flags.7?Vector\"}],\"type\":\"Updates\"},{\"id\":\"-292807034\",\"predicate\":\"inputChannelEmpty\",\"params\":[],\"type\":\"InputChannel\"},{\"id\":\"-1343524562\",\"predicate\":\"inputChannel\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputChannel\"},{\"id\":\"-1109531342\",\"predicate\":\"peerChannel\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"}],\"type\":\"Peer\"},{\"id\":\"548253432\",\"predicate\":\"inputPeerChannel\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputPeer\"},{\"id\":\"-753232354\",\"predicate\":\"channel\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"creator\",\"type\":\"flags.0?true\"},{\"name\":\"left\",\"type\":\"flags.2?true\"},{\"name\":\"broadcast\",\"type\":\"flags.5?true\"},{\"name\":\"verified\",\"type\":\"flags.7?true\"},{\"name\":\"megagroup\",\"type\":\"flags.8?true\"},{\"name\":\"restricted\",\"type\":\"flags.9?true\"},{\"name\":\"signatures\",\"type\":\"flags.11?true\"},{\"name\":\"min\",\"type\":\"flags.12?true\"},{\"name\":\"scam\",\"type\":\"flags.19?true\"},{\"name\":\"has_link\",\"type\":\"flags.20?true\"},{\"name\":\"has_geo\",\"type\":\"flags.21?true\"},{\"name\":\"slowmode_enabled\",\"type\":\"flags.22?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"flags.13?long\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"username\",\"type\":\"flags.6?string\"},{\"name\":\"photo\",\"type\":\"ChatPhoto\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"version\",\"type\":\"int\"},{\"name\":\"restriction_reason\",\"type\":\"flags.9?Vector\"},{\"name\":\"admin_rights\",\"type\":\"flags.14?ChatAdminRights\"},{\"name\":\"banned_rights\",\"type\":\"flags.15?ChatBannedRights\"},{\"name\":\"default_banned_rights\",\"type\":\"flags.18?ChatBannedRights\"},{\"name\":\"participants_count\",\"type\":\"flags.17?int\"}],\"type\":\"Chat\"},{\"id\":\"681420594\",\"predicate\":\"channelForbidden\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"broadcast\",\"type\":\"flags.5?true\"},{\"name\":\"megagroup\",\"type\":\"flags.8?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"until_date\",\"type\":\"flags.16?int\"}],\"type\":\"Chat\"},{\"id\":\"2131196633\",\"predicate\":\"contacts.resolvedPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"contacts.ResolvedPeer\"},{\"id\":\"763976820\",\"predicate\":\"channelFull\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"can_view_participants\",\"type\":\"flags.3?true\"},{\"name\":\"can_set_username\",\"type\":\"flags.6?true\"},{\"name\":\"can_set_stickers\",\"type\":\"flags.7?true\"},{\"name\":\"hidden_prehistory\",\"type\":\"flags.10?true\"},{\"name\":\"can_view_stats\",\"type\":\"flags.12?true\"},{\"name\":\"can_set_location\",\"type\":\"flags.16?true\"},{\"name\":\"has_scheduled\",\"type\":\"flags.19?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"about\",\"type\":\"string\"},{\"name\":\"participants_count\",\"type\":\"flags.0?int\"},{\"name\":\"admins_count\",\"type\":\"flags.1?int\"},{\"name\":\"kicked_count\",\"type\":\"flags.2?int\"},{\"name\":\"banned_count\",\"type\":\"flags.2?int\"},{\"name\":\"online_count\",\"type\":\"flags.13?int\"},{\"name\":\"read_inbox_max_id\",\"type\":\"int\"},{\"name\":\"read_outbox_max_id\",\"type\":\"int\"},{\"name\":\"unread_count\",\"type\":\"int\"},{\"name\":\"chat_photo\",\"type\":\"Photo\"},{\"name\":\"notify_settings\",\"type\":\"PeerNotifySettings\"},{\"name\":\"exported_invite\",\"type\":\"ExportedChatInvite\"},{\"name\":\"bot_info\",\"type\":\"Vector\"},{\"name\":\"migrated_from_chat_id\",\"type\":\"flags.4?int\"},{\"name\":\"migrated_from_max_id\",\"type\":\"flags.4?int\"},{\"name\":\"pinned_msg_id\",\"type\":\"flags.5?int\"},{\"name\":\"stickerset\",\"type\":\"flags.8?StickerSet\"},{\"name\":\"available_min_id\",\"type\":\"flags.9?int\"},{\"name\":\"folder_id\",\"type\":\"flags.11?int\"},{\"name\":\"linked_chat_id\",\"type\":\"flags.14?int\"},{\"name\":\"location\",\"type\":\"flags.15?ChannelLocation\"},{\"name\":\"slowmode_seconds\",\"type\":\"flags.17?int\"},{\"name\":\"slowmode_next_send_date\",\"type\":\"flags.18?int\"},{\"name\":\"pts\",\"type\":\"int\"}],\"type\":\"ChatFull\"},{\"id\":\"182649427\",\"predicate\":\"messageRange\",\"params\":[{\"name\":\"min_id\",\"type\":\"int\"},{\"name\":\"max_id\",\"type\":\"int\"}],\"type\":\"MessageRange\"},{\"id\":\"-1725551049\",\"predicate\":\"messages.channelMessages\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"inexact\",\"type\":\"flags.1?true\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"messages.Messages\"},{\"id\":\"-1781355374\",\"predicate\":\"messageActionChannelCreate\",\"params\":[{\"name\":\"title\",\"type\":\"string\"}],\"type\":\"MessageAction\"},{\"id\":\"-352032773\",\"predicate\":\"updateChannelTooLong\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"pts\",\"type\":\"flags.0?int\"}],\"type\":\"Update\"},{\"id\":\"-1227598250\",\"predicate\":\"updateChannel\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"1656358105\",\"predicate\":\"updateNewChannelMessage\",\"params\":[{\"name\":\"message\",\"type\":\"Message\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"856380452\",\"predicate\":\"updateReadChannelInbox\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"folder_id\",\"type\":\"flags.0?int\"},{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"max_id\",\"type\":\"int\"},{\"name\":\"still_unread_count\",\"type\":\"int\"},{\"name\":\"pts\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1015733815\",\"predicate\":\"updateDeleteChannelMessages\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1734268085\",\"predicate\":\"updateChannelMessageViews\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"views\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"1041346555\",\"predicate\":\"updates.channelDifferenceEmpty\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"final\",\"type\":\"flags.0?true\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"timeout\",\"type\":\"flags.1?int\"}],\"type\":\"updates.ChannelDifference\"},{\"id\":\"-1531132162\",\"predicate\":\"updates.channelDifferenceTooLong\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"final\",\"type\":\"flags.0?true\"},{\"name\":\"timeout\",\"type\":\"flags.1?int\"},{\"name\":\"dialog\",\"type\":\"Dialog\"},{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"updates.ChannelDifference\"},{\"id\":\"543450958\",\"predicate\":\"updates.channelDifference\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"final\",\"type\":\"flags.0?true\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"timeout\",\"type\":\"flags.1?int\"},{\"name\":\"new_messages\",\"type\":\"Vector\"},{\"name\":\"other_updates\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"updates.ChannelDifference\"},{\"id\":\"-1798033689\",\"predicate\":\"channelMessagesFilterEmpty\",\"params\":[],\"type\":\"ChannelMessagesFilter\"},{\"id\":\"-847783593\",\"predicate\":\"channelMessagesFilter\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"exclude_new_messages\",\"type\":\"flags.1?true\"},{\"name\":\"ranges\",\"type\":\"Vector\"}],\"type\":\"ChannelMessagesFilter\"},{\"id\":\"367766557\",\"predicate\":\"channelParticipant\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"ChannelParticipant\"},{\"id\":\"-1557620115\",\"predicate\":\"channelParticipantSelf\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"inviter_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"ChannelParticipant\"},{\"id\":\"-2138237532\",\"predicate\":\"channelParticipantCreator\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"rank\",\"type\":\"flags.0?string\"}],\"type\":\"ChannelParticipant\"},{\"id\":\"-566281095\",\"predicate\":\"channelParticipantsRecent\",\"params\":[],\"type\":\"ChannelParticipantsFilter\"},{\"id\":\"-1268741783\",\"predicate\":\"channelParticipantsAdmins\",\"params\":[],\"type\":\"ChannelParticipantsFilter\"},{\"id\":\"-1548400251\",\"predicate\":\"channelParticipantsKicked\",\"params\":[{\"name\":\"q\",\"type\":\"string\"}],\"type\":\"ChannelParticipantsFilter\"},{\"id\":\"-177282392\",\"predicate\":\"channels.channelParticipants\",\"params\":[{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"participants\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"channels.ChannelParticipants\"},{\"id\":\"-791039645\",\"predicate\":\"channels.channelParticipant\",\"params\":[{\"name\":\"participant\",\"type\":\"ChannelParticipant\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"channels.ChannelParticipant\"},{\"id\":\"-636267638\",\"predicate\":\"chatParticipantCreator\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"}],\"type\":\"ChatParticipant\"},{\"id\":\"-489233354\",\"predicate\":\"chatParticipantAdmin\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"inviter_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"ChatParticipant\"},{\"id\":\"-1232070311\",\"predicate\":\"updateChatParticipantAdmin\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"is_admin\",\"type\":\"Bool\"},{\"name\":\"version\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"1371385889\",\"predicate\":\"messageActionChatMigrateTo\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"}],\"type\":\"MessageAction\"},{\"id\":\"-1336546578\",\"predicate\":\"messageActionChannelMigrateFrom\",\"params\":[{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"chat_id\",\"type\":\"int\"}],\"type\":\"MessageAction\"},{\"id\":\"-1328445861\",\"predicate\":\"channelParticipantsBots\",\"params\":[],\"type\":\"ChannelParticipantsFilter\"},{\"id\":\"2013922064\",\"predicate\":\"help.termsOfService\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"popup\",\"type\":\"flags.0?true\"},{\"name\":\"id\",\"type\":\"DataJSON\"},{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"Vector\"},{\"name\":\"min_age_confirm\",\"type\":\"flags.1?int\"}],\"type\":\"help.TermsOfService\"},{\"id\":\"1753886890\",\"predicate\":\"updateNewStickerSet\",\"params\":[{\"name\":\"stickerset\",\"type\":\"messages.StickerSet\"}],\"type\":\"Update\"},{\"id\":\"196268545\",\"predicate\":\"updateStickerSetsOrder\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"masks\",\"type\":\"flags.0?true\"},{\"name\":\"order\",\"type\":\"Vector\"}],\"type\":\"Update\"},{\"id\":\"1135492588\",\"predicate\":\"updateStickerSets\",\"params\":[],\"type\":\"Update\"},{\"id\":\"372165663\",\"predicate\":\"foundGif\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"thumb_url\",\"type\":\"string\"},{\"name\":\"content_url\",\"type\":\"string\"},{\"name\":\"content_type\",\"type\":\"string\"},{\"name\":\"w\",\"type\":\"int\"},{\"name\":\"h\",\"type\":\"int\"}],\"type\":\"FoundGif\"},{\"id\":\"-1670052855\",\"predicate\":\"foundGifCached\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"Photo\"},{\"name\":\"document\",\"type\":\"Document\"}],\"type\":\"FoundGif\"},{\"id\":\"1212395773\",\"predicate\":\"inputMediaGifExternal\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"q\",\"type\":\"string\"}],\"type\":\"InputMedia\"},{\"id\":\"1158290442\",\"predicate\":\"messages.foundGifs\",\"params\":[{\"name\":\"next_offset\",\"type\":\"int\"},{\"name\":\"results\",\"type\":\"Vector\"}],\"type\":\"messages.FoundGifs\"},{\"id\":\"-402498398\",\"predicate\":\"messages.savedGifsNotModified\",\"params\":[],\"type\":\"messages.SavedGifs\"},{\"id\":\"772213157\",\"predicate\":\"messages.savedGifs\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"gifs\",\"type\":\"Vector\"}],\"type\":\"messages.SavedGifs\"},{\"id\":\"-1821035490\",\"predicate\":\"updateSavedGifs\",\"params\":[],\"type\":\"Update\"},{\"id\":\"864077702\",\"predicate\":\"inputBotInlineMessageMediaAuto\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.1?Vector\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"InputBotInlineMessage\"},{\"id\":\"1036876423\",\"predicate\":\"inputBotInlineMessageText\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"no_webpage\",\"type\":\"flags.0?true\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.1?Vector\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"InputBotInlineMessage\"},{\"id\":\"-2000710887\",\"predicate\":\"inputBotInlineResult\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"flags.1?string\"},{\"name\":\"description\",\"type\":\"flags.2?string\"},{\"name\":\"url\",\"type\":\"flags.3?string\"},{\"name\":\"thumb\",\"type\":\"flags.4?InputWebDocument\"},{\"name\":\"content\",\"type\":\"flags.5?InputWebDocument\"},{\"name\":\"send_message\",\"type\":\"InputBotInlineMessage\"}],\"type\":\"InputBotInlineResult\"},{\"id\":\"1984755728\",\"predicate\":\"botInlineMessageMediaAuto\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.1?Vector\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"BotInlineMessage\"},{\"id\":\"-1937807902\",\"predicate\":\"botInlineMessageText\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"no_webpage\",\"type\":\"flags.0?true\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.1?Vector\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"BotInlineMessage\"},{\"id\":\"295067450\",\"predicate\":\"botInlineResult\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"flags.1?string\"},{\"name\":\"description\",\"type\":\"flags.2?string\"},{\"name\":\"url\",\"type\":\"flags.3?string\"},{\"name\":\"thumb\",\"type\":\"flags.4?WebDocument\"},{\"name\":\"content\",\"type\":\"flags.5?WebDocument\"},{\"name\":\"send_message\",\"type\":\"BotInlineMessage\"}],\"type\":\"BotInlineResult\"},{\"id\":\"-1803769784\",\"predicate\":\"messages.botResults\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"gallery\",\"type\":\"flags.0?true\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"next_offset\",\"type\":\"flags.1?string\"},{\"name\":\"switch_pm\",\"type\":\"flags.2?InlineBotSwitchPM\"},{\"name\":\"results\",\"type\":\"Vector\"},{\"name\":\"cache_time\",\"type\":\"int\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"messages.BotResults\"},{\"id\":\"1417832080\",\"predicate\":\"updateBotInlineQuery\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"query\",\"type\":\"string\"},{\"name\":\"geo\",\"type\":\"flags.0?GeoPoint\"},{\"name\":\"offset\",\"type\":\"string\"}],\"type\":\"Update\"},{\"id\":\"239663460\",\"predicate\":\"updateBotInlineSend\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"query\",\"type\":\"string\"},{\"name\":\"geo\",\"type\":\"flags.0?GeoPoint\"},{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"msg_id\",\"type\":\"flags.1?InputBotInlineMessageID\"}],\"type\":\"Update\"},{\"id\":\"1358283666\",\"predicate\":\"inputMessagesFilterVoice\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"928101534\",\"predicate\":\"inputMessagesFilterMusic\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"-1107622874\",\"predicate\":\"inputPrivacyKeyChatInvite\",\"params\":[],\"type\":\"InputPrivacyKey\"},{\"id\":\"1343122938\",\"predicate\":\"privacyKeyChatInvite\",\"params\":[],\"type\":\"PrivacyKey\"},{\"id\":\"1571494644\",\"predicate\":\"exportedMessageLink\",\"params\":[{\"name\":\"link\",\"type\":\"string\"},{\"name\":\"html\",\"type\":\"string\"}],\"type\":\"ExportedMessageLink\"},{\"id\":\"-332168592\",\"predicate\":\"messageFwdHeader\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"from_id\",\"type\":\"flags.0?int\"},{\"name\":\"from_name\",\"type\":\"flags.5?string\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"channel_id\",\"type\":\"flags.1?int\"},{\"name\":\"channel_post\",\"type\":\"flags.2?int\"},{\"name\":\"post_author\",\"type\":\"flags.3?string\"},{\"name\":\"saved_from_peer\",\"type\":\"flags.4?Peer\"},{\"name\":\"saved_from_msg_id\",\"type\":\"flags.4?int\"}],\"type\":\"MessageFwdHeader\"},{\"id\":\"457133559\",\"predicate\":\"updateEditChannelMessage\",\"params\":[{\"name\":\"message\",\"type\":\"Message\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1738988427\",\"predicate\":\"updateChannelPinnedMessage\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1799538451\",\"predicate\":\"messageActionPinMessage\",\"params\":[],\"type\":\"MessageAction\"},{\"id\":\"1923290508\",\"predicate\":\"auth.codeTypeSms\",\"params\":[],\"type\":\"auth.CodeType\"},{\"id\":\"1948046307\",\"predicate\":\"auth.codeTypeCall\",\"params\":[],\"type\":\"auth.CodeType\"},{\"id\":\"577556219\",\"predicate\":\"auth.codeTypeFlashCall\",\"params\":[],\"type\":\"auth.CodeType\"},{\"id\":\"1035688326\",\"predicate\":\"auth.sentCodeTypeApp\",\"params\":[{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"auth.SentCodeType\"},{\"id\":\"-1073693790\",\"predicate\":\"auth.sentCodeTypeSms\",\"params\":[{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"auth.SentCodeType\"},{\"id\":\"1398007207\",\"predicate\":\"auth.sentCodeTypeCall\",\"params\":[{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"auth.SentCodeType\"},{\"id\":\"-1425815847\",\"predicate\":\"auth.sentCodeTypeFlashCall\",\"params\":[{\"name\":\"pattern\",\"type\":\"string\"}],\"type\":\"auth.SentCodeType\"},{\"id\":\"629866245\",\"predicate\":\"keyboardButtonUrl\",\"params\":[{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"url\",\"type\":\"string\"}],\"type\":\"KeyboardButton\"},{\"id\":\"1748655686\",\"predicate\":\"keyboardButtonCallback\",\"params\":[{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"type\":\"KeyboardButton\"},{\"id\":\"-1318425559\",\"predicate\":\"keyboardButtonRequestPhone\",\"params\":[{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"KeyboardButton\"},{\"id\":\"-59151553\",\"predicate\":\"keyboardButtonRequestGeoLocation\",\"params\":[{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"KeyboardButton\"},{\"id\":\"90744648\",\"predicate\":\"keyboardButtonSwitchInline\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"same_peer\",\"type\":\"flags.0?true\"},{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"query\",\"type\":\"string\"}],\"type\":\"KeyboardButton\"},{\"id\":\"1218642516\",\"predicate\":\"replyInlineMarkup\",\"params\":[{\"name\":\"rows\",\"type\":\"Vector\"}],\"type\":\"ReplyMarkup\"},{\"id\":\"911761060\",\"predicate\":\"messages.botCallbackAnswer\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"alert\",\"type\":\"flags.1?true\"},{\"name\":\"has_url\",\"type\":\"flags.3?true\"},{\"name\":\"native_ui\",\"type\":\"flags.4?true\"},{\"name\":\"message\",\"type\":\"flags.0?string\"},{\"name\":\"url\",\"type\":\"flags.2?string\"},{\"name\":\"cache_time\",\"type\":\"int\"}],\"type\":\"messages.BotCallbackAnswer\"},{\"id\":\"-415938591\",\"predicate\":\"updateBotCallbackQuery\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"chat_instance\",\"type\":\"long\"},{\"name\":\"data\",\"type\":\"flags.0?bytes\"},{\"name\":\"game_short_name\",\"type\":\"flags.1?string\"}],\"type\":\"Update\"},{\"id\":\"649453030\",\"predicate\":\"messages.messageEditData\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"caption\",\"type\":\"flags.0?true\"}],\"type\":\"messages.MessageEditData\"},{\"id\":\"-469536605\",\"predicate\":\"updateEditMessage\",\"params\":[{\"name\":\"message\",\"type\":\"Message\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1045340827\",\"predicate\":\"inputBotInlineMessageMediaGeo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"geo_point\",\"type\":\"InputGeoPoint\"},{\"name\":\"period\",\"type\":\"int\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"InputBotInlineMessage\"},{\"id\":\"1098628881\",\"predicate\":\"inputBotInlineMessageMediaVenue\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"geo_point\",\"type\":\"InputGeoPoint\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"string\"},{\"name\":\"provider\",\"type\":\"string\"},{\"name\":\"venue_id\",\"type\":\"string\"},{\"name\":\"venue_type\",\"type\":\"string\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"InputBotInlineMessage\"},{\"id\":\"-1494368259\",\"predicate\":\"inputBotInlineMessageMediaContact\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"},{\"name\":\"vcard\",\"type\":\"string\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"InputBotInlineMessage\"},{\"id\":\"-1222451611\",\"predicate\":\"botInlineMessageMediaGeo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"geo\",\"type\":\"GeoPoint\"},{\"name\":\"period\",\"type\":\"int\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"BotInlineMessage\"},{\"id\":\"-1970903652\",\"predicate\":\"botInlineMessageMediaVenue\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"geo\",\"type\":\"GeoPoint\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"string\"},{\"name\":\"provider\",\"type\":\"string\"},{\"name\":\"venue_id\",\"type\":\"string\"},{\"name\":\"venue_type\",\"type\":\"string\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"BotInlineMessage\"},{\"id\":\"416402882\",\"predicate\":\"botInlineMessageMediaContact\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"},{\"name\":\"vcard\",\"type\":\"string\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"BotInlineMessage\"},{\"id\":\"-1462213465\",\"predicate\":\"inputBotInlineResultPhoto\",\"params\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"InputPhoto\"},{\"name\":\"send_message\",\"type\":\"InputBotInlineMessage\"}],\"type\":\"InputBotInlineResult\"},{\"id\":\"-459324\",\"predicate\":\"inputBotInlineResultDocument\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"flags.1?string\"},{\"name\":\"description\",\"type\":\"flags.2?string\"},{\"name\":\"document\",\"type\":\"InputDocument\"},{\"name\":\"send_message\",\"type\":\"InputBotInlineMessage\"}],\"type\":\"InputBotInlineResult\"},{\"id\":\"400266251\",\"predicate\":\"botInlineMediaResult\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"flags.0?Photo\"},{\"name\":\"document\",\"type\":\"flags.1?Document\"},{\"name\":\"title\",\"type\":\"flags.2?string\"},{\"name\":\"description\",\"type\":\"flags.3?string\"},{\"name\":\"send_message\",\"type\":\"BotInlineMessage\"}],\"type\":\"BotInlineResult\"},{\"id\":\"-1995686519\",\"predicate\":\"inputBotInlineMessageID\",\"params\":[{\"name\":\"dc_id\",\"type\":\"int\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputBotInlineMessageID\"},{\"id\":\"-103646630\",\"predicate\":\"updateInlineBotCallbackQuery\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"msg_id\",\"type\":\"InputBotInlineMessageID\"},{\"name\":\"chat_instance\",\"type\":\"long\"},{\"name\":\"data\",\"type\":\"flags.0?bytes\"},{\"name\":\"game_short_name\",\"type\":\"flags.1?string\"}],\"type\":\"Update\"},{\"id\":\"1008755359\",\"predicate\":\"inlineBotSwitchPM\",\"params\":[{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"start_param\",\"type\":\"string\"}],\"type\":\"InlineBotSwitchPM\"},{\"id\":\"863093588\",\"predicate\":\"messages.peerDialogs\",\"params\":[{\"name\":\"dialogs\",\"type\":\"Vector\"},{\"name\":\"messages\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"},{\"name\":\"state\",\"type\":\"updates.State\"}],\"type\":\"messages.PeerDialogs\"},{\"id\":\"-305282981\",\"predicate\":\"topPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"rating\",\"type\":\"double\"}],\"type\":\"TopPeer\"},{\"id\":\"-1419371685\",\"predicate\":\"topPeerCategoryBotsPM\",\"params\":[],\"type\":\"TopPeerCategory\"},{\"id\":\"344356834\",\"predicate\":\"topPeerCategoryBotsInline\",\"params\":[],\"type\":\"TopPeerCategory\"},{\"id\":\"104314861\",\"predicate\":\"topPeerCategoryCorrespondents\",\"params\":[],\"type\":\"TopPeerCategory\"},{\"id\":\"-1122524854\",\"predicate\":\"topPeerCategoryGroups\",\"params\":[],\"type\":\"TopPeerCategory\"},{\"id\":\"371037736\",\"predicate\":\"topPeerCategoryChannels\",\"params\":[],\"type\":\"TopPeerCategory\"},{\"id\":\"-75283823\",\"predicate\":\"topPeerCategoryPeers\",\"params\":[{\"name\":\"category\",\"type\":\"TopPeerCategory\"},{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"peers\",\"type\":\"Vector\"}],\"type\":\"TopPeerCategoryPeers\"},{\"id\":\"-567906571\",\"predicate\":\"contacts.topPeersNotModified\",\"params\":[],\"type\":\"contacts.TopPeers\"},{\"id\":\"1891070632\",\"predicate\":\"contacts.topPeers\",\"params\":[{\"name\":\"categories\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"contacts.TopPeers\"},{\"id\":\"892193368\",\"predicate\":\"messageEntityMentionName\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"546203849\",\"predicate\":\"inputMessageEntityMentionName\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"InputUser\"}],\"type\":\"MessageEntity\"},{\"id\":\"975236280\",\"predicate\":\"inputMessagesFilterChatPhotos\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"634833351\",\"predicate\":\"updateReadChannelOutbox\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"max_id\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-299124375\",\"predicate\":\"updateDraftMessage\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"draft\",\"type\":\"DraftMessage\"}],\"type\":\"Update\"},{\"id\":\"453805082\",\"predicate\":\"draftMessageEmpty\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"date\",\"type\":\"flags.0?int\"}],\"type\":\"DraftMessage\"},{\"id\":\"-40996577\",\"predicate\":\"draftMessage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"no_webpage\",\"type\":\"flags.1?true\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.0?int\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.3?Vector\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"DraftMessage\"},{\"id\":\"-1615153660\",\"predicate\":\"messageActionHistoryClear\",\"params\":[],\"type\":\"MessageAction\"},{\"id\":\"82699215\",\"predicate\":\"messages.featuredStickersNotModified\",\"params\":[],\"type\":\"messages.FeaturedStickers\"},{\"id\":\"-123893531\",\"predicate\":\"messages.featuredStickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"sets\",\"type\":\"Vector\"},{\"name\":\"unread\",\"type\":\"Vector\"}],\"type\":\"messages.FeaturedStickers\"},{\"id\":\"1461528386\",\"predicate\":\"updateReadFeaturedStickers\",\"params\":[],\"type\":\"Update\"},{\"id\":\"186120336\",\"predicate\":\"messages.recentStickersNotModified\",\"params\":[],\"type\":\"messages.RecentStickers\"},{\"id\":\"586395571\",\"predicate\":\"messages.recentStickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"packs\",\"type\":\"Vector\"},{\"name\":\"stickers\",\"type\":\"Vector\"},{\"name\":\"dates\",\"type\":\"Vector\"}],\"type\":\"messages.RecentStickers\"},{\"id\":\"-1706939360\",\"predicate\":\"updateRecentStickers\",\"params\":[],\"type\":\"Update\"},{\"id\":\"1338747336\",\"predicate\":\"messages.archivedStickers\",\"params\":[{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"sets\",\"type\":\"Vector\"}],\"type\":\"messages.ArchivedStickers\"},{\"id\":\"946083368\",\"predicate\":\"messages.stickerSetInstallResultSuccess\",\"params\":[],\"type\":\"messages.StickerSetInstallResult\"},{\"id\":\"904138920\",\"predicate\":\"messages.stickerSetInstallResultArchive\",\"params\":[{\"name\":\"sets\",\"type\":\"Vector\"}],\"type\":\"messages.StickerSetInstallResult\"},{\"id\":\"1678812626\",\"predicate\":\"stickerSetCovered\",\"params\":[{\"name\":\"set\",\"type\":\"StickerSet\"},{\"name\":\"cover\",\"type\":\"Document\"}],\"type\":\"StickerSetCovered\"},{\"id\":\"-1574314746\",\"predicate\":\"updateConfig\",\"params\":[],\"type\":\"Update\"},{\"id\":\"861169551\",\"predicate\":\"updatePtsChanged\",\"params\":[],\"type\":\"Update\"},{\"id\":\"-440664550\",\"predicate\":\"inputMediaPhotoExternal\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"ttl_seconds\",\"type\":\"flags.0?int\"}],\"type\":\"InputMedia\"},{\"id\":\"-78455655\",\"predicate\":\"inputMediaDocumentExternal\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"ttl_seconds\",\"type\":\"flags.0?int\"}],\"type\":\"InputMedia\"},{\"id\":\"872932635\",\"predicate\":\"stickerSetMultiCovered\",\"params\":[{\"name\":\"set\",\"type\":\"StickerSet\"},{\"name\":\"covers\",\"type\":\"Vector\"}],\"type\":\"StickerSetCovered\"},{\"id\":\"-1361650766\",\"predicate\":\"maskCoords\",\"params\":[{\"name\":\"n\",\"type\":\"int\"},{\"name\":\"x\",\"type\":\"double\"},{\"name\":\"y\",\"type\":\"double\"},{\"name\":\"zoom\",\"type\":\"double\"}],\"type\":\"MaskCoords\"},{\"id\":\"-1744710921\",\"predicate\":\"documentAttributeHasStickers\",\"params\":[],\"type\":\"DocumentAttribute\"},{\"id\":\"1251549527\",\"predicate\":\"inputStickeredMediaPhoto\",\"params\":[{\"name\":\"id\",\"type\":\"InputPhoto\"}],\"type\":\"InputStickeredMedia\"},{\"id\":\"70813275\",\"predicate\":\"inputStickeredMediaDocument\",\"params\":[{\"name\":\"id\",\"type\":\"InputDocument\"}],\"type\":\"InputStickeredMedia\"},{\"id\":\"-1107729093\",\"predicate\":\"game\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"short_name\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"Photo\"},{\"name\":\"document\",\"type\":\"flags.0?Document\"}],\"type\":\"Game\"},{\"id\":\"1336154098\",\"predicate\":\"inputBotInlineResultGame\",\"params\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"short_name\",\"type\":\"string\"},{\"name\":\"send_message\",\"type\":\"InputBotInlineMessage\"}],\"type\":\"InputBotInlineResult\"},{\"id\":\"1262639204\",\"predicate\":\"inputBotInlineMessageGame\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"}],\"type\":\"InputBotInlineMessage\"},{\"id\":\"-38694904\",\"predicate\":\"messageMediaGame\",\"params\":[{\"name\":\"game\",\"type\":\"Game\"}],\"type\":\"MessageMedia\"},{\"id\":\"-750828557\",\"predicate\":\"inputMediaGame\",\"params\":[{\"name\":\"id\",\"type\":\"InputGame\"}],\"type\":\"InputMedia\"},{\"id\":\"53231223\",\"predicate\":\"inputGameID\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputGame\"},{\"id\":\"-1020139510\",\"predicate\":\"inputGameShortName\",\"params\":[{\"name\":\"bot_id\",\"type\":\"InputUser\"},{\"name\":\"short_name\",\"type\":\"string\"}],\"type\":\"InputGame\"},{\"id\":\"1358175439\",\"predicate\":\"keyboardButtonGame\",\"params\":[{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"KeyboardButton\"},{\"id\":\"-1834538890\",\"predicate\":\"messageActionGameScore\",\"params\":[{\"name\":\"game_id\",\"type\":\"long\"},{\"name\":\"score\",\"type\":\"int\"}],\"type\":\"MessageAction\"},{\"id\":\"1493171408\",\"predicate\":\"highScore\",\"params\":[{\"name\":\"pos\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"score\",\"type\":\"int\"}],\"type\":\"HighScore\"},{\"id\":\"-1707344487\",\"predicate\":\"messages.highScores\",\"params\":[{\"name\":\"scores\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"messages.HighScores\"},{\"id\":\"1258196845\",\"predicate\":\"updates.differenceTooLong\",\"params\":[{\"name\":\"pts\",\"type\":\"int\"}],\"type\":\"updates.Difference\"},{\"id\":\"1081547008\",\"predicate\":\"updateChannelWebPage\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"webpage\",\"type\":\"WebPage\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1663561404\",\"predicate\":\"messages.chatsSlice\",\"params\":[{\"name\":\"count\",\"type\":\"int\"},{\"name\":\"chats\",\"type\":\"Vector\"}],\"type\":\"messages.Chats\"},{\"id\":\"-599948721\",\"predicate\":\"textEmpty\",\"params\":[],\"type\":\"RichText\"},{\"id\":\"1950782688\",\"predicate\":\"textPlain\",\"params\":[{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"RichText\"},{\"id\":\"1730456516\",\"predicate\":\"textBold\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"RichText\"},{\"id\":\"-653089380\",\"predicate\":\"textItalic\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"RichText\"},{\"id\":\"-1054465340\",\"predicate\":\"textUnderline\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"RichText\"},{\"id\":\"-1678197867\",\"predicate\":\"textStrike\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"RichText\"},{\"id\":\"1816074681\",\"predicate\":\"textFixed\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"RichText\"},{\"id\":\"1009288385\",\"predicate\":\"textUrl\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"webpage_id\",\"type\":\"long\"}],\"type\":\"RichText\"},{\"id\":\"-564523562\",\"predicate\":\"textEmail\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"},{\"name\":\"email\",\"type\":\"string\"}],\"type\":\"RichText\"},{\"id\":\"2120376535\",\"predicate\":\"textConcat\",\"params\":[{\"name\":\"texts\",\"type\":\"Vector\"}],\"type\":\"RichText\"},{\"id\":\"324435594\",\"predicate\":\"pageBlockUnsupported\",\"params\":[],\"type\":\"PageBlock\"},{\"id\":\"1890305021\",\"predicate\":\"pageBlockTitle\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"-1879401953\",\"predicate\":\"pageBlockSubtitle\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"-1162877472\",\"predicate\":\"pageBlockAuthorDate\",\"params\":[{\"name\":\"author\",\"type\":\"RichText\"},{\"name\":\"published_date\",\"type\":\"int\"}],\"type\":\"PageBlock\"},{\"id\":\"-1076861716\",\"predicate\":\"pageBlockHeader\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"-248793375\",\"predicate\":\"pageBlockSubheader\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"1182402406\",\"predicate\":\"pageBlockParagraph\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"-1066346178\",\"predicate\":\"pageBlockPreformatted\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"},{\"name\":\"language\",\"type\":\"string\"}],\"type\":\"PageBlock\"},{\"id\":\"1216809369\",\"predicate\":\"pageBlockFooter\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"-618614392\",\"predicate\":\"pageBlockDivider\",\"params\":[],\"type\":\"PageBlock\"},{\"id\":\"-837994576\",\"predicate\":\"pageBlockAnchor\",\"params\":[{\"name\":\"name\",\"type\":\"string\"}],\"type\":\"PageBlock\"},{\"id\":\"-454524911\",\"predicate\":\"pageBlockList\",\"params\":[{\"name\":\"items\",\"type\":\"Vector\"}],\"type\":\"PageBlock\"},{\"id\":\"641563686\",\"predicate\":\"pageBlockBlockquote\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"},{\"name\":\"caption\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"1329878739\",\"predicate\":\"pageBlockPullquote\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"},{\"name\":\"caption\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"391759200\",\"predicate\":\"pageBlockPhoto\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"photo_id\",\"type\":\"long\"},{\"name\":\"caption\",\"type\":\"PageCaption\"},{\"name\":\"url\",\"type\":\"flags.0?string\"},{\"name\":\"webpage_id\",\"type\":\"flags.0?long\"}],\"type\":\"PageBlock\"},{\"id\":\"2089805750\",\"predicate\":\"pageBlockVideo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"autoplay\",\"type\":\"flags.0?true\"},{\"name\":\"loop\",\"type\":\"flags.1?true\"},{\"name\":\"video_id\",\"type\":\"long\"},{\"name\":\"caption\",\"type\":\"PageCaption\"}],\"type\":\"PageBlock\"},{\"id\":\"972174080\",\"predicate\":\"pageBlockCover\",\"params\":[{\"name\":\"cover\",\"type\":\"PageBlock\"}],\"type\":\"PageBlock\"},{\"id\":\"-1468953147\",\"predicate\":\"pageBlockEmbed\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"full_width\",\"type\":\"flags.0?true\"},{\"name\":\"allow_scrolling\",\"type\":\"flags.3?true\"},{\"name\":\"url\",\"type\":\"flags.1?string\"},{\"name\":\"html\",\"type\":\"flags.2?string\"},{\"name\":\"poster_photo_id\",\"type\":\"flags.4?long\"},{\"name\":\"w\",\"type\":\"flags.5?int\"},{\"name\":\"h\",\"type\":\"flags.5?int\"},{\"name\":\"caption\",\"type\":\"PageCaption\"}],\"type\":\"PageBlock\"},{\"id\":\"-229005301\",\"predicate\":\"pageBlockEmbedPost\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"webpage_id\",\"type\":\"long\"},{\"name\":\"author_photo_id\",\"type\":\"long\"},{\"name\":\"author\",\"type\":\"string\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"blocks\",\"type\":\"Vector\"},{\"name\":\"caption\",\"type\":\"PageCaption\"}],\"type\":\"PageBlock\"},{\"id\":\"1705048653\",\"predicate\":\"pageBlockCollage\",\"params\":[{\"name\":\"items\",\"type\":\"Vector\"},{\"name\":\"caption\",\"type\":\"PageCaption\"}],\"type\":\"PageBlock\"},{\"id\":\"52401552\",\"predicate\":\"pageBlockSlideshow\",\"params\":[{\"name\":\"items\",\"type\":\"Vector\"},{\"name\":\"caption\",\"type\":\"PageCaption\"}],\"type\":\"PageBlock\"},{\"id\":\"-2054908813\",\"predicate\":\"webPageNotModified\",\"params\":[],\"type\":\"WebPage\"},{\"id\":\"-88417185\",\"predicate\":\"inputPrivacyKeyPhoneCall\",\"params\":[],\"type\":\"InputPrivacyKey\"},{\"id\":\"1030105979\",\"predicate\":\"privacyKeyPhoneCall\",\"params\":[],\"type\":\"PrivacyKey\"},{\"id\":\"-580219064\",\"predicate\":\"sendMessageGamePlayAction\",\"params\":[],\"type\":\"SendMessageAction\"},{\"id\":\"-2048646399\",\"predicate\":\"phoneCallDiscardReasonMissed\",\"params\":[],\"type\":\"PhoneCallDiscardReason\"},{\"id\":\"-527056480\",\"predicate\":\"phoneCallDiscardReasonDisconnect\",\"params\":[],\"type\":\"PhoneCallDiscardReason\"},{\"id\":\"1471006352\",\"predicate\":\"phoneCallDiscardReasonHangup\",\"params\":[],\"type\":\"PhoneCallDiscardReason\"},{\"id\":\"-84416311\",\"predicate\":\"phoneCallDiscardReasonBusy\",\"params\":[],\"type\":\"PhoneCallDiscardReason\"},{\"id\":\"1852826908\",\"predicate\":\"updateDialogPinned\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"pinned\",\"type\":\"flags.0?true\"},{\"name\":\"folder_id\",\"type\":\"flags.1?int\"},{\"name\":\"peer\",\"type\":\"DialogPeer\"}],\"type\":\"Update\"},{\"id\":\"-99664734\",\"predicate\":\"updatePinnedDialogs\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"folder_id\",\"type\":\"flags.1?int\"},{\"name\":\"order\",\"type\":\"flags.0?Vector\"}],\"type\":\"Update\"},{\"id\":\"2104790276\",\"predicate\":\"dataJSON\",\"params\":[{\"name\":\"data\",\"type\":\"string\"}],\"type\":\"DataJSON\"},{\"id\":\"-2095595325\",\"predicate\":\"updateBotWebhookJSON\",\"params\":[{\"name\":\"data\",\"type\":\"DataJSON\"}],\"type\":\"Update\"},{\"id\":\"-1684914010\",\"predicate\":\"updateBotWebhookJSONQuery\",\"params\":[{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"data\",\"type\":\"DataJSON\"},{\"name\":\"timeout\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-886477832\",\"predicate\":\"labeledPrice\",\"params\":[{\"name\":\"label\",\"type\":\"string\"},{\"name\":\"amount\",\"type\":\"long\"}],\"type\":\"LabeledPrice\"},{\"id\":\"-1022713000\",\"predicate\":\"invoice\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"test\",\"type\":\"flags.0?true\"},{\"name\":\"name_requested\",\"type\":\"flags.1?true\"},{\"name\":\"phone_requested\",\"type\":\"flags.2?true\"},{\"name\":\"email_requested\",\"type\":\"flags.3?true\"},{\"name\":\"shipping_address_requested\",\"type\":\"flags.4?true\"},{\"name\":\"flexible\",\"type\":\"flags.5?true\"},{\"name\":\"phone_to_provider\",\"type\":\"flags.6?true\"},{\"name\":\"email_to_provider\",\"type\":\"flags.7?true\"},{\"name\":\"currency\",\"type\":\"string\"},{\"name\":\"prices\",\"type\":\"Vector\"}],\"type\":\"Invoice\"},{\"id\":\"-186607933\",\"predicate\":\"inputMediaInvoice\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"flags.0?InputWebDocument\"},{\"name\":\"invoice\",\"type\":\"Invoice\"},{\"name\":\"payload\",\"type\":\"bytes\"},{\"name\":\"provider\",\"type\":\"string\"},{\"name\":\"provider_data\",\"type\":\"DataJSON\"},{\"name\":\"start_param\",\"type\":\"string\"}],\"type\":\"InputMedia\"},{\"id\":\"-368917890\",\"predicate\":\"paymentCharge\",\"params\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"provider_charge_id\",\"type\":\"string\"}],\"type\":\"PaymentCharge\"},{\"id\":\"-1892568281\",\"predicate\":\"messageActionPaymentSentMe\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"currency\",\"type\":\"string\"},{\"name\":\"total_amount\",\"type\":\"long\"},{\"name\":\"payload\",\"type\":\"bytes\"},{\"name\":\"info\",\"type\":\"flags.0?PaymentRequestedInfo\"},{\"name\":\"shipping_option_id\",\"type\":\"flags.1?string\"},{\"name\":\"charge\",\"type\":\"PaymentCharge\"}],\"type\":\"MessageAction\"},{\"id\":\"-2074799289\",\"predicate\":\"messageMediaInvoice\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"shipping_address_requested\",\"type\":\"flags.1?true\"},{\"name\":\"test\",\"type\":\"flags.3?true\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"flags.0?WebDocument\"},{\"name\":\"receipt_msg_id\",\"type\":\"flags.2?int\"},{\"name\":\"currency\",\"type\":\"string\"},{\"name\":\"total_amount\",\"type\":\"long\"},{\"name\":\"start_param\",\"type\":\"string\"}],\"type\":\"MessageMedia\"},{\"id\":\"512535275\",\"predicate\":\"postAddress\",\"params\":[{\"name\":\"street_line1\",\"type\":\"string\"},{\"name\":\"street_line2\",\"type\":\"string\"},{\"name\":\"city\",\"type\":\"string\"},{\"name\":\"state\",\"type\":\"string\"},{\"name\":\"country_iso2\",\"type\":\"string\"},{\"name\":\"post_code\",\"type\":\"string\"}],\"type\":\"PostAddress\"},{\"id\":\"-1868808300\",\"predicate\":\"paymentRequestedInfo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"name\",\"type\":\"flags.0?string\"},{\"name\":\"phone\",\"type\":\"flags.1?string\"},{\"name\":\"email\",\"type\":\"flags.2?string\"},{\"name\":\"shipping_address\",\"type\":\"flags.3?PostAddress\"}],\"type\":\"PaymentRequestedInfo\"},{\"id\":\"-1344716869\",\"predicate\":\"keyboardButtonBuy\",\"params\":[{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"KeyboardButton\"},{\"id\":\"1080663248\",\"predicate\":\"messageActionPaymentSent\",\"params\":[{\"name\":\"currency\",\"type\":\"string\"},{\"name\":\"total_amount\",\"type\":\"long\"}],\"type\":\"MessageAction\"},{\"id\":\"-842892769\",\"predicate\":\"paymentSavedCredentialsCard\",\"params\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"string\"}],\"type\":\"PaymentSavedCredentials\"},{\"id\":\"475467473\",\"predicate\":\"webDocument\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"size\",\"type\":\"int\"},{\"name\":\"mime_type\",\"type\":\"string\"},{\"name\":\"attributes\",\"type\":\"Vector\"}],\"type\":\"WebDocument\"},{\"id\":\"-1678949555\",\"predicate\":\"inputWebDocument\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"size\",\"type\":\"int\"},{\"name\":\"mime_type\",\"type\":\"string\"},{\"name\":\"attributes\",\"type\":\"Vector\"}],\"type\":\"InputWebDocument\"},{\"id\":\"-1036396922\",\"predicate\":\"inputWebFileLocation\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputWebFileLocation\"},{\"id\":\"568808380\",\"predicate\":\"upload.webFile\",\"params\":[{\"name\":\"size\",\"type\":\"int\"},{\"name\":\"mime_type\",\"type\":\"string\"},{\"name\":\"file_type\",\"type\":\"storage.FileType\"},{\"name\":\"mtime\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"upload.WebFile\"},{\"id\":\"1062645411\",\"predicate\":\"payments.paymentForm\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"can_save_credentials\",\"type\":\"flags.2?true\"},{\"name\":\"password_missing\",\"type\":\"flags.3?true\"},{\"name\":\"bot_id\",\"type\":\"int\"},{\"name\":\"invoice\",\"type\":\"Invoice\"},{\"name\":\"provider_id\",\"type\":\"int\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"native_provider\",\"type\":\"flags.4?string\"},{\"name\":\"native_params\",\"type\":\"flags.4?DataJSON\"},{\"name\":\"saved_info\",\"type\":\"flags.0?PaymentRequestedInfo\"},{\"name\":\"saved_credentials\",\"type\":\"flags.1?PaymentSavedCredentials\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"payments.PaymentForm\"},{\"id\":\"-784000893\",\"predicate\":\"payments.validatedRequestedInfo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"id\",\"type\":\"flags.0?string\"},{\"name\":\"shipping_options\",\"type\":\"flags.1?Vector\"}],\"type\":\"payments.ValidatedRequestedInfo\"},{\"id\":\"1314881805\",\"predicate\":\"payments.paymentResult\",\"params\":[{\"name\":\"updates\",\"type\":\"Updates\"}],\"type\":\"payments.PaymentResult\"},{\"id\":\"1342771681\",\"predicate\":\"payments.paymentReceipt\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"bot_id\",\"type\":\"int\"},{\"name\":\"invoice\",\"type\":\"Invoice\"},{\"name\":\"provider_id\",\"type\":\"int\"},{\"name\":\"info\",\"type\":\"flags.0?PaymentRequestedInfo\"},{\"name\":\"shipping\",\"type\":\"flags.1?ShippingOption\"},{\"name\":\"currency\",\"type\":\"string\"},{\"name\":\"total_amount\",\"type\":\"long\"},{\"name\":\"credentials_title\",\"type\":\"string\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"payments.PaymentReceipt\"},{\"id\":\"-74456004\",\"predicate\":\"payments.savedInfo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"has_saved_credentials\",\"type\":\"flags.1?true\"},{\"name\":\"saved_info\",\"type\":\"flags.0?PaymentRequestedInfo\"}],\"type\":\"payments.SavedInfo\"},{\"id\":\"-1056001329\",\"predicate\":\"inputPaymentCredentialsSaved\",\"params\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"tmp_password\",\"type\":\"bytes\"}],\"type\":\"InputPaymentCredentials\"},{\"id\":\"873977640\",\"predicate\":\"inputPaymentCredentials\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"save\",\"type\":\"flags.0?true\"},{\"name\":\"data\",\"type\":\"DataJSON\"}],\"type\":\"InputPaymentCredentials\"},{\"id\":\"-614138572\",\"predicate\":\"account.tmpPassword\",\"params\":[{\"name\":\"tmp_password\",\"type\":\"bytes\"},{\"name\":\"valid_until\",\"type\":\"int\"}],\"type\":\"account.TmpPassword\"},{\"id\":\"-1239335713\",\"predicate\":\"shippingOption\",\"params\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"prices\",\"type\":\"Vector\"}],\"type\":\"ShippingOption\"},{\"id\":\"-523384512\",\"predicate\":\"updateBotShippingQuery\",\"params\":[{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"payload\",\"type\":\"bytes\"},{\"name\":\"shipping_address\",\"type\":\"PostAddress\"}],\"type\":\"Update\"},{\"id\":\"1563376297\",\"predicate\":\"updateBotPrecheckoutQuery\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"payload\",\"type\":\"bytes\"},{\"name\":\"info\",\"type\":\"flags.0?PaymentRequestedInfo\"},{\"name\":\"shipping_option_id\",\"type\":\"flags.1?string\"},{\"name\":\"currency\",\"type\":\"string\"},{\"name\":\"total_amount\",\"type\":\"long\"}],\"type\":\"Update\"},{\"id\":\"-6249322\",\"predicate\":\"inputStickerSetItem\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"document\",\"type\":\"InputDocument\"},{\"name\":\"emoji\",\"type\":\"string\"},{\"name\":\"mask_coords\",\"type\":\"flags.0?MaskCoords\"}],\"type\":\"InputStickerSetItem\"},{\"id\":\"-1425052898\",\"predicate\":\"updatePhoneCall\",\"params\":[{\"name\":\"phone_call\",\"type\":\"PhoneCall\"}],\"type\":\"Update\"},{\"id\":\"506920429\",\"predicate\":\"inputPhoneCall\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputPhoneCall\"},{\"id\":\"1399245077\",\"predicate\":\"phoneCallEmpty\",\"params\":[{\"name\":\"id\",\"type\":\"long\"}],\"type\":\"PhoneCall\"},{\"id\":\"462375633\",\"predicate\":\"phoneCallWaiting\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"video\",\"type\":\"flags.5?true\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"admin_id\",\"type\":\"int\"},{\"name\":\"participant_id\",\"type\":\"int\"},{\"name\":\"protocol\",\"type\":\"PhoneCallProtocol\"},{\"name\":\"receive_date\",\"type\":\"flags.0?int\"}],\"type\":\"PhoneCall\"},{\"id\":\"-2014659757\",\"predicate\":\"phoneCallRequested\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"video\",\"type\":\"flags.5?true\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"admin_id\",\"type\":\"int\"},{\"name\":\"participant_id\",\"type\":\"int\"},{\"name\":\"g_a_hash\",\"type\":\"bytes\"},{\"name\":\"protocol\",\"type\":\"PhoneCallProtocol\"}],\"type\":\"PhoneCall\"},{\"id\":\"-1719909046\",\"predicate\":\"phoneCallAccepted\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"video\",\"type\":\"flags.5?true\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"admin_id\",\"type\":\"int\"},{\"name\":\"participant_id\",\"type\":\"int\"},{\"name\":\"g_b\",\"type\":\"bytes\"},{\"name\":\"protocol\",\"type\":\"PhoneCallProtocol\"}],\"type\":\"PhoneCall\"},{\"id\":\"-2025673089\",\"predicate\":\"phoneCall\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"p2p_allowed\",\"type\":\"flags.5?true\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"admin_id\",\"type\":\"int\"},{\"name\":\"participant_id\",\"type\":\"int\"},{\"name\":\"g_a_or_b\",\"type\":\"bytes\"},{\"name\":\"key_fingerprint\",\"type\":\"long\"},{\"name\":\"protocol\",\"type\":\"PhoneCallProtocol\"},{\"name\":\"connections\",\"type\":\"Vector\"},{\"name\":\"start_date\",\"type\":\"int\"}],\"type\":\"PhoneCall\"},{\"id\":\"1355435489\",\"predicate\":\"phoneCallDiscarded\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"need_rating\",\"type\":\"flags.2?true\"},{\"name\":\"need_debug\",\"type\":\"flags.3?true\"},{\"name\":\"video\",\"type\":\"flags.5?true\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"reason\",\"type\":\"flags.0?PhoneCallDiscardReason\"},{\"name\":\"duration\",\"type\":\"flags.1?int\"}],\"type\":\"PhoneCall\"},{\"id\":\"-1655957568\",\"predicate\":\"phoneConnection\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"ip\",\"type\":\"string\"},{\"name\":\"ipv6\",\"type\":\"string\"},{\"name\":\"port\",\"type\":\"int\"},{\"name\":\"peer_tag\",\"type\":\"bytes\"}],\"type\":\"PhoneConnection\"},{\"id\":\"-1564789301\",\"predicate\":\"phoneCallProtocol\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"udp_p2p\",\"type\":\"flags.0?true\"},{\"name\":\"udp_reflector\",\"type\":\"flags.1?true\"},{\"name\":\"min_layer\",\"type\":\"int\"},{\"name\":\"max_layer\",\"type\":\"int\"}],\"type\":\"PhoneCallProtocol\"},{\"id\":\"-326966976\",\"predicate\":\"phone.phoneCall\",\"params\":[{\"name\":\"phone_call\",\"type\":\"PhoneCall\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"phone.PhoneCall\"},{\"id\":\"-2134272152\",\"predicate\":\"inputMessagesFilterPhoneCalls\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"missed\",\"type\":\"flags.0?true\"}],\"type\":\"MessagesFilter\"},{\"id\":\"-2132731265\",\"predicate\":\"messageActionPhoneCall\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"video\",\"type\":\"flags.2?true\"},{\"name\":\"call_id\",\"type\":\"long\"},{\"name\":\"reason\",\"type\":\"flags.0?PhoneCallDiscardReason\"},{\"name\":\"duration\",\"type\":\"flags.1?int\"}],\"type\":\"MessageAction\"},{\"id\":\"2054952868\",\"predicate\":\"inputMessagesFilterRoundVoice\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"-1253451181\",\"predicate\":\"inputMessagesFilterRoundVideo\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"-1997373508\",\"predicate\":\"sendMessageRecordRoundAction\",\"params\":[],\"type\":\"SendMessageAction\"},{\"id\":\"608050278\",\"predicate\":\"sendMessageUploadRoundAction\",\"params\":[{\"name\":\"progress\",\"type\":\"int\"}],\"type\":\"SendMessageAction\"},{\"id\":\"-242427324\",\"predicate\":\"upload.fileCdnRedirect\",\"params\":[{\"name\":\"dc_id\",\"type\":\"int\"},{\"name\":\"file_token\",\"type\":\"bytes\"},{\"name\":\"encryption_key\",\"type\":\"bytes\"},{\"name\":\"encryption_iv\",\"type\":\"bytes\"},{\"name\":\"file_hashes\",\"type\":\"Vector\"}],\"type\":\"upload.File\"},{\"id\":\"-290921362\",\"predicate\":\"upload.cdnFileReuploadNeeded\",\"params\":[{\"name\":\"request_token\",\"type\":\"bytes\"}],\"type\":\"upload.CdnFile\"},{\"id\":\"-1449145777\",\"predicate\":\"upload.cdnFile\",\"params\":[{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"upload.CdnFile\"},{\"id\":\"-914167110\",\"predicate\":\"cdnPublicKey\",\"params\":[{\"name\":\"dc_id\",\"type\":\"int\"},{\"name\":\"public_key\",\"type\":\"string\"}],\"type\":\"CdnPublicKey\"},{\"id\":\"1462101002\",\"predicate\":\"cdnConfig\",\"params\":[{\"name\":\"public_keys\",\"type\":\"Vector\"}],\"type\":\"CdnConfig\"},{\"id\":\"-283684427\",\"predicate\":\"pageBlockChannel\",\"params\":[{\"name\":\"channel\",\"type\":\"Chat\"}],\"type\":\"PageBlock\"},{\"id\":\"-892239370\",\"predicate\":\"langPackString\",\"params\":[{\"name\":\"key\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"}],\"type\":\"LangPackString\"},{\"id\":\"1816636575\",\"predicate\":\"langPackStringPluralized\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"key\",\"type\":\"string\"},{\"name\":\"zero_value\",\"type\":\"flags.0?string\"},{\"name\":\"one_value\",\"type\":\"flags.1?string\"},{\"name\":\"two_value\",\"type\":\"flags.2?string\"},{\"name\":\"few_value\",\"type\":\"flags.3?string\"},{\"name\":\"many_value\",\"type\":\"flags.4?string\"},{\"name\":\"other_value\",\"type\":\"string\"}],\"type\":\"LangPackString\"},{\"id\":\"695856818\",\"predicate\":\"langPackStringDeleted\",\"params\":[{\"name\":\"key\",\"type\":\"string\"}],\"type\":\"LangPackString\"},{\"id\":\"-209337866\",\"predicate\":\"langPackDifference\",\"params\":[{\"name\":\"lang_code\",\"type\":\"string\"},{\"name\":\"from_version\",\"type\":\"int\"},{\"name\":\"version\",\"type\":\"int\"},{\"name\":\"strings\",\"type\":\"Vector\"}],\"type\":\"LangPackDifference\"},{\"id\":\"-288727837\",\"predicate\":\"langPackLanguage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"official\",\"type\":\"flags.0?true\"},{\"name\":\"rtl\",\"type\":\"flags.2?true\"},{\"name\":\"beta\",\"type\":\"flags.3?true\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"native_name\",\"type\":\"string\"},{\"name\":\"lang_code\",\"type\":\"string\"},{\"name\":\"base_lang_code\",\"type\":\"flags.1?string\"},{\"name\":\"plural_code\",\"type\":\"string\"},{\"name\":\"strings_count\",\"type\":\"int\"},{\"name\":\"translated_count\",\"type\":\"int\"},{\"name\":\"translations_url\",\"type\":\"string\"}],\"type\":\"LangPackLanguage\"},{\"id\":\"1180041828\",\"predicate\":\"updateLangPackTooLong\",\"params\":[{\"name\":\"lang_code\",\"type\":\"string\"}],\"type\":\"Update\"},{\"id\":\"1442983757\",\"predicate\":\"updateLangPack\",\"params\":[{\"name\":\"difference\",\"type\":\"LangPackDifference\"}],\"type\":\"Update\"},{\"id\":\"-859915345\",\"predicate\":\"channelParticipantAdmin\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"can_edit\",\"type\":\"flags.0?true\"},{\"name\":\"self\",\"type\":\"flags.1?true\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"inviter_id\",\"type\":\"flags.1?int\"},{\"name\":\"promoted_by\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"admin_rights\",\"type\":\"ChatAdminRights\"},{\"name\":\"rank\",\"type\":\"flags.2?string\"}],\"type\":\"ChannelParticipant\"},{\"id\":\"470789295\",\"predicate\":\"channelParticipantBanned\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"left\",\"type\":\"flags.0?true\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"kicked_by\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"banned_rights\",\"type\":\"ChatBannedRights\"}],\"type\":\"ChannelParticipant\"},{\"id\":\"338142689\",\"predicate\":\"channelParticipantsBanned\",\"params\":[{\"name\":\"q\",\"type\":\"string\"}],\"type\":\"ChannelParticipantsFilter\"},{\"id\":\"106343499\",\"predicate\":\"channelParticipantsSearch\",\"params\":[{\"name\":\"q\",\"type\":\"string\"}],\"type\":\"ChannelParticipantsFilter\"},{\"id\":\"-421545947\",\"predicate\":\"channelAdminLogEventActionChangeTitle\",\"params\":[{\"name\":\"prev_value\",\"type\":\"string\"},{\"name\":\"new_value\",\"type\":\"string\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"1427671598\",\"predicate\":\"channelAdminLogEventActionChangeAbout\",\"params\":[{\"name\":\"prev_value\",\"type\":\"string\"},{\"name\":\"new_value\",\"type\":\"string\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"1783299128\",\"predicate\":\"channelAdminLogEventActionChangeUsername\",\"params\":[{\"name\":\"prev_value\",\"type\":\"string\"},{\"name\":\"new_value\",\"type\":\"string\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"1129042607\",\"predicate\":\"channelAdminLogEventActionChangePhoto\",\"params\":[{\"name\":\"prev_photo\",\"type\":\"Photo\"},{\"name\":\"new_photo\",\"type\":\"Photo\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"460916654\",\"predicate\":\"channelAdminLogEventActionToggleInvites\",\"params\":[{\"name\":\"new_value\",\"type\":\"Bool\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"648939889\",\"predicate\":\"channelAdminLogEventActionToggleSignatures\",\"params\":[{\"name\":\"new_value\",\"type\":\"Bool\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-370660328\",\"predicate\":\"channelAdminLogEventActionUpdatePinned\",\"params\":[{\"name\":\"message\",\"type\":\"Message\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"1889215493\",\"predicate\":\"channelAdminLogEventActionEditMessage\",\"params\":[{\"name\":\"prev_message\",\"type\":\"Message\"},{\"name\":\"new_message\",\"type\":\"Message\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"1121994683\",\"predicate\":\"channelAdminLogEventActionDeleteMessage\",\"params\":[{\"name\":\"message\",\"type\":\"Message\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"405815507\",\"predicate\":\"channelAdminLogEventActionParticipantJoin\",\"params\":[],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-124291086\",\"predicate\":\"channelAdminLogEventActionParticipantLeave\",\"params\":[],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-484690728\",\"predicate\":\"channelAdminLogEventActionParticipantInvite\",\"params\":[{\"name\":\"participant\",\"type\":\"ChannelParticipant\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-422036098\",\"predicate\":\"channelAdminLogEventActionParticipantToggleBan\",\"params\":[{\"name\":\"prev_participant\",\"type\":\"ChannelParticipant\"},{\"name\":\"new_participant\",\"type\":\"ChannelParticipant\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-714643696\",\"predicate\":\"channelAdminLogEventActionParticipantToggleAdmin\",\"params\":[{\"name\":\"prev_participant\",\"type\":\"ChannelParticipant\"},{\"name\":\"new_participant\",\"type\":\"ChannelParticipant\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"995769920\",\"predicate\":\"channelAdminLogEvent\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"action\",\"type\":\"ChannelAdminLogEventAction\"}],\"type\":\"ChannelAdminLogEvent\"},{\"id\":\"-309659827\",\"predicate\":\"channels.adminLogResults\",\"params\":[{\"name\":\"events\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"channels.AdminLogResults\"},{\"id\":\"-368018716\",\"predicate\":\"channelAdminLogEventsFilter\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"join\",\"type\":\"flags.0?true\"},{\"name\":\"leave\",\"type\":\"flags.1?true\"},{\"name\":\"invite\",\"type\":\"flags.2?true\"},{\"name\":\"ban\",\"type\":\"flags.3?true\"},{\"name\":\"unban\",\"type\":\"flags.4?true\"},{\"name\":\"kick\",\"type\":\"flags.5?true\"},{\"name\":\"unkick\",\"type\":\"flags.6?true\"},{\"name\":\"promote\",\"type\":\"flags.7?true\"},{\"name\":\"demote\",\"type\":\"flags.8?true\"},{\"name\":\"info\",\"type\":\"flags.9?true\"},{\"name\":\"settings\",\"type\":\"flags.10?true\"},{\"name\":\"pinned\",\"type\":\"flags.11?true\"},{\"name\":\"edit\",\"type\":\"flags.12?true\"},{\"name\":\"delete\",\"type\":\"flags.13?true\"}],\"type\":\"ChannelAdminLogEventsFilter\"},{\"id\":\"511092620\",\"predicate\":\"topPeerCategoryPhoneCalls\",\"params\":[],\"type\":\"TopPeerCategory\"},{\"id\":\"-2143067670\",\"predicate\":\"pageBlockAudio\",\"params\":[{\"name\":\"audio_id\",\"type\":\"long\"},{\"name\":\"caption\",\"type\":\"PageCaption\"}],\"type\":\"PageBlock\"},{\"id\":\"1558266229\",\"predicate\":\"popularContact\",\"params\":[{\"name\":\"client_id\",\"type\":\"long\"},{\"name\":\"importers\",\"type\":\"int\"}],\"type\":\"PopularContact\"},{\"id\":\"1200788123\",\"predicate\":\"messageActionScreenshotTaken\",\"params\":[],\"type\":\"MessageAction\"},{\"id\":\"-1634752813\",\"predicate\":\"messages.favedStickersNotModified\",\"params\":[],\"type\":\"messages.FavedStickers\"},{\"id\":\"-209768682\",\"predicate\":\"messages.favedStickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"packs\",\"type\":\"Vector\"},{\"name\":\"stickers\",\"type\":\"Vector\"}],\"type\":\"messages.FavedStickers\"},{\"id\":\"-451831443\",\"predicate\":\"updateFavedStickers\",\"params\":[],\"type\":\"Update\"},{\"id\":\"-1987495099\",\"predicate\":\"updateChannelReadMessagesContents\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"messages\",\"type\":\"Vector\"}],\"type\":\"Update\"},{\"id\":\"-1040652646\",\"predicate\":\"inputMessagesFilterMyMentions\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"1887741886\",\"predicate\":\"updateContactsReset\",\"params\":[],\"type\":\"Update\"},{\"id\":\"-1312568665\",\"predicate\":\"channelAdminLogEventActionChangeStickerSet\",\"params\":[{\"name\":\"prev_stickerset\",\"type\":\"InputStickerSet\"},{\"name\":\"new_stickerset\",\"type\":\"InputStickerSet\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-85549226\",\"predicate\":\"messageActionCustomAction\",\"params\":[{\"name\":\"message\",\"type\":\"string\"}],\"type\":\"MessageAction\"},{\"id\":\"178373535\",\"predicate\":\"inputPaymentCredentialsApplePay\",\"params\":[{\"name\":\"payment_data\",\"type\":\"DataJSON\"}],\"type\":\"InputPaymentCredentials\"},{\"id\":\"-905587442\",\"predicate\":\"inputPaymentCredentialsAndroidPay\",\"params\":[{\"name\":\"payment_token\",\"type\":\"DataJSON\"},{\"name\":\"google_transaction_id\",\"type\":\"string\"}],\"type\":\"InputPaymentCredentials\"},{\"id\":\"-419271411\",\"predicate\":\"inputMessagesFilterGeo\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"-530392189\",\"predicate\":\"inputMessagesFilterContacts\",\"params\":[],\"type\":\"MessagesFilter\"},{\"id\":\"1893427255\",\"predicate\":\"updateChannelAvailableMessages\",\"params\":[{\"name\":\"channel_id\",\"type\":\"int\"},{\"name\":\"available_min_id\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"1599903217\",\"predicate\":\"channelAdminLogEventActionTogglePreHistoryHidden\",\"params\":[{\"name\":\"new_value\",\"type\":\"Bool\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-833715459\",\"predicate\":\"inputMediaGeoLive\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"stopped\",\"type\":\"flags.0?true\"},{\"name\":\"geo_point\",\"type\":\"InputGeoPoint\"},{\"name\":\"period\",\"type\":\"flags.1?int\"}],\"type\":\"InputMedia\"},{\"id\":\"2084316681\",\"predicate\":\"messageMediaGeoLive\",\"params\":[{\"name\":\"geo\",\"type\":\"GeoPoint\"},{\"name\":\"period\",\"type\":\"int\"}],\"type\":\"MessageMedia\"},{\"id\":\"1189204285\",\"predicate\":\"recentMeUrlUnknown\",\"params\":[{\"name\":\"url\",\"type\":\"string\"}],\"type\":\"RecentMeUrl\"},{\"id\":\"-1917045962\",\"predicate\":\"recentMeUrlUser\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"user_id\",\"type\":\"int\"}],\"type\":\"RecentMeUrl\"},{\"id\":\"-1608834311\",\"predicate\":\"recentMeUrlChat\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"chat_id\",\"type\":\"int\"}],\"type\":\"RecentMeUrl\"},{\"id\":\"-347535331\",\"predicate\":\"recentMeUrlChatInvite\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"chat_invite\",\"type\":\"ChatInvite\"}],\"type\":\"RecentMeUrl\"},{\"id\":\"-1140172836\",\"predicate\":\"recentMeUrlStickerSet\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"set\",\"type\":\"StickerSetCovered\"}],\"type\":\"RecentMeUrl\"},{\"id\":\"235081943\",\"predicate\":\"help.recentMeUrls\",\"params\":[{\"name\":\"urls\",\"type\":\"Vector\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"help.RecentMeUrls\"},{\"id\":\"-266911767\",\"predicate\":\"channels.channelParticipantsNotModified\",\"params\":[],\"type\":\"channels.ChannelParticipants\"},{\"id\":\"1951620897\",\"predicate\":\"messages.messagesNotModified\",\"params\":[{\"name\":\"count\",\"type\":\"int\"}],\"type\":\"messages.Messages\"},{\"id\":\"482797855\",\"predicate\":\"inputSingleMedia\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"media\",\"type\":\"InputMedia\"},{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.0?Vector\"}],\"type\":\"InputSingleMedia\"},{\"id\":\"-892779534\",\"predicate\":\"webAuthorization\",\"params\":[{\"name\":\"hash\",\"type\":\"long\"},{\"name\":\"bot_id\",\"type\":\"int\"},{\"name\":\"domain\",\"type\":\"string\"},{\"name\":\"browser\",\"type\":\"string\"},{\"name\":\"platform\",\"type\":\"string\"},{\"name\":\"date_created\",\"type\":\"int\"},{\"name\":\"date_active\",\"type\":\"int\"},{\"name\":\"ip\",\"type\":\"string\"},{\"name\":\"region\",\"type\":\"string\"}],\"type\":\"WebAuthorization\"},{\"id\":\"-313079300\",\"predicate\":\"account.webAuthorizations\",\"params\":[{\"name\":\"authorizations\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"account.WebAuthorizations\"},{\"id\":\"-1502174430\",\"predicate\":\"inputMessageID\",\"params\":[{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"InputMessage\"},{\"id\":\"-1160215659\",\"predicate\":\"inputMessageReplyTo\",\"params\":[{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"InputMessage\"},{\"id\":\"-2037963464\",\"predicate\":\"inputMessagePinned\",\"params\":[],\"type\":\"InputMessage\"},{\"id\":\"-1687559349\",\"predicate\":\"messageEntityPhone\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"1280209983\",\"predicate\":\"messageEntityCashtag\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"-1410748418\",\"predicate\":\"messageActionBotAllowed\",\"params\":[{\"name\":\"domain\",\"type\":\"string\"}],\"type\":\"MessageAction\"},{\"id\":\"-55902537\",\"predicate\":\"inputDialogPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"InputDialogPeer\"},{\"id\":\"-445792507\",\"predicate\":\"dialogPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"}],\"type\":\"DialogPeer\"},{\"id\":\"223655517\",\"predicate\":\"messages.foundStickerSetsNotModified\",\"params\":[],\"type\":\"messages.FoundStickerSets\"},{\"id\":\"1359533640\",\"predicate\":\"messages.foundStickerSets\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"sets\",\"type\":\"Vector\"}],\"type\":\"messages.FoundStickerSets\"},{\"id\":\"1648543603\",\"predicate\":\"fileHash\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"},{\"name\":\"hash\",\"type\":\"bytes\"}],\"type\":\"FileHash\"},{\"id\":\"-104284986\",\"predicate\":\"webDocumentNoProxy\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"size\",\"type\":\"int\"},{\"name\":\"mime_type\",\"type\":\"string\"},{\"name\":\"attributes\",\"type\":\"Vector\"}],\"type\":\"WebDocument\"},{\"id\":\"1968737087\",\"predicate\":\"inputClientProxy\",\"params\":[{\"name\":\"address\",\"type\":\"string\"},{\"name\":\"port\",\"type\":\"int\"}],\"type\":\"InputClientProxy\"},{\"id\":\"-526508104\",\"predicate\":\"help.proxyDataEmpty\",\"params\":[{\"name\":\"expires\",\"type\":\"int\"}],\"type\":\"help.ProxyData\"},{\"id\":\"737668643\",\"predicate\":\"help.proxyDataPromo\",\"params\":[{\"name\":\"expires\",\"type\":\"int\"},{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"chats\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"help.ProxyData\"},{\"id\":\"-483352705\",\"predicate\":\"help.termsOfServiceUpdateEmpty\",\"params\":[{\"name\":\"expires\",\"type\":\"int\"}],\"type\":\"help.TermsOfServiceUpdate\"},{\"id\":\"686618977\",\"predicate\":\"help.termsOfServiceUpdate\",\"params\":[{\"name\":\"expires\",\"type\":\"int\"},{\"name\":\"terms_of_service\",\"type\":\"help.TermsOfService\"}],\"type\":\"help.TermsOfServiceUpdate\"},{\"id\":\"859091184\",\"predicate\":\"inputSecureFileUploaded\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"parts\",\"type\":\"int\"},{\"name\":\"md5_checksum\",\"type\":\"string\"},{\"name\":\"file_hash\",\"type\":\"bytes\"},{\"name\":\"secret\",\"type\":\"bytes\"}],\"type\":\"InputSecureFile\"},{\"id\":\"1399317950\",\"predicate\":\"inputSecureFile\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputSecureFile\"},{\"id\":\"-876089816\",\"predicate\":\"inputSecureFileLocation\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputFileLocation\"},{\"id\":\"1679398724\",\"predicate\":\"secureFileEmpty\",\"params\":[],\"type\":\"SecureFile\"},{\"id\":\"-534283678\",\"predicate\":\"secureFile\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"size\",\"type\":\"int\"},{\"name\":\"dc_id\",\"type\":\"int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"file_hash\",\"type\":\"bytes\"},{\"name\":\"secret\",\"type\":\"bytes\"}],\"type\":\"SecureFile\"},{\"id\":\"-1964327229\",\"predicate\":\"secureData\",\"params\":[{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"data_hash\",\"type\":\"bytes\"},{\"name\":\"secret\",\"type\":\"bytes\"}],\"type\":\"SecureData\"},{\"id\":\"2103482845\",\"predicate\":\"securePlainPhone\",\"params\":[{\"name\":\"phone\",\"type\":\"string\"}],\"type\":\"SecurePlainData\"},{\"id\":\"569137759\",\"predicate\":\"securePlainEmail\",\"params\":[{\"name\":\"email\",\"type\":\"string\"}],\"type\":\"SecurePlainData\"},{\"id\":\"-1658158621\",\"predicate\":\"secureValueTypePersonalDetails\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"1034709504\",\"predicate\":\"secureValueTypePassport\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"115615172\",\"predicate\":\"secureValueTypeDriverLicense\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-1596951477\",\"predicate\":\"secureValueTypeIdentityCard\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-1717268701\",\"predicate\":\"secureValueTypeInternalPassport\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-874308058\",\"predicate\":\"secureValueTypeAddress\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-63531698\",\"predicate\":\"secureValueTypeUtilityBill\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-1995211763\",\"predicate\":\"secureValueTypeBankStatement\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-1954007928\",\"predicate\":\"secureValueTypeRentalAgreement\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-1713143702\",\"predicate\":\"secureValueTypePassportRegistration\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-368907213\",\"predicate\":\"secureValueTypeTemporaryRegistration\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-1289704741\",\"predicate\":\"secureValueTypePhone\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"-1908627474\",\"predicate\":\"secureValueTypeEmail\",\"params\":[],\"type\":\"SecureValueType\"},{\"id\":\"411017418\",\"predicate\":\"secureValue\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"data\",\"type\":\"flags.0?SecureData\"},{\"name\":\"front_side\",\"type\":\"flags.1?SecureFile\"},{\"name\":\"reverse_side\",\"type\":\"flags.2?SecureFile\"},{\"name\":\"selfie\",\"type\":\"flags.3?SecureFile\"},{\"name\":\"translation\",\"type\":\"flags.6?Vector\"},{\"name\":\"files\",\"type\":\"flags.4?Vector\"},{\"name\":\"plain_data\",\"type\":\"flags.5?SecurePlainData\"},{\"name\":\"hash\",\"type\":\"bytes\"}],\"type\":\"SecureValue\"},{\"id\":\"-618540889\",\"predicate\":\"inputSecureValue\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"data\",\"type\":\"flags.0?SecureData\"},{\"name\":\"front_side\",\"type\":\"flags.1?InputSecureFile\"},{\"name\":\"reverse_side\",\"type\":\"flags.2?InputSecureFile\"},{\"name\":\"selfie\",\"type\":\"flags.3?InputSecureFile\"},{\"name\":\"translation\",\"type\":\"flags.6?Vector\"},{\"name\":\"files\",\"type\":\"flags.4?Vector\"},{\"name\":\"plain_data\",\"type\":\"flags.5?SecurePlainData\"}],\"type\":\"InputSecureValue\"},{\"id\":\"-316748368\",\"predicate\":\"secureValueHash\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"hash\",\"type\":\"bytes\"}],\"type\":\"SecureValueHash\"},{\"id\":\"-391902247\",\"predicate\":\"secureValueErrorData\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"data_hash\",\"type\":\"bytes\"},{\"name\":\"field\",\"type\":\"string\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"12467706\",\"predicate\":\"secureValueErrorFrontSide\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"file_hash\",\"type\":\"bytes\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"-2037765467\",\"predicate\":\"secureValueErrorReverseSide\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"file_hash\",\"type\":\"bytes\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"-449327402\",\"predicate\":\"secureValueErrorSelfie\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"file_hash\",\"type\":\"bytes\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"2054162547\",\"predicate\":\"secureValueErrorFile\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"file_hash\",\"type\":\"bytes\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"1717706985\",\"predicate\":\"secureValueErrorFiles\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"file_hash\",\"type\":\"Vector\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"871426631\",\"predicate\":\"secureCredentialsEncrypted\",\"params\":[{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"hash\",\"type\":\"bytes\"},{\"name\":\"secret\",\"type\":\"bytes\"}],\"type\":\"SecureCredentialsEncrypted\"},{\"id\":\"-1389486888\",\"predicate\":\"account.authorizationForm\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"required_types\",\"type\":\"Vector\"},{\"name\":\"values\",\"type\":\"Vector\"},{\"name\":\"errors\",\"type\":\"Vector\"},{\"name\":\"users\",\"type\":\"Vector\"},{\"name\":\"privacy_policy_url\",\"type\":\"flags.0?string\"}],\"type\":\"account.AuthorizationForm\"},{\"id\":\"-2128640689\",\"predicate\":\"account.sentEmailCode\",\"params\":[{\"name\":\"email_pattern\",\"type\":\"string\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"account.SentEmailCode\"},{\"id\":\"455635795\",\"predicate\":\"messageActionSecureValuesSentMe\",\"params\":[{\"name\":\"values\",\"type\":\"Vector\"},{\"name\":\"credentials\",\"type\":\"SecureCredentialsEncrypted\"}],\"type\":\"MessageAction\"},{\"id\":\"-648257196\",\"predicate\":\"messageActionSecureValuesSent\",\"params\":[{\"name\":\"types\",\"type\":\"Vector\"}],\"type\":\"MessageAction\"},{\"id\":\"1722786150\",\"predicate\":\"help.deepLinkInfoEmpty\",\"params\":[],\"type\":\"help.DeepLinkInfo\"},{\"id\":\"1783556146\",\"predicate\":\"help.deepLinkInfo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"update_app\",\"type\":\"flags.0?true\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.1?Vector\"}],\"type\":\"help.DeepLinkInfo\"},{\"id\":\"289586518\",\"predicate\":\"savedPhoneContact\",\"params\":[{\"name\":\"phone\",\"type\":\"string\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"SavedContact\"},{\"id\":\"1304052993\",\"predicate\":\"account.takeout\",\"params\":[{\"name\":\"id\",\"type\":\"long\"}],\"type\":\"account.Takeout\"},{\"id\":\"700340377\",\"predicate\":\"inputTakeoutFileLocation\",\"params\":[],\"type\":\"InputFileLocation\"},{\"id\":\"-513517117\",\"predicate\":\"updateDialogUnreadMark\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"unread\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"DialogPeer\"}],\"type\":\"Update\"},{\"id\":\"-253500010\",\"predicate\":\"messages.dialogsNotModified\",\"params\":[{\"name\":\"count\",\"type\":\"int\"}],\"type\":\"messages.Dialogs\"},{\"id\":\"-1625153079\",\"predicate\":\"inputWebFileGeoPointLocation\",\"params\":[{\"name\":\"geo_point\",\"type\":\"InputGeoPoint\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"w\",\"type\":\"int\"},{\"name\":\"h\",\"type\":\"int\"},{\"name\":\"zoom\",\"type\":\"int\"},{\"name\":\"scale\",\"type\":\"int\"}],\"type\":\"InputWebFileLocation\"},{\"id\":\"-1255369827\",\"predicate\":\"contacts.topPeersDisabled\",\"params\":[],\"type\":\"contacts.TopPeers\"},{\"id\":\"-1685456582\",\"predicate\":\"inputReportReasonCopyright\",\"params\":[],\"type\":\"ReportReason\"},{\"id\":\"-732254058\",\"predicate\":\"passwordKdfAlgoUnknown\",\"params\":[],\"type\":\"PasswordKdfAlgo\"},{\"id\":\"4883767\",\"predicate\":\"securePasswordKdfAlgoUnknown\",\"params\":[],\"type\":\"SecurePasswordKdfAlgo\"},{\"id\":\"-1141711456\",\"predicate\":\"securePasswordKdfAlgoPBKDF2HMACSHA512iter100000\",\"params\":[{\"name\":\"salt\",\"type\":\"bytes\"}],\"type\":\"SecurePasswordKdfAlgo\"},{\"id\":\"-2042159726\",\"predicate\":\"securePasswordKdfAlgoSHA512\",\"params\":[{\"name\":\"salt\",\"type\":\"bytes\"}],\"type\":\"SecurePasswordKdfAlgo\"},{\"id\":\"354925740\",\"predicate\":\"secureSecretSettings\",\"params\":[{\"name\":\"secure_algo\",\"type\":\"SecurePasswordKdfAlgo\"},{\"name\":\"secure_secret\",\"type\":\"bytes\"},{\"name\":\"secure_secret_id\",\"type\":\"long\"}],\"type\":\"SecureSecretSettings\"},{\"id\":\"982592842\",\"predicate\":\"passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow\",\"params\":[{\"name\":\"salt1\",\"type\":\"bytes\"},{\"name\":\"salt2\",\"type\":\"bytes\"},{\"name\":\"g\",\"type\":\"int\"},{\"name\":\"p\",\"type\":\"bytes\"}],\"type\":\"PasswordKdfAlgo\"},{\"id\":\"-1736378792\",\"predicate\":\"inputCheckPasswordEmpty\",\"params\":[],\"type\":\"InputCheckPasswordSRP\"},{\"id\":\"-763367294\",\"predicate\":\"inputCheckPasswordSRP\",\"params\":[{\"name\":\"srp_id\",\"type\":\"long\"},{\"name\":\"A\",\"type\":\"bytes\"},{\"name\":\"M1\",\"type\":\"bytes\"}],\"type\":\"InputCheckPasswordSRP\"},{\"id\":\"-2036501105\",\"predicate\":\"secureValueError\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"hash\",\"type\":\"bytes\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"-1592506512\",\"predicate\":\"secureValueErrorTranslationFile\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"file_hash\",\"type\":\"bytes\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"878931416\",\"predicate\":\"secureValueErrorTranslationFiles\",\"params\":[{\"name\":\"type\",\"type\":\"SecureValueType\"},{\"name\":\"file_hash\",\"type\":\"Vector\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"SecureValueError\"},{\"id\":\"-2103600678\",\"predicate\":\"secureRequiredType\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"native_names\",\"type\":\"flags.0?true\"},{\"name\":\"selfie_required\",\"type\":\"flags.1?true\"},{\"name\":\"translation_required\",\"type\":\"flags.2?true\"},{\"name\":\"type\",\"type\":\"SecureValueType\"}],\"type\":\"SecureRequiredType\"},{\"id\":\"41187252\",\"predicate\":\"secureRequiredTypeOneOf\",\"params\":[{\"name\":\"types\",\"type\":\"Vector\"}],\"type\":\"SecureRequiredType\"},{\"id\":\"-1078332329\",\"predicate\":\"help.passportConfigNotModified\",\"params\":[],\"type\":\"help.PassportConfig\"},{\"id\":\"-1600596305\",\"predicate\":\"help.passportConfig\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"countries_langs\",\"type\":\"DataJSON\"}],\"type\":\"help.PassportConfig\"},{\"id\":\"488313413\",\"predicate\":\"inputAppEvent\",\"params\":[{\"name\":\"time\",\"type\":\"double\"},{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"peer\",\"type\":\"long\"},{\"name\":\"data\",\"type\":\"JSONValue\"}],\"type\":\"InputAppEvent\"},{\"id\":\"-1059185703\",\"predicate\":\"jsonObjectValue\",\"params\":[{\"name\":\"key\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"JSONValue\"}],\"type\":\"JSONObjectValue\"},{\"id\":\"1064139624\",\"predicate\":\"jsonNull\",\"params\":[],\"type\":\"JSONValue\"},{\"id\":\"-952869270\",\"predicate\":\"jsonBool\",\"params\":[{\"name\":\"value\",\"type\":\"Bool\"}],\"type\":\"JSONValue\"},{\"id\":\"736157604\",\"predicate\":\"jsonNumber\",\"params\":[{\"name\":\"value\",\"type\":\"double\"}],\"type\":\"JSONValue\"},{\"id\":\"-1222740358\",\"predicate\":\"jsonString\",\"params\":[{\"name\":\"value\",\"type\":\"string\"}],\"type\":\"JSONValue\"},{\"id\":\"-146520221\",\"predicate\":\"jsonArray\",\"params\":[{\"name\":\"value\",\"type\":\"Vector\"}],\"type\":\"JSONValue\"},{\"id\":\"-1715350371\",\"predicate\":\"jsonObject\",\"params\":[{\"name\":\"value\",\"type\":\"Vector\"}],\"type\":\"JSONValue\"},{\"id\":\"1279515160\",\"predicate\":\"updateUserPinnedMessage\",\"params\":[{\"name\":\"user_id\",\"type\":\"int\"},{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-519195831\",\"predicate\":\"updateChatPinnedMessage\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"version\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-1311015810\",\"predicate\":\"inputNotifyBroadcasts\",\"params\":[],\"type\":\"InputNotifyPeer\"},{\"id\":\"-703403793\",\"predicate\":\"notifyBroadcasts\",\"params\":[],\"type\":\"NotifyPeer\"},{\"id\":\"-311786236\",\"predicate\":\"textSubscript\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"RichText\"},{\"id\":\"-939827711\",\"predicate\":\"textSuperscript\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"RichText\"},{\"id\":\"55281185\",\"predicate\":\"textMarked\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"RichText\"},{\"id\":\"483104362\",\"predicate\":\"textPhone\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"},{\"name\":\"phone\",\"type\":\"string\"}],\"type\":\"RichText\"},{\"id\":\"136105807\",\"predicate\":\"textImage\",\"params\":[{\"name\":\"document_id\",\"type\":\"long\"},{\"name\":\"w\",\"type\":\"int\"},{\"name\":\"h\",\"type\":\"int\"}],\"type\":\"RichText\"},{\"id\":\"504660880\",\"predicate\":\"pageBlockKicker\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"878078826\",\"predicate\":\"pageTableCell\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"header\",\"type\":\"flags.0?true\"},{\"name\":\"align_center\",\"type\":\"flags.3?true\"},{\"name\":\"align_right\",\"type\":\"flags.4?true\"},{\"name\":\"valign_middle\",\"type\":\"flags.5?true\"},{\"name\":\"valign_bottom\",\"type\":\"flags.6?true\"},{\"name\":\"text\",\"type\":\"flags.7?RichText\"},{\"name\":\"colspan\",\"type\":\"flags.1?int\"},{\"name\":\"rowspan\",\"type\":\"flags.2?int\"}],\"type\":\"PageTableCell\"},{\"id\":\"-524237339\",\"predicate\":\"pageTableRow\",\"params\":[{\"name\":\"cells\",\"type\":\"Vector\"}],\"type\":\"PageTableRow\"},{\"id\":\"-1085412734\",\"predicate\":\"pageBlockTable\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"bordered\",\"type\":\"flags.0?true\"},{\"name\":\"striped\",\"type\":\"flags.1?true\"},{\"name\":\"title\",\"type\":\"RichText\"},{\"name\":\"rows\",\"type\":\"Vector\"}],\"type\":\"PageBlock\"},{\"id\":\"1869903447\",\"predicate\":\"pageCaption\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"},{\"name\":\"credit\",\"type\":\"RichText\"}],\"type\":\"PageCaption\"},{\"id\":\"-1188055347\",\"predicate\":\"pageListItemText\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageListItem\"},{\"id\":\"635466748\",\"predicate\":\"pageListItemBlocks\",\"params\":[{\"name\":\"blocks\",\"type\":\"Vector\"}],\"type\":\"PageListItem\"},{\"id\":\"1577484359\",\"predicate\":\"pageListOrderedItemText\",\"params\":[{\"name\":\"num\",\"type\":\"string\"},{\"name\":\"text\",\"type\":\"RichText\"}],\"type\":\"PageListOrderedItem\"},{\"id\":\"-1730311882\",\"predicate\":\"pageListOrderedItemBlocks\",\"params\":[{\"name\":\"num\",\"type\":\"string\"},{\"name\":\"blocks\",\"type\":\"Vector\"}],\"type\":\"PageListOrderedItem\"},{\"id\":\"-1702174239\",\"predicate\":\"pageBlockOrderedList\",\"params\":[{\"name\":\"items\",\"type\":\"Vector\"}],\"type\":\"PageBlock\"},{\"id\":\"1987480557\",\"predicate\":\"pageBlockDetails\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"open\",\"type\":\"flags.0?true\"},{\"name\":\"blocks\",\"type\":\"Vector\"},{\"name\":\"title\",\"type\":\"RichText\"}],\"type\":\"PageBlock\"},{\"id\":\"-1282352120\",\"predicate\":\"pageRelatedArticle\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"webpage_id\",\"type\":\"long\"},{\"name\":\"title\",\"type\":\"flags.0?string\"},{\"name\":\"description\",\"type\":\"flags.1?string\"},{\"name\":\"photo_id\",\"type\":\"flags.2?long\"},{\"name\":\"author\",\"type\":\"flags.3?string\"},{\"name\":\"published_date\",\"type\":\"flags.4?int\"}],\"type\":\"PageRelatedArticle\"},{\"id\":\"370236054\",\"predicate\":\"pageBlockRelatedArticles\",\"params\":[{\"name\":\"title\",\"type\":\"RichText\"},{\"name\":\"articles\",\"type\":\"Vector\"}],\"type\":\"PageBlock\"},{\"id\":\"-1538310410\",\"predicate\":\"pageBlockMap\",\"params\":[{\"name\":\"geo\",\"type\":\"GeoPoint\"},{\"name\":\"zoom\",\"type\":\"int\"},{\"name\":\"w\",\"type\":\"int\"},{\"name\":\"h\",\"type\":\"int\"},{\"name\":\"caption\",\"type\":\"PageCaption\"}],\"type\":\"PageBlock\"},{\"id\":\"-1366746132\",\"predicate\":\"page\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"part\",\"type\":\"flags.0?true\"},{\"name\":\"rtl\",\"type\":\"flags.1?true\"},{\"name\":\"v2\",\"type\":\"flags.2?true\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"blocks\",\"type\":\"Vector\"},{\"name\":\"photos\",\"type\":\"Vector\"},{\"name\":\"documents\",\"type\":\"Vector\"}],\"type\":\"Page\"},{\"id\":\"-610373422\",\"predicate\":\"inputPrivacyKeyPhoneP2P\",\"params\":[],\"type\":\"InputPrivacyKey\"},{\"id\":\"961092808\",\"predicate\":\"privacyKeyPhoneP2P\",\"params\":[],\"type\":\"PrivacyKey\"},{\"id\":\"894777186\",\"predicate\":\"textAnchor\",\"params\":[{\"name\":\"text\",\"type\":\"RichText\"},{\"name\":\"name\",\"type\":\"string\"}],\"type\":\"RichText\"},{\"id\":\"-1945767479\",\"predicate\":\"help.supportName\",\"params\":[{\"name\":\"name\",\"type\":\"string\"}],\"type\":\"help.SupportName\"},{\"id\":\"-206688531\",\"predicate\":\"help.userInfoEmpty\",\"params\":[],\"type\":\"help.UserInfo\"},{\"id\":\"32192344\",\"predicate\":\"help.userInfo\",\"params\":[{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"Vector\"},{\"name\":\"author\",\"type\":\"string\"},{\"name\":\"date\",\"type\":\"int\"}],\"type\":\"help.UserInfo\"},{\"id\":\"-202219658\",\"predicate\":\"messageActionContactSignUp\",\"params\":[],\"type\":\"MessageAction\"},{\"id\":\"-1398708869\",\"predicate\":\"updateMessagePoll\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"poll_id\",\"type\":\"long\"},{\"name\":\"poll\",\"type\":\"flags.0?Poll\"},{\"name\":\"results\",\"type\":\"PollResults\"}],\"type\":\"Update\"},{\"id\":\"1823064809\",\"predicate\":\"pollAnswer\",\"params\":[{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"option\",\"type\":\"bytes\"}],\"type\":\"PollAnswer\"},{\"id\":\"-716006138\",\"predicate\":\"poll\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"closed\",\"type\":\"flags.0?true\"},{\"name\":\"question\",\"type\":\"string\"},{\"name\":\"answers\",\"type\":\"Vector\"}],\"type\":\"Poll\"},{\"id\":\"997055186\",\"predicate\":\"pollAnswerVoters\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"chosen\",\"type\":\"flags.0?true\"},{\"name\":\"option\",\"type\":\"bytes\"},{\"name\":\"voters\",\"type\":\"int\"}],\"type\":\"PollAnswerVoters\"},{\"id\":\"1465219162\",\"predicate\":\"pollResults\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"min\",\"type\":\"flags.0?true\"},{\"name\":\"results\",\"type\":\"flags.1?Vector\"},{\"name\":\"total_voters\",\"type\":\"flags.2?int\"}],\"type\":\"PollResults\"},{\"id\":\"112424539\",\"predicate\":\"inputMediaPoll\",\"params\":[{\"name\":\"poll\",\"type\":\"Poll\"}],\"type\":\"InputMedia\"},{\"id\":\"1272375192\",\"predicate\":\"messageMediaPoll\",\"params\":[{\"name\":\"poll\",\"type\":\"Poll\"},{\"name\":\"results\",\"type\":\"PollResults\"}],\"type\":\"MessageMedia\"},{\"id\":\"-264117680\",\"predicate\":\"chatOnlines\",\"params\":[{\"name\":\"onlines\",\"type\":\"int\"}],\"type\":\"ChatOnlines\"},{\"id\":\"1202287072\",\"predicate\":\"statsURL\",\"params\":[{\"name\":\"url\",\"type\":\"string\"}],\"type\":\"StatsURL\"},{\"id\":\"-525288402\",\"predicate\":\"photoStrippedSize\",\"params\":[{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"PhotoSize\"},{\"id\":\"1605510357\",\"predicate\":\"chatAdminRights\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"change_info\",\"type\":\"flags.0?true\"},{\"name\":\"post_messages\",\"type\":\"flags.1?true\"},{\"name\":\"edit_messages\",\"type\":\"flags.2?true\"},{\"name\":\"delete_messages\",\"type\":\"flags.3?true\"},{\"name\":\"ban_users\",\"type\":\"flags.4?true\"},{\"name\":\"invite_users\",\"type\":\"flags.5?true\"},{\"name\":\"pin_messages\",\"type\":\"flags.7?true\"},{\"name\":\"add_admins\",\"type\":\"flags.9?true\"}],\"type\":\"ChatAdminRights\"},{\"id\":\"-1626209256\",\"predicate\":\"chatBannedRights\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"view_messages\",\"type\":\"flags.0?true\"},{\"name\":\"send_messages\",\"type\":\"flags.1?true\"},{\"name\":\"send_media\",\"type\":\"flags.2?true\"},{\"name\":\"send_stickers\",\"type\":\"flags.3?true\"},{\"name\":\"send_gifs\",\"type\":\"flags.4?true\"},{\"name\":\"send_games\",\"type\":\"flags.5?true\"},{\"name\":\"send_inline\",\"type\":\"flags.6?true\"},{\"name\":\"embed_links\",\"type\":\"flags.7?true\"},{\"name\":\"send_polls\",\"type\":\"flags.8?true\"},{\"name\":\"change_info\",\"type\":\"flags.10?true\"},{\"name\":\"invite_users\",\"type\":\"flags.15?true\"},{\"name\":\"pin_messages\",\"type\":\"flags.17?true\"},{\"name\":\"until_date\",\"type\":\"int\"}],\"type\":\"ChatBannedRights\"},{\"id\":\"1421875280\",\"predicate\":\"updateChatDefaultBannedRights\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"default_banned_rights\",\"type\":\"ChatBannedRights\"},{\"name\":\"version\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"-433014407\",\"predicate\":\"inputWallPaper\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputWallPaper\"},{\"id\":\"1913199744\",\"predicate\":\"inputWallPaperSlug\",\"params\":[{\"name\":\"slug\",\"type\":\"string\"}],\"type\":\"InputWallPaper\"},{\"id\":\"-1150621555\",\"predicate\":\"channelParticipantsContacts\",\"params\":[{\"name\":\"q\",\"type\":\"string\"}],\"type\":\"ChannelParticipantsFilter\"},{\"id\":\"771095562\",\"predicate\":\"channelAdminLogEventActionDefaultBannedRights\",\"params\":[{\"name\":\"prev_banned_rights\",\"type\":\"ChatBannedRights\"},{\"name\":\"new_banned_rights\",\"type\":\"ChatBannedRights\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-1895328189\",\"predicate\":\"channelAdminLogEventActionStopPoll\",\"params\":[{\"name\":\"message\",\"type\":\"Message\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"471437699\",\"predicate\":\"account.wallPapersNotModified\",\"params\":[],\"type\":\"account.WallPapers\"},{\"id\":\"1881892265\",\"predicate\":\"account.wallPapers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"wallpapers\",\"type\":\"Vector\"}],\"type\":\"account.WallPapers\"},{\"id\":\"-557924733\",\"predicate\":\"codeSettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"allow_flashcall\",\"type\":\"flags.0?true\"},{\"name\":\"current_number\",\"type\":\"flags.1?true\"},{\"name\":\"allow_app_hash\",\"type\":\"flags.4?true\"}],\"type\":\"CodeSettings\"},{\"id\":\"-1590738760\",\"predicate\":\"wallPaperSettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"blur\",\"type\":\"flags.1?true\"},{\"name\":\"motion\",\"type\":\"flags.2?true\"},{\"name\":\"background_color\",\"type\":\"flags.0?int\"},{\"name\":\"intensity\",\"type\":\"flags.3?int\"}],\"type\":\"WallPaperSettings\"},{\"id\":\"-767099577\",\"predicate\":\"autoDownloadSettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"disabled\",\"type\":\"flags.0?true\"},{\"name\":\"video_preload_large\",\"type\":\"flags.1?true\"},{\"name\":\"audio_preload_next\",\"type\":\"flags.2?true\"},{\"name\":\"phonecalls_less_data\",\"type\":\"flags.3?true\"},{\"name\":\"photo_size_max\",\"type\":\"int\"},{\"name\":\"video_size_max\",\"type\":\"int\"},{\"name\":\"file_size_max\",\"type\":\"int\"}],\"type\":\"AutoDownloadSettings\"},{\"id\":\"1674235686\",\"predicate\":\"account.autoDownloadSettings\",\"params\":[{\"name\":\"low\",\"type\":\"AutoDownloadSettings\"},{\"name\":\"medium\",\"type\":\"AutoDownloadSettings\"},{\"name\":\"high\",\"type\":\"AutoDownloadSettings\"}],\"type\":\"account.AutoDownloadSettings\"},{\"id\":\"-709641735\",\"predicate\":\"emojiKeyword\",\"params\":[{\"name\":\"keyword\",\"type\":\"string\"},{\"name\":\"emoticons\",\"type\":\"Vector\"}],\"type\":\"EmojiKeyword\"},{\"id\":\"594408994\",\"predicate\":\"emojiKeywordDeleted\",\"params\":[{\"name\":\"keyword\",\"type\":\"string\"},{\"name\":\"emoticons\",\"type\":\"Vector\"}],\"type\":\"EmojiKeyword\"},{\"id\":\"1556570557\",\"predicate\":\"emojiKeywordsDifference\",\"params\":[{\"name\":\"lang_code\",\"type\":\"string\"},{\"name\":\"from_version\",\"type\":\"int\"},{\"name\":\"version\",\"type\":\"int\"},{\"name\":\"keywords\",\"type\":\"Vector\"}],\"type\":\"EmojiKeywordsDifference\"},{\"id\":\"-1519029347\",\"predicate\":\"emojiURL\",\"params\":[{\"name\":\"url\",\"type\":\"string\"}],\"type\":\"EmojiURL\"},{\"id\":\"-1275374751\",\"predicate\":\"emojiLanguage\",\"params\":[{\"name\":\"lang_code\",\"type\":\"string\"}],\"type\":\"EmojiLanguage\"},{\"id\":\"-1529000952\",\"predicate\":\"inputPrivacyKeyForwards\",\"params\":[],\"type\":\"InputPrivacyKey\"},{\"id\":\"1777096355\",\"predicate\":\"privacyKeyForwards\",\"params\":[],\"type\":\"PrivacyKey\"},{\"id\":\"1461304012\",\"predicate\":\"inputPrivacyKeyProfilePhoto\",\"params\":[],\"type\":\"InputPrivacyKey\"},{\"id\":\"-1777000467\",\"predicate\":\"privacyKeyProfilePhoto\",\"params\":[],\"type\":\"PrivacyKey\"},{\"id\":\"-1132476723\",\"predicate\":\"fileLocationToBeDeprecated\",\"params\":[{\"name\":\"volume_id\",\"type\":\"long\"},{\"name\":\"local_id\",\"type\":\"int\"}],\"type\":\"FileLocation\"},{\"id\":\"1075322878\",\"predicate\":\"inputPhotoFileLocation\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"file_reference\",\"type\":\"bytes\"},{\"name\":\"thumb_size\",\"type\":\"string\"}],\"type\":\"InputFileLocation\"},{\"id\":\"-667654413\",\"predicate\":\"inputPhotoLegacyFileLocation\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"file_reference\",\"type\":\"bytes\"},{\"name\":\"volume_id\",\"type\":\"long\"},{\"name\":\"local_id\",\"type\":\"int\"},{\"name\":\"secret\",\"type\":\"long\"}],\"type\":\"InputFileLocation\"},{\"id\":\"668375447\",\"predicate\":\"inputPeerPhotoFileLocation\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"big\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"volume_id\",\"type\":\"long\"},{\"name\":\"local_id\",\"type\":\"int\"}],\"type\":\"InputFileLocation\"},{\"id\":\"230353641\",\"predicate\":\"inputStickerSetThumb\",\"params\":[{\"name\":\"stickerset\",\"type\":\"InputStickerSet\"},{\"name\":\"volume_id\",\"type\":\"long\"},{\"name\":\"local_id\",\"type\":\"int\"}],\"type\":\"InputFileLocation\"},{\"id\":\"-11252123\",\"predicate\":\"folder\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"autofill_new_broadcasts\",\"type\":\"flags.0?true\"},{\"name\":\"autofill_public_groups\",\"type\":\"flags.1?true\"},{\"name\":\"autofill_new_correspondents\",\"type\":\"flags.2?true\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"photo\",\"type\":\"flags.3?ChatPhoto\"}],\"type\":\"Folder\"},{\"id\":\"1908216652\",\"predicate\":\"dialogFolder\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"pinned\",\"type\":\"flags.2?true\"},{\"name\":\"folder\",\"type\":\"Folder\"},{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"top_message\",\"type\":\"int\"},{\"name\":\"unread_muted_peers_count\",\"type\":\"int\"},{\"name\":\"unread_unmuted_peers_count\",\"type\":\"int\"},{\"name\":\"unread_muted_messages_count\",\"type\":\"int\"},{\"name\":\"unread_unmuted_messages_count\",\"type\":\"int\"}],\"type\":\"Dialog\"},{\"id\":\"1684014375\",\"predicate\":\"inputDialogPeerFolder\",\"params\":[{\"name\":\"folder_id\",\"type\":\"int\"}],\"type\":\"InputDialogPeer\"},{\"id\":\"1363483106\",\"predicate\":\"dialogPeerFolder\",\"params\":[{\"name\":\"folder_id\",\"type\":\"int\"}],\"type\":\"DialogPeer\"},{\"id\":\"-70073706\",\"predicate\":\"inputFolderPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"folder_id\",\"type\":\"int\"}],\"type\":\"InputFolderPeer\"},{\"id\":\"-373643672\",\"predicate\":\"folderPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"folder_id\",\"type\":\"int\"}],\"type\":\"FolderPeer\"},{\"id\":\"422972864\",\"predicate\":\"updateFolderPeers\",\"params\":[{\"name\":\"folder_peers\",\"type\":\"Vector\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_count\",\"type\":\"int\"}],\"type\":\"Update\"},{\"id\":\"756118935\",\"predicate\":\"inputUserFromMessage\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"}],\"type\":\"InputUser\"},{\"id\":\"707290417\",\"predicate\":\"inputChannelFromMessage\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"channel_id\",\"type\":\"int\"}],\"type\":\"InputChannel\"},{\"id\":\"398123750\",\"predicate\":\"inputPeerUserFromMessage\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"int\"}],\"type\":\"InputPeer\"},{\"id\":\"-1667893317\",\"predicate\":\"inputPeerChannelFromMessage\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"channel_id\",\"type\":\"int\"}],\"type\":\"InputPeer\"},{\"id\":\"55761658\",\"predicate\":\"inputPrivacyKeyPhoneNumber\",\"params\":[],\"type\":\"InputPrivacyKey\"},{\"id\":\"-778378131\",\"predicate\":\"privacyKeyPhoneNumber\",\"params\":[],\"type\":\"PrivacyKey\"},{\"id\":\"-1472172887\",\"predicate\":\"topPeerCategoryForwardUsers\",\"params\":[],\"type\":\"TopPeerCategory\"},{\"id\":\"-68239120\",\"predicate\":\"topPeerCategoryForwardChats\",\"params\":[],\"type\":\"TopPeerCategory\"},{\"id\":\"-1569748965\",\"predicate\":\"channelAdminLogEventActionChangeLinkedChat\",\"params\":[{\"name\":\"prev_value\",\"type\":\"int\"},{\"name\":\"new_value\",\"type\":\"int\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-398136321\",\"predicate\":\"messages.searchCounter\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"inexact\",\"type\":\"flags.1?true\"},{\"name\":\"filter\",\"type\":\"MessagesFilter\"},{\"name\":\"count\",\"type\":\"int\"}],\"type\":\"messages.SearchCounter\"},{\"id\":\"280464681\",\"predicate\":\"keyboardButtonUrlAuth\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"fwd_text\",\"type\":\"flags.0?string\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"button_id\",\"type\":\"int\"}],\"type\":\"KeyboardButton\"},{\"id\":\"-802258988\",\"predicate\":\"inputKeyboardButtonUrlAuth\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"request_write_access\",\"type\":\"flags.0?true\"},{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"fwd_text\",\"type\":\"flags.1?string\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"bot\",\"type\":\"InputUser\"}],\"type\":\"KeyboardButton\"},{\"id\":\"-1831650802\",\"predicate\":\"urlAuthResultRequest\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"request_write_access\",\"type\":\"flags.0?true\"},{\"name\":\"bot\",\"type\":\"User\"},{\"name\":\"domain\",\"type\":\"string\"}],\"type\":\"UrlAuthResult\"},{\"id\":\"-1886646706\",\"predicate\":\"urlAuthResultAccepted\",\"params\":[{\"name\":\"url\",\"type\":\"string\"}],\"type\":\"UrlAuthResult\"},{\"id\":\"-1445536993\",\"predicate\":\"urlAuthResultDefault\",\"params\":[],\"type\":\"UrlAuthResult\"},{\"id\":\"1283572154\",\"predicate\":\"inputPrivacyValueAllowChatParticipants\",\"params\":[{\"name\":\"chats\",\"type\":\"Vector\"}],\"type\":\"InputPrivacyRule\"},{\"id\":\"-668769361\",\"predicate\":\"inputPrivacyValueDisallowChatParticipants\",\"params\":[{\"name\":\"chats\",\"type\":\"Vector\"}],\"type\":\"InputPrivacyRule\"},{\"id\":\"415136107\",\"predicate\":\"privacyValueAllowChatParticipants\",\"params\":[{\"name\":\"chats\",\"type\":\"Vector\"}],\"type\":\"PrivacyRule\"},{\"id\":\"-1397881200\",\"predicate\":\"privacyValueDisallowChatParticipants\",\"params\":[{\"name\":\"chats\",\"type\":\"Vector\"}],\"type\":\"PrivacyRule\"},{\"id\":\"-1672577397\",\"predicate\":\"messageEntityUnderline\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"-1090087980\",\"predicate\":\"messageEntityStrike\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"34469328\",\"predicate\":\"messageEntityBlockquote\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"length\",\"type\":\"int\"}],\"type\":\"MessageEntity\"},{\"id\":\"1786671974\",\"predicate\":\"updatePeerSettings\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"settings\",\"type\":\"PeerSettings\"}],\"type\":\"Update\"},{\"id\":\"-1078612597\",\"predicate\":\"channelLocationEmpty\",\"params\":[],\"type\":\"ChannelLocation\"},{\"id\":\"547062491\",\"predicate\":\"channelLocation\",\"params\":[{\"name\":\"geo_point\",\"type\":\"GeoPoint\"},{\"name\":\"address\",\"type\":\"string\"}],\"type\":\"ChannelLocation\"},{\"id\":\"-901375139\",\"predicate\":\"peerLocated\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"expires\",\"type\":\"int\"},{\"name\":\"distance\",\"type\":\"int\"}],\"type\":\"PeerLocated\"},{\"id\":\"-1263546448\",\"predicate\":\"updatePeerLocated\",\"params\":[{\"name\":\"peers\",\"type\":\"Vector\"}],\"type\":\"Update\"},{\"id\":\"241923758\",\"predicate\":\"channelAdminLogEventActionChangeLocation\",\"params\":[{\"name\":\"prev_value\",\"type\":\"ChannelLocation\"},{\"name\":\"new_value\",\"type\":\"ChannelLocation\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"-606798099\",\"predicate\":\"inputReportReasonGeoIrrelevant\",\"params\":[],\"type\":\"ReportReason\"},{\"id\":\"1401984889\",\"predicate\":\"channelAdminLogEventActionToggleSlowMode\",\"params\":[{\"name\":\"prev_value\",\"type\":\"int\"},{\"name\":\"new_value\",\"type\":\"int\"}],\"type\":\"ChannelAdminLogEventAction\"},{\"id\":\"1148485274\",\"predicate\":\"auth.authorizationSignUpRequired\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"terms_of_service\",\"type\":\"flags.0?help.TermsOfService\"}],\"type\":\"auth.Authorization\"},{\"id\":\"-666824391\",\"predicate\":\"payments.paymentVerificationNeeded\",\"params\":[{\"name\":\"url\",\"type\":\"string\"}],\"type\":\"payments.PaymentResult\"},{\"id\":\"42402760\",\"predicate\":\"inputStickerSetAnimatedEmoji\",\"params\":[],\"type\":\"InputStickerSet\"},{\"id\":\"967122427\",\"predicate\":\"updateNewScheduledMessage\",\"params\":[{\"name\":\"message\",\"type\":\"Message\"}],\"type\":\"Update\"},{\"id\":\"-1870238482\",\"predicate\":\"updateDeleteScheduledMessages\",\"params\":[{\"name\":\"peer\",\"type\":\"Peer\"},{\"name\":\"messages\",\"type\":\"Vector\"}],\"type\":\"Update\"},{\"id\":\"-797791052\",\"predicate\":\"restrictionReason\",\"params\":[{\"name\":\"platform\",\"type\":\"string\"},{\"name\":\"reason\",\"type\":\"string\"},{\"name\":\"text\",\"type\":\"string\"}],\"type\":\"RestrictionReason\"},{\"id\":\"1012306921\",\"predicate\":\"inputTheme\",\"params\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"}],\"type\":\"InputTheme\"},{\"id\":\"-175567375\",\"predicate\":\"inputThemeSlug\",\"params\":[{\"name\":\"slug\",\"type\":\"string\"}],\"type\":\"InputTheme\"},{\"id\":\"1211967244\",\"predicate\":\"themeDocumentNotModified\",\"params\":[],\"type\":\"Theme\"},{\"id\":\"-136770336\",\"predicate\":\"theme\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"creator\",\"type\":\"flags.0?true\"},{\"name\":\"default\",\"type\":\"flags.1?true\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"access_hash\",\"type\":\"long\"},{\"name\":\"slug\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"document\",\"type\":\"flags.2?Document\"},{\"name\":\"installs_count\",\"type\":\"int\"}],\"type\":\"Theme\"},{\"id\":\"-199313886\",\"predicate\":\"account.themesNotModified\",\"params\":[],\"type\":\"account.Themes\"},{\"id\":\"2137482273\",\"predicate\":\"account.themes\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"},{\"name\":\"themes\",\"type\":\"Vector\"}],\"type\":\"account.Themes\"},{\"id\":\"-2112423005\",\"predicate\":\"updateTheme\",\"params\":[{\"name\":\"theme\",\"type\":\"Theme\"}],\"type\":\"Update\"},{\"id\":\"-786326563\",\"predicate\":\"inputPrivacyKeyAddedByPhone\",\"params\":[],\"type\":\"InputPrivacyKey\"},{\"id\":\"1124062251\",\"predicate\":\"privacyKeyAddedByPhone\",\"params\":[],\"type\":\"PrivacyKey\"}],\"methods\":[{\"id\":\"-878758099\",\"method\":\"invokeAfterMsg\",\"params\":[{\"name\":\"msg_id\",\"type\":\"long\"},{\"name\":\"query\",\"type\":\"!X\"}],\"type\":\"X\"},{\"id\":\"1036301552\",\"method\":\"invokeAfterMsgs\",\"params\":[{\"name\":\"msg_ids\",\"type\":\"Vector\"},{\"name\":\"query\",\"type\":\"!X\"}],\"type\":\"X\"},{\"id\":\"-1502141361\",\"method\":\"auth.sendCode\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"api_id\",\"type\":\"int\"},{\"name\":\"api_hash\",\"type\":\"string\"},{\"name\":\"settings\",\"type\":\"CodeSettings\"}],\"type\":\"auth.SentCode\"},{\"id\":\"-2131827673\",\"method\":\"auth.signUp\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"phone_code_hash\",\"type\":\"string\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"}],\"type\":\"auth.Authorization\"},{\"id\":\"-1126886015\",\"method\":\"auth.signIn\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"phone_code_hash\",\"type\":\"string\"},{\"name\":\"phone_code\",\"type\":\"string\"}],\"type\":\"auth.Authorization\"},{\"id\":\"1461180992\",\"method\":\"auth.logOut\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"-1616179942\",\"method\":\"auth.resetAuthorizations\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"-440401971\",\"method\":\"auth.exportAuthorization\",\"params\":[{\"name\":\"dc_id\",\"type\":\"int\"}],\"type\":\"auth.ExportedAuthorization\"},{\"id\":\"-470837741\",\"method\":\"auth.importAuthorization\",\"params\":[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"auth.Authorization\"},{\"id\":\"-841733627\",\"method\":\"auth.bindTempAuthKey\",\"params\":[{\"name\":\"perm_auth_key_id\",\"type\":\"long\"},{\"name\":\"nonce\",\"type\":\"long\"},{\"name\":\"expires_at\",\"type\":\"int\"},{\"name\":\"encrypted_message\",\"type\":\"bytes\"}],\"type\":\"Bool\"},{\"id\":\"1754754159\",\"method\":\"account.registerDevice\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"no_muted\",\"type\":\"flags.0?true\"},{\"name\":\"token_type\",\"type\":\"int\"},{\"name\":\"token\",\"type\":\"string\"},{\"name\":\"app_sandbox\",\"type\":\"Bool\"},{\"name\":\"secret\",\"type\":\"bytes\"},{\"name\":\"other_uids\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"813089983\",\"method\":\"account.unregisterDevice\",\"params\":[{\"name\":\"token_type\",\"type\":\"int\"},{\"name\":\"token\",\"type\":\"string\"},{\"name\":\"other_uids\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"-2067899501\",\"method\":\"account.updateNotifySettings\",\"params\":[{\"name\":\"peer\",\"type\":\"InputNotifyPeer\"},{\"name\":\"settings\",\"type\":\"InputPeerNotifySettings\"}],\"type\":\"Bool\"},{\"id\":\"313765169\",\"method\":\"account.getNotifySettings\",\"params\":[{\"name\":\"peer\",\"type\":\"InputNotifyPeer\"}],\"type\":\"PeerNotifySettings\"},{\"id\":\"-612493497\",\"method\":\"account.resetNotifySettings\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"2018596725\",\"method\":\"account.updateProfile\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"first_name\",\"type\":\"flags.0?string\"},{\"name\":\"last_name\",\"type\":\"flags.1?string\"},{\"name\":\"about\",\"type\":\"flags.2?string\"}],\"type\":\"User\"},{\"id\":\"1713919532\",\"method\":\"account.updateStatus\",\"params\":[{\"name\":\"offline\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"-1430579357\",\"method\":\"account.getWallPapers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"account.WallPapers\"},{\"id\":\"-1374118561\",\"method\":\"account.reportPeer\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"reason\",\"type\":\"ReportReason\"}],\"type\":\"Bool\"},{\"id\":\"227648840\",\"method\":\"users.getUsers\",\"params\":[{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"Vector\"},{\"id\":\"-902781519\",\"method\":\"users.getFullUser\",\"params\":[{\"name\":\"id\",\"type\":\"InputUser\"}],\"type\":\"UserFull\"},{\"id\":\"749357634\",\"method\":\"contacts.getContactIDs\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"Vector\"},{\"id\":\"-995929106\",\"method\":\"contacts.getStatuses\",\"params\":[],\"type\":\"Vector\"},{\"id\":\"-1071414113\",\"method\":\"contacts.getContacts\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"contacts.Contacts\"},{\"id\":\"746589157\",\"method\":\"contacts.importContacts\",\"params\":[{\"name\":\"contacts\",\"type\":\"Vector\"}],\"type\":\"contacts.ImportedContacts\"},{\"id\":\"157945344\",\"method\":\"contacts.deleteContacts\",\"params\":[{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"Updates\"},{\"id\":\"269745566\",\"method\":\"contacts.deleteByPhones\",\"params\":[{\"name\":\"phones\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"858475004\",\"method\":\"contacts.block\",\"params\":[{\"name\":\"id\",\"type\":\"InputUser\"}],\"type\":\"Bool\"},{\"id\":\"-448724803\",\"method\":\"contacts.unblock\",\"params\":[{\"name\":\"id\",\"type\":\"InputUser\"}],\"type\":\"Bool\"},{\"id\":\"-176409329\",\"method\":\"contacts.getBlocked\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"contacts.Blocked\"},{\"id\":\"1673946374\",\"method\":\"messages.getMessages\",\"params\":[{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"messages.Messages\"},{\"id\":\"-1594999949\",\"method\":\"messages.getDialogs\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"exclude_pinned\",\"type\":\"flags.0?true\"},{\"name\":\"folder_id\",\"type\":\"flags.1?int\"},{\"name\":\"offset_date\",\"type\":\"int\"},{\"name\":\"offset_id\",\"type\":\"int\"},{\"name\":\"offset_peer\",\"type\":\"InputPeer\"},{\"name\":\"limit\",\"type\":\"int\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.Dialogs\"},{\"id\":\"-591691168\",\"method\":\"messages.getHistory\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"offset_id\",\"type\":\"int\"},{\"name\":\"offset_date\",\"type\":\"int\"},{\"name\":\"add_offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"},{\"name\":\"max_id\",\"type\":\"int\"},{\"name\":\"min_id\",\"type\":\"int\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.Messages\"},{\"id\":\"-2045448344\",\"method\":\"messages.search\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"q\",\"type\":\"string\"},{\"name\":\"from_id\",\"type\":\"flags.0?InputUser\"},{\"name\":\"filter\",\"type\":\"MessagesFilter\"},{\"name\":\"min_date\",\"type\":\"int\"},{\"name\":\"max_date\",\"type\":\"int\"},{\"name\":\"offset_id\",\"type\":\"int\"},{\"name\":\"add_offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"},{\"name\":\"max_id\",\"type\":\"int\"},{\"name\":\"min_id\",\"type\":\"int\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.Messages\"},{\"id\":\"238054714\",\"method\":\"messages.readHistory\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"max_id\",\"type\":\"int\"}],\"type\":\"messages.AffectedMessages\"},{\"id\":\"469850889\",\"method\":\"messages.deleteHistory\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"just_clear\",\"type\":\"flags.0?true\"},{\"name\":\"revoke\",\"type\":\"flags.1?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"max_id\",\"type\":\"int\"}],\"type\":\"messages.AffectedHistory\"},{\"id\":\"-443640366\",\"method\":\"messages.deleteMessages\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"revoke\",\"type\":\"flags.0?true\"},{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"messages.AffectedMessages\"},{\"id\":\"94983360\",\"method\":\"messages.receivedMessages\",\"params\":[{\"name\":\"max_id\",\"type\":\"int\"}],\"type\":\"Vector\"},{\"id\":\"-1551737264\",\"method\":\"messages.setTyping\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"action\",\"type\":\"SendMessageAction\"}],\"type\":\"Bool\"},{\"id\":\"1376532592\",\"method\":\"messages.sendMessage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"no_webpage\",\"type\":\"flags.1?true\"},{\"name\":\"silent\",\"type\":\"flags.5?true\"},{\"name\":\"background\",\"type\":\"flags.6?true\"},{\"name\":\"clear_draft\",\"type\":\"flags.7?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.0?int\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"},{\"name\":\"entities\",\"type\":\"flags.3?Vector\"},{\"name\":\"schedule_date\",\"type\":\"flags.10?int\"}],\"type\":\"Updates\"},{\"id\":\"881978281\",\"method\":\"messages.sendMedia\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"silent\",\"type\":\"flags.5?true\"},{\"name\":\"background\",\"type\":\"flags.6?true\"},{\"name\":\"clear_draft\",\"type\":\"flags.7?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.0?int\"},{\"name\":\"media\",\"type\":\"InputMedia\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"},{\"name\":\"entities\",\"type\":\"flags.3?Vector\"},{\"name\":\"schedule_date\",\"type\":\"flags.10?int\"}],\"type\":\"Updates\"},{\"id\":\"-637606386\",\"method\":\"messages.forwardMessages\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"silent\",\"type\":\"flags.5?true\"},{\"name\":\"background\",\"type\":\"flags.6?true\"},{\"name\":\"with_my_score\",\"type\":\"flags.8?true\"},{\"name\":\"grouped\",\"type\":\"flags.9?true\"},{\"name\":\"from_peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"Vector\"},{\"name\":\"random_id\",\"type\":\"Vector\"},{\"name\":\"to_peer\",\"type\":\"InputPeer\"},{\"name\":\"schedule_date\",\"type\":\"flags.10?int\"}],\"type\":\"Updates\"},{\"id\":\"-820669733\",\"method\":\"messages.reportSpam\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"Bool\"},{\"id\":\"913498268\",\"method\":\"messages.getPeerSettings\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"PeerSettings\"},{\"id\":\"-1115507112\",\"method\":\"messages.report\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"Vector\"},{\"name\":\"reason\",\"type\":\"ReportReason\"}],\"type\":\"Bool\"},{\"id\":\"1013621127\",\"method\":\"messages.getChats\",\"params\":[{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"messages.Chats\"},{\"id\":\"998448230\",\"method\":\"messages.getFullChat\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"}],\"type\":\"messages.ChatFull\"},{\"id\":\"-599447467\",\"method\":\"messages.editChatTitle\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"title\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"-900957736\",\"method\":\"messages.editChatPhoto\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"photo\",\"type\":\"InputChatPhoto\"}],\"type\":\"Updates\"},{\"id\":\"-106911223\",\"method\":\"messages.addChatUser\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"fwd_limit\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"-530505962\",\"method\":\"messages.deleteChatUser\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"InputUser\"}],\"type\":\"Updates\"},{\"id\":\"164303470\",\"method\":\"messages.createChat\",\"params\":[{\"name\":\"users\",\"type\":\"Vector\"},{\"name\":\"title\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"-304838614\",\"method\":\"updates.getState\",\"params\":[],\"type\":\"updates.State\"},{\"id\":\"630429265\",\"method\":\"updates.getDifference\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"pts_total_limit\",\"type\":\"flags.0?int\"},{\"name\":\"date\",\"type\":\"int\"},{\"name\":\"qts\",\"type\":\"int\"}],\"type\":\"updates.Difference\"},{\"id\":\"-256159406\",\"method\":\"photos.updateProfilePhoto\",\"params\":[{\"name\":\"id\",\"type\":\"InputPhoto\"}],\"type\":\"UserProfilePhoto\"},{\"id\":\"1328726168\",\"method\":\"photos.uploadProfilePhoto\",\"params\":[{\"name\":\"file\",\"type\":\"InputFile\"}],\"type\":\"photos.Photo\"},{\"id\":\"-2016444625\",\"method\":\"photos.deletePhotos\",\"params\":[{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"Vector\"},{\"id\":\"-1291540959\",\"method\":\"upload.saveFilePart\",\"params\":[{\"name\":\"file_id\",\"type\":\"long\"},{\"name\":\"file_part\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"Bool\"},{\"id\":\"-1319462148\",\"method\":\"upload.getFile\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"precise\",\"type\":\"flags.0?true\"},{\"name\":\"location\",\"type\":\"InputFileLocation\"},{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"upload.File\"},{\"id\":\"-990308245\",\"method\":\"help.getConfig\",\"params\":[],\"type\":\"Config\"},{\"id\":\"531836966\",\"method\":\"help.getNearestDc\",\"params\":[],\"type\":\"NearestDc\"},{\"id\":\"1378703997\",\"method\":\"help.getAppUpdate\",\"params\":[{\"name\":\"source\",\"type\":\"string\"}],\"type\":\"help.AppUpdate\"},{\"id\":\"1295590211\",\"method\":\"help.getInviteText\",\"params\":[],\"type\":\"help.InviteText\"},{\"id\":\"-1848823128\",\"method\":\"photos.getUserPhotos\",\"params\":[{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"max_id\",\"type\":\"long\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"photos.Photos\"},{\"id\":\"651135312\",\"method\":\"messages.getDhConfig\",\"params\":[{\"name\":\"version\",\"type\":\"int\"},{\"name\":\"random_length\",\"type\":\"int\"}],\"type\":\"messages.DhConfig\"},{\"id\":\"-162681021\",\"method\":\"messages.requestEncryption\",\"params\":[{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"random_id\",\"type\":\"int\"},{\"name\":\"g_a\",\"type\":\"bytes\"}],\"type\":\"EncryptedChat\"},{\"id\":\"1035731989\",\"method\":\"messages.acceptEncryption\",\"params\":[{\"name\":\"peer\",\"type\":\"InputEncryptedChat\"},{\"name\":\"g_b\",\"type\":\"bytes\"},{\"name\":\"key_fingerprint\",\"type\":\"long\"}],\"type\":\"EncryptedChat\"},{\"id\":\"-304536635\",\"method\":\"messages.discardEncryption\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"}],\"type\":\"Bool\"},{\"id\":\"2031374829\",\"method\":\"messages.setEncryptedTyping\",\"params\":[{\"name\":\"peer\",\"type\":\"InputEncryptedChat\"},{\"name\":\"typing\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"2135648522\",\"method\":\"messages.readEncryptedHistory\",\"params\":[{\"name\":\"peer\",\"type\":\"InputEncryptedChat\"},{\"name\":\"max_date\",\"type\":\"int\"}],\"type\":\"Bool\"},{\"id\":\"-1451792525\",\"method\":\"messages.sendEncrypted\",\"params\":[{\"name\":\"peer\",\"type\":\"InputEncryptedChat\"},{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"type\":\"messages.SentEncryptedMessage\"},{\"id\":\"-1701831834\",\"method\":\"messages.sendEncryptedFile\",\"params\":[{\"name\":\"peer\",\"type\":\"InputEncryptedChat\"},{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"file\",\"type\":\"InputEncryptedFile\"}],\"type\":\"messages.SentEncryptedMessage\"},{\"id\":\"852769188\",\"method\":\"messages.sendEncryptedService\",\"params\":[{\"name\":\"peer\",\"type\":\"InputEncryptedChat\"},{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"type\":\"messages.SentEncryptedMessage\"},{\"id\":\"1436924774\",\"method\":\"messages.receivedQueue\",\"params\":[{\"name\":\"max_qts\",\"type\":\"int\"}],\"type\":\"Vector\"},{\"id\":\"1259113487\",\"method\":\"messages.reportEncryptedSpam\",\"params\":[{\"name\":\"peer\",\"type\":\"InputEncryptedChat\"}],\"type\":\"Bool\"},{\"id\":\"-562337987\",\"method\":\"upload.saveBigFilePart\",\"params\":[{\"name\":\"file_id\",\"type\":\"long\"},{\"name\":\"file_part\",\"type\":\"int\"},{\"name\":\"file_total_parts\",\"type\":\"int\"},{\"name\":\"bytes\",\"type\":\"bytes\"}],\"type\":\"Bool\"},{\"id\":\"2018609336\",\"method\":\"initConnection\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"api_id\",\"type\":\"int\"},{\"name\":\"device_model\",\"type\":\"string\"},{\"name\":\"system_version\",\"type\":\"string\"},{\"name\":\"app_version\",\"type\":\"string\"},{\"name\":\"system_lang_code\",\"type\":\"string\"},{\"name\":\"lang_pack\",\"type\":\"string\"},{\"name\":\"lang_code\",\"type\":\"string\"},{\"name\":\"proxy\",\"type\":\"flags.0?InputClientProxy\"},{\"name\":\"query\",\"type\":\"!X\"}],\"type\":\"X\"},{\"id\":\"-1663104819\",\"method\":\"help.getSupport\",\"params\":[],\"type\":\"help.Support\"},{\"id\":\"916930423\",\"method\":\"messages.readMessageContents\",\"params\":[{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"messages.AffectedMessages\"},{\"id\":\"655677548\",\"method\":\"account.checkUsername\",\"params\":[{\"name\":\"username\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"1040964988\",\"method\":\"account.updateUsername\",\"params\":[{\"name\":\"username\",\"type\":\"string\"}],\"type\":\"User\"},{\"id\":\"301470424\",\"method\":\"contacts.search\",\"params\":[{\"name\":\"q\",\"type\":\"string\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"contacts.Found\"},{\"id\":\"-623130288\",\"method\":\"account.getPrivacy\",\"params\":[{\"name\":\"key\",\"type\":\"InputPrivacyKey\"}],\"type\":\"account.PrivacyRules\"},{\"id\":\"-906486552\",\"method\":\"account.setPrivacy\",\"params\":[{\"name\":\"key\",\"type\":\"InputPrivacyKey\"},{\"name\":\"rules\",\"type\":\"Vector\"}],\"type\":\"account.PrivacyRules\"},{\"id\":\"1099779595\",\"method\":\"account.deleteAccount\",\"params\":[{\"name\":\"reason\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"150761757\",\"method\":\"account.getAccountTTL\",\"params\":[],\"type\":\"AccountDaysTTL\"},{\"id\":\"608323678\",\"method\":\"account.setAccountTTL\",\"params\":[{\"name\":\"ttl\",\"type\":\"AccountDaysTTL\"}],\"type\":\"Bool\"},{\"id\":\"-627372787\",\"method\":\"invokeWithLayer\",\"params\":[{\"name\":\"layer\",\"type\":\"int\"},{\"name\":\"query\",\"type\":\"!X\"}],\"type\":\"X\"},{\"id\":\"-113456221\",\"method\":\"contacts.resolveUsername\",\"params\":[{\"name\":\"username\",\"type\":\"string\"}],\"type\":\"contacts.ResolvedPeer\"},{\"id\":\"-2108208411\",\"method\":\"account.sendChangePhoneCode\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"settings\",\"type\":\"CodeSettings\"}],\"type\":\"auth.SentCode\"},{\"id\":\"1891839707\",\"method\":\"account.changePhone\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"phone_code_hash\",\"type\":\"string\"},{\"name\":\"phone_code\",\"type\":\"string\"}],\"type\":\"User\"},{\"id\":\"71126828\",\"method\":\"messages.getStickers\",\"params\":[{\"name\":\"emoticon\",\"type\":\"string\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.Stickers\"},{\"id\":\"479598769\",\"method\":\"messages.getAllStickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.AllStickers\"},{\"id\":\"954152242\",\"method\":\"account.updateDeviceLocked\",\"params\":[{\"name\":\"period\",\"type\":\"int\"}],\"type\":\"Bool\"},{\"id\":\"1738800940\",\"method\":\"auth.importBotAuthorization\",\"params\":[{\"name\":\"flags\",\"type\":\"int\"},{\"name\":\"api_id\",\"type\":\"int\"},{\"name\":\"api_hash\",\"type\":\"string\"},{\"name\":\"bot_auth_token\",\"type\":\"string\"}],\"type\":\"auth.Authorization\"},{\"id\":\"-1956073268\",\"method\":\"messages.getWebPagePreview\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.3?Vector\"}],\"type\":\"MessageMedia\"},{\"id\":\"-484392616\",\"method\":\"account.getAuthorizations\",\"params\":[],\"type\":\"account.Authorizations\"},{\"id\":\"-545786948\",\"method\":\"account.resetAuthorization\",\"params\":[{\"name\":\"hash\",\"type\":\"long\"}],\"type\":\"Bool\"},{\"id\":\"1418342645\",\"method\":\"account.getPassword\",\"params\":[],\"type\":\"account.Password\"},{\"id\":\"-1663767815\",\"method\":\"account.getPasswordSettings\",\"params\":[{\"name\":\"password\",\"type\":\"InputCheckPasswordSRP\"}],\"type\":\"account.PasswordSettings\"},{\"id\":\"-1516564433\",\"method\":\"account.updatePasswordSettings\",\"params\":[{\"name\":\"password\",\"type\":\"InputCheckPasswordSRP\"},{\"name\":\"new_settings\",\"type\":\"account.PasswordInputSettings\"}],\"type\":\"Bool\"},{\"id\":\"-779399914\",\"method\":\"auth.checkPassword\",\"params\":[{\"name\":\"password\",\"type\":\"InputCheckPasswordSRP\"}],\"type\":\"auth.Authorization\"},{\"id\":\"-661144474\",\"method\":\"auth.requestPasswordRecovery\",\"params\":[],\"type\":\"auth.PasswordRecovery\"},{\"id\":\"1319464594\",\"method\":\"auth.recoverPassword\",\"params\":[{\"name\":\"code\",\"type\":\"string\"}],\"type\":\"auth.Authorization\"},{\"id\":\"-1080796745\",\"method\":\"invokeWithoutUpdates\",\"params\":[{\"name\":\"query\",\"type\":\"!X\"}],\"type\":\"X\"},{\"id\":\"234312524\",\"method\":\"messages.exportChatInvite\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"ExportedChatInvite\"},{\"id\":\"1051570619\",\"method\":\"messages.checkChatInvite\",\"params\":[{\"name\":\"hash\",\"type\":\"string\"}],\"type\":\"ChatInvite\"},{\"id\":\"1817183516\",\"method\":\"messages.importChatInvite\",\"params\":[{\"name\":\"hash\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"639215886\",\"method\":\"messages.getStickerSet\",\"params\":[{\"name\":\"stickerset\",\"type\":\"InputStickerSet\"}],\"type\":\"messages.StickerSet\"},{\"id\":\"-946871200\",\"method\":\"messages.installStickerSet\",\"params\":[{\"name\":\"stickerset\",\"type\":\"InputStickerSet\"},{\"name\":\"archived\",\"type\":\"Bool\"}],\"type\":\"messages.StickerSetInstallResult\"},{\"id\":\"-110209570\",\"method\":\"messages.uninstallStickerSet\",\"params\":[{\"name\":\"stickerset\",\"type\":\"InputStickerSet\"}],\"type\":\"Bool\"},{\"id\":\"-421563528\",\"method\":\"messages.startBot\",\"params\":[{\"name\":\"bot\",\"type\":\"InputUser\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"start_param\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"-1877938321\",\"method\":\"help.getAppChangelog\",\"params\":[{\"name\":\"prev_app_version\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"-993483427\",\"method\":\"messages.getMessagesViews\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"Vector\"},{\"name\":\"increment\",\"type\":\"Bool\"}],\"type\":\"Vector\"},{\"id\":\"-871347913\",\"method\":\"channels.readHistory\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"max_id\",\"type\":\"int\"}],\"type\":\"Bool\"},{\"id\":\"-2067661490\",\"method\":\"channels.deleteMessages\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"messages.AffectedMessages\"},{\"id\":\"-787622117\",\"method\":\"channels.deleteUserHistory\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"user_id\",\"type\":\"InputUser\"}],\"type\":\"messages.AffectedHistory\"},{\"id\":\"-32999408\",\"method\":\"channels.reportSpam\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"-1383294429\",\"method\":\"channels.getMessages\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"messages.Messages\"},{\"id\":\"306054633\",\"method\":\"channels.getParticipants\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"filter\",\"type\":\"ChannelParticipantsFilter\"},{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"channels.ChannelParticipants\"},{\"id\":\"1416484774\",\"method\":\"channels.getParticipant\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"user_id\",\"type\":\"InputUser\"}],\"type\":\"channels.ChannelParticipant\"},{\"id\":\"176122811\",\"method\":\"channels.getChannels\",\"params\":[{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"messages.Chats\"},{\"id\":\"141781513\",\"method\":\"channels.getFullChannel\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"}],\"type\":\"messages.ChatFull\"},{\"id\":\"1029681423\",\"method\":\"channels.createChannel\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"broadcast\",\"type\":\"flags.0?true\"},{\"name\":\"megagroup\",\"type\":\"flags.1?true\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"about\",\"type\":\"string\"},{\"name\":\"geo_point\",\"type\":\"flags.2?InputGeoPoint\"},{\"name\":\"address\",\"type\":\"flags.2?string\"}],\"type\":\"Updates\"},{\"id\":\"-751007486\",\"method\":\"channels.editAdmin\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"admin_rights\",\"type\":\"ChatAdminRights\"},{\"name\":\"rank\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"1450044624\",\"method\":\"channels.editTitle\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"title\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"-248621111\",\"method\":\"channels.editPhoto\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"photo\",\"type\":\"InputChatPhoto\"}],\"type\":\"Updates\"},{\"id\":\"283557164\",\"method\":\"channels.checkUsername\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"username\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"890549214\",\"method\":\"channels.updateUsername\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"username\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"615851205\",\"method\":\"channels.joinChannel\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"}],\"type\":\"Updates\"},{\"id\":\"-130635115\",\"method\":\"channels.leaveChannel\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"}],\"type\":\"Updates\"},{\"id\":\"429865580\",\"method\":\"channels.inviteToChannel\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"users\",\"type\":\"Vector\"}],\"type\":\"Updates\"},{\"id\":\"-1072619549\",\"method\":\"channels.deleteChannel\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"}],\"type\":\"Updates\"},{\"id\":\"51854712\",\"method\":\"updates.getChannelDifference\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"force\",\"type\":\"flags.0?true\"},{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"filter\",\"type\":\"ChannelMessagesFilter\"},{\"name\":\"pts\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"updates.ChannelDifference\"},{\"id\":\"-1444503762\",\"method\":\"messages.editChatAdmin\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"is_admin\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"363051235\",\"method\":\"messages.migrateChat\",\"params\":[{\"name\":\"chat_id\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"-1083038300\",\"method\":\"messages.searchGlobal\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"folder_id\",\"type\":\"flags.0?int\"},{\"name\":\"q\",\"type\":\"string\"},{\"name\":\"offset_rate\",\"type\":\"int\"},{\"name\":\"offset_peer\",\"type\":\"InputPeer\"},{\"name\":\"offset_id\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"messages.Messages\"},{\"id\":\"2016638777\",\"method\":\"messages.reorderStickerSets\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"masks\",\"type\":\"flags.0?true\"},{\"name\":\"order\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"864953444\",\"method\":\"messages.getDocumentByHash\",\"params\":[{\"name\":\"sha256\",\"type\":\"bytes\"},{\"name\":\"size\",\"type\":\"int\"},{\"name\":\"mime_type\",\"type\":\"string\"}],\"type\":\"Document\"},{\"id\":\"-1080395925\",\"method\":\"messages.searchGifs\",\"params\":[{\"name\":\"q\",\"type\":\"string\"},{\"name\":\"offset\",\"type\":\"int\"}],\"type\":\"messages.FoundGifs\"},{\"id\":\"-2084618926\",\"method\":\"messages.getSavedGifs\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.SavedGifs\"},{\"id\":\"846868683\",\"method\":\"messages.saveGif\",\"params\":[{\"name\":\"id\",\"type\":\"InputDocument\"},{\"name\":\"unsave\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"1364105629\",\"method\":\"messages.getInlineBotResults\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"bot\",\"type\":\"InputUser\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"geo_point\",\"type\":\"flags.0?InputGeoPoint\"},{\"name\":\"query\",\"type\":\"string\"},{\"name\":\"offset\",\"type\":\"string\"}],\"type\":\"messages.BotResults\"},{\"id\":\"-346119674\",\"method\":\"messages.setInlineBotResults\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"gallery\",\"type\":\"flags.0?true\"},{\"name\":\"private\",\"type\":\"flags.1?true\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"results\",\"type\":\"Vector\"},{\"name\":\"cache_time\",\"type\":\"int\"},{\"name\":\"next_offset\",\"type\":\"flags.2?string\"},{\"name\":\"switch_pm\",\"type\":\"flags.3?InlineBotSwitchPM\"}],\"type\":\"Bool\"},{\"id\":\"570955184\",\"method\":\"messages.sendInlineBotResult\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"silent\",\"type\":\"flags.5?true\"},{\"name\":\"background\",\"type\":\"flags.6?true\"},{\"name\":\"clear_draft\",\"type\":\"flags.7?true\"},{\"name\":\"hide_via\",\"type\":\"flags.11?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.0?int\"},{\"name\":\"random_id\",\"type\":\"long\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"schedule_date\",\"type\":\"flags.10?int\"}],\"type\":\"Updates\"},{\"id\":\"-826838685\",\"method\":\"channels.exportMessageLink\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"grouped\",\"type\":\"Bool\"}],\"type\":\"ExportedMessageLink\"},{\"id\":\"527021574\",\"method\":\"channels.toggleSignatures\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"enabled\",\"type\":\"Bool\"}],\"type\":\"Updates\"},{\"id\":\"1056025023\",\"method\":\"auth.resendCode\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"phone_code_hash\",\"type\":\"string\"}],\"type\":\"auth.SentCode\"},{\"id\":\"520357240\",\"method\":\"auth.cancelCode\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"phone_code_hash\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"-39416522\",\"method\":\"messages.getMessageEditData\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"messages.MessageEditData\"},{\"id\":\"1224152952\",\"method\":\"messages.editMessage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"no_webpage\",\"type\":\"flags.1?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"message\",\"type\":\"flags.11?string\"},{\"name\":\"media\",\"type\":\"flags.14?InputMedia\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"},{\"name\":\"entities\",\"type\":\"flags.3?Vector\"},{\"name\":\"schedule_date\",\"type\":\"flags.15?int\"}],\"type\":\"Updates\"},{\"id\":\"-2091549254\",\"method\":\"messages.editInlineBotMessage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"no_webpage\",\"type\":\"flags.1?true\"},{\"name\":\"id\",\"type\":\"InputBotInlineMessageID\"},{\"name\":\"message\",\"type\":\"flags.11?string\"},{\"name\":\"media\",\"type\":\"flags.14?InputMedia\"},{\"name\":\"reply_markup\",\"type\":\"flags.2?ReplyMarkup\"},{\"name\":\"entities\",\"type\":\"flags.3?Vector\"}],\"type\":\"Bool\"},{\"id\":\"-2130010132\",\"method\":\"messages.getBotCallbackAnswer\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"game\",\"type\":\"flags.1?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"data\",\"type\":\"flags.0?bytes\"}],\"type\":\"messages.BotCallbackAnswer\"},{\"id\":\"-712043766\",\"method\":\"messages.setBotCallbackAnswer\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"alert\",\"type\":\"flags.1?true\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"message\",\"type\":\"flags.0?string\"},{\"name\":\"url\",\"type\":\"flags.2?string\"},{\"name\":\"cache_time\",\"type\":\"int\"}],\"type\":\"Bool\"},{\"id\":\"-728224331\",\"method\":\"contacts.getTopPeers\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"correspondents\",\"type\":\"flags.0?true\"},{\"name\":\"bots_pm\",\"type\":\"flags.1?true\"},{\"name\":\"bots_inline\",\"type\":\"flags.2?true\"},{\"name\":\"phone_calls\",\"type\":\"flags.3?true\"},{\"name\":\"forward_users\",\"type\":\"flags.4?true\"},{\"name\":\"forward_chats\",\"type\":\"flags.5?true\"},{\"name\":\"groups\",\"type\":\"flags.10?true\"},{\"name\":\"channels\",\"type\":\"flags.15?true\"},{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"contacts.TopPeers\"},{\"id\":\"451113900\",\"method\":\"contacts.resetTopPeerRating\",\"params\":[{\"name\":\"category\",\"type\":\"TopPeerCategory\"},{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"Bool\"},{\"id\":\"-462373635\",\"method\":\"messages.getPeerDialogs\",\"params\":[{\"name\":\"peers\",\"type\":\"Vector\"}],\"type\":\"messages.PeerDialogs\"},{\"id\":\"-1137057461\",\"method\":\"messages.saveDraft\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"no_webpage\",\"type\":\"flags.1?true\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.0?int\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"flags.3?Vector\"}],\"type\":\"Bool\"},{\"id\":\"1782549861\",\"method\":\"messages.getAllDrafts\",\"params\":[],\"type\":\"Updates\"},{\"id\":\"766298703\",\"method\":\"messages.getFeaturedStickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.FeaturedStickers\"},{\"id\":\"1527873830\",\"method\":\"messages.readFeaturedStickers\",\"params\":[{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"1587647177\",\"method\":\"messages.getRecentStickers\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"attached\",\"type\":\"flags.0?true\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.RecentStickers\"},{\"id\":\"958863608\",\"method\":\"messages.saveRecentSticker\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"attached\",\"type\":\"flags.0?true\"},{\"name\":\"id\",\"type\":\"InputDocument\"},{\"name\":\"unsave\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"-1986437075\",\"method\":\"messages.clearRecentStickers\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"attached\",\"type\":\"flags.0?true\"}],\"type\":\"Bool\"},{\"id\":\"1475442322\",\"method\":\"messages.getArchivedStickers\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"masks\",\"type\":\"flags.0?true\"},{\"name\":\"offset_id\",\"type\":\"long\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"messages.ArchivedStickers\"},{\"id\":\"457157256\",\"method\":\"account.sendConfirmPhoneCode\",\"params\":[{\"name\":\"hash\",\"type\":\"string\"},{\"name\":\"settings\",\"type\":\"CodeSettings\"}],\"type\":\"auth.SentCode\"},{\"id\":\"1596029123\",\"method\":\"account.confirmPhone\",\"params\":[{\"name\":\"phone_code_hash\",\"type\":\"string\"},{\"name\":\"phone_code\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"-122669393\",\"method\":\"channels.getAdminedPublicChannels\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"by_location\",\"type\":\"flags.0?true\"},{\"name\":\"check_limit\",\"type\":\"flags.1?true\"}],\"type\":\"messages.Chats\"},{\"id\":\"1706608543\",\"method\":\"messages.getMaskStickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.AllStickers\"},{\"id\":\"-866424884\",\"method\":\"messages.getAttachedStickers\",\"params\":[{\"name\":\"media\",\"type\":\"InputStickeredMedia\"}],\"type\":\"Vector\"},{\"id\":\"-1907842680\",\"method\":\"auth.dropTempAuthKeys\",\"params\":[{\"name\":\"except_auth_keys\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"-1896289088\",\"method\":\"messages.setGameScore\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"edit_message\",\"type\":\"flags.0?true\"},{\"name\":\"force\",\"type\":\"flags.1?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"score\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"363700068\",\"method\":\"messages.setInlineGameScore\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"edit_message\",\"type\":\"flags.0?true\"},{\"name\":\"force\",\"type\":\"flags.1?true\"},{\"name\":\"id\",\"type\":\"InputBotInlineMessageID\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"score\",\"type\":\"int\"}],\"type\":\"Bool\"},{\"id\":\"-400399203\",\"method\":\"messages.getGameHighScores\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"user_id\",\"type\":\"InputUser\"}],\"type\":\"messages.HighScores\"},{\"id\":\"258170395\",\"method\":\"messages.getInlineGameHighScores\",\"params\":[{\"name\":\"id\",\"type\":\"InputBotInlineMessageID\"},{\"name\":\"user_id\",\"type\":\"InputUser\"}],\"type\":\"messages.HighScores\"},{\"id\":\"218777796\",\"method\":\"messages.getCommonChats\",\"params\":[{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"max_id\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"messages.Chats\"},{\"id\":\"-341307408\",\"method\":\"messages.getAllChats\",\"params\":[{\"name\":\"except_ids\",\"type\":\"Vector\"}],\"type\":\"messages.Chats\"},{\"id\":\"-333262899\",\"method\":\"help.setBotUpdatesStatus\",\"params\":[{\"name\":\"pending_updates_count\",\"type\":\"int\"},{\"name\":\"message\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"852135825\",\"method\":\"messages.getWebPage\",\"params\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"WebPage\"},{\"id\":\"-1489903017\",\"method\":\"messages.toggleDialogPin\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"pinned\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"InputDialogPeer\"}],\"type\":\"Bool\"},{\"id\":\"991616823\",\"method\":\"messages.reorderPinnedDialogs\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"force\",\"type\":\"flags.0?true\"},{\"name\":\"folder_id\",\"type\":\"int\"},{\"name\":\"order\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"-692498958\",\"method\":\"messages.getPinnedDialogs\",\"params\":[{\"name\":\"folder_id\",\"type\":\"int\"}],\"type\":\"messages.PeerDialogs\"},{\"id\":\"-1440257555\",\"method\":\"bots.sendCustomRequest\",\"params\":[{\"name\":\"custom_method\",\"type\":\"string\"},{\"name\":\"params\",\"type\":\"DataJSON\"}],\"type\":\"DataJSON\"},{\"id\":\"-434028723\",\"method\":\"bots.answerWebhookJSONQuery\",\"params\":[{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"data\",\"type\":\"DataJSON\"}],\"type\":\"Bool\"},{\"id\":\"619086221\",\"method\":\"upload.getWebFile\",\"params\":[{\"name\":\"location\",\"type\":\"InputWebFileLocation\"},{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"upload.WebFile\"},{\"id\":\"-1712285883\",\"method\":\"payments.getPaymentForm\",\"params\":[{\"name\":\"msg_id\",\"type\":\"int\"}],\"type\":\"payments.PaymentForm\"},{\"id\":\"-1601001088\",\"method\":\"payments.getPaymentReceipt\",\"params\":[{\"name\":\"msg_id\",\"type\":\"int\"}],\"type\":\"payments.PaymentReceipt\"},{\"id\":\"1997180532\",\"method\":\"payments.validateRequestedInfo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"save\",\"type\":\"flags.0?true\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"info\",\"type\":\"PaymentRequestedInfo\"}],\"type\":\"payments.ValidatedRequestedInfo\"},{\"id\":\"730364339\",\"method\":\"payments.sendPaymentForm\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"requested_info_id\",\"type\":\"flags.0?string\"},{\"name\":\"shipping_option_id\",\"type\":\"flags.1?string\"},{\"name\":\"credentials\",\"type\":\"InputPaymentCredentials\"}],\"type\":\"payments.PaymentResult\"},{\"id\":\"1151208273\",\"method\":\"account.getTmpPassword\",\"params\":[{\"name\":\"password\",\"type\":\"InputCheckPasswordSRP\"},{\"name\":\"period\",\"type\":\"int\"}],\"type\":\"account.TmpPassword\"},{\"id\":\"578650699\",\"method\":\"payments.getSavedInfo\",\"params\":[],\"type\":\"payments.SavedInfo\"},{\"id\":\"-667062079\",\"method\":\"payments.clearSavedInfo\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"credentials\",\"type\":\"flags.0?true\"},{\"name\":\"info\",\"type\":\"flags.1?true\"}],\"type\":\"Bool\"},{\"id\":\"-436833542\",\"method\":\"messages.setBotShippingResults\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"error\",\"type\":\"flags.0?string\"},{\"name\":\"shipping_options\",\"type\":\"flags.1?Vector\"}],\"type\":\"Bool\"},{\"id\":\"163765653\",\"method\":\"messages.setBotPrecheckoutResults\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"success\",\"type\":\"flags.1?true\"},{\"name\":\"query_id\",\"type\":\"long\"},{\"name\":\"error\",\"type\":\"flags.0?string\"}],\"type\":\"Bool\"},{\"id\":\"-1680314774\",\"method\":\"stickers.createStickerSet\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"masks\",\"type\":\"flags.0?true\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"short_name\",\"type\":\"string\"},{\"name\":\"stickers\",\"type\":\"Vector\"}],\"type\":\"messages.StickerSet\"},{\"id\":\"-143257775\",\"method\":\"stickers.removeStickerFromSet\",\"params\":[{\"name\":\"sticker\",\"type\":\"InputDocument\"}],\"type\":\"messages.StickerSet\"},{\"id\":\"-4795190\",\"method\":\"stickers.changeStickerPosition\",\"params\":[{\"name\":\"sticker\",\"type\":\"InputDocument\"},{\"name\":\"position\",\"type\":\"int\"}],\"type\":\"messages.StickerSet\"},{\"id\":\"-2041315650\",\"method\":\"stickers.addStickerToSet\",\"params\":[{\"name\":\"stickerset\",\"type\":\"InputStickerSet\"},{\"name\":\"sticker\",\"type\":\"InputStickerSetItem\"}],\"type\":\"messages.StickerSet\"},{\"id\":\"1369162417\",\"method\":\"messages.uploadMedia\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"media\",\"type\":\"InputMedia\"}],\"type\":\"MessageMedia\"},{\"id\":\"1430593449\",\"method\":\"phone.getCallConfig\",\"params\":[],\"type\":\"DataJSON\"},{\"id\":\"1124046573\",\"method\":\"phone.requestCall\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"video\",\"type\":\"flags.0?true\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"random_id\",\"type\":\"int\"},{\"name\":\"g_a_hash\",\"type\":\"bytes\"},{\"name\":\"protocol\",\"type\":\"PhoneCallProtocol\"}],\"type\":\"phone.PhoneCall\"},{\"id\":\"1003664544\",\"method\":\"phone.acceptCall\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPhoneCall\"},{\"name\":\"g_b\",\"type\":\"bytes\"},{\"name\":\"protocol\",\"type\":\"PhoneCallProtocol\"}],\"type\":\"phone.PhoneCall\"},{\"id\":\"788404002\",\"method\":\"phone.confirmCall\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPhoneCall\"},{\"name\":\"g_a\",\"type\":\"bytes\"},{\"name\":\"key_fingerprint\",\"type\":\"long\"},{\"name\":\"protocol\",\"type\":\"PhoneCallProtocol\"}],\"type\":\"phone.PhoneCall\"},{\"id\":\"399855457\",\"method\":\"phone.receivedCall\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPhoneCall\"}],\"type\":\"Bool\"},{\"id\":\"-1295269440\",\"method\":\"phone.discardCall\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"video\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"InputPhoneCall\"},{\"name\":\"duration\",\"type\":\"int\"},{\"name\":\"reason\",\"type\":\"PhoneCallDiscardReason\"},{\"name\":\"connection_id\",\"type\":\"long\"}],\"type\":\"Updates\"},{\"id\":\"1508562471\",\"method\":\"phone.setCallRating\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"user_initiative\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"InputPhoneCall\"},{\"name\":\"rating\",\"type\":\"int\"},{\"name\":\"comment\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"662363518\",\"method\":\"phone.saveCallDebug\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPhoneCall\"},{\"name\":\"debug\",\"type\":\"DataJSON\"}],\"type\":\"Bool\"},{\"id\":\"536919235\",\"method\":\"upload.getCdnFile\",\"params\":[{\"name\":\"file_token\",\"type\":\"bytes\"},{\"name\":\"offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"upload.CdnFile\"},{\"id\":\"-1691921240\",\"method\":\"upload.reuploadCdnFile\",\"params\":[{\"name\":\"file_token\",\"type\":\"bytes\"},{\"name\":\"request_token\",\"type\":\"bytes\"}],\"type\":\"Vector\"},{\"id\":\"1375900482\",\"method\":\"help.getCdnConfig\",\"params\":[],\"type\":\"CdnConfig\"},{\"id\":\"-219008246\",\"method\":\"langpack.getLangPack\",\"params\":[{\"name\":\"lang_pack\",\"type\":\"string\"},{\"name\":\"lang_code\",\"type\":\"string\"}],\"type\":\"LangPackDifference\"},{\"id\":\"-269862909\",\"method\":\"langpack.getStrings\",\"params\":[{\"name\":\"lang_pack\",\"type\":\"string\"},{\"name\":\"lang_code\",\"type\":\"string\"},{\"name\":\"keys\",\"type\":\"Vector\"}],\"type\":\"Vector\"},{\"id\":\"-845657435\",\"method\":\"langpack.getDifference\",\"params\":[{\"name\":\"lang_pack\",\"type\":\"string\"},{\"name\":\"lang_code\",\"type\":\"string\"},{\"name\":\"from_version\",\"type\":\"int\"}],\"type\":\"LangPackDifference\"},{\"id\":\"1120311183\",\"method\":\"langpack.getLanguages\",\"params\":[{\"name\":\"lang_pack\",\"type\":\"string\"}],\"type\":\"Vector\"},{\"id\":\"1920559378\",\"method\":\"channels.editBanned\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"banned_rights\",\"type\":\"ChatBannedRights\"}],\"type\":\"Updates\"},{\"id\":\"870184064\",\"method\":\"channels.getAdminLog\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"q\",\"type\":\"string\"},{\"name\":\"events_filter\",\"type\":\"flags.0?ChannelAdminLogEventsFilter\"},{\"name\":\"admins\",\"type\":\"flags.1?Vector\"},{\"name\":\"max_id\",\"type\":\"long\"},{\"name\":\"min_id\",\"type\":\"long\"},{\"name\":\"limit\",\"type\":\"int\"}],\"type\":\"channels.AdminLogResults\"},{\"id\":\"1302676017\",\"method\":\"upload.getCdnFileHashes\",\"params\":[{\"name\":\"file_token\",\"type\":\"bytes\"},{\"name\":\"offset\",\"type\":\"int\"}],\"type\":\"Vector\"},{\"id\":\"-914493408\",\"method\":\"messages.sendScreenshotNotification\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"reply_to_msg_id\",\"type\":\"int\"},{\"name\":\"random_id\",\"type\":\"long\"}],\"type\":\"Updates\"},{\"id\":\"-359881479\",\"method\":\"channels.setStickers\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"stickerset\",\"type\":\"InputStickerSet\"}],\"type\":\"Bool\"},{\"id\":\"567151374\",\"method\":\"messages.getFavedStickers\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.FavedStickers\"},{\"id\":\"-1174420133\",\"method\":\"messages.faveSticker\",\"params\":[{\"name\":\"id\",\"type\":\"InputDocument\"},{\"name\":\"unfave\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"-357180360\",\"method\":\"channels.readMessageContents\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"-2020263951\",\"method\":\"contacts.resetSaved\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"1180140658\",\"method\":\"messages.getUnreadMentions\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"offset_id\",\"type\":\"int\"},{\"name\":\"add_offset\",\"type\":\"int\"},{\"name\":\"limit\",\"type\":\"int\"},{\"name\":\"max_id\",\"type\":\"int\"},{\"name\":\"min_id\",\"type\":\"int\"}],\"type\":\"messages.Messages\"},{\"id\":\"-1355375294\",\"method\":\"channels.deleteHistory\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"max_id\",\"type\":\"int\"}],\"type\":\"Bool\"},{\"id\":\"1036054804\",\"method\":\"help.getRecentMeUrls\",\"params\":[{\"name\":\"referer\",\"type\":\"string\"}],\"type\":\"help.RecentMeUrls\"},{\"id\":\"-356796084\",\"method\":\"channels.togglePreHistoryHidden\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"enabled\",\"type\":\"Bool\"}],\"type\":\"Updates\"},{\"id\":\"251759059\",\"method\":\"messages.readMentions\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"messages.AffectedHistory\"},{\"id\":\"-1144759543\",\"method\":\"messages.getRecentLocations\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"limit\",\"type\":\"int\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.Messages\"},{\"id\":\"-872345397\",\"method\":\"messages.sendMultiMedia\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"silent\",\"type\":\"flags.5?true\"},{\"name\":\"background\",\"type\":\"flags.6?true\"},{\"name\":\"clear_draft\",\"type\":\"flags.7?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"reply_to_msg_id\",\"type\":\"flags.0?int\"},{\"name\":\"multi_media\",\"type\":\"Vector\"},{\"name\":\"schedule_date\",\"type\":\"flags.10?int\"}],\"type\":\"Updates\"},{\"id\":\"1347929239\",\"method\":\"messages.uploadEncryptedFile\",\"params\":[{\"name\":\"peer\",\"type\":\"InputEncryptedChat\"},{\"name\":\"file\",\"type\":\"InputEncryptedFile\"}],\"type\":\"EncryptedFile\"},{\"id\":\"405695855\",\"method\":\"account.getWebAuthorizations\",\"params\":[],\"type\":\"account.WebAuthorizations\"},{\"id\":\"755087855\",\"method\":\"account.resetWebAuthorization\",\"params\":[{\"name\":\"hash\",\"type\":\"long\"}],\"type\":\"Bool\"},{\"id\":\"1747789204\",\"method\":\"account.resetWebAuthorizations\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"-1028140917\",\"method\":\"messages.searchStickerSets\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"exclude_featured\",\"type\":\"flags.0?true\"},{\"name\":\"q\",\"type\":\"string\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.FoundStickerSets\"},{\"id\":\"-956147407\",\"method\":\"upload.getFileHashes\",\"params\":[{\"name\":\"location\",\"type\":\"InputFileLocation\"},{\"name\":\"offset\",\"type\":\"int\"}],\"type\":\"Vector\"},{\"id\":\"1031231713\",\"method\":\"help.getProxyData\",\"params\":[],\"type\":\"help.ProxyData\"},{\"id\":\"749019089\",\"method\":\"help.getTermsOfServiceUpdate\",\"params\":[],\"type\":\"help.TermsOfServiceUpdate\"},{\"id\":\"-294455398\",\"method\":\"help.acceptTermsOfService\",\"params\":[{\"name\":\"id\",\"type\":\"DataJSON\"}],\"type\":\"Bool\"},{\"id\":\"-1299661699\",\"method\":\"account.getAllSecureValues\",\"params\":[],\"type\":\"Vector\"},{\"id\":\"1936088002\",\"method\":\"account.getSecureValue\",\"params\":[{\"name\":\"types\",\"type\":\"Vector\"}],\"type\":\"Vector\"},{\"id\":\"-1986010339\",\"method\":\"account.saveSecureValue\",\"params\":[{\"name\":\"value\",\"type\":\"InputSecureValue\"},{\"name\":\"secure_secret_id\",\"type\":\"long\"}],\"type\":\"SecureValue\"},{\"id\":\"-1199522741\",\"method\":\"account.deleteSecureValue\",\"params\":[{\"name\":\"types\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"-1865902923\",\"method\":\"users.setSecureValueErrors\",\"params\":[{\"name\":\"id\",\"type\":\"InputUser\"},{\"name\":\"errors\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"-1200903967\",\"method\":\"account.getAuthorizationForm\",\"params\":[{\"name\":\"bot_id\",\"type\":\"int\"},{\"name\":\"scope\",\"type\":\"string\"},{\"name\":\"public_key\",\"type\":\"string\"}],\"type\":\"account.AuthorizationForm\"},{\"id\":\"-419267436\",\"method\":\"account.acceptAuthorization\",\"params\":[{\"name\":\"bot_id\",\"type\":\"int\"},{\"name\":\"scope\",\"type\":\"string\"},{\"name\":\"public_key\",\"type\":\"string\"},{\"name\":\"value_hashes\",\"type\":\"Vector\"},{\"name\":\"credentials\",\"type\":\"SecureCredentialsEncrypted\"}],\"type\":\"Bool\"},{\"id\":\"-1516022023\",\"method\":\"account.sendVerifyPhoneCode\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"settings\",\"type\":\"CodeSettings\"}],\"type\":\"auth.SentCode\"},{\"id\":\"1305716726\",\"method\":\"account.verifyPhone\",\"params\":[{\"name\":\"phone_number\",\"type\":\"string\"},{\"name\":\"phone_code_hash\",\"type\":\"string\"},{\"name\":\"phone_code\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"1880182943\",\"method\":\"account.sendVerifyEmailCode\",\"params\":[{\"name\":\"email\",\"type\":\"string\"}],\"type\":\"account.SentEmailCode\"},{\"id\":\"-323339813\",\"method\":\"account.verifyEmail\",\"params\":[{\"name\":\"email\",\"type\":\"string\"},{\"name\":\"code\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"1072547679\",\"method\":\"help.getDeepLinkInfo\",\"params\":[{\"name\":\"path\",\"type\":\"string\"}],\"type\":\"help.DeepLinkInfo\"},{\"id\":\"-2098076769\",\"method\":\"contacts.getSaved\",\"params\":[],\"type\":\"Vector\"},{\"id\":\"-2092831552\",\"method\":\"channels.getLeftChannels\",\"params\":[{\"name\":\"offset\",\"type\":\"int\"}],\"type\":\"messages.Chats\"},{\"id\":\"-262453244\",\"method\":\"account.initTakeoutSession\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"contacts\",\"type\":\"flags.0?true\"},{\"name\":\"message_users\",\"type\":\"flags.1?true\"},{\"name\":\"message_chats\",\"type\":\"flags.2?true\"},{\"name\":\"message_megagroups\",\"type\":\"flags.3?true\"},{\"name\":\"message_channels\",\"type\":\"flags.4?true\"},{\"name\":\"files\",\"type\":\"flags.5?true\"},{\"name\":\"file_max_size\",\"type\":\"flags.5?int\"}],\"type\":\"account.Takeout\"},{\"id\":\"489050862\",\"method\":\"account.finishTakeoutSession\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"success\",\"type\":\"flags.0?true\"}],\"type\":\"Bool\"},{\"id\":\"486505992\",\"method\":\"messages.getSplitRanges\",\"params\":[],\"type\":\"Vector\"},{\"id\":\"911373810\",\"method\":\"invokeWithMessagesRange\",\"params\":[{\"name\":\"range\",\"type\":\"MessageRange\"},{\"name\":\"query\",\"type\":\"!X\"}],\"type\":\"X\"},{\"id\":\"-1398145746\",\"method\":\"invokeWithTakeout\",\"params\":[{\"name\":\"takeout_id\",\"type\":\"long\"},{\"name\":\"query\",\"type\":\"!X\"}],\"type\":\"X\"},{\"id\":\"-1031349873\",\"method\":\"messages.markDialogUnread\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"unread\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"InputDialogPeer\"}],\"type\":\"Bool\"},{\"id\":\"585256482\",\"method\":\"messages.getDialogUnreadMarks\",\"params\":[],\"type\":\"Vector\"},{\"id\":\"-2062238246\",\"method\":\"contacts.toggleTopPeers\",\"params\":[{\"name\":\"enabled\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"2119757468\",\"method\":\"messages.clearAllDrafts\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"-1735311088\",\"method\":\"help.getAppConfig\",\"params\":[],\"type\":\"JSONValue\"},{\"id\":\"1862465352\",\"method\":\"help.saveAppLog\",\"params\":[{\"name\":\"events\",\"type\":\"Vector\"}],\"type\":\"Bool\"},{\"id\":\"-966677240\",\"method\":\"help.getPassportConfig\",\"params\":[{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"help.PassportConfig\"},{\"id\":\"1784243458\",\"method\":\"langpack.getLanguage\",\"params\":[{\"name\":\"lang_pack\",\"type\":\"string\"},{\"name\":\"lang_code\",\"type\":\"string\"}],\"type\":\"LangPackLanguage\"},{\"id\":\"-760547348\",\"method\":\"messages.updatePinnedMessage\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"silent\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"-1881204448\",\"method\":\"account.confirmPasswordEmail\",\"params\":[{\"name\":\"code\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"2055154197\",\"method\":\"account.resendPasswordEmail\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"-1043606090\",\"method\":\"account.cancelPasswordEmail\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"-748624084\",\"method\":\"help.getSupportName\",\"params\":[],\"type\":\"help.SupportName\"},{\"id\":\"59377875\",\"method\":\"help.getUserInfo\",\"params\":[{\"name\":\"user_id\",\"type\":\"InputUser\"}],\"type\":\"help.UserInfo\"},{\"id\":\"1723407216\",\"method\":\"help.editUserInfo\",\"params\":[{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"entities\",\"type\":\"Vector\"}],\"type\":\"help.UserInfo\"},{\"id\":\"-1626880216\",\"method\":\"account.getContactSignUpNotification\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"-806076575\",\"method\":\"account.setContactSignUpNotification\",\"params\":[{\"name\":\"silent\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"1398240377\",\"method\":\"account.getNotifyExceptions\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"compare_sound\",\"type\":\"flags.1?true\"},{\"name\":\"peer\",\"type\":\"flags.0?InputNotifyPeer\"}],\"type\":\"Updates\"},{\"id\":\"283795844\",\"method\":\"messages.sendVote\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"options\",\"type\":\"Vector\"}],\"type\":\"Updates\"},{\"id\":\"1941660731\",\"method\":\"messages.getPollResults\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"1848369232\",\"method\":\"messages.getOnlines\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"ChatOnlines\"},{\"id\":\"-2127811866\",\"method\":\"messages.getStatsURL\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"dark\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"params\",\"type\":\"string\"}],\"type\":\"StatsURL\"},{\"id\":\"-554301545\",\"method\":\"messages.editChatAbout\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"about\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"-1517917375\",\"method\":\"messages.editChatDefaultBannedRights\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"banned_rights\",\"type\":\"ChatBannedRights\"}],\"type\":\"Updates\"},{\"id\":\"-57811990\",\"method\":\"account.getWallPaper\",\"params\":[{\"name\":\"wallpaper\",\"type\":\"InputWallPaper\"}],\"type\":\"WallPaper\"},{\"id\":\"-578472351\",\"method\":\"account.uploadWallPaper\",\"params\":[{\"name\":\"file\",\"type\":\"InputFile\"},{\"name\":\"mime_type\",\"type\":\"string\"},{\"name\":\"settings\",\"type\":\"WallPaperSettings\"}],\"type\":\"WallPaper\"},{\"id\":\"1817860919\",\"method\":\"account.saveWallPaper\",\"params\":[{\"name\":\"wallpaper\",\"type\":\"InputWallPaper\"},{\"name\":\"unsave\",\"type\":\"Bool\"},{\"name\":\"settings\",\"type\":\"WallPaperSettings\"}],\"type\":\"Bool\"},{\"id\":\"-18000023\",\"method\":\"account.installWallPaper\",\"params\":[{\"name\":\"wallpaper\",\"type\":\"InputWallPaper\"},{\"name\":\"settings\",\"type\":\"WallPaperSettings\"}],\"type\":\"Bool\"},{\"id\":\"-1153722364\",\"method\":\"account.resetWallPapers\",\"params\":[],\"type\":\"Bool\"},{\"id\":\"1457130303\",\"method\":\"account.getAutoDownloadSettings\",\"params\":[],\"type\":\"account.AutoDownloadSettings\"},{\"id\":\"1995661875\",\"method\":\"account.saveAutoDownloadSettings\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"low\",\"type\":\"flags.0?true\"},{\"name\":\"high\",\"type\":\"flags.1?true\"},{\"name\":\"settings\",\"type\":\"AutoDownloadSettings\"}],\"type\":\"Bool\"},{\"id\":\"899735650\",\"method\":\"messages.getEmojiKeywords\",\"params\":[{\"name\":\"lang_code\",\"type\":\"string\"}],\"type\":\"EmojiKeywordsDifference\"},{\"id\":\"352892591\",\"method\":\"messages.getEmojiKeywordsDifference\",\"params\":[{\"name\":\"lang_code\",\"type\":\"string\"},{\"name\":\"from_version\",\"type\":\"int\"}],\"type\":\"EmojiKeywordsDifference\"},{\"id\":\"1318675378\",\"method\":\"messages.getEmojiKeywordsLanguages\",\"params\":[{\"name\":\"lang_codes\",\"type\":\"Vector\"}],\"type\":\"Vector\"},{\"id\":\"-709817306\",\"method\":\"messages.getEmojiURL\",\"params\":[{\"name\":\"lang_code\",\"type\":\"string\"}],\"type\":\"EmojiURL\"},{\"id\":\"1749536939\",\"method\":\"folders.editPeerFolders\",\"params\":[{\"name\":\"folder_peers\",\"type\":\"Vector\"}],\"type\":\"Updates\"},{\"id\":\"472471681\",\"method\":\"folders.deleteFolder\",\"params\":[{\"name\":\"folder_id\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"1932455680\",\"method\":\"messages.getSearchCounters\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"filters\",\"type\":\"Vector\"}],\"type\":\"Vector\"},{\"id\":\"-170208392\",\"method\":\"channels.getGroupsForDiscussion\",\"params\":[],\"type\":\"messages.Chats\"},{\"id\":\"1079520178\",\"method\":\"channels.setDiscussionGroup\",\"params\":[{\"name\":\"broadcast\",\"type\":\"InputChannel\"},{\"name\":\"group\",\"type\":\"InputChannel\"}],\"type\":\"Bool\"},{\"id\":\"-482388461\",\"method\":\"messages.requestUrlAuth\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"button_id\",\"type\":\"int\"}],\"type\":\"UrlAuthResult\"},{\"id\":\"-148247912\",\"method\":\"messages.acceptUrlAuth\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"write_allowed\",\"type\":\"flags.0?true\"},{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"msg_id\",\"type\":\"int\"},{\"name\":\"button_id\",\"type\":\"int\"}],\"type\":\"UrlAuthResult\"},{\"id\":\"1336717624\",\"method\":\"messages.hidePeerSettingsBar\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"}],\"type\":\"Bool\"},{\"id\":\"-386636848\",\"method\":\"contacts.addContact\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"add_phone_privacy_exception\",\"type\":\"flags.0?true\"},{\"name\":\"id\",\"type\":\"InputUser\"},{\"name\":\"first_name\",\"type\":\"string\"},{\"name\":\"last_name\",\"type\":\"string\"},{\"name\":\"phone\",\"type\":\"string\"}],\"type\":\"Updates\"},{\"id\":\"-130964977\",\"method\":\"contacts.acceptContact\",\"params\":[{\"name\":\"id\",\"type\":\"InputUser\"}],\"type\":\"Updates\"},{\"id\":\"-1892102881\",\"method\":\"channels.editCreator\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"user_id\",\"type\":\"InputUser\"},{\"name\":\"password\",\"type\":\"InputCheckPasswordSRP\"}],\"type\":\"Updates\"},{\"id\":\"171270230\",\"method\":\"contacts.getLocated\",\"params\":[{\"name\":\"geo_point\",\"type\":\"InputGeoPoint\"}],\"type\":\"Updates\"},{\"id\":\"1491484525\",\"method\":\"channels.editLocation\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"geo_point\",\"type\":\"InputGeoPoint\"},{\"name\":\"address\",\"type\":\"string\"}],\"type\":\"Bool\"},{\"id\":\"-304832784\",\"method\":\"channels.toggleSlowMode\",\"params\":[{\"name\":\"channel\",\"type\":\"InputChannel\"},{\"name\":\"seconds\",\"type\":\"int\"}],\"type\":\"Updates\"},{\"id\":\"-490575781\",\"method\":\"messages.getScheduledHistory\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"messages.Messages\"},{\"id\":\"-1111817116\",\"method\":\"messages.getScheduledMessages\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"messages.Messages\"},{\"id\":\"-1120369398\",\"method\":\"messages.sendScheduledMessages\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"Updates\"},{\"id\":\"1504586518\",\"method\":\"messages.deleteScheduledMessages\",\"params\":[{\"name\":\"peer\",\"type\":\"InputPeer\"},{\"name\":\"id\",\"type\":\"Vector\"}],\"type\":\"Updates\"},{\"id\":\"473805619\",\"method\":\"account.uploadTheme\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"file\",\"type\":\"InputFile\"},{\"name\":\"thumb\",\"type\":\"flags.0?InputFile\"},{\"name\":\"file_name\",\"type\":\"string\"},{\"name\":\"mime_type\",\"type\":\"string\"}],\"type\":\"Document\"},{\"id\":\"729808255\",\"method\":\"account.createTheme\",\"params\":[{\"name\":\"slug\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"document\",\"type\":\"InputDocument\"}],\"type\":\"Theme\"},{\"id\":\"999203330\",\"method\":\"account.updateTheme\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"format\",\"type\":\"string\"},{\"name\":\"theme\",\"type\":\"InputTheme\"},{\"name\":\"slug\",\"type\":\"flags.0?string\"},{\"name\":\"title\",\"type\":\"flags.1?string\"},{\"name\":\"document\",\"type\":\"flags.2?InputDocument\"}],\"type\":\"Theme\"},{\"id\":\"-229175188\",\"method\":\"account.saveTheme\",\"params\":[{\"name\":\"theme\",\"type\":\"InputTheme\"},{\"name\":\"unsave\",\"type\":\"Bool\"}],\"type\":\"Bool\"},{\"id\":\"2061776695\",\"method\":\"account.installTheme\",\"params\":[{\"name\":\"flags\",\"type\":\"#\"},{\"name\":\"dark\",\"type\":\"flags.0?true\"},{\"name\":\"format\",\"type\":\"flags.1?string\"},{\"name\":\"theme\",\"type\":\"flags.1?InputTheme\"}],\"type\":\"Bool\"},{\"id\":\"-1919060949\",\"method\":\"account.getTheme\",\"params\":[{\"name\":\"format\",\"type\":\"string\"},{\"name\":\"theme\",\"type\":\"InputTheme\"},{\"name\":\"document_id\",\"type\":\"long\"}],\"type\":\"Theme\"},{\"id\":\"676939512\",\"method\":\"account.getThemes\",\"params\":[{\"name\":\"format\",\"type\":\"string\"},{\"name\":\"hash\",\"type\":\"int\"}],\"type\":\"account.Themes\"}]};\r\n\r\nConfig.Schema.API.layer = 105;\r\n\r\n// From https://github.com/stephenmathieson/node-tlds/blob/master/index.js\r\nConfig.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', 'nico', 'ninja', 'nl', 'no', 'np', 'nr', 'nra', 'nrw', 'ntt', 'nu', 'nyc', 'nz', 'okinawa', 'om', 'one', 'ong', 'onl', 'ooo', 'org', 'organic', 'osaka', 'otsuka', 'ovh', 'pa', 'paris', 'partners', 'parts', 'party', 'pe', 'pf', 'pg', 'ph', 'pharmacy', 'photo', 'photography', 'photos', 'physio', 'pics', 'pictures', 'pink', 'pizza', 'pk', 'pl', 'place', 'plumbing', 'pm', 'pn', 'pohl', 'poker', 'porn', 'post', 'pr', 'praxi', 'press', 'pro', 'prod', 'productions', 'prof', 'properties', 'property', 'ps', 'pt', 'pub', 'pw', 'py', 'qa', 'qpon', 'quebec', 're', 'realtor', 'recipes', 'red', 'rehab', 'reise', 'reisen', 'reit', 'ren', 'rentals', 'repair', 'report', 'republican', 'rest', 'restaurant', 'reviews', 'rich', 'rio', 'rip', 'ro', 'rocks', 'rodeo', 'rs', 'rsvp', 'ru', 'ruhr', 'rw', 'ryukyu', 'sa', 'saarland', 'sale', 'samsung', 'sarl', 'saxo', 'sb', 'sc', 'sca', 'scb', 'schmidt', 'schule', 'schwarz', 'science', 'scot', 'sd', 'se', 'services', 'sew', 'sexy', 'sg', 'sh', 'shiksha', 'shoes', 'shriram', 'si', 'singles', 'sj', 'sk', 'sky', 'sl', 'sm', 'sn', 'so', 'social', 'software', 'sohu', 'solar', 'solutions', 'soy', 'space', 'spiegel', 'sr', 'st', 'style', 'su', 'supplies', 'supply', 'support', 'surf', 'surgery', 'suzuki', 'sv', 'sx', 'sy', 'sydney', 'systems', 'sz', 'taipei', 'tatar', 'tattoo', 'tax', 'tc', 'td', 'technology', 'tel', 'temasek', 'tennis', 'tf', 'tg', 'th', 'tienda', 'tips', 'tires', 'tirol', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'today', 'tokyo', 'tools', 'top', 'toshiba', 'town', 'toys', 'tp', 'tr', 'trade', 'training', 'travel', 'trust', 'tt', 'tui', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'university', 'uno', 'uol', 'us', 'uy', 'uz', 'va', 'vacations', 'vc', 've', 'vegas', 'ventures', 'versicherung', 'vet', 'vg', 'vi', 'viajes', 'video', 'villas', 'vision', 'vlaanderen', 'vn', 'vodka', 'vote', 'voting', 'voto', 'voyage', 'vu', 'wales', 'wang', 'watch', 'webcam', 'website', 'wed', 'wedding', 'wf', 'whoswho', 'wien', 'wiki', 'williamhill', 'wme', 'work', 'works', 'world', 'ws', 'wtc', 'wtf', '佛山', '集团', '在线', '한국', 'ভারত', '八卦', 'موقع', '公益', '公司', '移动', '我爱你', 'москва', 'қаз', 'онлайн', 'сайт', 'срб', '淡马锡', 'орг', '삼성', 'சிங்கப்பூர்', '商标', '商店', '商城', 'дети', 'мкд', '中文网', '中信', '中国', '中國', '谷歌', 'భారత్', 'ලංකා', 'ભારત', 'भारत', '网店', 'संगठन', '网络', 'укр', '香港', '台湾', '台灣', '手机', 'мон', 'الجزائر', 'عمان', 'ایران', 'امارات', 'بازار', 'الاردن', 'بھارت', 'المغرب', 'السعودية', 'مليسيا', 'شبكة', 'გე', '机构', '组织机构', 'ไทย', 'سورية', 'рус', 'рф', 'تونس', 'みんな', 'グーグル', '世界', 'ਭਾਰਤ', '网址', '游戏', 'vermögensberater', 'vermögensberatung', '企业', 'مصر', 'قطر', '广东', 'இலங்கை', 'இந்தியா', '新加坡', 'فلسطين', '政务', 'xxx', 'xyz', 'yachts', 'yandex', 'ye', 'yoga', 'yokohama', 'youtube', 'yt', 'za', 'zip', 'zm', 'zone', 'zuerich', 'zw'];\r\n\r\n// From https://raw.githubusercontent.com/FGRibreau/latenize/master/latinize_map.js\r\nConfig.LatinizeMap = {'Á': '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','Ỉ': 'I','Ȋ': 'I','Ī': 'I','Į': 'I','Ɨ': 'I','Ĩ': 'I','Ḭ': 'I','Ꝺ': 'D','Ꝼ': 'F','Ᵹ': 'G','Ꞃ': 'R','Ꞅ': 'S','Ꞇ': 'T','Ꝭ': 'IS','Ĵ': 'J','Ɉ': 'J','Ḱ': 'K','Ǩ': 'K','Ķ': 'K','Ⱪ': 'K','Ꝃ': 'K','Ḳ': 'K','Ƙ': 'K','Ḵ': 'K','Ꝁ': 'K','Ꝅ': 'K','Ĺ': 'L','Ƚ': 'L','Ľ': 'L','Ļ': 'L','Ḽ': 'L','Ḷ': 'L','Ḹ': 'L','Ⱡ': 'L','Ꝉ': 'L','Ḻ': 'L','Ŀ': 'L','Ɫ': 'L','Lj': 'L','Ł': 'L','LJ': 'LJ','Ḿ': 'M','Ṁ': 'M','Ṃ': 'M','Ɱ': 'M','Ń': 'N','Ň': 'N','Ņ': 'N','Ṋ': 'N','Ṅ': 'N','Ṇ': 'N','Ǹ': 'N','Ɲ': 'N','Ṉ': 'N','Ƞ': 'N','Nj': 'N','Ñ': 'N','NJ': 'NJ','Ó': 'O','Ŏ': 'O','Ǒ': 'O','Ô': 'O','Ố': 'O','Ộ': 'O','Ồ': 'O','Ổ': 'O','Ỗ': 'O','Ö': 'O','Ȫ': 'O','Ȯ': 'O','Ȱ': 'O','Ọ': 'O','Ő': 'O','Ȍ': 'O','Ò': 'O','Ỏ': 'O','Ơ': 'O','Ớ': 'O','Ợ': 'O','Ờ': 'O','Ở': 'O','Ỡ': 'O','Ȏ': 'O','Ꝋ': 'O','Ꝍ': 'O','Ō': 'O','Ṓ': 'O','Ṑ': 'O','Ɵ': 'O','Ǫ': 'O','Ǭ': 'O','Ø': 'O','Ǿ': 'O','Õ': 'O','Ṍ': 'O','Ṏ': 'O','Ȭ': 'O','Ƣ': 'OI','Ꝏ': 'OO','Ɛ': 'E','Ɔ': 'O','Ȣ': 'OU','Ṕ': 'P','Ṗ': 'P','Ꝓ': 'P','Ƥ': 'P','Ꝕ': 'P','Ᵽ': 'P','Ꝑ': 'P','Ꝙ': 'Q','Ꝗ': 'Q','Ŕ': 'R','Ř': 'R','Ŗ': 'R','Ṙ': 'R','Ṛ': 'R','Ṝ': 'R','Ȑ': 'R','Ȓ': 'R','Ṟ': 'R','Ɍ': 'R','Ɽ': 'R','Ꜿ': 'C','Ǝ': 'E','Ś': 'S','Ṥ': 'S','Š': 'S','Ṧ': 'S','Ş': 'S','Ŝ': 'S','Ș': 'S','Ṡ': 'S','Ṣ': 'S','Ṩ': 'S','ẞ': 'SS','Ť': 'T','Ţ': 'T','Ṱ': 'T','Ț': 'T','Ⱦ': 'T','Ṫ': 'T','Ṭ': 'T','Ƭ': 'T','Ṯ': 'T','Ʈ': 'T','Ŧ': 'T','Ɐ': 'A','Ꞁ': 'L','Ɯ': 'M','Ʌ': 'V','Ꜩ': 'TZ','Ú': 'U','Ŭ': 'U','Ǔ': 'U','Û': 'U','Ṷ': 'U','Ü': 'U','Ǘ': 'U','Ǚ': 'U','Ǜ': 'U','Ǖ': 'U','Ṳ': 'U','Ụ': 'U','Ű': 'U','Ȕ': 'U','Ù': 'U','Ủ': 'U','Ư': 'U','Ứ': 'U','Ự': 'U','Ừ': 'U','Ử': 'U','Ữ': 'U','Ȗ': 'U','Ū': 'U','Ṻ': 'U','Ų': 'U','Ů': 'U','Ũ': 'U','Ṹ': 'U','Ṵ': 'U','Ꝟ': 'V','Ṿ': 'V','Ʋ': 'V','Ṽ': 'V','Ꝡ': 'VY','Ẃ': 'W','Ŵ': 'W','Ẅ': 'W','Ẇ': 'W','Ẉ': 'W','Ẁ': 'W','Ⱳ': 'W','Ẍ': 'X','Ẋ': 'X','Ý': 'Y','Ŷ': 'Y','Ÿ': 'Y','Ẏ': 'Y','Ỵ': 'Y','Ỳ': 'Y','Ƴ': 'Y','Ỷ': 'Y','Ỿ': 'Y','Ȳ': 'Y','Ɏ': 'Y','Ỹ': 'Y','Ź': 'Z','Ž': 'Z','Ẑ': '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','ẳ': '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','ƀ': 'b','ƃ': 'b','ɵ': 'o','ć': 'c','č': 'c','ç': 'c','ḉ': 'c','ĉ': 'c','ɕ': 'c','ċ': 'c','ƈ': 'c','ȼ': 'c','ď': 'd','ḑ': 'd','ḓ': 'd','ȡ': 'd','ḋ': 'd','ḍ': 'd','ɗ': 'd','ᶑ': 'd','ḏ': 'd','ᵭ': 'd','ᶁ': 'd','đ': 'd','ɖ': 'd','ƌ': 'd','ı': 'i','ȷ': 'j','ɟ': 'j','ʄ': 'j','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','ẽ': 'e','ḛ': 'e','ꝫ': 'et','ḟ': 'f','ƒ': 'f','ᵮ': 'f','ᶂ': 'f','ǵ': 'g','ğ': 'g','ǧ': 'g','ģ': 'g','ĝ': 'g','ġ': 'g','ɠ': 'g','ḡ': 'g','ᶃ': 'g','ǥ': 'g','ḫ': 'h','ȟ': 'h','ḩ': 'h','ĥ': 'h','ⱨ': 'h','ḧ': 'h','ḣ': 'h','ḥ': 'h','ɦ': 'h','ẖ': 'h','ħ': 'h','ƕ': 'hv','í': 'i','ĭ': 'i','ǐ': 'i','î': 'i','ï': 'i','ḯ': 'i','ị': 'i','ȉ': 'i','ì': 'i','ỉ': 'i','ȋ': 'i','ī': 'i','į': 'i','ᶖ': 'i','ɨ': 'i','ĩ': 'i','ḭ': 'i','ꝺ': 'd','ꝼ': 'f','ᵹ': 'g','ꞃ': 'r','ꞅ': 's','ꞇ': 't','ꝭ': 'is','ǰ': 'j','ĵ': 'j','ʝ': 'j','ɉ': 'j','ḱ': 'k','ǩ': 'k','ķ': 'k','ⱪ': 'k','ꝃ': 'k','ḳ': 'k','ƙ': 'k','ḵ': 'k','ᶄ': 'k','ꝁ': 'k','ꝅ': 'k','ĺ': 'l','ƚ': 'l','ɬ': 'l','ľ': 'l','ļ': 'l','ḽ': 'l','ȴ': 'l','ḷ': 'l','ḹ': 'l','ⱡ': 'l','ꝉ': 'l','ḻ': 'l','ŀ': 'l','ɫ': 'l','ᶅ': 'l','ɭ': 'l','ł': 'l','lj': 'lj','ſ': 's','ẜ': 's','ẛ': 's','ẝ': 's','ḿ': 'm','ṁ': 'm','ṃ': 'm','ɱ': 'm','ᵯ': 'm','ᶆ': 'm','ń': 'n','ň': 'n','ņ': 'n','ṋ': 'n','ȵ': 'n','ṅ': 'n','ṇ': 'n','ǹ': 'n','ɲ': 'n','ṉ': 'n','ƞ': 'n','ᵰ': 'n','ᶇ': 'n','ɳ': 'n','ñ': 'n','nj': 'nj','ó': 'o','ŏ': 'o','ǒ': 'o','ô': 'o','ố': 'o','ộ': 'o','ồ': 'o','ổ': 'o','ỗ': 'o','ö': 'o','ȫ': 'o','ȯ': 'o','ȱ': 'o','ọ': 'o','ő': 'o','ȍ': 'o','ò': 'o','ỏ': 'o','ơ': 'o','ớ': 'o','ợ': 'o','ờ': 'o','ở': 'o','ỡ': 'o','ȏ': 'o','ꝋ': 'o','ꝍ': 'o','ⱺ': 'o','ō': 'o','ṓ': 'o','ṑ': 'o','ǫ': 'o','ǭ': 'o','ø': 'o','ǿ': 'o','õ': 'o','ṍ': 'o','ṏ': 'o','ȭ': 'o','ƣ': 'oi','ꝏ': 'oo','ɛ': 'e','ᶓ': 'e','ɔ': 'o','ᶗ': 'o','ȣ': 'ou','ṕ': 'p','ṗ': 'p','ꝓ': 'p','ƥ': 'p','ᵱ': 'p','ᶈ': 'p','ꝕ': 'p','ᵽ': 'p','ꝑ': 'p','ꝙ': 'q','ʠ': 'q','ɋ': 'q','ꝗ': 'q','ŕ': 'r','ř': 'r','ŗ': 'r','ṙ': 'r','ṛ': 'r','ṝ': 'r','ȑ': 'r','ɾ': 'r','ᵳ': 'r','ȓ': 'r','ṟ': 'r','ɼ': 'r','ᵲ': 'r','ᶉ': 'r','ɍ': 'r','ɽ': 'r','ↄ': 'c','ꜿ': 'c','ɘ': 'e','ɿ': 'r','ś': 's','ṥ': 's','š': 's','ṧ': 's','ş': 's','ŝ': 's','ș': 's','ṡ': 's','ṣ': 's','ṩ': 's','ʂ': 's','ᵴ': 's','ᶊ': 's','ȿ': 's','ɡ': 'g','ß': 'ss','ᴑ': 'o','ᴓ': 'o','ᴝ': 'u','ť': 't','ţ': 't','ṱ': 't','ț': 't','ȶ': 't','ẗ': 't','ⱦ': 't','ṫ': 't','ṭ': 't','ƭ': 't','ṯ': 't','ᵵ': 't','ƫ': 't','ʈ': 't','ŧ': 't','ᵺ': 'th','ɐ': 'a','ᴂ': 'ae','ǝ': 'e','ᵷ': 'g','ɥ': 'h','ʮ': 'h','ʯ': 'h','ᴉ': 'i','ʞ': 'k','ꞁ': 'l','ɯ': 'm','ɰ': 'm','ᴔ': 'oe','ɹ': 'r','ɻ': 'r','ɺ': 'r','ⱹ': 'r','ʇ': 't','ʌ': 'v','ʍ': 'w','ʎ': 'y','ꜩ': 'tz','ú': 'u','ŭ': 'u','ǔ': 'u','û': 'u','ṷ': 'u','ü': 'u','ǘ': 'u','ǚ': 'u','ǜ': 'u','ǖ': 'u','ṳ': 'u','ụ': 'u','ű': 'u','ȕ': 'u','ù': 'u','ủ': 'u','ư': 'u','ứ': 'u','ự': 'u','ừ': 'u','ử': 'u','ữ': 'u','ȗ': 'u','ū': 'u','ṻ': 'u','ų': 'u','ᶙ': 'u','ů': 'u','ũ': 'u','ṹ': 'u','ṵ': 'u','ᵫ': 'ue','ꝸ': 'um','ⱴ': 'v','ꝟ': 'v','ṿ': 'v','ʋ': 'v','ᶌ': 'v','ⱱ': 'v','ṽ': 'v','ꝡ': 'vy','ẃ': 'w','ŵ': 'w','ẅ': 'w','ẇ': 'w','ẉ': 'w','ẁ': 'w','ⱳ': 'w','ẘ': 'w','ẍ': 'x','ẋ': 'x','ᶍ': 'x','ý': 'y','ŷ': 'y','ÿ': 'y','ẏ': 'y','ỵ': 'y','ỳ': 'y','ƴ': 'y','ỷ': 'y','ỿ': 'y','ȳ': 'y','ẙ': 'y','ɏ': 'y','ỹ': 'y','ź': 'z','ž': 'z','ẑ': 'z','ʑ': 'z','ⱬ': 'z','ż': 'z','ẓ': 'z','ȥ': 'z','ẕ': 'z','ᵶ': 'z','ᶎ': 'z','ʐ': 'z','ƶ': 'z','ɀ': 'z','ff': 'ff','ffi': 'ffi','ffl': 'ffl','fi': 'fi','fl': 'fl','ij': 'ij','œ': 'oe','st': 'st','ₐ': 'a','ₑ': 'e','ᵢ': 'i','ⱼ': 'j','ₒ': 'o','ᵣ': 'r','ᵤ': 'u','ᵥ': 'v','ₓ': 'x','Ё': 'YO', 'Й': 'I', 'Ц': 'TS', 'У': 'U', 'К': 'K', 'Е': 'E', 'Н': 'N', 'Г': 'G', 'Ш': 'SH', 'Щ': 'SCH', 'З': 'Z', 'Х': 'H', 'Ъ': '', 'ё': 'yo', 'й': 'i', 'ц': 'ts', 'у': 'u', 'к': 'k', 'е': 'e', 'н': 'n', 'г': 'g', 'ш': 'sh', 'щ': 'sch', 'з': 'z', 'х': 'h', 'ъ': '', 'Ф': 'F', 'Ы': 'I', 'В': 'V', 'А': 'A', 'П': 'P', 'Р': 'R', 'О': 'O', 'Л': 'L', 'Д': 'D', 'Ж': 'ZH', 'Э': 'E', 'ф': 'f', 'ы': 'i', 'в': 'v', 'а': 'a', 'п': 'p', 'р': 'r', 'о': 'o', 'л': 'l', 'д': 'd', 'ж': 'zh', 'э': 'e', 'Я': 'Ya', 'Ч': 'CH', 'С': 'S', 'М': 'M', 'И': 'I', 'Т': 'T', 'Ь': '', 'Б': 'B', 'Ю': 'YU', 'я': 'ya', 'ч': 'ch', 'с': 's', 'м': 'm', 'и': 'i', 'т': 't', 'ь': '', 'б': 'b', 'ю': 'yu'}\r\n\r\n// ConfigStorage\r\n//;(function (window) {\r\n var keyPrefix = '';\r\n var noPrefix = false;\r\n var cache = {};\r\n var useCs = !!(window.chrome && chrome.storage && chrome.storage.local);\r\n var useLs = !useCs && !!window.localStorage;\r\n\r\n function storageSetPrefix(newPrefix) {\r\n keyPrefix = newPrefix;\r\n }\r\n\r\n function storageSetNoPrefix() {\r\n noPrefix = true;\r\n }\r\n\r\n function storageGetPrefix() {\r\n if(noPrefix) {\r\n noPrefix = false;\r\n return '';\r\n }\r\n\r\n return keyPrefix;\r\n }\r\n\r\n function storageGetValue(keys, callback) {\r\n var single = false;\r\n if(!Array.isArray(keys)) {\r\n keys = Array.prototype.slice.call(arguments);\r\n callback = keys.pop();\r\n single = keys.length == 1;\r\n }\r\n var result = [],\r\n value;\r\n var allFound = true;\r\n var prefix = storageGetPrefix(),\r\n i, key;\r\n\r\n for(i = 0; i < keys.length; i++) {\r\n key = keys[i] = prefix + keys[i];\r\n if(key.substr(0, 3) != 'xt_' && cache[key] !== undefined) {\r\n result.push(cache[key]);\r\n } else if(useLs) {\r\n try {\r\n value = localStorage.getItem(key);\r\n } catch(e) {\r\n useLs = false;\r\n }\r\n\r\n try {\r\n value = (value === undefined || value === null) ? false : JSON.parse(value);\r\n } catch(e) {\r\n value = false;\r\n }\r\n result.push(cache[key] = value);\r\n } else if(!useCs) {\r\n result.push(cache[key] = false);\r\n } else {\r\n allFound = false;\r\n }\r\n }\r\n\r\n if(allFound) {\r\n return callback(single ? result[0] : result);\r\n }\r\n\r\n chrome.storage.local.get(keys, function(resultObj) {\r\n var value;\r\n result = [];\r\n for(i = 0; i < keys.length; i++) {\r\n key = keys[i];\r\n value = resultObj[key];\r\n value = value === undefined || value === null ? false : JSON.parse(value);\r\n result.push(cache[key] = value);\r\n }\r\n\r\n callback(single ? result[0] : result);\r\n });\r\n }\r\n\r\n function storageSetValue(obj, callback) {\r\n var keyValues = {};\r\n var prefix = storageGetPrefix(),\r\n key, value;\r\n\r\n //console.log('storageSetValue', obj, callback, arguments);\r\n\r\n for(key in obj) {\r\n if(obj.hasOwnProperty(key)) {\r\n value = obj[key];\r\n key = prefix + key;\r\n cache[key] = value;\r\n //value = value instanceof Uint8Array ? Array.from(value) : JSON.stringify(value);\r\n value = JSON.stringify(value);\r\n if(useLs) {\r\n try {\r\n //console.log('setItem', key, value);\r\n localStorage.setItem(key, value);\r\n } catch (e) {\r\n useLs = false;\r\n }\r\n } else {\r\n keyValues[key] = value;\r\n }\r\n }\r\n }\r\n\r\n if(useLs || !useCs) {\r\n if(callback) {\r\n callback();\r\n }\r\n\r\n return;\r\n }\r\n\r\n chrome.storage.local.set(keyValues, callback);\r\n }\r\n\r\n function storageRemoveValue(keys, callback) {\r\n if(!Array.isArray(keys)) {\r\n keys = Array.prototype.slice.call(arguments)\r\n if(typeof keys[keys.length - 1] === 'function') {\r\n callback = keys.pop();\r\n }\r\n }\r\n\r\n var prefix = storageGetPrefix(),\r\n i, key;\r\n\r\n for(i = 0; i < keys.length; i++) {\r\n key = keys[i] = prefix + keys[i];\r\n delete cache[key];\r\n if(useLs) {\r\n try {\r\n localStorage.removeItem(key);\r\n } catch(e) {\r\n useLs = false;\r\n }\r\n }\r\n }\r\n\r\n if(useCs) {\r\n chrome.storage.local.remove(keys, callback);\r\n } else if(callback) {\r\n callback();\r\n }\r\n }\r\n\r\n function storageClear(callback) {\r\n if(useLs) {\r\n try {\r\n localStorage.clear();\r\n } catch (e) {\r\n useLs = false;\r\n }\r\n }\r\n\r\n if(useCs) {\r\n chrome.storage.local.clear(function() {\r\n cache = {};\r\n callback();\r\n })\r\n } else {\r\n cache = {};\r\n callback();\r\n }\r\n }\r\n\r\n \r\n\r\n window.ConfigStorage = {\r\n prefix: storageSetPrefix,\r\n noPrefix: storageSetNoPrefix,\r\n get: storageGetValue,\r\n set: storageSetValue,\r\n remove: storageRemoveValue,\r\n clear: storageClear\r\n };\r\n\r\n //window.Config = Config;\r\n\r\n Config.Storage = window.ConfigStorage;\r\n\r\n module.exports = Config;\r\n//})(this)\r\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../utils\");\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nclass AppChatsManager {\r\n constructor() {\r\n this.chats = {};\r\n this.usernames = {};\r\n this.channelAccess = {};\r\n this.megagroups = {};\r\n this.cachedPhotoLocations = {};\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n // console.log('on apiUpdate', update)\r\n let update = e.detail;\r\n switch (update._) {\r\n case 'updateChannel':\r\n var channelID = update.channel_id;\r\n utils_1.$rootScope.$broadcast('channel_settings', { channelID: channelID });\r\n break;\r\n }\r\n });\r\n }\r\n saveApiChats(apiChats) {\r\n apiChats.forEach(chat => this.saveApiChat(chat));\r\n }\r\n saveApiChat(apiChat) {\r\n if (!utils_1.isObject(apiChat)) {\r\n return;\r\n }\r\n apiChat.rTitle = apiChat.title || 'chat_title_deleted';\r\n apiChat.rTitle = richtextprocessor_1.RichTextProcessor.wrapRichText(apiChat.title, { noLinks: true, noLinebreaks: true }) || 'chat_title_deleted';\r\n var result = this.chats[apiChat.id];\r\n var titleWords = utils_1.SearchIndexManager.cleanSearchText(apiChat.title || '').split(' ');\r\n var firstWord = titleWords.shift();\r\n var lastWord = titleWords.pop();\r\n apiChat.initials = firstWord.charAt(0) + (lastWord ? lastWord.charAt(0) : firstWord.charAt(1));\r\n apiChat.num = (Math.abs(apiChat.id >> 1) % 8) + 1;\r\n if (apiChat.pFlags === undefined) {\r\n apiChat.pFlags = {};\r\n }\r\n if (apiChat.pFlags.min) {\r\n if (result !== undefined) {\r\n return;\r\n }\r\n }\r\n if (apiChat._ == 'channel' &&\r\n apiChat.participants_count === undefined &&\r\n result !== undefined &&\r\n result.participants_count) {\r\n apiChat.participants_count = result.participants_count;\r\n }\r\n if (apiChat.username) {\r\n var searchUsername = utils_1.SearchIndexManager.cleanUsername(apiChat.username);\r\n this.usernames[searchUsername] = apiChat.id;\r\n }\r\n if (result === undefined) {\r\n result = this.chats[apiChat.id] = apiChat;\r\n }\r\n else {\r\n utils_1.safeReplaceObject(result, apiChat);\r\n utils_1.$rootScope.$broadcast('chat_update', apiChat.id);\r\n }\r\n if (this.cachedPhotoLocations[apiChat.id] !== undefined) {\r\n utils_1.safeReplaceObject(this.cachedPhotoLocations[apiChat.id], apiChat &&\r\n apiChat.photo ? apiChat.photo : { empty: true });\r\n }\r\n }\r\n getChat(id) {\r\n return this.chats[id] || { id: id, deleted: true, access_hash: this.channelAccess[id] };\r\n }\r\n hasRights(id, action) {\r\n if (!(id in this.chats)) {\r\n return false;\r\n }\r\n var chat = this.getChat(id);\r\n if (chat._ == 'chatForbidden' ||\r\n chat._ == 'channelForbidden' ||\r\n chat.pFlags.kicked ||\r\n chat.pFlags.left) {\r\n return false;\r\n }\r\n if (chat.pFlags.creator) {\r\n return true;\r\n }\r\n switch (action) {\r\n case 'send':\r\n if (chat._ == 'channel' &&\r\n !chat.pFlags.megagroup &&\r\n !chat.pFlags.editor) {\r\n return false;\r\n }\r\n break;\r\n case 'edit_title':\r\n case 'edit_photo':\r\n case 'invite':\r\n if (chat._ == 'channel') {\r\n if (chat.pFlags.megagroup) {\r\n if (!chat.pFlags.editor &&\r\n !(action == 'invite' && chat.pFlags.democracy)) {\r\n return false;\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else {\r\n if (chat.pFlags.admins_enabled &&\r\n !chat.pFlags.admin) {\r\n return false;\r\n }\r\n }\r\n break;\r\n }\r\n return true;\r\n }\r\n resolveUsername(username) {\r\n return this.usernames[username] || 0;\r\n }\r\n saveChannelAccess(id, accessHash) {\r\n this.channelAccess[id] = accessHash;\r\n }\r\n saveIsMegagroup(id) {\r\n this.megagroups[id] = true;\r\n }\r\n isChannel(id) {\r\n var chat = this.chats[id];\r\n if (chat && (chat._ == 'channel' || chat._ == 'channelForbidden') ||\r\n this.channelAccess[id]) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n isMegagroup(id) {\r\n if (this.megagroups[id]) {\r\n return true;\r\n }\r\n var chat = this.chats[id];\r\n if (chat && chat._ == 'channel' && chat.pFlags.megagroup) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n isBroadcast(id) {\r\n return this.isChannel(id) && !this.isMegagroup(id);\r\n }\r\n getChatInput(id) {\r\n return id || 0;\r\n }\r\n getChannelInput(id) {\r\n if (!id) {\r\n return { _: 'inputChannelEmpty' };\r\n }\r\n return {\r\n _: 'inputChannel',\r\n channel_id: id,\r\n access_hash: this.getChat(id).access_hash || this.channelAccess[id] || 0\r\n };\r\n }\r\n hasChat(id, allowMin) {\r\n var chat = this.chats[id];\r\n return utils_1.isObject(chat) && (allowMin || !chat.pFlags.min);\r\n }\r\n getChatPhoto(id) {\r\n var chat = this.getChat(id);\r\n if (this.cachedPhotoLocations[id] === undefined) {\r\n this.cachedPhotoLocations[id] = chat && chat.photo ? chat.photo : { empty: true };\r\n }\r\n return this.cachedPhotoLocations[id];\r\n }\r\n getChatString(id) {\r\n var chat = this.getChat(id);\r\n if (this.isChannel(id)) {\r\n return (this.isMegagroup(id) ? 's' : 'c') + id + '_' + chat.access_hash;\r\n }\r\n return 'g' + id;\r\n }\r\n wrapForFull(id, fullChat) {\r\n var chatFull = utils_1.copy(fullChat);\r\n var chat = this.getChat(id);\r\n if (!chatFull.participants_count) {\r\n chatFull.participants_count = chat.participants_count;\r\n }\r\n if (chatFull.participants &&\r\n chatFull.participants._ == 'chatParticipants') {\r\n chatFull.participants.participants = this.wrapParticipants(id, chatFull.participants.participants);\r\n }\r\n if (chatFull.about) {\r\n chatFull.rAbout = richtextprocessor_1.RichTextProcessor.wrapRichText(chatFull.about, { noLinebreaks: true });\r\n }\r\n chatFull.peerString = this.getChatString(id);\r\n chatFull.chat = chat;\r\n return chatFull;\r\n }\r\n wrapParticipants(id, participants) {\r\n var chat = this.getChat(id);\r\n var myID = appUsersManager_1.default.getSelf().id;\r\n if (this.isChannel(id)) {\r\n var isAdmin = chat.pFlags.creator || chat.pFlags.editor || chat.pFlags.moderator;\r\n participants.forEach((participant) => {\r\n participant.canLeave = myID == participant.user_id;\r\n participant.canKick = isAdmin && participant._ == 'channelParticipant';\r\n // just for order by last seen\r\n participant.user = appUsersManager_1.default.getUser(participant.user_id);\r\n });\r\n }\r\n else {\r\n var isAdmin = chat.pFlags.creator || chat.pFlags.admins_enabled && chat.pFlags.admin;\r\n participants.forEach((participant) => {\r\n participant.canLeave = myID == participant.user_id;\r\n participant.canKick = !participant.canLeave && (chat.pFlags.creator ||\r\n participant._ == 'chatParticipant' && (isAdmin || myID == participant.inviter_id));\r\n // just for order by last seen\r\n participant.user = appUsersManager_1.default.getUser(participant.user_id);\r\n });\r\n }\r\n return participants;\r\n }\r\n}\r\nexports.AppChatsManager = AppChatsManager;\r\nexports.default = new AppChatsManager();\r\n" }, { "id": 14, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/scrollable.ts", - "name": "./src/components/scrollable.ts", - "index": 51, - "index2": 49, - "size": 10167, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "name": "./src/lib/appManagers/appMessagesManager.ts", + "index": 46, + "index2": 51, + "size": 132480, "cacheable": true, "built": true, "optional": false, @@ -2920,34 +2814,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "issuerId": 40, - "issuerName": "./src/components/pageSignIn.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 + } + }, + { + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -2955,58 +2859,67 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", "module": "./src/lib/appManagers/appImManager.ts", "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../../components/scrollable", - "loc": "33:37-75" - }, - { - "moduleId": 25, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "module": "./src/components/pageIm.ts", - "moduleName": "./src/components/pageIm.ts", - "type": "cjs require", - "userRequest": "./scrollable", - "loc": "15:37-60" + "userRequest": "./appMessagesManager", + "loc": "10:45-76" }, { "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", + "module": "./src/lib/appManagers/appDialogsManager.ts", + "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", - "userRequest": "../../components/scrollable", - "loc": "17:37-75" + "userRequest": "./appMessagesManager", + "loc": "18:45-76" }, { - "moduleId": 40, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "module": "./src/components/pageSignIn.ts", - "moduleName": "./src/components/pageSignIn.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "./scrollable", - "loc": "14:37-60" + "userRequest": "./appMessagesManager", + "loc": "8:45-76" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", "module": "./src/lib/appManagers/appSidebarRight.ts", "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "../../components/scrollable", - "loc": "7:37-75" + "userRequest": "./appMessagesManager", + "loc": "16:45-76" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "module": "./src/components/emoticonsDropdown.ts", - "moduleName": "./src/components/emoticonsDropdown.ts", + "moduleId": 41, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "module": "./src/components/appSearch.ts", + "moduleName": "./src/components/appSearch.ts", "type": "cjs require", - "userRequest": "./scrollable", - "loc": "17:37-60" + "userRequest": "../lib/appManagers/appMessagesManager", + "loc": "11:45-93" + }, + { + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", + "type": "cjs require", + "userRequest": "../lib/appManagers/appMessagesManager", + "loc": "21:45-93" + }, + { + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", + "type": "cjs require", + "userRequest": "./appManagers/appMessagesManager", + "loc": "13:45-88" } ], "usedExports": true, @@ -3014,16 +2927,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 2, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../lib/utils\");\nclass Scrollable {\n /* public topObserver: IntersectionObserver;\n public isTopIntersecting: boolean;\n public bottomObserver: IntersectionObserver;\n public isBottomIntersecting: boolean; */\n constructor(el, x = false, y = true) {\n this.el = el;\n this.scrollSize = -1;\n this.size = 0;\n this.thumbSize = 0;\n this.hiddenElements = {\n up: [],\n down: []\n };\n this.paddings = { up: 0, down: 0 };\n this.onAddedBottom = null;\n this.container = document.createElement('div');\n this.container.classList.add('scrollable');\n /* this.bottomObserver = new IntersectionObserver(entries => {\n let entry = entries[0];\n \n this.isBottomIntersecting = entry.intersectionRatio > 0;\n \n // @ts-ignore\n //console.log('bottom instersection:', entry, entry.isVisible, entry.intersectionRatio, entry.isIntersecting);\n console.log('bottom intersection:', this.isBottomIntersecting);\n });\n \n this.topObserver = new IntersectionObserver(entries => {\n let entry = entries[0];\n \n this.isTopIntersecting = entry.intersectionRatio > 0;\n \n // @ts-ignore\n //console.log('top instersection:', entry, entry.isVisible, entry.intersectionRatio, entry.isIntersecting);\n console.log('top intersection:', this.isTopIntersecting);\n }); */\n if (x) {\n this.container.classList.add('scrollable-x');\n this.type = 'width';\n this.side = 'left';\n this.scrollType = 'scrollWidth';\n this.scrollSide = 'scrollLeft';\n this.clientAxis = 'clientX';\n let scrollHorizontally = (e) => {\n e = window.event || e;\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\n this.container.scrollLeft -= (delta * 20);\n e.preventDefault();\n };\n if (this.container.addEventListener) {\n // IE9, Chrome, Safari, Opera\n this.container.addEventListener(\"mousewheel\", scrollHorizontally, false);\n // Firefox\n this.container.addEventListener(\"DOMMouseScroll\", scrollHorizontally, false);\n }\n else {\n // IE 6/7/8\n // @ts-ignore\n this.container.attachEvent(\"onmousewheel\", scrollHorizontally);\n }\n }\n else if (y) {\n this.container.classList.add('scrollable-y');\n this.type = 'height';\n this.side = 'top';\n this.scrollType = 'scrollHeight';\n this.scrollSide = 'scrollTop';\n this.clientAxis = 'clientY';\n }\n else {\n throw new Error('no side for scroll');\n }\n this.thumb = document.createElement('div');\n this.thumb.className = 'scrollbar-thumb';\n // @ts-ignore\n this.thumb.style[this.type] = '30px';\n let onMouseMove = (e) => {\n let rect = this.thumb.getBoundingClientRect();\n let diff;\n // @ts-ignore\n diff = e[this.clientAxis] - rect[this.side];\n // @ts-ignore\n this.container[this.scrollSide] += diff * 0.5;\n console.log('onMouseMove', e, diff);\n utils_1.cancelEvent(e);\n };\n this.thumb.addEventListener('mousedown', () => {\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('mouseup', () => {\n window.removeEventListener('mousemove', onMouseMove);\n }, { once: true });\n });\n this.container.addEventListener('mouseover', this.resize.bind(this));\n window.addEventListener('resize', this.resize.bind(this));\n this.paddingTopDiv = document.createElement('div');\n this.paddingTopDiv.classList.add('scroll-padding');\n this.paddingBottomDiv = document.createElement('div');\n this.paddingBottomDiv.classList.add('scroll-padding');\n this.container.addEventListener('scroll', this.onScroll.bind(this));\n //this.container.append(this.paddingTopDiv);\n Array.from(el.children).forEach(c => this.container.append(c));\n //this.container.append(this.paddingBottomDiv);\n el.append(this.container); //container.append(el);\n this.container.parentElement.append(this.thumb);\n this.resize();\n }\n resize() {\n // @ts-ignore\n this.scrollSize = this.container[this.scrollType];\n let rect = this.container.getBoundingClientRect();\n // @ts-ignore\n this.size = rect[this.type];\n if (!this.size || this.size == this.scrollSize) {\n this.thumbSize = 0;\n // @ts-ignore\n this.thumb.style[this.type] = this.thumbSize + 'px';\n return;\n }\n //if(!height) return;\n let divider = this.scrollSize / this.size / 0.5;\n this.thumbSize = this.size / divider;\n if (this.thumbSize < 20)\n this.thumbSize = 20;\n // @ts-ignore\n this.thumb.style[this.type] = this.thumbSize + 'px';\n // @ts-ignore\n //console.log('onresize', thumb.style[type], thumbHeight, height);\n }\n setVirtualContainer(el) {\n this.splitUp = el;\n this.hiddenElements.up.length = this.hiddenElements.down.length = 0;\n this.paddings.up = this.paddings.down = 0;\n if (this.paddingTopDiv.parentElement) {\n this.paddingTopDiv.style.height = '';\n this.paddingBottomDiv.style.height = '';\n }\n //this.topObserver.observe(this.paddingTopDiv);\n //this.bottomObserver.observe(this.paddingBottomDiv);\n if (el) {\n el.parentElement.insertBefore(this.paddingTopDiv, el);\n el.parentNode.insertBefore(this.paddingBottomDiv, el.nextSibling);\n }\n }\n onScroll() {\n // @ts-ignore\n //let st = container[scrollSide];\n if (this.container[this.scrollType] != this.scrollSize || this.thumbSize == 0) {\n this.resize();\n }\n // @ts-ignore\n let value = this.container[this.scrollSide] / (this.scrollSize - this.size) * 100;\n let maxValue = 100 - (this.thumbSize / this.size * 100);\n //console.log('onscroll', container.scrollHeight, thumbHeight, height, value, maxValue);\n // @ts-ignore\n this.thumb.style[this.side] = (value >= maxValue ? maxValue : value) + '%';\n if (!this.splitUp) {\n return;\n }\n let splitUp = this.splitUp;\n let children = Array.from(splitUp.children);\n let firstVisible = -1, lastVisible = -1;\n let length = children.length;\n for (let i = 0; i < length; ++i) {\n let child = children[i];\n if (utils_1.isElementInViewport(child) || utils_1.isScrolledIntoView(child)) {\n if (firstVisible < 0)\n firstVisible = i;\n lastVisible = i;\n }\n }\n //console.log('onscroll', firstVisible, lastVisible);\n if (firstVisible > 0) {\n let sliced = children.slice(0, firstVisible);\n for (let child of sliced) {\n this.paddings.up += child.scrollHeight;\n this.hiddenElements.up.push(child);\n child.parentElement.removeChild(child);\n }\n //console.log('onscroll sliced up', sliced.length);\n //sliced.forEach(child => child.style.display = 'none');\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\n //console.log('onscroll need to add padding: ', paddings.up);\n }\n else if (this.hiddenElements.up.length) {\n //console.log('onscroll up', isElementInViewport(this.paddingTopDiv), isScrolledIntoView(this.paddingTopDiv), this.paddings.up);\n while ((utils_1.isElementInViewport(this.paddingTopDiv) || utils_1.isScrolledIntoView(this.paddingTopDiv)) && this.paddings.up) {\n let child = this.hiddenElements.up.pop();\n splitUp.prepend(child);\n this.paddings.up -= child.scrollHeight;\n this.paddingTopDiv.style.height = this.paddings.up + 'px';\n }\n }\n if (lastVisible < (length - 1)) {\n let sliced = children.slice(lastVisible + 1).reverse();\n for (let child of sliced) {\n this.paddings.down += child.scrollHeight;\n this.hiddenElements.down.unshift(child);\n child.parentElement.removeChild(child);\n }\n //console.log('onscroll sliced down', splitUp, sliced.length, this.paddings.down + 'px');\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\n //console.log('onscroll need to add padding: ', paddings.up);\n }\n else if (this.hiddenElements.down.length) {\n //console.log('onscroll down', isElementInViewport(this.paddingBottomDiv), \n //isScrolledIntoView(this.paddingBottomDiv), this.paddings.down, this.hiddenElements);\n while ((utils_1.isElementInViewport(this.paddingBottomDiv) || utils_1.isScrolledIntoView(this.paddingBottomDiv)) && this.paddings.down) {\n let child = this.hiddenElements.down.shift();\n if (!child) {\n this.paddings.down = 0;\n this.paddingBottomDiv.style.height = '0px';\n break;\n }\n splitUp.append(child);\n this.paddings.down -= child.scrollHeight;\n this.paddingBottomDiv.style.height = this.paddings.down + 'px';\n }\n if (this.onAddedBottom)\n this.onAddedBottom();\n }\n else {\n this.paddingBottomDiv.style.height = '0px';\n }\n //console.log('onscroll', container, firstVisible, lastVisible, hiddenElements);\n //lastScrollPos = st;\n }\n}\nexports.default = Scrollable;\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../utils\");\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst mtproto_1 = require(\"../mtproto/mtproto\");\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst serverTimeManager_1 = __importDefault(require(\"../mtproto/serverTimeManager\"));\r\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\r\nconst preloader_1 = __importDefault(require(\"../../components/preloader\"));\r\nconst serverTimeManager_2 = __importDefault(require(\"../mtproto/serverTimeManager\"));\r\n//import apiManager from '../mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst appWebPagesManager_1 = __importDefault(require(\"./appWebPagesManager\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nclass AppMessagesManager {\r\n constructor() {\r\n this.messagesStorage = {};\r\n this.messagesForDialogs = {};\r\n this.historiesStorage = {};\r\n this.dialogsStorage = { count: null, dialogs: [] };\r\n this.pendingByRandomID = {};\r\n this.pendingByMessageID = {};\r\n this.pendingAfterMsgs = {};\r\n this.pendingTopMsgs = {};\r\n this.sendFilePromise = Promise.resolve();\r\n this.tempID = -1;\r\n this.tempFinalizeCallbacks = {};\r\n this.dialogsIndex = utils_1.SearchIndexManager.createIndex();\r\n this.cachedResults = { query: false };\r\n this.lastSearchFilter = {};\r\n this.lastSearchResults = [];\r\n this.needSingleMessages = [];\r\n this.fetchSingleMessagesTimeout = 0;\r\n this.fetchSingleMessagesPromise = null;\r\n this.incrementedMessageViews = {};\r\n this.needIncrementMessageViews = [];\r\n this.incrementMessageViewsTimeout = false;\r\n this.maxSeenID = 0;\r\n this.allDialogsLoaded = {};\r\n this.dialogsOffsetDate = {};\r\n this.pinnedIndex = 0;\r\n this.dialogsNum = 0;\r\n this.migratedFromTo = {};\r\n this.migratedToFrom = {};\r\n this.newMessagesHandlePromise = 0;\r\n this.newMessagesToHandle = {};\r\n this.newDialogsHandlePromise = 0;\r\n this.newDialogsToHandle = {};\r\n //public notificationsHandlePromise = 0;\r\n //public notificationsToHandle: any = {};\r\n this.newUpdatesAfterReloadToHandle = {};\r\n this.fwdMessagesPluralize = utils_1._('conversation_forwarded_X_messages');\r\n this.gameScorePluralize = utils_1._('conversation_scored_X');\r\n storage_1.default.get('max_seen_msg').then((maxID) => {\r\n if (maxID && !appMessagesIDsManager_1.default.getMessageIDInfo(maxID)[1]) {\r\n this.maxSeenID = maxID;\r\n }\r\n });\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n let update = e.detail;\r\n // if(update._ != 'updateUserStatus') {\r\n // console.log('on apiUpdate', update)\r\n // }\r\n this.handleUpdate(update);\r\n });\r\n utils_1.$rootScope.$on('webpage_updated', (e) => {\r\n let eventData = e.detail;\r\n eventData.msgs.forEach((msgID) => {\r\n let message = this.getMessage(msgID);\r\n message.webpage = appWebPagesManager_1.default.getWebPage(eventData.id); // warning\r\n utils_1.$rootScope.$broadcast('message_edit', {\r\n peerID: this.getMessagePeer(message),\r\n id: message.id,\r\n mid: msgID,\r\n justMedia: true\r\n });\r\n });\r\n });\r\n utils_1.$rootScope.$on('draft_updated', (e) => {\r\n let eventData = e.detail;\r\n ;\r\n var peerID = eventData.peerID;\r\n var draft = eventData.draft;\r\n var dialog = this.getDialogByPeerID(peerID)[0];\r\n if (dialog) {\r\n var topDate;\r\n if (draft && draft.date) {\r\n topDate = draft.date;\r\n }\r\n else {\r\n var channelID = appPeersManager_1.default.isChannel(peerID) ? -peerID : 0;\r\n var topDate = this.getMessage(dialog.top_message).date;\r\n if (channelID) {\r\n var channel = appChatsManager_1.default.getChat(channelID);\r\n if (!topDate || channel.date && channel.date > topDate) {\r\n topDate = channel.date;\r\n }\r\n }\r\n }\r\n if (!dialog.pFlags.pinned) {\r\n dialog.index = this.generateDialogIndex(topDate);\r\n }\r\n this.pushDialogToStorage(dialog);\r\n utils_1.$rootScope.$broadcast('dialog_draft', {\r\n peerID: peerID,\r\n draft: draft,\r\n index: dialog.index\r\n });\r\n }\r\n });\r\n }\r\n getInputEntities(entities) {\r\n var sendEntites = utils_1.copy(entities);\r\n sendEntites.forEach((entity) => {\r\n if (entity._ == 'messageEntityMentionName') {\r\n entity._ = 'inputMessageEntityMentionName';\r\n entity.user_id = appUsersManager_1.default.getUserInput(entity.user_id);\r\n }\r\n });\r\n return sendEntites;\r\n }\r\n editMessage(messageID, text, options = {}) {\r\n if (typeof (text) !== 'string' || !this.canEditMessage(messageID)) {\r\n return Promise.reject();\r\n }\r\n if (messageID < 0) {\r\n if (this.tempFinalizeCallbacks[messageID] === undefined) {\r\n this.tempFinalizeCallbacks[messageID] = {};\r\n }\r\n let promise = new Promise((resolve, reject) => {\r\n this.tempFinalizeCallbacks[messageID].edit = (mid) => {\r\n console.log('invoke callback', mid);\r\n this.editMessage(mid, text).then(resolve, reject);\r\n };\r\n });\r\n return promise;\r\n }\r\n var entities = [];\r\n text = richtextprocessor_1.RichTextProcessor.parseMarkdown(text, entities);\r\n var message = this.getMessage(messageID);\r\n var peerID = this.getMessagePeer(message);\r\n var flags = 0;\r\n let noWebPage = options.noWebPage || false;\r\n if (noWebPage) {\r\n flags |= 2;\r\n }\r\n if (text) {\r\n flags |= 8 | 1 << 11;\r\n }\r\n /* if(message.media) {\r\n flags |= 1 << 14;\r\n } */\r\n return mtprotoworker_1.default.invokeApi('messages.editMessage', {\r\n flags: flags,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n id: appMessagesIDsManager_1.default.getMessageLocalID(messageID),\r\n message: text,\r\n media: message.media,\r\n entities: this.getInputEntities(entities),\r\n no_webpage: noWebPage,\r\n }).then((updates) => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n }, (error) => {\r\n if (error && error.type == 'MESSAGE_NOT_MODIFIED') {\r\n error.handled = true;\r\n return;\r\n }\r\n if (error && error.type == 'MESSAGE_EMPTY') {\r\n error.handled = true;\r\n }\r\n return Promise.reject(error);\r\n });\r\n }\r\n sendText(peerID, text, options = {}) {\r\n if (typeof (text) != 'string') {\r\n return;\r\n }\r\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\r\n var entities = options.entities || [];\r\n if (!options.viaBotID) {\r\n text = richtextprocessor_1.RichTextProcessor.parseMarkdown(text, entities);\r\n }\r\n if (!text.length) {\r\n return;\r\n }\r\n var sendEntites = this.getInputEntities(entities);\r\n var messageID = this.tempID--;\r\n var randomID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n var randomIDS = bin_utils_1.bigint(randomID[0]).shiftLeft(32).add(bin_utils_1.bigint(randomID[1])).toString();\r\n var historyStorage = this.historiesStorage[peerID];\r\n var flags = 0;\r\n var pFlags = {};\r\n var replyToMsgID = options.replyToMsgID;\r\n var isChannel = appPeersManager_1.default.isChannel(peerID);\r\n var isMegagroup = isChannel && appPeersManager_1.default.isMegagroup(peerID);\r\n var asChannel = isChannel && !isMegagroup ? true : false;\r\n var message;\r\n let noWebPage = options.noWebPage || false;\r\n if (historyStorage === undefined) {\r\n historyStorage = this.historiesStorage[peerID] = { count: null, history: [], pending: [] };\r\n }\r\n var fromID = appUsersManager_1.default.getSelf().id;\r\n if (peerID != fromID) {\r\n flags |= 2;\r\n pFlags.out = true;\r\n if (!isChannel && !appUsersManager_1.default.isBot(peerID)) {\r\n flags |= 1;\r\n pFlags.unread = true;\r\n }\r\n }\r\n if (replyToMsgID) {\r\n flags |= 8;\r\n }\r\n if (asChannel) {\r\n fromID = 0;\r\n pFlags.post = true;\r\n }\r\n else {\r\n flags |= 256;\r\n }\r\n message = {\r\n _: 'message',\r\n id: messageID,\r\n from_id: fromID,\r\n to_id: appPeersManager_1.default.getOutputPeer(peerID),\r\n flags: flags,\r\n pFlags: pFlags,\r\n date: utils_1.tsNow(true) + serverTimeManager_2.default.serverTimeOffset,\r\n message: text,\r\n random_id: randomIDS,\r\n reply_to_msg_id: replyToMsgID,\r\n via_bot_id: options.viaBotID,\r\n reply_markup: options.reply_markup,\r\n entities: entities,\r\n views: asChannel && 1,\r\n pending: true\r\n };\r\n if (options.webPage) {\r\n message.media = {\r\n _: 'messageMediaWebPage',\r\n webpage: options.webPage\r\n };\r\n }\r\n var toggleError = (on) => {\r\n if (on) {\r\n message.error = true;\r\n }\r\n else {\r\n delete message.error;\r\n }\r\n utils_1.$rootScope.$broadcast('messages_pending');\r\n };\r\n message.send = () => {\r\n toggleError(false);\r\n var sentRequestOptions = {};\r\n if (this.pendingAfterMsgs[peerID]) {\r\n sentRequestOptions.afterMessageID = this.pendingAfterMsgs[peerID].messageID;\r\n }\r\n var flags = 0;\r\n if (replyToMsgID) {\r\n flags |= 1;\r\n }\r\n if (asChannel) {\r\n flags |= 16;\r\n }\r\n if (options.clearDraft) {\r\n flags |= 128;\r\n }\r\n if (noWebPage) {\r\n flags |= 2;\r\n }\r\n var apiPromise;\r\n if (options.viaBotID) {\r\n apiPromise = mtprotoworker_1.default.invokeApi('messages.sendInlineBotResult', {\r\n flags: flags,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n random_id: randomID,\r\n reply_to_msg_id: appMessagesIDsManager_1.default.getMessageLocalID(replyToMsgID),\r\n query_id: options.queryID,\r\n id: options.resultID\r\n }, sentRequestOptions);\r\n }\r\n else {\r\n if (sendEntites.length) {\r\n flags |= 8;\r\n }\r\n apiPromise = mtprotoworker_1.default.invokeApi('messages.sendMessage', {\r\n flags: flags,\r\n no_webpage: noWebPage,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n message: text,\r\n random_id: randomID,\r\n reply_to_msg_id: appMessagesIDsManager_1.default.getMessageLocalID(replyToMsgID),\r\n entities: sendEntites\r\n }, sentRequestOptions);\r\n }\r\n // console.log(flags, entities)\r\n apiPromise.then((updates) => {\r\n if (updates._ == 'updateShortSentMessage') {\r\n message.flags = updates.flags;\r\n message.date = updates.date;\r\n message.id = updates.id;\r\n message.media = updates.media;\r\n message.entities = updates.entities;\r\n updates = {\r\n _: 'updates',\r\n users: [],\r\n chats: [],\r\n seq: 0,\r\n updates: [{\r\n _: 'updateMessageID',\r\n random_id: randomIDS,\r\n id: updates.id\r\n }, {\r\n _: isChannel\r\n ? 'updateNewChannelMessage'\r\n : 'updateNewMessage',\r\n message: message,\r\n pts: updates.pts,\r\n pts_count: updates.pts_count\r\n }]\r\n };\r\n }\r\n else if (updates.updates) {\r\n updates.updates.forEach((update) => {\r\n if (update._ == 'updateDraftMessage') {\r\n update.local = true;\r\n }\r\n });\r\n }\r\n // Testing bad situations\r\n // var upd = angular.copy(updates)\r\n // updates.updates.splice(0, 1)\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n // $timeout(function () {\r\n // ApiUpdatesManager.processUpdateMessage(upd)\r\n // }, 5000)\r\n }, ( /* error: any */) => {\r\n toggleError(true);\r\n }).finally(() => {\r\n if (this.pendingAfterMsgs[peerID] === sentRequestOptions) {\r\n delete this.pendingAfterMsgs[peerID];\r\n }\r\n });\r\n this.pendingAfterMsgs[peerID] = sentRequestOptions;\r\n };\r\n this.saveMessages([message]);\r\n historyStorage.pending.unshift(messageID);\r\n utils_1.$rootScope.$broadcast('history_append', { peerID: peerID, messageID: messageID, my: true });\r\n setTimeout(() => message.send(), 0);\r\n // setTimeout(function () {\r\n // message.send()\r\n // }, 5000)\r\n /* if(options.clearDraft) { // WARNING\r\n DraftsManager.clearDraft(peerID)\r\n } */\r\n this.pendingByRandomID[randomIDS] = [peerID, messageID];\r\n }\r\n sendFile(peerID, file, options = {}) {\r\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\r\n var messageID = this.tempID--;\r\n var randomID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n var randomIDS = bin_utils_1.bigint(randomID[0]).shiftLeft(32).add(bin_utils_1.bigint(randomID[1])).toString();\r\n var historyStorage = this.historiesStorage[peerID];\r\n var flags = 0;\r\n var pFlags = {};\r\n var replyToMsgID = options.replyToMsgID;\r\n var isChannel = appPeersManager_1.default.isChannel(peerID);\r\n var isMegagroup = isChannel && appPeersManager_1.default.isMegagroup(peerID);\r\n var asChannel = isChannel && !isMegagroup ? true : false;\r\n var attachType, apiFileName;\r\n let fileType = 'mime_type' in file ? file.mime_type : file.type;\r\n let fileName = file instanceof File ? file.name : '';\r\n let isDocument = !(file instanceof File) && !(file instanceof Blob);\r\n let caption = options.caption || '';\r\n let date = utils_1.tsNow(true) + serverTimeManager_1.default.serverTimeOffset;\r\n if (caption) {\r\n let entities = options.entities || [];\r\n caption = richtextprocessor_1.RichTextProcessor.parseMarkdown(caption, entities);\r\n }\r\n let actionName = '';\r\n if (!options.isMedia) {\r\n attachType = 'document';\r\n apiFileName = 'document.' + fileType.split('/')[1];\r\n actionName = 'sendMessageUploadDocumentAction';\r\n }\r\n else if (isDocument) { // maybe it's a sticker or gif\r\n attachType = 'document';\r\n apiFileName = '';\r\n }\r\n else if (['image/jpeg', 'image/png', 'image/bmp'].indexOf(fileType) >= 0) {\r\n attachType = 'photo';\r\n apiFileName = 'photo.' + fileType.split('/')[1];\r\n actionName = 'sendMessageUploadPhotoAction';\r\n let photo = {\r\n _: 'photo',\r\n id: '' + messageID,\r\n sizes: [{\r\n _: 'photoSize',\r\n w: options.width,\r\n h: options.height,\r\n type: 'm',\r\n size: file.size\r\n }],\r\n w: options.width,\r\n h: options.height,\r\n downloaded: file.size,\r\n url: options.objectURL || ''\r\n };\r\n appPhotosManager_1.default.savePhoto(photo);\r\n }\r\n else if (fileType.substr(0, 6) == 'audio/' || ['video/ogg'].indexOf(fileType) >= 0) {\r\n attachType = 'audio';\r\n apiFileName = 'audio.' + (fileType.split('/')[1] == 'ogg' ? 'ogg' : 'mp3');\r\n actionName = 'sendMessageUploadAudioAction';\r\n }\r\n else if (fileType.substr(0, 6) == 'video/') {\r\n //attachType = 'video';\r\n //apiFileName = 'video.mp4';\r\n attachType = 'document'; // last minute fix\r\n apiFileName = 'video.mp4';\r\n actionName = 'sendMessageUploadVideoAction';\r\n }\r\n else {\r\n attachType = 'document';\r\n apiFileName = 'document.' + fileType.split('/')[1];\r\n actionName = 'sendMessageUploadDocumentAction';\r\n }\r\n // console.log(attachType, apiFileName, file.type)\r\n if (historyStorage === undefined) {\r\n historyStorage = this.historiesStorage[peerID] = { count: null, history: [], pending: [] };\r\n }\r\n var fromID = appUsersManager_1.default.getSelf().id;\r\n if (peerID != fromID) {\r\n flags |= 2;\r\n pFlags.out = true;\r\n if (!isChannel && !appUsersManager_1.default.isBot(peerID)) {\r\n flags |= 1;\r\n pFlags.unread = true;\r\n }\r\n }\r\n if (replyToMsgID) {\r\n flags |= 8;\r\n }\r\n if (asChannel) {\r\n fromID = 0;\r\n pFlags.post = true;\r\n }\r\n else {\r\n flags |= 256;\r\n }\r\n let preloader = new preloader_1.default(null, true);\r\n var media = {\r\n _: 'messageMediaPending',\r\n type: attachType,\r\n file_name: fileName || apiFileName,\r\n size: file.size,\r\n file: file,\r\n preloader: preloader,\r\n w: options.width,\r\n h: options.height,\r\n url: options.objectURL,\r\n progress: {\r\n percent: 1,\r\n total: file.size,\r\n done: 0,\r\n cancel: () => { }\r\n }\r\n };\r\n preloader.preloader.onclick = () => {\r\n console.log('cancelling upload', media);\r\n appImManager_1.default.setTyping('sendMessageCancelAction');\r\n media.progress.cancel();\r\n };\r\n var message = {\r\n _: 'message',\r\n id: messageID,\r\n from_id: fromID,\r\n to_id: appPeersManager_1.default.getOutputPeer(peerID),\r\n flags: flags,\r\n pFlags: pFlags,\r\n date: date,\r\n message: caption,\r\n media: isDocument ? {\r\n _: 'messageMediaDocument',\r\n pFlags: {},\r\n flags: 1,\r\n document: file\r\n } : media,\r\n random_id: randomIDS,\r\n reply_to_msg_id: replyToMsgID,\r\n views: asChannel && 1,\r\n pending: true\r\n };\r\n var toggleError = (on) => {\r\n if (on) {\r\n message.error = true;\r\n }\r\n else {\r\n delete message.error;\r\n }\r\n utils_1.$rootScope.$broadcast('messages_pending');\r\n };\r\n var uploaded = false, uploadPromise = null;\r\n let invoke = (flags, inputMedia) => {\r\n appImManager_1.default.setTyping('sendMessageCancelAction');\r\n return mtprotoworker_1.default.invokeApi('messages.sendMedia', {\r\n flags: flags,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n media: inputMedia,\r\n message: caption,\r\n random_id: randomID,\r\n reply_to_msg_id: appMessagesIDsManager_1.default.getMessageLocalID(replyToMsgID)\r\n }).then((updates) => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n }, (error) => {\r\n if (attachType == 'photo' &&\r\n error.code == 400 &&\r\n (error.type == 'PHOTO_INVALID_DIMENSIONS' ||\r\n error.type == 'PHOTO_SAVE_FILE_INVALID')) {\r\n error.handled = true;\r\n attachType = 'document';\r\n message.send();\r\n return;\r\n }\r\n toggleError(true);\r\n });\r\n };\r\n message.send = () => {\r\n let flags = 0;\r\n if (replyToMsgID) {\r\n flags |= 1;\r\n }\r\n if (asChannel) {\r\n flags |= 16;\r\n }\r\n if (isDocument) {\r\n let { id, access_hash, file_reference } = file;\r\n let inputMedia = {\r\n _: 'inputMediaDocument',\r\n flags: 0,\r\n id: {\r\n _: 'inputDocument',\r\n id: id,\r\n access_hash: access_hash,\r\n file_reference: file_reference\r\n }\r\n };\r\n invoke(flags, inputMedia);\r\n }\r\n else if (file instanceof File || file instanceof Blob) {\r\n let deferred = polyfill_1.deferredPromise();\r\n this.sendFilePromise.then(() => {\r\n if (!uploaded || message.error) {\r\n uploaded = false;\r\n uploadPromise = apiFileManager_1.default.uploadFile(file);\r\n }\r\n uploadPromise && uploadPromise.then((inputFile) => {\r\n console.log('appMessagesManager: sendFile uploaded:', inputFile);\r\n inputFile.name = apiFileName;\r\n uploaded = true;\r\n var inputMedia;\r\n switch (attachType) {\r\n case 'photo':\r\n inputMedia = {\r\n _: 'inputMediaUploadedPhoto',\r\n flags: 0,\r\n file: inputFile\r\n };\r\n break;\r\n case 'document':\r\n default:\r\n inputMedia = {\r\n _: 'inputMediaUploadedDocument',\r\n file: inputFile,\r\n mime_type: fileType,\r\n caption: '',\r\n attributes: [\r\n { _: 'documentAttributeFilename', file_name: fileName }\r\n ]\r\n };\r\n }\r\n invoke(flags, inputMedia);\r\n }, ( /* error */) => {\r\n toggleError(true);\r\n });\r\n uploadPromise.notify = (progress) => {\r\n console.log('upload progress', progress);\r\n media.progress.done = progress.done;\r\n media.progress.percent = Math.max(1, Math.floor(100 * progress.done / progress.total));\r\n appImManager_1.default.setTyping({ _: actionName, progress: media.progress.percent | 0 });\r\n preloader.setProgress(media.progress.percent); // lol, nice\r\n utils_1.$rootScope.$broadcast('history_update', { peerID: peerID });\r\n };\r\n media.progress.cancel = () => {\r\n if (!uploaded) {\r\n deferred.resolve();\r\n uploadPromise.cancel();\r\n this.cancelPendingMessage(randomIDS);\r\n }\r\n };\r\n // @ts-ignore\r\n uploadPromise['finally'](() => {\r\n deferred.resolve();\r\n preloader.detach();\r\n });\r\n });\r\n this.sendFilePromise = deferred;\r\n }\r\n };\r\n this.saveMessages([message]);\r\n historyStorage.pending.unshift(messageID);\r\n utils_1.$rootScope.$broadcast('history_append', { peerID: peerID, messageID: messageID, my: true });\r\n setTimeout(message.send.bind(this), 0);\r\n this.pendingByRandomID[randomIDS] = [peerID, messageID];\r\n }\r\n cancelPendingMessage(randomID) {\r\n var pendingData = this.pendingByRandomID[randomID];\r\n console.log('cancelPendingMessage', randomID, pendingData);\r\n if (pendingData) {\r\n var peerID = pendingData[0];\r\n var tempID = pendingData[1];\r\n var historyStorage = this.historiesStorage[peerID];\r\n var pos = historyStorage.pending.indexOf(tempID);\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateDeleteMessages',\r\n messages: [tempID]\r\n }\r\n });\r\n if (pos != -1) {\r\n historyStorage.pending.splice(pos, 1);\r\n }\r\n delete this.messagesStorage[tempID];\r\n return true;\r\n }\r\n return false;\r\n }\r\n getConversation(peerID) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n var foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog.length) {\r\n return foundDialog[0];\r\n }\r\n return {\r\n peerID: peerID,\r\n top_message: 0,\r\n index: this.generateDialogIndex(this.generateDialogPinnedDate()),\r\n pFlags: {}\r\n };\r\n });\r\n }\r\n getConversations(query, offsetIndex, limit = 20, folderID = -1) {\r\n //var curDialogStorage = this.dialogsStorage;\r\n //var isSearch = typeof(query) == 'string' && query.length;\r\n let curDialogStorage = this.dialogsStorage.dialogs;\r\n if (folderID > 0) {\r\n curDialogStorage = curDialogStorage.filter(d => d.folder_id == folderID);\r\n }\r\n else {\r\n curDialogStorage = curDialogStorage.filter(d => d.folder_id != 1);\r\n }\r\n /* if(isSearch) {\r\n if(!limit || this.cachedResults.query !== query) {\r\n this.cachedResults.query = query;\r\n \r\n var results: any = SearchIndexManager.search(query, this.dialogsIndex);\r\n \r\n this.cachedResults.dialogs = [];\r\n this.dialogsStorage.dialogs.forEach((dialog: any) => {\r\n if(results[dialog.peerID]) {\r\n this.cachedResults.dialogs.push(dialog);\r\n }\r\n })\r\n this.cachedResults.count = this.cachedResults.dialogs.length;\r\n }\r\n curDialogStorage = this.cachedResults;\r\n } else { */\r\n this.cachedResults.query = false;\r\n //}\r\n var offset = 0;\r\n if (offsetIndex > 0) {\r\n for (; offset < curDialogStorage.length; offset++) {\r\n if (offsetIndex > curDialogStorage[offset].index) {\r\n break;\r\n }\r\n }\r\n }\r\n if ( /* isSearch || */this.allDialogsLoaded[folderID] || curDialogStorage.length >= offset + limit) {\r\n return Promise.resolve({\r\n dialogs: curDialogStorage.slice(offset, offset + limit),\r\n count: curDialogStorage.length\r\n });\r\n }\r\n return this.getTopMessages(limit, folderID).then(count => {\r\n let curDialogStorage = this.dialogsStorage.dialogs;\r\n if (folderID > 0) {\r\n curDialogStorage = curDialogStorage.filter(d => d.folder_id == folderID);\r\n }\r\n else {\r\n curDialogStorage = curDialogStorage.filter(d => d.folder_id != 1);\r\n }\r\n offset = 0;\r\n if (offsetIndex > 0) {\r\n for (offset = 0; offset < curDialogStorage.length; offset++) {\r\n if (offsetIndex > curDialogStorage[offset].index) {\r\n break;\r\n }\r\n }\r\n }\r\n //console.warn(offset, offset + limit, curDialogStorage.dialogs.length, this.dialogsStorage.dialogs.length);\r\n return {\r\n dialogs: curDialogStorage.slice(offset, offset + limit),\r\n count: count\r\n };\r\n });\r\n }\r\n getTopMessages(limit, folderID = -1) {\r\n var dialogs = this.dialogsStorage.dialogs;\r\n var offsetDate = 0;\r\n var offsetID = 0;\r\n var offsetPeerID = 0;\r\n var offsetIndex = 0;\r\n var flags = 0;\r\n if (folderID > 0) {\r\n dialogs = dialogs.filter(d => d.folder_id == folderID);\r\n }\r\n else {\r\n dialogs = dialogs.filter(d => d.folder_id != 1);\r\n }\r\n if (this.dialogsOffsetDate[folderID]) {\r\n offsetDate = this.dialogsOffsetDate[folderID] + serverTimeManager_2.default.serverTimeOffset;\r\n offsetIndex = this.dialogsOffsetDate[folderID] * 0x10000;\r\n flags |= 1;\r\n }\r\n if (folderID > 0) {\r\n flags |= 1;\r\n flags |= 2;\r\n }\r\n let hash = 0;\r\n return mtprotoworker_1.default.invokeApi('messages.getDialogs', {\r\n flags: flags,\r\n folder_id: folderID,\r\n offset_date: offsetDate,\r\n offset_id: appMessagesIDsManager_1.default.getMessageLocalID(offsetID),\r\n offset_peer: appPeersManager_1.default.getInputPeerByID(offsetPeerID),\r\n limit: limit,\r\n hash: hash\r\n }, {\r\n timeout: 300\r\n }).then((dialogsResult) => {\r\n ///////console.log('messages.getDialogs result:', dialogsResult);\r\n if (!offsetDate) {\r\n mtproto_1.telegramMeWebService.setAuthorized(true);\r\n }\r\n appUsersManager_1.default.saveApiUsers(dialogsResult.users);\r\n appChatsManager_1.default.saveApiChats(dialogsResult.chats);\r\n this.saveMessages(dialogsResult.messages);\r\n var maxSeenIdIncremented = offsetDate ? true : false;\r\n var hasPrepend = false;\r\n //dialogsResult.dialogs.reverse();\r\n let length = dialogsResult.dialogs.length;\r\n let noIDsDialogs = {};\r\n for (let i = length - 1; i >= 0; --i) {\r\n let dialog = dialogsResult.dialogs[i];\r\n //}\r\n //dialogsResult.dialogs.forEach((dialog: any) => {\r\n this.saveConversation(dialog);\r\n if (offsetIndex && dialog.index > offsetIndex) {\r\n this.newDialogsToHandle[dialog.peerID] = dialog;\r\n hasPrepend = true;\r\n }\r\n if (!dialog.read_inbox_max_id && !dialog.read_outbox_max_id) {\r\n noIDsDialogs[dialog.peerID] = dialog;\r\n }\r\n if (!maxSeenIdIncremented &&\r\n !appPeersManager_1.default.isChannel(appPeersManager_1.default.getPeerID(dialog.peer))) {\r\n this.incrementMaxSeenID(dialog.top_message);\r\n maxSeenIdIncremented = true;\r\n }\r\n }\r\n //});\r\n //dialogsResult.dialogs.reverse();\r\n if (Object.keys(noIDsDialogs).length) {\r\n //setTimeout(() => { // test bad situation\r\n this.reloadConversation(Object.keys(noIDsDialogs).map(id => +id)).then(() => {\r\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', noIDsDialogs);\r\n for (let peerID in noIDsDialogs) {\r\n utils_1.$rootScope.$broadcast('dialog_unread', { peerID: +peerID });\r\n }\r\n });\r\n //}, 10e3);\r\n }\r\n if (!dialogsResult.dialogs.length ||\r\n !dialogsResult.count ||\r\n dialogs.length >= dialogsResult.count) {\r\n this.allDialogsLoaded[folderID] = true;\r\n }\r\n if (hasPrepend && !this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n else {\r\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', {});\r\n }\r\n return dialogsResult.count;\r\n });\r\n }\r\n generateDialogIndex(date) {\r\n if (date === undefined) {\r\n date = utils_1.tsNow(true) + serverTimeManager_2.default.serverTimeOffset;\r\n }\r\n return (date * 0x10000) + ((++this.dialogsNum) & 0xFFFF);\r\n }\r\n pushDialogToStorage(dialog, offsetDate) {\r\n var dialogs = this.dialogsStorage.dialogs /* .filter(d => d.folder_id == dialog.folder_id) */;\r\n var pos = this.getDialogByPeerID(dialog.peerID)[1];\r\n if (pos !== undefined) {\r\n dialogs.splice(pos, 1);\r\n }\r\n if (offsetDate &&\r\n !dialog.pFlags.pinned &&\r\n (!this.dialogsOffsetDate[dialog.folder_id] || offsetDate < this.dialogsOffsetDate[dialog.folder_id])) {\r\n if (pos !== undefined) {\r\n // So the dialog jumped to the last position\r\n return false;\r\n }\r\n this.dialogsOffsetDate[dialog.folder_id] = offsetDate;\r\n }\r\n var index = dialog.index;\r\n var i;\r\n var len = dialogs.length;\r\n if (!len || index < dialogs[len - 1].index) {\r\n dialogs.push(dialog);\r\n }\r\n else if (index >= dialogs[0].index) {\r\n dialogs.unshift(dialog);\r\n }\r\n else {\r\n for (i = 0; i < len; i++) {\r\n if (index > dialogs[i].index) {\r\n dialogs.splice(i, 0, dialog);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n getMessage(messageID) {\r\n return this.messagesStorage[messageID] || {\r\n _: 'messageEmpty',\r\n deleted: true,\r\n pFlags: { out: false, unread: false }\r\n };\r\n }\r\n getMessagePeer(message) {\r\n var toID = message.to_id && appPeersManager_1.default.getPeerID(message.to_id) || 0;\r\n if (toID < 0) {\r\n return toID;\r\n }\r\n else if (message.pFlags && message.pFlags.out || message.flags & 2) {\r\n return toID;\r\n }\r\n return message.from_id;\r\n }\r\n getDialogByPeerID(peerID) {\r\n let length = this.dialogsStorage.dialogs.length;\r\n for (var i = 0; i < length; i++) {\r\n if (this.dialogsStorage.dialogs[i].peerID == peerID) {\r\n return [this.dialogsStorage.dialogs[i], i];\r\n }\r\n }\r\n return [];\r\n }\r\n reloadConversation(peerID) {\r\n let peers = [].concat(peerID).map(peerID => appPeersManager_1.default.getInputPeerByID(peerID));\r\n console.log('will reloadConversation', peerID);\r\n return mtprotoworker_1.default.invokeApi('messages.getPeerDialogs', {\r\n peers: peers\r\n }).then(this.applyConversations.bind(this));\r\n }\r\n saveMessages(apiMessages, options = {}) {\r\n apiMessages.forEach((apiMessage) => {\r\n if (apiMessage.pFlags === undefined) {\r\n apiMessage.pFlags = {};\r\n }\r\n if (!apiMessage.pFlags.out) {\r\n apiMessage.pFlags.out = false;\r\n }\r\n if (!apiMessage.pFlags.unread) {\r\n apiMessage.pFlags.unread = false;\r\n }\r\n if (apiMessage._ == 'messageEmpty') {\r\n return;\r\n }\r\n var peerID = this.getMessagePeer(apiMessage);\r\n var isChannel = apiMessage.to_id._ == 'peerChannel';\r\n var channelID = isChannel ? -peerID : 0;\r\n var isBroadcast = isChannel && appChatsManager_1.default.isBroadcast(channelID);\r\n var mid = appMessagesIDsManager_1.default.getFullMessageID(apiMessage.id, channelID);\r\n apiMessage.mid = mid;\r\n var dialog = this.getDialogByPeerID(peerID)[0];\r\n if (dialog && mid > 0) {\r\n let dialogKey = apiMessage.pFlags.out\r\n ? 'read_outbox_max_id'\r\n : 'read_inbox_max_id';\r\n apiMessage.pFlags.unread = mid > dialog[dialogKey];\r\n }\r\n else if (options.isNew) {\r\n apiMessage.pFlags.unread = true;\r\n }\r\n // console.log(dT(), 'msg unread', mid, apiMessage.pFlags.out, dialog && dialog[apiMessage.pFlags.out ? 'read_outbox_max_id' : 'read_inbox_max_id'])\r\n if (apiMessage.reply_to_msg_id) {\r\n apiMessage.reply_to_mid = appMessagesIDsManager_1.default.getFullMessageID(apiMessage.reply_to_msg_id, channelID);\r\n }\r\n apiMessage.date -= serverTimeManager_2.default.serverTimeOffset;\r\n apiMessage.peerID = peerID;\r\n apiMessage.fromID = apiMessage.pFlags.post ? peerID : apiMessage.from_id;\r\n var fwdHeader = apiMessage.fwd_from;\r\n if (fwdHeader) {\r\n if (peerID == appUsersManager_1.default.getSelf().id) {\r\n if (fwdHeader.saved_from_peer && fwdHeader.saved_from_msg_id) {\r\n var savedFromPeerID = appPeersManager_1.default.getPeerID(fwdHeader.saved_from_peer);\r\n var savedFromMid = appMessagesIDsManager_1.default.getFullMessageID(fwdHeader.saved_from_msg_id, appPeersManager_1.default.isChannel(savedFromPeerID) ? -savedFromPeerID : 0);\r\n apiMessage.savedFrom = savedFromPeerID + '_' + savedFromMid;\r\n }\r\n apiMessage.fromID = fwdHeader.channel_id ? -fwdHeader.channel_id : fwdHeader.from_id;\r\n }\r\n else {\r\n apiMessage.fwdPostID = fwdHeader.channel_post;\r\n }\r\n apiMessage.fwdFromID = fwdHeader.channel_id ? -fwdHeader.channel_id : fwdHeader.from_id;\r\n fwdHeader.date -= serverTimeManager_2.default.serverTimeOffset;\r\n }\r\n if (apiMessage.via_bot_id > 0) {\r\n apiMessage.viaBotID = apiMessage.via_bot_id;\r\n }\r\n var mediaContext = {\r\n user_id: apiMessage.fromID,\r\n date: apiMessage.date\r\n };\r\n if (apiMessage.media) {\r\n switch (apiMessage.media._) {\r\n case 'messageMediaEmpty':\r\n delete apiMessage.media;\r\n break;\r\n case 'messageMediaPhoto':\r\n if (apiMessage.media.ttl_seconds) {\r\n apiMessage.media = { _: 'messageMediaUnsupportedWeb' };\r\n }\r\n else {\r\n apiMessage.media.photo = appPhotosManager_1.default.savePhoto(apiMessage.media.photo, mediaContext);\r\n //appPhotosManager.savePhoto(apiMessage.media.photo, mediaContext);\r\n }\r\n break;\r\n case 'messageMediaDocument':\r\n if (apiMessage.media.ttl_seconds) {\r\n apiMessage.media = { _: 'messageMediaUnsupportedWeb' };\r\n }\r\n else {\r\n apiMessage.media.document = appDocsManager_1.default.saveDoc(apiMessage.media.document, mediaContext); // 11.04.2020 warning\r\n }\r\n break;\r\n case 'messageMediaWebPage':\r\n /* if(apiMessage.media.webpage.document) {\r\n appDocsManager.saveDoc(apiMessage.media.webpage.document, mediaContext);\r\n } */\r\n appWebPagesManager_1.default.saveWebPage(apiMessage.media.webpage, apiMessage.mid, mediaContext);\r\n break;\r\n /*case 'messageMediaGame':\r\n AppGamesManager.saveGame(apiMessage.media.game, apiMessage.mid, mediaContext);\r\n apiMessage.media.handleMessage = true;\r\n break; */\r\n case 'messageMediaInvoice':\r\n apiMessage.media = { _: 'messageMediaUnsupportedWeb' };\r\n break;\r\n case 'messageMediaGeoLive':\r\n apiMessage.media._ = 'messageMediaGeo';\r\n break;\r\n }\r\n }\r\n if (apiMessage.action) {\r\n var migrateFrom;\r\n var migrateTo;\r\n switch (apiMessage.action._) {\r\n case 'messageActionChatEditPhoto':\r\n apiMessage.action.photo = appPhotosManager_1.default.savePhoto(apiMessage.action.photo, mediaContext);\r\n //appPhotosManager.savePhoto(apiMessage.action.photo, mediaContext);\r\n if (isBroadcast) {\r\n apiMessage.action._ = 'messageActionChannelEditPhoto';\r\n }\r\n break;\r\n case 'messageActionChatEditTitle':\r\n if (isBroadcast) {\r\n apiMessage.action._ = 'messageActionChannelEditTitle';\r\n }\r\n break;\r\n case 'messageActionChatDeletePhoto':\r\n if (isBroadcast) {\r\n apiMessage.action._ = 'messageActionChannelDeletePhoto';\r\n }\r\n break;\r\n case 'messageActionChatAddUser':\r\n if (apiMessage.action.users.length == 1) {\r\n apiMessage.action.user_id = apiMessage.action.users[0];\r\n if (apiMessage.fromID == apiMessage.action.user_id) {\r\n if (isChannel) {\r\n apiMessage.action._ = 'messageActionChatJoined';\r\n }\r\n else {\r\n apiMessage.action._ = 'messageActionChatReturn';\r\n }\r\n }\r\n }\r\n else if (apiMessage.action.users.length > 1) {\r\n apiMessage.action._ = 'messageActionChatAddUsers';\r\n }\r\n break;\r\n case 'messageActionChatDeleteUser':\r\n if (apiMessage.fromID == apiMessage.action.user_id) {\r\n apiMessage.action._ = 'messageActionChatLeave';\r\n }\r\n break;\r\n case 'messageActionChannelMigrateFrom':\r\n migrateFrom = -apiMessage.action.chat_id;\r\n migrateTo = -channelID;\r\n break;\r\n case 'messageActionChatMigrateTo':\r\n migrateFrom = -channelID;\r\n migrateTo = -apiMessage.action.channel_id;\r\n break;\r\n case 'messageActionHistoryClear':\r\n apiMessage.deleted = true;\r\n apiMessage.clear_history = true;\r\n apiMessage.pFlags.out = false;\r\n apiMessage.pFlags.unread = false;\r\n break;\r\n case 'messageActionPhoneCall':\r\n delete apiMessage.fromID;\r\n apiMessage.action.type =\r\n (apiMessage.pFlags.out ? 'out_' : 'in_') +\r\n (apiMessage.action.reason._ == 'phoneCallDiscardReasonMissed' ||\r\n apiMessage.action.reason._ == 'phoneCallDiscardReasonBusy'\r\n ? 'missed'\r\n : 'ok');\r\n break;\r\n }\r\n if (migrateFrom &&\r\n migrateTo &&\r\n !this.migratedFromTo[migrateFrom] &&\r\n !this.migratedToFrom[migrateTo]) {\r\n this.migrateChecks(migrateFrom, migrateTo);\r\n }\r\n }\r\n if (apiMessage.message && apiMessage.message.length) {\r\n var myEntities = richtextprocessor_1.RichTextProcessor.parseEntities(apiMessage.message);\r\n var apiEntities = apiMessage.entities || [];\r\n apiMessage.totalEntities = richtextprocessor_1.RichTextProcessor.mergeEntities(myEntities, apiEntities, !apiMessage.pending);\r\n }\r\n apiMessage.canBeEdited = this.canMessageBeEdited(apiMessage);\r\n if (!options.isEdited) {\r\n this.messagesStorage[mid] = apiMessage;\r\n }\r\n });\r\n }\r\n migrateChecks(migrateFrom, migrateTo) {\r\n if (!this.migratedFromTo[migrateFrom] &&\r\n !this.migratedToFrom[migrateTo] &&\r\n appChatsManager_1.default.hasChat(-migrateTo)) {\r\n var fromChat = appChatsManager_1.default.getChat(-migrateFrom);\r\n if (fromChat &&\r\n fromChat.migrated_to &&\r\n fromChat.migrated_to.channel_id == -migrateTo) {\r\n this.migratedFromTo[migrateFrom] = migrateTo;\r\n this.migratedToFrom[migrateTo] = migrateFrom;\r\n setTimeout(() => {\r\n var foundDialog = this.getDialogByPeerID(migrateFrom);\r\n if (foundDialog.length) {\r\n this.dialogsStorage.dialogs.splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: migrateFrom });\r\n }\r\n utils_1.$rootScope.$broadcast('dialog_migrate', { migrateFrom: migrateFrom, migrateTo: migrateTo });\r\n }, 100);\r\n }\r\n }\r\n }\r\n canMessageBeEdited(message) {\r\n var goodMedias = [\r\n 'messageMediaPhoto',\r\n 'messageMediaDocument',\r\n 'messageMediaWebPage',\r\n 'messageMediaPending'\r\n ];\r\n if (message._ != 'message' ||\r\n message.deleted ||\r\n message.fwd_from ||\r\n message.via_bot_id ||\r\n message.media && goodMedias.indexOf(message.media._) == -1 ||\r\n message.fromID && appUsersManager_1.default.isBot(message.fromID)) {\r\n return false;\r\n }\r\n if (message.media &&\r\n message.media._ == 'messageMediaDocument' &&\r\n message.media.document.sticker) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n canEditMessage(messageID) {\r\n if (!this.messagesStorage[messageID]) {\r\n return false;\r\n }\r\n var message = this.messagesStorage[messageID];\r\n if (!message ||\r\n !message.canBeEdited) {\r\n return false;\r\n }\r\n if (this.getMessagePeer(message) == appUsersManager_1.default.getSelf().id) {\r\n return true;\r\n }\r\n if (message.date < utils_1.tsNow(true) - 2 * 86400 ||\r\n !message.pFlags.out) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n applyConversations(dialogsResult) {\r\n appUsersManager_1.default.saveApiUsers(dialogsResult.users);\r\n appChatsManager_1.default.saveApiChats(dialogsResult.chats);\r\n this.saveMessages(dialogsResult.messages);\r\n //console.log('applyConversation', dialogsResult);\r\n var updatedDialogs = {};\r\n var hasUpdated = false;\r\n dialogsResult.dialogs.forEach((dialog) => {\r\n var peerID = appPeersManager_1.default.getPeerID(dialog.peer);\r\n var topMessage = dialog.top_message;\r\n var topPendingMesage = this.pendingTopMsgs[peerID];\r\n if (topPendingMesage) {\r\n if (!topMessage || this.getMessage(topPendingMesage).date > this.getMessage(topMessage).date) {\r\n dialog.top_message = topMessage = topPendingMesage;\r\n }\r\n }\r\n if (topMessage) {\r\n let wasDialogBefore = this.getDialogByPeerID(peerID)[0];\r\n // here need to just replace, not FULL replace dialog! WARNING\r\n if (wasDialogBefore && wasDialogBefore.pFlags && wasDialogBefore.pFlags.pinned) {\r\n if (!dialog.pFlags)\r\n dialog.pFlags = {};\r\n dialog.pFlags.pinned = true;\r\n dialog.pinnedIndex = wasDialogBefore.pinnedIndex;\r\n }\r\n this.saveConversation(dialog);\r\n if (wasDialogBefore) {\r\n this.clearDialogCache(topMessage);\r\n utils_1.$rootScope.$broadcast('dialog_top', dialog);\r\n }\r\n else {\r\n updatedDialogs[peerID] = dialog;\r\n hasUpdated = true;\r\n }\r\n }\r\n else {\r\n var foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog.length) {\r\n this.dialogsStorage.dialogs.splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID });\r\n }\r\n }\r\n if (this.newUpdatesAfterReloadToHandle[peerID] !== undefined) {\r\n for (let i in this.newUpdatesAfterReloadToHandle[peerID]) {\r\n let update = this.newUpdatesAfterReloadToHandle[peerID][i];\r\n this.handleUpdate(update);\r\n }\r\n delete this.newUpdatesAfterReloadToHandle[peerID];\r\n }\r\n });\r\n if (hasUpdated) {\r\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', updatedDialogs);\r\n }\r\n }\r\n clearDialogCache(msgID) {\r\n delete this.messagesForDialogs[msgID];\r\n }\r\n saveConversation(dialog) {\r\n var peerID = appPeersManager_1.default.getPeerID(dialog.peer);\r\n if (!peerID) {\r\n return false;\r\n }\r\n var channelID = appPeersManager_1.default.isChannel(peerID) ? -peerID : 0;\r\n var peerText = appPeersManager_1.default.getPeerSearchText(peerID);\r\n utils_1.SearchIndexManager.indexObject(peerID, peerText, this.dialogsIndex);\r\n //var isMegagroup = AppPeersManager.isMegagroup(channelID);\r\n if (dialog.top_message) {\r\n var mid = appMessagesIDsManager_1.default.getFullMessageID(dialog.top_message, channelID);\r\n var message = this.getMessage(mid);\r\n }\r\n else {\r\n var mid = this.tempID--;\r\n var message = {\r\n _: 'message',\r\n id: mid,\r\n mid: mid,\r\n from_id: appUsersManager_1.default.getSelf().id,\r\n to_id: appPeersManager_1.default.getOutputPeer(peerID),\r\n deleted: true,\r\n flags: 0,\r\n pFlags: { unread: false, out: true },\r\n date: 0,\r\n message: ''\r\n };\r\n this.saveMessages([message]);\r\n }\r\n var offsetDate = message.date;\r\n if (!channelID && peerID < 0) {\r\n var chat = appChatsManager_1.default.getChat(-peerID);\r\n if (chat && chat.migrated_to && chat.pFlags.deactivated) {\r\n var migratedToPeer = appPeersManager_1.default.getPeerID(chat.migrated_to);\r\n this.migratedFromTo[peerID] = migratedToPeer;\r\n this.migratedToFrom[migratedToPeer] = peerID;\r\n return;\r\n }\r\n }\r\n dialog.top_message = mid;\r\n dialog.read_inbox_max_id = appMessagesIDsManager_1.default.getFullMessageID(dialog.read_inbox_max_id, channelID);\r\n dialog.read_outbox_max_id = appMessagesIDsManager_1.default.getFullMessageID(dialog.read_outbox_max_id, channelID);\r\n var topDate = message.date;\r\n if (channelID) {\r\n var channel = appChatsManager_1.default.getChat(channelID);\r\n if (!topDate || channel.date && channel.date > topDate) {\r\n topDate = channel.date;\r\n }\r\n }\r\n var savedDraft = {}; // DraftsManager.saveDraft(peerID, dialog.draft); // warning\r\n if (savedDraft && savedDraft.date > topDate) {\r\n topDate = savedDraft.date;\r\n }\r\n if (dialog.pFlags.pinned) {\r\n topDate = this.generateDialogPinnedDate(dialog);\r\n //console.log('topDate', peerID, topDate);\r\n }\r\n dialog.index = this.generateDialogIndex(topDate);\r\n dialog.peerID = peerID;\r\n if (!dialog.folder_id)\r\n dialog.folder_id = 0;\r\n this.pushDialogToStorage(dialog, offsetDate);\r\n // Because we saved message without dialog present\r\n var unreadKey = message.pFlags.out ? 'read_outbox_max_id' : 'read_inbox_max_id';\r\n if (message.mid > 0) {\r\n if (message.mid > dialog[unreadKey])\r\n message.pFlags.unread = true;\r\n else\r\n message.pFlags.unread = false;\r\n }\r\n if (this.historiesStorage[peerID] === undefined && !message.deleted) {\r\n var historyStorage = { count: null, history: [], pending: [] };\r\n historyStorage[mid > 0 ? 'history' : 'pending'].push(mid);\r\n if (mid < 0 && message.pFlags.unread) {\r\n dialog.unread_count++;\r\n }\r\n this.historiesStorage[peerID] = historyStorage;\r\n if (this.mergeReplyKeyboard(historyStorage, message)) {\r\n utils_1.$rootScope.$broadcast('history_reply_markup', { peerID: peerID });\r\n }\r\n }\r\n //NotificationsManager.savePeerSettings(peerID, dialog.notify_settings); // warning\r\n /* if(dialog.pts || dialog.pFlags.pts) {\r\n console.warn('dialog pts!', dialog, dialog.pts);\r\n } */\r\n if (channelID && dialog.pts) {\r\n apiUpdatesManager_1.default.addChannelState(channelID, dialog.pts);\r\n }\r\n /*if(Config.Modes.packed && !channelID && dialog.unread_count > 0 &&\r\n this.maxSeenID && dialog.top_message > this.maxSeenID &&\r\n message.pFlags.unread && !message.pFlags.out) {\r\n var notifyPeer = message.flags & 16 ? message.from_id : peerID\r\n NotificationsManager.getPeerMuted(notifyPeer).then((muted: any) => {\r\n if(!muted) {\r\n this.notifyAboutMessage(message);\r\n }\r\n });\r\n }*/ // WARNING\r\n }\r\n /*public handleNotifications() {\r\n clearTimeout(this.notificationsHandlePromise);\r\n this.notificationsHandlePromise = 0;\r\n \r\n var timeout = $rootScope.idle.isIDLE /* && StatusManager.isOtherDeviceActive() * ? 30000 : 1000;\r\n Object.keys(this.notificationsToHandle).forEach((key: any) => {\r\n let notifyPeerToHandle = this.notificationsToHandle[key];\r\n notifyPeerToHandle.isMutedPromise.then((muted: boolean) => {\r\n var topMessage = notifyPeerToHandle.top_message\r\n if(muted ||\r\n !topMessage.pFlags.unread) {\r\n return;\r\n }\r\n \r\n setTimeout(() => {\r\n if(topMessage.pFlags.unread) {\r\n this.notifyAboutMessage(topMessage, {\r\n fwd_count: notifyPeerToHandle.fwd_count\r\n });\r\n }\r\n }, timeout);\r\n });\r\n });\r\n \r\n this.notificationsToHandle = {};\r\n }*/\r\n /*public notifyAboutMessage(message: any, options: any = {}) {\r\n var peerID = this.getMessagePeer(message);\r\n var peerString: string;\r\n var notification: any = {};\r\n var notificationMessage = '',\r\n notificationPhoto;\r\n \r\n var notifySettings: any = {}; //NotificationsManager.getNotifySettings(); // warning\r\n \r\n if(message.fwdFromID && options.fwd_count) {\r\n notificationMessage = options.fwd_count;// this.fwdMessagesPluralize(options.fwd_count); // warning\r\n } else if(message.message) {\r\n if(notifySettings.nopreview) {\r\n notificationMessage = 'conversation_message_sent';\r\n } else {\r\n notificationMessage = RichTextProcessor.wrapPlainText(message.message);\r\n }\r\n } else if(message.media) {\r\n var captionEmoji = '';\r\n switch (message.media._) {\r\n case 'messageMediaPhoto':\r\n notificationMessage = _('conversation_media_photo_raw');\r\n captionEmoji = 'рџ–ј';\r\n break\r\n case 'messageMediaDocument':\r\n switch (message.media.document.type) {\r\n case 'gif':\r\n notificationMessage = _('conversation_media_gif_raw');\r\n captionEmoji = 'рџЋ¬'\r\n break\r\n case 'sticker':\r\n notificationMessage = _('conversation_media_sticker');\r\n var stickerEmoji = message.media.document.stickerEmojiRaw;\r\n if(stickerEmoji !== undefined) {\r\n notificationMessage = RichTextProcessor.wrapPlainText(stickerEmoji) + ' ' + notificationMessage;\r\n }\r\n break;\r\n case 'video':\r\n notificationMessage = _('conversation_media_video_raw');\r\n captionEmoji = 'рџ“№';\r\n break;\r\n case 'round':\r\n notificationMessage = _('conversation_media_round_raw');\r\n captionEmoji = 'рџ“№';\r\n break;\r\n case 'voice':\r\n case 'audio':\r\n notificationMessage = _('conversation_media_audio_raw');\r\n break;\r\n default:\r\n if(message.media.document.file_name) {\r\n notificationMessage = RichTextProcessor.wrapPlainText('рџ“Ћ ' + message.media.document.file_name);\r\n } else {\r\n notificationMessage = _('conversation_media_document_raw');\r\n captionEmoji = 'рџ“Ћ';\r\n }\r\n break;\r\n }\r\n break;\r\n \r\n case 'messageMediaGeo':\r\n case 'messageMediaVenue':\r\n notificationMessage = _('conversation_media_location_raw');\r\n captionEmoji = 'рџ“Ќ';\r\n break;\r\n case 'messageMediaContact':\r\n notificationMessage = _('conversation_media_contact_raw');\r\n break;\r\n case 'messageMediaGame':\r\n notificationMessage = RichTextProcessor.wrapPlainText('рџЋ® ' + message.media.game.title);\r\n break;\r\n case 'messageMediaUnsupported':\r\n notificationMessage = _('conversation_media_unsupported_raw');\r\n break;\r\n default:\r\n notificationMessage = _('conversation_media_attachment_raw');\r\n break;\r\n }\r\n \r\n if(captionEmoji != '' &&\r\n message.media.caption) {\r\n notificationMessage = RichTextProcessor.wrapPlainText(captionEmoji + ' ' + message.media.caption);\r\n }\r\n } else if(message._ == 'messageService') {\r\n switch(message.action._) {\r\n case 'messageActionChatCreate':\r\n notificationMessage = _('conversation_group_created_raw');\r\n break\r\n case 'messageActionChatEditTitle':\r\n notificationMessage = _('conversation_group_renamed_raw');\r\n break\r\n case 'messageActionChatEditPhoto':\r\n notificationMessage = _('conversation_group_photo_updated_raw');\r\n break\r\n case 'messageActionChatDeletePhoto':\r\n notificationMessage = _('conversation_group_photo_removed_raw');\r\n break\r\n case 'messageActionChatAddUser':\r\n case 'messageActionChatAddUsers':\r\n notificationMessage = _('conversation_invited_user_message_raw');\r\n break\r\n case 'messageActionChatReturn':\r\n notificationMessage = _('conversation_returned_to_group_raw');\r\n break\r\n case 'messageActionChatJoined':\r\n notificationMessage = _('conversation_joined_group_raw');\r\n break\r\n case 'messageActionChatDeleteUser':\r\n notificationMessage = _('conversation_kicked_user_message_raw');\r\n break\r\n case 'messageActionChatLeave':\r\n notificationMessage = _('conversation_left_group_raw');\r\n break\r\n case 'messageActionChatJoinedByLink':\r\n notificationMessage = _('conversation_joined_by_link_raw');\r\n break\r\n case 'messageActionChannelCreate':\r\n notificationMessage = _('conversation_created_channel_raw');\r\n break\r\n case 'messageActionChannelEditTitle':\r\n notificationMessage = _('conversation_changed_channel_name_raw');\r\n break\r\n case 'messageActionChannelEditPhoto':\r\n notificationMessage = _('conversation_changed_channel_photo_raw')\r\n break\r\n case 'messageActionChannelDeletePhoto':\r\n notificationMessage = _('conversation_removed_channel_photo_raw')\r\n break\r\n case 'messageActionPinMessage':\r\n notificationMessage = _('conversation_pinned_message_raw')\r\n break\r\n case 'messageActionGameScore':\r\n notificationMessage = message.action.score;//this.gameScorePluralize(message.action.score); // warning\r\n break\r\n \r\n case 'messageActionPhoneCall':\r\n switch(message.action.type) {\r\n case 'out_missed':\r\n notificationMessage = _('message_service_phonecall_canceled_raw')\r\n break\r\n case 'in_missed':\r\n notificationMessage = _('message_service_phonecall_missed_raw')\r\n break\r\n case 'out_ok':\r\n notificationMessage = _('message_service_phonecall_outgoing_raw')\r\n break\r\n case 'in_ok':\r\n notificationMessage = _('message_service_phonecall_incoming_raw')\r\n break\r\n }\r\n break\r\n }\r\n }\r\n \r\n if(peerID > 0) {\r\n var fromUser = appUsersManager.getUser(message.from_id);\r\n var fromPhoto = appUsersManager.getUserPhoto(message.from_id);\r\n \r\n notification.title = (fromUser.first_name || '') +\r\n (fromUser.first_name && fromUser.last_name ? ' ' : '') +\r\n (fromUser.last_name || '')\r\n if(!notification.title) {\r\n notification.title = fromUser.phone || _('conversation_unknown_user_raw')\r\n }\r\n \r\n notificationPhoto = fromPhoto\r\n \r\n peerString = appUsersManager.getUserString(peerID)\r\n } else {\r\n notification.title = appChatsManager.getChat(-peerID).title || _('conversation_unknown_chat_raw')\r\n \r\n if(message.from_id > 0) {\r\n var fromUser = appUsersManager.getUser(message.from_id)\r\n notification.title = (fromUser.first_name || fromUser.last_name || _('conversation_unknown_user_raw')) +\r\n ' @ ' +\r\n notification.title\r\n }\r\n \r\n notificationPhoto = appChatsManager.getChatPhoto(-peerID)\r\n \r\n peerString = appChatsManager.getChatString(-peerID)\r\n }\r\n \r\n notification.title = RichTextProcessor.wrapPlainText(notification.title)\r\n \r\n notification.onclick = function () {\r\n $rootScope.$broadcast('history_focus', {\r\n peerString: peerString,\r\n messageID: message.flags & 16 ? message.mid : 0\r\n })\r\n }\r\n \r\n notification.message = notificationMessage\r\n notification.key = 'msg' + message.mid\r\n notification.tag = peerString\r\n notification.silent = message.pFlags.silent || false\r\n \r\n if(notificationPhoto.location && !notificationPhoto.location.empty) {\r\n apiFileManager.downloadSmallFile(notificationPhoto.location/* , notificationPhoto.size *)\r\n .then((blob) => {\r\n if(message.pFlags.unread) {\r\n notification.image = blob\r\n // NotificationsManager.notify(notification) // warning\r\n }\r\n })\r\n } else {\r\n // NotificationsManager.notify(notification) // warning\r\n }\r\n }*/\r\n mergeReplyKeyboard(historyStorage, message) {\r\n // console.log('merge', message.mid, message.reply_markup, historyStorage.reply_markup)\r\n if (!message.reply_markup &&\r\n !message.pFlags.out &&\r\n !message.action) {\r\n return false;\r\n }\r\n if (message.reply_markup &&\r\n message.reply_markup._ == 'replyInlineMarkup') {\r\n return false;\r\n }\r\n var messageReplyMarkup = message.reply_markup;\r\n var lastReplyMarkup = historyStorage.reply_markup;\r\n if (messageReplyMarkup) {\r\n if (lastReplyMarkup && lastReplyMarkup.mid >= message.mid) {\r\n return false;\r\n }\r\n if (messageReplyMarkup.pFlags.selective &&\r\n !(message.flags & 16)) {\r\n return false;\r\n }\r\n if (historyStorage.maxOutID &&\r\n message.mid < historyStorage.maxOutID &&\r\n messageReplyMarkup.pFlags.single_use) {\r\n messageReplyMarkup.pFlags.hidden = true;\r\n }\r\n messageReplyMarkup = Object.assign({\r\n mid: message.mid\r\n }, messageReplyMarkup);\r\n if (messageReplyMarkup._ != 'replyKeyboardHide') {\r\n messageReplyMarkup.fromID = message.from_id;\r\n }\r\n historyStorage.reply_markup = messageReplyMarkup;\r\n // console.log('set', historyStorage.reply_markup)\r\n return true;\r\n }\r\n if (message.pFlags.out) {\r\n if (lastReplyMarkup) {\r\n if (lastReplyMarkup.pFlags.single_use &&\r\n !lastReplyMarkup.pFlags.hidden &&\r\n (message.mid > lastReplyMarkup.mid || message.mid < 0) &&\r\n message.message) {\r\n lastReplyMarkup.pFlags.hidden = true;\r\n // console.log('set', historyStorage.reply_markup)\r\n return true;\r\n }\r\n }\r\n else if (!historyStorage.maxOutID ||\r\n message.mid > historyStorage.maxOutID) {\r\n historyStorage.maxOutID = message.mid;\r\n }\r\n }\r\n if (message.action &&\r\n message.action._ == 'messageActionChatDeleteUser' &&\r\n (lastReplyMarkup\r\n ? message.action.user_id == lastReplyMarkup.fromID\r\n : appUsersManager_1.default.isBot(message.action.user_id))) {\r\n historyStorage.reply_markup = {\r\n _: 'replyKeyboardHide',\r\n mid: message.mid,\r\n flags: 0,\r\n pFlags: {}\r\n };\r\n // console.log('set', historyStorage.reply_markup)\r\n return true;\r\n }\r\n return false;\r\n }\r\n getSearch(peerID = 0, query = '', inputFilter = { _: 'inputMessagesFilterEmpty' }, maxID, limit, offsetRate = 0, backLimit = 0) {\r\n //peerID = peerID ? parseInt(peerID) : 0;\r\n var foundMsgs = [];\r\n var useSearchCache = !query;\r\n var newSearchFilter = { peer: peerID, filter: inputFilter };\r\n var sameSearchCache = useSearchCache\r\n && utils_1.deepEqual(this.lastSearchFilter, newSearchFilter); //angular.equals(this.lastSearchFilter, newSearchFilter);\r\n if (useSearchCache && !sameSearchCache) {\r\n // console.warn(dT(), 'new search filter', lastSearchFilter, newSearchFilter)\r\n this.lastSearchFilter = newSearchFilter;\r\n this.lastSearchResults = [];\r\n }\r\n //console.log(dT(), 'search', useSearchCache, sameSearchCache, this.lastSearchResults, maxID);\r\n if (peerID && !maxID && !query) {\r\n var historyStorage = this.historiesStorage[peerID];\r\n if (historyStorage !== undefined && historyStorage.history.length) {\r\n var neededContents = {}, neededDocType;\r\n var neededLimit = limit || 20;\r\n var message;\r\n switch (inputFilter._) {\r\n case 'inputMessagesFilterPhotos':\r\n neededContents['messageMediaPhoto'] = true;\r\n break;\r\n case 'inputMessagesFilterPhotoVideo':\r\n neededContents['messageMediaPhoto'] = true;\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocType = 'video';\r\n break;\r\n case 'inputMessagesFilterVideo':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocType = 'video';\r\n break;\r\n case 'inputMessagesFilterDocument':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocType = false;\r\n break;\r\n case 'inputMessagesFilterVoice':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocType = 'voice';\r\n break;\r\n case 'inputMessagesFilterRoundVideo':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocType = 'round';\r\n break;\r\n case 'inputMessagesFilterMusic':\r\n neededContents['messageMediaDocument'] = true;\r\n neededDocType = 'audio';\r\n break;\r\n case 'inputMessagesFilterUrl':\r\n neededContents['url'] = true;\r\n break;\r\n case 'inputMessagesFilterMyMentions':\r\n neededContents['mentioned'] = true;\r\n break;\r\n default:\r\n return Promise.resolve({\r\n count: 0,\r\n next_rate: 0,\r\n history: []\r\n });\r\n }\r\n for (let i = 0; i < historyStorage.history.length; i++) {\r\n message = this.messagesStorage[historyStorage.history[i]];\r\n if (message.media && neededContents[message.media._]) {\r\n if (neededDocType !== undefined &&\r\n message.media._ == 'messageMediaDocument' &&\r\n message.media.document.type != neededDocType) {\r\n continue;\r\n }\r\n foundMsgs.push(message.mid);\r\n if (foundMsgs.length >= neededLimit) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n // console.warn(dT(), 'before append', foundMsgs)\r\n if (foundMsgs.length < neededLimit && this.lastSearchResults.length && sameSearchCache) {\r\n var minID = foundMsgs.length ? foundMsgs[foundMsgs.length - 1] : false;\r\n for (let i = 0; i < this.lastSearchResults.length; i++) {\r\n if (minID === false || this.lastSearchResults[i] < minID) {\r\n foundMsgs.push(this.lastSearchResults[i]);\r\n if (foundMsgs.length >= neededLimit) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n // console.warn(dT(), 'after append', foundMsgs)\r\n }\r\n if (foundMsgs.length || limit == 1000) {\r\n if (useSearchCache) {\r\n this.lastSearchResults = utils_1.listMergeSorted(this.lastSearchResults, foundMsgs);\r\n }\r\n return Promise.resolve({\r\n count: 0,\r\n next_rate: 0,\r\n history: foundMsgs\r\n });\r\n }\r\n var apiPromise;\r\n if (peerID || !query) {\r\n apiPromise = mtprotoworker_1.default.invokeApi('messages.search', {\r\n flags: 0,\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n q: query || '',\r\n filter: inputFilter || { _: 'inputMessagesFilterEmpty' },\r\n min_date: 0,\r\n max_date: 0,\r\n limit: limit,\r\n offset_id: appMessagesIDsManager_1.default.getMessageLocalID(maxID) || 0,\r\n add_offset: backLimit ? -backLimit : 0,\r\n max_id: 0,\r\n min_id: 0\r\n }, {\r\n timeout: 300,\r\n noErrorBox: true\r\n });\r\n }\r\n else {\r\n var offsetDate = 0;\r\n var offsetPeerID = 0;\r\n var offsetID = 0;\r\n var offsetMessage = maxID && this.getMessage(maxID);\r\n if (offsetMessage && offsetMessage.date) {\r\n offsetDate = offsetMessage.date + serverTimeManager_1.default.serverTimeOffset;\r\n offsetID = offsetMessage.id;\r\n offsetPeerID = this.getMessagePeer(offsetMessage);\r\n }\r\n apiPromise = mtprotoworker_1.default.invokeApi('messages.searchGlobal', {\r\n q: query,\r\n offset_rate: offsetRate,\r\n offset_peer: appPeersManager_1.default.getInputPeerByID(offsetPeerID),\r\n offset_id: appMessagesIDsManager_1.default.getMessageLocalID(offsetID),\r\n limit: limit || 20\r\n }, {\r\n timeout: 300,\r\n noErrorBox: true\r\n });\r\n }\r\n return apiPromise.then((searchResult) => {\r\n appUsersManager_1.default.saveApiUsers(searchResult.users);\r\n appChatsManager_1.default.saveApiChats(searchResult.chats);\r\n this.saveMessages(searchResult.messages);\r\n ///////////console.log('messages.search result:', searchResult);\r\n var foundCount = searchResult.count || searchResult.messages.length;\r\n foundMsgs = [];\r\n searchResult.messages.forEach((message) => {\r\n var peerID = this.getMessagePeer(message);\r\n if (peerID < 0) {\r\n var chat = appChatsManager_1.default.getChat(-peerID);\r\n if (chat.migrated_to) {\r\n this.migrateChecks(peerID, -chat.migrated_to.channel_id);\r\n }\r\n }\r\n foundMsgs.push(message.mid);\r\n });\r\n if (useSearchCache &&\r\n (!maxID || sameSearchCache && this.lastSearchResults.indexOf(maxID) >= 0)) {\r\n this.lastSearchResults = utils_1.listMergeSorted(this.lastSearchResults, foundMsgs);\r\n }\r\n // console.log(dT(), 'after API', foundMsgs, lastSearchResults)\r\n return {\r\n count: foundCount,\r\n next_rate: searchResult.next_rate,\r\n history: foundMsgs\r\n };\r\n }, (error) => {\r\n if (error.code == 400) {\r\n error.handled = true;\r\n }\r\n return Promise.reject(error);\r\n });\r\n }\r\n generateDialogPinnedDate(dialog) {\r\n let pinnedIndex;\r\n if (dialog) {\r\n if (dialog.pinnedIndex) {\r\n pinnedIndex = dialog.pinnedIndex;\r\n }\r\n else {\r\n dialog.pinnedIndex = pinnedIndex = this.pinnedIndex++;\r\n }\r\n }\r\n else {\r\n pinnedIndex = this.pinnedIndex++;\r\n }\r\n return 0x7fffff00 + (pinnedIndex & 0xff);\r\n }\r\n handleNewMessages() {\r\n clearTimeout(this.newMessagesHandlePromise);\r\n this.newMessagesHandlePromise = 0;\r\n utils_1.$rootScope.$broadcast('history_multiappend', this.newMessagesToHandle);\r\n this.newMessagesToHandle = {};\r\n }\r\n handleNewDialogs() {\r\n clearTimeout(this.newDialogsHandlePromise);\r\n this.newDialogsHandlePromise = 0;\r\n var newMaxSeenID = 0;\r\n Object.keys(this.newDialogsToHandle).forEach((peerID) => {\r\n let dialog = this.newDialogsToHandle[peerID];\r\n if (dialog.reload) {\r\n this.reloadConversation(+peerID);\r\n delete this.newDialogsToHandle[peerID];\r\n }\r\n else {\r\n this.pushDialogToStorage(dialog);\r\n if (!appPeersManager_1.default.isChannel(+peerID)) {\r\n newMaxSeenID = Math.max(newMaxSeenID, dialog.top_message || 0);\r\n }\r\n }\r\n });\r\n if (newMaxSeenID != 0) {\r\n this.incrementMaxSeenID(newMaxSeenID);\r\n }\r\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', this.newDialogsToHandle);\r\n this.newDialogsToHandle = {};\r\n }\r\n readHistory(peerID, maxID = 0, minID = 0) {\r\n // console.trace('start read')\r\n var isChannel = appPeersManager_1.default.isChannel(peerID);\r\n var historyStorage = this.historiesStorage[peerID];\r\n var foundDialog = this.getDialogByPeerID(peerID)[0];\r\n if (!foundDialog || !foundDialog.unread_count) {\r\n if (!historyStorage || !historyStorage.history.length) {\r\n return Promise.resolve(false);\r\n }\r\n let messageID, message;\r\n let foundUnread = false;\r\n for (let i = historyStorage.history.length; i >= 0; i--) {\r\n messageID = historyStorage.history[i];\r\n message = this.messagesStorage[messageID];\r\n if (message && !message.pFlags.out && message.pFlags.unread) {\r\n foundUnread = true;\r\n break;\r\n }\r\n }\r\n if (!foundUnread) {\r\n return Promise.resolve(false);\r\n }\r\n }\r\n if (historyStorage.readPromise) {\r\n return historyStorage.readPromise;\r\n }\r\n var apiPromise;\r\n if (isChannel) {\r\n apiPromise = mtprotoworker_1.default.invokeApi('channels.readHistory', {\r\n channel: appChatsManager_1.default.getChannelInput(-peerID),\r\n max_id: maxID\r\n });\r\n }\r\n else {\r\n apiPromise = mtprotoworker_1.default.invokeApi('messages.readHistory', {\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n max_id: maxID\r\n }).then((affectedMessages) => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updatePts',\r\n pts: affectedMessages.pts,\r\n pts_count: affectedMessages.pts_count\r\n }\r\n });\r\n });\r\n }\r\n historyStorage.readPromise = apiPromise.then(() => {\r\n if (foundDialog) {\r\n // console.log('done read history', peerID)\r\n let index = -1;\r\n if (maxID != 0 && historyStorage && historyStorage.history.length) {\r\n index = historyStorage.history.findIndex((mid) => mid == maxID);\r\n }\r\n foundDialog.unread_count = index == -1 ? 0 : index;\r\n ////////console.log('readHistory set unread_count to:', foundDialog.unread_count, foundDialog);\r\n utils_1.$rootScope.$broadcast('dialog_unread', { peerID: peerID, count: foundDialog.unread_count });\r\n utils_1.$rootScope.$broadcast('messages_read');\r\n if (historyStorage && historyStorage.history.length) {\r\n ////////console.warn('readPromise:', index, historyStorage.history[index != -1 ? index : 0]);\r\n foundDialog.read_inbox_max_id = historyStorage.history[index != -1 ? index : 0];\r\n }\r\n return true;\r\n }\r\n return false;\r\n /* if(foundDialog) {\r\n // console.log('done read history', peerID)\r\n foundDialog.unread_count = 0\r\n $rootScope.$broadcast('dialog_unread', {peerID: peerID, count: 0})\r\n $rootScope.$broadcast('messages_read')\r\n if(historyStorage && historyStorage.history.length) {\r\n foundDialog.read_inbox_max_id = historyStorage.history[0]\r\n }\r\n } */\r\n }).finally(() => {\r\n delete historyStorage.readPromise;\r\n });\r\n if (historyStorage && historyStorage.history.length) {\r\n let messageID;\r\n let message, i;\r\n for (i = 0; i < historyStorage.history.length; i++) {\r\n messageID = historyStorage.history[i];\r\n message = this.messagesStorage[messageID];\r\n if (message && !message.pFlags.out) {\r\n message.pFlags.unread = false;\r\n if (this.messagesForDialogs[messageID]) {\r\n this.messagesForDialogs[messageID].pFlags.unread = false;\r\n }\r\n //NotificationsManager.cancel('msg' + messageID); // warning\r\n }\r\n if (messageID == minID)\r\n break;\r\n }\r\n }\r\n // NotificationsManager.soundReset(AppPeersManager.getPeerString(peerID)) // warning\r\n return historyStorage.readPromise;\r\n }\r\n readMessages(messageIDs) {\r\n var splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(messageIDs);\r\n Object.keys(splitted.msgIDs).forEach((channelID) => {\r\n channelID = +channelID;\r\n let msgIDs = splitted.msgIDs[channelID];\r\n if (channelID > 0) {\r\n mtprotoworker_1.default.invokeApi('channels.readMessageContents', {\r\n channel: appChatsManager_1.default.getChannelInput(channelID),\r\n id: msgIDs\r\n }).then(() => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateChannelReadMessagesContents',\r\n channel_id: channelID,\r\n messages: msgIDs\r\n }\r\n });\r\n });\r\n }\r\n else {\r\n mtprotoworker_1.default.invokeApi('messages.readMessageContents', {\r\n id: msgIDs\r\n }).then((affectedMessages) => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateReadMessagesContents',\r\n messages: msgIDs,\r\n pts: affectedMessages.pts,\r\n pts_count: affectedMessages.pts_count\r\n }\r\n });\r\n });\r\n }\r\n });\r\n }\r\n handleUpdate(update) {\r\n console.log('AMM: handleUpdate:', update._);\r\n switch (update._) {\r\n case 'updateMessageID': {\r\n var randomID = update.random_id;\r\n var pendingData = this.pendingByRandomID[randomID];\r\n if (pendingData) {\r\n var peerID = pendingData[0];\r\n var tempID = pendingData[1];\r\n var channelID = appPeersManager_1.default.isChannel(peerID) ? -peerID : 0;\r\n var mid = appMessagesIDsManager_1.default.getFullMessageID(update.id, channelID);\r\n var message = this.messagesStorage[mid];\r\n if (message) {\r\n var historyStorage = this.historiesStorage[peerID];\r\n var pos = historyStorage.pending.indexOf(tempID);\r\n if (pos != -1) {\r\n historyStorage.pending.splice(pos, 1);\r\n }\r\n delete this.messagesStorage[tempID];\r\n this.finalizePendingMessageCallbacks(tempID, mid);\r\n }\r\n else {\r\n this.pendingByMessageID[mid] = randomID;\r\n }\r\n }\r\n break;\r\n }\r\n case 'updateNewMessage':\r\n case 'updateNewChannelMessage': {\r\n var message = update.message;\r\n var peerID = this.getMessagePeer(message);\r\n var historyStorage = this.historiesStorage[peerID];\r\n var foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n if (this.newUpdatesAfterReloadToHandle[peerID] === undefined) {\r\n this.newUpdatesAfterReloadToHandle[peerID] = [];\r\n }\r\n this.newUpdatesAfterReloadToHandle[peerID].push(update);\r\n break;\r\n }\r\n if (update._ == 'updateNewChannelMessage') {\r\n var chat = appChatsManager_1.default.getChat(-peerID);\r\n if (chat.pFlags && (chat.pFlags.left || chat.pFlags.kicked)) {\r\n break;\r\n }\r\n }\r\n this.saveMessages([message], { isNew: true });\r\n // console.warn(dT(), 'message unread', message.mid, message.pFlags.unread)\r\n if (historyStorage === undefined) {\r\n historyStorage = this.historiesStorage[peerID] = {\r\n count: null,\r\n history: [],\r\n pending: []\r\n };\r\n }\r\n var history = message.mid > 0 ? historyStorage.history : historyStorage.pending;\r\n if (history.indexOf(message.mid) != -1) {\r\n return false;\r\n }\r\n var topMsgID = history[0];\r\n history.unshift(message.mid);\r\n if (message.mid > 0 && message.mid < topMsgID) {\r\n history.sort((a, b) => {\r\n return b - a;\r\n });\r\n }\r\n if (message.mid > 0 &&\r\n historyStorage.count !== null) {\r\n historyStorage.count++;\r\n }\r\n if (this.mergeReplyKeyboard(historyStorage, message)) {\r\n utils_1.$rootScope.$broadcast('history_reply_markup', { peerID: peerID });\r\n }\r\n if (!message.pFlags.out && message.from_id) {\r\n appUsersManager_1.default.forceUserOnline(message.from_id);\r\n }\r\n var randomID = this.pendingByMessageID[message.mid], pendingMessage;\r\n if (randomID) {\r\n if (pendingMessage = this.finalizePendingMessage(randomID, message)) {\r\n utils_1.$rootScope.$broadcast('history_update', { peerID: peerID, mid: message.mid });\r\n }\r\n delete this.pendingByMessageID[message.mid];\r\n }\r\n if (!pendingMessage) {\r\n if (this.newMessagesToHandle[peerID] === undefined) {\r\n this.newMessagesToHandle[peerID] = [];\r\n }\r\n this.newMessagesToHandle[peerID].push(message.mid);\r\n if (!this.newMessagesHandlePromise) {\r\n this.newMessagesHandlePromise = window.setTimeout(this.handleNewMessages.bind(this), 0);\r\n }\r\n }\r\n var inboxUnread = !message.pFlags.out && message.pFlags.unread;\r\n var dialog = foundDialog[0];\r\n dialog.top_message = message.mid;\r\n if (inboxUnread) {\r\n dialog.unread_count++;\r\n }\r\n if (!dialog.pFlags.pinned || !dialog.index) {\r\n dialog.index = this.generateDialogIndex(message.date);\r\n }\r\n this.newDialogsToHandle[peerID] = dialog;\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n /*if(inboxUnread &&\r\n ($rootScope.selectedPeerID != peerID || $rootScope.idle.isIDLE)) {\r\n var notifyPeer = message.flags & 16 ? message.from_id : peerID;\r\n var notifyPeerToHandle = this.notificationsToHandle[notifyPeer];\r\n if(notifyPeerToHandle === undefined) {\r\n notifyPeerToHandle = this.notificationsToHandle[notifyPeer] = {\r\n isMutedPromise: Promise.resolve()/* NotificationsManager.getPeerMuted(notifyPeer), // WARNING\r\n fwd_count: 0,\r\n from_id: 0\r\n };\r\n }\r\n \r\n if(notifyPeerToHandle.from_id != message.from_id) {\r\n notifyPeerToHandle.from_id = message.from_id;\r\n notifyPeerToHandle.fwd_count = 0;\r\n }\r\n if(message.fwdFromID) {\r\n notifyPeerToHandle.fwd_count++;\r\n }\r\n \r\n notifyPeerToHandle.top_message = message;\r\n \r\n if(!this.notificationsHandlePromise) {\r\n this.notificationsHandlePromise = window.setTimeout(this.handleNotifications.bind(this), 1000);\r\n }\r\n } */\r\n break;\r\n }\r\n case 'updateDialogPinned': {\r\n var peerID = appPeersManager_1.default.getPeerID(update.peer);\r\n var foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length || !update.pFlags.pinned) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n break;\r\n }\r\n var dialog = foundDialog[0];\r\n dialog.index = this.generateDialogIndex(this.generateDialogPinnedDate(dialog));\r\n dialog.pFlags.pinned = true;\r\n break;\r\n }\r\n case 'updatePinnedDialogs': {\r\n var newPinned = {};\r\n if (!update.order) {\r\n mtprotoworker_1.default.invokeApi('messages.getPinnedDialogs', {}).then((dialogsResult) => {\r\n dialogsResult.dialogs.reverse();\r\n this.applyConversations(dialogsResult);\r\n dialogsResult.dialogs.forEach((dialog) => {\r\n newPinned[dialog.peerID] = true;\r\n });\r\n this.dialogsStorage.dialogs.forEach((dialog) => {\r\n var peerID = dialog.peerID;\r\n if (dialog.pFlags.pinned && !newPinned[peerID]) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n }\r\n });\r\n });\r\n break;\r\n }\r\n update.order.reverse();\r\n update.order.forEach((peer) => {\r\n var peerID = appPeersManager_1.default.getPeerID(peer);\r\n newPinned[peerID] = true;\r\n var foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n return;\r\n }\r\n var dialog = foundDialog[0];\r\n dialog.index = this.generateDialogIndex(this.generateDialogPinnedDate(dialog));\r\n dialog.pFlags.pinned = true;\r\n this.newDialogsToHandle[peerID] = dialog;\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n });\r\n this.dialogsStorage.dialogs.forEach((dialog) => {\r\n var peerID = dialog.peerID;\r\n if (dialog.pFlags.pinned && !newPinned[peerID]) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n }\r\n });\r\n break;\r\n }\r\n case 'updateEditMessage':\r\n case 'updateEditChannelMessage': {\r\n var message = update.message;\r\n var peerID = this.getMessagePeer(message);\r\n var channelID = message.to_id._ == 'peerChannel' ? -peerID : 0;\r\n var mid = appMessagesIDsManager_1.default.getFullMessageID(message.id, channelID);\r\n if (this.messagesStorage[mid] === undefined) {\r\n break;\r\n }\r\n // console.trace(dT(), 'edit message', message)\r\n this.saveMessages([message], { isEdited: true });\r\n utils_1.safeReplaceObject(this.messagesStorage[mid], message);\r\n var dialog = this.getDialogByPeerID(peerID)[0];\r\n var isTopMessage = dialog && dialog.top_message == mid;\r\n if (message.clear_history) { // that's will never happen\r\n if (isTopMessage) {\r\n utils_1.$rootScope.$broadcast('dialog_flush', { peerID: peerID });\r\n }\r\n }\r\n else {\r\n utils_1.$rootScope.$broadcast('message_edit', {\r\n peerID: peerID,\r\n id: message.id,\r\n mid: mid,\r\n justMedia: false\r\n });\r\n if (isTopMessage) {\r\n var updatedDialogs = {};\r\n updatedDialogs[peerID] = dialog;\r\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', updatedDialogs);\r\n }\r\n }\r\n break;\r\n }\r\n case 'updateReadHistoryInbox':\r\n case 'updateReadHistoryOutbox':\r\n case 'updateReadChannelInbox':\r\n case 'updateReadChannelOutbox': {\r\n var isOut = update._ == 'updateReadHistoryOutbox' || update._ == 'updateReadChannelOutbox';\r\n var channelID = update.channel_id;\r\n var maxID = appMessagesIDsManager_1.default.getFullMessageID(update.max_id, channelID);\r\n var peerID = channelID ? -channelID : appPeersManager_1.default.getPeerID(update.peer);\r\n var foundDialog = this.getDialogByPeerID(peerID);\r\n var history = (this.historiesStorage[peerID] || {}).history || [];\r\n var newUnreadCount = 0;\r\n var length = history.length;\r\n var foundAffected = false;\r\n var messageID, message;\r\n var i;\r\n //console.warn(dT(), 'read', peerID, isOut ? 'out' : 'in', maxID)\r\n if (peerID > 0 && isOut) {\r\n appUsersManager_1.default.forceUserOnline(peerID);\r\n }\r\n for (i = 0; i < length; i++) {\r\n messageID = history[i];\r\n if (messageID > maxID) {\r\n continue;\r\n }\r\n message = this.messagesStorage[messageID];\r\n if (message.pFlags.out != isOut) {\r\n continue;\r\n }\r\n if (!message.pFlags.unread) {\r\n break;\r\n }\r\n // console.warn('read', messageID, message.pFlags.unread, message)\r\n if (message && message.pFlags.unread) {\r\n message.pFlags.unread = false;\r\n if (!foundAffected) {\r\n foundAffected = true;\r\n }\r\n if (this.messagesForDialogs[messageID]) {\r\n this.messagesForDialogs[messageID].pFlags.unread = false;\r\n }\r\n if (!message.pFlags.out) {\r\n if (foundDialog[0]) {\r\n newUnreadCount = --foundDialog[0].unread_count;\r\n }\r\n //NotificationsManager.cancel('msg' + messageID); // warning\r\n }\r\n }\r\n }\r\n if (foundDialog[0]) {\r\n if (!isOut && newUnreadCount && foundDialog[0].top_message <= maxID) {\r\n newUnreadCount = foundDialog[0].unread_count = 0;\r\n }\r\n let dialogKey = isOut ? 'read_outbox_max_id' : 'read_inbox_max_id';\r\n foundDialog[0][dialogKey] = maxID;\r\n }\r\n // need be commented for read out messages\r\n //if(newUnreadCount != 0 || !isOut) { // fix 16.11.2019 (maybe not)\r\n //////////console.warn(dT(), 'cnt', peerID, newUnreadCount, isOut, foundDialog, update, foundAffected);\r\n utils_1.$rootScope.$broadcast('dialog_unread', { peerID: peerID, count: newUnreadCount });\r\n //}\r\n if (foundAffected) {\r\n utils_1.$rootScope.$broadcast('messages_read');\r\n }\r\n break;\r\n }\r\n case 'updateChannelReadMessagesContents': {\r\n var channelID = update.channel_id;\r\n var newMessages = [];\r\n update.messages.forEach((msgID) => {\r\n newMessages.push(appMessagesIDsManager_1.default.getFullMessageID(msgID, channelID));\r\n });\r\n update.messages = newMessages;\r\n }\r\n case 'updateReadMessagesContents': {\r\n var messages = update.messages;\r\n var len = messages.length;\r\n var i;\r\n var messageID, message;\r\n for (i = 0; i < len; i++) {\r\n messageID = messages[i];\r\n if (message = this.messagesStorage[messageID]) {\r\n delete message.pFlags.media_unread;\r\n }\r\n }\r\n break;\r\n }\r\n case 'updateChannelAvailableMessages': {\r\n var channelID = update.channel_id;\r\n var messages = [];\r\n var peerID = -channelID;\r\n var history = (this.historiesStorage[peerID] || {}).history || [];\r\n if (history.length) {\r\n history.forEach((msgID) => {\r\n if (!update.available_min_id ||\r\n appMessagesIDsManager_1.default.getMessageLocalID(msgID) <= update.available_min_id) {\r\n messages.push(msgID);\r\n }\r\n });\r\n }\r\n update.messages = messages;\r\n }\r\n case 'updateDeleteMessages':\r\n case 'updateDeleteChannelMessages': {\r\n var historiesUpdated = {};\r\n var channelID = update.channel_id;\r\n var messageID;\r\n var message, i;\r\n var peerID, foundDialog;\r\n let history;\r\n var peerMessagesToHandle;\r\n var peerMessagesHandlePos;\r\n for (i = 0; i < update.messages.length; i++) {\r\n messageID = appMessagesIDsManager_1.default.getFullMessageID(update.messages[i], channelID);\r\n message = this.messagesStorage[messageID];\r\n if (message) {\r\n peerID = this.getMessagePeer(message);\r\n history = historiesUpdated[peerID] || (historiesUpdated[peerID] = { count: 0, unread: 0, msgs: {} });\r\n if (!message.pFlags.out && message.pFlags.unread) {\r\n history.unread++;\r\n // NotificationsManager.cancel('msg' + messageID); // warning\r\n }\r\n history.count++;\r\n history.msgs[messageID] = true;\r\n if (this.messagesForDialogs[messageID]) {\r\n this.messagesForDialogs[messageID].deleted = true;\r\n delete this.messagesForDialogs[messageID];\r\n }\r\n message.deleted = true;\r\n this.messagesStorage[messageID] = {\r\n deleted: true,\r\n id: messageID,\r\n from_id: message.from_id,\r\n to_id: message.to_id,\r\n flags: message.flags,\r\n pFlags: message.pFlags,\r\n date: message.date\r\n };\r\n peerMessagesToHandle = this.newMessagesToHandle[peerID];\r\n if (peerMessagesToHandle && peerMessagesToHandle.length) {\r\n peerMessagesHandlePos = peerMessagesToHandle.indexOf(messageID);\r\n if (peerMessagesHandlePos != -1) {\r\n peerMessagesToHandle.splice(peerMessagesHandlePos);\r\n }\r\n }\r\n }\r\n }\r\n Object.keys(historiesUpdated).forEach((peerID) => {\r\n let updatedData = historiesUpdated[peerID];\r\n var historyStorage = this.historiesStorage[peerID];\r\n if (historyStorage !== undefined) {\r\n var newHistory = [];\r\n var newPending = [];\r\n for (var i = 0; i < historyStorage.history.length; i++) {\r\n if (!updatedData.msgs[historyStorage.history[i]]) {\r\n newHistory.push(historyStorage.history[i]);\r\n }\r\n }\r\n historyStorage.history = newHistory;\r\n if (updatedData.count &&\r\n historyStorage.count !== null &&\r\n historyStorage.count > 0) {\r\n historyStorage.count -= updatedData.count;\r\n if (historyStorage.count < 0) {\r\n historyStorage.count = 0;\r\n }\r\n }\r\n for (var i = 0; i < historyStorage.pending.length; i++) {\r\n if (!updatedData.msgs[historyStorage.pending[i]]) {\r\n newPending.push(historyStorage.pending[i]);\r\n }\r\n }\r\n historyStorage.pending = newPending;\r\n utils_1.$rootScope.$broadcast('history_delete', { peerID: peerID, msgs: updatedData.msgs });\r\n }\r\n var foundDialog = this.getDialogByPeerID(+peerID)[0];\r\n if (foundDialog) {\r\n if (updatedData.unread) {\r\n foundDialog.unread_count -= updatedData.unread;\r\n utils_1.$rootScope.$broadcast('dialog_unread', {\r\n peerID: peerID,\r\n count: foundDialog.unread_count\r\n });\r\n }\r\n if (updatedData.msgs[foundDialog.top_message]) {\r\n this.reloadConversation(+peerID);\r\n }\r\n }\r\n });\r\n break;\r\n }\r\n case 'updateChannel': {\r\n var channelID = update.channel_id;\r\n var peerID = -channelID;\r\n var channel = appChatsManager_1.default.getChat(channelID);\r\n var needDialog = channel._ == 'channel' && (!channel.pFlags.left && !channel.pFlags.kicked);\r\n var foundDialog = this.getDialogByPeerID(peerID);\r\n var hasDialog = foundDialog.length > 0;\r\n var canViewHistory = channel._ == 'channel' && (channel.username || !channel.pFlags.left && !channel.pFlags.kicked) && true || false;\r\n var hasHistory = this.historiesStorage[peerID] !== undefined;\r\n if (canViewHistory != hasHistory) {\r\n delete this.historiesStorage[peerID];\r\n utils_1.$rootScope.$broadcast('history_forbidden', peerID);\r\n }\r\n if (hasDialog != needDialog) {\r\n if (needDialog) {\r\n this.reloadConversation(-channelID);\r\n }\r\n else {\r\n if (foundDialog[0]) {\r\n this.dialogsStorage.dialogs.splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID });\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n case 'updateChannelReload': {\r\n var channelID = update.channel_id;\r\n var peerID = -channelID;\r\n var foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog[0]) {\r\n this.dialogsStorage.dialogs.splice(foundDialog[1], 1);\r\n }\r\n delete this.historiesStorage[peerID];\r\n this.reloadConversation(-channelID).then(() => {\r\n utils_1.$rootScope.$broadcast('history_reload', peerID);\r\n });\r\n break;\r\n }\r\n case 'updateChannelMessageViews': {\r\n var views = update.views;\r\n var mid = appMessagesIDsManager_1.default.getFullMessageID(update.id, update.channel_id);\r\n var message = this.getMessage(mid);\r\n if (message && message.views && message.views < views) {\r\n message.views = views;\r\n utils_1.$rootScope.$broadcast('message_views', {\r\n mid: mid,\r\n views: views\r\n });\r\n }\r\n break;\r\n }\r\n case 'updateServiceNotification': {\r\n // update.inbox_date = tsNow(true)\r\n // update.pFlags = {popup: true}\r\n var fromID = 777000;\r\n var peerID = fromID;\r\n var messageID = this.tempID--;\r\n var message = {\r\n _: 'message',\r\n id: messageID,\r\n from_id: fromID,\r\n to_id: appPeersManager_1.default.getOutputPeer(peerID),\r\n flags: 0,\r\n pFlags: { unread: true },\r\n date: (update.inbox_date || utils_1.tsNow(true)) + serverTimeManager_2.default.serverTimeOffset,\r\n message: update.message,\r\n media: update.media,\r\n entities: update.entities\r\n };\r\n if (!appUsersManager_1.default.hasUser(fromID)) {\r\n appUsersManager_1.default.saveApiUsers([{\r\n _: 'user',\r\n id: fromID,\r\n pFlags: { verified: true },\r\n access_hash: 0,\r\n first_name: 'Telegram',\r\n phone: '42777'\r\n }]);\r\n }\r\n this.saveMessages([message]);\r\n if (update.inbox_date) {\r\n this.pendingTopMsgs[peerID] = messageID;\r\n this.handleUpdate({\r\n _: 'updateNewMessage',\r\n message: message\r\n });\r\n }\r\n if (update.pFlags.popup && update.message) {\r\n //ErrorService.show({error: {code: 400, type: 'UPDATE_SERVICE_NOTIFICATION'}, historyMessage: historyMessage}); // warning\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n finalizePendingMessage(randomID, finalMessage) {\r\n var pendingData = this.pendingByRandomID[randomID];\r\n // console.log('pdata', randomID, pendingData)\r\n if (pendingData) {\r\n var peerID = pendingData[0];\r\n var tempID = pendingData[1];\r\n var historyStorage = this.historiesStorage[peerID], message;\r\n // console.log('pending', randomID, historyStorage.pending)\r\n var pos = historyStorage.pending.indexOf(tempID);\r\n if (pos != -1) {\r\n historyStorage.pending.splice(pos, 1);\r\n }\r\n if (message = this.messagesStorage[tempID]) {\r\n delete message.pending;\r\n delete message.error;\r\n delete message.random_id;\r\n delete message.send;\r\n utils_1.$rootScope.$broadcast('messages_pending');\r\n }\r\n delete this.messagesStorage[tempID];\r\n this.finalizePendingMessageCallbacks(tempID, finalMessage.mid);\r\n return message;\r\n }\r\n return false;\r\n }\r\n finalizePendingMessageCallbacks(tempID, mid) {\r\n var callbacks = this.tempFinalizeCallbacks[tempID];\r\n console.warn(utils_1.dT(), callbacks, tempID);\r\n if (callbacks !== undefined) {\r\n callbacks.forEach((callback) => {\r\n callback(mid);\r\n });\r\n delete this.tempFinalizeCallbacks[tempID];\r\n }\r\n utils_1.$rootScope.$broadcast('message_sent', { tempID, mid });\r\n }\r\n incrementMaxSeenID(maxID) {\r\n if (!maxID || !(!this.maxSeenID || maxID > this.maxSeenID)) {\r\n return false;\r\n }\r\n storage_1.default.set({\r\n max_seen_msg: maxID\r\n });\r\n mtprotoworker_1.default.invokeApi('messages.receivedMessages', {\r\n max_id: maxID\r\n });\r\n }\r\n getHistory(peerID, maxID = 0, limit = 0, backLimit, prerendered) {\r\n if (this.migratedFromTo[peerID]) {\r\n peerID = this.migratedFromTo[peerID];\r\n }\r\n var historyStorage = this.historiesStorage[peerID];\r\n var offset = 0;\r\n var offsetNotFound = false;\r\n var unreadOffset = 0;\r\n var unreadSkip = false;\r\n prerendered = prerendered ? Math.min(50, prerendered) : 0;\r\n if (historyStorage === undefined) {\r\n historyStorage = this.historiesStorage[peerID] = { count: null, history: [], pending: [] };\r\n }\r\n if (maxID < 0) {\r\n maxID = 0;\r\n }\r\n var isMigrated = false;\r\n var reqPeerID = peerID;\r\n if (this.migratedToFrom[peerID]) {\r\n isMigrated = true;\r\n if (maxID && maxID < appMessagesIDsManager_1.default.fullMsgIDModulus) {\r\n reqPeerID = this.migratedToFrom[peerID];\r\n }\r\n }\r\n if (!limit && !maxID) {\r\n var foundDialog = this.getDialogByPeerID(peerID)[0];\r\n if (foundDialog && foundDialog.unread_count > 1) {\r\n var unreadCount = foundDialog.unread_count;\r\n if (unreadSkip = (unreadCount > 50)) {\r\n if (foundDialog.read_inbox_max_id) {\r\n maxID = foundDialog.read_inbox_max_id;\r\n backLimit = 16;\r\n unreadOffset = 16;\r\n limit = 4;\r\n }\r\n else {\r\n limit = 20;\r\n unreadOffset = 16;\r\n offset = unreadCount - unreadOffset;\r\n }\r\n }\r\n else {\r\n limit = Math.max(10, prerendered, unreadCount + 2);\r\n unreadOffset = unreadCount;\r\n }\r\n } /* else if('Mobile' in Config) {\r\n limit = 20;\r\n } */\r\n }\r\n if (maxID > 0) {\r\n offsetNotFound = true;\r\n for (offset = 0; offset < historyStorage.history.length; offset++) {\r\n if (maxID > historyStorage.history[offset]) {\r\n offsetNotFound = false;\r\n break;\r\n }\r\n }\r\n }\r\n if (!offsetNotFound && (historyStorage.count !== null && historyStorage.history.length == historyStorage.count ||\r\n historyStorage.history.length >= offset + (limit || 1))) {\r\n if (backLimit) {\r\n backLimit = Math.min(offset, backLimit);\r\n offset = Math.max(0, offset - backLimit);\r\n limit += backLimit;\r\n }\r\n else {\r\n limit = limit || (offset ? 20 : (prerendered || 5));\r\n }\r\n var history = historyStorage.history.slice(offset, offset + limit);\r\n if (!maxID && historyStorage.pending.length) {\r\n history = historyStorage.pending.slice().concat(history);\r\n }\r\n return this.wrapHistoryResult(peerID, {\r\n count: historyStorage.count,\r\n history: history,\r\n unreadOffset: unreadOffset,\r\n unreadSkip: unreadSkip\r\n });\r\n }\r\n if (!backLimit && !limit) {\r\n limit = prerendered || 20;\r\n }\r\n if (offsetNotFound) {\r\n offset = 0;\r\n }\r\n if ((backLimit || unreadSkip || maxID) && historyStorage.history.indexOf(maxID) == -1) {\r\n if (backLimit) {\r\n offset = -backLimit;\r\n limit += backLimit;\r\n }\r\n return this.requestHistory(reqPeerID, maxID, limit, offset).then((historyResult) => {\r\n historyStorage.count = historyResult.count || historyResult.messages.length;\r\n if (isMigrated) {\r\n historyStorage.count++;\r\n }\r\n var history = [];\r\n historyResult.messages.forEach((message) => {\r\n history.push(message.mid);\r\n });\r\n if (!maxID && historyStorage.pending.length) {\r\n history = historyStorage.pending.slice().concat(history);\r\n }\r\n return this.wrapHistoryResult(peerID, {\r\n count: historyStorage.count,\r\n history: history,\r\n unreadOffset: unreadOffset,\r\n unreadSkip: unreadSkip\r\n });\r\n });\r\n }\r\n return this.fillHistoryStorage(peerID, maxID, limit, historyStorage).then(() => {\r\n offset = 0;\r\n if (maxID > 0) {\r\n for (offset = 0; offset < historyStorage.history.length; offset++) {\r\n if (maxID > historyStorage.history[offset]) {\r\n break;\r\n }\r\n }\r\n }\r\n var history = historyStorage.history.slice(offset, offset + limit);\r\n if (!maxID && historyStorage.pending.length) {\r\n history = historyStorage.pending.slice().concat(history);\r\n }\r\n return this.wrapHistoryResult(peerID, {\r\n count: historyStorage.count,\r\n history: history,\r\n unreadOffset: unreadOffset,\r\n unreadSkip: unreadSkip\r\n });\r\n });\r\n }\r\n fillHistoryStorage(peerID, maxID, fullLimit, historyStorage) {\r\n // console.log('fill history storage', peerID, maxID, fullLimit, angular.copy(historyStorage))\r\n var offset = (this.migratedFromTo[peerID] && !maxID) ? 1 : 0;\r\n return this.requestHistory(peerID, maxID, fullLimit, offset).then((historyResult) => {\r\n historyStorage.count = historyResult.count || historyResult.messages.length;\r\n var offset = 0;\r\n if (!maxID && historyResult.messages.length) {\r\n maxID = historyResult.messages[0].mid + 1;\r\n }\r\n if (maxID > 0) {\r\n for (offset = 0; offset < historyStorage.history.length; offset++) {\r\n if (maxID > historyStorage.history[offset]) {\r\n break;\r\n }\r\n }\r\n }\r\n var wasTotalCount = historyStorage.history.length;\r\n historyStorage.history.splice(offset, historyStorage.history.length - offset);\r\n historyResult.messages.forEach((message) => {\r\n if (this.mergeReplyKeyboard(historyStorage, message)) {\r\n utils_1.$rootScope.$broadcast('history_reply_markup', { peerID: peerID });\r\n }\r\n historyStorage.history.push(message.mid);\r\n });\r\n var totalCount = historyStorage.history.length;\r\n fullLimit -= (totalCount - wasTotalCount);\r\n var migratedNextPeer = this.migratedFromTo[peerID];\r\n var migratedPrevPeer = this.migratedToFrom[peerID];\r\n var isMigrated = migratedNextPeer !== undefined || migratedPrevPeer !== undefined;\r\n if (isMigrated) {\r\n historyStorage.count = Math.max(historyStorage.count, totalCount) + 1;\r\n }\r\n if (fullLimit > 0) {\r\n maxID = historyStorage.history[totalCount - 1];\r\n if (isMigrated) {\r\n if (!historyResult.messages.length) {\r\n if (migratedPrevPeer) {\r\n maxID = 0;\r\n peerID = migratedPrevPeer;\r\n }\r\n else {\r\n historyStorage.count = totalCount;\r\n return true;\r\n }\r\n }\r\n return this.fillHistoryStorage(peerID, maxID, fullLimit, historyStorage);\r\n }\r\n else if (totalCount < historyStorage.count) {\r\n return this.fillHistoryStorage(peerID, maxID, fullLimit, historyStorage);\r\n }\r\n }\r\n return true;\r\n });\r\n }\r\n wrapHistoryResult(peerID, result) {\r\n var unreadOffset = result.unreadOffset;\r\n if (unreadOffset) {\r\n var i;\r\n var message;\r\n for (i = result.history.length - 1; i >= 0; i--) {\r\n message = this.messagesStorage[result.history[i]];\r\n if (message && !message.pFlags.out && message.pFlags.unread) {\r\n result.unreadOffset = i + 1;\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n //return Promise.resolve(result);\r\n }\r\n requestHistory(peerID, maxID, limit, offset = 0) {\r\n var isChannel = appPeersManager_1.default.isChannel(peerID);\r\n //console.trace('requestHistory', peerID, maxID, limit, offset);\r\n utils_1.$rootScope.$broadcast('history_request');\r\n return mtprotoworker_1.default.invokeApi('messages.getHistory', {\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n offset_id: maxID ? appMessagesIDsManager_1.default.getMessageLocalID(maxID) : 0,\r\n offset_date: 0,\r\n add_offset: offset || 0,\r\n limit: limit || 0,\r\n max_id: 0,\r\n min_id: 0,\r\n hash: 0\r\n }, {\r\n timeout: 300,\r\n noErrorBox: true\r\n }).then((historyResult) => {\r\n ///console.log('requestHistory result:', historyResult);\r\n appUsersManager_1.default.saveApiUsers(historyResult.users);\r\n appChatsManager_1.default.saveApiChats(historyResult.chats);\r\n this.saveMessages(historyResult.messages);\r\n if (isChannel) {\r\n apiUpdatesManager_1.default.addChannelState(-peerID, historyResult.pts);\r\n }\r\n var length = historyResult.messages.length;\r\n if (length && historyResult.messages[length - 1].deleted) {\r\n historyResult.messages.splice(length - 1, 1);\r\n length--;\r\n historyResult.count--;\r\n }\r\n // don't need the intro now\r\n /* if(peerID < 0 || !appUsersManager.isBot(peerID) || (length == limit && limit < historyResult.count)) {\r\n return historyResult;\r\n } */\r\n return historyResult;\r\n /* return appProfileManager.getProfile(peerID).then((userFull: any) => {\r\n var description = userFull.bot_info && userFull.bot_info.description;\r\n if(description) {\r\n var messageID = this.tempID--;\r\n var message = {\r\n _: 'messageService',\r\n id: messageID,\r\n from_id: peerID,\r\n to_id: AppPeersManager.getOutputPeer(peerID),\r\n flags: 0,\r\n pFlags: {},\r\n date: tsNow(true) + serverTimeManager.serverTimeOffset,\r\n action: {\r\n _: 'messageActionBotIntro',\r\n description: description\r\n }\r\n }\r\n \r\n this.saveMessages([message]);\r\n historyResult.messages.push(message);\r\n if(historyResult.count) {\r\n historyResult.count++;\r\n }\r\n }\r\n \r\n return historyResult;\r\n }); */\r\n }, (error) => {\r\n switch (error.type) {\r\n case 'CHANNEL_PRIVATE':\r\n var channel = appChatsManager_1.default.getChat(-peerID);\r\n channel = { _: 'channelForbidden', access_hash: channel.access_hash, title: channel.title };\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updates',\r\n updates: [{\r\n _: 'updateChannel',\r\n channel_id: -peerID\r\n }],\r\n chats: [channel],\r\n users: []\r\n });\r\n break;\r\n }\r\n return Promise.reject(error);\r\n });\r\n }\r\n /* public wrapForDialog(msgID: number, dialog?: any) {\r\n var useCache = msgID && dialog !== undefined;\r\n var unreadCount = dialog && dialog.unread_count;\r\n \r\n if(useCache && this.messagesForDialogs[msgID] !== undefined) {\r\n delete this.messagesForDialogs[msgID].typing;\r\n this.messagesForDialogs[msgID].unreadCount = unreadCount;\r\n return this.messagesForDialogs[msgID];\r\n }\r\n \r\n var message = copy(this.messagesStorage[msgID]);\r\n \r\n if(!message || !message.to_id) {\r\n if(dialog && dialog.peerID) {\r\n message = {\r\n _: 'message',\r\n to_id: AppPeersManager.getOutputPeer(dialog.peerID),\r\n deleted: true,\r\n date: tsNow(true),\r\n pFlags: {out: true}\r\n }\r\n } else {\r\n return message;\r\n }\r\n }\r\n \r\n message.peerID = this.getMessagePeer(message);\r\n message.peerData = AppPeersManager.getPeer(message.peerID);\r\n message.peerString = AppPeersManager.getPeerString(message.peerID);\r\n message.unreadCount = unreadCount;\r\n message.index = dialog && dialog.index || (message.date * 0x10000);\r\n message.pinned = dialog && dialog.pFlags.pinned || false;\r\n \r\n if(message._ == 'messageService' && message.action.user_id) {\r\n message.action.user = appUsersManager.getUser(message.action.user_id);\r\n }\r\n \r\n if(message.message && message.message.length) {\r\n message.richMessage = RichTextProcessor.wrapRichText(message.message.substr(0, 128), {noLinks: true, noLinebreaks: true});\r\n }\r\n \r\n message.dateText = message.date; //dateOrTimeFilter(message.date); // warning\r\n \r\n if(useCache) {\r\n message.draft = '';//DraftsManager.getServerDraft(message.peerID); // warning\r\n this.messagesForDialogs[msgID] = message;\r\n }\r\n \r\n return message;\r\n } */\r\n fetchSingleMessages() {\r\n if (this.fetchSingleMessagesPromise) {\r\n return this.fetchSingleMessagesPromise;\r\n }\r\n var mids = this.needSingleMessages.slice();\r\n this.needSingleMessages.length = 0;\r\n var splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(mids);\r\n let promises = [];\r\n Object.keys(splitted.msgIDs).forEach((channelID) => {\r\n channelID = +channelID;\r\n let msgIDs = splitted.msgIDs[channelID].map((msgID) => {\r\n return {\r\n _: 'inputMessageID',\r\n id: msgID\r\n };\r\n });\r\n var promise;\r\n if (channelID > 0) {\r\n promise = mtprotoworker_1.default.invokeApi('channels.getMessages', {\r\n channel: appChatsManager_1.default.getChannelInput(channelID),\r\n id: msgIDs\r\n });\r\n }\r\n else {\r\n promise = mtprotoworker_1.default.invokeApi('messages.getMessages', {\r\n id: msgIDs\r\n });\r\n }\r\n promises.push(promise.then((getMessagesResult) => {\r\n appUsersManager_1.default.saveApiUsers(getMessagesResult.users);\r\n appChatsManager_1.default.saveApiChats(getMessagesResult.chats);\r\n this.saveMessages(getMessagesResult.messages);\r\n utils_1.$rootScope.$broadcast('messages_downloaded', splitted.mids[+channelID]);\r\n }));\r\n });\r\n return this.fetchSingleMessagesPromise = Promise.all(promises).then(() => {\r\n this.fetchSingleMessagesTimeout = 0;\r\n this.fetchSingleMessagesPromise = null;\r\n if (this.needSingleMessages.length)\r\n this.fetchSingleMessages();\r\n }).catch(() => {\r\n this.fetchSingleMessagesTimeout = 0;\r\n this.fetchSingleMessagesPromise = null;\r\n if (this.needSingleMessages.length)\r\n this.fetchSingleMessages();\r\n });\r\n }\r\n wrapSingleMessage(msgID) {\r\n if (this.messagesStorage[msgID]) {\r\n //let ret = this.wrapForDialog(msgID); // hm\r\n utils_1.$rootScope.$broadcast('messages_downloaded', [msgID]);\r\n //return ret;\r\n return { mid: msgID, loading: false };\r\n }\r\n if (this.needSingleMessages.indexOf(msgID) == -1) {\r\n this.needSingleMessages.push(msgID);\r\n if (this.fetchSingleMessagesTimeout == 0) {\r\n this.fetchSingleMessagesTimeout = window.setTimeout(this.fetchSingleMessages.bind(this), 25);\r\n }\r\n return { mid: msgID, loading: true };\r\n }\r\n return { mid: msgID, loading: false };\r\n }\r\n}\r\nexports.AppMessagesManager = AppMessagesManager;\r\nexports.default = new AppMessagesManager();\r\n" }, { "id": 15, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", - "index": 59, - "index2": 75, - "size": 136177, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", + "name": "./src/lib/mtproto/apiFileManager.ts", + "index": 53, + "index2": 46, + "size": 21466, "cacheable": true, "built": true, "optional": false, @@ -3031,44 +2944,54 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "issuerId": 63, + "issuerName": "./src/pages/pageSignUp.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", + "id": 62, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "name": "./src/pages/pageAuthCode.ts", + "profile": { + "factory": 527, + "building": 1006, + "dependencies": 2 + } + }, + { + "id": 63, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "name": "./src/pages/pageSignUp.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 913, + "building": 92, + "dependencies": 0 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 1026, + "building": 135, + "dependencies": 1 }, "failed": false, "errors": 0, @@ -3076,58 +2999,67 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", + "moduleId": 6, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", + "module": "./src/lib/appManagers/appPhotosManager.ts", + "moduleName": "./src/lib/appManagers/appPhotosManager.ts", "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "25:45-76" + "userRequest": "../mtproto/apiFileManager", + "loc": "10:41-77" }, { - "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "18:45-76" + "userRequest": "../mtproto/apiFileManager", + "loc": "27:41-77" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", + "moduleId": 16, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", + "module": "./src/lib/appManagers/appDocsManager.ts", + "moduleName": "./src/lib/appManagers/appDocsManager.ts", "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "20:45-76" + "userRequest": "../mtproto/apiFileManager", + "loc": "15:41-77" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "9:45-76" + "userRequest": "../mtproto/apiFileManager", + "loc": "26:41-77" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "module": "./src/components/wrappers.ts", + "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "./appMessagesManager", - "loc": "9:45-76" + "userRequest": "../lib/mtproto/apiFileManager", + "loc": "30:41-81" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 33, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", + "module": "./src/lib/appManagers/appStickersManager.ts", + "moduleName": "./src/lib/appManagers/appStickersManager.ts", "type": "cjs require", - "userRequest": "./appManagers/appMessagesManager", - "loc": "13:45-88" + "userRequest": "../mtproto/apiFileManager", + "loc": "18:41-77" + }, + { + "moduleId": 63, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "module": "./src/pages/pageSignUp.ts", + "moduleName": "./src/pages/pageSignUp.ts", + "type": "cjs require", + "userRequest": "../lib/mtproto/apiFileManager", + "loc": "11:41-81" } ], "usedExports": true, @@ -3135,16 +3067,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nconst bin_utils_1 = require(\"../bin_utils\");\nconst mtproto_1 = require(\"../mtproto/mtproto\");\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\nconst storage_1 = __importDefault(require(\"../storage\"));\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\nconst serverTimeManager_1 = __importDefault(require(\"../mtproto/serverTimeManager\"));\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\nconst preloader_1 = __importDefault(require(\"../../components/preloader\"));\nconst serverTimeManager_2 = __importDefault(require(\"../mtproto/serverTimeManager\"));\nconst apiManager_1 = __importDefault(require(\"../mtproto/apiManager\"));\nconst appWebPagesManager_1 = __importDefault(require(\"./appWebPagesManager\"));\nclass AppMessagesManager {\n constructor() {\n this.messagesStorage = {};\n this.messagesForHistory = {};\n this.messagesForDialogs = {};\n this.historiesStorage = {};\n this.dialogsStorage = { count: null, dialogs: [] };\n this.pendingByRandomID = {};\n this.pendingByMessageID = {};\n this.pendingAfterMsgs = {};\n this.pendingTopMsgs = {};\n this.sendFilePromise = Promise.resolve();\n this.tempID = -1;\n this.tempFinalizeCallbacks = {};\n this.dialogsIndex = utils_1.SearchIndexManager.createIndex();\n this.cachedResults = { query: false };\n this.lastSearchFilter = {};\n this.lastSearchResults = [];\n this.needSingleMessages = [];\n this.fetchSingleMessagesTimeout = 0;\n this.fetchSingleMessagesPromise = null;\n this.incrementedMessageViews = {};\n this.needIncrementMessageViews = [];\n this.incrementMessageViewsTimeout = false;\n this.maxSeenID = 0;\n this.allDialogsLoaded = {};\n this.dialogsOffsetDate = {};\n this.pinnedIndex = 0;\n this.dialogsNum = 0;\n this.migratedFromTo = {};\n this.migratedToFrom = {};\n this.newMessagesHandlePromise = 0;\n this.newMessagesToHandle = {};\n this.newDialogsHandlePromise = 0;\n this.newDialogsToHandle = {};\n //public notificationsHandlePromise = 0;\n //public notificationsToHandle: any = {};\n this.newUpdatesAfterReloadToHandle = {};\n this.fwdMessagesPluralize = utils_1._('conversation_forwarded_X_messages');\n this.gameScorePluralize = utils_1._('conversation_scored_X');\n storage_1.default.get('max_seen_msg').then((maxID) => {\n if (maxID && !appMessagesIDsManager_1.default.getMessageIDInfo(maxID)[1]) {\n this.maxSeenID = maxID;\n }\n });\n utils_1.$rootScope.$on('apiUpdate', (e) => {\n let update = e.detail;\n // if(update._ != 'updateUserStatus') {\n // console.log('on apiUpdate', update)\n // }\n this.handleUpdate(update);\n });\n utils_1.$rootScope.$on('webpage_updated', (e) => {\n let eventData = e.detail;\n eventData.msgs.forEach((msgID) => {\n var historyMessage = this.messagesForHistory[msgID];\n if (historyMessage) {\n historyMessage.media = {\n _: 'messageMediaWebPage',\n webpage: appWebPagesManager_1.default.wrapForHistory(eventData.id)\n };\n utils_1.$rootScope.$broadcast('message_edit', {\n peerID: this.getMessagePeer(historyMessage),\n id: historyMessage.id,\n mid: msgID,\n justMedia: true\n });\n }\n });\n });\n utils_1.$rootScope.$on('draft_updated', (e) => {\n let eventData = e.detail;\n ;\n var peerID = eventData.peerID;\n var draft = eventData.draft;\n var dialog = this.getDialogByPeerID(peerID)[0];\n if (dialog) {\n var topDate;\n if (draft && draft.date) {\n topDate = draft.date;\n }\n else {\n var channelID = appPeersManager_1.default.isChannel(peerID) ? -peerID : 0;\n var topDate = this.getMessage(dialog.top_message).date;\n if (channelID) {\n var channel = appChatsManager_1.default.getChat(channelID);\n if (!topDate || channel.date && channel.date > topDate) {\n topDate = channel.date;\n }\n }\n }\n if (!dialog.pFlags.pinned) {\n dialog.index = this.generateDialogIndex(topDate);\n }\n this.pushDialogToStorage(dialog);\n utils_1.$rootScope.$broadcast('dialog_draft', {\n peerID: peerID,\n draft: draft,\n index: dialog.index\n });\n }\n });\n }\n getInputEntities(entities) {\n var sendEntites = utils_1.copy(entities);\n sendEntites.forEach((entity) => {\n if (entity._ == 'messageEntityMentionName') {\n entity._ = 'inputMessageEntityMentionName';\n entity.user_id = appUsersManager_1.default.getUserInput(entity.user_id);\n }\n });\n return sendEntites;\n }\n editMessage(messageID, text, options = {}) {\n if (typeof (text) !== 'string' || !this.canEditMessage(messageID)) {\n return Promise.reject();\n }\n if (messageID < 0) {\n if (this.tempFinalizeCallbacks[messageID] === undefined) {\n this.tempFinalizeCallbacks[messageID] = {};\n }\n let promise = new Promise((resolve, reject) => {\n this.tempFinalizeCallbacks[messageID].edit = (mid) => {\n console.log('invoke callback', mid);\n this.editMessage(mid, text).then(resolve, reject);\n };\n });\n return promise;\n }\n var entities = [];\n text = richtextprocessor_1.RichTextProcessor.parseMarkdown(text, entities);\n var message = this.getMessage(messageID);\n var peerID = this.getMessagePeer(message);\n var flags = 0;\n let noWebPage = options.noWebPage || false;\n if (noWebPage) {\n flags |= 2;\n }\n if (text) {\n flags |= 8 | 1 << 11;\n }\n /* if(message.media) {\n flags |= 1 << 14;\n } */\n return apiManager_1.default.invokeApi('messages.editMessage', {\n flags: flags,\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\n id: appMessagesIDsManager_1.default.getMessageLocalID(messageID),\n message: text,\n media: message.media,\n entities: this.getInputEntities(entities),\n no_webpage: noWebPage,\n }).then((updates) => {\n apiUpdatesManager_1.default.processUpdateMessage(updates);\n }, (error) => {\n if (error && error.type == 'MESSAGE_NOT_MODIFIED') {\n error.handled = true;\n return;\n }\n if (error && error.type == 'MESSAGE_EMPTY') {\n error.handled = true;\n }\n return Promise.reject(error);\n });\n }\n sendText(peerID, text, options = {}) {\n if (typeof (text) != 'string') {\n return;\n }\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\n var entities = options.entities || [];\n if (!options.viaBotID) {\n text = richtextprocessor_1.RichTextProcessor.parseMarkdown(text, entities);\n }\n if (!text.length) {\n return;\n }\n var sendEntites = this.getInputEntities(entities);\n var messageID = this.tempID--;\n var randomID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\n var randomIDS = bin_utils_1.bigint(randomID[0]).shiftLeft(32).add(bin_utils_1.bigint(randomID[1])).toString();\n var historyStorage = this.historiesStorage[peerID];\n var flags = 0;\n var pFlags = {};\n var replyToMsgID = options.replyToMsgID;\n var isChannel = appPeersManager_1.default.isChannel(peerID);\n var isMegagroup = isChannel && appPeersManager_1.default.isMegagroup(peerID);\n var asChannel = isChannel && !isMegagroup ? true : false;\n var message;\n let noWebPage = options.noWebPage || false;\n if (historyStorage === undefined) {\n historyStorage = this.historiesStorage[peerID] = { count: null, history: [], pending: [] };\n }\n var fromID = appUsersManager_1.default.getSelf().id;\n if (peerID != fromID) {\n flags |= 2;\n pFlags.out = true;\n if (!isChannel && !appUsersManager_1.default.isBot(peerID)) {\n flags |= 1;\n pFlags.unread = true;\n }\n }\n if (replyToMsgID) {\n flags |= 8;\n }\n if (asChannel) {\n fromID = 0;\n pFlags.post = true;\n }\n else {\n flags |= 256;\n }\n message = {\n _: 'message',\n id: messageID,\n from_id: fromID,\n to_id: appPeersManager_1.default.getOutputPeer(peerID),\n flags: flags,\n pFlags: pFlags,\n date: utils_1.tsNow(true) + serverTimeManager_2.default.serverTimeOffset,\n message: text,\n random_id: randomIDS,\n reply_to_msg_id: replyToMsgID,\n via_bot_id: options.viaBotID,\n reply_markup: options.reply_markup,\n entities: entities,\n views: asChannel && 1,\n pending: true\n };\n if (options.webPage) {\n message.media = {\n _: 'messageMediaWebPage',\n webpage: options.webPage\n };\n }\n var toggleError = (on) => {\n var historyMessage = this.messagesForHistory[messageID];\n if (on) {\n message.error = true;\n if (historyMessage) {\n historyMessage.error = true;\n }\n }\n else {\n delete message.error;\n if (historyMessage) {\n delete historyMessage.error;\n }\n }\n utils_1.$rootScope.$broadcast('messages_pending');\n };\n message.send = () => {\n toggleError(false);\n var sentRequestOptions = {};\n if (this.pendingAfterMsgs[peerID]) {\n sentRequestOptions.afterMessageID = this.pendingAfterMsgs[peerID].messageID;\n }\n var flags = 0;\n if (replyToMsgID) {\n flags |= 1;\n }\n if (asChannel) {\n flags |= 16;\n }\n if (options.clearDraft) {\n flags |= 128;\n }\n if (noWebPage) {\n flags |= 2;\n }\n var apiPromise;\n if (options.viaBotID) {\n apiPromise = apiManager_1.default.invokeApi('messages.sendInlineBotResult', {\n flags: flags,\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\n random_id: randomID,\n reply_to_msg_id: appMessagesIDsManager_1.default.getMessageLocalID(replyToMsgID),\n query_id: options.queryID,\n id: options.resultID\n }, sentRequestOptions);\n }\n else {\n if (sendEntites.length) {\n flags |= 8;\n }\n apiPromise = apiManager_1.default.invokeApi('messages.sendMessage', {\n flags: flags,\n no_webpage: noWebPage,\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\n message: text,\n random_id: randomID,\n reply_to_msg_id: appMessagesIDsManager_1.default.getMessageLocalID(replyToMsgID),\n entities: sendEntites\n }, sentRequestOptions);\n }\n // console.log(flags, entities)\n apiPromise.then((updates) => {\n if (updates._ == 'updateShortSentMessage') {\n message.flags = updates.flags;\n message.date = updates.date;\n message.id = updates.id;\n message.media = updates.media;\n message.entities = updates.entities;\n updates = {\n _: 'updates',\n users: [],\n chats: [],\n seq: 0,\n updates: [{\n _: 'updateMessageID',\n random_id: randomIDS,\n id: updates.id\n }, {\n _: isChannel\n ? 'updateNewChannelMessage'\n : 'updateNewMessage',\n message: message,\n pts: updates.pts,\n pts_count: updates.pts_count\n }]\n };\n }\n else if (updates.updates) {\n updates.updates.forEach((update) => {\n if (update._ == 'updateDraftMessage') {\n update.local = true;\n }\n });\n }\n // Testing bad situations\n // var upd = angular.copy(updates)\n // updates.updates.splice(0, 1)\n apiUpdatesManager_1.default.processUpdateMessage(updates);\n // $timeout(function () {\n // ApiUpdatesManager.processUpdateMessage(upd)\n // }, 5000)\n }, ( /* error: any */) => {\n toggleError(true);\n }).finally(() => {\n if (this.pendingAfterMsgs[peerID] === sentRequestOptions) {\n delete this.pendingAfterMsgs[peerID];\n }\n });\n this.pendingAfterMsgs[peerID] = sentRequestOptions;\n };\n this.saveMessages([message]);\n historyStorage.pending.unshift(messageID);\n utils_1.$rootScope.$broadcast('history_append', { peerID: peerID, messageID: messageID, my: true });\n setTimeout(() => message.send(), 0);\n // setTimeout(function () {\n // message.send()\n // }, 5000)\n /* if(options.clearDraft) { // WARNING\n DraftsManager.clearDraft(peerID)\n } */\n this.pendingByRandomID[randomIDS] = [peerID, messageID];\n }\n sendFile(peerID, file, options = {}) {\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\n var messageID = this.tempID--;\n var randomID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\n var randomIDS = bin_utils_1.bigint(randomID[0]).shiftLeft(32).add(bin_utils_1.bigint(randomID[1])).toString();\n var historyStorage = this.historiesStorage[peerID];\n var flags = 0;\n var pFlags = {};\n var replyToMsgID = options.replyToMsgID;\n var isChannel = appPeersManager_1.default.isChannel(peerID);\n var isMegagroup = isChannel && appPeersManager_1.default.isMegagroup(peerID);\n var asChannel = isChannel && !isMegagroup ? true : false;\n var attachType, apiFileName;\n let fileType = 'mime_type' in file ? file.mime_type : file.type;\n let fileName = file instanceof File ? file.name : '';\n let isDocument = !(file instanceof File) && !(file instanceof Blob);\n let caption = options.caption || '';\n if (caption) {\n let entities = options.entities || [];\n caption = richtextprocessor_1.RichTextProcessor.parseMarkdown(caption, entities);\n }\n let actionName = '';\n if (!options.isMedia) {\n attachType = 'document';\n apiFileName = 'document.' + fileType.split('/')[1];\n actionName = 'sendMessageUploadDocumentAction';\n }\n else if (isDocument) { // maybe it's a sticker\n attachType = 'document';\n apiFileName = '';\n }\n else if (['image/jpeg', 'image/png', 'image/bmp'].indexOf(fileType) >= 0) {\n attachType = 'photo';\n apiFileName = 'photo.' + fileType.split('/')[1];\n actionName = 'sendMessageUploadPhotoAction';\n }\n else if (fileType.substr(0, 6) == 'audio/' || ['video/ogg'].indexOf(fileType) >= 0) {\n attachType = 'audio';\n apiFileName = 'audio.' + (fileType.split('/')[1] == 'ogg' ? 'ogg' : 'mp3');\n actionName = 'sendMessageUploadAudioAction';\n }\n else if (fileType.substr(0, 6) == 'video/') {\n //attachType = 'video';\n //apiFileName = 'video.mp4';\n attachType = 'document'; // last minute fix\n apiFileName = 'video.mp4';\n actionName = 'sendMessageUploadVideoAction';\n }\n else {\n attachType = 'document';\n apiFileName = 'document.' + fileType.split('/')[1];\n actionName = 'sendMessageUploadDocumentAction';\n }\n // console.log(attachType, apiFileName, file.type)\n if (historyStorage === undefined) {\n historyStorage = this.historiesStorage[peerID] = { count: null, history: [], pending: [] };\n }\n var fromID = appUsersManager_1.default.getSelf().id;\n if (peerID != fromID) {\n flags |= 2;\n pFlags.out = true;\n if (!isChannel && !appUsersManager_1.default.isBot(peerID)) {\n flags |= 1;\n pFlags.unread = true;\n }\n }\n if (replyToMsgID) {\n flags |= 8;\n }\n if (asChannel) {\n fromID = 0;\n pFlags.post = true;\n }\n else {\n flags |= 256;\n }\n let preloader = new preloader_1.default(null, true);\n var media = {\n _: 'messageMediaPending',\n type: attachType,\n file_name: fileName || apiFileName,\n size: file.size,\n file: file,\n preloader: preloader,\n w: options.width,\n h: options.height,\n progress: {\n percent: 1,\n total: file.size,\n done: 0,\n cancel: () => { }\n }\n };\n preloader.preloader.onclick = () => {\n console.log('cancelling upload', media);\n appImManager_1.default.setTyping('sendMessageCancelAction');\n media.progress.cancel();\n };\n var message = {\n _: 'message',\n id: messageID,\n from_id: fromID,\n to_id: appPeersManager_1.default.getOutputPeer(peerID),\n flags: flags,\n pFlags: pFlags,\n date: utils_1.tsNow(true) + serverTimeManager_1.default.serverTimeOffset,\n message: caption,\n media: isDocument ? {\n _: 'messageMediaDocument',\n pFlags: {},\n flags: 1,\n document: file\n } : media,\n random_id: randomIDS,\n reply_to_msg_id: replyToMsgID,\n views: asChannel && 1,\n pending: true\n };\n var toggleError = (on) => {\n var historyMessage = this.messagesForHistory[messageID];\n if (on) {\n message.error = true;\n if (historyMessage) {\n historyMessage.error = true;\n }\n }\n else {\n delete message.error;\n if (historyMessage) {\n delete historyMessage.error;\n }\n }\n utils_1.$rootScope.$broadcast('messages_pending');\n };\n var uploaded = false, uploadPromise = null;\n let invoke = (flags, inputMedia) => {\n appImManager_1.default.setTyping('sendMessageCancelAction');\n return apiManager_1.default.invokeApi('messages.sendMedia', {\n flags: flags,\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\n media: inputMedia,\n message: caption,\n random_id: randomID,\n reply_to_msg_id: appMessagesIDsManager_1.default.getMessageLocalID(replyToMsgID)\n }).then((updates) => {\n apiUpdatesManager_1.default.processUpdateMessage(updates);\n }, (error) => {\n if (attachType == 'photo' &&\n error.code == 400 &&\n (error.type == 'PHOTO_INVALID_DIMENSIONS' ||\n error.type == 'PHOTO_SAVE_FILE_INVALID')) {\n error.handled = true;\n attachType = 'document';\n message.send();\n return;\n }\n toggleError(true);\n });\n };\n message.send = () => {\n let flags = 0;\n if (replyToMsgID) {\n flags |= 1;\n }\n if (asChannel) {\n flags |= 16;\n }\n if (isDocument) {\n let { id, access_hash, file_reference } = file;\n let inputMedia = {\n _: 'inputMediaDocument',\n flags: 0,\n id: {\n _: 'inputDocument',\n id: id,\n access_hash: access_hash,\n file_reference: file_reference\n }\n };\n invoke(flags, inputMedia);\n }\n else if (file instanceof File || file instanceof Blob) {\n let deferredHelper = {};\n let deferred = new Promise((resolve, reject) => {\n deferredHelper.resolve = resolve;\n deferredHelper.reject = reject;\n });\n Object.assign(deferred, deferredHelper);\n this.sendFilePromise.then(() => {\n if (!uploaded || message.error) {\n uploaded = false;\n uploadPromise = apiFileManager_1.default.uploadFile(file);\n }\n uploadPromise && uploadPromise.then((inputFile) => {\n inputFile.name = apiFileName;\n uploaded = true;\n var inputMedia;\n switch (attachType) {\n case 'photo':\n inputMedia = {\n _: 'inputMediaUploadedPhoto',\n flags: 0,\n file: inputFile\n };\n break;\n case 'document':\n default:\n inputMedia = {\n _: 'inputMediaUploadedDocument',\n file: inputFile,\n mime_type: fileType,\n caption: '',\n attributes: [\n { _: 'documentAttributeFilename', file_name: fileName }\n ]\n };\n }\n invoke(flags, inputMedia);\n }, ( /* error */) => {\n toggleError(true);\n });\n uploadPromise.notify = (progress) => {\n console.log('upload progress', progress);\n media.progress.done = progress.done;\n media.progress.percent = Math.max(1, Math.floor(100 * progress.done / progress.total));\n appImManager_1.default.setTyping({ _: actionName, progress: media.progress.percent | 0 });\n preloader.setProgress(media.progress.percent); // lol, nice\n utils_1.$rootScope.$broadcast('history_update', { peerID: peerID });\n };\n media.progress.cancel = () => {\n if (!uploaded) {\n deferred.resolve();\n uploadPromise.cancel();\n this.cancelPendingMessage(randomIDS);\n }\n };\n // @ts-ignore\n uploadPromise['finally'](() => {\n deferred.resolve();\n preloader.detach();\n });\n });\n this.sendFilePromise = deferred;\n }\n };\n this.saveMessages([message]);\n historyStorage.pending.unshift(messageID);\n utils_1.$rootScope.$broadcast('history_append', { peerID: peerID, messageID: messageID, my: true });\n setTimeout(message.send.bind(this), 0);\n this.pendingByRandomID[randomIDS] = [peerID, messageID];\n }\n cancelPendingMessage(randomID) {\n var pendingData = this.pendingByRandomID[randomID];\n console.log('cancelPendingMessage', randomID, pendingData);\n if (pendingData) {\n var peerID = pendingData[0];\n var tempID = pendingData[1];\n var historyStorage = this.historiesStorage[peerID];\n var pos = historyStorage.pending.indexOf(tempID);\n apiUpdatesManager_1.default.processUpdateMessage({\n _: 'updateShort',\n update: {\n _: 'updateDeleteMessages',\n messages: [tempID]\n }\n });\n if (pos != -1) {\n historyStorage.pending.splice(pos, 1);\n }\n delete this.messagesForHistory[tempID];\n delete this.messagesStorage[tempID];\n return true;\n }\n return false;\n }\n getConversation(peerID) {\n return __awaiter(this, void 0, void 0, function* () {\n var foundDialog = this.getDialogByPeerID(peerID);\n if (foundDialog.length) {\n return foundDialog[0];\n }\n return {\n peerID: peerID,\n top_message: 0,\n index: this.generateDialogIndex(this.generateDialogPinnedDate()),\n pFlags: {}\n };\n });\n }\n getConversations(query, offsetIndex, limit = 20, folderID = -1) {\n //var curDialogStorage = this.dialogsStorage;\n //var isSearch = typeof(query) == 'string' && query.length;\n let curDialogStorage = this.dialogsStorage.dialogs;\n if (folderID > 0) {\n curDialogStorage = curDialogStorage.filter(d => d.folder_id == folderID);\n }\n else {\n curDialogStorage = curDialogStorage.filter(d => d.folder_id != 1);\n }\n /* if(isSearch) {\n if(!limit || this.cachedResults.query !== query) {\n this.cachedResults.query = query;\n \n var results: any = SearchIndexManager.search(query, this.dialogsIndex);\n \n this.cachedResults.dialogs = [];\n this.dialogsStorage.dialogs.forEach((dialog: any) => {\n if(results[dialog.peerID]) {\n this.cachedResults.dialogs.push(dialog);\n }\n })\n this.cachedResults.count = this.cachedResults.dialogs.length;\n }\n curDialogStorage = this.cachedResults;\n } else { */\n this.cachedResults.query = false;\n //}\n var offset = 0;\n if (offsetIndex > 0) {\n for (; offset < curDialogStorage.length; offset++) {\n if (offsetIndex > curDialogStorage[offset].index) {\n break;\n }\n }\n }\n if ( /* isSearch || */this.allDialogsLoaded[folderID] || curDialogStorage.length >= offset + limit) {\n return Promise.resolve({\n dialogs: curDialogStorage.slice(offset, offset + limit),\n count: curDialogStorage.length\n });\n }\n return this.getTopMessages(limit, folderID).then(count => {\n let curDialogStorage = this.dialogsStorage.dialogs;\n if (folderID > 0) {\n curDialogStorage = curDialogStorage.filter(d => d.folder_id == folderID);\n }\n else {\n curDialogStorage = curDialogStorage.filter(d => d.folder_id != 1);\n }\n offset = 0;\n if (offsetIndex > 0) {\n for (offset = 0; offset < curDialogStorage.length; offset++) {\n if (offsetIndex > curDialogStorage[offset].index) {\n break;\n }\n }\n }\n //console.warn(offset, offset + limit, curDialogStorage.dialogs.length, this.dialogsStorage.dialogs.length);\n return {\n dialogs: curDialogStorage.slice(offset, offset + limit),\n count: count\n };\n });\n }\n getTopMessages(limit, folderID = -1) {\n var dialogs = this.dialogsStorage.dialogs;\n var offsetDate = 0;\n var offsetID = 0;\n var offsetPeerID = 0;\n var offsetIndex = 0;\n var flags = 0;\n if (folderID > 0) {\n dialogs = dialogs.filter(d => d.folder_id == folderID);\n }\n else {\n dialogs = dialogs.filter(d => d.folder_id != 1);\n }\n if (this.dialogsOffsetDate[folderID]) {\n offsetDate = this.dialogsOffsetDate[folderID] + serverTimeManager_2.default.serverTimeOffset;\n offsetIndex = this.dialogsOffsetDate[folderID] * 0x10000;\n flags |= 1;\n }\n if (folderID > 0) {\n flags |= 1;\n flags |= 2;\n }\n let hash = 0;\n return apiManager_1.default.invokeApi('messages.getDialogs', {\n flags: flags,\n folder_id: folderID,\n offset_date: offsetDate,\n offset_id: appMessagesIDsManager_1.default.getMessageLocalID(offsetID),\n offset_peer: appPeersManager_1.default.getInputPeerByID(offsetPeerID),\n limit: limit,\n hash: hash\n }, {\n timeout: 300\n }).then((dialogsResult) => {\n ///////console.log('messages.getDialogs result:', dialogsResult);\n if (!offsetDate) {\n mtproto_1.telegramMeWebService.setAuthorized(true);\n }\n appUsersManager_1.default.saveApiUsers(dialogsResult.users);\n appChatsManager_1.default.saveApiChats(dialogsResult.chats);\n this.saveMessages(dialogsResult.messages);\n var maxSeenIdIncremented = offsetDate ? true : false;\n var hasPrepend = false;\n //dialogsResult.dialogs.reverse();\n let length = dialogsResult.dialogs.length;\n let noIDsDialogs = {};\n for (let i = length - 1; i >= 0; --i) {\n let dialog = dialogsResult.dialogs[i];\n //}\n //dialogsResult.dialogs.forEach((dialog: any) => {\n this.saveConversation(dialog);\n if (offsetIndex && dialog.index > offsetIndex) {\n this.newDialogsToHandle[dialog.peerID] = dialog;\n hasPrepend = true;\n }\n if (!dialog.read_inbox_max_id && !dialog.read_outbox_max_id) {\n noIDsDialogs[dialog.peerID] = dialog;\n }\n if (!maxSeenIdIncremented &&\n !appPeersManager_1.default.isChannel(appPeersManager_1.default.getPeerID(dialog.peer))) {\n this.incrementMaxSeenID(dialog.top_message);\n maxSeenIdIncremented = true;\n }\n }\n //});\n //dialogsResult.dialogs.reverse();\n if (Object.keys(noIDsDialogs).length) {\n //setTimeout(() => { // test bad situation\n this.reloadConversation(Object.keys(noIDsDialogs).map(id => +id)).then(() => {\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', noIDsDialogs);\n for (let peerID in noIDsDialogs) {\n utils_1.$rootScope.$broadcast('dialog_unread', { peerID: +peerID });\n }\n });\n //}, 10e3);\n }\n if (!dialogsResult.dialogs.length ||\n !dialogsResult.count ||\n dialogs.length >= dialogsResult.count) {\n this.allDialogsLoaded[folderID] = true;\n }\n if (hasPrepend && !this.newDialogsHandlePromise) {\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\n }\n else {\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', {});\n }\n return dialogsResult.count;\n });\n }\n generateDialogIndex(date) {\n if (date === undefined) {\n date = utils_1.tsNow(true) + serverTimeManager_2.default.serverTimeOffset;\n }\n return (date * 0x10000) + ((++this.dialogsNum) & 0xFFFF);\n }\n pushDialogToStorage(dialog, offsetDate) {\n var dialogs = this.dialogsStorage.dialogs /* .filter(d => d.folder_id == dialog.folder_id) */;\n var pos = this.getDialogByPeerID(dialog.peerID)[1];\n if (pos !== undefined) {\n dialogs.splice(pos, 1);\n }\n if (offsetDate &&\n !dialog.pFlags.pinned &&\n (!this.dialogsOffsetDate[dialog.folder_id] || offsetDate < this.dialogsOffsetDate[dialog.folder_id])) {\n if (pos !== undefined) {\n // So the dialog jumped to the last position\n return false;\n }\n this.dialogsOffsetDate[dialog.folder_id] = offsetDate;\n }\n var index = dialog.index;\n var i;\n var len = dialogs.length;\n if (!len || index < dialogs[len - 1].index) {\n dialogs.push(dialog);\n }\n else if (index >= dialogs[0].index) {\n dialogs.unshift(dialog);\n }\n else {\n for (i = 0; i < len; i++) {\n if (index > dialogs[i].index) {\n dialogs.splice(i, 0, dialog);\n break;\n }\n }\n }\n }\n getMessage(messageID) {\n return this.messagesStorage[messageID] || {\n _: 'messageEmpty',\n deleted: true,\n pFlags: { out: false, unread: false }\n };\n }\n getMessagePeer(message) {\n var toID = message.to_id && appPeersManager_1.default.getPeerID(message.to_id) || 0;\n if (toID < 0) {\n return toID;\n }\n else if (message.pFlags && message.pFlags.out || message.flags & 2) {\n return toID;\n }\n return message.from_id;\n }\n getDialogByPeerID(peerID) {\n let length = this.dialogsStorage.dialogs.length;\n for (var i = 0; i < length; i++) {\n if (this.dialogsStorage.dialogs[i].peerID == peerID) {\n return [this.dialogsStorage.dialogs[i], i];\n }\n }\n return [];\n }\n reloadConversation(peerID) {\n let peers = [].concat(peerID).map(peerID => appPeersManager_1.default.getInputPeerByID(peerID));\n console.log('will reloadConversation', peerID);\n return apiManager_1.default.invokeApi('messages.getPeerDialogs', {\n peers: peers\n }).then(this.applyConversations.bind(this));\n }\n saveMessages(apiMessages, options = {}) {\n apiMessages.forEach((apiMessage) => {\n if (apiMessage.pFlags === undefined) {\n apiMessage.pFlags = {};\n }\n if (!apiMessage.pFlags.out) {\n apiMessage.pFlags.out = false;\n }\n if (!apiMessage.pFlags.unread) {\n apiMessage.pFlags.unread = false;\n }\n if (apiMessage._ == 'messageEmpty') {\n return;\n }\n var peerID = this.getMessagePeer(apiMessage);\n var isChannel = apiMessage.to_id._ == 'peerChannel';\n var channelID = isChannel ? -peerID : 0;\n var isBroadcast = isChannel && appChatsManager_1.default.isBroadcast(channelID);\n var mid = appMessagesIDsManager_1.default.getFullMessageID(apiMessage.id, channelID);\n apiMessage.mid = mid;\n var dialog = this.getDialogByPeerID(peerID)[0];\n if (dialog && mid > 0) {\n let dialogKey = apiMessage.pFlags.out\n ? 'read_outbox_max_id'\n : 'read_inbox_max_id';\n apiMessage.pFlags.unread = mid > dialog[dialogKey];\n }\n else if (options.isNew) {\n apiMessage.pFlags.unread = true;\n }\n // console.log(dT(), 'msg unread', mid, apiMessage.pFlags.out, dialog && dialog[apiMessage.pFlags.out ? 'read_outbox_max_id' : 'read_inbox_max_id'])\n if (apiMessage.reply_to_msg_id) {\n apiMessage.reply_to_mid = appMessagesIDsManager_1.default.getFullMessageID(apiMessage.reply_to_msg_id, channelID);\n }\n apiMessage.date -= serverTimeManager_2.default.serverTimeOffset;\n apiMessage.peerID = peerID;\n apiMessage.fromID = apiMessage.pFlags.post ? peerID : apiMessage.from_id;\n var fwdHeader = apiMessage.fwd_from;\n if (fwdHeader) {\n if (peerID == appUsersManager_1.default.getSelf().id) {\n if (fwdHeader.saved_from_peer && fwdHeader.saved_from_msg_id) {\n var savedFromPeerID = appPeersManager_1.default.getPeerID(fwdHeader.saved_from_peer);\n var savedFromMid = appMessagesIDsManager_1.default.getFullMessageID(fwdHeader.saved_from_msg_id, appPeersManager_1.default.isChannel(savedFromPeerID) ? -savedFromPeerID : 0);\n apiMessage.savedFrom = savedFromPeerID + '_' + savedFromMid;\n }\n apiMessage.fromID = fwdHeader.channel_id ? -fwdHeader.channel_id : fwdHeader.from_id;\n }\n else {\n apiMessage.fwdPostID = fwdHeader.channel_post;\n }\n apiMessage.fwdFromID = fwdHeader.channel_id ? -fwdHeader.channel_id : fwdHeader.from_id;\n fwdHeader.date -= serverTimeManager_2.default.serverTimeOffset;\n }\n if (apiMessage.via_bot_id > 0) {\n apiMessage.viaBotID = apiMessage.via_bot_id;\n }\n var mediaContext = {\n user_id: apiMessage.fromID,\n date: apiMessage.date\n };\n if (apiMessage.media) {\n switch (apiMessage.media._) {\n case 'messageMediaEmpty':\n delete apiMessage.media;\n break;\n case 'messageMediaPhoto':\n if (apiMessage.media.ttl_seconds) {\n apiMessage.media = { _: 'messageMediaUnsupportedWeb' };\n }\n else {\n appPhotosManager_1.default.savePhoto(apiMessage.media.photo, mediaContext);\n }\n break;\n case 'messageMediaDocument':\n if (apiMessage.media.ttl_seconds) {\n apiMessage.media = { _: 'messageMediaUnsupportedWeb' };\n }\n else {\n appDocsManager_1.default.saveDoc(apiMessage.media.document, mediaContext);\n }\n break;\n case 'messageMediaWebPage':\n /* if(apiMessage.media.webpage.document) {\n appDocsManager.saveDoc(apiMessage.media.webpage.document, mediaContext);\n } */\n appWebPagesManager_1.default.saveWebPage(apiMessage.media.webpage, apiMessage.mid, mediaContext);\n break;\n /*case 'messageMediaGame':\n AppGamesManager.saveGame(apiMessage.media.game, apiMessage.mid, mediaContext);\n apiMessage.media.handleMessage = true;\n break; */\n case 'messageMediaInvoice':\n apiMessage.media = { _: 'messageMediaUnsupportedWeb' };\n break;\n case 'messageMediaGeoLive':\n apiMessage.media._ = 'messageMediaGeo';\n break;\n }\n }\n if (apiMessage.action) {\n var migrateFrom;\n var migrateTo;\n switch (apiMessage.action._) {\n case 'messageActionChatEditPhoto':\n appPhotosManager_1.default.savePhoto(apiMessage.action.photo, mediaContext);\n if (isBroadcast) {\n apiMessage.action._ = 'messageActionChannelEditPhoto';\n }\n break;\n case 'messageActionChatEditTitle':\n if (isBroadcast) {\n apiMessage.action._ = 'messageActionChannelEditTitle';\n }\n break;\n case 'messageActionChatDeletePhoto':\n if (isBroadcast) {\n apiMessage.action._ = 'messageActionChannelDeletePhoto';\n }\n break;\n case 'messageActionChatAddUser':\n if (apiMessage.action.users.length == 1) {\n apiMessage.action.user_id = apiMessage.action.users[0];\n if (apiMessage.fromID == apiMessage.action.user_id) {\n if (isChannel) {\n apiMessage.action._ = 'messageActionChatJoined';\n }\n else {\n apiMessage.action._ = 'messageActionChatReturn';\n }\n }\n }\n else if (apiMessage.action.users.length > 1) {\n apiMessage.action._ = 'messageActionChatAddUsers';\n }\n break;\n case 'messageActionChatDeleteUser':\n if (apiMessage.fromID == apiMessage.action.user_id) {\n apiMessage.action._ = 'messageActionChatLeave';\n }\n break;\n case 'messageActionChannelMigrateFrom':\n migrateFrom = -apiMessage.action.chat_id;\n migrateTo = -channelID;\n break;\n case 'messageActionChatMigrateTo':\n migrateFrom = -channelID;\n migrateTo = -apiMessage.action.channel_id;\n break;\n case 'messageActionHistoryClear':\n apiMessage.deleted = true;\n apiMessage.clear_history = true;\n apiMessage.pFlags.out = false;\n apiMessage.pFlags.unread = false;\n break;\n case 'messageActionPhoneCall':\n delete apiMessage.fromID;\n apiMessage.action.type =\n (apiMessage.pFlags.out ? 'out_' : 'in_') +\n (apiMessage.action.reason._ == 'phoneCallDiscardReasonMissed' ||\n apiMessage.action.reason._ == 'phoneCallDiscardReasonBusy'\n ? 'missed'\n : 'ok');\n break;\n }\n if (migrateFrom &&\n migrateTo &&\n !this.migratedFromTo[migrateFrom] &&\n !this.migratedToFrom[migrateTo]) {\n this.migrateChecks(migrateFrom, migrateTo);\n }\n }\n if (apiMessage.message && apiMessage.message.length) {\n var myEntities = richtextprocessor_1.RichTextProcessor.parseEntities(apiMessage.message);\n var apiEntities = apiMessage.entities || [];\n apiMessage.totalEntities = richtextprocessor_1.RichTextProcessor.mergeEntities(myEntities, apiEntities, !apiMessage.pending);\n }\n apiMessage.canBeEdited = this.canMessageBeEdited(apiMessage);\n if (!options.isEdited) {\n this.messagesStorage[mid] = apiMessage;\n }\n });\n }\n migrateChecks(migrateFrom, migrateTo) {\n if (!this.migratedFromTo[migrateFrom] &&\n !this.migratedToFrom[migrateTo] &&\n appChatsManager_1.default.hasChat(-migrateTo)) {\n var fromChat = appChatsManager_1.default.getChat(-migrateFrom);\n if (fromChat &&\n fromChat.migrated_to &&\n fromChat.migrated_to.channel_id == -migrateTo) {\n this.migratedFromTo[migrateFrom] = migrateTo;\n this.migratedToFrom[migrateTo] = migrateFrom;\n setTimeout(() => {\n var foundDialog = this.getDialogByPeerID(migrateFrom);\n if (foundDialog.length) {\n this.dialogsStorage.dialogs.splice(foundDialog[1], 1);\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: migrateFrom });\n }\n utils_1.$rootScope.$broadcast('dialog_migrate', { migrateFrom: migrateFrom, migrateTo: migrateTo });\n }, 100);\n }\n }\n }\n canMessageBeEdited(message) {\n var goodMedias = [\n 'messageMediaPhoto',\n 'messageMediaDocument',\n 'messageMediaWebPage',\n 'messageMediaPending'\n ];\n if (message._ != 'message' ||\n message.deleted ||\n message.fwd_from ||\n message.via_bot_id ||\n message.media && goodMedias.indexOf(message.media._) == -1 ||\n message.fromID && appUsersManager_1.default.isBot(message.fromID)) {\n return false;\n }\n if (message.media &&\n message.media._ == 'messageMediaDocument' &&\n message.media.document.sticker) {\n return false;\n }\n return true;\n }\n canEditMessage(messageID) {\n if (!this.messagesStorage[messageID]) {\n return false;\n }\n var message = this.messagesStorage[messageID];\n if (!message ||\n !message.canBeEdited) {\n return false;\n }\n if (this.getMessagePeer(message) == appUsersManager_1.default.getSelf().id) {\n return true;\n }\n if (message.date < utils_1.tsNow(true) - 2 * 86400 ||\n !message.pFlags.out) {\n return false;\n }\n return true;\n }\n applyConversations(dialogsResult) {\n appUsersManager_1.default.saveApiUsers(dialogsResult.users);\n appChatsManager_1.default.saveApiChats(dialogsResult.chats);\n this.saveMessages(dialogsResult.messages);\n //console.log('applyConversation', dialogsResult);\n var updatedDialogs = {};\n var hasUpdated = false;\n dialogsResult.dialogs.forEach((dialog) => {\n var peerID = appPeersManager_1.default.getPeerID(dialog.peer);\n var topMessage = dialog.top_message;\n var topPendingMesage = this.pendingTopMsgs[peerID];\n if (topPendingMesage) {\n if (!topMessage || this.getMessage(topPendingMesage).date > this.getMessage(topMessage).date) {\n dialog.top_message = topMessage = topPendingMesage;\n }\n }\n if (topMessage) {\n let wasDialogBefore = this.getDialogByPeerID(peerID)[0];\n // here need to just replace, not FULL replace dialog! WARNING\n if (wasDialogBefore && wasDialogBefore.pFlags && wasDialogBefore.pFlags.pinned) {\n if (!dialog.pFlags)\n dialog.pFlags = {};\n dialog.pFlags.pinned = true;\n dialog.pinnedIndex = wasDialogBefore.pinnedIndex;\n }\n this.saveConversation(dialog);\n if (wasDialogBefore) {\n this.clearDialogCache(topMessage);\n utils_1.$rootScope.$broadcast('dialog_top', dialog);\n }\n else {\n updatedDialogs[peerID] = dialog;\n hasUpdated = true;\n }\n }\n else {\n var foundDialog = this.getDialogByPeerID(peerID);\n if (foundDialog.length) {\n this.dialogsStorage.dialogs.splice(foundDialog[1], 1);\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID });\n }\n }\n if (this.newUpdatesAfterReloadToHandle[peerID] !== undefined) {\n for (let i in this.newUpdatesAfterReloadToHandle[peerID]) {\n let update = this.newUpdatesAfterReloadToHandle[peerID][i];\n this.handleUpdate(update);\n }\n delete this.newUpdatesAfterReloadToHandle[peerID];\n }\n });\n if (hasUpdated) {\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', updatedDialogs);\n }\n }\n clearDialogCache(msgID) {\n delete this.messagesForDialogs[msgID];\n }\n saveConversation(dialog) {\n var peerID = appPeersManager_1.default.getPeerID(dialog.peer);\n if (!peerID) {\n return false;\n }\n var channelID = appPeersManager_1.default.isChannel(peerID) ? -peerID : 0;\n var peerText = appPeersManager_1.default.getPeerSearchText(peerID);\n utils_1.SearchIndexManager.indexObject(peerID, peerText, this.dialogsIndex);\n //var isMegagroup = AppPeersManager.isMegagroup(channelID);\n if (dialog.top_message) {\n var mid = appMessagesIDsManager_1.default.getFullMessageID(dialog.top_message, channelID);\n var message = this.getMessage(mid);\n }\n else {\n var mid = this.tempID--;\n var message = {\n _: 'message',\n id: mid,\n mid: mid,\n from_id: appUsersManager_1.default.getSelf().id,\n to_id: appPeersManager_1.default.getOutputPeer(peerID),\n deleted: true,\n flags: 0,\n pFlags: { unread: false, out: true },\n date: 0,\n message: ''\n };\n this.saveMessages([message]);\n }\n var offsetDate = message.date;\n if (!channelID && peerID < 0) {\n var chat = appChatsManager_1.default.getChat(-peerID);\n if (chat && chat.migrated_to && chat.pFlags.deactivated) {\n var migratedToPeer = appPeersManager_1.default.getPeerID(chat.migrated_to);\n this.migratedFromTo[peerID] = migratedToPeer;\n this.migratedToFrom[migratedToPeer] = peerID;\n return;\n }\n }\n dialog.top_message = mid;\n dialog.read_inbox_max_id = appMessagesIDsManager_1.default.getFullMessageID(dialog.read_inbox_max_id, channelID);\n dialog.read_outbox_max_id = appMessagesIDsManager_1.default.getFullMessageID(dialog.read_outbox_max_id, channelID);\n var topDate = message.date;\n if (channelID) {\n var channel = appChatsManager_1.default.getChat(channelID);\n if (!topDate || channel.date && channel.date > topDate) {\n topDate = channel.date;\n }\n }\n var savedDraft = {}; // DraftsManager.saveDraft(peerID, dialog.draft); // warning\n if (savedDraft && savedDraft.date > topDate) {\n topDate = savedDraft.date;\n }\n if (dialog.pFlags.pinned) {\n topDate = this.generateDialogPinnedDate(dialog);\n //console.log('topDate', peerID, topDate);\n }\n dialog.index = this.generateDialogIndex(topDate);\n dialog.peerID = peerID;\n if (!dialog.folder_id)\n dialog.folder_id = 0;\n this.pushDialogToStorage(dialog, offsetDate);\n // Because we saved message without dialog present\n var unreadKey = message.pFlags.out ? 'read_outbox_max_id' : 'read_inbox_max_id';\n if (message.mid > 0) {\n if (message.mid > dialog[unreadKey])\n message.pFlags.unread = true;\n else\n message.pFlags.unread = false;\n }\n if (this.historiesStorage[peerID] === undefined && !message.deleted) {\n var historyStorage = { count: null, history: [], pending: [] };\n historyStorage[mid > 0 ? 'history' : 'pending'].push(mid);\n if (mid < 0 && message.pFlags.unread) {\n dialog.unread_count++;\n }\n this.historiesStorage[peerID] = historyStorage;\n if (this.mergeReplyKeyboard(historyStorage, message)) {\n utils_1.$rootScope.$broadcast('history_reply_markup', { peerID: peerID });\n }\n }\n //NotificationsManager.savePeerSettings(peerID, dialog.notify_settings); // warning\n /* if(dialog.pts || dialog.pFlags.pts) {\n console.warn('dialog pts!', dialog, dialog.pts);\n } */\n if (channelID && dialog.pts) {\n apiUpdatesManager_1.default.addChannelState(channelID, dialog.pts);\n }\n /*if(Config.Modes.packed && !channelID && dialog.unread_count > 0 &&\n this.maxSeenID && dialog.top_message > this.maxSeenID &&\n message.pFlags.unread && !message.pFlags.out) {\n var notifyPeer = message.flags & 16 ? message.from_id : peerID\n NotificationsManager.getPeerMuted(notifyPeer).then((muted: any) => {\n if(!muted) {\n this.notifyAboutMessage(message);\n }\n });\n }*/ // WARNING\n }\n /*public handleNotifications() {\n clearTimeout(this.notificationsHandlePromise);\n this.notificationsHandlePromise = 0;\n \n var timeout = $rootScope.idle.isIDLE /* && StatusManager.isOtherDeviceActive() * ? 30000 : 1000;\n Object.keys(this.notificationsToHandle).forEach((key: any) => {\n let notifyPeerToHandle = this.notificationsToHandle[key];\n notifyPeerToHandle.isMutedPromise.then((muted: boolean) => {\n var topMessage = notifyPeerToHandle.top_message\n if(muted ||\n !topMessage.pFlags.unread) {\n return;\n }\n \n setTimeout(() => {\n if(topMessage.pFlags.unread) {\n this.notifyAboutMessage(topMessage, {\n fwd_count: notifyPeerToHandle.fwd_count\n });\n }\n }, timeout);\n });\n });\n \n this.notificationsToHandle = {};\n }*/\n /*public notifyAboutMessage(message: any, options: any = {}) {\n var peerID = this.getMessagePeer(message);\n var peerString: string;\n var notification: any = {};\n var notificationMessage = '',\n notificationPhoto;\n \n var notifySettings: any = {}; //NotificationsManager.getNotifySettings(); // warning\n \n if(message.fwdFromID && options.fwd_count) {\n notificationMessage = options.fwd_count;// this.fwdMessagesPluralize(options.fwd_count); // warning\n } else if(message.message) {\n if(notifySettings.nopreview) {\n notificationMessage = 'conversation_message_sent';\n } else {\n notificationMessage = RichTextProcessor.wrapPlainText(message.message);\n }\n } else if(message.media) {\n var captionEmoji = '';\n switch (message.media._) {\n case 'messageMediaPhoto':\n notificationMessage = _('conversation_media_photo_raw');\n captionEmoji = 'рџ–ј';\n break\n case 'messageMediaDocument':\n switch (message.media.document.type) {\n case 'gif':\n notificationMessage = _('conversation_media_gif_raw');\n captionEmoji = 'рџЋ¬'\n break\n case 'sticker':\n notificationMessage = _('conversation_media_sticker');\n var stickerEmoji = message.media.document.stickerEmojiRaw;\n if(stickerEmoji !== undefined) {\n notificationMessage = RichTextProcessor.wrapPlainText(stickerEmoji) + ' ' + notificationMessage;\n }\n break;\n case 'video':\n notificationMessage = _('conversation_media_video_raw');\n captionEmoji = 'рџ“№';\n break;\n case 'round':\n notificationMessage = _('conversation_media_round_raw');\n captionEmoji = 'рџ“№';\n break;\n case 'voice':\n case 'audio':\n notificationMessage = _('conversation_media_audio_raw');\n break;\n default:\n if(message.media.document.file_name) {\n notificationMessage = RichTextProcessor.wrapPlainText('рџ“Ћ ' + message.media.document.file_name);\n } else {\n notificationMessage = _('conversation_media_document_raw');\n captionEmoji = 'рџ“Ћ';\n }\n break;\n }\n break;\n \n case 'messageMediaGeo':\n case 'messageMediaVenue':\n notificationMessage = _('conversation_media_location_raw');\n captionEmoji = 'рџ“Ќ';\n break;\n case 'messageMediaContact':\n notificationMessage = _('conversation_media_contact_raw');\n break;\n case 'messageMediaGame':\n notificationMessage = RichTextProcessor.wrapPlainText('рџЋ® ' + message.media.game.title);\n break;\n case 'messageMediaUnsupported':\n notificationMessage = _('conversation_media_unsupported_raw');\n break;\n default:\n notificationMessage = _('conversation_media_attachment_raw');\n break;\n }\n \n if(captionEmoji != '' &&\n message.media.caption) {\n notificationMessage = RichTextProcessor.wrapPlainText(captionEmoji + ' ' + message.media.caption);\n }\n } else if(message._ == 'messageService') {\n switch(message.action._) {\n case 'messageActionChatCreate':\n notificationMessage = _('conversation_group_created_raw');\n break\n case 'messageActionChatEditTitle':\n notificationMessage = _('conversation_group_renamed_raw');\n break\n case 'messageActionChatEditPhoto':\n notificationMessage = _('conversation_group_photo_updated_raw');\n break\n case 'messageActionChatDeletePhoto':\n notificationMessage = _('conversation_group_photo_removed_raw');\n break\n case 'messageActionChatAddUser':\n case 'messageActionChatAddUsers':\n notificationMessage = _('conversation_invited_user_message_raw');\n break\n case 'messageActionChatReturn':\n notificationMessage = _('conversation_returned_to_group_raw');\n break\n case 'messageActionChatJoined':\n notificationMessage = _('conversation_joined_group_raw');\n break\n case 'messageActionChatDeleteUser':\n notificationMessage = _('conversation_kicked_user_message_raw');\n break\n case 'messageActionChatLeave':\n notificationMessage = _('conversation_left_group_raw');\n break\n case 'messageActionChatJoinedByLink':\n notificationMessage = _('conversation_joined_by_link_raw');\n break\n case 'messageActionChannelCreate':\n notificationMessage = _('conversation_created_channel_raw');\n break\n case 'messageActionChannelEditTitle':\n notificationMessage = _('conversation_changed_channel_name_raw');\n break\n case 'messageActionChannelEditPhoto':\n notificationMessage = _('conversation_changed_channel_photo_raw')\n break\n case 'messageActionChannelDeletePhoto':\n notificationMessage = _('conversation_removed_channel_photo_raw')\n break\n case 'messageActionPinMessage':\n notificationMessage = _('conversation_pinned_message_raw')\n break\n case 'messageActionGameScore':\n notificationMessage = message.action.score;//this.gameScorePluralize(message.action.score); // warning\n break\n \n case 'messageActionPhoneCall':\n switch(message.action.type) {\n case 'out_missed':\n notificationMessage = _('message_service_phonecall_canceled_raw')\n break\n case 'in_missed':\n notificationMessage = _('message_service_phonecall_missed_raw')\n break\n case 'out_ok':\n notificationMessage = _('message_service_phonecall_outgoing_raw')\n break\n case 'in_ok':\n notificationMessage = _('message_service_phonecall_incoming_raw')\n break\n }\n break\n }\n }\n \n if(peerID > 0) {\n var fromUser = appUsersManager.getUser(message.from_id);\n var fromPhoto = appUsersManager.getUserPhoto(message.from_id);\n \n notification.title = (fromUser.first_name || '') +\n (fromUser.first_name && fromUser.last_name ? ' ' : '') +\n (fromUser.last_name || '')\n if(!notification.title) {\n notification.title = fromUser.phone || _('conversation_unknown_user_raw')\n }\n \n notificationPhoto = fromPhoto\n \n peerString = appUsersManager.getUserString(peerID)\n } else {\n notification.title = appChatsManager.getChat(-peerID).title || _('conversation_unknown_chat_raw')\n \n if(message.from_id > 0) {\n var fromUser = appUsersManager.getUser(message.from_id)\n notification.title = (fromUser.first_name || fromUser.last_name || _('conversation_unknown_user_raw')) +\n ' @ ' +\n notification.title\n }\n \n notificationPhoto = appChatsManager.getChatPhoto(-peerID)\n \n peerString = appChatsManager.getChatString(-peerID)\n }\n \n notification.title = RichTextProcessor.wrapPlainText(notification.title)\n \n notification.onclick = function () {\n $rootScope.$broadcast('history_focus', {\n peerString: peerString,\n messageID: message.flags & 16 ? message.mid : 0\n })\n }\n \n notification.message = notificationMessage\n notification.key = 'msg' + message.mid\n notification.tag = peerString\n notification.silent = message.pFlags.silent || false\n \n if(notificationPhoto.location && !notificationPhoto.location.empty) {\n apiFileManager.downloadSmallFile(notificationPhoto.location/* , notificationPhoto.size *)\n .then((blob) => {\n if(message.pFlags.unread) {\n notification.image = blob\n // NotificationsManager.notify(notification) // warning\n }\n })\n } else {\n // NotificationsManager.notify(notification) // warning\n }\n }*/\n mergeReplyKeyboard(historyStorage, message) {\n // console.log('merge', message.mid, message.reply_markup, historyStorage.reply_markup)\n if (!message.reply_markup &&\n !message.pFlags.out &&\n !message.action) {\n return false;\n }\n if (message.reply_markup &&\n message.reply_markup._ == 'replyInlineMarkup') {\n return false;\n }\n var messageReplyMarkup = message.reply_markup;\n var lastReplyMarkup = historyStorage.reply_markup;\n if (messageReplyMarkup) {\n if (lastReplyMarkup && lastReplyMarkup.mid >= message.mid) {\n return false;\n }\n if (messageReplyMarkup.pFlags.selective &&\n !(message.flags & 16)) {\n return false;\n }\n if (historyStorage.maxOutID &&\n message.mid < historyStorage.maxOutID &&\n messageReplyMarkup.pFlags.single_use) {\n messageReplyMarkup.pFlags.hidden = true;\n }\n messageReplyMarkup = Object.assign({\n mid: message.mid\n }, messageReplyMarkup);\n if (messageReplyMarkup._ != 'replyKeyboardHide') {\n messageReplyMarkup.fromID = message.from_id;\n }\n historyStorage.reply_markup = messageReplyMarkup;\n // console.log('set', historyStorage.reply_markup)\n return true;\n }\n if (message.pFlags.out) {\n if (lastReplyMarkup) {\n if (lastReplyMarkup.pFlags.single_use &&\n !lastReplyMarkup.pFlags.hidden &&\n (message.mid > lastReplyMarkup.mid || message.mid < 0) &&\n message.message) {\n lastReplyMarkup.pFlags.hidden = true;\n // console.log('set', historyStorage.reply_markup)\n return true;\n }\n }\n else if (!historyStorage.maxOutID ||\n message.mid > historyStorage.maxOutID) {\n historyStorage.maxOutID = message.mid;\n }\n }\n if (message.action &&\n message.action._ == 'messageActionChatDeleteUser' &&\n (lastReplyMarkup\n ? message.action.user_id == lastReplyMarkup.fromID\n : appUsersManager_1.default.isBot(message.action.user_id))) {\n historyStorage.reply_markup = {\n _: 'replyKeyboardHide',\n mid: message.mid,\n flags: 0,\n pFlags: {}\n };\n // console.log('set', historyStorage.reply_markup)\n return true;\n }\n return false;\n }\n getSearch(peerID = 0, query = '', inputFilter = { _: 'inputMessagesFilterEmpty' }, maxID, limit, offsetRate = 0) {\n //peerID = peerID ? parseInt(peerID) : 0;\n var foundMsgs = [];\n var useSearchCache = !query;\n var newSearchFilter = { peer: peerID, filter: inputFilter };\n var sameSearchCache = useSearchCache\n && utils_1.deepEqual(this.lastSearchFilter, newSearchFilter); //angular.equals(this.lastSearchFilter, newSearchFilter);\n if (useSearchCache && !sameSearchCache) {\n // console.warn(dT(), 'new search filter', lastSearchFilter, newSearchFilter)\n this.lastSearchFilter = newSearchFilter;\n this.lastSearchResults = [];\n }\n //console.log(dT(), 'search', useSearchCache, sameSearchCache, this.lastSearchResults, maxID);\n if (peerID && !maxID && !query) {\n var historyStorage = this.historiesStorage[peerID];\n if (historyStorage !== undefined && historyStorage.history.length) {\n var neededContents = {}, neededDocType;\n var neededLimit = limit || 20;\n var message;\n switch (inputFilter._) {\n case 'inputMessagesFilterPhotos':\n neededContents['messageMediaPhoto'] = true;\n break;\n case 'inputMessagesFilterPhotoVideo':\n neededContents['messageMediaPhoto'] = true;\n neededContents['messageMediaDocument'] = true;\n neededDocType = 'video';\n break;\n case 'inputMessagesFilterVideo':\n neededContents['messageMediaDocument'] = true;\n neededDocType = 'video';\n break;\n case 'inputMessagesFilterDocument':\n neededContents['messageMediaDocument'] = true;\n neededDocType = false;\n break;\n case 'inputMessagesFilterVoice':\n neededContents['messageMediaDocument'] = true;\n neededDocType = 'voice';\n break;\n case 'inputMessagesFilterRoundVideo':\n neededContents['messageMediaDocument'] = true;\n neededDocType = 'round';\n break;\n case 'inputMessagesFilterMusic':\n neededContents['messageMediaDocument'] = true;\n neededDocType = 'audio';\n break;\n case 'inputMessagesFilterUrl':\n neededContents['url'] = true;\n break;\n case 'inputMessagesFilterMyMentions':\n neededContents['mentioned'] = true;\n break;\n default:\n return Promise.resolve({\n count: 0,\n next_rate: 0,\n history: []\n });\n }\n for (let i = 0; i < historyStorage.history.length; i++) {\n message = this.messagesStorage[historyStorage.history[i]];\n if (message.media && neededContents[message.media._]) {\n if (neededDocType !== undefined &&\n message.media._ == 'messageMediaDocument' &&\n message.media.document.type != neededDocType) {\n continue;\n }\n foundMsgs.push(message.mid);\n if (foundMsgs.length >= neededLimit) {\n break;\n }\n }\n }\n }\n // console.warn(dT(), 'before append', foundMsgs)\n if (foundMsgs.length < neededLimit && this.lastSearchResults.length && sameSearchCache) {\n var minID = foundMsgs.length ? foundMsgs[foundMsgs.length - 1] : false;\n for (let i = 0; i < this.lastSearchResults.length; i++) {\n if (minID === false || this.lastSearchResults[i] < minID) {\n foundMsgs.push(this.lastSearchResults[i]);\n if (foundMsgs.length >= neededLimit) {\n break;\n }\n }\n }\n }\n // console.warn(dT(), 'after append', foundMsgs)\n }\n if (foundMsgs.length || limit == 1000) {\n if (useSearchCache) {\n this.lastSearchResults = utils_1.listMergeSorted(this.lastSearchResults, foundMsgs);\n }\n return Promise.resolve({\n count: 0,\n next_rate: 0,\n history: foundMsgs\n });\n }\n var apiPromise;\n if (peerID || !query) {\n apiPromise = apiManager_1.default.invokeApi('messages.search', {\n flags: 0,\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\n q: query || '',\n filter: inputFilter || { _: 'inputMessagesFilterEmpty' },\n min_date: 0,\n max_date: 0,\n limit: limit || 20,\n offset_id: appMessagesIDsManager_1.default.getMessageLocalID(maxID) || 0,\n add_offset: 0,\n max_id: 0,\n min_id: 0\n }, {\n timeout: 300,\n noErrorBox: true\n });\n }\n else {\n var offsetDate = 0;\n var offsetPeerID = 0;\n var offsetID = 0;\n var offsetMessage = maxID && this.getMessage(maxID);\n if (offsetMessage && offsetMessage.date) {\n offsetDate = offsetMessage.date + serverTimeManager_1.default.serverTimeOffset;\n offsetID = offsetMessage.id;\n offsetPeerID = this.getMessagePeer(offsetMessage);\n }\n apiPromise = apiManager_1.default.invokeApi('messages.searchGlobal', {\n q: query,\n offset_rate: offsetRate,\n offset_peer: appPeersManager_1.default.getInputPeerByID(offsetPeerID),\n offset_id: appMessagesIDsManager_1.default.getMessageLocalID(offsetID),\n limit: limit || 20\n }, {\n timeout: 300,\n noErrorBox: true\n });\n }\n return apiPromise.then((searchResult) => {\n appUsersManager_1.default.saveApiUsers(searchResult.users);\n appChatsManager_1.default.saveApiChats(searchResult.chats);\n this.saveMessages(searchResult.messages);\n ///////////console.log('messages.search result:', searchResult);\n var foundCount = searchResult.count || searchResult.messages.length;\n foundMsgs = [];\n searchResult.messages.forEach((message) => {\n var peerID = this.getMessagePeer(message);\n if (peerID < 0) {\n var chat = appChatsManager_1.default.getChat(-peerID);\n if (chat.migrated_to) {\n this.migrateChecks(peerID, -chat.migrated_to.channel_id);\n }\n }\n foundMsgs.push(message.mid);\n });\n if (useSearchCache &&\n (!maxID || sameSearchCache && this.lastSearchResults.indexOf(maxID) >= 0)) {\n this.lastSearchResults = utils_1.listMergeSorted(this.lastSearchResults, foundMsgs);\n }\n // console.log(dT(), 'after API', foundMsgs, lastSearchResults)\n return {\n count: foundCount,\n next_rate: searchResult.next_rate,\n history: foundMsgs\n };\n }, (error) => {\n if (error.code == 400) {\n error.handled = true;\n }\n return Promise.reject(error);\n });\n }\n generateDialogPinnedDate(dialog) {\n let pinnedIndex;\n if (dialog) {\n if (dialog.pinnedIndex) {\n pinnedIndex = dialog.pinnedIndex;\n }\n else {\n dialog.pinnedIndex = pinnedIndex = this.pinnedIndex++;\n }\n }\n else {\n pinnedIndex = this.pinnedIndex++;\n }\n return 0x7fffff00 + (pinnedIndex & 0xff);\n }\n handleNewMessages() {\n clearTimeout(this.newMessagesHandlePromise);\n this.newMessagesHandlePromise = 0;\n utils_1.$rootScope.$broadcast('history_multiappend', this.newMessagesToHandle);\n this.newMessagesToHandle = {};\n }\n handleNewDialogs() {\n clearTimeout(this.newDialogsHandlePromise);\n this.newDialogsHandlePromise = 0;\n var newMaxSeenID = 0;\n Object.keys(this.newDialogsToHandle).forEach((peerID) => {\n let dialog = this.newDialogsToHandle[peerID];\n if (dialog.reload) {\n this.reloadConversation(+peerID);\n delete this.newDialogsToHandle[peerID];\n }\n else {\n this.pushDialogToStorage(dialog);\n if (!appPeersManager_1.default.isChannel(+peerID)) {\n newMaxSeenID = Math.max(newMaxSeenID, dialog.top_message || 0);\n }\n }\n });\n if (newMaxSeenID != 0) {\n this.incrementMaxSeenID(newMaxSeenID);\n }\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', this.newDialogsToHandle);\n this.newDialogsToHandle = {};\n }\n readHistory(peerID, maxID = 0, minID = 0) {\n // console.trace('start read')\n var isChannel = appPeersManager_1.default.isChannel(peerID);\n var historyStorage = this.historiesStorage[peerID];\n var foundDialog = this.getDialogByPeerID(peerID)[0];\n if (!foundDialog || !foundDialog.unread_count) {\n if (!historyStorage || !historyStorage.history.length) {\n return Promise.resolve(false);\n }\n let messageID, message;\n let foundUnread = false;\n for (let i = historyStorage.history.length; i >= 0; i--) {\n messageID = historyStorage.history[i];\n message = this.messagesStorage[messageID];\n if (message && !message.pFlags.out && message.pFlags.unread) {\n foundUnread = true;\n break;\n }\n }\n if (!foundUnread) {\n return Promise.resolve(false);\n }\n }\n if (historyStorage.readPromise) {\n return historyStorage.readPromise;\n }\n var apiPromise;\n if (isChannel) {\n apiPromise = apiManager_1.default.invokeApi('channels.readHistory', {\n channel: appChatsManager_1.default.getChannelInput(-peerID),\n max_id: maxID\n });\n }\n else {\n apiPromise = apiManager_1.default.invokeApi('messages.readHistory', {\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\n max_id: maxID\n }).then((affectedMessages) => {\n apiUpdatesManager_1.default.processUpdateMessage({\n _: 'updateShort',\n update: {\n _: 'updatePts',\n pts: affectedMessages.pts,\n pts_count: affectedMessages.pts_count\n }\n });\n });\n }\n historyStorage.readPromise = apiPromise.then(() => {\n if (foundDialog) {\n // console.log('done read history', peerID)\n let index = -1;\n if (maxID != 0 && historyStorage && historyStorage.history.length) {\n index = historyStorage.history.findIndex((mid) => mid == maxID);\n }\n foundDialog.unread_count = index == -1 ? 0 : index;\n ////////console.log('readHistory set unread_count to:', foundDialog.unread_count, foundDialog);\n utils_1.$rootScope.$broadcast('dialog_unread', { peerID: peerID, count: foundDialog.unread_count });\n utils_1.$rootScope.$broadcast('messages_read');\n if (historyStorage && historyStorage.history.length) {\n ////////console.warn('readPromise:', index, historyStorage.history[index != -1 ? index : 0]);\n foundDialog.read_inbox_max_id = historyStorage.history[index != -1 ? index : 0];\n }\n return true;\n }\n return false;\n /* if(foundDialog) {\n // console.log('done read history', peerID)\n foundDialog.unread_count = 0\n $rootScope.$broadcast('dialog_unread', {peerID: peerID, count: 0})\n $rootScope.$broadcast('messages_read')\n if(historyStorage && historyStorage.history.length) {\n foundDialog.read_inbox_max_id = historyStorage.history[0]\n }\n } */\n }).finally(() => {\n delete historyStorage.readPromise;\n });\n if (historyStorage && historyStorage.history.length) {\n let messageID;\n let message, i;\n for (i = 0; i < historyStorage.history.length; i++) {\n messageID = historyStorage.history[i];\n message = this.messagesStorage[messageID];\n if (message && !message.pFlags.out) {\n message.pFlags.unread = false;\n if (this.messagesForHistory[messageID]) {\n this.messagesForHistory[messageID].pFlags.unread = false;\n }\n if (this.messagesForDialogs[messageID]) {\n this.messagesForDialogs[messageID].pFlags.unread = false;\n }\n //NotificationsManager.cancel('msg' + messageID); // warning\n }\n if (messageID == minID)\n break;\n }\n }\n // NotificationsManager.soundReset(AppPeersManager.getPeerString(peerID)) // warning\n return historyStorage.readPromise;\n }\n readMessages(messageIDs) {\n var splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(messageIDs);\n Object.keys(splitted.msgIDs).forEach((channelID) => {\n channelID = +channelID;\n let msgIDs = splitted.msgIDs[channelID];\n if (channelID > 0) {\n apiManager_1.default.invokeApi('channels.readMessageContents', {\n channel: appChatsManager_1.default.getChannelInput(channelID),\n id: msgIDs\n }).then(() => {\n apiUpdatesManager_1.default.processUpdateMessage({\n _: 'updateShort',\n update: {\n _: 'updateChannelReadMessagesContents',\n channel_id: channelID,\n messages: msgIDs\n }\n });\n });\n }\n else {\n apiManager_1.default.invokeApi('messages.readMessageContents', {\n id: msgIDs\n }).then((affectedMessages) => {\n apiUpdatesManager_1.default.processUpdateMessage({\n _: 'updateShort',\n update: {\n _: 'updateReadMessagesContents',\n messages: msgIDs,\n pts: affectedMessages.pts,\n pts_count: affectedMessages.pts_count\n }\n });\n });\n }\n });\n }\n handleUpdate(update) {\n //console.log('AMM: handleUpdate:', update._);\n switch (update._) {\n case 'updateMessageID': {\n var randomID = update.random_id;\n var pendingData = this.pendingByRandomID[randomID];\n if (pendingData) {\n var peerID = pendingData[0];\n var tempID = pendingData[1];\n var channelID = appPeersManager_1.default.isChannel(peerID) ? -peerID : 0;\n var mid = appMessagesIDsManager_1.default.getFullMessageID(update.id, channelID);\n var message = this.messagesStorage[mid];\n if (message) {\n var historyStorage = this.historiesStorage[peerID];\n var pos = historyStorage.pending.indexOf(tempID);\n if (pos != -1) {\n historyStorage.pending.splice(pos, 1);\n }\n delete this.messagesForHistory[tempID];\n delete this.messagesStorage[tempID];\n var msgs = {};\n msgs[tempID] = true;\n //$rootScope.$broadcast('history_delete', {peerID: peerID, msgs: msgs}); // commented 11.02.2020\n this.finalizePendingMessageCallbacks(tempID, mid);\n }\n else {\n this.pendingByMessageID[mid] = randomID;\n }\n }\n break;\n }\n case 'updateNewMessage':\n case 'updateNewChannelMessage': {\n var message = update.message;\n var peerID = this.getMessagePeer(message);\n var historyStorage = this.historiesStorage[peerID];\n var foundDialog = this.getDialogByPeerID(peerID);\n if (!foundDialog.length) {\n this.newDialogsToHandle[peerID] = { reload: true };\n if (!this.newDialogsHandlePromise) {\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\n }\n if (this.newUpdatesAfterReloadToHandle[peerID] === undefined) {\n this.newUpdatesAfterReloadToHandle[peerID] = [];\n }\n this.newUpdatesAfterReloadToHandle[peerID].push(update);\n break;\n }\n if (update._ == 'updateNewChannelMessage') {\n var chat = appChatsManager_1.default.getChat(-peerID);\n if (chat.pFlags && (chat.pFlags.left || chat.pFlags.kicked)) {\n break;\n }\n }\n this.saveMessages([message], { isNew: true });\n // console.warn(dT(), 'message unread', message.mid, message.pFlags.unread)\n if (historyStorage === undefined) {\n historyStorage = this.historiesStorage[peerID] = {\n count: null,\n history: [],\n pending: []\n };\n }\n var history = message.mid > 0 ? historyStorage.history : historyStorage.pending;\n if (history.indexOf(message.mid) != -1) {\n return false;\n }\n var topMsgID = history[0];\n history.unshift(message.mid);\n if (message.mid > 0 && message.mid < topMsgID) {\n history.sort((a, b) => {\n return b - a;\n });\n }\n if (message.mid > 0 &&\n historyStorage.count !== null) {\n historyStorage.count++;\n }\n if (this.mergeReplyKeyboard(historyStorage, message)) {\n utils_1.$rootScope.$broadcast('history_reply_markup', { peerID: peerID });\n }\n if (!message.pFlags.out && message.from_id) {\n appUsersManager_1.default.forceUserOnline(message.from_id);\n }\n var randomID = this.pendingByMessageID[message.mid], pendingMessage;\n if (randomID) {\n if (pendingMessage = this.finalizePendingMessage(randomID, message)) {\n utils_1.$rootScope.$broadcast('history_update', { peerID: peerID, mid: message.mid });\n }\n delete this.pendingByMessageID[message.mid];\n }\n if (!pendingMessage) {\n if (this.newMessagesToHandle[peerID] === undefined) {\n this.newMessagesToHandle[peerID] = [];\n }\n this.newMessagesToHandle[peerID].push(message.mid);\n if (!this.newMessagesHandlePromise) {\n this.newMessagesHandlePromise = window.setTimeout(this.handleNewMessages.bind(this), 0);\n }\n }\n var inboxUnread = !message.pFlags.out && message.pFlags.unread;\n var dialog = foundDialog[0];\n dialog.top_message = message.mid;\n if (inboxUnread) {\n dialog.unread_count++;\n }\n if (!dialog.pFlags.pinned || !dialog.index) {\n dialog.index = this.generateDialogIndex(message.date);\n }\n this.newDialogsToHandle[peerID] = dialog;\n if (!this.newDialogsHandlePromise) {\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\n }\n /*if(inboxUnread &&\n ($rootScope.selectedPeerID != peerID || $rootScope.idle.isIDLE)) {\n var notifyPeer = message.flags & 16 ? message.from_id : peerID;\n var notifyPeerToHandle = this.notificationsToHandle[notifyPeer];\n if(notifyPeerToHandle === undefined) {\n notifyPeerToHandle = this.notificationsToHandle[notifyPeer] = {\n isMutedPromise: Promise.resolve()/* NotificationsManager.getPeerMuted(notifyPeer), // WARNING\n fwd_count: 0,\n from_id: 0\n };\n }\n \n if(notifyPeerToHandle.from_id != message.from_id) {\n notifyPeerToHandle.from_id = message.from_id;\n notifyPeerToHandle.fwd_count = 0;\n }\n if(message.fwdFromID) {\n notifyPeerToHandle.fwd_count++;\n }\n \n notifyPeerToHandle.top_message = message;\n \n if(!this.notificationsHandlePromise) {\n this.notificationsHandlePromise = window.setTimeout(this.handleNotifications.bind(this), 1000);\n }\n } */\n break;\n }\n case 'updateDialogPinned': {\n var peerID = appPeersManager_1.default.getPeerID(update.peer);\n var foundDialog = this.getDialogByPeerID(peerID);\n if (!foundDialog.length || !update.pFlags.pinned) {\n this.newDialogsToHandle[peerID] = { reload: true };\n if (!this.newDialogsHandlePromise) {\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\n }\n break;\n }\n var dialog = foundDialog[0];\n dialog.index = this.generateDialogIndex(this.generateDialogPinnedDate(dialog));\n dialog.pFlags.pinned = true;\n break;\n }\n case 'updatePinnedDialogs': {\n var newPinned = {};\n if (!update.order) {\n apiManager_1.default.invokeApi('messages.getPinnedDialogs', {}).then((dialogsResult) => {\n dialogsResult.dialogs.reverse();\n this.applyConversations(dialogsResult);\n dialogsResult.dialogs.forEach((dialog) => {\n newPinned[dialog.peerID] = true;\n });\n this.dialogsStorage.dialogs.forEach((dialog) => {\n var peerID = dialog.peerID;\n if (dialog.pFlags.pinned && !newPinned[peerID]) {\n this.newDialogsToHandle[peerID] = { reload: true };\n if (!this.newDialogsHandlePromise) {\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\n }\n }\n });\n });\n break;\n }\n update.order.reverse();\n update.order.forEach((peer) => {\n var peerID = appPeersManager_1.default.getPeerID(peer);\n newPinned[peerID] = true;\n var foundDialog = this.getDialogByPeerID(peerID);\n if (!foundDialog.length) {\n this.newDialogsToHandle[peerID] = { reload: true };\n if (!this.newDialogsHandlePromise) {\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\n }\n return;\n }\n var dialog = foundDialog[0];\n dialog.index = this.generateDialogIndex(this.generateDialogPinnedDate(dialog));\n dialog.pFlags.pinned = true;\n this.newDialogsToHandle[peerID] = dialog;\n if (!this.newDialogsHandlePromise) {\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\n }\n });\n this.dialogsStorage.dialogs.forEach((dialog) => {\n var peerID = dialog.peerID;\n if (dialog.pFlags.pinned && !newPinned[peerID]) {\n this.newDialogsToHandle[peerID] = { reload: true };\n if (!this.newDialogsHandlePromise) {\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\n }\n }\n });\n break;\n }\n case 'updateEditMessage':\n case 'updateEditChannelMessage': {\n var message = update.message;\n var peerID = this.getMessagePeer(message);\n var channelID = message.to_id._ == 'peerChannel' ? -peerID : 0;\n var mid = appMessagesIDsManager_1.default.getFullMessageID(message.id, channelID);\n if (this.messagesStorage[mid] === undefined) {\n break;\n }\n // console.trace(dT(), 'edit message', message)\n this.saveMessages([message], { isEdited: true });\n utils_1.safeReplaceObject(this.messagesStorage[mid], message);\n var wasForHistory = this.messagesForHistory[mid];\n if (wasForHistory !== undefined) {\n delete this.messagesForHistory[mid];\n var newForHistory = this.wrapForHistory(mid);\n utils_1.safeReplaceObject(wasForHistory, newForHistory);\n this.messagesForHistory[mid] = wasForHistory;\n }\n var dialog = this.getDialogByPeerID(peerID)[0];\n var isTopMessage = dialog && dialog.top_message == mid;\n if (message.clear_history) { // that's will never happen\n if (isTopMessage) {\n utils_1.$rootScope.$broadcast('dialog_flush', { peerID: peerID });\n }\n else {\n var msgs = {};\n msgs[mid] = true;\n /////////$rootScope.$broadcast('history_delete', {peerID: peerID, msgs: msgs}); // commented 11.02.2020\n }\n }\n else {\n utils_1.$rootScope.$broadcast('message_edit', {\n peerID: peerID,\n id: message.id,\n mid: mid,\n justMedia: false\n });\n if (isTopMessage) {\n var updatedDialogs = {};\n updatedDialogs[peerID] = dialog;\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', updatedDialogs);\n }\n }\n break;\n }\n case 'updateReadHistoryInbox':\n case 'updateReadHistoryOutbox':\n case 'updateReadChannelInbox':\n case 'updateReadChannelOutbox': {\n var isOut = update._ == 'updateReadHistoryOutbox' || update._ == 'updateReadChannelOutbox';\n var channelID = update.channel_id;\n var maxID = appMessagesIDsManager_1.default.getFullMessageID(update.max_id, channelID);\n var peerID = channelID ? -channelID : appPeersManager_1.default.getPeerID(update.peer);\n var foundDialog = this.getDialogByPeerID(peerID);\n var history = (this.historiesStorage[peerID] || {}).history || [];\n var newUnreadCount = 0;\n var length = history.length;\n var foundAffected = false;\n var messageID, message;\n var i;\n //console.warn(dT(), 'read', peerID, isOut ? 'out' : 'in', maxID)\n if (peerID > 0 && isOut) {\n appUsersManager_1.default.forceUserOnline(peerID);\n }\n for (i = 0; i < length; i++) {\n messageID = history[i];\n if (messageID > maxID) {\n continue;\n }\n message = this.messagesStorage[messageID];\n if (message.pFlags.out != isOut) {\n continue;\n }\n if (!message.pFlags.unread) {\n break;\n }\n // console.warn('read', messageID, message.pFlags.unread, message)\n if (message && message.pFlags.unread) {\n message.pFlags.unread = false;\n if (this.messagesForHistory[messageID]) {\n this.messagesForHistory[messageID].pFlags.unread = false;\n if (!foundAffected) {\n foundAffected = true;\n }\n }\n if (this.messagesForDialogs[messageID]) {\n this.messagesForDialogs[messageID].pFlags.unread = false;\n }\n if (!message.pFlags.out) {\n if (foundDialog[0]) {\n newUnreadCount = --foundDialog[0].unread_count;\n }\n //NotificationsManager.cancel('msg' + messageID); // warning\n }\n }\n }\n if (foundDialog[0]) {\n if (!isOut && newUnreadCount && foundDialog[0].top_message <= maxID) {\n newUnreadCount = foundDialog[0].unread_count = 0;\n }\n let dialogKey = isOut ? 'read_outbox_max_id' : 'read_inbox_max_id';\n foundDialog[0][dialogKey] = maxID;\n }\n // need be commented for read out messages\n //if(newUnreadCount != 0 || !isOut) { // fix 16.11.2019 (maybe not)\n //////////console.warn(dT(), 'cnt', peerID, newUnreadCount, isOut, foundDialog, update, foundAffected);\n utils_1.$rootScope.$broadcast('dialog_unread', { peerID: peerID, count: newUnreadCount });\n //}\n if (foundAffected) {\n utils_1.$rootScope.$broadcast('messages_read');\n }\n break;\n }\n case 'updateChannelReadMessagesContents': {\n var channelID = update.channel_id;\n var newMessages = [];\n update.messages.forEach((msgID) => {\n newMessages.push(appMessagesIDsManager_1.default.getFullMessageID(msgID, channelID));\n });\n update.messages = newMessages;\n }\n case 'updateReadMessagesContents': {\n var messages = update.messages;\n var len = messages.length;\n var i;\n var messageID, message;\n var historyMessage;\n for (i = 0; i < len; i++) {\n messageID = messages[i];\n if (message = this.messagesStorage[messageID]) {\n delete message.pFlags.media_unread;\n }\n if (historyMessage = this.messagesForHistory[messageID]) {\n delete historyMessage.pFlags.media_unread;\n }\n }\n break;\n }\n case 'updateChannelAvailableMessages': {\n var channelID = update.channel_id;\n var messages = [];\n var peerID = -channelID;\n var history = (this.historiesStorage[peerID] || {}).history || [];\n if (history.length) {\n history.forEach((msgID) => {\n if (!update.available_min_id ||\n appMessagesIDsManager_1.default.getMessageLocalID(msgID) <= update.available_min_id) {\n messages.push(msgID);\n }\n });\n }\n update.messages = messages;\n }\n case 'updateDeleteMessages':\n case 'updateDeleteChannelMessages': {\n var historiesUpdated = {};\n var channelID = update.channel_id;\n var messageID;\n var message, i;\n var peerID, foundDialog;\n let history;\n var peerMessagesToHandle;\n var peerMessagesHandlePos;\n for (i = 0; i < update.messages.length; i++) {\n messageID = appMessagesIDsManager_1.default.getFullMessageID(update.messages[i], channelID);\n message = this.messagesStorage[messageID];\n if (message) {\n peerID = this.getMessagePeer(message);\n history = historiesUpdated[peerID] || (historiesUpdated[peerID] = { count: 0, unread: 0, msgs: {} });\n if (!message.pFlags.out && message.pFlags.unread) {\n history.unread++;\n // NotificationsManager.cancel('msg' + messageID); // warning\n }\n history.count++;\n history.msgs[messageID] = true;\n if (this.messagesForHistory[messageID]) {\n this.messagesForHistory[messageID].deleted = true;\n delete this.messagesForHistory[messageID];\n }\n if (this.messagesForDialogs[messageID]) {\n this.messagesForDialogs[messageID].deleted = true;\n delete this.messagesForDialogs[messageID];\n }\n message.deleted = true;\n this.messagesStorage[messageID] = {\n deleted: true,\n id: messageID,\n from_id: message.from_id,\n to_id: message.to_id,\n flags: message.flags,\n pFlags: message.pFlags,\n date: message.date\n };\n peerMessagesToHandle = this.newMessagesToHandle[peerID];\n if (peerMessagesToHandle && peerMessagesToHandle.length) {\n peerMessagesHandlePos = peerMessagesToHandle.indexOf(messageID);\n if (peerMessagesHandlePos != -1) {\n peerMessagesToHandle.splice(peerMessagesHandlePos);\n }\n }\n }\n }\n Object.keys(historiesUpdated).forEach((peerID) => {\n let updatedData = historiesUpdated[peerID];\n var historyStorage = this.historiesStorage[peerID];\n if (historyStorage !== undefined) {\n var newHistory = [];\n var newPending = [];\n for (var i = 0; i < historyStorage.history.length; i++) {\n if (!updatedData.msgs[historyStorage.history[i]]) {\n newHistory.push(historyStorage.history[i]);\n }\n }\n historyStorage.history = newHistory;\n if (updatedData.count &&\n historyStorage.count !== null &&\n historyStorage.count > 0) {\n historyStorage.count -= updatedData.count;\n if (historyStorage.count < 0) {\n historyStorage.count = 0;\n }\n }\n for (var i = 0; i < historyStorage.pending.length; i++) {\n if (!updatedData.msgs[historyStorage.pending[i]]) {\n newPending.push(historyStorage.pending[i]);\n }\n }\n historyStorage.pending = newPending;\n utils_1.$rootScope.$broadcast('history_delete', { peerID: peerID, msgs: updatedData.msgs });\n }\n var foundDialog = this.getDialogByPeerID(+peerID)[0];\n if (foundDialog) {\n if (updatedData.unread) {\n foundDialog.unread_count -= updatedData.unread;\n utils_1.$rootScope.$broadcast('dialog_unread', {\n peerID: peerID,\n count: foundDialog.unread_count\n });\n }\n if (updatedData.msgs[foundDialog.top_message]) {\n this.reloadConversation(+peerID);\n }\n }\n });\n break;\n }\n case 'updateChannel': {\n var channelID = update.channel_id;\n var peerID = -channelID;\n var channel = appChatsManager_1.default.getChat(channelID);\n var needDialog = channel._ == 'channel' && (!channel.pFlags.left && !channel.pFlags.kicked);\n var foundDialog = this.getDialogByPeerID(peerID);\n var hasDialog = foundDialog.length > 0;\n var canViewHistory = channel._ == 'channel' && (channel.username || !channel.pFlags.left && !channel.pFlags.kicked) && true || false;\n var hasHistory = this.historiesStorage[peerID] !== undefined;\n if (canViewHistory != hasHistory) {\n delete this.historiesStorage[peerID];\n utils_1.$rootScope.$broadcast('history_forbidden', peerID);\n }\n if (hasDialog != needDialog) {\n if (needDialog) {\n this.reloadConversation(-channelID);\n }\n else {\n if (foundDialog[0]) {\n this.dialogsStorage.dialogs.splice(foundDialog[1], 1);\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID });\n }\n }\n }\n break;\n }\n case 'updateChannelReload': {\n var channelID = update.channel_id;\n var peerID = -channelID;\n var foundDialog = this.getDialogByPeerID(peerID);\n if (foundDialog[0]) {\n this.dialogsStorage.dialogs.splice(foundDialog[1], 1);\n }\n delete this.historiesStorage[peerID];\n this.reloadConversation(-channelID).then(() => {\n utils_1.$rootScope.$broadcast('history_reload', peerID);\n });\n break;\n }\n case 'updateChannelMessageViews': {\n var views = update.views;\n var mid = appMessagesIDsManager_1.default.getFullMessageID(update.id, update.channel_id);\n var message = this.getMessage(mid);\n if (message && message.views && message.views < views) {\n message.views = views;\n utils_1.$rootScope.$broadcast('message_views', {\n mid: mid,\n views: views\n });\n }\n break;\n }\n case 'updateServiceNotification': {\n // update.inbox_date = tsNow(true)\n // update.pFlags = {popup: true}\n var fromID = 777000;\n var peerID = fromID;\n var messageID = this.tempID--;\n var message = {\n _: 'message',\n id: messageID,\n from_id: fromID,\n to_id: appPeersManager_1.default.getOutputPeer(peerID),\n flags: 0,\n pFlags: { unread: true },\n date: (update.inbox_date || utils_1.tsNow(true)) + serverTimeManager_2.default.serverTimeOffset,\n message: update.message,\n media: update.media,\n entities: update.entities\n };\n if (!appUsersManager_1.default.hasUser(fromID)) {\n appUsersManager_1.default.saveApiUsers([{\n _: 'user',\n id: fromID,\n pFlags: { verified: true },\n access_hash: 0,\n first_name: 'Telegram',\n phone: '42777'\n }]);\n }\n this.saveMessages([message]);\n if (update.inbox_date) {\n this.pendingTopMsgs[peerID] = messageID;\n this.handleUpdate({\n _: 'updateNewMessage',\n message: message\n });\n }\n if (update.pFlags.popup && update.message) {\n var historyMessage = this.wrapForHistory(messageID);\n //ErrorService.show({error: {code: 400, type: 'UPDATE_SERVICE_NOTIFICATION'}, historyMessage: historyMessage}); // warning\n }\n break;\n }\n }\n }\n wrapForHistory(msgID) {\n if (this.messagesForHistory[msgID] !== undefined) {\n return this.messagesForHistory[msgID];\n }\n var message = utils_1.copy(this.messagesStorage[msgID]) || { id: msgID };\n if (message.media && message.media.progress !== undefined) {\n message.media.progress = this.messagesStorage[msgID].media.progress;\n }\n var fromUser = message.from_id && appUsersManager_1.default.getUser(message.from_id);\n var fromBot = fromUser && fromUser.pFlags.bot && fromUser.username || false;\n var withBot = (fromBot ||\n message.to_id && (message.to_id.chat_id ||\n message.to_id.user_id && appUsersManager_1.default.isBot(message.to_id.user_id)));\n if (message.media) {\n if (message.media.caption &&\n message.media.caption.length) {\n message.media.rCaption = richtextprocessor_1.RichTextProcessor.wrapRichText(message.media.caption, {\n noCommands: !withBot,\n fromBot: fromBot\n });\n }\n switch (message.media._) {\n case 'messageMediaPhoto':\n message.media.photo = appPhotosManager_1.default.wrapForHistory(message.media.photo.id);\n break;\n /* case 'messageMediaDocument':\n message.media.document = appDocsManager.wrapForHistory(message.media.document.id)\n break */\n case 'messageMediaGeo':\n var mapUrl = 'https://maps.google.com/?q=' + message.media.geo['lat'] + ',' + message.media.geo['long'];\n message.media.mapUrl = mapUrl; //$sce.trustAsResourceUrl(mapUrl) // warning\n break;\n case 'messageMediaVenue':\n var mapUrl;\n if (message.media.provider == 'foursquare' &&\n message.media.venue_id) {\n mapUrl = 'https://foursquare.com/v/' + encodeURIComponent(message.media.venue_id);\n }\n else {\n mapUrl = 'https://maps.google.com/?q=' + message.media.geo['lat'] + ',' + message.media.geo['long'];\n }\n message.media.mapUrl = mapUrl; //$sce.trustAsResourceUrl(mapUrl) // warning\n break;\n case 'messageMediaContact':\n message.media.rFullName = richtextprocessor_1.RichTextProcessor.wrapRichText(message.media.first_name + ' ' + (message.media.last_name || ''), { noLinks: true, noLinebreaks: true });\n break;\n case 'messageMediaWebPage':\n if (!message.media.webpage ||\n message.media.webpage._ == 'webPageEmpty') {\n delete message.media;\n break;\n }\n message.media.webpage = appWebPagesManager_1.default.wrapForHistory(message.media.webpage.id);\n break;\n /*case 'messageMediaGame':\n message.media.game = AppGamesManager.wrapForHistory(message.media.game.id)\n break */\n }\n }\n else if (message.action) {\n switch (message.action._) {\n case 'messageActionChatEditPhoto':\n case 'messageActionChannelEditPhoto':\n message.action.photo = appPhotosManager_1.default.wrapForHistory(message.action.photo.id);\n break;\n case 'messageActionChatCreate':\n case 'messageActionChatEditTitle':\n case 'messageActionChannelCreate':\n case 'messageActionChannelEditTitle':\n message.action.rTitle = richtextprocessor_1.RichTextProcessor.wrapRichText(message.action.title, { noLinebreaks: true }) || 'chat_title_deleted';\n break;\n case 'messageActionBotIntro':\n message.action.rDescription = richtextprocessor_1.RichTextProcessor.wrapRichText(message.action.description, {\n noCommands: !withBot,\n fromBot: fromBot\n });\n break;\n }\n }\n return this.messagesForHistory[msgID] = message;\n }\n finalizePendingMessage(randomID, finalMessage) {\n var pendingData = this.pendingByRandomID[randomID];\n // console.log('pdata', randomID, pendingData)\n if (pendingData) {\n var peerID = pendingData[0];\n var tempID = pendingData[1];\n var historyStorage = this.historiesStorage[peerID], message, historyMessage;\n // console.log('pending', randomID, historyStorage.pending)\n var pos = historyStorage.pending.indexOf(tempID);\n if (pos != -1) {\n historyStorage.pending.splice(pos, 1);\n }\n if (message = this.messagesStorage[tempID]) {\n delete message.pending;\n delete message.error;\n delete message.random_id;\n delete message.send;\n }\n if (historyMessage = this.messagesForHistory[tempID]) {\n this.messagesForHistory[finalMessage.mid] = Object.assign(historyMessage, this.wrapForHistory(finalMessage.mid));\n delete historyMessage.pending;\n delete historyMessage.error;\n delete historyMessage.random_id;\n delete historyMessage.send;\n utils_1.$rootScope.$broadcast('messages_pending');\n }\n delete this.messagesForHistory[tempID];\n delete this.messagesStorage[tempID];\n this.finalizePendingMessageCallbacks(tempID, finalMessage.mid);\n return message;\n }\n return false;\n }\n /* public finalizePendingMessageCallbacks(tempID: number, mid: number) {\n $rootScope.$broadcast('message_sent', {tempID, mid});\n } */\n finalizePendingMessageCallbacks(tempID, mid) {\n var callbacks = this.tempFinalizeCallbacks[tempID];\n console.warn(utils_1.dT(), callbacks, tempID);\n if (callbacks !== undefined) {\n callbacks.forEach((callback) => {\n callback(mid);\n });\n delete this.tempFinalizeCallbacks[tempID];\n }\n utils_1.$rootScope.$broadcast('message_sent', { tempID, mid });\n }\n incrementMaxSeenID(maxID) {\n if (!maxID || !(!this.maxSeenID || maxID > this.maxSeenID)) {\n return false;\n }\n storage_1.default.set({\n max_seen_msg: maxID\n });\n apiManager_1.default.invokeApi('messages.receivedMessages', {\n max_id: maxID\n });\n }\n getHistory(peerID, maxID = 0, limit = 0, backLimit, prerendered) {\n if (this.migratedFromTo[peerID]) {\n peerID = this.migratedFromTo[peerID];\n }\n var historyStorage = this.historiesStorage[peerID];\n var offset = 0;\n var offsetNotFound = false;\n var unreadOffset = 0;\n var unreadSkip = false;\n prerendered = prerendered ? Math.min(50, prerendered) : 0;\n if (historyStorage === undefined) {\n historyStorage = this.historiesStorage[peerID] = { count: null, history: [], pending: [] };\n }\n if (maxID < 0) {\n maxID = 0;\n }\n var isMigrated = false;\n var reqPeerID = peerID;\n if (this.migratedToFrom[peerID]) {\n isMigrated = true;\n if (maxID && maxID < appMessagesIDsManager_1.default.fullMsgIDModulus) {\n reqPeerID = this.migratedToFrom[peerID];\n }\n }\n if (!limit && !maxID) {\n var foundDialog = this.getDialogByPeerID(peerID)[0];\n if (foundDialog && foundDialog.unread_count > 1) {\n var unreadCount = foundDialog.unread_count;\n if (unreadSkip = (unreadCount > 50)) {\n if (foundDialog.read_inbox_max_id) {\n maxID = foundDialog.read_inbox_max_id;\n backLimit = 16;\n unreadOffset = 16;\n limit = 4;\n }\n else {\n limit = 20;\n unreadOffset = 16;\n offset = unreadCount - unreadOffset;\n }\n }\n else {\n limit = Math.max(10, prerendered, unreadCount + 2);\n unreadOffset = unreadCount;\n }\n }\n else if ('Mobile' in Config) {\n limit = 20;\n }\n }\n if (maxID > 0) {\n offsetNotFound = true;\n for (offset = 0; offset < historyStorage.history.length; offset++) {\n if (maxID > historyStorage.history[offset]) {\n offsetNotFound = false;\n break;\n }\n }\n }\n if (!offsetNotFound && (historyStorage.count !== null && historyStorage.history.length == historyStorage.count ||\n historyStorage.history.length >= offset + (limit || 1))) {\n if (backLimit) {\n backLimit = Math.min(offset, backLimit);\n offset = Math.max(0, offset - backLimit);\n limit += backLimit;\n }\n else {\n limit = limit || (offset ? 20 : (prerendered || 5));\n }\n var history = historyStorage.history.slice(offset, offset + limit);\n if (!maxID && historyStorage.pending.length) {\n history = historyStorage.pending.slice().concat(history);\n }\n return this.wrapHistoryResult(peerID, {\n count: historyStorage.count,\n history: history,\n unreadOffset: unreadOffset,\n unreadSkip: unreadSkip\n });\n }\n if (!backLimit && !limit) {\n limit = prerendered || 20;\n }\n if (offsetNotFound) {\n offset = 0;\n }\n if ((backLimit || unreadSkip || maxID) && historyStorage.history.indexOf(maxID) == -1) {\n if (backLimit) {\n offset = -backLimit;\n limit += backLimit;\n }\n return this.requestHistory(reqPeerID, maxID, limit, offset).then((historyResult) => {\n historyStorage.count = historyResult.count || historyResult.messages.length;\n if (isMigrated) {\n historyStorage.count++;\n }\n var history = [];\n historyResult.messages.forEach((message) => {\n history.push(message.mid);\n });\n if (!maxID && historyStorage.pending.length) {\n history = historyStorage.pending.slice().concat(history);\n }\n return this.wrapHistoryResult(peerID, {\n count: historyStorage.count,\n history: history,\n unreadOffset: unreadOffset,\n unreadSkip: unreadSkip\n });\n });\n }\n return this.fillHistoryStorage(peerID, maxID, limit, historyStorage).then(() => {\n offset = 0;\n if (maxID > 0) {\n for (offset = 0; offset < historyStorage.history.length; offset++) {\n if (maxID > historyStorage.history[offset]) {\n break;\n }\n }\n }\n var history = historyStorage.history.slice(offset, offset + limit);\n if (!maxID && historyStorage.pending.length) {\n history = historyStorage.pending.slice().concat(history);\n }\n return this.wrapHistoryResult(peerID, {\n count: historyStorage.count,\n history: history,\n unreadOffset: unreadOffset,\n unreadSkip: unreadSkip\n });\n });\n }\n fillHistoryStorage(peerID, maxID, fullLimit, historyStorage) {\n // console.log('fill history storage', peerID, maxID, fullLimit, angular.copy(historyStorage))\n var offset = (this.migratedFromTo[peerID] && !maxID) ? 1 : 0;\n return this.requestHistory(peerID, maxID, fullLimit, offset).then((historyResult) => {\n historyStorage.count = historyResult.count || historyResult.messages.length;\n var offset = 0;\n if (!maxID && historyResult.messages.length) {\n maxID = historyResult.messages[0].mid + 1;\n }\n if (maxID > 0) {\n for (offset = 0; offset < historyStorage.history.length; offset++) {\n if (maxID > historyStorage.history[offset]) {\n break;\n }\n }\n }\n var wasTotalCount = historyStorage.history.length;\n historyStorage.history.splice(offset, historyStorage.history.length - offset);\n historyResult.messages.forEach((message) => {\n if (this.mergeReplyKeyboard(historyStorage, message)) {\n utils_1.$rootScope.$broadcast('history_reply_markup', { peerID: peerID });\n }\n historyStorage.history.push(message.mid);\n });\n var totalCount = historyStorage.history.length;\n fullLimit -= (totalCount - wasTotalCount);\n var migratedNextPeer = this.migratedFromTo[peerID];\n var migratedPrevPeer = this.migratedToFrom[peerID];\n var isMigrated = migratedNextPeer !== undefined || migratedPrevPeer !== undefined;\n if (isMigrated) {\n historyStorage.count = Math.max(historyStorage.count, totalCount) + 1;\n }\n if (fullLimit > 0) {\n maxID = historyStorage.history[totalCount - 1];\n if (isMigrated) {\n if (!historyResult.messages.length) {\n if (migratedPrevPeer) {\n maxID = 0;\n peerID = migratedPrevPeer;\n }\n else {\n historyStorage.count = totalCount;\n return true;\n }\n }\n return this.fillHistoryStorage(peerID, maxID, fullLimit, historyStorage);\n }\n else if (totalCount < historyStorage.count) {\n return this.fillHistoryStorage(peerID, maxID, fullLimit, historyStorage);\n }\n }\n return true;\n });\n }\n wrapHistoryResult(peerID, result) {\n var unreadOffset = result.unreadOffset;\n if (unreadOffset) {\n var i;\n var message;\n for (i = result.history.length - 1; i >= 0; i--) {\n message = this.messagesStorage[result.history[i]];\n if (message && !message.pFlags.out && message.pFlags.unread) {\n result.unreadOffset = i + 1;\n break;\n }\n }\n }\n return Promise.resolve(result);\n }\n requestHistory(peerID, maxID, limit, offset = 0) {\n var isChannel = appPeersManager_1.default.isChannel(peerID);\n //console.trace('requestHistory', peerID, maxID, limit, offset);\n return apiManager_1.default.invokeApi('messages.getHistory', {\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\n offset_id: maxID ? appMessagesIDsManager_1.default.getMessageLocalID(maxID) : 0,\n offset_date: 0,\n add_offset: offset || 0,\n limit: limit || 0,\n max_id: 0,\n min_id: 0,\n hash: 0\n }, {\n timeout: 300,\n noErrorBox: true\n }).then((historyResult) => {\n ///console.log('requestHistory result:', historyResult);\n appUsersManager_1.default.saveApiUsers(historyResult.users);\n appChatsManager_1.default.saveApiChats(historyResult.chats);\n this.saveMessages(historyResult.messages);\n if (isChannel) {\n apiUpdatesManager_1.default.addChannelState(-peerID, historyResult.pts);\n }\n var length = historyResult.messages.length;\n if (length && historyResult.messages[length - 1].deleted) {\n historyResult.messages.splice(length - 1, 1);\n length--;\n historyResult.count--;\n }\n // don't need the intro now\n /* if(peerID < 0 || !appUsersManager.isBot(peerID) || (length == limit && limit < historyResult.count)) {\n return historyResult;\n } */\n return historyResult;\n /* return appProfileManager.getProfile(peerID).then((userFull: any) => {\n var description = userFull.bot_info && userFull.bot_info.description;\n if(description) {\n var messageID = this.tempID--;\n var message = {\n _: 'messageService',\n id: messageID,\n from_id: peerID,\n to_id: AppPeersManager.getOutputPeer(peerID),\n flags: 0,\n pFlags: {},\n date: tsNow(true) + serverTimeManager.serverTimeOffset,\n action: {\n _: 'messageActionBotIntro',\n description: description\n }\n }\n \n this.saveMessages([message]);\n historyResult.messages.push(message);\n if(historyResult.count) {\n historyResult.count++;\n }\n }\n \n return historyResult;\n }); */\n }, (error) => {\n switch (error.type) {\n case 'CHANNEL_PRIVATE':\n var channel = appChatsManager_1.default.getChat(-peerID);\n channel = { _: 'channelForbidden', access_hash: channel.access_hash, title: channel.title };\n apiUpdatesManager_1.default.processUpdateMessage({\n _: 'updates',\n updates: [{\n _: 'updateChannel',\n channel_id: -peerID\n }],\n chats: [channel],\n users: []\n });\n break;\n }\n return Promise.reject(error);\n });\n }\n /* public wrapForDialog(msgID: number, dialog?: any) {\n var useCache = msgID && dialog !== undefined;\n var unreadCount = dialog && dialog.unread_count;\n \n if(useCache && this.messagesForDialogs[msgID] !== undefined) {\n delete this.messagesForDialogs[msgID].typing;\n this.messagesForDialogs[msgID].unreadCount = unreadCount;\n return this.messagesForDialogs[msgID];\n }\n \n var message = copy(this.messagesStorage[msgID]);\n \n if(!message || !message.to_id) {\n if(dialog && dialog.peerID) {\n message = {\n _: 'message',\n to_id: AppPeersManager.getOutputPeer(dialog.peerID),\n deleted: true,\n date: tsNow(true),\n pFlags: {out: true}\n }\n } else {\n return message;\n }\n }\n \n message.peerID = this.getMessagePeer(message);\n message.peerData = AppPeersManager.getPeer(message.peerID);\n message.peerString = AppPeersManager.getPeerString(message.peerID);\n message.unreadCount = unreadCount;\n message.index = dialog && dialog.index || (message.date * 0x10000);\n message.pinned = dialog && dialog.pFlags.pinned || false;\n \n if(message._ == 'messageService' && message.action.user_id) {\n message.action.user = appUsersManager.getUser(message.action.user_id);\n }\n \n if(message.message && message.message.length) {\n message.richMessage = RichTextProcessor.wrapRichText(message.message.substr(0, 128), {noLinks: true, noLinebreaks: true});\n }\n \n message.dateText = message.date; //dateOrTimeFilter(message.date); // warning\n \n if(useCache) {\n message.draft = '';//DraftsManager.getServerDraft(message.peerID); // warning\n this.messagesForDialogs[msgID] = message;\n }\n \n return message;\n } */\n fetchSingleMessages() {\n if (this.fetchSingleMessagesPromise) {\n return this.fetchSingleMessagesPromise;\n }\n var mids = this.needSingleMessages.slice();\n this.needSingleMessages.length = 0;\n var splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(mids);\n let promises = [];\n Object.keys(splitted.msgIDs).forEach((channelID) => {\n channelID = +channelID;\n let msgIDs = splitted.msgIDs[channelID].map((msgID) => {\n return {\n _: 'inputMessageID',\n id: msgID\n };\n });\n var promise;\n if (channelID > 0) {\n promise = apiManager_1.default.invokeApi('channels.getMessages', {\n channel: appChatsManager_1.default.getChannelInput(channelID),\n id: msgIDs\n });\n }\n else {\n promise = apiManager_1.default.invokeApi('messages.getMessages', {\n id: msgIDs\n });\n }\n promises.push(promise.then((getMessagesResult) => {\n appUsersManager_1.default.saveApiUsers(getMessagesResult.users);\n appChatsManager_1.default.saveApiChats(getMessagesResult.chats);\n this.saveMessages(getMessagesResult.messages);\n utils_1.$rootScope.$broadcast('messages_downloaded', splitted.mids[+channelID]);\n }));\n });\n return this.fetchSingleMessagesPromise = Promise.all(promises).then(() => {\n this.fetchSingleMessagesTimeout = 0;\n this.fetchSingleMessagesPromise = null;\n if (this.needSingleMessages.length)\n this.fetchSingleMessages();\n }).catch(() => {\n this.fetchSingleMessagesTimeout = 0;\n this.fetchSingleMessagesPromise = null;\n if (this.needSingleMessages.length)\n this.fetchSingleMessages();\n });\n }\n wrapSingleMessage(msgID) {\n if (this.messagesStorage[msgID]) {\n //let ret = this.wrapForDialog(msgID); // hm\n utils_1.$rootScope.$broadcast('messages_downloaded', [msgID]);\n //return ret;\n return { mid: msgID, loading: false };\n }\n if (this.needSingleMessages.indexOf(msgID) == -1) {\n this.needSingleMessages.push(msgID);\n if (this.fetchSingleMessagesTimeout == 0) {\n this.fetchSingleMessagesTimeout = window.setTimeout(this.fetchSingleMessages.bind(this), 25);\n }\n return { mid: msgID, loading: true };\n }\n return { mid: msgID, loading: false };\n }\n}\nexports.AppMessagesManager = AppMessagesManager;\nexports.default = new AppMessagesManager();\n" + "depth": 4, + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst idb_1 = __importDefault(require(\"../idb\"));\r\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\r\n//import apiManager from \"./apiManager\";\r\nconst mtprotoworker_1 = __importDefault(require(\"./mtprotoworker\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nclass ApiFileManager {\r\n constructor() {\r\n this.cachedSavePromises = {};\r\n this.cachedDownloadPromises = {};\r\n this.cachedDownloads = {};\r\n /* public indexedKeys: Set = new Set();\r\n private keysLoaded = false; */\r\n this.downloadPulls = {};\r\n this.downloadActives = {};\r\n this.index = 0;\r\n this.log = polyfill_1.logger('AFM');\r\n }\r\n downloadRequest(dcID, cb, activeDelta) {\r\n if (this.downloadPulls[dcID] === undefined) {\r\n this.downloadPulls[dcID] = [];\r\n this.downloadActives[dcID] = 0;\r\n }\r\n var downloadPull = this.downloadPulls[dcID];\r\n let promise = new Promise((resolve, reject) => {\r\n // WARNING deferred!\r\n downloadPull.push({ cb: cb, deferred: { resolve, reject }, activeDelta: activeDelta });\r\n }).catch(() => { });\r\n setTimeout(() => {\r\n this.downloadCheck(dcID);\r\n }, 0);\r\n return promise;\r\n }\r\n downloadCheck(dcID) {\r\n var downloadPull = this.downloadPulls[dcID];\r\n var downloadLimit = dcID == 'upload' ? 11 : 5;\r\n if (this.downloadActives[dcID] >= downloadLimit || !downloadPull || !downloadPull.length) {\r\n return false;\r\n }\r\n var data = downloadPull.shift();\r\n var activeDelta = data.activeDelta || 1;\r\n this.downloadActives[dcID] += activeDelta;\r\n this.index++;\r\n data.cb()\r\n .then((result) => {\r\n this.downloadActives[dcID] -= activeDelta;\r\n this.downloadCheck(dcID);\r\n data.deferred.resolve(result);\r\n }, (error) => {\r\n if (error) {\r\n this.log.error('downloadCheck error:', error);\r\n }\r\n this.downloadActives[dcID] -= activeDelta;\r\n this.downloadCheck(dcID);\r\n data.deferred.reject(error);\r\n });\r\n }\r\n getFileName(location) {\r\n switch (location._) {\r\n case 'inputDocumentFileLocation':\r\n var fileName = (location.file_name || '').split('.');\r\n var ext = fileName[fileName.length - 1] || '';\r\n var versionPart = location.version ? ('v' + location.version) : '';\r\n return (fileName[0] ? fileName[0] + '_' : '') + location.id + versionPart + (ext ? '.' + ext : ext);\r\n default:\r\n if (!location.volume_id && !location.file_reference) {\r\n this.log.trace('Empty location', location);\r\n }\r\n if (location.volume_id) {\r\n return location.volume_id + '_' + location.local_id + '.' + ext;\r\n }\r\n else {\r\n return location.id + '_' + location.access_hash + '.' + ext;\r\n }\r\n }\r\n }\r\n getTempFileName(file) {\r\n var size = file.size || -1;\r\n var random = bin_utils_1.nextRandomInt(0xFFFFFFFF);\r\n return '_temp' + random + '_' + size;\r\n }\r\n getCachedFile(location) {\r\n if (!location) {\r\n return false;\r\n }\r\n var fileName = this.getFileName(location);\r\n return this.cachedDownloads[fileName] || false;\r\n }\r\n getFileStorage() {\r\n return idb_1.default;\r\n }\r\n /* public isFileExists(location: any) {\r\n var fileName = this.getFileName(location);\r\n \r\n return this.cachedDownloads[fileName] || this.indexedKeys.has(fileName);\r\n //return this.cachedDownloads[fileName] || this.indexedKeys.has(fileName) ? Promise.resolve(true) : this.getFileStorage().isFileExists(fileName);\r\n } */\r\n saveSmallFile(location, bytes) {\r\n var fileName = this.getFileName(location);\r\n if (!this.cachedSavePromises[fileName]) {\r\n this.cachedSavePromises[fileName] = this.getFileStorage().saveFile(fileName, bytes).then((blob) => {\r\n return this.cachedDownloads[fileName] = blob;\r\n }, (error) => {\r\n delete this.cachedSavePromises[fileName];\r\n });\r\n }\r\n return this.cachedSavePromises[fileName];\r\n }\r\n downloadSmallFile(location, options = {}) {\r\n if (!filemanager_1.default.isAvailable()) {\r\n return Promise.reject({ type: 'BROWSER_BLOB_NOT_SUPPORTED' });\r\n }\r\n /* if(!this.keysLoaded) {\r\n this.getIndexedKeys();\r\n } */\r\n //this.log('downloadSmallFile', location, options);\r\n let dcID = options.dcID || location.dc_id;\r\n let mimeType = options.mimeType || 'image/jpeg';\r\n var fileName = this.getFileName(location);\r\n var cachedPromise = this.cachedSavePromises[fileName] || this.cachedDownloadPromises[fileName];\r\n //this.log('downloadSmallFile!', location, options, fileName, cachedPromise);\r\n if (cachedPromise) {\r\n return cachedPromise;\r\n }\r\n var fileStorage = this.getFileStorage();\r\n return this.cachedDownloadPromises[fileName] = fileStorage.getFile(fileName).then((blob) => {\r\n return this.cachedDownloads[fileName] = blob;\r\n }, () => {\r\n var downloadPromise = this.downloadRequest(dcID, () => {\r\n var inputLocation = location;\r\n if (!inputLocation._ || inputLocation._ == 'fileLocation') {\r\n inputLocation = Object.assign({}, location, { _: 'inputFileLocation' });\r\n }\r\n let params = {\r\n flags: 0,\r\n location: inputLocation,\r\n offset: 0,\r\n limit: 1024 * 1024\r\n };\r\n //this.log('next small promise', params);\r\n return mtprotoworker_1.default.invokeApi('upload.getFile', params, {\r\n dcID: dcID,\r\n fileDownload: true,\r\n noErrorBox: true\r\n });\r\n }, dcID);\r\n var processDownloaded = (bytes) => {\r\n //this.log('processDownloaded', location, bytes);\r\n return Promise.resolve(bytes);\r\n /* if(!location.sticker || WebpManager.isWebpSupported()) {\r\n return qSync.when(bytes);\r\n }\r\n \r\n return WebpManager.getPngBlobFromWebp(bytes); */\r\n };\r\n return fileStorage.getFileWriter(fileName, mimeType).then((fileWriter) => {\r\n return downloadPromise.then((result) => {\r\n return processDownloaded(result.bytes).then((proccessedResult) => {\r\n return filemanager_1.default.write(fileWriter, proccessedResult).then(() => {\r\n return this.cachedDownloads[fileName] = fileWriter.finalize();\r\n });\r\n });\r\n });\r\n });\r\n });\r\n }\r\n getDownloadedFile(location, size) {\r\n var fileStorage = this.getFileStorage();\r\n var fileName = typeof (location) !== 'string' ? this.getFileName(location) : location;\r\n //console.log('getDownloadedFile', location, fileName);\r\n return fileStorage.getFile(fileName, size);\r\n }\r\n /* public getIndexedKeys() {\r\n this.keysLoaded = true;\r\n this.getFileStorage().getAllKeys().then(keys => {\r\n this.indexedKeys.clear();\r\n this.indexedKeys = new Set(keys);\r\n });\r\n } */\r\n downloadFile(dcID, location, size, options = {}) {\r\n if (!filemanager_1.default.isAvailable()) {\r\n return Promise.reject({ type: 'BROWSER_BLOB_NOT_SUPPORTED' });\r\n }\r\n /* if(!this.keysLoaded) {\r\n this.getIndexedKeys();\r\n } */\r\n // this.log('Dload file', dcID, location, size)\r\n var fileName = this.getFileName(location);\r\n var toFileEntry = options.toFileEntry || null;\r\n var cachedPromise = this.cachedSavePromises[fileName] || this.cachedDownloadPromises[fileName];\r\n var fileStorage = this.getFileStorage();\r\n //this.log('downloadFile', fileStorage.name, fileName, fileName.length, location, arguments);\r\n if (cachedPromise) {\r\n if (toFileEntry) {\r\n return cachedPromise.then((blob) => {\r\n return filemanager_1.default.copy(blob, toFileEntry);\r\n });\r\n }\r\n //this.log('downloadFile cachedPromise');\r\n if (size) {\r\n return cachedPromise.then((blob) => {\r\n if (blob.size < size) {\r\n this.log('downloadFile need to deleteFile, wrong size:', blob.size, size);\r\n return this.deleteFile(location).then(() => {\r\n return this.downloadFile(dcID, location, size, options);\r\n }).catch(() => {\r\n return this.downloadFile(dcID, location, size, options);\r\n });\r\n }\r\n else {\r\n return blob;\r\n }\r\n });\r\n }\r\n else {\r\n return cachedPromise;\r\n }\r\n }\r\n let deferred = polyfill_1.deferredPromise();\r\n var canceled = false;\r\n var resolved = false;\r\n var mimeType = options.mimeType || 'image/jpeg', cacheFileWriter;\r\n var errorHandler = (error) => {\r\n deferred.reject(error);\r\n errorHandler = () => { };\r\n if (cacheFileWriter && (!error || error.type != 'DOWNLOAD_CANCELED')) {\r\n cacheFileWriter.truncate(0);\r\n }\r\n };\r\n fileStorage.getFile(fileName, size).then((blob) => __awaiter(this, void 0, void 0, function* () {\r\n //this.log('is that i wanted');\r\n if (blob.size < size) {\r\n this.log('downloadFile need to deleteFile 2, wrong size:', blob.size, size);\r\n yield this.deleteFile(location);\r\n throw false;\r\n }\r\n if (toFileEntry) {\r\n filemanager_1.default.copy(blob, toFileEntry).then(() => {\r\n deferred.resolve();\r\n }, errorHandler);\r\n }\r\n else {\r\n deferred.resolve(this.cachedDownloads[fileName] = blob);\r\n }\r\n })).catch(() => {\r\n //this.log('not i wanted');\r\n //var fileWriterPromise = toFileEntry ? FileManager.getFileWriter(toFileEntry) : fileStorage.getFileWriter(fileName, mimeType);\r\n var fileWriterPromise = toFileEntry ? Promise.resolve(toFileEntry) : fileStorage.getFileWriter(fileName, mimeType);\r\n var processDownloaded = (bytes) => {\r\n return Promise.resolve(bytes);\r\n /* if(!processSticker) {\r\n return Promise.resolve(bytes);\r\n }\r\n \r\n return WebpManager.getPngBlobFromWebp(bytes); */\r\n };\r\n fileWriterPromise.then((fileWriter) => {\r\n cacheFileWriter = fileWriter;\r\n var limit = options.limitPart || 524288, offset;\r\n var startOffset = 0;\r\n var writeFilePromise = Promise.resolve(), writeFileDeferred;\r\n if (fileWriter.length) {\r\n startOffset = fileWriter.length;\r\n if (startOffset >= size) {\r\n if (toFileEntry) {\r\n deferred.resolve();\r\n }\r\n else {\r\n deferred.resolve(this.cachedDownloads[fileName] = fileWriter.finalize());\r\n }\r\n return;\r\n }\r\n fileWriter.seek(startOffset);\r\n deferred.notify({ done: startOffset, total: size });\r\n /////this.log('deferred notify 1:', {done: startOffset, total: size});\r\n }\r\n for (offset = startOffset; offset < size; offset += limit) {\r\n //writeFileDeferred = $q.defer();\r\n let writeFileDeferredHelper = {};\r\n writeFileDeferred = new Promise((resolve, reject) => {\r\n writeFileDeferredHelper.resolve = resolve;\r\n writeFileDeferredHelper.reject = reject;\r\n });\r\n Object.assign(writeFileDeferred, writeFileDeferredHelper);\r\n ////this.log('offset:', startOffset);\r\n ;\r\n ((isFinal, offset, writeFileDeferred, writeFilePromise) => {\r\n return this.downloadRequest(dcID, () => {\r\n if (canceled) {\r\n return Promise.resolve();\r\n }\r\n return mtprotoworker_1.default.invokeApi('upload.getFile', {\r\n flags: 0,\r\n location: location,\r\n offset: offset,\r\n limit: limit\r\n }, {\r\n dcID: dcID,\r\n fileDownload: true,\r\n singleInRequest: 'safari' in window\r\n });\r\n }, dcID).then((result) => {\r\n writeFilePromise.then(() => {\r\n if (canceled) {\r\n return Promise.resolve();\r\n }\r\n return processDownloaded(result.bytes).then((processedResult) => {\r\n return filemanager_1.default.write(fileWriter, processedResult).then(() => {\r\n writeFileDeferred.resolve();\r\n }, errorHandler).then(() => {\r\n if (isFinal) {\r\n resolved = true;\r\n if (toFileEntry) {\r\n deferred.resolve();\r\n }\r\n else {\r\n deferred.resolve(this.cachedDownloads[fileName] = fileWriter.finalize());\r\n }\r\n }\r\n else {\r\n ////this.log('deferred notify 2:', {done: offset + limit, total: size}, deferred);\r\n deferred.notify({ done: offset + limit, total: size });\r\n }\r\n });\r\n });\r\n });\r\n });\r\n })(offset + limit >= size, offset, writeFileDeferred, writeFilePromise);\r\n writeFilePromise = writeFileDeferred;\r\n }\r\n });\r\n });\r\n deferred.cancel = () => {\r\n if (!canceled && !resolved) {\r\n canceled = true;\r\n delete this.cachedDownloadPromises[fileName];\r\n errorHandler({ type: 'DOWNLOAD_CANCELED' });\r\n if (toFileEntry) {\r\n toFileEntry.abort();\r\n }\r\n }\r\n };\r\n //console.log(deferred, deferred.notify, deferred.cancel);\r\n if (!toFileEntry) {\r\n this.cachedDownloadPromises[fileName] = deferred;\r\n }\r\n return deferred;\r\n }\r\n deleteFile(fileName) {\r\n fileName = typeof (fileName) == 'string' ? fileName : this.getFileName(fileName);\r\n this.log('will delete file:', fileName);\r\n delete this.cachedDownloadPromises[fileName];\r\n delete this.cachedDownloads[fileName];\r\n delete this.cachedSavePromises[fileName];\r\n return this.getFileStorage().deleteFile(fileName);\r\n }\r\n uploadFile(file) {\r\n var fileSize = file.size, isBigFile = fileSize >= 10485760, canceled = false, resolved = false, doneParts = 0, partSize = 262144, // 256 Kb\r\n activeDelta = 2;\r\n if (fileSize > 67108864) {\r\n partSize = 524288;\r\n activeDelta = 4;\r\n }\r\n else if (fileSize < 102400) {\r\n partSize = 32768;\r\n activeDelta = 1;\r\n }\r\n var totalParts = Math.ceil(fileSize / partSize);\r\n var fileID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n var _part = 0, resultInputFile = {\r\n _: isBigFile ? 'inputFileBig' : 'inputFile',\r\n id: fileID,\r\n parts: totalParts,\r\n name: file instanceof File ? file.name : '',\r\n md5_checksum: ''\r\n };\r\n let deferredHelper = {\r\n notify: (details) => { }\r\n };\r\n let deferred = new Promise((resolve, reject) => {\r\n if (totalParts > 3000) {\r\n return reject({ type: 'FILE_TOO_BIG' });\r\n }\r\n deferredHelper.resolve = resolve;\r\n deferredHelper.reject = reject;\r\n });\r\n Object.assign(deferred, deferredHelper);\r\n if (totalParts > 3000) {\r\n return deferred;\r\n }\r\n let errorHandler = (error) => {\r\n this.log.error('Up Error', error);\r\n deferred.reject(error);\r\n canceled = true;\r\n errorHandler = () => { };\r\n };\r\n let method = isBigFile ? 'upload.saveBigFilePart' : 'upload.saveFilePart';\r\n for (let offset = 0; offset < fileSize; offset += partSize) {\r\n let part = _part++; // 0, 1\r\n this.downloadRequest('upload', () => {\r\n return new Promise((uploadResolve, uploadReject) => {\r\n var reader = new FileReader();\r\n var blob = file.slice(offset, offset + partSize);\r\n reader.onloadend = (e) => {\r\n if (canceled) {\r\n uploadReject();\r\n return;\r\n }\r\n if (e.target.readyState != FileReader.DONE) {\r\n this.log.error('wrong readyState!');\r\n return;\r\n }\r\n //////this.log('Starting to upload file, isBig:', isBigFile, fileID, part, e.target.result);\r\n mtprotoworker_1.default.invokeApi(method, {\r\n file_id: fileID,\r\n file_part: part,\r\n file_total_parts: totalParts,\r\n bytes: e.target.result\r\n }, {\r\n startMaxLength: partSize + 256,\r\n fileUpload: true,\r\n singleInRequest: true\r\n }).then((result) => {\r\n doneParts++;\r\n uploadResolve();\r\n //////this.log('Progress', doneParts * partSize / fileSize);\r\n if (doneParts >= totalParts) {\r\n deferred.resolve(resultInputFile);\r\n resolved = true;\r\n }\r\n else {\r\n deferred.notify({ done: doneParts * partSize, total: fileSize });\r\n }\r\n }, errorHandler);\r\n };\r\n reader.readAsArrayBuffer(blob);\r\n });\r\n }, activeDelta);\r\n }\r\n deferred.cancel = () => {\r\n this.log('cancel upload', canceled, resolved);\r\n if (!canceled && !resolved) {\r\n canceled = true;\r\n errorHandler({ type: 'UPLOAD_CANCELED' });\r\n }\r\n };\r\n return deferred;\r\n }\r\n}\r\nexports.ApiFileManager = ApiFileManager;\r\nexports.default = new ApiFileManager();\r\n" }, { "id": 16, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "name": "./src/lib/mtproto/mtproto.ts", - "index": 29, - "index2": 44, - "size": 3515, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", + "name": "./src/lib/appManagers/appDocsManager.ts", + "index": 55, + "index2": 48, + "size": 10840, "cacheable": true, "built": true, "optional": false, @@ -3152,44 +3084,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "issuerId": 1, - "issuerName": "./src/lib/mtproto/apiManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -3197,49 +3129,67 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./mtproto", - "loc": "25:18-38" + "userRequest": "./appDocsManager", + "loc": "28:41-68" }, { - "moduleId": 8, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/polyfill.ts", - "module": "./src/lib/polyfill.ts", - "moduleName": "./src/lib/polyfill.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "module": "./src/components/wrappers.ts", + "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "./mtproto/mtproto", - "loc": "4:18-46" + "userRequest": "../lib/appManagers/appDocsManager", + "loc": "27:41-85" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "../mtproto/mtproto", - "loc": "21:18-47" + "userRequest": "./appDocsManager", + "loc": "13:41-68" }, { - "moduleId": 44, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", + "moduleId": 33, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", + "module": "./src/lib/appManagers/appStickersManager.ts", + "moduleName": "./src/lib/appManagers/appStickersManager.ts", "type": "cjs require", - "userRequest": "./mtproto", - "loc": "24:18-38" + "userRequest": "./appDocsManager", + "loc": "19:41-68" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 37, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", + "module": "./src/lib/appManagers/appWebPagesManager.ts", + "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", "type": "cjs require", - "userRequest": "./mtproto", - "loc": "24:18-38" + "userRequest": "./appDocsManager", + "loc": "8:41-68" + }, + { + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "module": "./src/components/emoticonsDropdown.ts", + "moduleName": "./src/components/emoticonsDropdown.ts", + "type": "cjs require", + "userRequest": "../lib/appManagers/appDocsManager", + "loc": "27:41-85" + }, + { + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", + "type": "cjs require", + "userRequest": "./appManagers/appDocsManager", + "loc": "18:41-80" } ], "usedExports": true, @@ -3248,15 +3198,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Config = __importStar(require(\"../config\"));\nconst storage_1 = __importDefault(require(\"../storage\"));\nconst utils_1 = require(\"../utils\");\nconst passwordManager_1 = __importDefault(require(\"./passwordManager\"));\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\nconst rsaKeysManager_1 = __importDefault(require(\"./rsaKeysManager\"));\nconst timeManager_1 = __importDefault(require(\"./timeManager\"));\nconst serverTimeManager_1 = __importDefault(require(\"./serverTimeManager\"));\nconst authorizer_1 = __importDefault(require(\"./authorizer\"));\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\nconst apiFileManager_1 = __importDefault(require(\"./apiFileManager\"));\nclass TelegramMeWebService {\n constructor() {\n this.disabled = Config.Modes.test ||\n Config.App.domains.indexOf(location.hostname) == -1 ||\n location.protocol != 'http:' && location.protocol != 'https:' ||\n location.protocol == 'https:' && location.hostname != 'web.telegram.org';\n }\n setAuthorized(canRedirect) {\n if (this.disabled) {\n return false;\n }\n storage_1.default.get('tgme_sync').then((curValue) => {\n var ts = utils_1.tsNow(true);\n if (canRedirect &&\n curValue &&\n curValue.canRedirect == canRedirect &&\n curValue.ts + 86400 > ts) {\n return false;\n }\n storage_1.default.set({ tgme_sync: { canRedirect: canRedirect, ts: ts } });\n var urls = [\n '//telegram.me/_websync_?authed=' + (canRedirect ? '1' : '0'),\n '//t.me/_websync_?authed=' + (canRedirect ? '1' : '0')\n ];\n urls.forEach(url => {\n let script = document.createElement('script');\n script.onload = script.onerror = function () {\n script.remove();\n };\n script.src = url;\n document.body.appendChild(script);\n });\n });\n }\n}\nexports.TelegramMeWebService = TelegramMeWebService;\nexports.telegramMeWebService = new TelegramMeWebService();\n// @ts-ignore\nconst jsbn_1 = require(\"jsbn\");\nvar MTProto;\n(function (MTProto) {\n //$($window).on('click keydown', rng_seed_time); // WARNING!\n MTProto.secureRandom = new jsbn_1.SecureRandom();\n MTProto.passwordManager = passwordManager_1.default;\n MTProto.dcConfigurator = dcConfigurator_1.default;\n MTProto.rsaKeysManager = rsaKeysManager_1.default;\n MTProto.timeManager = timeManager_1.default;\n MTProto.authorizer = authorizer_1.default;\n MTProto.networkerFactory = networkerFactory_1.default;\n MTProto.apiManager = apiManager_1.default;\n MTProto.apiFileManager = apiFileManager_1.default;\n MTProto.serverTimeManager = serverTimeManager_1.default;\n})(MTProto = exports.MTProto || (exports.MTProto = {}));\n//(window as any).MTProto = MTProto;\n" + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\r\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nclass AppDocsManager {\r\n constructor() {\r\n this.docs = {};\r\n }\r\n saveDoc(apiDoc /* any */, context) {\r\n console.log('saveDoc', apiDoc, this.docs[apiDoc.id]);\r\n if (this.docs[apiDoc.id]) {\r\n let d = this.docs[apiDoc.id];\r\n if (apiDoc.thumbs) {\r\n if (!d.thumbs)\r\n d.thumbs = apiDoc.thumbs;\r\n else if (apiDoc.thumbs[0].bytes && !d.thumbs[0].bytes) {\r\n d.thumbs.unshift(apiDoc.thumbs[0]);\r\n }\r\n }\r\n return context ? Object.assign(d, context) : d;\r\n }\r\n if (context) {\r\n Object.assign(apiDoc, context);\r\n }\r\n this.docs[apiDoc.id] = apiDoc;\r\n if (apiDoc.thumb && apiDoc.thumb._ == 'photoCachedSize') {\r\n console.warn('this will happen!!!');\r\n apiFileManager_1.default.saveSmallFile(apiDoc.thumb.location, apiDoc.thumb.bytes);\r\n // Memory\r\n apiDoc.thumb.size = apiDoc.thumb.bytes.length;\r\n delete apiDoc.thumb.bytes;\r\n apiDoc.thumb._ = 'photoSize';\r\n }\r\n if (apiDoc.thumb && apiDoc.thumb._ == 'photoSizeEmpty') {\r\n delete apiDoc.thumb;\r\n }\r\n apiDoc.attributes.forEach((attribute) => {\r\n switch (attribute._) {\r\n case 'documentAttributeFilename':\r\n apiDoc.file_name = richtextprocessor_1.RichTextProcessor.wrapPlainText(attribute.file_name);\r\n break;\r\n case 'documentAttributeAudio':\r\n apiDoc.duration = attribute.duration;\r\n apiDoc.audioTitle = attribute.title;\r\n apiDoc.audioPerformer = attribute.performer;\r\n apiDoc.type = attribute.pFlags.voice ? 'voice' : 'audio';\r\n break;\r\n case 'documentAttributeVideo':\r\n apiDoc.duration = attribute.duration;\r\n apiDoc.w = attribute.w;\r\n apiDoc.h = attribute.h;\r\n if (apiDoc.thumbs && attribute.pFlags.round_message) {\r\n apiDoc.type = 'round';\r\n }\r\n else /* if(apiDoc.thumbs) */ {\r\n apiDoc.type = 'video';\r\n }\r\n break;\r\n case 'documentAttributeSticker':\r\n apiDoc.sticker = true;\r\n if (attribute.alt !== undefined) {\r\n apiDoc.stickerEmojiRaw = attribute.alt;\r\n apiDoc.stickerEmoji = richtextprocessor_1.RichTextProcessor.wrapRichText(apiDoc.stickerEmojiRaw, { noLinks: true, noLinebreaks: true });\r\n }\r\n if (attribute.stickerset) {\r\n if (attribute.stickerset._ == 'inputStickerSetEmpty') {\r\n delete attribute.stickerset;\r\n }\r\n else if (attribute.stickerset._ == 'inputStickerSetID') {\r\n apiDoc.stickerSetInput = attribute.stickerset;\r\n }\r\n }\r\n if (apiDoc.thumbs && apiDoc.mime_type == 'image/webp') {\r\n apiDoc.type = 'sticker';\r\n }\r\n else if (apiDoc.mime_type == 'application/x-tgsticker') {\r\n apiDoc.type = 'sticker';\r\n apiDoc.animated = true;\r\n }\r\n break;\r\n case 'documentAttributeImageSize':\r\n apiDoc.w = attribute.w;\r\n apiDoc.h = attribute.h;\r\n break;\r\n case 'documentAttributeAnimated':\r\n if ((apiDoc.mime_type == 'image/gif' || apiDoc.mime_type == 'video/mp4') && apiDoc.thumbs) {\r\n apiDoc.type = 'gif';\r\n }\r\n apiDoc.animated = true;\r\n break;\r\n }\r\n });\r\n if (!apiDoc.mime_type) {\r\n switch (apiDoc.type) {\r\n case 'gif':\r\n apiDoc.mime_type = 'video/mp4';\r\n break;\r\n case 'video':\r\n case 'round':\r\n apiDoc.mime_type = 'video/mp4';\r\n break;\r\n case 'sticker':\r\n apiDoc.mime_type = 'image/webp';\r\n break;\r\n case 'audio':\r\n apiDoc.mime_type = 'audio/mpeg';\r\n break;\r\n case 'voice':\r\n apiDoc.mime_type = 'audio/ogg';\r\n break;\r\n default:\r\n apiDoc.mime_type = 'application/octet-stream';\r\n break;\r\n }\r\n }\r\n if (!apiDoc.file_name) {\r\n apiDoc.file_name = '';\r\n }\r\n if (apiDoc._ == 'documentEmpty') {\r\n apiDoc.size = 0;\r\n }\r\n return apiDoc;\r\n }\r\n getDoc(docID) {\r\n return this.docs[docID] || { _: 'documentEmpty' };\r\n }\r\n getFileName(doc) {\r\n if (doc.file_name) {\r\n return doc.file_name;\r\n }\r\n var fileExt = '.' + doc.mime_type.split('/')[1];\r\n if (fileExt == '.octet-stream') {\r\n fileExt = '';\r\n }\r\n return 't_' + (doc.type || 'file') + doc.id + fileExt;\r\n }\r\n updateDocDownloaded(docID) {\r\n var doc = this.docs[docID];\r\n var inputFileLocation = {\r\n _: 'inputDocumentFileLocation',\r\n id: docID,\r\n access_hash: doc.access_hash,\r\n version: doc.version,\r\n file_name: this.getFileName(doc)\r\n };\r\n if (doc.downloaded === undefined) {\r\n apiFileManager_1.default.getDownloadedFile(inputFileLocation, doc.size).then(() => {\r\n doc.downloaded = true;\r\n }, () => {\r\n doc.downloaded = false;\r\n });\r\n }\r\n }\r\n downloadDoc(docID, toFileEntry) {\r\n let doc;\r\n if (typeof (docID) === 'string') {\r\n doc = this.docs[docID];\r\n }\r\n else {\r\n doc = docID;\r\n }\r\n var inputFileLocation = {\r\n _: 'inputDocumentFileLocation',\r\n id: doc.id,\r\n access_hash: doc.access_hash,\r\n file_reference: doc.file_reference,\r\n thumb_size: '',\r\n version: doc.version,\r\n file_name: this.getFileName(doc)\r\n };\r\n if (doc._ == 'documentEmpty') {\r\n return Promise.reject();\r\n }\r\n if (doc.downloaded && !toFileEntry) {\r\n var cachedBlob = apiFileManager_1.default.getCachedFile(inputFileLocation);\r\n if (cachedBlob) {\r\n return Promise.resolve(cachedBlob);\r\n }\r\n }\r\n //historyDoc.progress = {enabled: !historyDoc.downloaded, percent: 1, total: doc.size};\r\n // нет смысла делать объект с выполняющимися промисами, нижняя строка и так вернёт загружающийся\r\n var downloadPromise = apiFileManager_1.default.downloadFile(doc.dc_id, inputFileLocation, doc.size, {\r\n mimeType: doc.mime_type || 'application/octet-stream',\r\n toFileEntry: toFileEntry\r\n });\r\n downloadPromise.then((blob) => {\r\n if (blob) {\r\n doc.downloaded = true;\r\n if ( /* !doc.animated || */doc.type != 'sticker') {\r\n doc.url = filemanager_1.default.getFileCorrectUrl(blob, doc.mime_type);\r\n }\r\n }\r\n /* doc.progress.percent = 100;\r\n setTimeout(() => {\r\n delete doc.progress;\r\n }, 0); */\r\n // console.log('file save done')\r\n return blob;\r\n }, (e) => {\r\n console.log('document download failed', e);\r\n //historyDoc.progress.enabled = false;\r\n });\r\n /* downloadPromise.notify = (progress) => {\r\n console.log('dl progress', progress);\r\n historyDoc.progress.enabled = true;\r\n historyDoc.progress.done = progress.done;\r\n historyDoc.progress.percent = Math.max(1, Math.floor(100 * progress.done / progress.total));\r\n $rootScope.$broadcast('history_update');\r\n }; */\r\n //historyDoc.progress.cancel = downloadPromise.cancel;\r\n //console.log('return downloadPromise:', downloadPromise);\r\n return downloadPromise;\r\n }\r\n saveDocFile(docID) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n var doc = this.docs[docID];\r\n var fileName = this.getFileName(doc);\r\n var ext = (fileName.split('.', 2) || [])[1] || '';\r\n try {\r\n let writer = filemanager_1.default.chooseSaveFile(fileName, ext, doc.mime_type, doc.size);\r\n yield writer.ready;\r\n let promise = this.downloadDoc(docID, writer);\r\n promise.then(() => {\r\n writer.close();\r\n console.log('saved doc', doc);\r\n });\r\n //console.log('got promise from downloadDoc', promise);\r\n return { promise };\r\n }\r\n catch (err) {\r\n let promise = this.downloadDoc(docID);\r\n promise.then((blob) => {\r\n filemanager_1.default.download(blob, doc.mime_type, fileName);\r\n });\r\n return { promise };\r\n }\r\n });\r\n }\r\n}\r\nexports.default = new AppDocsManager();\r\n" }, { "id": 17, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesIDsManager.ts", - "name": "./src/lib/appManagers/appMessagesIDsManager.ts", - "index": 60, - "index2": 53, - "size": 2045, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\config.ts", + "name": "./src/lib/config.ts", + "index": 23, + "index2": 20, + "size": 200506, "cacheable": true, "built": true, "optional": false, @@ -3264,44 +3214,34 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "issuerId": 35, + "issuerName": "./src/pages/pageSignIn.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "dependencies": 1062 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 527, + "building": 1006, + "dependencies": 2 }, "failed": false, "errors": 0, @@ -3309,49 +3249,58 @@ "assets": [], "reasons": [ { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appMessagesIDsManager", - "loc": "16:48-82" + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", + "module": "./src/lib/richtextprocessor.js", + "moduleName": "./src/lib/richtextprocessor.js", + "type": "harmony side effect evaluation", + "userRequest": "./config", + "loc": "2:0-30" }, { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appMessagesIDsManager", - "loc": "39:48-82" + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", + "module": "./src/lib/richtextprocessor.js", + "moduleName": "./src/lib/richtextprocessor.js", + "type": "harmony import specifier", + "userRequest": "./config", + "loc": "10:16-22" }, { - "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleId": 2, + "moduleIdentifier": "F:\\tweb\\src\\lib\\richtextprocessor.js", + "module": "./src/lib/richtextprocessor.js", + "moduleName": "./src/lib/richtextprocessor.js", + "type": "harmony import specifier", + "userRequest": "./config", + "loc": "167:58-64" + }, + { + "moduleId": 3, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\misc.ts", + "module": "./src/components/misc.ts", + "moduleName": "./src/components/misc.ts", "type": "cjs require", - "userRequest": "./appMessagesIDsManager", - "loc": "21:48-82" + "userRequest": "../lib/config", + "loc": "7:33-57" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", "type": "cjs require", - "userRequest": "./appMessagesIDsManager", - "loc": "7:48-82" + "userRequest": "../lib/config", + "loc": "9:33-57" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "module": "./src/components/emoticonsDropdown.ts", + "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "./appManagers/appMessagesIDsManager", - "loc": "9:48-94" + "userRequest": "../lib/config", + "loc": "29:33-57" } ], "usedExports": true, @@ -3359,16 +3308,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass AppMessagesIDsManager {\n constructor() {\n this.channelLocals = {};\n this.channelsByLocals = {};\n this.channelCurLocal = 0;\n this.fullMsgIDModulus = 4294967296;\n }\n getFullMessageID(msgID, channelID) {\n if (!channelID || msgID <= 0) {\n return msgID;\n }\n msgID = this.getMessageLocalID(msgID);\n var localStart = this.channelLocals[channelID];\n if (!localStart) {\n localStart = (++this.channelCurLocal) * this.fullMsgIDModulus;\n this.channelsByLocals[localStart] = channelID;\n this.channelLocals[channelID] = localStart;\n }\n return localStart + msgID;\n }\n getMessageIDInfo(fullMsgID) {\n if (fullMsgID < this.fullMsgIDModulus) {\n return [fullMsgID, 0];\n }\n var msgID = fullMsgID % this.fullMsgIDModulus;\n var channelID = this.channelsByLocals[fullMsgID - msgID];\n return [msgID, channelID];\n }\n getMessageLocalID(fullMsgID) {\n if (!fullMsgID) {\n return 0;\n }\n return fullMsgID % this.fullMsgIDModulus;\n }\n splitMessageIDsByChannels(mids) {\n var msgIDsByChannels = {};\n var midsByChannels = {};\n var i;\n var mid, msgChannel;\n var channelID;\n for (i = 0; i < mids.length; i++) {\n mid = mids[i];\n msgChannel = this.getMessageIDInfo(mid);\n channelID = msgChannel[1];\n if (msgIDsByChannels[channelID] === undefined) {\n msgIDsByChannels[channelID] = [];\n midsByChannels[channelID] = [];\n }\n msgIDsByChannels[channelID].push(msgChannel[0]);\n midsByChannels[channelID].push(mid);\n }\n return {\n msgIDs: msgIDsByChannels,\n mids: midsByChannels\n };\n }\n}\nexports.AppMessagesIDsManager = AppMessagesIDsManager;\nexports.default = new AppMessagesIDsManager();\n" + "depth": 2, + "source": "\"use strict\";\r\n/*!\r\n * Webogram v0.7.0 - messaging web application for MTProto\r\n * https://github.com/zhukov/webogram\r\n * Copyright (C) 2014 Igor Zhukov \r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/*\r\n\r\n IMPORTANT NOTICE\r\n ================\r\n\r\n Do not publish your Webogram fork with my app credentials (below), or your application may be blocked.\r\n You can get your own api_id, api_hash at https://my.telegram.org, see manual at https://core.telegram.org/api/obtaining_api_id.\r\n\r\n*/\r\n{\r\n /* let img_size = 32;\r\n let side = 52;\r\n let sheetUrl = `assets/img/sheet_apple_${img_size}_`; // #.png\r\n let multiplyX = 100 / 6;\r\n let sheetSizeX = 6 * (img_size + 2); // size of image in pixels\r\n let sheetSizeY = side * (img_size + 2); // size of image in pixels\r\n let sizeX = 100 * (sheetSizeX / img_size);\r\n let sizeY = 100 * (sheetSizeY / img_size);\r\n let splitted = true; */\r\n let img_size = 64;\r\n let side = 56;\r\n let sheetUrl = `assets/img/sheet_apple_${img_size}`; // #.png\r\n let multiplyX = 100 / side;\r\n let sheetSizeX = side * (img_size + 2); // size of image in pixels\r\n let sheetSizeY = side * (img_size + 2); // size of image in pixels\r\n let sizeX = 100 * (sheetSizeX / img_size);\r\n let sizeY = 100 * (sheetSizeY / img_size);\r\n let splitted = false;\r\n var Emoji = {\r\n img_size,\r\n sheetUrl,\r\n multiplyX,\r\n sheetSizeX,\r\n sheetSizeY,\r\n sizeX,\r\n sizeY,\r\n side,\r\n splitted,\r\n keyCategory: 'category',\r\n keyX: 'sheet_x',\r\n keyY: 'sheet_y',\r\n /* keyCategory: '2',\r\n keyX: '0', // 'sheet_x'\r\n keyY: '1', // 'sheet_y' */\r\n emoji: { \"#️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 0, \"sort_order\": 132 }, \"*️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 1, \"sort_order\": 133 }, \"0️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 2, \"sort_order\": 134 }, \"1️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 3, \"sort_order\": 135 }, \"2️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 4, \"sort_order\": 136 }, \"3️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 5, \"sort_order\": 137 }, \"4️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 6, \"sort_order\": 138 }, \"5️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 7, \"sort_order\": 139 }, \"6️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 8, \"sort_order\": 140 }, \"7️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 9, \"sort_order\": 141 }, \"8️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 10, \"sort_order\": 142 }, \"9️⃣\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 11, \"sort_order\": 143 }, \"©️\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 12, \"sort_order\": 129 }, \"®️\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 13, \"sort_order\": 130 }, \"🀄\": { \"category\": \"Activities\", \"sheet_x\": 0, \"sheet_y\": 14, \"sort_order\": 73 }, \"🃏\": { \"category\": \"Activities\", \"sheet_x\": 0, \"sheet_y\": 15, \"sort_order\": 72 }, \"🅰️\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 16, \"sort_order\": 150 }, \"🅱️\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 17, \"sort_order\": 152 }, \"🅾️\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 18, \"sort_order\": 161 }, \"🅿️\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 19, \"sort_order\": 163 }, \"🆎\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 20, \"sort_order\": 151 }, \"🆑\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 21, \"sort_order\": 153 }, \"🆒\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 22, \"sort_order\": 154 }, \"🆓\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 23, \"sort_order\": 155 }, \"🆔\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 24, \"sort_order\": 157 }, \"🆕\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 25, \"sort_order\": 159 }, \"🆖\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 26, \"sort_order\": 160 }, \"🆗\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 27, \"sort_order\": 162 }, \"🆘\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 28, \"sort_order\": 164 }, \"🆙\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 29, \"sort_order\": 165 }, \"🆚\": { \"category\": \"Symbols\", \"sheet_x\": 0, \"sheet_y\": 30, \"sort_order\": 166 }, \"🇦🇨\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 31, \"sort_order\": 8 }, \"🇦🇩\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 32, \"sort_order\": 9 }, \"🇦🇪\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 33, \"sort_order\": 10 }, \"🇦🇫\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 34, \"sort_order\": 11 }, \"🇦🇬\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 35, \"sort_order\": 12 }, \"🇦🇮\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 36, \"sort_order\": 13 }, \"🇦🇱\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 37, \"sort_order\": 14 }, \"🇦🇲\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 38, \"sort_order\": 15 }, \"🇦🇴\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 39, \"sort_order\": 16 }, \"🇦🇶\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 40, \"sort_order\": 17 }, \"🇦🇷\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 41, \"sort_order\": 18 }, \"🇦🇸\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 42, \"sort_order\": 19 }, \"🇦🇹\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 43, \"sort_order\": 20 }, \"🇦🇺\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 44, \"sort_order\": 21 }, \"🇦🇼\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 45, \"sort_order\": 22 }, \"🇦🇽\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 46, \"sort_order\": 23 }, \"🇦🇿\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 47, \"sort_order\": 24 }, \"🇧🇦\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 48, \"sort_order\": 25 }, \"🇧🇧\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 49, \"sort_order\": 26 }, \"🇧🇩\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 50, \"sort_order\": 27 }, \"🇧🇪\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 51, \"sort_order\": 28 }, \"🇧🇫\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 52, \"sort_order\": 29 }, \"🇧🇬\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 53, \"sort_order\": 30 }, \"🇧🇭\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 54, \"sort_order\": 31 }, \"🇧🇮\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 55, \"sort_order\": 32 }, \"🇧🇯\": { \"category\": \"Flags\", \"sheet_x\": 0, \"sheet_y\": 56, \"sort_order\": 33 }, \"🇧🇱\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 0, \"sort_order\": 34 }, \"🇧🇲\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 1, \"sort_order\": 35 }, \"🇧🇳\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 2, \"sort_order\": 36 }, \"🇧🇴\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 3, \"sort_order\": 37 }, \"🇧🇶\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 4, \"sort_order\": 38 }, \"🇧🇷\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 5, \"sort_order\": 39 }, \"🇧🇸\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 6, \"sort_order\": 40 }, \"🇧🇹\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 7, \"sort_order\": 41 }, \"🇧🇻\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 8, \"sort_order\": 42 }, \"🇧🇼\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 9, \"sort_order\": 43 }, \"🇧🇾\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 10, \"sort_order\": 44 }, \"🇧🇿\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 11, \"sort_order\": 45 }, \"🇨🇦\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 12, \"sort_order\": 46 }, \"🇨🇨\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 13, \"sort_order\": 47 }, \"🇨🇩\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 14, \"sort_order\": 48 }, \"🇨🇫\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 15, \"sort_order\": 49 }, \"🇨🇬\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 16, \"sort_order\": 50 }, \"🇨🇭\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 17, \"sort_order\": 51 }, \"🇨🇮\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 18, \"sort_order\": 52 }, \"🇨🇰\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 19, \"sort_order\": 53 }, \"🇨🇱\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 20, \"sort_order\": 54 }, \"🇨🇲\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 21, \"sort_order\": 55 }, \"🇨🇳\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 22, \"sort_order\": 56 }, \"🇨🇴\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 23, \"sort_order\": 57 }, \"🇨🇵\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 24, \"sort_order\": 58 }, \"🇨🇷\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 25, \"sort_order\": 59 }, \"🇨🇺\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 26, \"sort_order\": 60 }, \"🇨🇻\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 27, \"sort_order\": 61 }, \"🇨🇼\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 28, \"sort_order\": 62 }, \"🇨🇽\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 29, \"sort_order\": 63 }, \"🇨🇾\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 30, \"sort_order\": 64 }, \"🇨🇿\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 31, \"sort_order\": 65 }, \"🇩🇪\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 32, \"sort_order\": 66 }, \"🇩🇬\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 33, \"sort_order\": 67 }, \"🇩🇯\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 34, \"sort_order\": 68 }, \"🇩🇰\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 35, \"sort_order\": 69 }, \"🇩🇲\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 36, \"sort_order\": 70 }, \"🇩🇴\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 37, \"sort_order\": 71 }, \"🇩🇿\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 38, \"sort_order\": 72 }, \"🇪🇦\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 39, \"sort_order\": 73 }, \"🇪🇨\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 40, \"sort_order\": 74 }, \"🇪🇪\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 41, \"sort_order\": 75 }, \"🇪🇬\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 42, \"sort_order\": 76 }, \"🇪🇭\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 43, \"sort_order\": 77 }, \"🇪🇷\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 44, \"sort_order\": 78 }, \"🇪🇸\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 45, \"sort_order\": 79 }, \"🇪🇹\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 46, \"sort_order\": 80 }, \"🇪🇺\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 47, \"sort_order\": 81 }, \"🇫🇮\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 48, \"sort_order\": 82 }, \"🇫🇯\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 49, \"sort_order\": 83 }, \"🇫🇰\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 50, \"sort_order\": 84 }, \"🇫🇲\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 51, \"sort_order\": 85 }, \"🇫🇴\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 52, \"sort_order\": 86 }, \"🇫🇷\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 53, \"sort_order\": 87 }, \"🇬🇦\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 54, \"sort_order\": 88 }, \"🇬🇧\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 55, \"sort_order\": 89 }, \"🇬🇩\": { \"category\": \"Flags\", \"sheet_x\": 1, \"sheet_y\": 56, \"sort_order\": 90 }, \"🇬🇪\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 0, \"sort_order\": 91 }, \"🇬🇫\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 1, \"sort_order\": 92 }, \"🇬🇬\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 2, \"sort_order\": 93 }, \"🇬🇭\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 3, \"sort_order\": 94 }, \"🇬🇮\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 4, \"sort_order\": 95 }, \"🇬🇱\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 5, \"sort_order\": 96 }, \"🇬🇲\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 6, \"sort_order\": 97 }, \"🇬🇳\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 7, \"sort_order\": 98 }, \"🇬🇵\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 8, \"sort_order\": 99 }, \"🇬🇶\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 9, \"sort_order\": 100 }, \"🇬🇷\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 10, \"sort_order\": 101 }, \"🇬🇸\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 11, \"sort_order\": 102 }, \"🇬🇹\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 12, \"sort_order\": 103 }, \"🇬🇺\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 13, \"sort_order\": 104 }, \"🇬🇼\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 14, \"sort_order\": 105 }, \"🇬🇾\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 15, \"sort_order\": 106 }, \"🇭🇰\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 16, \"sort_order\": 107 }, \"🇭🇲\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 17, \"sort_order\": 108 }, \"🇭🇳\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 18, \"sort_order\": 109 }, \"🇭🇷\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 19, \"sort_order\": 110 }, \"🇭🇹\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 20, \"sort_order\": 111 }, \"🇭🇺\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 21, \"sort_order\": 112 }, \"🇮🇨\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 22, \"sort_order\": 113 }, \"🇮🇩\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 23, \"sort_order\": 114 }, \"🇮🇪\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 24, \"sort_order\": 115 }, \"🇮🇱\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 25, \"sort_order\": 116 }, \"🇮🇲\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 26, \"sort_order\": 117 }, \"🇮🇳\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 27, \"sort_order\": 118 }, \"🇮🇴\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 28, \"sort_order\": 119 }, \"🇮🇶\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 29, \"sort_order\": 120 }, \"🇮🇷\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 30, \"sort_order\": 121 }, \"🇮🇸\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 31, \"sort_order\": 122 }, \"🇮🇹\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 32, \"sort_order\": 123 }, \"🇯🇪\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 33, \"sort_order\": 124 }, \"🇯🇲\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 34, \"sort_order\": 125 }, \"🇯🇴\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 35, \"sort_order\": 126 }, \"🇯🇵\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 36, \"sort_order\": 127 }, \"🇰🇪\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 37, \"sort_order\": 128 }, \"🇰🇬\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 38, \"sort_order\": 129 }, \"🇰🇭\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 39, \"sort_order\": 130 }, \"🇰🇮\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 40, \"sort_order\": 131 }, \"🇰🇲\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 41, \"sort_order\": 132 }, \"🇰🇳\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 42, \"sort_order\": 133 }, \"🇰🇵\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 43, \"sort_order\": 134 }, \"🇰🇷\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 44, \"sort_order\": 135 }, \"🇰🇼\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 45, \"sort_order\": 136 }, \"🇰🇾\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 46, \"sort_order\": 137 }, \"🇰🇿\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 47, \"sort_order\": 138 }, \"🇱🇦\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 48, \"sort_order\": 139 }, \"🇱🇧\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 49, \"sort_order\": 140 }, \"🇱🇨\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 50, \"sort_order\": 141 }, \"🇱🇮\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 51, \"sort_order\": 142 }, \"🇱🇰\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 52, \"sort_order\": 143 }, \"🇱🇷\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 53, \"sort_order\": 144 }, \"🇱🇸\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 54, \"sort_order\": 145 }, \"🇱🇹\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 55, \"sort_order\": 146 }, \"🇱🇺\": { \"category\": \"Flags\", \"sheet_x\": 2, \"sheet_y\": 56, \"sort_order\": 147 }, \"🇱🇻\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 0, \"sort_order\": 148 }, \"🇱🇾\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 1, \"sort_order\": 149 }, \"🇲🇦\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 2, \"sort_order\": 150 }, \"🇲🇨\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 3, \"sort_order\": 151 }, \"🇲🇩\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 4, \"sort_order\": 152 }, \"🇲🇪\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 5, \"sort_order\": 153 }, \"🇲🇫\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 6, \"sort_order\": 154 }, \"🇲🇬\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 7, \"sort_order\": 155 }, \"🇲🇭\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 8, \"sort_order\": 156 }, \"🇲🇰\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 9, \"sort_order\": 157 }, \"🇲🇱\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 10, \"sort_order\": 158 }, \"🇲🇲\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 11, \"sort_order\": 159 }, \"🇲🇳\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 12, \"sort_order\": 160 }, \"🇲🇴\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 13, \"sort_order\": 161 }, \"🇲🇵\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 14, \"sort_order\": 162 }, \"🇲🇶\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 15, \"sort_order\": 163 }, \"🇲🇷\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 16, \"sort_order\": 164 }, \"🇲🇸\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 17, \"sort_order\": 165 }, \"🇲🇹\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 18, \"sort_order\": 166 }, \"🇲🇺\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 19, \"sort_order\": 167 }, \"🇲🇻\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 20, \"sort_order\": 168 }, \"🇲🇼\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 21, \"sort_order\": 169 }, \"🇲🇽\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 22, \"sort_order\": 170 }, \"🇲🇾\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 23, \"sort_order\": 171 }, \"🇲🇿\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 24, \"sort_order\": 172 }, \"🇳🇦\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 25, \"sort_order\": 173 }, \"🇳🇨\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 26, \"sort_order\": 174 }, \"🇳🇪\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 27, \"sort_order\": 175 }, \"🇳🇫\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 28, \"sort_order\": 176 }, \"🇳🇬\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 29, \"sort_order\": 177 }, \"🇳🇮\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 30, \"sort_order\": 178 }, \"🇳🇱\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 31, \"sort_order\": 179 }, \"🇳🇴\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 32, \"sort_order\": 180 }, \"🇳🇵\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 33, \"sort_order\": 181 }, \"🇳🇷\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 34, \"sort_order\": 182 }, \"🇳🇺\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 35, \"sort_order\": 183 }, \"🇳🇿\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 36, \"sort_order\": 184 }, \"🇴🇲\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 37, \"sort_order\": 185 }, \"🇵🇦\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 38, \"sort_order\": 186 }, \"🇵🇪\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 39, \"sort_order\": 187 }, \"🇵🇫\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 40, \"sort_order\": 188 }, \"🇵🇬\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 41, \"sort_order\": 189 }, \"🇵🇭\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 42, \"sort_order\": 190 }, \"🇵🇰\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 43, \"sort_order\": 191 }, \"🇵🇱\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 44, \"sort_order\": 192 }, \"🇵🇲\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 45, \"sort_order\": 193 }, \"🇵🇳\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 46, \"sort_order\": 194 }, \"🇵🇷\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 47, \"sort_order\": 195 }, \"🇵🇸\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 48, \"sort_order\": 196 }, \"🇵🇹\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 49, \"sort_order\": 197 }, \"🇵🇼\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 50, \"sort_order\": 198 }, \"🇵🇾\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 51, \"sort_order\": 199 }, \"🇶🇦\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 52, \"sort_order\": 200 }, \"🇷🇪\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 53, \"sort_order\": 201 }, \"🇷🇴\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 54, \"sort_order\": 202 }, \"🇷🇸\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 55, \"sort_order\": 203 }, \"🇷🇺\": { \"category\": \"Flags\", \"sheet_x\": 3, \"sheet_y\": 56, \"sort_order\": 204 }, \"🇷🇼\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 0, \"sort_order\": 205 }, \"🇸🇦\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 1, \"sort_order\": 206 }, \"🇸🇧\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 2, \"sort_order\": 207 }, \"🇸🇨\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 3, \"sort_order\": 208 }, \"🇸🇩\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 4, \"sort_order\": 209 }, \"🇸🇪\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 5, \"sort_order\": 210 }, \"🇸🇬\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 6, \"sort_order\": 211 }, \"🇸🇭\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 7, \"sort_order\": 212 }, \"🇸🇮\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 8, \"sort_order\": 213 }, \"🇸🇯\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 9, \"sort_order\": 214 }, \"🇸🇰\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 10, \"sort_order\": 215 }, \"🇸🇱\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 11, \"sort_order\": 216 }, \"🇸🇲\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 12, \"sort_order\": 217 }, \"🇸🇳\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 13, \"sort_order\": 218 }, \"🇸🇴\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 14, \"sort_order\": 219 }, \"🇸🇷\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 15, \"sort_order\": 220 }, \"🇸🇸\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 16, \"sort_order\": 221 }, \"🇸🇹\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 17, \"sort_order\": 222 }, \"🇸🇻\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 18, \"sort_order\": 223 }, \"🇸🇽\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 19, \"sort_order\": 224 }, \"🇸🇾\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 20, \"sort_order\": 225 }, \"🇸🇿\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 21, \"sort_order\": 226 }, \"🇹🇦\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 22, \"sort_order\": 227 }, \"🇹🇨\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 23, \"sort_order\": 228 }, \"🇹🇩\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 24, \"sort_order\": 229 }, \"🇹🇫\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 25, \"sort_order\": 230 }, \"🇹🇬\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 26, \"sort_order\": 231 }, \"🇹🇭\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 27, \"sort_order\": 232 }, \"🇹🇯\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 28, \"sort_order\": 233 }, \"🇹🇰\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 29, \"sort_order\": 234 }, \"🇹🇱\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 30, \"sort_order\": 235 }, \"🇹🇲\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 31, \"sort_order\": 236 }, \"🇹🇳\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 32, \"sort_order\": 237 }, \"🇹🇴\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 33, \"sort_order\": 238 }, \"🇹🇷\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 34, \"sort_order\": 239 }, \"🇹🇹\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 35, \"sort_order\": 240 }, \"🇹🇻\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 36, \"sort_order\": 241 }, \"🇹🇼\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 37, \"sort_order\": 242 }, \"🇹🇿\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 38, \"sort_order\": 243 }, \"🇺🇦\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 39, \"sort_order\": 244 }, \"🇺🇬\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 40, \"sort_order\": 245 }, \"🇺🇲\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 41, \"sort_order\": 246 }, \"🇺🇳\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 42, \"sort_order\": 247 }, \"🇺🇸\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 43, \"sort_order\": 248 }, \"🇺🇾\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 44, \"sort_order\": 249 }, \"🇺🇿\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 45, \"sort_order\": 250 }, \"🇻🇦\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 46, \"sort_order\": 251 }, \"🇻🇨\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 47, \"sort_order\": 252 }, \"🇻🇪\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 48, \"sort_order\": 253 }, \"🇻🇬\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 49, \"sort_order\": 254 }, \"🇻🇮\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 50, \"sort_order\": 255 }, \"🇻🇳\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 51, \"sort_order\": 256 }, \"🇻🇺\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 52, \"sort_order\": 257 }, \"🇼🇫\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 53, \"sort_order\": 258 }, \"🇼🇸\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 54, \"sort_order\": 259 }, \"🇽🇰\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 55, \"sort_order\": 260 }, \"🇾🇪\": { \"category\": \"Flags\", \"sheet_x\": 4, \"sheet_y\": 56, \"sort_order\": 261 }, \"🇾🇹\": { \"category\": \"Flags\", \"sheet_x\": 5, \"sheet_y\": 0, \"sort_order\": 262 }, \"🇿🇦\": { \"category\": \"Flags\", \"sheet_x\": 5, \"sheet_y\": 1, \"sort_order\": 263 }, \"🇿🇲\": { \"category\": \"Flags\", \"sheet_x\": 5, \"sheet_y\": 2, \"sort_order\": 264 }, \"🇿🇼\": { \"category\": \"Flags\", \"sheet_x\": 5, \"sheet_y\": 3, \"sort_order\": 265 }, \"🈁\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 4, \"sort_order\": 167 }, \"🈂️\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 5, \"sort_order\": 168 }, \"🈚\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 6, \"sort_order\": 174 }, \"🈯\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 7, \"sort_order\": 171 }, \"🈲\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 8, \"sort_order\": 175 }, \"🈳\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 9, \"sort_order\": 179 }, \"🈴\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 10, \"sort_order\": 178 }, \"🈵\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 11, \"sort_order\": 183 }, \"🈶\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 12, \"sort_order\": 170 }, \"🈷️\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 13, \"sort_order\": 169 }, \"🈸\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 14, \"sort_order\": 177 }, \"🈹\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 15, \"sort_order\": 173 }, \"🈺\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 16, \"sort_order\": 182 }, \"🉐\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 17, \"sort_order\": 172 }, \"🉑\": { \"category\": \"Symbols\", \"sheet_x\": 5, \"sheet_y\": 18, \"sort_order\": 176 }, \"🌀\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 19, \"sort_order\": 197 }, \"🌁\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 20, \"sort_order\": 49 }, \"🌂\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 21, \"sort_order\": 199 }, \"🌃\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 22, \"sort_order\": 50 }, \"🌄\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 23, \"sort_order\": 52 }, \"🌅\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 24, \"sort_order\": 53 }, \"🌆\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 25, \"sort_order\": 54 }, \"🌇\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 26, \"sort_order\": 55 }, \"🌈\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 27, \"sort_order\": 198 }, \"🌉\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 28, \"sort_order\": 56 }, \"🌊\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 29, \"sort_order\": 210 }, \"🌋\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 30, \"sort_order\": 10 }, \"🌌\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 31, \"sort_order\": 184 }, \"🌍\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 32, \"sort_order\": 1 }, \"🌎\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 33, \"sort_order\": 2 }, \"🌏\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 34, \"sort_order\": 3 }, \"🌐\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 35, \"sort_order\": 4 }, \"🌑\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 36, \"sort_order\": 164 }, \"🌒\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 37, \"sort_order\": 165 }, \"🌓\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 38, \"sort_order\": 166 }, \"🌔\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 39, \"sort_order\": 167 }, \"🌕\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 40, \"sort_order\": 168 }, \"🌖\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 41, \"sort_order\": 169 }, \"🌗\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 42, \"sort_order\": 170 }, \"🌘\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 43, \"sort_order\": 171 }, \"🌙\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 44, \"sort_order\": 172 }, \"🌚\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 45, \"sort_order\": 173 }, \"🌛\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 46, \"sort_order\": 174 }, \"🌜\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 47, \"sort_order\": 175 }, \"🌝\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 48, \"sort_order\": 178 }, \"🌞\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 49, \"sort_order\": 179 }, \"🌟\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 50, \"sort_order\": 182 }, \"🌠\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 51, \"sort_order\": 183 }, \"🌡️\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 52, \"sort_order\": 176 }, \"🌤️\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 53, \"sort_order\": 188 }, \"🌥️\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 54, \"sort_order\": 189 }, \"🌦️\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 55, \"sort_order\": 190 }, \"🌧️\": { \"category\": \"Travel & Places\", \"sheet_x\": 5, \"sheet_y\": 56, \"sort_order\": 191 }, \"🌨️\": { \"category\": \"Travel & Places\", \"sheet_x\": 6, \"sheet_y\": 0, \"sort_order\": 192 }, \"🌩️\": { \"category\": \"Travel & Places\", \"sheet_x\": 6, \"sheet_y\": 1, \"sort_order\": 193 }, \"🌪️\": { \"category\": \"Travel & Places\", \"sheet_x\": 6, \"sheet_y\": 2, \"sort_order\": 194 }, \"🌫️\": { \"category\": \"Travel & Places\", \"sheet_x\": 6, \"sheet_y\": 3, \"sort_order\": 195 }, \"🌬️\": { \"category\": \"Travel & Places\", \"sheet_x\": 6, \"sheet_y\": 4, \"sort_order\": 196 }, \"🌭\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 5, \"sort_order\": 47 }, \"🌮\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 6, \"sort_order\": 49 }, \"🌯\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 7, \"sort_order\": 50 }, \"🌰\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 8, \"sort_order\": 31 }, \"🌱\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 9, \"sort_order\": 116 }, \"🌲\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 10, \"sort_order\": 117 }, \"🌳\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 11, \"sort_order\": 118 }, \"🌴\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 12, \"sort_order\": 119 }, \"🌵\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 13, \"sort_order\": 120 }, \"🌶️\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 14, \"sort_order\": 23 }, \"🌷\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 15, \"sort_order\": 115 }, \"🌸\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 16, \"sort_order\": 107 }, \"🌹\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 17, \"sort_order\": 110 }, \"🌺\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 18, \"sort_order\": 112 }, \"🌻\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 19, \"sort_order\": 113 }, \"🌼\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 20, \"sort_order\": 114 }, \"🌽\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 21, \"sort_order\": 22 }, \"🌾\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 22, \"sort_order\": 121 }, \"🌿\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 23, \"sort_order\": 122 }, \"🍀\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 24, \"sort_order\": 124 }, \"🍁\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 25, \"sort_order\": 125 }, \"🍂\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 26, \"sort_order\": 126 }, \"🍃\": { \"category\": \"Animals & Nature\", \"sheet_x\": 6, \"sheet_y\": 27, \"sort_order\": 127 }, \"🍄\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 28, \"sort_order\": 29 }, \"🍅\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 29, \"sort_order\": 16 }, \"🍆\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 30, \"sort_order\": 19 }, \"🍇\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 31, \"sort_order\": 1 }, \"🍈\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 32, \"sort_order\": 2 }, \"🍉\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 33, \"sort_order\": 3 }, \"🍊\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 34, \"sort_order\": 4 }, \"🍋\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 35, \"sort_order\": 5 }, \"🍌\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 36, \"sort_order\": 6 }, \"🍍\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 37, \"sort_order\": 7 }, \"🍎\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 38, \"sort_order\": 9 }, \"🍏\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 39, \"sort_order\": 10 }, \"🍐\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 40, \"sort_order\": 11 }, \"🍑\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 41, \"sort_order\": 12 }, \"🍒\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 42, \"sort_order\": 13 }, \"🍓\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 43, \"sort_order\": 14 }, \"🍔\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 44, \"sort_order\": 44 }, \"🍕\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 45, \"sort_order\": 46 }, \"🍖\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 46, \"sort_order\": 40 }, \"🍗\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 47, \"sort_order\": 41 }, \"🍘\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 48, \"sort_order\": 64 }, \"🍙\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 49, \"sort_order\": 65 }, \"🍚\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 50, \"sort_order\": 66 }, \"🍛\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 51, \"sort_order\": 67 }, \"🍜\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 52, \"sort_order\": 68 }, \"🍝\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 53, \"sort_order\": 69 }, \"🍞\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 54, \"sort_order\": 32 }, \"🍟\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 55, \"sort_order\": 45 }, \"🍠\": { \"category\": \"Food & Drink\", \"sheet_x\": 6, \"sheet_y\": 56, \"sort_order\": 70 }, \"🍡\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 0, \"sort_order\": 76 }, \"🍢\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 1, \"sort_order\": 71 }, \"🍣\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 2, \"sort_order\": 72 }, \"🍤\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 3, \"sort_order\": 73 }, \"🍥\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 4, \"sort_order\": 74 }, \"🍦\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 5, \"sort_order\": 85 }, \"🍧\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 6, \"sort_order\": 86 }, \"🍨\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 7, \"sort_order\": 87 }, \"🍩\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 8, \"sort_order\": 88 }, \"🍪\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 9, \"sort_order\": 89 }, \"🍫\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 10, \"sort_order\": 94 }, \"🍬\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 11, \"sort_order\": 95 }, \"🍭\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 12, \"sort_order\": 96 }, \"🍮\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 13, \"sort_order\": 97 }, \"🍯\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 14, \"sort_order\": 98 }, \"🍰\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 15, \"sort_order\": 91 }, \"🍱\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 16, \"sort_order\": 63 }, \"🍲\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 17, \"sort_order\": 56 }, \"🍳\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 18, \"sort_order\": 54 }, \"🍴\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 19, \"sort_order\": 118 }, \"🍵\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 20, \"sort_order\": 102 }, \"🍶\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 21, \"sort_order\": 103 }, \"🍷\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 22, \"sort_order\": 105 }, \"🍸\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 23, \"sort_order\": 106 }, \"🍹\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 24, \"sort_order\": 107 }, \"🍺\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 25, \"sort_order\": 108 }, \"🍻\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 26, \"sort_order\": 109 }, \"🍼\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 27, \"sort_order\": 99 }, \"🍽️\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 28, \"sort_order\": 117 }, \"🍾\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 29, \"sort_order\": 104 }, \"🍿\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 30, \"sort_order\": 59 }, \"🎀\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 31, \"sort_order\": 17 }, \"🎁\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 32, \"sort_order\": 18 }, \"🎂\": { \"category\": \"Food & Drink\", \"sheet_x\": 7, \"sheet_y\": 33, \"sort_order\": 90 }, \"🎃\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 34, \"sort_order\": 1 }, \"🎄\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 35, \"sort_order\": 2 }, \"🎅\": { \"category\": \"People & Body\", \"sheet_x\": 7, \"sheet_y\": 36, \"sort_order\": 177 }, \"🎆\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 42, \"sort_order\": 3 }, \"🎇\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 43, \"sort_order\": 4 }, \"🎈\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 44, \"sort_order\": 7 }, \"🎉\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 45, \"sort_order\": 8 }, \"🎊\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 46, \"sort_order\": 9 }, \"🎋\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 47, \"sort_order\": 10 }, \"🎌\": { \"category\": \"Flags\", \"sheet_x\": 7, \"sheet_y\": 48, \"sort_order\": 3 }, \"🎍\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 49, \"sort_order\": 11 }, \"🎎\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 50, \"sort_order\": 12 }, \"🎏\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 51, \"sort_order\": 13 }, \"🎐\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 52, \"sort_order\": 14 }, \"🎑\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 53, \"sort_order\": 15 }, \"🎒\": { \"category\": \"Objects\", \"sheet_x\": 7, \"sheet_y\": 54, \"sort_order\": 25 }, \"🎓\": { \"category\": \"Objects\", \"sheet_x\": 7, \"sheet_y\": 55, \"sort_order\": 37 }, \"🎖️\": { \"category\": \"Activities\", \"sheet_x\": 7, \"sheet_y\": 56, \"sort_order\": 22 }, \"🎗️\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 0, \"sort_order\": 19 }, \"🎙️\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 1, \"sort_order\": 56 }, \"🎚️\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 2, \"sort_order\": 57 }, \"🎛️\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 3, \"sort_order\": 58 }, \"🎞️\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 4, \"sort_order\": 89 }, \"🎟️\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 5, \"sort_order\": 20 }, \"🎠\": { \"category\": \"Travel & Places\", \"sheet_x\": 8, \"sheet_y\": 6, \"sort_order\": 58 }, \"🎡\": { \"category\": \"Travel & Places\", \"sheet_x\": 8, \"sheet_y\": 7, \"sort_order\": 59 }, \"🎢\": { \"category\": \"Travel & Places\", \"sheet_x\": 8, \"sheet_y\": 8, \"sort_order\": 60 }, \"🎣\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 9, \"sort_order\": 49 }, \"🎤\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 10, \"sort_order\": 59 }, \"🎥\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 11, \"sort_order\": 88 }, \"🎦\": { \"category\": \"Symbols\", \"sheet_x\": 8, \"sheet_y\": 12, \"sort_order\": 91 }, \"🎧\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 13, \"sort_order\": 60 }, \"🎨\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 14, \"sort_order\": 77 }, \"🎩\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 15, \"sort_order\": 36 }, \"🎪\": { \"category\": \"Travel & Places\", \"sheet_x\": 8, \"sheet_y\": 16, \"sort_order\": 62 }, \"🎫\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 17, \"sort_order\": 21 }, \"🎬\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 18, \"sort_order\": 91 }, \"🎭\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 19, \"sort_order\": 75 }, \"🎮\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 20, \"sort_order\": 61 }, \"🎯\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 21, \"sort_order\": 55 }, \"🎰\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 22, \"sort_order\": 63 }, \"🎱\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 23, \"sort_order\": 58 }, \"🎲\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 24, \"sort_order\": 64 }, \"🎳\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 25, \"sort_order\": 37 }, \"🎴\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 26, \"sort_order\": 74 }, \"🎵\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 27, \"sort_order\": 54 }, \"🎶\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 28, \"sort_order\": 55 }, \"🎷\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 29, \"sort_order\": 62 }, \"🎸\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 30, \"sort_order\": 63 }, \"🎹\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 31, \"sort_order\": 64 }, \"🎺\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 32, \"sort_order\": 65 }, \"🎻\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 33, \"sort_order\": 66 }, \"🎼\": { \"category\": \"Objects\", \"sheet_x\": 8, \"sheet_y\": 34, \"sort_order\": 53 }, \"🎽\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 35, \"sort_order\": 51 }, \"🎾\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 36, \"sort_order\": 35 }, \"🎿\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 37, \"sort_order\": 52 }, \"🏀\": { \"category\": \"Activities\", \"sheet_x\": 8, \"sheet_y\": 38, \"sort_order\": 31 }, \"🏁\": { \"category\": \"Flags\", \"sheet_x\": 8, \"sheet_y\": 39, \"sort_order\": 1 }, \"🏂\": { \"category\": \"People & Body\", \"sheet_x\": 8, \"sheet_y\": 40, \"sort_order\": 248 }, \"🏃‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 8, \"sheet_y\": 46, \"sort_order\": 232 }, \"🏃‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 8, \"sheet_y\": 52, \"sort_order\": 231 }, \"🏃\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 1, \"sort_order\": 230 }, \"🏄‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 7, \"sort_order\": 254 }, \"🏄‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 13, \"sort_order\": 253 }, \"🏄\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 19, \"sort_order\": 252 }, \"🏅\": { \"category\": \"Activities\", \"sheet_x\": 9, \"sheet_y\": 25, \"sort_order\": 24 }, \"🏆\": { \"category\": \"Activities\", \"sheet_x\": 9, \"sheet_y\": 26, \"sort_order\": 23 }, \"🏇\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 27, \"sort_order\": 246 }, \"🏈\": { \"category\": \"Activities\", \"sheet_x\": 9, \"sheet_y\": 33, \"sort_order\": 33 }, \"🏉\": { \"category\": \"Activities\", \"sheet_x\": 9, \"sheet_y\": 34, \"sort_order\": 34 }, \"🏊‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 35, \"sort_order\": 260 }, \"🏊‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 41, \"sort_order\": 259 }, \"🏊\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 47, \"sort_order\": 258 }, \"🏋️‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 9, \"sheet_y\": 53, \"sort_order\": 266 }, \"🏋️‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 10, \"sheet_y\": 2, \"sort_order\": 265 }, \"🏋️\": { \"category\": \"People & Body\", \"sheet_x\": 10, \"sheet_y\": 8, \"sort_order\": 264 }, \"🏌️‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 10, \"sheet_y\": 14, \"sort_order\": 251 }, \"🏌️‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 10, \"sheet_y\": 20, \"sort_order\": 250 }, \"🏌️\": { \"category\": \"People & Body\", \"sheet_x\": 10, \"sheet_y\": 26, \"sort_order\": 249 }, \"🏍️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 32, \"sort_order\": 92 }, \"🏎️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 33, \"sort_order\": 91 }, \"🏏\": { \"category\": \"Activities\", \"sheet_x\": 10, \"sheet_y\": 34, \"sort_order\": 38 }, \"🏐\": { \"category\": \"Activities\", \"sheet_x\": 10, \"sheet_y\": 35, \"sort_order\": 32 }, \"🏑\": { \"category\": \"Activities\", \"sheet_x\": 10, \"sheet_y\": 36, \"sort_order\": 39 }, \"🏒\": { \"category\": \"Activities\", \"sheet_x\": 10, \"sheet_y\": 37, \"sort_order\": 40 }, \"🏓\": { \"category\": \"Activities\", \"sheet_x\": 10, \"sheet_y\": 38, \"sort_order\": 42 }, \"🏔️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 39, \"sort_order\": 8 }, \"🏕️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 40, \"sort_order\": 12 }, \"🏖️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 41, \"sort_order\": 13 }, \"🏗️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 42, \"sort_order\": 19 }, \"🏘️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 43, \"sort_order\": 21 }, \"🏙️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 44, \"sort_order\": 51 }, \"🏚️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 45, \"sort_order\": 22 }, \"🏛️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 46, \"sort_order\": 18 }, \"🏜️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 47, \"sort_order\": 14 }, \"🏝️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 48, \"sort_order\": 15 }, \"🏞️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 49, \"sort_order\": 16 }, \"🏟️\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 50, \"sort_order\": 17 }, \"🏠\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 51, \"sort_order\": 23 }, \"🏡\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 52, \"sort_order\": 24 }, \"🏢\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 53, \"sort_order\": 25 }, \"🏣\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 54, \"sort_order\": 26 }, \"🏤\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 55, \"sort_order\": 27 }, \"🏥\": { \"category\": \"Travel & Places\", \"sheet_x\": 10, \"sheet_y\": 56, \"sort_order\": 28 }, \"🏦\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 0, \"sort_order\": 29 }, \"🏧\": { \"category\": \"Symbols\", \"sheet_x\": 11, \"sheet_y\": 1, \"sort_order\": 1 }, \"🏨\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 2, \"sort_order\": 30 }, \"🏩\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 3, \"sort_order\": 31 }, \"🏪\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 4, \"sort_order\": 32 }, \"🏫\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 5, \"sort_order\": 33 }, \"🏬\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 6, \"sort_order\": 34 }, \"🏭\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 7, \"sort_order\": 35 }, \"🏮\": { \"category\": \"Objects\", \"sheet_x\": 11, \"sheet_y\": 8, \"sort_order\": 102 }, \"🏯\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 9, \"sort_order\": 36 }, \"🏰\": { \"category\": \"Travel & Places\", \"sheet_x\": 11, \"sheet_y\": 10, \"sort_order\": 37 }, \"🏳️‍🌈\": { \"category\": \"Flags\", \"sheet_x\": 11, \"sheet_y\": 11, \"sort_order\": 6 }, \"🏳️\": { \"category\": \"Flags\", \"sheet_x\": 11, \"sheet_y\": 12, \"sort_order\": 5 }, \"🏴‍☠️\": { \"category\": \"Flags\", \"sheet_x\": 11, \"sheet_y\": 13, \"sort_order\": 7 }, \"🏴󠁧󠁢󠁥󠁮󠁧󠁿\": { \"category\": \"Flags\", \"sheet_x\": 11, \"sheet_y\": 14, \"sort_order\": 266 }, \"🏴󠁧󠁢󠁳󠁣󠁴󠁿\": { \"category\": \"Flags\", \"sheet_x\": 11, \"sheet_y\": 15, \"sort_order\": 267 }, \"🏴󠁧󠁢󠁷󠁬󠁳󠁿\": { \"category\": \"Flags\", \"sheet_x\": 11, \"sheet_y\": 16, \"sort_order\": 268 }, \"🏴\": { \"category\": \"Flags\", \"sheet_x\": 11, \"sheet_y\": 17, \"sort_order\": 4 }, \"🏵️\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 18, \"sort_order\": 109 }, \"🏷️\": { \"category\": \"Objects\", \"sheet_x\": 11, \"sheet_y\": 19, \"sort_order\": 120 }, \"🏸\": { \"category\": \"Activities\", \"sheet_x\": 11, \"sheet_y\": 20, \"sort_order\": 43 }, \"🏹\": { \"category\": \"Objects\", \"sheet_x\": 11, \"sheet_y\": 21, \"sort_order\": 189 }, \"🏺\": { \"category\": \"Food & Drink\", \"sheet_x\": 11, \"sheet_y\": 22, \"sort_order\": 121 }, \"🏻\": { \"category\": \"Skin Tones\", \"sheet_x\": 11, \"sheet_y\": 23, \"sort_order\": 1 }, \"🏼\": { \"category\": \"Skin Tones\", \"sheet_x\": 11, \"sheet_y\": 24, \"sort_order\": 2 }, \"🏽\": { \"category\": \"Skin Tones\", \"sheet_x\": 11, \"sheet_y\": 25, \"sort_order\": 3 }, \"🏾\": { \"category\": \"Skin Tones\", \"sheet_x\": 11, \"sheet_y\": 26, \"sort_order\": 4 }, \"🏿\": { \"category\": \"Skin Tones\", \"sheet_x\": 11, \"sheet_y\": 27, \"sort_order\": 5 }, \"🐀\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 28, \"sort_order\": 44 }, \"🐁\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 29, \"sort_order\": 43 }, \"🐂\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 30, \"sort_order\": 25 }, \"🐃\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 31, \"sort_order\": 26 }, \"🐄\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 32, \"sort_order\": 27 }, \"🐅\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 33, \"sort_order\": 17 }, \"🐆\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 34, \"sort_order\": 18 }, \"🐇\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 35, \"sort_order\": 47 }, \"🐈\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 36, \"sort_order\": 14 }, \"🐉\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 37, \"sort_order\": 82 }, \"🐊\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 38, \"sort_order\": 77 }, \"🐋\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 39, \"sort_order\": 86 }, \"🐌\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 40, \"sort_order\": 94 }, \"🐍\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 41, \"sort_order\": 80 }, \"🐎\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 42, \"sort_order\": 20 }, \"🐏\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 43, \"sort_order\": 32 }, \"🐐\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 44, \"sort_order\": 34 }, \"🐑\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 45, \"sort_order\": 33 }, \"🐒\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 46, \"sort_order\": 2 }, \"🐓\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 47, \"sort_order\": 62 }, \"🐔\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 48, \"sort_order\": 61 }, \"🐕‍🦺\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 49, \"sort_order\": 8 }, \"🐕\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 50, \"sort_order\": 6 }, \"🐖\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 51, \"sort_order\": 29 }, \"🐗\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 52, \"sort_order\": 30 }, \"🐘\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 53, \"sort_order\": 39 }, \"🐙\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 54, \"sort_order\": 92 }, \"🐚\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 55, \"sort_order\": 93 }, \"🐛\": { \"category\": \"Animals & Nature\", \"sheet_x\": 11, \"sheet_y\": 56, \"sort_order\": 96 }, \"🐜\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 0, \"sort_order\": 97 }, \"🐝\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 1, \"sort_order\": 98 }, \"🐞\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 2, \"sort_order\": 99 }, \"🐟\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 3, \"sort_order\": 88 }, \"🐠\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 4, \"sort_order\": 89 }, \"🐡\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 5, \"sort_order\": 90 }, \"🐢\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 6, \"sort_order\": 78 }, \"🐣\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 7, \"sort_order\": 63 }, \"🐤\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 8, \"sort_order\": 64 }, \"🐥\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 9, \"sort_order\": 65 }, \"🐦\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 10, \"sort_order\": 66 }, \"🐧\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 11, \"sort_order\": 67 }, \"🐨\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 12, \"sort_order\": 52 }, \"🐩\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 13, \"sort_order\": 9 }, \"🐪\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 14, \"sort_order\": 35 }, \"🐫\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 15, \"sort_order\": 36 }, \"🐬\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 16, \"sort_order\": 87 }, \"🐭\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 17, \"sort_order\": 42 }, \"🐮\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 18, \"sort_order\": 24 }, \"🐯\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 19, \"sort_order\": 16 }, \"🐰\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 20, \"sort_order\": 46 }, \"🐱\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 21, \"sort_order\": 13 }, \"🐲\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 22, \"sort_order\": 81 }, \"🐳\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 23, \"sort_order\": 85 }, \"🐴\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 24, \"sort_order\": 19 }, \"🐵\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 25, \"sort_order\": 1 }, \"🐶\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 26, \"sort_order\": 5 }, \"🐷\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 27, \"sort_order\": 28 }, \"🐸\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 28, \"sort_order\": 76 }, \"🐹\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 29, \"sort_order\": 45 }, \"🐺\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 30, \"sort_order\": 10 }, \"🐻\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 31, \"sort_order\": 51 }, \"🐼\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 32, \"sort_order\": 53 }, \"🐽\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 33, \"sort_order\": 31 }, \"🐾\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 34, \"sort_order\": 59 }, \"🐿️\": { \"category\": \"Animals & Nature\", \"sheet_x\": 12, \"sheet_y\": 35, \"sort_order\": 48 }, \"👀\": { \"category\": \"People & Body\", \"sheet_x\": 12, \"sheet_y\": 36, \"sort_order\": 45 }, \"👁️‍🗨️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 12, \"sheet_y\": 37, \"sort_order\": 145 }, \"👁️\": { \"category\": \"People & Body\", \"sheet_x\": 12, \"sheet_y\": 38, \"sort_order\": 46 }, \"👂\": { \"category\": \"People & Body\", \"sheet_x\": 12, \"sheet_y\": 39, \"sort_order\": 39 }, \"👃\": { \"category\": \"People & Body\", \"sheet_x\": 12, \"sheet_y\": 45, \"sort_order\": 41 }, \"👄\": { \"category\": \"People & Body\", \"sheet_x\": 12, \"sheet_y\": 51, \"sort_order\": 48 }, \"👅\": { \"category\": \"People & Body\", \"sheet_x\": 12, \"sheet_y\": 52, \"sort_order\": 47 }, \"👆\": { \"category\": \"People & Body\", \"sheet_x\": 12, \"sheet_y\": 53, \"sort_order\": 15 }, \"👇\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 2, \"sort_order\": 17 }, \"👈\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 8, \"sort_order\": 13 }, \"👉\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 14, \"sort_order\": 14 }, \"👊\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 20, \"sort_order\": 22 }, \"👋\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 26, \"sort_order\": 1 }, \"👌\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 32, \"sort_order\": 6 }, \"👍\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 38, \"sort_order\": 19 }, \"👎\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 44, \"sort_order\": 20 }, \"👏\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 50, \"sort_order\": 25 }, \"👐\": { \"category\": \"People & Body\", \"sheet_x\": 13, \"sheet_y\": 56, \"sort_order\": 27 }, \"👑\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 5, \"sort_order\": 34 }, \"👒\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 6, \"sort_order\": 35 }, \"👓\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 7, \"sort_order\": 1 }, \"👔\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 8, \"sort_order\": 6 }, \"👕\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 9, \"sort_order\": 7 }, \"👖\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 10, \"sort_order\": 8 }, \"👗\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 11, \"sort_order\": 13 }, \"👘\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 12, \"sort_order\": 14 }, \"👙\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 13, \"sort_order\": 19 }, \"👚\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 14, \"sort_order\": 20 }, \"👛\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 15, \"sort_order\": 21 }, \"👜\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 16, \"sort_order\": 22 }, \"👝\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 17, \"sort_order\": 23 }, \"👞\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 18, \"sort_order\": 26 }, \"👟\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 19, \"sort_order\": 27 }, \"👠\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 20, \"sort_order\": 30 }, \"👡\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 21, \"sort_order\": 31 }, \"👢\": { \"category\": \"Objects\", \"sheet_x\": 14, \"sheet_y\": 22, \"sort_order\": 33 }, \"👣\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 23, \"sort_order\": 334 }, \"👤\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 24, \"sort_order\": 332 }, \"👥\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 25, \"sort_order\": 333 }, \"👦\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 26, \"sort_order\": 51 }, \"👧\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 32, \"sort_order\": 52 }, \"👨‍🌾\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 38, \"sort_order\": 118 }, \"👨‍🍳\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 44, \"sort_order\": 121 }, \"👨‍🎓\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 50, \"sort_order\": 109 }, \"👨‍🎤\": { \"category\": \"People & Body\", \"sheet_x\": 14, \"sheet_y\": 56, \"sort_order\": 139 }, \"👨‍🎨\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 5, \"sort_order\": 142 }, \"👨‍🏫\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 11, \"sort_order\": 112 }, \"👨‍🏭\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 17, \"sort_order\": 127 }, \"👨‍👦‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 23, \"sort_order\": 322 }, \"👨‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 24, \"sort_order\": 321 }, \"👨‍👧‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 25, \"sort_order\": 324 }, \"👨‍👧‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 26, \"sort_order\": 325 }, \"👨‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 27, \"sort_order\": 323 }, \"👨‍👨‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 28, \"sort_order\": 311 }, \"👨‍👨‍👦‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 29, \"sort_order\": 314 }, \"👨‍👨‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 30, \"sort_order\": 312 }, \"👨‍👨‍👧‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 31, \"sort_order\": 313 }, \"👨‍👨‍👧‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 32, \"sort_order\": 315 }, \"👨‍👩‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 33, \"sort_order\": 306 }, \"👨‍👩‍👦‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 34, \"sort_order\": 309 }, \"👨‍👩‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 35, \"sort_order\": 307 }, \"👨‍👩‍👧‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 36, \"sort_order\": 308 }, \"👨‍👩‍👧‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 37, \"sort_order\": 310 }, \"👨‍💻\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 38, \"sort_order\": 136 }, \"👨‍💼\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 44, \"sort_order\": 130 }, \"👨‍🔧\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 50, \"sort_order\": 124 }, \"👨‍🔬\": { \"category\": \"People & Body\", \"sheet_x\": 15, \"sheet_y\": 56, \"sort_order\": 133 }, \"👨‍🚀\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 5, \"sort_order\": 148 }, \"👨‍🚒\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 11, \"sort_order\": 151 }, \"👨‍🦯\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 17, \"sort_order\": 222 }, \"👨‍🦰\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 23, \"sort_order\": 57 }, \"👨‍🦱\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 29, \"sort_order\": 58 }, \"👨‍🦲\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 35, \"sort_order\": 60 }, \"👨‍🦳\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 41, \"sort_order\": 59 }, \"👨‍🦼\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 47, \"sort_order\": 225 }, \"👨‍🦽\": { \"category\": \"People & Body\", \"sheet_x\": 16, \"sheet_y\": 53, \"sort_order\": 228 }, \"👨‍⚕️\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 2, \"sort_order\": 106 }, \"👨‍⚖️\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 8, \"sort_order\": 115 }, \"👨‍✈️\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 14, \"sort_order\": 145 }, \"👨‍❤️‍👨\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 20, \"sort_order\": 303 }, \"👨‍❤️‍💋‍👨\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 21, \"sort_order\": 299 }, \"👨\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 22, \"sort_order\": 55 }, \"👩‍🌾\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 28, \"sort_order\": 119 }, \"👩‍🍳\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 34, \"sort_order\": 122 }, \"👩‍🎓\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 40, \"sort_order\": 110 }, \"👩‍🎤\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 46, \"sort_order\": 140 }, \"👩‍🎨\": { \"category\": \"People & Body\", \"sheet_x\": 17, \"sheet_y\": 52, \"sort_order\": 143 }, \"👩‍🏫\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 1, \"sort_order\": 113 }, \"👩‍🏭\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 7, \"sort_order\": 128 }, \"👩‍👦‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 13, \"sort_order\": 327 }, \"👩‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 14, \"sort_order\": 326 }, \"👩‍👧‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 15, \"sort_order\": 329 }, \"👩‍👧‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 16, \"sort_order\": 330 }, \"👩‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 17, \"sort_order\": 328 }, \"👩‍👩‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 18, \"sort_order\": 316 }, \"👩‍👩‍👦‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 19, \"sort_order\": 319 }, \"👩‍👩‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 20, \"sort_order\": 317 }, \"👩‍👩‍👧‍👦\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 21, \"sort_order\": 318 }, \"👩‍👩‍👧‍👧\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 22, \"sort_order\": 320 }, \"👩‍💻\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 23, \"sort_order\": 137 }, \"👩‍💼\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 29, \"sort_order\": 131 }, \"👩‍🔧\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 35, \"sort_order\": 125 }, \"👩‍🔬\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 41, \"sort_order\": 134 }, \"👩‍🚀\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 47, \"sort_order\": 149 }, \"👩‍🚒\": { \"category\": \"People & Body\", \"sheet_x\": 18, \"sheet_y\": 53, \"sort_order\": 152 }, \"👩‍🦯\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 2, \"sort_order\": 223 }, \"👩‍🦰\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 8, \"sort_order\": 62 }, \"👩‍🦱\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 14, \"sort_order\": 64 }, \"👩‍🦲\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 20, \"sort_order\": 68 }, \"👩‍🦳\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 26, \"sort_order\": 66 }, \"👩‍🦼\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 32, \"sort_order\": 226 }, \"👩‍🦽\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 38, \"sort_order\": 229 }, \"👩‍⚕️\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 44, \"sort_order\": 107 }, \"👩‍⚖️\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 50, \"sort_order\": 116 }, \"👩‍✈️\": { \"category\": \"People & Body\", \"sheet_x\": 19, \"sheet_y\": 56, \"sort_order\": 146 }, \"👩‍❤️‍👨\": { \"category\": \"People & Body\", \"sheet_x\": 20, \"sheet_y\": 5, \"sort_order\": 302 }, \"👩‍❤️‍👩\": { \"category\": \"People & Body\", \"sheet_x\": 20, \"sheet_y\": 6, \"sort_order\": 304 }, \"👩‍❤️‍💋‍👨\": { \"category\": \"People & Body\", \"sheet_x\": 20, \"sheet_y\": 7, \"sort_order\": 298 }, \"👩‍❤️‍💋‍👩\": { \"category\": \"People & Body\", \"sheet_x\": 20, \"sheet_y\": 8, \"sort_order\": 300 }, \"👩\": { \"category\": \"People & Body\", \"sheet_x\": 20, \"sheet_y\": 9, \"sort_order\": 61 }, \"👪\": { \"category\": \"People & Body\", \"sheet_x\": 20, \"sheet_y\": 15, \"sort_order\": 305 }, \"👫\": { \"category\": \"People & Body\", \"sheet_x\": 20, \"sheet_y\": 16, \"sort_order\": 295 }, \"👬\": { \"category\": \"People & Body\", \"sheet_x\": 20, \"sheet_y\": 42, \"sort_order\": 296 }, \"👭\": { \"category\": \"People & Body\", \"sheet_x\": 21, \"sheet_y\": 11, \"sort_order\": 294 }, \"👮‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 21, \"sheet_y\": 37, \"sort_order\": 155 }, \"👮‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 21, \"sheet_y\": 43, \"sort_order\": 154 }, \"👮\": { \"category\": \"People & Body\", \"sheet_x\": 21, \"sheet_y\": 49, \"sort_order\": 153 }, \"👯‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 21, \"sheet_y\": 55, \"sort_order\": 238 }, \"👯‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 21, \"sheet_y\": 56, \"sort_order\": 237 }, \"👯\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 0, \"sort_order\": 236 }, \"👰\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 1, \"sort_order\": 173 }, \"👱‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 7, \"sort_order\": 70 }, \"👱‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 13, \"sort_order\": 71 }, \"👱\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 19, \"sort_order\": 54 }, \"👲\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 25, \"sort_order\": 170 }, \"👳‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 31, \"sort_order\": 169 }, \"👳‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 37, \"sort_order\": 168 }, \"👳\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 43, \"sort_order\": 167 }, \"👴\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 49, \"sort_order\": 73 }, \"👵\": { \"category\": \"People & Body\", \"sheet_x\": 22, \"sheet_y\": 55, \"sort_order\": 74 }, \"👶\": { \"category\": \"People & Body\", \"sheet_x\": 23, \"sheet_y\": 4, \"sort_order\": 49 }, \"👷‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 23, \"sheet_y\": 10, \"sort_order\": 164 }, \"👷‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 23, \"sheet_y\": 16, \"sort_order\": 163 }, \"👷\": { \"category\": \"People & Body\", \"sheet_x\": 23, \"sheet_y\": 22, \"sort_order\": 162 }, \"👸\": { \"category\": \"People & Body\", \"sheet_x\": 23, \"sheet_y\": 28, \"sort_order\": 166 }, \"👹\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 23, \"sheet_y\": 34, \"sort_order\": 97 }, \"👺\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 23, \"sheet_y\": 35, \"sort_order\": 98 }, \"👻\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 23, \"sheet_y\": 36, \"sort_order\": 99 }, \"👼\": { \"category\": \"People & Body\", \"sheet_x\": 23, \"sheet_y\": 37, \"sort_order\": 176 }, \"👽\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 23, \"sheet_y\": 43, \"sort_order\": 100 }, \"👾\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 23, \"sheet_y\": 44, \"sort_order\": 101 }, \"👿\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 23, \"sheet_y\": 45, \"sort_order\": 92 }, \"💀\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 23, \"sheet_y\": 46, \"sort_order\": 93 }, \"💁‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 23, \"sheet_y\": 47, \"sort_order\": 89 }, \"💁‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 23, \"sheet_y\": 53, \"sort_order\": 88 }, \"💁\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 2, \"sort_order\": 87 }, \"💂‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 8, \"sort_order\": 161 }, \"💂‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 14, \"sort_order\": 160 }, \"💂\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 20, \"sort_order\": 159 }, \"💃\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 26, \"sort_order\": 233 }, \"💄\": { \"category\": \"Objects\", \"sheet_x\": 24, \"sheet_y\": 32, \"sort_order\": 41 }, \"💅\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 33, \"sort_order\": 32 }, \"💆‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 39, \"sort_order\": 208 }, \"💆‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 45, \"sort_order\": 207 }, \"💆\": { \"category\": \"People & Body\", \"sheet_x\": 24, \"sheet_y\": 51, \"sort_order\": 206 }, \"💇‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 25, \"sheet_y\": 0, \"sort_order\": 211 }, \"💇‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 25, \"sheet_y\": 6, \"sort_order\": 210 }, \"💇\": { \"category\": \"People & Body\", \"sheet_x\": 25, \"sheet_y\": 12, \"sort_order\": 209 }, \"💈\": { \"category\": \"Travel & Places\", \"sheet_x\": 25, \"sheet_y\": 18, \"sort_order\": 61 }, \"💉\": { \"category\": \"Objects\", \"sheet_x\": 25, \"sheet_y\": 19, \"sort_order\": 208 }, \"💊\": { \"category\": \"Objects\", \"sheet_x\": 25, \"sheet_y\": 20, \"sort_order\": 210 }, \"💋\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 21, \"sort_order\": 115 }, \"💌\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 22, \"sort_order\": 116 }, \"💍\": { \"category\": \"Objects\", \"sheet_x\": 25, \"sheet_y\": 23, \"sort_order\": 42 }, \"💎\": { \"category\": \"Objects\", \"sheet_x\": 25, \"sheet_y\": 24, \"sort_order\": 43 }, \"💏\": { \"category\": \"People & Body\", \"sheet_x\": 25, \"sheet_y\": 25, \"sort_order\": 297 }, \"💐\": { \"category\": \"Animals & Nature\", \"sheet_x\": 25, \"sheet_y\": 26, \"sort_order\": 106 }, \"💑\": { \"category\": \"People & Body\", \"sheet_x\": 25, \"sheet_y\": 27, \"sort_order\": 301 }, \"💒\": { \"category\": \"Travel & Places\", \"sheet_x\": 25, \"sheet_y\": 28, \"sort_order\": 38 }, \"💓\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 29, \"sort_order\": 121 }, \"💔\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 30, \"sort_order\": 126 }, \"💕\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 31, \"sort_order\": 123 }, \"💖\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 32, \"sort_order\": 119 }, \"💗\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 33, \"sort_order\": 120 }, \"💘\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 34, \"sort_order\": 117 }, \"💙\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 35, \"sort_order\": 131 }, \"💚\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 36, \"sort_order\": 130 }, \"💛\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 37, \"sort_order\": 129 }, \"💜\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 38, \"sort_order\": 132 }, \"💝\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 39, \"sort_order\": 118 }, \"💞\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 40, \"sort_order\": 122 }, \"💟\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 41, \"sort_order\": 124 }, \"💠\": { \"category\": \"Symbols\", \"sheet_x\": 25, \"sheet_y\": 42, \"sort_order\": 214 }, \"💡\": { \"category\": \"Objects\", \"sheet_x\": 25, \"sheet_y\": 43, \"sort_order\": 100 }, \"💢\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 44, \"sort_order\": 137 }, \"💣\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 45, \"sort_order\": 143 }, \"💤\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 46, \"sort_order\": 149 }, \"💥\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 47, \"sort_order\": 138 }, \"💦\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 48, \"sort_order\": 140 }, \"💧\": { \"category\": \"Travel & Places\", \"sheet_x\": 25, \"sheet_y\": 49, \"sort_order\": 209 }, \"💨\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 50, \"sort_order\": 141 }, \"💩\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 25, \"sheet_y\": 51, \"sort_order\": 95 }, \"💪\": { \"category\": \"People & Body\", \"sheet_x\": 25, \"sheet_y\": 52, \"sort_order\": 34 }, \"💫\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 26, \"sheet_y\": 1, \"sort_order\": 139 }, \"💬\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 26, \"sheet_y\": 2, \"sort_order\": 144 }, \"💭\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 26, \"sheet_y\": 3, \"sort_order\": 148 }, \"💮\": { \"category\": \"Animals & Nature\", \"sheet_x\": 26, \"sheet_y\": 4, \"sort_order\": 108 }, \"💯\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 26, \"sheet_y\": 5, \"sort_order\": 136 }, \"💰\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 6, \"sort_order\": 121 }, \"💱\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 7, \"sort_order\": 130 }, \"💲\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 8, \"sort_order\": 131 }, \"💳\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 9, \"sort_order\": 127 }, \"💴\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 10, \"sort_order\": 122 }, \"💵\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 11, \"sort_order\": 123 }, \"💶\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 12, \"sort_order\": 124 }, \"💷\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 13, \"sort_order\": 125 }, \"💸\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 14, \"sort_order\": 126 }, \"💹\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 15, \"sort_order\": 129 }, \"💺\": { \"category\": \"Travel & Places\", \"sheet_x\": 26, \"sheet_y\": 16, \"sort_order\": 123 }, \"💻\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 17, \"sort_order\": 77 }, \"💼\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 18, \"sort_order\": 152 }, \"💽\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 19, \"sort_order\": 83 }, \"💾\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 20, \"sort_order\": 84 }, \"💿\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 21, \"sort_order\": 85 }, \"📀\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 22, \"sort_order\": 86 }, \"📁\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 23, \"sort_order\": 153 }, \"📂\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 24, \"sort_order\": 154 }, \"📃\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 25, \"sort_order\": 113 }, \"📄\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 26, \"sort_order\": 115 }, \"📅\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 27, \"sort_order\": 156 }, \"📆\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 28, \"sort_order\": 157 }, \"📇\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 29, \"sort_order\": 160 }, \"📈\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 30, \"sort_order\": 161 }, \"📉\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 31, \"sort_order\": 162 }, \"📊\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 32, \"sort_order\": 163 }, \"📋\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 33, \"sort_order\": 164 }, \"📌\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 34, \"sort_order\": 165 }, \"📍\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 35, \"sort_order\": 166 }, \"📎\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 36, \"sort_order\": 167 }, \"📏\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 37, \"sort_order\": 169 }, \"📐\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 38, \"sort_order\": 170 }, \"📑\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 39, \"sort_order\": 118 }, \"📒\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 40, \"sort_order\": 112 }, \"📓\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 41, \"sort_order\": 111 }, \"📔\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 42, \"sort_order\": 104 }, \"📕\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 43, \"sort_order\": 105 }, \"📖\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 44, \"sort_order\": 106 }, \"📗\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 45, \"sort_order\": 107 }, \"📘\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 46, \"sort_order\": 108 }, \"📙\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 47, \"sort_order\": 109 }, \"📚\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 48, \"sort_order\": 110 }, \"📛\": { \"category\": \"Symbols\", \"sheet_x\": 26, \"sheet_y\": 49, \"sort_order\": 104 }, \"📜\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 50, \"sort_order\": 114 }, \"📝\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 51, \"sort_order\": 151 }, \"📞\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 52, \"sort_order\": 72 }, \"📟\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 53, \"sort_order\": 73 }, \"📠\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 54, \"sort_order\": 74 }, \"📡\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 55, \"sort_order\": 207 }, \"📢\": { \"category\": \"Objects\", \"sheet_x\": 26, \"sheet_y\": 56, \"sort_order\": 48 }, \"📣\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 0, \"sort_order\": 49 }, \"📤\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 1, \"sort_order\": 136 }, \"📥\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 2, \"sort_order\": 137 }, \"📦\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 3, \"sort_order\": 138 }, \"📧\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 4, \"sort_order\": 133 }, \"📨\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 5, \"sort_order\": 134 }, \"📩\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 6, \"sort_order\": 135 }, \"📪\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 7, \"sort_order\": 140 }, \"📫\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 8, \"sort_order\": 139 }, \"📬\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 9, \"sort_order\": 141 }, \"📭\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 10, \"sort_order\": 142 }, \"📮\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 11, \"sort_order\": 143 }, \"📯\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 12, \"sort_order\": 50 }, \"📰\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 13, \"sort_order\": 116 }, \"📱\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 14, \"sort_order\": 69 }, \"📲\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 15, \"sort_order\": 70 }, \"📳\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 16, \"sort_order\": 95 }, \"📴\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 17, \"sort_order\": 96 }, \"📵\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 18, \"sort_order\": 23 }, \"📶\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 19, \"sort_order\": 94 }, \"📷\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 20, \"sort_order\": 93 }, \"📸\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 21, \"sort_order\": 94 }, \"📹\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 22, \"sort_order\": 95 }, \"📺\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 23, \"sort_order\": 92 }, \"📻\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 24, \"sort_order\": 61 }, \"📼\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 25, \"sort_order\": 96 }, \"📽️\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 26, \"sort_order\": 90 }, \"📿\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 27, \"sort_order\": 40 }, \"🔀\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 28, \"sort_order\": 73 }, \"🔁\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 29, \"sort_order\": 74 }, \"🔂\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 30, \"sort_order\": 75 }, \"🔃\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 31, \"sort_order\": 41 }, \"🔄\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 32, \"sort_order\": 42 }, \"🔅\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 33, \"sort_order\": 92 }, \"🔆\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 34, \"sort_order\": 93 }, \"🔇\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 35, \"sort_order\": 44 }, \"🔈\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 36, \"sort_order\": 45 }, \"🔉\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 37, \"sort_order\": 46 }, \"🔊\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 38, \"sort_order\": 47 }, \"🔋\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 39, \"sort_order\": 75 }, \"🔌\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 40, \"sort_order\": 76 }, \"🔍\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 41, \"sort_order\": 97 }, \"🔎\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 42, \"sort_order\": 98 }, \"🔏\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 43, \"sort_order\": 177 }, \"🔐\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 44, \"sort_order\": 178 }, \"🔑\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 45, \"sort_order\": 179 }, \"🔒\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 46, \"sort_order\": 175 }, \"🔓\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 47, \"sort_order\": 176 }, \"🔔\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 48, \"sort_order\": 51 }, \"🔕\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 49, \"sort_order\": 52 }, \"🔖\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 50, \"sort_order\": 119 }, \"🔗\": { \"category\": \"Objects\", \"sheet_x\": 27, \"sheet_y\": 51, \"sort_order\": 197 }, \"🔘\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 52, \"sort_order\": 215 }, \"🔙\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 53, \"sort_order\": 43 }, \"🔚\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 54, \"sort_order\": 44 }, \"🔛\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 55, \"sort_order\": 45 }, \"🔜\": { \"category\": \"Symbols\", \"sheet_x\": 27, \"sheet_y\": 56, \"sort_order\": 46 }, \"🔝\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 0, \"sort_order\": 47 }, \"🔞\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 1, \"sort_order\": 24 }, \"🔟\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 2, \"sort_order\": 144 }, \"🔠\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 3, \"sort_order\": 145 }, \"🔡\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 4, \"sort_order\": 146 }, \"🔢\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 5, \"sort_order\": 147 }, \"🔣\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 6, \"sort_order\": 148 }, \"🔤\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 7, \"sort_order\": 149 }, \"🔥\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 8, \"sort_order\": 208 }, \"🔦\": { \"category\": \"Objects\", \"sheet_x\": 28, \"sheet_y\": 9, \"sort_order\": 101 }, \"🔧\": { \"category\": \"Objects\", \"sheet_x\": 28, \"sheet_y\": 10, \"sort_order\": 191 }, \"🔨\": { \"category\": \"Objects\", \"sheet_x\": 28, \"sheet_y\": 11, \"sort_order\": 181 }, \"🔩\": { \"category\": \"Objects\", \"sheet_x\": 28, \"sheet_y\": 12, \"sort_order\": 192 }, \"🔪\": { \"category\": \"Food & Drink\", \"sheet_x\": 28, \"sheet_y\": 13, \"sort_order\": 120 }, \"🔫\": { \"category\": \"Objects\", \"sheet_x\": 28, \"sheet_y\": 14, \"sort_order\": 188 }, \"🔬\": { \"category\": \"Objects\", \"sheet_x\": 28, \"sheet_y\": 15, \"sort_order\": 205 }, \"🔭\": { \"category\": \"Objects\", \"sheet_x\": 28, \"sheet_y\": 16, \"sort_order\": 206 }, \"🔮\": { \"category\": \"Activities\", \"sheet_x\": 28, \"sheet_y\": 17, \"sort_order\": 59 }, \"🔯\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 18, \"sort_order\": 59 }, \"🔰\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 19, \"sort_order\": 105 }, \"🔱\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 20, \"sort_order\": 103 }, \"🔲\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 21, \"sort_order\": 217 }, \"🔳\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 22, \"sort_order\": 216 }, \"🔴\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 23, \"sort_order\": 184 }, \"🔵\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 24, \"sort_order\": 188 }, \"🔶\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 25, \"sort_order\": 208 }, \"🔷\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 26, \"sort_order\": 209 }, \"🔸\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 27, \"sort_order\": 210 }, \"🔹\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 28, \"sort_order\": 211 }, \"🔺\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 29, \"sort_order\": 212 }, \"🔻\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 30, \"sort_order\": 213 }, \"🔼\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 31, \"sort_order\": 83 }, \"🔽\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 32, \"sort_order\": 85 }, \"🕉️\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 33, \"sort_order\": 50 }, \"🕊️\": { \"category\": \"Animals & Nature\", \"sheet_x\": 28, \"sheet_y\": 34, \"sort_order\": 68 }, \"🕋\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 35, \"sort_order\": 46 }, \"🕌\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 36, \"sort_order\": 42 }, \"🕍\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 37, \"sort_order\": 44 }, \"🕎\": { \"category\": \"Symbols\", \"sheet_x\": 28, \"sheet_y\": 38, \"sort_order\": 58 }, \"🕐\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 39, \"sort_order\": 142 }, \"🕑\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 40, \"sort_order\": 144 }, \"🕒\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 41, \"sort_order\": 146 }, \"🕓\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 42, \"sort_order\": 148 }, \"🕔\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 43, \"sort_order\": 150 }, \"🕕\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 44, \"sort_order\": 152 }, \"🕖\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 45, \"sort_order\": 154 }, \"🕗\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 46, \"sort_order\": 156 }, \"🕘\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 47, \"sort_order\": 158 }, \"🕙\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 48, \"sort_order\": 160 }, \"🕚\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 49, \"sort_order\": 162 }, \"🕛\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 50, \"sort_order\": 140 }, \"🕜\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 51, \"sort_order\": 143 }, \"🕝\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 52, \"sort_order\": 145 }, \"🕞\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 53, \"sort_order\": 147 }, \"🕟\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 54, \"sort_order\": 149 }, \"🕠\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 55, \"sort_order\": 151 }, \"🕡\": { \"category\": \"Travel & Places\", \"sheet_x\": 28, \"sheet_y\": 56, \"sort_order\": 153 }, \"🕢\": { \"category\": \"Travel & Places\", \"sheet_x\": 29, \"sheet_y\": 0, \"sort_order\": 155 }, \"🕣\": { \"category\": \"Travel & Places\", \"sheet_x\": 29, \"sheet_y\": 1, \"sort_order\": 157 }, \"🕤\": { \"category\": \"Travel & Places\", \"sheet_x\": 29, \"sheet_y\": 2, \"sort_order\": 159 }, \"🕥\": { \"category\": \"Travel & Places\", \"sheet_x\": 29, \"sheet_y\": 3, \"sort_order\": 161 }, \"🕦\": { \"category\": \"Travel & Places\", \"sheet_x\": 29, \"sheet_y\": 4, \"sort_order\": 163 }, \"🕧\": { \"category\": \"Travel & Places\", \"sheet_x\": 29, \"sheet_y\": 5, \"sort_order\": 141 }, \"🕯️\": { \"category\": \"Objects\", \"sheet_x\": 29, \"sheet_y\": 6, \"sort_order\": 99 }, \"🕰️\": { \"category\": \"Travel & Places\", \"sheet_x\": 29, \"sheet_y\": 7, \"sort_order\": 139 }, \"🕳️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 29, \"sheet_y\": 8, \"sort_order\": 142 }, \"🕴️\": { \"category\": \"People & Body\", \"sheet_x\": 29, \"sheet_y\": 9, \"sort_order\": 235 }, \"🕵️‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 29, \"sheet_y\": 15, \"sort_order\": 158 }, \"🕵️‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 29, \"sheet_y\": 21, \"sort_order\": 157 }, \"🕵️\": { \"category\": \"People & Body\", \"sheet_x\": 29, \"sheet_y\": 27, \"sort_order\": 156 }, \"🕶️\": { \"category\": \"Objects\", \"sheet_x\": 29, \"sheet_y\": 33, \"sort_order\": 2 }, \"🕷️\": { \"category\": \"Animals & Nature\", \"sheet_x\": 29, \"sheet_y\": 34, \"sort_order\": 101 }, \"🕸️\": { \"category\": \"Animals & Nature\", \"sheet_x\": 29, \"sheet_y\": 35, \"sort_order\": 102 }, \"🕹️\": { \"category\": \"Activities\", \"sheet_x\": 29, \"sheet_y\": 36, \"sort_order\": 62 }, \"🕺\": { \"category\": \"People & Body\", \"sheet_x\": 29, \"sheet_y\": 37, \"sort_order\": 234 }, \"🖇️\": { \"category\": \"Objects\", \"sheet_x\": 29, \"sheet_y\": 43, \"sort_order\": 168 }, \"🖊️\": { \"category\": \"Objects\", \"sheet_x\": 29, \"sheet_y\": 44, \"sort_order\": 148 }, \"🖋️\": { \"category\": \"Objects\", \"sheet_x\": 29, \"sheet_y\": 45, \"sort_order\": 147 }, \"🖌️\": { \"category\": \"Objects\", \"sheet_x\": 29, \"sheet_y\": 46, \"sort_order\": 149 }, \"🖍️\": { \"category\": \"Objects\", \"sheet_x\": 29, \"sheet_y\": 47, \"sort_order\": 150 }, \"🖐️\": { \"category\": \"People & Body\", \"sheet_x\": 29, \"sheet_y\": 48, \"sort_order\": 3 }, \"🖕\": { \"category\": \"People & Body\", \"sheet_x\": 29, \"sheet_y\": 54, \"sort_order\": 16 }, \"🖖\": { \"category\": \"People & Body\", \"sheet_x\": 30, \"sheet_y\": 3, \"sort_order\": 5 }, \"🖤\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 9, \"sort_order\": 134 }, \"🖥️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 10, \"sort_order\": 78 }, \"🖨️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 11, \"sort_order\": 79 }, \"🖱️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 12, \"sort_order\": 81 }, \"🖲️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 13, \"sort_order\": 82 }, \"🖼️\": { \"category\": \"Activities\", \"sheet_x\": 30, \"sheet_y\": 14, \"sort_order\": 76 }, \"🗂️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 15, \"sort_order\": 155 }, \"🗃️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 16, \"sort_order\": 172 }, \"🗄️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 17, \"sort_order\": 173 }, \"🗑️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 18, \"sort_order\": 174 }, \"🗒️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 19, \"sort_order\": 158 }, \"🗓️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 20, \"sort_order\": 159 }, \"🗜️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 21, \"sort_order\": 194 }, \"🗝️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 22, \"sort_order\": 180 }, \"🗞️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 23, \"sort_order\": 117 }, \"🗡️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 24, \"sort_order\": 186 }, \"🗣️\": { \"category\": \"People & Body\", \"sheet_x\": 30, \"sheet_y\": 25, \"sort_order\": 331 }, \"🗨️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 26, \"sort_order\": 146 }, \"🗯️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 27, \"sort_order\": 147 }, \"🗳️\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 28, \"sort_order\": 144 }, \"🗺️\": { \"category\": \"Travel & Places\", \"sheet_x\": 30, \"sheet_y\": 29, \"sort_order\": 5 }, \"🗻\": { \"category\": \"Travel & Places\", \"sheet_x\": 30, \"sheet_y\": 30, \"sort_order\": 11 }, \"🗼\": { \"category\": \"Travel & Places\", \"sheet_x\": 30, \"sheet_y\": 31, \"sort_order\": 39 }, \"🗽\": { \"category\": \"Travel & Places\", \"sheet_x\": 30, \"sheet_y\": 32, \"sort_order\": 40 }, \"🗾\": { \"category\": \"Travel & Places\", \"sheet_x\": 30, \"sheet_y\": 33, \"sort_order\": 6 }, \"🗿\": { \"category\": \"Objects\", \"sheet_x\": 30, \"sheet_y\": 34, \"sort_order\": 233 }, \"😀\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 35, \"sort_order\": 1 }, \"😁\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 36, \"sort_order\": 4 }, \"😂\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 37, \"sort_order\": 8 }, \"😃\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 38, \"sort_order\": 2 }, \"😄\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 39, \"sort_order\": 3 }, \"😅\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 40, \"sort_order\": 6 }, \"😆\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 41, \"sort_order\": 5 }, \"😇\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 42, \"sort_order\": 13 }, \"😈\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 43, \"sort_order\": 91 }, \"😉\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 44, \"sort_order\": 11 }, \"😊\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 45, \"sort_order\": 12 }, \"😋\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 46, \"sort_order\": 22 }, \"😌\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 47, \"sort_order\": 42 }, \"😍\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 48, \"sort_order\": 15 }, \"😎\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 49, \"sort_order\": 60 }, \"😏\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 50, \"sort_order\": 37 }, \"😐\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 51, \"sort_order\": 34 }, \"😑\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 52, \"sort_order\": 35 }, \"😒\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 53, \"sort_order\": 38 }, \"😓\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 54, \"sort_order\": 83 }, \"😔\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 55, \"sort_order\": 43 }, \"😕\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 30, \"sheet_y\": 56, \"sort_order\": 63 }, \"😖\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 0, \"sort_order\": 80 }, \"😗\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 1, \"sort_order\": 18 }, \"😘\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 2, \"sort_order\": 17 }, \"😙\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 3, \"sort_order\": 21 }, \"😚\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 4, \"sort_order\": 20 }, \"😛\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 5, \"sort_order\": 23 }, \"😜\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 6, \"sort_order\": 24 }, \"😝\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 7, \"sort_order\": 26 }, \"😞\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 8, \"sort_order\": 82 }, \"😟\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 9, \"sort_order\": 64 }, \"😠\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 10, \"sort_order\": 89 }, \"😡\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 11, \"sort_order\": 88 }, \"😢\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 12, \"sort_order\": 77 }, \"😣\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 13, \"sort_order\": 81 }, \"😤\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 14, \"sort_order\": 87 }, \"😥\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 15, \"sort_order\": 76 }, \"😦\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 16, \"sort_order\": 72 }, \"😧\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 17, \"sort_order\": 73 }, \"😨\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 18, \"sort_order\": 74 }, \"😩\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 19, \"sort_order\": 84 }, \"😪\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 20, \"sort_order\": 44 }, \"😫\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 21, \"sort_order\": 85 }, \"😬\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 22, \"sort_order\": 40 }, \"😭\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 23, \"sort_order\": 78 }, \"😮\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 24, \"sort_order\": 67 }, \"😯\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 25, \"sort_order\": 68 }, \"😰\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 26, \"sort_order\": 75 }, \"😱\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 27, \"sort_order\": 79 }, \"😲\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 28, \"sort_order\": 69 }, \"😳\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 29, \"sort_order\": 70 }, \"😴\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 30, \"sort_order\": 46 }, \"😵\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 31, \"sort_order\": 56 }, \"😶\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 32, \"sort_order\": 36 }, \"😷\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 33, \"sort_order\": 47 }, \"😸\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 34, \"sort_order\": 104 }, \"😹\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 35, \"sort_order\": 105 }, \"😺\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 36, \"sort_order\": 103 }, \"😻\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 37, \"sort_order\": 106 }, \"😼\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 38, \"sort_order\": 107 }, \"😽\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 39, \"sort_order\": 108 }, \"😾\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 40, \"sort_order\": 111 }, \"😿\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 41, \"sort_order\": 110 }, \"🙀\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 42, \"sort_order\": 109 }, \"🙁\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 43, \"sort_order\": 65 }, \"🙂\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 44, \"sort_order\": 9 }, \"🙃\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 45, \"sort_order\": 10 }, \"🙄\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 31, \"sheet_y\": 46, \"sort_order\": 39 }, \"🙅‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 31, \"sheet_y\": 47, \"sort_order\": 83 }, \"🙅‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 31, \"sheet_y\": 53, \"sort_order\": 82 }, \"🙅\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 2, \"sort_order\": 81 }, \"🙆‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 8, \"sort_order\": 86 }, \"🙆‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 14, \"sort_order\": 85 }, \"🙆\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 20, \"sort_order\": 84 }, \"🙇‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 26, \"sort_order\": 98 }, \"🙇‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 32, \"sort_order\": 97 }, \"🙇\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 38, \"sort_order\": 96 }, \"🙈\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 32, \"sheet_y\": 44, \"sort_order\": 112 }, \"🙉\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 32, \"sheet_y\": 45, \"sort_order\": 113 }, \"🙊\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 32, \"sheet_y\": 46, \"sort_order\": 114 }, \"🙋‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 47, \"sort_order\": 92 }, \"🙋‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 32, \"sheet_y\": 53, \"sort_order\": 91 }, \"🙋\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 2, \"sort_order\": 90 }, \"🙌\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 8, \"sort_order\": 26 }, \"🙍‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 14, \"sort_order\": 77 }, \"🙍‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 20, \"sort_order\": 76 }, \"🙍\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 26, \"sort_order\": 75 }, \"🙎‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 32, \"sort_order\": 80 }, \"🙎‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 38, \"sort_order\": 79 }, \"🙎\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 44, \"sort_order\": 78 }, \"🙏\": { \"category\": \"People & Body\", \"sheet_x\": 33, \"sheet_y\": 50, \"sort_order\": 30 }, \"🚀\": { \"category\": \"Travel & Places\", \"sheet_x\": 33, \"sheet_y\": 56, \"sort_order\": 129 }, \"🚁\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 0, \"sort_order\": 124 }, \"🚂\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 1, \"sort_order\": 63 }, \"🚃\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 2, \"sort_order\": 64 }, \"🚄\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 3, \"sort_order\": 65 }, \"🚅\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 4, \"sort_order\": 66 }, \"🚆\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 5, \"sort_order\": 67 }, \"🚇\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 6, \"sort_order\": 68 }, \"🚈\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 7, \"sort_order\": 69 }, \"🚉\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 8, \"sort_order\": 70 }, \"🚊\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 9, \"sort_order\": 71 }, \"🚋\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 10, \"sort_order\": 74 }, \"🚌\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 11, \"sort_order\": 75 }, \"🚍\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 12, \"sort_order\": 76 }, \"🚎\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 13, \"sort_order\": 77 }, \"🚏\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 14, \"sort_order\": 100 }, \"🚐\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 15, \"sort_order\": 78 }, \"🚑\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 16, \"sort_order\": 79 }, \"🚒\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 17, \"sort_order\": 80 }, \"🚓\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 18, \"sort_order\": 81 }, \"🚔\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 19, \"sort_order\": 82 }, \"🚕\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 20, \"sort_order\": 83 }, \"🚖\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 21, \"sort_order\": 84 }, \"🚗\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 22, \"sort_order\": 85 }, \"🚘\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 23, \"sort_order\": 86 }, \"🚙\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 24, \"sort_order\": 87 }, \"🚚\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 25, \"sort_order\": 88 }, \"🚛\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 26, \"sort_order\": 89 }, \"🚜\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 27, \"sort_order\": 90 }, \"🚝\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 28, \"sort_order\": 72 }, \"🚞\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 29, \"sort_order\": 73 }, \"🚟\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 30, \"sort_order\": 125 }, \"🚠\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 31, \"sort_order\": 126 }, \"🚡\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 32, \"sort_order\": 127 }, \"🚢\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 33, \"sort_order\": 117 }, \"🚣‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 34, \"sheet_y\": 34, \"sort_order\": 257 }, \"🚣‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 34, \"sheet_y\": 40, \"sort_order\": 256 }, \"🚣\": { \"category\": \"People & Body\", \"sheet_x\": 34, \"sheet_y\": 46, \"sort_order\": 255 }, \"🚤\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 52, \"sort_order\": 113 }, \"🚥\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 53, \"sort_order\": 106 }, \"🚦\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 54, \"sort_order\": 107 }, \"🚧\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 55, \"sort_order\": 109 }, \"🚨\": { \"category\": \"Travel & Places\", \"sheet_x\": 34, \"sheet_y\": 56, \"sort_order\": 105 }, \"🚩\": { \"category\": \"Flags\", \"sheet_x\": 35, \"sheet_y\": 0, \"sort_order\": 2 }, \"🚪\": { \"category\": \"Objects\", \"sheet_x\": 35, \"sheet_y\": 1, \"sort_order\": 213 }, \"🚫\": { \"category\": \"Symbols\", \"sheet_x\": 35, \"sheet_y\": 2, \"sort_order\": 17 }, \"🚬\": { \"category\": \"Objects\", \"sheet_x\": 35, \"sheet_y\": 3, \"sort_order\": 230 }, \"🚭\": { \"category\": \"Symbols\", \"sheet_x\": 35, \"sheet_y\": 4, \"sort_order\": 19 }, \"🚮\": { \"category\": \"Symbols\", \"sheet_x\": 35, \"sheet_y\": 5, \"sort_order\": 2 }, \"🚯\": { \"category\": \"Symbols\", \"sheet_x\": 35, \"sheet_y\": 6, \"sort_order\": 20 }, \"🚰\": { \"category\": \"Symbols\", \"sheet_x\": 35, \"sheet_y\": 7, \"sort_order\": 3 }, \"🚱\": { \"category\": \"Symbols\", \"sheet_x\": 35, \"sheet_y\": 8, \"sort_order\": 21 }, \"🚲\": { \"category\": \"Travel & Places\", \"sheet_x\": 35, \"sheet_y\": 9, \"sort_order\": 97 }, \"🚳\": { \"category\": \"Symbols\", \"sheet_x\": 35, \"sheet_y\": 10, \"sort_order\": 18 }, \"🚴‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 35, \"sheet_y\": 11, \"sort_order\": 269 }, \"🚴‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 35, \"sheet_y\": 17, \"sort_order\": 268 }, \"🚴\": { \"category\": \"People & Body\", \"sheet_x\": 35, \"sheet_y\": 23, \"sort_order\": 267 }, \"🚵‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 35, \"sheet_y\": 29, \"sort_order\": 272 }, \"🚵‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 35, \"sheet_y\": 35, \"sort_order\": 271 }, \"🚵\": { \"category\": \"People & Body\", \"sheet_x\": 35, \"sheet_y\": 41, \"sort_order\": 270 }, \"🚶‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 35, \"sheet_y\": 47, \"sort_order\": 214 }, \"🚶‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 35, \"sheet_y\": 53, \"sort_order\": 213 }, \"🚶\": { \"category\": \"People & Body\", \"sheet_x\": 36, \"sheet_y\": 2, \"sort_order\": 212 }, \"🚷\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 8, \"sort_order\": 22 }, \"🚸\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 9, \"sort_order\": 15 }, \"🚹\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 10, \"sort_order\": 5 }, \"🚺\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 11, \"sort_order\": 6 }, \"🚻\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 12, \"sort_order\": 7 }, \"🚼\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 13, \"sort_order\": 8 }, \"🚽\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 14, \"sort_order\": 217 }, \"🚾\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 15, \"sort_order\": 9 }, \"🚿\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 16, \"sort_order\": 218 }, \"🛀\": { \"category\": \"People & Body\", \"sheet_x\": 36, \"sheet_y\": 17, \"sort_order\": 291 }, \"🛁\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 23, \"sort_order\": 219 }, \"🛂\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 24, \"sort_order\": 10 }, \"🛃\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 25, \"sort_order\": 11 }, \"🛄\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 26, \"sort_order\": 12 }, \"🛅\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 27, \"sort_order\": 13 }, \"🛋️\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 28, \"sort_order\": 215 }, \"🛌\": { \"category\": \"People & Body\", \"sheet_x\": 36, \"sheet_y\": 29, \"sort_order\": 292 }, \"🛍️\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 35, \"sort_order\": 24 }, \"🛎️\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 36, \"sort_order\": 131 }, \"🛏️\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 37, \"sort_order\": 214 }, \"🛐\": { \"category\": \"Symbols\", \"sheet_x\": 36, \"sheet_y\": 38, \"sort_order\": 48 }, \"🛑\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 39, \"sort_order\": 108 }, \"🛒\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 40, \"sort_order\": 229 }, \"🛕\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 41, \"sort_order\": 43 }, \"🛠️\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 42, \"sort_order\": 185 }, \"🛡️\": { \"category\": \"Objects\", \"sheet_x\": 36, \"sheet_y\": 43, \"sort_order\": 190 }, \"🛢️\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 44, \"sort_order\": 103 }, \"🛣️\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 45, \"sort_order\": 101 }, \"🛤️\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 46, \"sort_order\": 102 }, \"🛥️\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 47, \"sort_order\": 116 }, \"🛩️\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 48, \"sort_order\": 119 }, \"🛫\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 49, \"sort_order\": 120 }, \"🛬\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 50, \"sort_order\": 121 }, \"🛰️\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 51, \"sort_order\": 128 }, \"🛳️\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 52, \"sort_order\": 114 }, \"🛴\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 53, \"sort_order\": 98 }, \"🛵\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 54, \"sort_order\": 93 }, \"🛶\": { \"category\": \"Travel & Places\", \"sheet_x\": 36, \"sheet_y\": 55, \"sort_order\": 112 }, \"🛷\": { \"category\": \"Activities\", \"sheet_x\": 36, \"sheet_y\": 56, \"sort_order\": 53 }, \"🛸\": { \"category\": \"Travel & Places\", \"sheet_x\": 37, \"sheet_y\": 0, \"sort_order\": 130 }, \"🛹\": { \"category\": \"Travel & Places\", \"sheet_x\": 37, \"sheet_y\": 1, \"sort_order\": 99 }, \"🛺\": { \"category\": \"Travel & Places\", \"sheet_x\": 37, \"sheet_y\": 2, \"sort_order\": 96 }, \"🟠\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 3, \"sort_order\": 185 }, \"🟡\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 4, \"sort_order\": 186 }, \"🟢\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 5, \"sort_order\": 187 }, \"🟣\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 6, \"sort_order\": 189 }, \"🟤\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 7, \"sort_order\": 190 }, \"🟥\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 8, \"sort_order\": 193 }, \"🟦\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 9, \"sort_order\": 197 }, \"🟧\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 10, \"sort_order\": 194 }, \"🟨\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 11, \"sort_order\": 195 }, \"🟩\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 12, \"sort_order\": 196 }, \"🟪\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 13, \"sort_order\": 198 }, \"🟫\": { \"category\": \"Symbols\", \"sheet_x\": 37, \"sheet_y\": 14, \"sort_order\": 199 }, \"🤍\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 15, \"sort_order\": 135 }, \"🤎\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 16, \"sort_order\": 133 }, \"🤏\": { \"category\": \"People & Body\", \"sheet_x\": 37, \"sheet_y\": 17, \"sort_order\": 7 }, \"🤐\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 23, \"sort_order\": 32 }, \"🤑\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 24, \"sort_order\": 27 }, \"🤒\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 25, \"sort_order\": 48 }, \"🤓\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 26, \"sort_order\": 61 }, \"🤔\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 27, \"sort_order\": 31 }, \"🤕\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 28, \"sort_order\": 49 }, \"🤖\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 29, \"sort_order\": 102 }, \"🤗\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 37, \"sheet_y\": 30, \"sort_order\": 28 }, \"🤘\": { \"category\": \"People & Body\", \"sheet_x\": 37, \"sheet_y\": 31, \"sort_order\": 11 }, \"🤙\": { \"category\": \"People & Body\", \"sheet_x\": 37, \"sheet_y\": 37, \"sort_order\": 12 }, \"🤚\": { \"category\": \"People & Body\", \"sheet_x\": 37, \"sheet_y\": 43, \"sort_order\": 2 }, \"🤛\": { \"category\": \"People & Body\", \"sheet_x\": 37, \"sheet_y\": 49, \"sort_order\": 23 }, \"🤜\": { \"category\": \"People & Body\", \"sheet_x\": 37, \"sheet_y\": 55, \"sort_order\": 24 }, \"🤝\": { \"category\": \"People & Body\", \"sheet_x\": 38, \"sheet_y\": 4, \"sort_order\": 29 }, \"🤞\": { \"category\": \"People & Body\", \"sheet_x\": 38, \"sheet_y\": 5, \"sort_order\": 9 }, \"🤟\": { \"category\": \"People & Body\", \"sheet_x\": 38, \"sheet_y\": 11, \"sort_order\": 10 }, \"🤠\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 17, \"sort_order\": 58 }, \"🤡\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 18, \"sort_order\": 96 }, \"🤢\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 19, \"sort_order\": 50 }, \"🤣\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 20, \"sort_order\": 7 }, \"🤤\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 21, \"sort_order\": 45 }, \"🤥\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 22, \"sort_order\": 41 }, \"🤦‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 38, \"sheet_y\": 23, \"sort_order\": 101 }, \"🤦‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 38, \"sheet_y\": 29, \"sort_order\": 100 }, \"🤦\": { \"category\": \"People & Body\", \"sheet_x\": 38, \"sheet_y\": 35, \"sort_order\": 99 }, \"🤧\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 41, \"sort_order\": 52 }, \"🤨\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 42, \"sort_order\": 33 }, \"🤩\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 43, \"sort_order\": 16 }, \"🤪\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 44, \"sort_order\": 25 }, \"🤫\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 45, \"sort_order\": 30 }, \"🤬\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 46, \"sort_order\": 90 }, \"🤭\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 47, \"sort_order\": 29 }, \"🤮\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 48, \"sort_order\": 51 }, \"🤯\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 38, \"sheet_y\": 49, \"sort_order\": 57 }, \"🤰\": { \"category\": \"People & Body\", \"sheet_x\": 38, \"sheet_y\": 50, \"sort_order\": 174 }, \"🤱\": { \"category\": \"People & Body\", \"sheet_x\": 38, \"sheet_y\": 56, \"sort_order\": 175 }, \"🤲\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 5, \"sort_order\": 28 }, \"🤳\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 11, \"sort_order\": 33 }, \"🤴\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 17, \"sort_order\": 165 }, \"🤵\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 23, \"sort_order\": 172 }, \"🤶\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 29, \"sort_order\": 178 }, \"🤷‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 35, \"sort_order\": 104 }, \"🤷‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 41, \"sort_order\": 103 }, \"🤷\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 47, \"sort_order\": 102 }, \"🤸‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 39, \"sheet_y\": 53, \"sort_order\": 275 }, \"🤸‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 2, \"sort_order\": 274 }, \"🤸\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 8, \"sort_order\": 273 }, \"🤹‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 14, \"sort_order\": 287 }, \"🤹‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 20, \"sort_order\": 286 }, \"🤹\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 26, \"sort_order\": 285 }, \"🤺\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 32, \"sort_order\": 245 }, \"🤼‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 33, \"sort_order\": 278 }, \"🤼‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 34, \"sort_order\": 277 }, \"🤼\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 35, \"sort_order\": 276 }, \"🤽‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 36, \"sort_order\": 281 }, \"🤽‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 42, \"sort_order\": 280 }, \"🤽\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 48, \"sort_order\": 279 }, \"🤾‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 40, \"sheet_y\": 54, \"sort_order\": 284 }, \"🤾‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 41, \"sheet_y\": 3, \"sort_order\": 283 }, \"🤾\": { \"category\": \"People & Body\", \"sheet_x\": 41, \"sheet_y\": 9, \"sort_order\": 282 }, \"🤿\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 15, \"sort_order\": 50 }, \"🥀\": { \"category\": \"Animals & Nature\", \"sheet_x\": 41, \"sheet_y\": 16, \"sort_order\": 111 }, \"🥁\": { \"category\": \"Objects\", \"sheet_x\": 41, \"sheet_y\": 17, \"sort_order\": 68 }, \"🥂\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 18, \"sort_order\": 110 }, \"🥃\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 19, \"sort_order\": 111 }, \"🥄\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 20, \"sort_order\": 119 }, \"🥅\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 21, \"sort_order\": 46 }, \"🥇\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 22, \"sort_order\": 25 }, \"🥈\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 23, \"sort_order\": 26 }, \"🥉\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 24, \"sort_order\": 27 }, \"🥊\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 25, \"sort_order\": 44 }, \"🥋\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 26, \"sort_order\": 45 }, \"🥌\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 27, \"sort_order\": 54 }, \"🥍\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 28, \"sort_order\": 41 }, \"🥎\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 29, \"sort_order\": 30 }, \"🥏\": { \"category\": \"Activities\", \"sheet_x\": 41, \"sheet_y\": 30, \"sort_order\": 36 }, \"🥐\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 31, \"sort_order\": 33 }, \"🥑\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 32, \"sort_order\": 18 }, \"🥒\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 33, \"sort_order\": 24 }, \"🥓\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 34, \"sort_order\": 43 }, \"🥔\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 35, \"sort_order\": 20 }, \"🥕\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 36, \"sort_order\": 21 }, \"🥖\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 37, \"sort_order\": 34 }, \"🥗\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 38, \"sort_order\": 58 }, \"🥘\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 39, \"sort_order\": 55 }, \"🥙\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 40, \"sort_order\": 51 }, \"🥚\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 41, \"sort_order\": 53 }, \"🥛\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 42, \"sort_order\": 100 }, \"🥜\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 43, \"sort_order\": 30 }, \"🥝\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 44, \"sort_order\": 15 }, \"🥞\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 45, \"sort_order\": 37 }, \"🥟\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 46, \"sort_order\": 77 }, \"🥠\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 47, \"sort_order\": 78 }, \"🥡\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 48, \"sort_order\": 79 }, \"🥢\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 49, \"sort_order\": 116 }, \"🥣\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 50, \"sort_order\": 57 }, \"🥤\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 51, \"sort_order\": 112 }, \"🥥\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 52, \"sort_order\": 17 }, \"🥦\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 53, \"sort_order\": 26 }, \"🥧\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 54, \"sort_order\": 93 }, \"🥨\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 55, \"sort_order\": 35 }, \"🥩\": { \"category\": \"Food & Drink\", \"sheet_x\": 41, \"sheet_y\": 56, \"sort_order\": 42 }, \"🥪\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 0, \"sort_order\": 48 }, \"🥫\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 1, \"sort_order\": 62 }, \"🥬\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 2, \"sort_order\": 25 }, \"🥭\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 3, \"sort_order\": 8 }, \"🥮\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 4, \"sort_order\": 75 }, \"🥯\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 5, \"sort_order\": 36 }, \"🥰\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 42, \"sheet_y\": 6, \"sort_order\": 14 }, \"🥱\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 42, \"sheet_y\": 7, \"sort_order\": 86 }, \"🥳\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 42, \"sheet_y\": 8, \"sort_order\": 59 }, \"🥴\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 42, \"sheet_y\": 9, \"sort_order\": 55 }, \"🥵\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 42, \"sheet_y\": 10, \"sort_order\": 53 }, \"🥶\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 42, \"sheet_y\": 11, \"sort_order\": 54 }, \"🥺\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 42, \"sheet_y\": 12, \"sort_order\": 71 }, \"🥻\": { \"category\": \"Objects\", \"sheet_x\": 42, \"sheet_y\": 13, \"sort_order\": 15 }, \"🥼\": { \"category\": \"Objects\", \"sheet_x\": 42, \"sheet_y\": 14, \"sort_order\": 4 }, \"🥽\": { \"category\": \"Objects\", \"sheet_x\": 42, \"sheet_y\": 15, \"sort_order\": 3 }, \"🥾\": { \"category\": \"Objects\", \"sheet_x\": 42, \"sheet_y\": 16, \"sort_order\": 28 }, \"🥿\": { \"category\": \"Objects\", \"sheet_x\": 42, \"sheet_y\": 17, \"sort_order\": 29 }, \"🦀\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 18, \"sort_order\": 80 }, \"🦁\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 19, \"sort_order\": 15 }, \"🦂\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 20, \"sort_order\": 103 }, \"🦃\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 21, \"sort_order\": 60 }, \"🦄\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 22, \"sort_order\": 21 }, \"🦅\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 23, \"sort_order\": 69 }, \"🦆\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 24, \"sort_order\": 70 }, \"🦇\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 25, \"sort_order\": 50 }, \"🦈\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 26, \"sort_order\": 91 }, \"🦉\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 27, \"sort_order\": 72 }, \"🦊\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 28, \"sort_order\": 11 }, \"🦋\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 29, \"sort_order\": 95 }, \"🦌\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 30, \"sort_order\": 23 }, \"🦍\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 31, \"sort_order\": 3 }, \"🦎\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 32, \"sort_order\": 79 }, \"🦏\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 33, \"sort_order\": 40 }, \"🦐\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 34, \"sort_order\": 82 }, \"🦑\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 35, \"sort_order\": 83 }, \"🦒\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 36, \"sort_order\": 38 }, \"🦓\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 37, \"sort_order\": 22 }, \"🦔\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 38, \"sort_order\": 49 }, \"🦕\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 39, \"sort_order\": 83 }, \"🦖\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 40, \"sort_order\": 84 }, \"🦗\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 41, \"sort_order\": 100 }, \"🦘\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 42, \"sort_order\": 57 }, \"🦙\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 43, \"sort_order\": 37 }, \"🦚\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 44, \"sort_order\": 74 }, \"🦛\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 45, \"sort_order\": 41 }, \"🦜\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 46, \"sort_order\": 75 }, \"🦝\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 47, \"sort_order\": 12 }, \"🦞\": { \"category\": \"Food & Drink\", \"sheet_x\": 42, \"sheet_y\": 48, \"sort_order\": 81 }, \"🦟\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 49, \"sort_order\": 104 }, \"🦠\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 50, \"sort_order\": 105 }, \"🦡\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 51, \"sort_order\": 58 }, \"🦢\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 52, \"sort_order\": 71 }, \"🦥\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 53, \"sort_order\": 54 }, \"🦦\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 54, \"sort_order\": 55 }, \"🦧\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 55, \"sort_order\": 4 }, \"🦨\": { \"category\": \"Animals & Nature\", \"sheet_x\": 42, \"sheet_y\": 56, \"sort_order\": 56 }, \"🦩\": { \"category\": \"Animals & Nature\", \"sheet_x\": 43, \"sheet_y\": 0, \"sort_order\": 73 }, \"🦪\": { \"category\": \"Food & Drink\", \"sheet_x\": 43, \"sheet_y\": 1, \"sort_order\": 84 }, \"🦮\": { \"category\": \"Animals & Nature\", \"sheet_x\": 43, \"sheet_y\": 2, \"sort_order\": 7 }, \"🦯\": { \"category\": \"Objects\", \"sheet_x\": 43, \"sheet_y\": 3, \"sort_order\": 196 }, \"🦴\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 4, \"sort_order\": 44 }, \"🦵\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 5, \"sort_order\": 37 }, \"🦶\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 11, \"sort_order\": 38 }, \"🦷\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 17, \"sort_order\": 43 }, \"🦸‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 18, \"sort_order\": 181 }, \"🦸‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 24, \"sort_order\": 180 }, \"🦸\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 30, \"sort_order\": 179 }, \"🦹‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 36, \"sort_order\": 184 }, \"🦹‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 42, \"sort_order\": 183 }, \"🦹\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 48, \"sort_order\": 182 }, \"🦺\": { \"category\": \"Objects\", \"sheet_x\": 43, \"sheet_y\": 54, \"sort_order\": 5 }, \"🦻\": { \"category\": \"People & Body\", \"sheet_x\": 43, \"sheet_y\": 55, \"sort_order\": 40 }, \"🦼\": { \"category\": \"Travel & Places\", \"sheet_x\": 44, \"sheet_y\": 4, \"sort_order\": 95 }, \"🦽\": { \"category\": \"Travel & Places\", \"sheet_x\": 44, \"sheet_y\": 5, \"sort_order\": 94 }, \"🦾\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 6, \"sort_order\": 35 }, \"🦿\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 7, \"sort_order\": 36 }, \"🧀\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 8, \"sort_order\": 39 }, \"🧁\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 9, \"sort_order\": 92 }, \"🧂\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 10, \"sort_order\": 61 }, \"🧃\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 11, \"sort_order\": 113 }, \"🧄\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 12, \"sort_order\": 27 }, \"🧅\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 13, \"sort_order\": 28 }, \"🧆\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 14, \"sort_order\": 52 }, \"🧇\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 15, \"sort_order\": 38 }, \"🧈\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 16, \"sort_order\": 60 }, \"🧉\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 17, \"sort_order\": 114 }, \"🧊\": { \"category\": \"Food & Drink\", \"sheet_x\": 44, \"sheet_y\": 18, \"sort_order\": 115 }, \"🧍‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 19, \"sort_order\": 217 }, \"🧍‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 25, \"sort_order\": 216 }, \"🧍\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 31, \"sort_order\": 215 }, \"🧎‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 37, \"sort_order\": 220 }, \"🧎‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 43, \"sort_order\": 219 }, \"🧎\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 49, \"sort_order\": 218 }, \"🧏‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 44, \"sheet_y\": 55, \"sort_order\": 95 }, \"🧏‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 4, \"sort_order\": 94 }, \"🧏\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 10, \"sort_order\": 93 }, \"🧐\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 45, \"sheet_y\": 16, \"sort_order\": 62 }, \"🧑‍🌾\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 17, \"sort_order\": 117 }, \"🧑‍🍳\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 23, \"sort_order\": 120 }, \"🧑‍🎓\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 29, \"sort_order\": 108 }, \"🧑‍🎤\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 35, \"sort_order\": 138 }, \"🧑‍🎨\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 41, \"sort_order\": 141 }, \"🧑‍🏫\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 47, \"sort_order\": 111 }, \"🧑‍🏭\": { \"category\": \"People & Body\", \"sheet_x\": 45, \"sheet_y\": 53, \"sort_order\": 126 }, \"🧑‍💻\": { \"category\": \"People & Body\", \"sheet_x\": 46, \"sheet_y\": 2, \"sort_order\": 135 }, \"🧑‍💼\": { \"category\": \"People & Body\", \"sheet_x\": 46, \"sheet_y\": 8, \"sort_order\": 129 }, \"🧑‍🔧\": { \"category\": \"People & Body\", \"sheet_x\": 46, \"sheet_y\": 14, \"sort_order\": 123 }, \"🧑‍🔬\": { \"category\": \"People & Body\", \"sheet_x\": 46, \"sheet_y\": 20, \"sort_order\": 132 }, \"🧑‍🚀\": { \"category\": \"People & Body\", \"sheet_x\": 46, \"sheet_y\": 26, \"sort_order\": 147 }, \"🧑‍🚒\": { \"category\": \"People & Body\", \"sheet_x\": 46, \"sheet_y\": 32, \"sort_order\": 150 }, \"🧑‍🤝‍🧑\": { \"category\": \"People & Body\", \"sheet_x\": 46, \"sheet_y\": 38, \"sort_order\": 293 }, \"🧑‍🦯\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 7, \"sort_order\": 221 }, \"🧑‍🦰\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 13, \"sort_order\": 63 }, \"🧑‍🦱\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 19, \"sort_order\": 65 }, \"🧑‍🦲\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 25, \"sort_order\": 69 }, \"🧑‍🦳\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 31, \"sort_order\": 67 }, \"🧑‍🦼\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 37, \"sort_order\": 224 }, \"🧑‍🦽\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 43, \"sort_order\": 227 }, \"🧑‍⚕️\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 49, \"sort_order\": 105 }, \"🧑‍⚖️\": { \"category\": \"People & Body\", \"sheet_x\": 47, \"sheet_y\": 55, \"sort_order\": 114 }, \"🧑‍✈️\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 4, \"sort_order\": 144 }, \"🧑\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 10, \"sort_order\": 53 }, \"🧒\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 16, \"sort_order\": 50 }, \"🧓\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 22, \"sort_order\": 72 }, \"🧔\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 28, \"sort_order\": 56 }, \"🧕\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 34, \"sort_order\": 171 }, \"🧖‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 40, \"sort_order\": 241 }, \"🧖‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 46, \"sort_order\": 240 }, \"🧖\": { \"category\": \"People & Body\", \"sheet_x\": 48, \"sheet_y\": 52, \"sort_order\": 239 }, \"🧗‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 1, \"sort_order\": 244 }, \"🧗‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 7, \"sort_order\": 243 }, \"🧗\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 13, \"sort_order\": 242 }, \"🧘‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 19, \"sort_order\": 290 }, \"🧘‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 25, \"sort_order\": 289 }, \"🧘\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 31, \"sort_order\": 288 }, \"🧙‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 37, \"sort_order\": 187 }, \"🧙‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 43, \"sort_order\": 186 }, \"🧙\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 49, \"sort_order\": 185 }, \"🧚‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 49, \"sheet_y\": 55, \"sort_order\": 190 }, \"🧚‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 4, \"sort_order\": 189 }, \"🧚\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 10, \"sort_order\": 188 }, \"🧛‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 16, \"sort_order\": 193 }, \"🧛‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 22, \"sort_order\": 192 }, \"🧛\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 28, \"sort_order\": 191 }, \"🧜‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 34, \"sort_order\": 196 }, \"🧜‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 40, \"sort_order\": 195 }, \"🧜\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 46, \"sort_order\": 194 }, \"🧝‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 50, \"sheet_y\": 52, \"sort_order\": 199 }, \"🧝‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 1, \"sort_order\": 198 }, \"🧝\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 7, \"sort_order\": 197 }, \"🧞‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 13, \"sort_order\": 202 }, \"🧞‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 14, \"sort_order\": 201 }, \"🧞\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 15, \"sort_order\": 200 }, \"🧟‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 16, \"sort_order\": 205 }, \"🧟‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 17, \"sort_order\": 204 }, \"🧟\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 18, \"sort_order\": 203 }, \"🧠\": { \"category\": \"People & Body\", \"sheet_x\": 51, \"sheet_y\": 19, \"sort_order\": 42 }, \"🧡\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 51, \"sheet_y\": 20, \"sort_order\": 128 }, \"🧢\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 21, \"sort_order\": 38 }, \"🧣\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 22, \"sort_order\": 9 }, \"🧤\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 23, \"sort_order\": 10 }, \"🧥\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 24, \"sort_order\": 11 }, \"🧦\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 25, \"sort_order\": 12 }, \"🧧\": { \"category\": \"Activities\", \"sheet_x\": 51, \"sheet_y\": 26, \"sort_order\": 16 }, \"🧨\": { \"category\": \"Activities\", \"sheet_x\": 51, \"sheet_y\": 27, \"sort_order\": 5 }, \"🧩\": { \"category\": \"Activities\", \"sheet_x\": 51, \"sheet_y\": 28, \"sort_order\": 65 }, \"🧪\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 29, \"sort_order\": 202 }, \"🧫\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 30, \"sort_order\": 203 }, \"🧬\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 31, \"sort_order\": 204 }, \"🧭\": { \"category\": \"Travel & Places\", \"sheet_x\": 51, \"sheet_y\": 32, \"sort_order\": 7 }, \"🧮\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 33, \"sort_order\": 87 }, \"🧯\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 34, \"sort_order\": 228 }, \"🧰\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 35, \"sort_order\": 199 }, \"🧱\": { \"category\": \"Travel & Places\", \"sheet_x\": 51, \"sheet_y\": 36, \"sort_order\": 20 }, \"🧲\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 37, \"sort_order\": 200 }, \"🧳\": { \"category\": \"Travel & Places\", \"sheet_x\": 51, \"sheet_y\": 38, \"sort_order\": 132 }, \"🧴\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 39, \"sort_order\": 221 }, \"🧵\": { \"category\": \"Activities\", \"sheet_x\": 51, \"sheet_y\": 40, \"sort_order\": 78 }, \"🧶\": { \"category\": \"Activities\", \"sheet_x\": 51, \"sheet_y\": 41, \"sort_order\": 79 }, \"🧷\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 42, \"sort_order\": 222 }, \"🧸\": { \"category\": \"Activities\", \"sheet_x\": 51, \"sheet_y\": 43, \"sort_order\": 66 }, \"🧹\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 44, \"sort_order\": 223 }, \"🧺\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 45, \"sort_order\": 224 }, \"🧻\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 46, \"sort_order\": 225 }, \"🧼\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 47, \"sort_order\": 226 }, \"🧽\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 48, \"sort_order\": 227 }, \"🧾\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 49, \"sort_order\": 128 }, \"🧿\": { \"category\": \"Activities\", \"sheet_x\": 51, \"sheet_y\": 50, \"sort_order\": 60 }, \"🩰\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 51, \"sort_order\": 32 }, \"🩱\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 52, \"sort_order\": 16 }, \"🩲\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 53, \"sort_order\": 17 }, \"🩳\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 54, \"sort_order\": 18 }, \"🩸\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 55, \"sort_order\": 209 }, \"🩹\": { \"category\": \"Objects\", \"sheet_x\": 51, \"sheet_y\": 56, \"sort_order\": 211 }, \"🩺\": { \"category\": \"Objects\", \"sheet_x\": 52, \"sheet_y\": 0, \"sort_order\": 212 }, \"🪀\": { \"category\": \"Activities\", \"sheet_x\": 52, \"sheet_y\": 1, \"sort_order\": 56 }, \"🪁\": { \"category\": \"Activities\", \"sheet_x\": 52, \"sheet_y\": 2, \"sort_order\": 57 }, \"🪂\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 3, \"sort_order\": 122 }, \"🪐\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 4, \"sort_order\": 180 }, \"🪑\": { \"category\": \"Objects\", \"sheet_x\": 52, \"sheet_y\": 5, \"sort_order\": 216 }, \"🪒\": { \"category\": \"Objects\", \"sheet_x\": 52, \"sheet_y\": 6, \"sort_order\": 220 }, \"🪓\": { \"category\": \"Objects\", \"sheet_x\": 52, \"sheet_y\": 7, \"sort_order\": 182 }, \"🪔\": { \"category\": \"Objects\", \"sheet_x\": 52, \"sheet_y\": 8, \"sort_order\": 103 }, \"🪕\": { \"category\": \"Objects\", \"sheet_x\": 52, \"sheet_y\": 9, \"sort_order\": 67 }, \"‼️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 10, \"sort_order\": 122 }, \"⁉️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 11, \"sort_order\": 123 }, \"™️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 12, \"sort_order\": 131 }, \"ℹ️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 13, \"sort_order\": 156 }, \"↔️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 14, \"sort_order\": 36 }, \"↕️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 15, \"sort_order\": 35 }, \"↖️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 16, \"sort_order\": 34 }, \"↗️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 17, \"sort_order\": 28 }, \"↘️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 18, \"sort_order\": 30 }, \"↙️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 19, \"sort_order\": 32 }, \"↩️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 20, \"sort_order\": 37 }, \"↪️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 21, \"sort_order\": 38 }, \"⌚\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 22, \"sort_order\": 135 }, \"⌛\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 23, \"sort_order\": 133 }, \"⌨️\": { \"category\": \"Objects\", \"sheet_x\": 52, \"sheet_y\": 24, \"sort_order\": 80 }, \"⏏️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 25, \"sort_order\": 90 }, \"⏩\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 26, \"sort_order\": 77 }, \"⏪\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 27, \"sort_order\": 81 }, \"⏫\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 28, \"sort_order\": 84 }, \"⏬\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 29, \"sort_order\": 86 }, \"⏭️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 30, \"sort_order\": 78 }, \"⏮️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 31, \"sort_order\": 82 }, \"⏯️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 32, \"sort_order\": 79 }, \"⏰\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 33, \"sort_order\": 136 }, \"⏱️\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 34, \"sort_order\": 137 }, \"⏲️\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 35, \"sort_order\": 138 }, \"⏳\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 36, \"sort_order\": 134 }, \"⏸️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 37, \"sort_order\": 87 }, \"⏹️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 38, \"sort_order\": 88 }, \"⏺️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 39, \"sort_order\": 89 }, \"Ⓜ️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 40, \"sort_order\": 158 }, \"▪️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 41, \"sort_order\": 206 }, \"▫️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 42, \"sort_order\": 207 }, \"▶️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 43, \"sort_order\": 76 }, \"◀️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 44, \"sort_order\": 80 }, \"◻️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 45, \"sort_order\": 203 }, \"◼️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 46, \"sort_order\": 202 }, \"◽\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 47, \"sort_order\": 205 }, \"◾\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 48, \"sort_order\": 204 }, \"☀️\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 49, \"sort_order\": 177 }, \"☁️\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 50, \"sort_order\": 185 }, \"☂️\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 51, \"sort_order\": 200 }, \"☃️\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 52, \"sort_order\": 205 }, \"☄️\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 53, \"sort_order\": 207 }, \"☎️\": { \"category\": \"Objects\", \"sheet_x\": 52, \"sheet_y\": 54, \"sort_order\": 71 }, \"☑️\": { \"category\": \"Symbols\", \"sheet_x\": 52, \"sheet_y\": 55, \"sort_order\": 108 }, \"☔\": { \"category\": \"Travel & Places\", \"sheet_x\": 52, \"sheet_y\": 56, \"sort_order\": 201 }, \"☕\": { \"category\": \"Food & Drink\", \"sheet_x\": 53, \"sheet_y\": 0, \"sort_order\": 101 }, \"☘️\": { \"category\": \"Animals & Nature\", \"sheet_x\": 53, \"sheet_y\": 1, \"sort_order\": 123 }, \"☝️\": { \"category\": \"People & Body\", \"sheet_x\": 53, \"sheet_y\": 2, \"sort_order\": 18 }, \"☠️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 53, \"sheet_y\": 8, \"sort_order\": 94 }, \"☢️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 9, \"sort_order\": 25 }, \"☣️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 10, \"sort_order\": 26 }, \"☦️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 11, \"sort_order\": 55 }, \"☪️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 12, \"sort_order\": 56 }, \"☮️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 13, \"sort_order\": 57 }, \"☯️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 14, \"sort_order\": 53 }, \"☸️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 15, \"sort_order\": 52 }, \"☹️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 53, \"sheet_y\": 16, \"sort_order\": 66 }, \"☺️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 53, \"sheet_y\": 17, \"sort_order\": 19 }, \"♈\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 20, \"sort_order\": 60 }, \"♉\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 21, \"sort_order\": 61 }, \"♊\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 22, \"sort_order\": 62 }, \"♋\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 23, \"sort_order\": 63 }, \"♌\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 24, \"sort_order\": 64 }, \"♍\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 25, \"sort_order\": 65 }, \"♎\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 26, \"sort_order\": 66 }, \"♏\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 27, \"sort_order\": 67 }, \"♐\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 28, \"sort_order\": 68 }, \"♑\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 29, \"sort_order\": 69 }, \"♒\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 30, \"sort_order\": 70 }, \"♓\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 31, \"sort_order\": 71 }, \"♟️\": { \"category\": \"Activities\", \"sheet_x\": 53, \"sheet_y\": 32, \"sort_order\": 71 }, \"♠️\": { \"category\": \"Activities\", \"sheet_x\": 53, \"sheet_y\": 33, \"sort_order\": 67 }, \"♣️\": { \"category\": \"Activities\", \"sheet_x\": 53, \"sheet_y\": 34, \"sort_order\": 70 }, \"♥️\": { \"category\": \"Activities\", \"sheet_x\": 53, \"sheet_y\": 35, \"sort_order\": 68 }, \"♦️\": { \"category\": \"Activities\", \"sheet_x\": 53, \"sheet_y\": 36, \"sort_order\": 69 }, \"♨️\": { \"category\": \"Travel & Places\", \"sheet_x\": 53, \"sheet_y\": 37, \"sort_order\": 57 }, \"♻️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 38, \"sort_order\": 101 }, \"♾️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 39, \"sort_order\": 100 }, \"♿\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 40, \"sort_order\": 4 }, \"⚒️\": { \"category\": \"Objects\", \"sheet_x\": 53, \"sheet_y\": 41, \"sort_order\": 184 }, \"⚓\": { \"category\": \"Travel & Places\", \"sheet_x\": 53, \"sheet_y\": 42, \"sort_order\": 110 }, \"⚔️\": { \"category\": \"Objects\", \"sheet_x\": 53, \"sheet_y\": 43, \"sort_order\": 187 }, \"⚖️\": { \"category\": \"Objects\", \"sheet_x\": 53, \"sheet_y\": 45, \"sort_order\": 195 }, \"⚗️\": { \"category\": \"Objects\", \"sheet_x\": 53, \"sheet_y\": 46, \"sort_order\": 201 }, \"⚙️\": { \"category\": \"Objects\", \"sheet_x\": 53, \"sheet_y\": 47, \"sort_order\": 193 }, \"⚛️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 48, \"sort_order\": 49 }, \"⚜️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 49, \"sort_order\": 102 }, \"⚠️\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 50, \"sort_order\": 14 }, \"⚡\": { \"category\": \"Travel & Places\", \"sheet_x\": 53, \"sheet_y\": 51, \"sort_order\": 203 }, \"⚪\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 52, \"sort_order\": 192 }, \"⚫\": { \"category\": \"Symbols\", \"sheet_x\": 53, \"sheet_y\": 53, \"sort_order\": 191 }, \"⚰️\": { \"category\": \"Objects\", \"sheet_x\": 53, \"sheet_y\": 54, \"sort_order\": 231 }, \"⚱️\": { \"category\": \"Objects\", \"sheet_x\": 53, \"sheet_y\": 55, \"sort_order\": 232 }, \"⚽\": { \"category\": \"Activities\", \"sheet_x\": 53, \"sheet_y\": 56, \"sort_order\": 28 }, \"⚾\": { \"category\": \"Activities\", \"sheet_x\": 54, \"sheet_y\": 0, \"sort_order\": 29 }, \"⛄\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 1, \"sort_order\": 206 }, \"⛅\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 2, \"sort_order\": 186 }, \"⛈️\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 3, \"sort_order\": 187 }, \"⛎\": { \"category\": \"Symbols\", \"sheet_x\": 54, \"sheet_y\": 4, \"sort_order\": 72 }, \"⛏️\": { \"category\": \"Objects\", \"sheet_x\": 54, \"sheet_y\": 5, \"sort_order\": 183 }, \"⛑️\": { \"category\": \"Objects\", \"sheet_x\": 54, \"sheet_y\": 6, \"sort_order\": 39 }, \"⛓️\": { \"category\": \"Objects\", \"sheet_x\": 54, \"sheet_y\": 7, \"sort_order\": 198 }, \"⛔\": { \"category\": \"Symbols\", \"sheet_x\": 54, \"sheet_y\": 8, \"sort_order\": 16 }, \"⛩️\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 9, \"sort_order\": 45 }, \"⛪\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 10, \"sort_order\": 41 }, \"⛰️\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 11, \"sort_order\": 9 }, \"⛱️\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 12, \"sort_order\": 202 }, \"⛲\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 13, \"sort_order\": 47 }, \"⛳\": { \"category\": \"Activities\", \"sheet_x\": 54, \"sheet_y\": 14, \"sort_order\": 47 }, \"⛴️\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 15, \"sort_order\": 115 }, \"⛵\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 16, \"sort_order\": 111 }, \"⛷️\": { \"category\": \"People & Body\", \"sheet_x\": 54, \"sheet_y\": 17, \"sort_order\": 247 }, \"⛸️\": { \"category\": \"Activities\", \"sheet_x\": 54, \"sheet_y\": 18, \"sort_order\": 48 }, \"⛹️‍♀️\": { \"category\": \"People & Body\", \"sheet_x\": 54, \"sheet_y\": 19, \"sort_order\": 263 }, \"⛹️‍♂️\": { \"category\": \"People & Body\", \"sheet_x\": 54, \"sheet_y\": 25, \"sort_order\": 262 }, \"⛹️\": { \"category\": \"People & Body\", \"sheet_x\": 54, \"sheet_y\": 31, \"sort_order\": 261 }, \"⛺\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 37, \"sort_order\": 48 }, \"⛽\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 38, \"sort_order\": 104 }, \"✂️\": { \"category\": \"Objects\", \"sheet_x\": 54, \"sheet_y\": 39, \"sort_order\": 171 }, \"✅\": { \"category\": \"Symbols\", \"sheet_x\": 54, \"sheet_y\": 40, \"sort_order\": 107 }, \"✈️\": { \"category\": \"Travel & Places\", \"sheet_x\": 54, \"sheet_y\": 41, \"sort_order\": 118 }, \"✉️\": { \"category\": \"Objects\", \"sheet_x\": 54, \"sheet_y\": 42, \"sort_order\": 132 }, \"✊\": { \"category\": \"People & Body\", \"sheet_x\": 54, \"sheet_y\": 43, \"sort_order\": 21 }, \"✋\": { \"category\": \"People & Body\", \"sheet_x\": 54, \"sheet_y\": 49, \"sort_order\": 4 }, \"✌️\": { \"category\": \"People & Body\", \"sheet_x\": 54, \"sheet_y\": 55, \"sort_order\": 8 }, \"✍️\": { \"category\": \"People & Body\", \"sheet_x\": 55, \"sheet_y\": 4, \"sort_order\": 31 }, \"✏️\": { \"category\": \"Objects\", \"sheet_x\": 55, \"sheet_y\": 10, \"sort_order\": 145 }, \"✒️\": { \"category\": \"Objects\", \"sheet_x\": 55, \"sheet_y\": 11, \"sort_order\": 146 }, \"✔️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 12, \"sort_order\": 109 }, \"✖️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 13, \"sort_order\": 110 }, \"✝️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 14, \"sort_order\": 54 }, \"✡️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 15, \"sort_order\": 51 }, \"✨\": { \"category\": \"Activities\", \"sheet_x\": 55, \"sheet_y\": 16, \"sort_order\": 6 }, \"✳️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 17, \"sort_order\": 119 }, \"✴️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 18, \"sort_order\": 120 }, \"❄️\": { \"category\": \"Travel & Places\", \"sheet_x\": 55, \"sheet_y\": 19, \"sort_order\": 204 }, \"❇️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 20, \"sort_order\": 121 }, \"❌\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 21, \"sort_order\": 111 }, \"❎\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 22, \"sort_order\": 112 }, \"❓\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 23, \"sort_order\": 124 }, \"❔\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 24, \"sort_order\": 125 }, \"❕\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 25, \"sort_order\": 126 }, \"❗\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 26, \"sort_order\": 127 }, \"❣️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 55, \"sheet_y\": 27, \"sort_order\": 125 }, \"❤️\": { \"category\": \"Smileys & Emotion\", \"sheet_x\": 55, \"sheet_y\": 28, \"sort_order\": 127 }, \"➕\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 29, \"sort_order\": 113 }, \"➖\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 30, \"sort_order\": 114 }, \"➗\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 31, \"sort_order\": 115 }, \"➡️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 32, \"sort_order\": 29 }, \"➰\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 33, \"sort_order\": 116 }, \"➿\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 34, \"sort_order\": 117 }, \"⤴️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 35, \"sort_order\": 39 }, \"⤵️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 36, \"sort_order\": 40 }, \"⬅️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 37, \"sort_order\": 33 }, \"⬆️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 38, \"sort_order\": 27 }, \"⬇️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 39, \"sort_order\": 31 }, \"⬛\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 40, \"sort_order\": 200 }, \"⬜\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 41, \"sort_order\": 201 }, \"⭐\": { \"category\": \"Travel & Places\", \"sheet_x\": 55, \"sheet_y\": 42, \"sort_order\": 181 }, \"⭕\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 43, \"sort_order\": 106 }, \"〰️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 44, \"sort_order\": 128 }, \"〽️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 45, \"sort_order\": 118 }, \"㊗️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 46, \"sort_order\": 180 }, \"㊙️\": { \"category\": \"Symbols\", \"sheet_x\": 55, \"sheet_y\": 47, \"sort_order\": 181 } }\r\n };\r\n}\r\nvar Countries = [{ \"phoneCode\": \"7 840\", \"code\": \"AB\", \"name\": \"Abkhazia\", \"pattern\": \"\", \"emoji\": \"\" }, { \"phoneCode\": \"93\", \"code\": \"AF\", \"name\": \"Afghanistan\", \"pattern\": \"93 XXX XXX XXX\", \"emoji\": \"🇦🇫\" }, { \"phoneCode\": \"358 18\", \"code\": \"AX\", \"name\": \"Aland Islands\", \"pattern\": \"\", \"emoji\": \"🇦🇽\" }, { \"phoneCode\": \"355\", \"code\": \"AL\", \"name\": \"Albania\", \"pattern\": \"355 XX XXX XXXX\", \"emoji\": \"🇦🇱\" }, { \"phoneCode\": \"213\", \"code\": \"DZ\", \"name\": \"Algeria\", \"pattern\": \"213 XXX XX XX XX\", \"emoji\": \"🇩🇿\" }, { \"phoneCode\": \"1 684\", \"code\": \"AS\", \"name\": \"American Samoa\", \"pattern\": \"1684 XXX XXXX\", \"emoji\": \"🇦🇸\" }, { \"phoneCode\": \"376\", \"code\": \"AD\", \"name\": \"Andorra\", \"pattern\": \"376 XX XX XX\", \"emoji\": \"🇦🇩\" }, { \"phoneCode\": \"244\", \"code\": \"AO\", \"name\": \"Angola\", \"pattern\": \"244 XXX XXX XXX\", \"emoji\": \"🇦🇴\" }, { \"phoneCode\": \"1 264\", \"code\": \"AI\", \"name\": \"Anguilla\", \"pattern\": \"1264 XXX XXXX\", \"emoji\": \"🇦🇮\" }, { \"phoneCode\": \"1 268\", \"code\": \"AG\", \"name\": \"Antigua & Barbuda\", \"pattern\": \"1268 XXX XXXX\", \"emoji\": \"🇦🇬\" }, { \"phoneCode\": \"54\", \"code\": \"AR\", \"name\": \"Argentina\", \"pattern\": \"\", \"emoji\": \"🇦🇷\" }, { \"phoneCode\": \"374\", \"code\": \"AM\", \"name\": \"Armenia\", \"pattern\": \"374 XX XXX XXX\", \"emoji\": \"🇦🇲\" }, { \"phoneCode\": \"297\", \"code\": \"AW\", \"name\": \"Aruba\", \"pattern\": \"297 XXX XXXX\", \"emoji\": \"🇦🇼\" }, { \"phoneCode\": \"247\", \"code\": \"SH\", \"name\": \"Ascension\", \"pattern\": \"290 XX XXX\", \"emoji\": \"🇸🇭\" }, { \"phoneCode\": \"61\", \"code\": \"AU\", \"name\": \"Australia\", \"pattern\": \"61 XXX XXX XXX\", \"emoji\": \"🇦🇺\" }, { \"phoneCode\": \"672\", \"code\": \"AU\", \"name\": \"Australian External Territories\", \"pattern\": \"61 XXX XXX XXX\", \"emoji\": \"🇦🇺\" }, { \"phoneCode\": \"43\", \"code\": \"AT\", \"name\": \"Austria\", \"pattern\": \"\", \"emoji\": \"🇦🇹\" }, { \"phoneCode\": \"994\", \"code\": \"AZ\", \"name\": \"Azerbaijan\", \"pattern\": \"994 XX XXX XX XX\", \"emoji\": \"🇦🇿\" }, { \"phoneCode\": \"1 242\", \"code\": \"BS\", \"name\": \"Bahamas\", \"pattern\": \"1242 XXX XXXX\", \"emoji\": \"🇧🇸\" }, { \"phoneCode\": \"973\", \"code\": \"BH\", \"name\": \"Bahrain\", \"pattern\": \"973 XXXX XXXX\", \"emoji\": \"🇧🇭\" }, { \"phoneCode\": \"880\", \"code\": \"BD\", \"name\": \"Bangladesh\", \"pattern\": \"\", \"emoji\": \"🇧🇩\" }, { \"phoneCode\": \"1 246\", \"code\": \"BB\", \"name\": \"Barbados\", \"pattern\": \"1246 XXX XXXX\", \"emoji\": \"🇧🇧\" }, { \"phoneCode\": \"1 268\", \"code\": \"AG\", \"name\": \"Barbuda\", \"pattern\": \"1268 XXX XXXX\", \"emoji\": \"🇦🇬\" }, { \"phoneCode\": \"375\", \"code\": \"BY\", \"name\": \"Belarus\", \"pattern\": \"375 XX XXX XXXX\", \"emoji\": \"🇧🇾\" }, { \"phoneCode\": \"32\", \"code\": \"BE\", \"name\": \"Belgium\", \"pattern\": \"32 XXX XX XX XX\", \"emoji\": \"🇧🇪\" }, { \"phoneCode\": \"501\", \"code\": \"BZ\", \"name\": \"Belize\", \"pattern\": \"\", \"emoji\": \"🇧🇿\" }, { \"phoneCode\": \"229\", \"code\": \"BJ\", \"name\": \"Benin\", \"pattern\": \"229 XX XXX XXX\", \"emoji\": \"🇧🇯\" }, { \"phoneCode\": \"1 441\", \"code\": \"BM\", \"name\": \"Bermuda\", \"pattern\": \"1441 XXX XXXX\", \"emoji\": \"🇧🇲\" }, { \"phoneCode\": \"975\", \"code\": \"BT\", \"name\": \"Bhutan\", \"pattern\": \"\", \"emoji\": \"🇧🇹\" }, { \"phoneCode\": \"591\", \"code\": \"BO\", \"name\": \"Bolivia\", \"pattern\": \"591 X XXX XXXX\", \"emoji\": \"🇧🇴\" }, { \"phoneCode\": \"599 7\", \"code\": \"BQ\", \"name\": \"Caribbean Netherlands\", \"pattern\": \"\", \"emoji\": \"🇧🇶\" }, { \"phoneCode\": \"387\", \"code\": \"BA\", \"name\": \"Bosnia & Herzegovina\", \"pattern\": \"\", \"emoji\": \"🇧🇦\" }, { \"phoneCode\": \"267\", \"code\": \"BW\", \"name\": \"Botswana\", \"pattern\": \"267 XX XXX XXX\", \"emoji\": \"🇧🇼\" }, { \"phoneCode\": \"55\", \"code\": \"BR\", \"name\": \"Brazil\", \"pattern\": \"55 XX XXXXX XXXX\", \"emoji\": \"🇧🇷\" }, { \"phoneCode\": \"246\", \"code\": \"IO\", \"name\": \"British Indian Ocean Territory\", \"pattern\": \"246 XXX XXXX\", \"emoji\": \"🇮🇴\" }, { \"phoneCode\": \"1 284\", \"code\": \"VG\", \"name\": \"British Virgin Islands\", \"pattern\": \"1284 XXX XXXX\", \"emoji\": \"🇻🇬\" }, { \"phoneCode\": \"673\", \"code\": \"BN\", \"name\": \"Brunei\", \"pattern\": \"673 XXX XXXX\", \"emoji\": \"🇧🇳\" }, { \"phoneCode\": \"359\", \"code\": \"BG\", \"name\": \"Bulgaria\", \"pattern\": \"\", \"emoji\": \"🇧🇬\" }, { \"phoneCode\": \"226\", \"code\": \"BF\", \"name\": \"Burkina Faso\", \"pattern\": \"226 XX XX XX XX\", \"emoji\": \"🇧🇫\" }, { \"phoneCode\": \"95\", \"code\": \"MM\", \"name\": \"Myanmar (Burma)\", \"pattern\": \"\", \"emoji\": \"🇲🇲\" }, { \"phoneCode\": \"257\", \"code\": \"BI\", \"name\": \"Burundi\", \"pattern\": \"257 XX XX XXXX\", \"emoji\": \"🇧🇮\" }, { \"phoneCode\": \"855\", \"code\": \"KH\", \"name\": \"Cambodia\", \"pattern\": \"\", \"emoji\": \"🇰🇭\" }, { \"phoneCode\": \"237\", \"code\": \"CM\", \"name\": \"Cameroon\", \"pattern\": \"237 XXXX XXXX\", \"emoji\": \"🇨🇲\" }, { \"phoneCode\": \"1\", \"code\": \"CA\", \"name\": \"Canada\", \"pattern\": \"1 XXX XXX XXXX\", \"emoji\": \"🇨🇦\" }, { \"phoneCode\": \"238\", \"code\": \"CV\", \"name\": \"Cape Verde\", \"pattern\": \"238 XXX XXXX\", \"emoji\": \"🇨🇻\" }, { \"phoneCode\": \"1 345\", \"code\": \"KY\", \"name\": \"Cayman Islands\", \"pattern\": \"1345 XXX XXXX\", \"emoji\": \"🇰🇾\" }, { \"phoneCode\": \"236\", \"code\": \"CF\", \"name\": \"Central African Republic\", \"pattern\": \"236 XX XX XX XX\", \"emoji\": \"🇨🇫\" }, { \"phoneCode\": \"235\", \"code\": \"TD\", \"name\": \"Chad\", \"pattern\": \"235 XX XX XX XX\", \"emoji\": \"🇹🇩\" }, { \"phoneCode\": \"56\", \"code\": \"CL\", \"name\": \"Chile\", \"pattern\": \"56 X XXXX XXXX\", \"emoji\": \"🇨🇱\" }, { \"phoneCode\": \"86\", \"code\": \"CN\", \"name\": \"China\", \"pattern\": \"86 XXX XXXX XXXX\", \"emoji\": \"🇨🇳\" }, { \"phoneCode\": \"61\", \"code\": \"CX\", \"name\": \"Christmas Island\", \"pattern\": \"\", \"emoji\": \"🇨🇽\" }, { \"phoneCode\": \"61\", \"code\": \"CC\", \"name\": \"Cocos (Keeling) Islands\", \"pattern\": \"\", \"emoji\": \"🇨🇨\" }, { \"phoneCode\": \"57\", \"code\": \"CO\", \"name\": \"Colombia\", \"pattern\": \"57 XXX XXX XXXX\", \"emoji\": \"🇨🇴\" }, { \"phoneCode\": \"269\", \"code\": \"KM\", \"name\": \"Comoros\", \"pattern\": \"269 XXX XXXX\", \"emoji\": \"🇰🇲\" }, { \"phoneCode\": \"242\", \"code\": \"CG\", \"name\": \"Congo - Brazzaville\", \"pattern\": \"242 XX XXX XXXX\", \"emoji\": \"🇨🇬\" }, { \"phoneCode\": \"243\", \"code\": \"CD\", \"name\": \"Congo - Kinshasa\", \"pattern\": \"243 XX XXX XXXX\", \"emoji\": \"🇨🇩\" }, { \"phoneCode\": \"682\", \"code\": \"CK\", \"name\": \"Cook Islands\", \"pattern\": \"\", \"emoji\": \"🇨🇰\" }, { \"phoneCode\": \"506\", \"code\": \"CR\", \"name\": \"Costa Rica\", \"pattern\": \"\", \"emoji\": \"🇨🇷\" }, { \"phoneCode\": \"225\", \"code\": \"CI\", \"name\": \"Cote d’Ivoire\", \"pattern\": \"225 XX XXX XXX\", \"emoji\": \"🇨🇮\" }, { \"phoneCode\": \"385\", \"code\": \"HR\", \"name\": \"Croatia\", \"pattern\": \"\", \"emoji\": \"🇭🇷\" }, { \"phoneCode\": \"53\", \"code\": \"CU\", \"name\": \"Cuba\", \"pattern\": \"53 XXXX XXXX\", \"emoji\": \"🇨🇺\" }, { \"phoneCode\": \"599 9\", \"code\": \"CW\", \"name\": \"Curacao\", \"pattern\": \"\", \"emoji\": \"🇨🇼\" }, { \"phoneCode\": \"357\", \"code\": \"CY\", \"name\": \"Cyprus\", \"pattern\": \"357 XXXX XXXX\", \"emoji\": \"🇨🇾\" }, { \"phoneCode\": \"420\", \"code\": \"CZ\", \"name\": \"Czech Republic\", \"pattern\": \"\", \"emoji\": \"🇨🇿\" }, { \"phoneCode\": \"45\", \"code\": \"DK\", \"name\": \"Denmark\", \"pattern\": \"45 XXXX XXXX\", \"emoji\": \"🇩🇰\" }, { \"phoneCode\": \"246\", \"code\": \"DG\", \"name\": \"Diego Garcia\", \"pattern\": \"\", \"emoji\": \"🇩🇬\" }, { \"phoneCode\": \"253\", \"code\": \"DJ\", \"name\": \"Djibouti\", \"pattern\": \"253 XX XX XX XX\", \"emoji\": \"🇩🇯\" }, { \"phoneCode\": \"1 767\", \"code\": \"DM\", \"name\": \"Dominica\", \"pattern\": \"1767 XXX XXXX\", \"emoji\": \"🇩🇲\" }, { \"phoneCode\": \"1 809 and 1 829\", \"code\": \"DO\", \"name\": \"Dominican Republic\", \"pattern\": \"1 XXX XXX XXXX\", \"emoji\": \"🇩🇴\" }, { \"phoneCode\": \"670\", \"code\": \"TL\", \"name\": \"Timor-Leste\", \"pattern\": \"\", \"emoji\": \"🇹🇱\" }, { \"phoneCode\": \"593\", \"code\": \"EC\", \"name\": \"Ecuador\", \"pattern\": \"\", \"emoji\": \"🇪🇨\" }, { \"phoneCode\": \"20\", \"code\": \"EG\", \"name\": \"Egypt\", \"pattern\": \"20 XX XXX XXXX\", \"emoji\": \"🇪🇬\" }, { \"phoneCode\": \"503\", \"code\": \"SV\", \"name\": \"El Salvador\", \"pattern\": \"503 XXXX XXXX\", \"emoji\": \"🇸🇻\" }, { \"phoneCode\": \"240\", \"code\": \"GQ\", \"name\": \"Equatorial Guinea\", \"pattern\": \"240 XXX XXX XXX\", \"emoji\": \"🇬🇶\" }, { \"phoneCode\": \"291\", \"code\": \"ER\", \"name\": \"Eritrea\", \"pattern\": \"291 X XXX XXX\", \"emoji\": \"🇪🇷\" }, { \"phoneCode\": \"372\", \"code\": \"EE\", \"name\": \"Estonia\", \"pattern\": \"\", \"emoji\": \"🇪🇪\" }, { \"phoneCode\": \"251\", \"code\": \"ET\", \"name\": \"Ethiopia\", \"pattern\": \"251 XX XXX XXXX\", \"emoji\": \"🇪🇹\" }, { \"phoneCode\": \"500\", \"code\": \"FK\", \"name\": \"Falkland Islands\", \"pattern\": \"\", \"emoji\": \"🇫🇰\" }, { \"phoneCode\": \"298\", \"code\": \"FO\", \"name\": \"Faroe Islands\", \"pattern\": \"298 XXX XXX\", \"emoji\": \"🇫🇴\" }, { \"phoneCode\": \"679\", \"code\": \"FJ\", \"name\": \"Fiji\", \"pattern\": \"\", \"emoji\": \"🇫🇯\" }, { \"phoneCode\": \"358\", \"code\": \"FI\", \"name\": \"Finland\", \"pattern\": \"\", \"emoji\": \"🇫🇮\" }, { \"phoneCode\": \"33\", \"code\": \"FR\", \"name\": \"France\", \"pattern\": \"33 X XX XX XX XX\", \"emoji\": \"🇫🇷\" }, { \"phoneCode\": \"594\", \"code\": \"GF\", \"name\": \"French Guiana\", \"pattern\": \"\", \"emoji\": \"🇬🇫\" }, { \"phoneCode\": \"689\", \"code\": \"PF\", \"name\": \"French Polynesia\", \"pattern\": \"\", \"emoji\": \"🇵🇫\" }, { \"phoneCode\": \"241\", \"code\": \"GA\", \"name\": \"Gabon\", \"pattern\": \"241 X XX XX XX\", \"emoji\": \"🇬🇦\" }, { \"phoneCode\": \"220\", \"code\": \"GM\", \"name\": \"Gambia\", \"pattern\": \"220 XXX XXXX\", \"emoji\": \"🇬🇲\" }, { \"phoneCode\": \"995\", \"code\": \"GE\", \"name\": \"Georgia\", \"pattern\": \"\", \"emoji\": \"🇬🇪\" }, { \"phoneCode\": \"49\", \"code\": \"DE\", \"name\": \"Germany\", \"pattern\": \"49 XXX XXXXXXXX\", \"emoji\": \"🇩🇪\" }, { \"phoneCode\": \"233\", \"code\": \"GH\", \"name\": \"Ghana\", \"pattern\": \"\", \"emoji\": \"🇬🇭\" }, { \"phoneCode\": \"350\", \"code\": \"GI\", \"name\": \"Gibraltar\", \"pattern\": \"350 XXXX XXXX\", \"emoji\": \"🇬🇮\" }, { \"phoneCode\": \"30\", \"code\": \"GR\", \"name\": \"Greece\", \"pattern\": \"30 XX XXXX XXXX\", \"emoji\": \"🇬🇷\" }, { \"phoneCode\": \"299\", \"code\": \"GL\", \"name\": \"Greenland\", \"pattern\": \"299 XXX XXX\", \"emoji\": \"🇬🇱\" }, { \"phoneCode\": \"1 473\", \"code\": \"GD\", \"name\": \"Grenada\", \"pattern\": \"1473 XXX XXXX\", \"emoji\": \"🇬🇩\" }, { \"phoneCode\": \"590\", \"code\": \"GP\", \"name\": \"Guadeloupe\", \"pattern\": \"\", \"emoji\": \"🇬🇵\" }, { \"phoneCode\": \"1 671\", \"code\": \"GU\", \"name\": \"Guam\", \"pattern\": \"1671 XXX XXXX\", \"emoji\": \"🇬🇺\" }, { \"phoneCode\": \"502\", \"code\": \"GT\", \"name\": \"Guatemala\", \"pattern\": \"502 X XXX XXXX\", \"emoji\": \"🇬🇹\" }, { \"phoneCode\": \"44\", \"code\": \"GG\", \"name\": \"Guernsey\", \"pattern\": \"\", \"emoji\": \"🇬🇬\" }, { \"phoneCode\": \"224\", \"code\": \"GN\", \"name\": \"Guinea\", \"pattern\": \"224 XXX XXX XXX\", \"emoji\": \"🇬🇳\" }, { \"phoneCode\": \"245\", \"code\": \"GW\", \"name\": \"Guinea-Bissau\", \"pattern\": \"245 XXX XXXX\", \"emoji\": \"🇬🇼\" }, { \"phoneCode\": \"592\", \"code\": \"GY\", \"name\": \"Guyana\", \"pattern\": \"\", \"emoji\": \"🇬🇾\" }, { \"phoneCode\": \"509\", \"code\": \"HT\", \"name\": \"Haiti\", \"pattern\": \"\", \"emoji\": \"🇭🇹\" }, { \"phoneCode\": \"504\", \"code\": \"HN\", \"name\": \"Honduras\", \"pattern\": \"504 XXXX XXXX\", \"emoji\": \"🇭🇳\" }, { \"phoneCode\": \"852\", \"code\": \"HK\", \"name\": \"Hong Kong SAR China\", \"pattern\": \"\", \"emoji\": \"🇭🇰\" }, { \"phoneCode\": \"36\", \"code\": \"HU\", \"name\": \"Hungary\", \"pattern\": \"36 XX XXX XXXX\", \"emoji\": \"🇭🇺\" }, { \"phoneCode\": \"354\", \"code\": \"IS\", \"name\": \"Iceland\", \"pattern\": \"354 XXX XXXX\", \"emoji\": \"🇮🇸\" }, { \"phoneCode\": \"91\", \"code\": \"IN\", \"name\": \"India\", \"pattern\": \"91 XXXXX XXXXX\", \"emoji\": \"🇮🇳\" }, { \"phoneCode\": \"62\", \"code\": \"ID\", \"name\": \"Indonesia\", \"pattern\": \"\", \"emoji\": \"🇮🇩\" }, { \"phoneCode\": \"98\", \"code\": \"IR\", \"name\": \"Iran\", \"pattern\": \"98 XXX XXX XXXX\", \"emoji\": \"🇮🇷\" }, { \"phoneCode\": \"964\", \"code\": \"IQ\", \"name\": \"Iraq\", \"pattern\": \"964 XXX XXX XXXX\", \"emoji\": \"🇮🇶\" }, { \"phoneCode\": \"353\", \"code\": \"IE\", \"name\": \"Ireland\", \"pattern\": \"353 XX XXX XXXX\", \"emoji\": \"🇮🇪\" }, { \"phoneCode\": \"972\", \"code\": \"IL\", \"name\": \"Israel\", \"pattern\": \"972 XX XXX XXXX\", \"emoji\": \"🇮🇱\" }, { \"phoneCode\": \"39\", \"code\": \"IT\", \"name\": \"Italy\", \"pattern\": \"39 XXX XXX XXXX\", \"emoji\": \"🇮🇹\" }, { \"phoneCode\": \"1 876\", \"code\": \"JM\", \"name\": \"Jamaica\", \"pattern\": \"1876 XXX XXXX\", \"emoji\": \"🇯🇲\" }, { \"phoneCode\": \"47 79\", \"code\": \"SJ\", \"name\": \"Svalbard & Jan Mayen\", \"pattern\": \"\", \"emoji\": \"🇸🇯\" }, { \"phoneCode\": \"81\", \"code\": \"JP\", \"name\": \"Japan\", \"pattern\": \"81 XX XXXX XXXX\", \"emoji\": \"🇯🇵\" }, { \"phoneCode\": \"44\", \"code\": \"JE\", \"name\": \"Jersey\", \"pattern\": \"\", \"emoji\": \"🇯🇪\" }, { \"phoneCode\": \"962\", \"code\": \"JO\", \"name\": \"Jordan\", \"pattern\": \"962 X XXXX XXXX\", \"emoji\": \"🇯🇴\" }, { \"phoneCode\": \"7 7\", \"code\": \"KZ\", \"name\": \"Kazakhstan\", \"pattern\": \"7 XXX XXX XX XX\", \"emoji\": \"🇰🇿\" }, { \"phoneCode\": \"254\", \"code\": \"KE\", \"name\": \"Kenya\", \"pattern\": \"254 XXX XXX XXX\", \"emoji\": \"🇰🇪\" }, { \"phoneCode\": \"686\", \"code\": \"KI\", \"name\": \"Kiribati\", \"pattern\": \"\", \"emoji\": \"🇰🇮\" }, { \"phoneCode\": \"850\", \"code\": \"KP\", \"name\": \"North Korea\", \"pattern\": \"\", \"emoji\": \"🇰🇵\" }, { \"phoneCode\": \"82\", \"code\": \"KR\", \"name\": \"South Korea\", \"pattern\": \"\", \"emoji\": \"🇰🇷\" }, { \"phoneCode\": \"965\", \"code\": \"KW\", \"name\": \"Kuwait\", \"pattern\": \"965 XXXX XXXX\", \"emoji\": \"🇰🇼\" }, { \"phoneCode\": \"996\", \"code\": \"KG\", \"name\": \"Kyrgyzstan\", \"pattern\": \"\", \"emoji\": \"🇰🇬\" }, { \"phoneCode\": \"856\", \"code\": \"LA\", \"name\": \"Laos\", \"pattern\": \"\", \"emoji\": \"🇱🇦\" }, { \"phoneCode\": \"371\", \"code\": \"LV\", \"name\": \"Latvia\", \"pattern\": \"371 XXX XXXXX\", \"emoji\": \"🇱🇻\" }, { \"phoneCode\": \"961\", \"code\": \"LB\", \"name\": \"Lebanon\", \"pattern\": \"\", \"emoji\": \"🇱🇧\" }, { \"phoneCode\": \"266\", \"code\": \"LS\", \"name\": \"Lesotho\", \"pattern\": \"266 XX XXX XXX\", \"emoji\": \"🇱🇸\" }, { \"phoneCode\": \"231\", \"code\": \"LR\", \"name\": \"Liberia\", \"pattern\": \"\", \"emoji\": \"🇱🇷\" }, { \"phoneCode\": \"218\", \"code\": \"LY\", \"name\": \"Libya\", \"pattern\": \"218 XX XXX XXXX\", \"emoji\": \"🇱🇾\" }, { \"phoneCode\": \"423\", \"code\": \"LI\", \"name\": \"Liechtenstein\", \"pattern\": \"\", \"emoji\": \"🇱🇮\" }, { \"phoneCode\": \"370\", \"code\": \"LT\", \"name\": \"Lithuania\", \"pattern\": \"370 XXX XXXXX\", \"emoji\": \"🇱🇹\" }, { \"phoneCode\": \"352\", \"code\": \"LU\", \"name\": \"Luxembourg\", \"pattern\": \"\", \"emoji\": \"🇱🇺\" }, { \"phoneCode\": \"853\", \"code\": \"MO\", \"name\": \"Macau SAR China\", \"pattern\": \"\", \"emoji\": \"🇲🇴\" }, { \"phoneCode\": \"389\", \"code\": \"MK\", \"name\": \"Macedonia\", \"pattern\": \"\", \"emoji\": \"🇲🇰\" }, { \"phoneCode\": \"261\", \"code\": \"MG\", \"name\": \"Madagascar\", \"pattern\": \"261 XX XX XXX XX\", \"emoji\": \"🇲🇬\" }, { \"phoneCode\": \"265\", \"code\": \"MW\", \"name\": \"Malawi\", \"pattern\": \"\", \"emoji\": \"🇲🇼\" }, { \"phoneCode\": \"60\", \"code\": \"MM\", \"name\": \"Malaysia\", \"pattern\": \"\", \"emoji\": \"🇲🇲\" }, { \"phoneCode\": \"960\", \"code\": \"MV\", \"name\": \"Maldives\", \"pattern\": \"\", \"emoji\": \"🇲🇻\" }, { \"phoneCode\": \"223\", \"code\": \"ML\", \"name\": \"Mali\", \"pattern\": \"223 XXXX XXXX\", \"emoji\": \"🇲🇱\" }, { \"phoneCode\": \"356\", \"code\": \"MT\", \"name\": \"Malta\", \"pattern\": \"356 XX XX XX XX\", \"emoji\": \"🇲🇹\" }, { \"phoneCode\": \"692\", \"code\": \"MH\", \"name\": \"Marshall Islands\", \"pattern\": \"\", \"emoji\": \"🇲🇭\" }, { \"phoneCode\": \"596\", \"code\": \"MQ\", \"name\": \"Martinique\", \"pattern\": \"\", \"emoji\": \"🇲🇶\" }, { \"phoneCode\": \"222\", \"code\": \"MR\", \"name\": \"Mauritania\", \"pattern\": \"222 XXXX XXXX\", \"emoji\": \"🇲🇷\" }, { \"phoneCode\": \"230\", \"code\": \"MU\", \"name\": \"Mauritius\", \"pattern\": \"\", \"emoji\": \"🇲🇺\" }, { \"phoneCode\": \"262\", \"code\": \"YT\", \"name\": \"Mayotte\", \"pattern\": \"\", \"emoji\": \"🇾🇹\" }, { \"phoneCode\": \"52\", \"code\": \"MX\", \"name\": \"Mexico\", \"pattern\": \"\", \"emoji\": \"🇲🇽\" }, { \"phoneCode\": \"691\", \"code\": \"FM\", \"name\": \"Micronesia\", \"pattern\": \"\", \"emoji\": \"🇫🇲\" }, { \"phoneCode\": \"373\", \"code\": \"MD\", \"name\": \"Moldova\", \"pattern\": \"373 XX XXX XXX\", \"emoji\": \"🇲🇩\" }, { \"phoneCode\": \"377\", \"code\": \"MC\", \"name\": \"Monaco\", \"pattern\": \"377 XXXX XXXX\", \"emoji\": \"🇲🇨\" }, { \"phoneCode\": \"976\", \"code\": \"MN\", \"name\": \"Mongolia\", \"pattern\": \"\", \"emoji\": \"🇲🇳\" }, { \"phoneCode\": \"382\", \"code\": \"ME\", \"name\": \"Montenegro\", \"pattern\": \"\", \"emoji\": \"🇲🇪\" }, { \"phoneCode\": \"1 664\", \"code\": \"MS\", \"name\": \"Montserrat\", \"pattern\": \"1664 XXX XXXX\", \"emoji\": \"🇲🇸\" }, { \"phoneCode\": \"212\", \"code\": \"MA\", \"name\": \"Morocco\", \"pattern\": \"212 XX XXX XXXX\", \"emoji\": \"🇲🇦\" }, { \"phoneCode\": \"258\", \"code\": \"MZ\", \"name\": \"Mozambique\", \"pattern\": \"258 XX XXX XXXX\", \"emoji\": \"🇲🇿\" }, { \"phoneCode\": \"264\", \"code\": \"NA\", \"name\": \"Namibia\", \"pattern\": \"264 XX XXX XXXX\", \"emoji\": \"🇳🇦\" }, { \"phoneCode\": \"674\", \"code\": \"NR\", \"name\": \"Nauru\", \"pattern\": \"\", \"emoji\": \"🇳🇷\" }, { \"phoneCode\": \"977\", \"code\": \"NP\", \"name\": \"Nepal\", \"pattern\": \"\", \"emoji\": \"🇳🇵\" }, { \"phoneCode\": \"31\", \"code\": \"NL\", \"name\": \"Netherlands\", \"pattern\": \"31 X XX XX XX XX\", \"emoji\": \"🇳🇱\" }, { \"phoneCode\": \"687\", \"code\": \"NC\", \"name\": \"New Caledonia\", \"pattern\": \"\", \"emoji\": \"🇳🇨\" }, { \"phoneCode\": \"64\", \"code\": \"NZ\", \"name\": \"New Zealand\", \"pattern\": \"\", \"emoji\": \"🇳🇿\" }, { \"phoneCode\": \"505\", \"code\": \"NI\", \"name\": \"Nicaragua\", \"pattern\": \"505 XXXX XXXX\", \"emoji\": \"🇳🇮\" }, { \"phoneCode\": \"227\", \"code\": \"NE\", \"name\": \"Niger\", \"pattern\": \"227 XX XX XX XX\", \"emoji\": \"🇳🇪\" }, { \"phoneCode\": \"234\", \"code\": \"NG\", \"name\": \"Nigeria\", \"pattern\": \"\", \"emoji\": \"🇳🇬\" }, { \"phoneCode\": \"683\", \"code\": \"NU\", \"name\": \"Niue\", \"pattern\": \"\", \"emoji\": \"🇳🇺\" }, { \"phoneCode\": \"672\", \"code\": \"NF\", \"name\": \"Norfolk Island\", \"pattern\": \"\", \"emoji\": \"🇳🇫\" }, { \"phoneCode\": \"1 670\", \"code\": \"MP\", \"name\": \"Northern Mariana Islands\", \"pattern\": \"1670 XXX XXXX\", \"emoji\": \"🇲🇵\" }, { \"phoneCode\": \"47\", \"code\": \"NO\", \"name\": \"Norway\", \"pattern\": \"47 XXXX XXXX\", \"emoji\": \"🇳🇴\" }, { \"phoneCode\": \"968\", \"code\": \"OM\", \"name\": \"Oman\", \"pattern\": \"968 XXXX XXXX\", \"emoji\": \"🇴🇲\" }, { \"phoneCode\": \"92\", \"code\": \"PK\", \"name\": \"Pakistan\", \"pattern\": \"92 XXX XXX XXXX\", \"emoji\": \"🇵🇰\" }, { \"phoneCode\": \"680\", \"code\": \"PW\", \"name\": \"Palau\", \"pattern\": \"\", \"emoji\": \"🇵🇼\" }, { \"phoneCode\": \"970\", \"code\": \"PS\", \"name\": \"Palestinian Territories\", \"pattern\": \"970 XXX XX XXXX\", \"emoji\": \"🇵🇸\" }, { \"phoneCode\": \"507\", \"code\": \"PA\", \"name\": \"Panama\", \"pattern\": \"507 XXXX XXXX\", \"emoji\": \"🇵🇦\" }, { \"phoneCode\": \"675\", \"code\": \"PG\", \"name\": \"Papua New Guinea\", \"pattern\": \"\", \"emoji\": \"🇵🇬\" }, { \"phoneCode\": \"595\", \"code\": \"PY\", \"name\": \"Paraguay\", \"pattern\": \"595 XXX XXX XXX\", \"emoji\": \"🇵🇾\" }, { \"phoneCode\": \"51\", \"code\": \"PE\", \"name\": \"Peru\", \"pattern\": \"51 XXX XXX XXX\", \"emoji\": \"🇵🇪\" }, { \"phoneCode\": \"63\", \"code\": \"PH\", \"name\": \"Philippines\", \"pattern\": \"63 XXX XXX XXXX\", \"emoji\": \"🇵🇭\" }, { \"phoneCode\": \"64\", \"code\": \"PN\", \"name\": \"Pitcairn Islands\", \"pattern\": \"\", \"emoji\": \"🇵🇳\" }, { \"phoneCode\": \"48\", \"code\": \"PL\", \"name\": \"Poland\", \"pattern\": \"48 XXX XXX XXX\", \"emoji\": \"🇵🇱\" }, { \"phoneCode\": \"351\", \"code\": \"PT\", \"name\": \"Portugal\", \"pattern\": \"351 X XXXX XXXX\", \"emoji\": \"🇵🇹\" }, { \"phoneCode\": \"1 787 and 1 939\", \"code\": \"PR\", \"name\": \"Puerto Rico\", \"pattern\": \"1 XXX XXX XXXX\", \"emoji\": \"🇵🇷\" }, { \"phoneCode\": \"974\", \"code\": \"QA\", \"name\": \"Qatar\", \"pattern\": \"\", \"emoji\": \"🇶🇦\" }, { \"phoneCode\": \"262\", \"code\": \"RE\", \"name\": \"Reunion\", \"pattern\": \"262 XXX XXX XXX\", \"emoji\": \"🇷🇪\" }, { \"phoneCode\": \"40\", \"code\": \"RO\", \"name\": \"Romania\", \"pattern\": \"40 XXX XXX XXX\", \"emoji\": \"🇷🇴\" }, { \"phoneCode\": \"7\", \"code\": \"RU\", \"name\": \"Russia\", \"pattern\": \"7 XXX XXX XX XX\", \"emoji\": \"🇷🇺\" }, { \"phoneCode\": \"250\", \"code\": \"RW\", \"name\": \"Rwanda\", \"pattern\": \"250 XXX XXX XXX\", \"emoji\": \"🇷🇼\" }, { \"phoneCode\": \"590\", \"code\": \"BL\", \"name\": \"St. Barthelemy\", \"pattern\": \"\", \"emoji\": \"🇧🇱\" }, { \"phoneCode\": \"290\", \"code\": \"SH\", \"name\": \"St. Helena\", \"pattern\": \"290 XX XXX\", \"emoji\": \"🇸🇭\" }, { \"phoneCode\": \"1 869\", \"code\": \"KN\", \"name\": \"St. Kitts & Nevis\", \"pattern\": \"1869 XXX XXXX\", \"emoji\": \"🇰🇳\" }, { \"phoneCode\": \"1 758\", \"code\": \"LC\", \"name\": \"St. Lucia\", \"pattern\": \"1758 XXX XXXX\", \"emoji\": \"🇱🇨\" }, { \"phoneCode\": \"590\", \"code\": \"MF\", \"name\": \"St. Martin (France)\", \"pattern\": \"\", \"emoji\": \"🇲🇫\" }, { \"phoneCode\": \"508\", \"code\": \"PM\", \"name\": \"St. Pierre and Miquelon\", \"pattern\": \"\", \"emoji\": \"🇵🇲\" }, { \"phoneCode\": \"1 784\", \"code\": \"VC\", \"name\": \"St. Vincent and the Grenadines\", \"pattern\": \"1784 XXX XXXX\", \"emoji\": \"🇻🇨\" }, { \"phoneCode\": \"685\", \"code\": \"WS\", \"name\": \"Samoa\", \"pattern\": \"\", \"emoji\": \"🇼🇸\" }, { \"phoneCode\": \"378\", \"code\": \"SM\", \"name\": \"San Marino\", \"pattern\": \"378 XXX XXX XXXX\", \"emoji\": \"🇸🇲\" }, { \"phoneCode\": \"239\", \"code\": \"ST\", \"name\": \"São Tome & Principe\", \"pattern\": \"239 XX XXXXX\", \"emoji\": \"🇸🇹\" }, { \"phoneCode\": \"966\", \"code\": \"SA\", \"name\": \"Saudi Arabia\", \"pattern\": \"\", \"emoji\": \"🇸🇦\" }, { \"phoneCode\": \"221\", \"code\": \"SN\", \"name\": \"Senegal\", \"pattern\": \"221 XX XXX XXXX\", \"emoji\": \"🇸🇳\" }, { \"phoneCode\": \"381\", \"code\": \"RS\", \"name\": \"Serbia\", \"pattern\": \"381 XX XXX XXXX\", \"emoji\": \"🇷🇸\" }, { \"phoneCode\": \"248\", \"code\": \"SC\", \"name\": \"Seychelles\", \"pattern\": \"248 X XX XX XX\", \"emoji\": \"🇸🇨\" }, { \"phoneCode\": \"232\", \"code\": \"SL\", \"name\": \"Sierra Leone\", \"pattern\": \"232 XX XXX XXX\", \"emoji\": \"🇸🇱\" }, { \"phoneCode\": \"65\", \"code\": \"SG\", \"name\": \"Singapore\", \"pattern\": \"65 XXXX XXXX\", \"emoji\": \"🇸🇬\" }, { \"phoneCode\": \"599 3\", \"code\": \"BQ\", \"name\": \"Sint Eustatius\", \"pattern\": \"\", \"emoji\": \"🇧🇶\" }, { \"phoneCode\": \"1 721\", \"code\": \"SX\", \"name\": \"Sint Maarten\", \"pattern\": \"1721 XXX XXXX\", \"emoji\": \"🇸🇽\" }, { \"phoneCode\": \"421\", \"code\": \"SK\", \"name\": \"Slovakia\", \"pattern\": \"\", \"emoji\": \"🇸🇰\" }, { \"phoneCode\": \"386\", \"code\": \"SI\", \"name\": \"Slovenia\", \"pattern\": \"\", \"emoji\": \"🇸🇮\" }, { \"phoneCode\": \"677\", \"code\": \"SB\", \"name\": \"Solomon Islands\", \"pattern\": \"\", \"emoji\": \"🇸🇧\" }, { \"phoneCode\": \"252\", \"code\": \"SO\", \"name\": \"Somalia\", \"pattern\": \"252 XX XXX XXX\", \"emoji\": \"🇸🇴\" }, { \"phoneCode\": \"27\", \"code\": \"ZA\", \"name\": \"South Africa\", \"pattern\": \"27 XX XXX XXXX\", \"emoji\": \"🇿🇦\" }, { \"phoneCode\": \"500\", \"code\": \"GS\", \"name\": \"South Georgia & South Sandwich Islands\", \"pattern\": \"\", \"emoji\": \"🇬🇸\" }, { \"phoneCode\": \"995 34\", \"code\": \"\", \"name\": \"South Ossetia\", \"pattern\": \"\", \"emoji\": \"\" }, { \"phoneCode\": \"211\", \"code\": \"SS\", \"name\": \"South Sudan\", \"pattern\": \"211 XX XXX XXXX\", \"emoji\": \"🇸🇸\" }, { \"phoneCode\": \"34\", \"code\": \"ES\", \"name\": \"Spain\", \"pattern\": \"34 XXX XXX XXX\", \"emoji\": \"🇪🇸\" }, { \"phoneCode\": \"94\", \"code\": \"LK\", \"name\": \"Sri Lanka\", \"pattern\": \"94 XX XXX XXXX\", \"emoji\": \"🇱🇰\" }, { \"phoneCode\": \"249\", \"code\": \"SD\", \"name\": \"Sudan\", \"pattern\": \"249 XX XXX XXXX\", \"emoji\": \"🇸🇩\" }, { \"phoneCode\": \"597\", \"code\": \"SR\", \"name\": \"Suriname\", \"pattern\": \"597 XXX XXXX\", \"emoji\": \"🇸🇷\" }, { \"phoneCode\": \"47 79\", \"code\": \"SJ\", \"name\": \"Svalbard\", \"pattern\": \"\", \"emoji\": \"🇸🇯\" }, { \"phoneCode\": \"268\", \"code\": \"SZ\", \"name\": \"Swaziland\", \"pattern\": \"268 XXXX XXXX\", \"emoji\": \"🇸🇿\" }, { \"phoneCode\": \"46\", \"code\": \"SE\", \"name\": \"Sweden\", \"pattern\": \"46 XX XXX XXXX\", \"emoji\": \"🇸🇪\" }, { \"phoneCode\": \"41\", \"code\": \"CH\", \"name\": \"Switzerland\", \"pattern\": \"41 XX XXX XXXX\", \"emoji\": \"🇨🇭\" }, { \"phoneCode\": \"963\", \"code\": \"SY\", \"name\": \"Syria\", \"pattern\": \"\", \"emoji\": \"🇸🇾\" }, { \"phoneCode\": \"886\", \"code\": \"TW\", \"name\": \"Taiwan\", \"pattern\": \"\", \"emoji\": \"🇹🇼\" }, { \"phoneCode\": \"992\", \"code\": \"TJ\", \"name\": \"Tajikistan\", \"pattern\": \"\", \"emoji\": \"🇹🇯\" }, { \"phoneCode\": \"255\", \"code\": \"TZ\", \"name\": \"Tanzania\", \"pattern\": \"255 XX XXX XXXX\", \"emoji\": \"🇹🇿\" }, { \"phoneCode\": \"66\", \"code\": \"TH\", \"name\": \"Thailand\", \"pattern\": \"66 X XXXX XXXX\", \"emoji\": \"🇹🇭\" }, { \"phoneCode\": \"228\", \"code\": \"TG\", \"name\": \"Togo\", \"pattern\": \"228 XX XXX XXX\", \"emoji\": \"🇹🇬\" }, { \"phoneCode\": \"690\", \"code\": \"TK\", \"name\": \"Tokelau\", \"pattern\": \"\", \"emoji\": \"🇹🇰\" }, { \"phoneCode\": \"676\", \"code\": \"TO\", \"name\": \"Tonga\", \"pattern\": \"\", \"emoji\": \"🇹🇴\" }, { \"phoneCode\": \"1 868\", \"code\": \"TT\", \"name\": \"Trinidad & Tobago\", \"pattern\": \"1868 XXX XXXX\", \"emoji\": \"🇹🇹\" }, { \"phoneCode\": \"216\", \"code\": \"TN\", \"name\": \"Tunisia\", \"pattern\": \"216 XX XXX XXX\", \"emoji\": \"🇹🇳\" }, { \"phoneCode\": \"90\", \"code\": \"TR\", \"name\": \"Turkey\", \"pattern\": \"90 XXX XXX XXXX\", \"emoji\": \"🇹🇷\" }, { \"phoneCode\": \"993\", \"code\": \"TM\", \"name\": \"Turkmenistan\", \"pattern\": \"993 XX XXXXXX\", \"emoji\": \"🇹🇲\" }, { \"phoneCode\": \"1 649\", \"code\": \"TC\", \"name\": \"Turks & Caicos Islands\", \"pattern\": \"1649 XXX XXXX\", \"emoji\": \"🇹🇨\" }, { \"phoneCode\": \"688\", \"code\": \"TV\", \"name\": \"Tuvalu\", \"pattern\": \"\", \"emoji\": \"🇹🇻\" }, { \"phoneCode\": \"256\", \"code\": \"UG\", \"name\": \"Uganda\", \"pattern\": \"256 XX XXX XXXX\", \"emoji\": \"🇺🇬\" }, { \"phoneCode\": \"380\", \"code\": \"UA\", \"name\": \"Ukraine\", \"pattern\": \"380 XX XXX XX XX\", \"emoji\": \"🇺🇦\" }, { \"phoneCode\": \"971\", \"code\": \"AE\", \"name\": \"United Arab Emirates\", \"pattern\": \"971 XX XXX XXXX\", \"emoji\": \"🇦🇪\" }, { \"phoneCode\": \"44\", \"code\": \"GB\", \"name\": \"United Kingdom\", \"pattern\": \"44 XXXX XXXXXX\", \"emoji\": \"🇬🇧\" }, { \"phoneCode\": \"1\", \"code\": \"US\", \"name\": \"United States\", \"pattern\": \"1 XXX XXX XXXX\", \"emoji\": \"🇺🇸\" }, { \"phoneCode\": \"598\", \"code\": \"UY\", \"name\": \"Uruguay\", \"pattern\": \"598 XXXX XXXX\", \"emoji\": \"🇺🇾\" }, { \"phoneCode\": \"1 340\", \"code\": \"VI\", \"name\": \"U.S. Virgin Islands\", \"pattern\": \"1340 XXX XXXX\", \"emoji\": \"🇻🇮\" }, { \"phoneCode\": \"998\", \"code\": \"UZ\", \"name\": \"Uzbekistan\", \"pattern\": \"998 XX XXXXXXX\", \"emoji\": \"🇺🇿\" }, { \"phoneCode\": \"678\", \"code\": \"VU\", \"name\": \"Vanuatu\", \"pattern\": \"\", \"emoji\": \"🇻🇺\" }, { \"phoneCode\": \"58\", \"code\": \"VE\", \"name\": \"Venezuela\", \"pattern\": \"58 XXX XXX XXXX\", \"emoji\": \"🇻🇪\" }, { \"phoneCode\": \"39 06 698\", \"code\": \"VA\", \"name\": \"Vatican City\", \"pattern\": \"\", \"emoji\": \"🇻🇦\" }, { \"phoneCode\": \"84\", \"code\": \"VN\", \"name\": \"Vietnam\", \"pattern\": \"\", \"emoji\": \"🇻🇳\" }, { \"phoneCode\": \"681\", \"code\": \"WF\", \"name\": \"Wallis & Futuna\", \"pattern\": \"\", \"emoji\": \"🇼🇫\" }, { \"phoneCode\": \"967\", \"code\": \"YE\", \"name\": \"Yemen\", \"pattern\": \"967 XXX XXX XXX\", \"emoji\": \"🇾🇪\" }, { \"phoneCode\": \"260\", \"code\": \"ZM\", \"name\": \"Zambia\", \"pattern\": \"260 XX XXX XXXX\", \"emoji\": \"🇿🇲\" }, { \"phoneCode\": \"255\", \"code\": \"\", \"name\": \"Zanzibar\", \"pattern\": \"\", \"emoji\": \"\" }, { \"phoneCode\": \"263\", \"code\": \"ZW\", \"name\": \"Zimbabwe\", \"pattern\": \"263 XX XXX XXXX\", \"emoji\": \"🇿🇼\" }];\r\n// From https://github.com/stephenmathieson/node-tlds/blob/master/index.js\r\nvar 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', 'nico', 'ninja', 'nl', 'no', 'np', 'nr', 'nra', 'nrw', 'ntt', 'nu', 'nyc', 'nz', 'okinawa', 'om', 'one', 'ong', 'onl', 'ooo', 'org', 'organic', 'osaka', 'otsuka', 'ovh', 'pa', 'paris', 'partners', 'parts', 'party', 'pe', 'pf', 'pg', 'ph', 'pharmacy', 'photo', 'photography', 'photos', 'physio', 'pics', 'pictures', 'pink', 'pizza', 'pk', 'pl', 'place', 'plumbing', 'pm', 'pn', 'pohl', 'poker', 'porn', 'post', 'pr', 'praxi', 'press', 'pro', 'prod', 'productions', 'prof', 'properties', 'property', 'ps', 'pt', 'pub', 'pw', 'py', 'qa', 'qpon', 'quebec', 're', 'realtor', 'recipes', 'red', 'rehab', 'reise', 'reisen', 'reit', 'ren', 'rentals', 'repair', 'report', 'republican', 'rest', 'restaurant', 'reviews', 'rich', 'rio', 'rip', 'ro', 'rocks', 'rodeo', 'rs', 'rsvp', 'ru', 'ruhr', 'rw', 'ryukyu', 'sa', 'saarland', 'sale', 'samsung', 'sarl', 'saxo', 'sb', 'sc', 'sca', 'scb', 'schmidt', 'schule', 'schwarz', 'science', 'scot', 'sd', 'se', 'services', 'sew', 'sexy', 'sg', 'sh', 'shiksha', 'shoes', 'shriram', 'si', 'singles', 'sj', 'sk', 'sky', 'sl', 'sm', 'sn', 'so', 'social', 'software', 'sohu', 'solar', 'solutions', 'soy', 'space', 'spiegel', 'sr', 'st', 'style', 'su', 'supplies', 'supply', 'support', 'surf', 'surgery', 'suzuki', 'sv', 'sx', 'sy', 'sydney', 'systems', 'sz', 'taipei', 'tatar', 'tattoo', 'tax', 'tc', 'td', 'technology', 'tel', 'temasek', 'tennis', 'tf', 'tg', 'th', 'tienda', 'tips', 'tires', 'tirol', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'today', 'tokyo', 'tools', 'top', 'toshiba', 'town', 'toys', 'tp', 'tr', 'trade', 'training', 'travel', 'trust', 'tt', 'tui', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'university', 'uno', 'uol', 'us', 'uy', 'uz', 'va', 'vacations', 'vc', 've', 'vegas', 'ventures', 'versicherung', 'vet', 'vg', 'vi', 'viajes', 'video', 'villas', 'vision', 'vlaanderen', 'vn', 'vodka', 'vote', 'voting', 'voto', 'voyage', 'vu', 'wales', 'wang', 'watch', 'webcam', 'website', 'wed', 'wedding', 'wf', 'whoswho', 'wien', 'wiki', 'williamhill', 'wme', 'work', 'works', 'world', 'ws', 'wtc', 'wtf', '佛山', '集团', '在线', '한국', 'ভারত', '八卦', 'موقع', '公益', '公司', '移动', '我爱你', 'москва', 'қаз', 'онлайн', 'сайт', 'срб', '淡马锡', 'орг', '삼성', 'சிங்கப்பூர்', '商标', '商店', '商城', 'дети', 'мкд', '中文网', '中信', '中国', '中國', '谷歌', 'భారత్', 'ලංකා', 'ભારત', 'भारत', '网店', 'संगठन', '网络', 'укр', '香港', '台湾', '台灣', '手机', 'мон', 'الجزائر', 'عمان', 'ایران', 'امارات', 'بازار', 'الاردن', 'بھارت', 'المغرب', 'السعودية', 'مليسيا', 'شبكة', 'გე', '机构', '组织机构', 'ไทย', 'سورية', 'рус', 'рф', 'تونس', 'みんな', 'グーグル', '世界', 'ਭਾਰਤ', '网址', '游戏', 'vermögensberater', 'vermögensberatung', '企业', 'مصر', 'قطر', '广东', 'இலங்கை', 'இந்தியா', '新加坡', 'فلسطين', '政务', 'xxx', 'xyz', 'yachts', 'yandex', 'ye', 'yoga', 'yokohama', 'youtube', 'yt', 'za', 'zip', 'zm', 'zone', 'zuerich', 'zw'];\r\n// From https://raw.githubusercontent.com/FGRibreau/latenize/master/latinize_map.js\r\nvar LatinizeMap = { 'Á': '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', 'Ỉ': 'I', 'Ȋ': 'I', 'Ī': 'I', 'Į': 'I', 'Ɨ': 'I', 'Ĩ': 'I', 'Ḭ': 'I', 'Ꝺ': 'D', 'Ꝼ': 'F', 'Ᵹ': 'G', 'Ꞃ': 'R', 'Ꞅ': 'S', 'Ꞇ': 'T', 'Ꝭ': 'IS', 'Ĵ': 'J', 'Ɉ': 'J', 'Ḱ': 'K', 'Ǩ': 'K', 'Ķ': 'K', 'Ⱪ': 'K', 'Ꝃ': 'K', 'Ḳ': 'K', 'Ƙ': 'K', 'Ḵ': 'K', 'Ꝁ': 'K', 'Ꝅ': 'K', 'Ĺ': 'L', 'Ƚ': 'L', 'Ľ': 'L', 'Ļ': 'L', 'Ḽ': 'L', 'Ḷ': 'L', 'Ḹ': 'L', 'Ⱡ': 'L', 'Ꝉ': 'L', 'Ḻ': 'L', 'Ŀ': 'L', 'Ɫ': 'L', 'Lj': 'L', 'Ł': 'L', 'LJ': 'LJ', 'Ḿ': 'M', 'Ṁ': 'M', 'Ṃ': 'M', 'Ɱ': 'M', 'Ń': 'N', 'Ň': 'N', 'Ņ': 'N', 'Ṋ': 'N', 'Ṅ': 'N', 'Ṇ': 'N', 'Ǹ': 'N', 'Ɲ': 'N', 'Ṉ': 'N', 'Ƞ': 'N', 'Nj': 'N', 'Ñ': 'N', 'NJ': 'NJ', 'Ó': 'O', 'Ŏ': 'O', 'Ǒ': 'O', 'Ô': 'O', 'Ố': 'O', 'Ộ': 'O', 'Ồ': 'O', 'Ổ': 'O', 'Ỗ': 'O', 'Ö': 'O', 'Ȫ': 'O', 'Ȯ': 'O', 'Ȱ': 'O', 'Ọ': 'O', 'Ő': 'O', 'Ȍ': 'O', 'Ò': 'O', 'Ỏ': 'O', 'Ơ': 'O', 'Ớ': 'O', 'Ợ': 'O', 'Ờ': 'O', 'Ở': 'O', 'Ỡ': 'O', 'Ȏ': 'O', 'Ꝋ': 'O', 'Ꝍ': 'O', 'Ō': 'O', 'Ṓ': 'O', 'Ṑ': 'O', 'Ɵ': 'O', 'Ǫ': 'O', 'Ǭ': 'O', 'Ø': 'O', 'Ǿ': 'O', 'Õ': 'O', 'Ṍ': 'O', 'Ṏ': 'O', 'Ȭ': 'O', 'Ƣ': 'OI', 'Ꝏ': 'OO', 'Ɛ': 'E', 'Ɔ': 'O', 'Ȣ': 'OU', 'Ṕ': 'P', 'Ṗ': 'P', 'Ꝓ': 'P', 'Ƥ': 'P', 'Ꝕ': 'P', 'Ᵽ': 'P', 'Ꝑ': 'P', 'Ꝙ': 'Q', 'Ꝗ': 'Q', 'Ŕ': 'R', 'Ř': 'R', 'Ŗ': 'R', 'Ṙ': 'R', 'Ṛ': 'R', 'Ṝ': 'R', 'Ȑ': 'R', 'Ȓ': 'R', 'Ṟ': 'R', 'Ɍ': 'R', 'Ɽ': 'R', 'Ꜿ': 'C', 'Ǝ': 'E', 'Ś': 'S', 'Ṥ': 'S', 'Š': 'S', 'Ṧ': 'S', 'Ş': 'S', 'Ŝ': 'S', 'Ș': 'S', 'Ṡ': 'S', 'Ṣ': 'S', 'Ṩ': 'S', 'ẞ': 'SS', 'Ť': 'T', 'Ţ': 'T', 'Ṱ': 'T', 'Ț': 'T', 'Ⱦ': 'T', 'Ṫ': 'T', 'Ṭ': 'T', 'Ƭ': 'T', 'Ṯ': 'T', 'Ʈ': 'T', 'Ŧ': 'T', 'Ɐ': 'A', 'Ꞁ': 'L', 'Ɯ': 'M', 'Ʌ': 'V', 'Ꜩ': 'TZ', 'Ú': 'U', 'Ŭ': 'U', 'Ǔ': 'U', 'Û': 'U', 'Ṷ': 'U', 'Ü': 'U', 'Ǘ': 'U', 'Ǚ': 'U', 'Ǜ': 'U', 'Ǖ': 'U', 'Ṳ': 'U', 'Ụ': 'U', 'Ű': 'U', 'Ȕ': 'U', 'Ù': 'U', 'Ủ': 'U', 'Ư': 'U', 'Ứ': 'U', 'Ự': 'U', 'Ừ': 'U', 'Ử': 'U', 'Ữ': 'U', 'Ȗ': 'U', 'Ū': 'U', 'Ṻ': 'U', 'Ų': 'U', 'Ů': 'U', 'Ũ': 'U', 'Ṹ': 'U', 'Ṵ': 'U', 'Ꝟ': 'V', 'Ṿ': 'V', 'Ʋ': 'V', 'Ṽ': 'V', 'Ꝡ': 'VY', 'Ẃ': 'W', 'Ŵ': 'W', 'Ẅ': 'W', 'Ẇ': 'W', 'Ẉ': 'W', 'Ẁ': 'W', 'Ⱳ': 'W', 'Ẍ': 'X', 'Ẋ': 'X', 'Ý': 'Y', 'Ŷ': 'Y', 'Ÿ': 'Y', 'Ẏ': 'Y', 'Ỵ': 'Y', 'Ỳ': 'Y', 'Ƴ': 'Y', 'Ỷ': 'Y', 'Ỿ': 'Y', 'Ȳ': 'Y', 'Ɏ': 'Y', 'Ỹ': 'Y', 'Ź': 'Z', 'Ž': 'Z', 'Ẑ': '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', 'ẳ': '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', 'ƀ': 'b', 'ƃ': 'b', 'ɵ': 'o', 'ć': 'c', 'č': 'c', 'ç': 'c', 'ḉ': 'c', 'ĉ': 'c', 'ɕ': 'c', 'ċ': 'c', 'ƈ': 'c', 'ȼ': 'c', 'ď': 'd', 'ḑ': 'd', 'ḓ': 'd', 'ȡ': 'd', 'ḋ': 'd', 'ḍ': 'd', 'ɗ': 'd', 'ᶑ': 'd', 'ḏ': 'd', 'ᵭ': 'd', 'ᶁ': 'd', 'đ': 'd', 'ɖ': 'd', 'ƌ': 'd', 'ı': 'i', 'ȷ': 'j', 'ɟ': 'j', 'ʄ': 'j', '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', 'ẽ': 'e', 'ḛ': 'e', 'ꝫ': 'et', 'ḟ': 'f', 'ƒ': 'f', 'ᵮ': 'f', 'ᶂ': 'f', 'ǵ': 'g', 'ğ': 'g', 'ǧ': 'g', 'ģ': 'g', 'ĝ': 'g', 'ġ': 'g', 'ɠ': 'g', 'ḡ': 'g', 'ᶃ': 'g', 'ǥ': 'g', 'ḫ': 'h', 'ȟ': 'h', 'ḩ': 'h', 'ĥ': 'h', 'ⱨ': 'h', 'ḧ': 'h', 'ḣ': 'h', 'ḥ': 'h', 'ɦ': 'h', 'ẖ': 'h', 'ħ': 'h', 'ƕ': 'hv', 'í': 'i', 'ĭ': 'i', 'ǐ': 'i', 'î': 'i', 'ï': 'i', 'ḯ': 'i', 'ị': 'i', 'ȉ': 'i', 'ì': 'i', 'ỉ': 'i', 'ȋ': 'i', 'ī': 'i', 'į': 'i', 'ᶖ': 'i', 'ɨ': 'i', 'ĩ': 'i', 'ḭ': 'i', 'ꝺ': 'd', 'ꝼ': 'f', 'ᵹ': 'g', 'ꞃ': 'r', 'ꞅ': 's', 'ꞇ': 't', 'ꝭ': 'is', 'ǰ': 'j', 'ĵ': 'j', 'ʝ': 'j', 'ɉ': 'j', 'ḱ': 'k', 'ǩ': 'k', 'ķ': 'k', 'ⱪ': 'k', 'ꝃ': 'k', 'ḳ': 'k', 'ƙ': 'k', 'ḵ': 'k', 'ᶄ': 'k', 'ꝁ': 'k', 'ꝅ': 'k', 'ĺ': 'l', 'ƚ': 'l', 'ɬ': 'l', 'ľ': 'l', 'ļ': 'l', 'ḽ': 'l', 'ȴ': 'l', 'ḷ': 'l', 'ḹ': 'l', 'ⱡ': 'l', 'ꝉ': 'l', 'ḻ': 'l', 'ŀ': 'l', 'ɫ': 'l', 'ᶅ': 'l', 'ɭ': 'l', 'ł': 'l', 'lj': 'lj', 'ſ': 's', 'ẜ': 's', 'ẛ': 's', 'ẝ': 's', 'ḿ': 'm', 'ṁ': 'm', 'ṃ': 'm', 'ɱ': 'm', 'ᵯ': 'm', 'ᶆ': 'm', 'ń': 'n', 'ň': 'n', 'ņ': 'n', 'ṋ': 'n', 'ȵ': 'n', 'ṅ': 'n', 'ṇ': 'n', 'ǹ': 'n', 'ɲ': 'n', 'ṉ': 'n', 'ƞ': 'n', 'ᵰ': 'n', 'ᶇ': 'n', 'ɳ': 'n', 'ñ': 'n', 'nj': 'nj', 'ó': 'o', 'ŏ': 'o', 'ǒ': 'o', 'ô': 'o', 'ố': 'o', 'ộ': 'o', 'ồ': 'o', 'ổ': 'o', 'ỗ': 'o', 'ö': 'o', 'ȫ': 'o', 'ȯ': 'o', 'ȱ': 'o', 'ọ': 'o', 'ő': 'o', 'ȍ': 'o', 'ò': 'o', 'ỏ': 'o', 'ơ': 'o', 'ớ': 'o', 'ợ': 'o', 'ờ': 'o', 'ở': 'o', 'ỡ': 'o', 'ȏ': 'o', 'ꝋ': 'o', 'ꝍ': 'o', 'ⱺ': 'o', 'ō': 'o', 'ṓ': 'o', 'ṑ': 'o', 'ǫ': 'o', 'ǭ': 'o', 'ø': 'o', 'ǿ': 'o', 'õ': 'o', 'ṍ': 'o', 'ṏ': 'o', 'ȭ': 'o', 'ƣ': 'oi', 'ꝏ': 'oo', 'ɛ': 'e', 'ᶓ': 'e', 'ɔ': 'o', 'ᶗ': 'o', 'ȣ': 'ou', 'ṕ': 'p', 'ṗ': 'p', 'ꝓ': 'p', 'ƥ': 'p', 'ᵱ': 'p', 'ᶈ': 'p', 'ꝕ': 'p', 'ᵽ': 'p', 'ꝑ': 'p', 'ꝙ': 'q', 'ʠ': 'q', 'ɋ': 'q', 'ꝗ': 'q', 'ŕ': 'r', 'ř': 'r', 'ŗ': 'r', 'ṙ': 'r', 'ṛ': 'r', 'ṝ': 'r', 'ȑ': 'r', 'ɾ': 'r', 'ᵳ': 'r', 'ȓ': 'r', 'ṟ': 'r', 'ɼ': 'r', 'ᵲ': 'r', 'ᶉ': 'r', 'ɍ': 'r', 'ɽ': 'r', 'ↄ': 'c', 'ꜿ': 'c', 'ɘ': 'e', 'ɿ': 'r', 'ś': 's', 'ṥ': 's', 'š': 's', 'ṧ': 's', 'ş': 's', 'ŝ': 's', 'ș': 's', 'ṡ': 's', 'ṣ': 's', 'ṩ': 's', 'ʂ': 's', 'ᵴ': 's', 'ᶊ': 's', 'ȿ': 's', 'ɡ': 'g', 'ß': 'ss', 'ᴑ': 'o', 'ᴓ': 'o', 'ᴝ': 'u', 'ť': 't', 'ţ': 't', 'ṱ': 't', 'ț': 't', 'ȶ': 't', 'ẗ': 't', 'ⱦ': 't', 'ṫ': 't', 'ṭ': 't', 'ƭ': 't', 'ṯ': 't', 'ᵵ': 't', 'ƫ': 't', 'ʈ': 't', 'ŧ': 't', 'ᵺ': 'th', 'ɐ': 'a', 'ᴂ': 'ae', 'ǝ': 'e', 'ᵷ': 'g', 'ɥ': 'h', 'ʮ': 'h', 'ʯ': 'h', 'ᴉ': 'i', 'ʞ': 'k', 'ꞁ': 'l', 'ɯ': 'm', 'ɰ': 'm', 'ᴔ': 'oe', 'ɹ': 'r', 'ɻ': 'r', 'ɺ': 'r', 'ⱹ': 'r', 'ʇ': 't', 'ʌ': 'v', 'ʍ': 'w', 'ʎ': 'y', 'ꜩ': 'tz', 'ú': 'u', 'ŭ': 'u', 'ǔ': 'u', 'û': 'u', 'ṷ': 'u', 'ü': 'u', 'ǘ': 'u', 'ǚ': 'u', 'ǜ': 'u', 'ǖ': 'u', 'ṳ': 'u', 'ụ': 'u', 'ű': 'u', 'ȕ': 'u', 'ù': 'u', 'ủ': 'u', 'ư': 'u', 'ứ': 'u', 'ự': 'u', 'ừ': 'u', 'ử': 'u', 'ữ': 'u', 'ȗ': 'u', 'ū': 'u', 'ṻ': 'u', 'ų': 'u', 'ᶙ': 'u', 'ů': 'u', 'ũ': 'u', 'ṹ': 'u', 'ṵ': 'u', 'ᵫ': 'ue', 'ꝸ': 'um', 'ⱴ': 'v', 'ꝟ': 'v', 'ṿ': 'v', 'ʋ': 'v', 'ᶌ': 'v', 'ⱱ': 'v', 'ṽ': 'v', 'ꝡ': 'vy', 'ẃ': 'w', 'ŵ': 'w', 'ẅ': 'w', 'ẇ': 'w', 'ẉ': 'w', 'ẁ': 'w', 'ⱳ': 'w', 'ẘ': 'w', 'ẍ': 'x', 'ẋ': 'x', 'ᶍ': 'x', 'ý': 'y', 'ŷ': 'y', 'ÿ': 'y', 'ẏ': 'y', 'ỵ': 'y', 'ỳ': 'y', 'ƴ': 'y', 'ỷ': 'y', 'ỿ': 'y', 'ȳ': 'y', 'ẙ': 'y', 'ɏ': 'y', 'ỹ': 'y', 'ź': 'z', 'ž': 'z', 'ẑ': 'z', 'ʑ': 'z', 'ⱬ': 'z', 'ż': 'z', 'ẓ': 'z', 'ȥ': 'z', 'ẕ': 'z', 'ᵶ': 'z', 'ᶎ': 'z', 'ʐ': 'z', 'ƶ': 'z', 'ɀ': 'z', 'ff': 'ff', 'ffi': 'ffi', 'ffl': 'ffl', 'fi': 'fi', 'fl': 'fl', 'ij': 'ij', 'œ': 'oe', 'st': 'st', 'ₐ': 'a', 'ₑ': 'e', 'ᵢ': 'i', 'ⱼ': 'j', 'ₒ': 'o', 'ᵣ': 'r', 'ᵤ': 'u', 'ᵥ': 'v', 'ₓ': 'x', 'Ё': 'YO', 'Й': 'I', 'Ц': 'TS', 'У': 'U', 'К': 'K', 'Е': 'E', 'Н': 'N', 'Г': 'G', 'Ш': 'SH', 'Щ': 'SCH', 'З': 'Z', 'Х': 'H', 'Ъ': '', 'ё': 'yo', 'й': 'i', 'ц': 'ts', 'у': 'u', 'к': 'k', 'е': 'e', 'н': 'n', 'г': 'g', 'ш': 'sh', 'щ': 'sch', 'з': 'z', 'х': 'h', 'ъ': '', 'Ф': 'F', 'Ы': 'I', 'В': 'V', 'А': 'A', 'П': 'P', 'Р': 'R', 'О': 'O', 'Л': 'L', 'Д': 'D', 'Ж': 'ZH', 'Э': 'E', 'ф': 'f', 'ы': 'i', 'в': 'v', 'а': 'a', 'п': 'p', 'р': 'r', 'о': 'o', 'л': 'l', 'д': 'd', 'ж': 'zh', 'э': 'e', 'Я': 'Ya', 'Ч': 'CH', 'С': 'S', 'М': 'M', 'И': 'I', 'Т': 'T', 'Ь': '', 'Б': 'B', 'Ю': 'YU', 'я': 'ya', 'ч': 'ch', 'с': 's', 'м': 'm', 'и': 'i', 'т': 't', 'ь': '', 'б': 'b', 'ю': 'yu' };\r\nconst Config = {\r\n Emoji,\r\n LatinizeMap,\r\n TLD,\r\n Countries\r\n};\r\nwindow.Config = Config;\r\nexports.default = Config;\r\n" }, { "id": 18, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDocsManager.ts", - "name": "./src/lib/appManagers/appDocsManager.ts", - "index": 66, - "index2": 59, - "size": 10109, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\page.ts", + "name": "./src/pages/page.ts", + "index": 36, + "index2": 33, + "size": 1928, "cacheable": true, "built": true, "optional": false, @@ -3376,44 +3325,34 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "issuerId": 35, + "issuerName": "./src/pages/pageSignIn.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "dependencies": 1062 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 527, + "building": 1006, + "dependencies": 2 }, "failed": false, "errors": 0, @@ -3421,49 +3360,49 @@ "assets": [], "reasons": [ { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "moduleId": 23, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "module": "./src/pages/pageIm.ts", + "moduleName": "./src/pages/pageIm.ts", "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "28:41-68" + "userRequest": "./page", + "loc": "15:31-48" }, { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", "type": "cjs require", - "userRequest": "../lib/appManagers/appDocsManager", - "loc": "19:41-85" + "userRequest": "./page", + "loc": "14:31-48" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 62, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "module": "./src/pages/pageAuthCode.ts", + "moduleName": "./src/pages/pageAuthCode.ts", "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "15:41-68" + "userRequest": "./page", + "loc": "14:31-48" }, { - "moduleId": 49, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appWebPagesManager.ts", - "module": "./src/lib/appManagers/appWebPagesManager.ts", - "moduleName": "./src/lib/appManagers/appWebPagesManager.ts", + "moduleId": 63, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "module": "./src/pages/pageSignUp.ts", + "moduleName": "./src/pages/pageSignUp.ts", "type": "cjs require", - "userRequest": "./appDocsManager", - "loc": "8:41-68" + "userRequest": "./page", + "loc": "12:31-48" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 74, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagePassword.ts", + "module": "./src/pages/pagePassword.ts", + "moduleName": "./src/pages/pagePassword.ts", "type": "cjs require", - "userRequest": "./appManagers/appDocsManager", - "loc": "18:41-80" + "userRequest": "./page", + "loc": "13:31-48" } ], "usedExports": true, @@ -3471,16 +3410,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\n//import { MTDocument } from '../../components/misc';\nclass AppDocsManager {\n constructor() {\n this.docs = {};\n }\n saveDoc(apiDoc, context) {\n this.docs[apiDoc.id] = apiDoc;\n if (context) {\n Object.assign(apiDoc, context);\n }\n if (apiDoc.thumb && apiDoc.thumb._ == 'photoCachedSize') {\n apiFileManager_1.default.saveSmallFile(apiDoc.thumb.location, apiDoc.thumb.bytes);\n // Memory\n apiDoc.thumb.size = apiDoc.thumb.bytes.length;\n delete apiDoc.thumb.bytes;\n apiDoc.thumb._ = 'photoSize';\n }\n if (apiDoc.thumb && apiDoc.thumb._ == 'photoSizeEmpty') {\n delete apiDoc.thumb;\n }\n apiDoc.attributes.forEach((attribute) => {\n switch (attribute._) {\n case 'documentAttributeFilename':\n apiDoc.file_name = richtextprocessor_1.RichTextProcessor.wrapPlainText(attribute.file_name);\n break;\n case 'documentAttributeAudio':\n apiDoc.duration = attribute.duration;\n apiDoc.audioTitle = attribute.title;\n apiDoc.audioPerformer = attribute.performer;\n apiDoc.type = attribute.pFlags.voice ? 'voice' : 'audio';\n break;\n case 'documentAttributeVideo':\n apiDoc.duration = attribute.duration;\n apiDoc.w = attribute.w;\n apiDoc.h = attribute.h;\n if (apiDoc.thumbs && attribute.pFlags.round_message) {\n apiDoc.type = 'round';\n }\n else if (apiDoc.thumbs) {\n apiDoc.type = 'video';\n }\n break;\n case 'documentAttributeSticker':\n apiDoc.sticker = true;\n if (attribute.alt !== undefined) {\n apiDoc.stickerEmojiRaw = attribute.alt;\n apiDoc.stickerEmoji = richtextprocessor_1.RichTextProcessor.wrapRichText(apiDoc.stickerEmojiRaw, { noLinks: true, noLinebreaks: true });\n }\n if (attribute.stickerset) {\n if (attribute.stickerset._ == 'inputStickerSetEmpty') {\n delete attribute.stickerset;\n }\n else if (attribute.stickerset._ == 'inputStickerSetID') {\n apiDoc.stickerSetInput = attribute.stickerset;\n }\n }\n if (apiDoc.thumbs && apiDoc.mime_type == 'image/webp') {\n apiDoc.type = 'sticker';\n }\n else if (apiDoc.mime_type == 'application/x-tgsticker') {\n apiDoc.type = 'sticker';\n apiDoc.animated = true;\n }\n break;\n case 'documentAttributeImageSize':\n apiDoc.w = attribute.w;\n apiDoc.h = attribute.h;\n break;\n case 'documentAttributeAnimated':\n if ((apiDoc.mime_type == 'image/gif' || apiDoc.mime_type == 'video/mp4') && apiDoc.thumbs) {\n apiDoc.type = 'gif';\n }\n apiDoc.animated = true;\n break;\n }\n });\n if (!apiDoc.mime_type) {\n switch (apiDoc.type) {\n case 'gif':\n apiDoc.mime_type = 'video/mp4';\n break;\n case 'video':\n case 'round':\n apiDoc.mime_type = 'video/mp4';\n break;\n case 'sticker':\n apiDoc.mime_type = 'image/webp';\n break;\n case 'audio':\n apiDoc.mime_type = 'audio/mpeg';\n break;\n case 'voice':\n apiDoc.mime_type = 'audio/ogg';\n break;\n default:\n apiDoc.mime_type = 'application/octet-stream';\n break;\n }\n }\n if (!apiDoc.file_name) {\n apiDoc.file_name = '';\n }\n if (apiDoc._ == 'documentEmpty') {\n apiDoc.size = 0;\n }\n }\n getDoc(docID) {\n return this.docs[docID] || { _: 'documentEmpty' };\n }\n hasDoc(docID) {\n return this.docs[docID] !== undefined;\n }\n getFileName(doc) {\n if (doc.file_name) {\n return doc.file_name;\n }\n var fileExt = '.' + doc.mime_type.split('/')[1];\n if (fileExt == '.octet-stream') {\n fileExt = '';\n }\n return 't_' + (doc.type || 'file') + doc.id + fileExt;\n }\n updateDocDownloaded(docID) {\n var doc = this.docs[docID];\n var inputFileLocation = {\n _: 'inputDocumentFileLocation',\n id: docID,\n access_hash: doc.access_hash,\n version: doc.version,\n file_name: this.getFileName(doc)\n };\n if (doc.downloaded === undefined) {\n apiFileManager_1.default.getDownloadedFile(inputFileLocation, doc.size).then(() => {\n doc.downloaded = true;\n }, () => {\n doc.downloaded = false;\n });\n }\n }\n downloadDoc(docID, toFileEntry) {\n let doc;\n if (typeof (docID) === 'string') {\n doc = this.docs[docID];\n }\n else {\n doc = docID;\n }\n var inputFileLocation = {\n _: 'inputDocumentFileLocation',\n id: doc.id,\n access_hash: doc.access_hash,\n file_reference: doc.file_reference,\n thumb_size: '',\n version: doc.version,\n file_name: this.getFileName(doc)\n };\n if (doc._ == 'documentEmpty') {\n return Promise.reject();\n }\n if (doc.downloaded && !toFileEntry) {\n var cachedBlob = apiFileManager_1.default.getCachedFile(inputFileLocation);\n if (cachedBlob) {\n return Promise.resolve(cachedBlob);\n }\n }\n //historyDoc.progress = {enabled: !historyDoc.downloaded, percent: 1, total: doc.size};\n // нет смысла делать объект с выполняющимися промисами, нижняя строка и так вернёт загружающийся\n var downloadPromise = apiFileManager_1.default.downloadFile(doc.dc_id, inputFileLocation, doc.size, {\n mimeType: doc.mime_type || 'application/octet-stream',\n toFileEntry: toFileEntry\n });\n downloadPromise.then((blob) => {\n if (blob) {\n doc.downloaded = true;\n /* FileManager.getFileCorrectUrl(blob, doc.mime_type).then((url) => {\n doc.url = url;\n }); */\n }\n /* doc.progress.percent = 100;\n setTimeout(() => {\n delete doc.progress;\n }, 0); */\n // console.log('file save done')\n return blob;\n }, (e) => {\n console.log('document download failed', e);\n //historyDoc.progress.enabled = false;\n });\n /* downloadPromise.notify = (progress) => {\n console.log('dl progress', progress);\n historyDoc.progress.enabled = true;\n historyDoc.progress.done = progress.done;\n historyDoc.progress.percent = Math.max(1, Math.floor(100 * progress.done / progress.total));\n $rootScope.$broadcast('history_update');\n }; */\n //historyDoc.progress.cancel = downloadPromise.cancel;\n //console.log('return downloadPromise:', downloadPromise);\n return downloadPromise;\n }\n saveDocFile(docID) {\n return __awaiter(this, void 0, void 0, function* () {\n var doc = this.docs[docID];\n var fileName = this.getFileName(doc);\n var ext = (fileName.split('.', 2) || [])[1] || '';\n try {\n let writer = filemanager_1.default.chooseSaveFile(fileName, ext, doc.mime_type, doc.size);\n yield writer.ready;\n let promise = this.downloadDoc(docID, writer);\n promise.then(() => {\n writer.close();\n console.log('saved doc', doc);\n });\n //console.log('got promise from downloadDoc', promise);\n return { promise };\n }\n catch (err) {\n let promise = this.downloadDoc(docID);\n promise.then((blob) => {\n filemanager_1.default.download(blob, doc.mime_type, fileName);\n });\n return { promise };\n }\n });\n }\n}\nexports.default = new AppDocsManager();\n" + "depth": 2, + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst pagesManager_1 = __importDefault(require(\"./pagesManager\"));\r\nclass Page {\r\n constructor(className, isAuthPage, onFirstMount, onMount) {\r\n this.isAuthPage = isAuthPage;\r\n this.onFirstMount = onFirstMount;\r\n this.onMount = onMount;\r\n this.installed = false;\r\n this.pageEl = document.body.getElementsByClassName(className)[0];\r\n }\r\n mount(...args) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n //this.pageEl.style.display = '';\r\n if (this.onMount) {\r\n this.onMount(...args);\r\n }\r\n if (!this.installed) {\r\n if (this.onFirstMount) {\r\n let res = this.onFirstMount(...args);\r\n if (res instanceof Promise) {\r\n yield res;\r\n }\r\n }\r\n this.installed = true;\r\n }\r\n pagesManager_1.default.setPage(this);\r\n });\r\n }\r\n}\r\nexports.default = Page;\r\n" }, { "id": 19, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "index": 67, - "index2": 74, - "size": 97445, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesIDsManager.ts", + "name": "./src/lib/appManagers/appMessagesIDsManager.ts", + "index": 47, + "index2": 40, + "size": 2106, "cacheable": true, "built": true, "optional": false, @@ -3488,44 +3427,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "name": "./src/lib/services.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -3533,49 +3472,49 @@ "assets": [], "reasons": [ { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./appImManager", - "loc": "29:39-64" + "userRequest": "./appMessagesIDsManager", + "loc": "22:48-82" }, { - "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./appImManager", - "loc": "22:39-64" + "userRequest": "./appMessagesIDsManager", + "loc": "16:48-82" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "./appImManager", - "loc": "18:39-64" + "userRequest": "./appMessagesIDsManager", + "loc": "16:48-82" }, { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 41, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "module": "./src/components/appSearch.ts", + "moduleName": "./src/components/appSearch.ts", "type": "cjs require", - "userRequest": "./appImManager", - "loc": "16:39-64" + "userRequest": "../lib/appManagers/appMessagesIDsManager", + "loc": "8:48-99" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "module": "./src/lib/services.ts", "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "./appManagers/appImManager", - "loc": "15:39-76" + "userRequest": "./appManagers/appMessagesIDsManager", + "loc": "9:48-94" } ], "usedExports": true, @@ -3584,15 +3523,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst apiManager_1 = __importDefault(require(\"../mtproto/apiManager\"));\nconst utils_1 = require(\"../utils\");\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\n//import { ProgressivePreloader, wrapDocument, wrapSticker, wrapVideo, wrapPhoto, openBtnMenu, LazyLoadQueue } from \"../../components/misc\";\nconst appDialogsManager_1 = __importDefault(require(\"./appDialogsManager\"));\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\nconst appSidebarRight_1 = __importDefault(require(\"./appSidebarRight\"));\nconst scrollable_1 = __importDefault(require(\"../../components/scrollable\"));\nconst polyfill_1 = require(\"../polyfill\");\nconst lottieLoader_1 = __importDefault(require(\"../lottieLoader\"));\nconst appMediaViewer_1 = __importDefault(require(\"./appMediaViewer\"));\nconst appSidebarLeft_1 = __importDefault(require(\"./appSidebarLeft\"));\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\nconst emoticonsDropdown_1 = __importStar(require(\"../../components/emoticonsDropdown\"));\nconst wrappers_1 = require(\"../../components/wrappers\");\nconst preloader_1 = __importDefault(require(\"../../components/preloader\"));\nconst misc_1 = require(\"../../components/misc\");\nconst appWebPagesManager_1 = __importDefault(require(\"./appWebPagesManager\"));\nconsole.log('appImManager included!');\nlet testScroll = false;\nclass ScrollPosition {\n constructor(node) {\n this.node = node;\n this.previousScrollHeightMinusTop = 0;\n this.readyFor = 'up';\n this.container = node.parentElement;\n }\n /* public restore() {\n if(!this.scroll) return;\n //console.log('restore', this.readyFor, this.previousScrollHeightMinusTop);\n \n //if(this.readyFor === 'up') {\n this.scroll.update(true);\n \n //console.log('restore 2', this.node.scrollHeight, (this.node.scrollHeight\n //- this.previousScrollHeightMinusTop) + 'px')\n \n this.scroll.scroll({y: (this.node.scrollHeight\n - this.previousScrollHeightMinusTop) + 'px'});\n //}\n \n // 'down' doesn't need to be special cased unless the\n // content was flowing upwards, which would only happen\n // if the container is position: absolute, bottom: 0 for\n // a Facebook messages effect\n }\n \n public prepareFor(direction: string) {\n if(!this.scroll) return;\n \n this.readyFor = direction || 'up';\n \n this.scroll.update(true);\n let pos = this.scroll.scroll();\n this.previousScrollHeightMinusTop = this.node.scrollHeight\n - pos.position.y;\n } */\n restore() {\n //console.log('scrollPosition restore 2', this.node.scrollHeight, (this.node.scrollHeight\n //- this.previousScrollHeightMinusTop) + 'px', this.container);\n if (this.readyFor === 'up' || appImManager.scroll.parentElement.classList.contains('scrolled-down')) {\n this.container.scrollTop = this.node.scrollHeight\n - this.previousScrollHeightMinusTop;\n }\n // 'down' doesn't need to be special cased unless the\n // content was flowing upwards, which would only happen\n // if the container is position: absolute, bottom: 0 for\n // a Facebook messages effect\n }\n prepareFor(direction) {\n this.readyFor = direction || 'up';\n this.previousScrollHeightMinusTop = this.node.scrollHeight\n - this.container.scrollTop;\n //console.log('scrollPosition prepareFor', direction, this.node.scrollHeight, this.previousScrollHeightMinusTop + 'px')\n }\n}\nclass ChatInput {\n constructor() {\n this.pageEl = document.querySelector('.page-chats');\n this.messageInput = document.getElementById('input-message') /* HTMLInputElement */;\n this.fileInput = document.getElementById('input-file');\n this.inputMessageContainer = document.getElementsByClassName('input-message-container')[0];\n this.inputScroll = new scrollable_1.default(this.inputMessageContainer);\n this.btnSend = document.getElementById('btn-send');\n this.emoticonsDropdown = null;\n this.emoticonsTimeout = 0;\n this.emoticonsLazyLoadQueue = null;\n this.lastUrl = '';\n this.lastTimeType = 0;\n this.attachMenu = {};\n this.attachMediaPopUp = {};\n this.replyElements = {};\n this.willSendWebPage = null;\n this.replyToMsgID = 0;\n this.editMsgID = 0;\n this.noWebPage = false;\n this.toggleEmoticons = this.pageEl.querySelector('.toggle-emoticons');\n this.attachMenu.container = document.getElementById('attach-file');\n this.attachMenu.media = this.attachMenu.container.querySelector('.menu-media');\n this.attachMenu.document = this.attachMenu.container.querySelector('.menu-document');\n this.attachMenu.poll = this.attachMenu.container.querySelector('.menu-poll');\n this.attachMediaPopUp.container = this.pageEl.querySelector('.popup-send-photo');\n this.attachMediaPopUp.titleEl = this.attachMediaPopUp.container.querySelector('.popup-title');\n this.attachMediaPopUp.sendBtn = this.attachMediaPopUp.container.querySelector('.btn-primary');\n this.attachMediaPopUp.mediaContainer = this.attachMediaPopUp.container.querySelector('.popup-photo');\n this.attachMediaPopUp.captionInput = this.attachMediaPopUp.container.querySelector('input');\n this.replyElements.container = this.pageEl.querySelector('.reply-wrapper');\n this.replyElements.cancelBtn = this.replyElements.container.querySelector('.reply-cancel');\n this.replyElements.titleEl = this.replyElements.container.querySelector('.reply-title');\n this.replyElements.subtitleEl = this.replyElements.container.querySelector('.reply-subtitle');\n this.messageInput.addEventListener('keydown', (e) => {\n if (e.key == 'Enter') {\n /* if(e.ctrlKey || e.metaKey) {\n this.messageInput.innerHTML += '
';\n placeCaretAtEnd(this.message)\n return;\n } */\n if (e.shiftKey || e.ctrlKey || e.metaKey) {\n return;\n }\n this.sendMessage();\n }\n });\n this.messageInput.addEventListener('input', (e) => {\n //console.log('messageInput input', this.messageInput.innerText, this.serializeNodes(Array.from(this.messageInput.childNodes)));\n let value = this.messageInput.innerText;\n let entities = richtextprocessor_1.RichTextProcessor.parseEntities(value);\n //console.log('messageInput entities', entities);\n let entityUrl = entities.find(e => e._ == 'messageEntityUrl');\n if (entityUrl) { // need to get webpage\n let url = value.slice(entityUrl.offset, entityUrl.offset + entityUrl.length);\n //console.log('messageInput url:', url);\n if (this.lastUrl != url) {\n this.lastUrl = url;\n this.willSendWebPage = null;\n apiManager_1.default.invokeApi('messages.getWebPage', {\n url: url,\n hash: 0\n }).then((webpage) => {\n appWebPagesManager_1.default.saveWebPage(webpage);\n if (this.lastUrl != url)\n return;\n console.log('got webpage: ', webpage);\n this.setTopInfo(webpage.site_name || webpage.title, webpage.description || webpage.url);\n this.replyToMsgID = 0;\n this.noWebPage = false;\n this.willSendWebPage = webpage;\n });\n }\n }\n if (!value.trim() && !this.serializeNodes(Array.from(this.messageInput.childNodes)).trim()) {\n this.messageInput.innerHTML = '';\n this.btnSend.classList.remove('tgico-send');\n this.btnSend.classList.add('tgico-microphone2');\n appImManager.setTyping('sendMessageCancelAction');\n }\n else if (!this.btnSend.classList.contains('tgico-send')) {\n this.btnSend.classList.add('tgico-send');\n this.btnSend.classList.remove('tgico-microphone2');\n let time = Date.now();\n if (time - this.lastTimeType >= 6000) {\n this.lastTimeType = time;\n appImManager.setTyping('sendMessageTypingAction');\n }\n }\n });\n if (!richtextprocessor_1.RichTextProcessor.emojiSupported) {\n this.messageInput.addEventListener('copy', (e) => {\n const selection = document.getSelection();\n let range = selection.getRangeAt(0);\n let ancestorContainer = range.commonAncestorContainer;\n let str = '';\n let selectedNodes = Array.from(ancestorContainer.childNodes).slice(range.startOffset, range.endOffset);\n if (selectedNodes.length) {\n str = this.serializeNodes(selectedNodes);\n }\n else {\n str = selection.toString();\n }\n //console.log('messageInput copy', str, ancestorContainer.childNodes, range);\n //let str = getRichValueWithCaret(this.messageInput);\n //console.log('messageInput childNode copy:', str);\n // @ts-ignore\n event.clipboardData.setData('text/plain', str);\n event.preventDefault();\n });\n }\n this.messageInput.addEventListener('paste', (e) => {\n //console.log('messageInput paste');\n e.preventDefault();\n // @ts-ignore\n let text = (e.originalEvent || e).clipboardData.getData('text/plain');\n // console.log('messageInput paste', text);\n text = richtextprocessor_1.RichTextProcessor.wrapEmojiText(text);\n // console.log('messageInput paste after', text);\n // @ts-ignore\n //let html = (e.originalEvent || e).clipboardData.getData('text/html');\n // @ts-ignore\n //console.log('paste text', text, );\n window.document.execCommand('insertHTML', false, text);\n });\n let attachFile = (file) => {\n console.log('selected file:', file, typeof (file));\n willAttachFile = file;\n this.fileInput.value = '';\n this.attachMediaPopUp.captionInput.value = '';\n this.attachMediaPopUp.mediaContainer.innerHTML = '';\n this.attachMediaPopUp.mediaContainer.style.width = '';\n this.attachMediaPopUp.mediaContainer.style.height = '';\n this.attachMediaPopUp.mediaContainer.classList.remove('is-document');\n if (file.type.indexOf('video/') === 0) {\n willAttach = 'document';\n }\n else if (file.type.indexOf('image/') === -1 && willAttach == 'media') {\n willAttach = 'document';\n }\n switch (willAttach) {\n case 'media': {\n let img = new Image();\n img.src = URL.createObjectURL(file);\n img.onload = () => {\n willAttachWidth = img.naturalWidth;\n willAttachHeight = img.naturalHeight;\n let { w, h } = utils_1.calcImageInBox(willAttachWidth, willAttachHeight, 378, 256);\n this.attachMediaPopUp.mediaContainer.style.width = w + 'px';\n this.attachMediaPopUp.mediaContainer.style.height = h + 'px';\n this.attachMediaPopUp.mediaContainer.append(img);\n };\n this.attachMediaPopUp.titleEl.innerText = 'Send Photo';\n this.attachMediaPopUp.container.classList.add('active');\n break;\n }\n case 'document': {\n let docDiv = wrappers_1.wrapDocument({\n file: file,\n file_name: file.name || '',\n size: file.size,\n type: ['image/jpeg',\n 'image/png',\n 'image/gif',\n 'image/webp',\n 'image/bmp'].indexOf(file.type) !== -1 ? 'photo' : 'doc'\n }, false, true);\n this.attachMediaPopUp.titleEl.innerText = 'Send File';\n this.attachMediaPopUp.mediaContainer.append(docDiv);\n this.attachMediaPopUp.mediaContainer.classList.add('is-document');\n this.attachMediaPopUp.container.classList.add('active');\n break;\n }\n }\n };\n let willAttach = '';\n let willAttachFile = null;\n let willAttachWidth = 0, willAttachHeight = 0;\n this.fileInput.addEventListener('change', (e) => {\n var file = e.target.files[0];\n if (!file) {\n return;\n }\n attachFile(file);\n }, false);\n this.attachMenu.media.addEventListener('click', () => {\n willAttach = 'media';\n this.fileInput.click();\n });\n this.attachMenu.document.addEventListener('click', () => {\n willAttach = 'document';\n this.fileInput.click();\n });\n document.addEventListener('paste', (event) => {\n if (!appImManager.peerID || this.attachMediaPopUp.container.classList.contains('active')) {\n return;\n }\n //console.log('document paste');\n // @ts-ignore\n var items = (event.clipboardData || event.originalEvent.clipboardData).items;\n //console.log('item', event.clipboardData.getData());\n for (let i = 0; i < items.length; ++i) {\n if (items[i].kind == 'file') {\n event.preventDefault();\n event.cancelBubble = true;\n event.stopPropagation();\n let file = items[i].getAsFile();\n //console.log(items[i], file);\n if (!file)\n continue;\n willAttach = file.type.indexOf('image/') === 0 ? 'media' : \"document\";\n attachFile(file);\n }\n }\n }, true);\n this.attachMediaPopUp.sendBtn.addEventListener('click', () => {\n this.attachMediaPopUp.container.classList.remove('active');\n let caption = this.attachMediaPopUp.captionInput.value;\n appMessagesManager_1.default.sendFile(appImManager.peerID, willAttachFile, {\n isMedia: true,\n caption,\n width: willAttachWidth,\n height: willAttachHeight\n });\n appImManager.scroll.scrollTop = appImManager.scroll.scrollHeight;\n let dialog = appMessagesManager_1.default.getDialogByPeerID(appImManager.peerID)[0];\n if (dialog && dialog.top_message) {\n appMessagesManager_1.default.readHistory(appImManager.peerID, dialog.top_message); // lol\n }\n });\n this.btnSend.addEventListener('click', () => {\n if (this.btnSend.classList.contains('tgico-send')) {\n this.sendMessage();\n }\n });\n this.toggleEmoticons.onmouseover = (e) => {\n clearTimeout(this.emoticonsTimeout);\n this.emoticonsTimeout = setTimeout(() => {\n if (!this.emoticonsDropdown) {\n let res = emoticonsDropdown_1.default(this.pageEl, appImManager, appMessagesManager_1.default, this.messageInput, this.toggleEmoticons, this.btnSend);\n this.emoticonsDropdown = res.dropdown;\n this.emoticonsLazyLoadQueue = res.lazyLoadQueue;\n this.toggleEmoticons.onmouseout = this.emoticonsDropdown.onmouseout = (e) => {\n clearTimeout(this.emoticonsTimeout);\n this.emoticonsTimeout = setTimeout(() => {\n this.emoticonsDropdown.classList.remove('active');\n this.toggleEmoticons.classList.remove('active');\n lottieLoader_1.default.checkAnimations(true, emoticonsDropdown_1.EMOTICONSSTICKERGROUP);\n }, 200);\n };\n this.emoticonsDropdown.onmouseover = (e) => {\n clearTimeout(this.emoticonsTimeout);\n };\n }\n else {\n this.emoticonsDropdown.classList.add('active');\n this.emoticonsLazyLoadQueue.check();\n }\n this.toggleEmoticons.classList.add('active');\n lottieLoader_1.default.checkAnimations(false, emoticonsDropdown_1.EMOTICONSSTICKERGROUP);\n }, 0 /* 200 */);\n };\n this.replyElements.cancelBtn.addEventListener('click', () => {\n this.replyElements.container.classList.remove('active');\n this.replyToMsgID = 0;\n if (this.editMsgID) {\n if (this.willSendWebPage) {\n let message = appMessagesManager_1.default.getMessage(this.editMsgID);\n this.setTopInfo('Editing', message.message);\n }\n else {\n this.editMsgID = 0;\n this.messageInput.innerHTML = '';\n this.btnSend.classList.remove('tgico-send');\n this.btnSend.classList.add('tgico-microphone2');\n }\n }\n this.noWebPage = true;\n this.willSendWebPage = null;\n });\n }\n serializeNodes(nodes) {\n return nodes.reduce((str, child) => {\n //console.log('childNode', str, child, typeof(child), typeof(child) === 'string', child.innerText);\n if (typeof (child) === 'object' && child.textContent)\n return str += child.textContent;\n if (child.innerText)\n return str += child.innerText;\n if (child.tagName == 'IMG' && child.classList && child.classList.contains('emoji'))\n return str += child.getAttribute('alt');\n return str;\n }, '');\n }\n ;\n sendMessage() {\n //let str = this.serializeNodes(Array.from(this.messageInput.childNodes));\n let str = utils_1.getRichValue(this.messageInput);\n //console.log('childnode str after:', str/* , getRichValue(this.messageInput) */);\n //return;\n this.lastUrl = '';\n if (this.editMsgID) {\n appMessagesManager_1.default.editMessage(this.editMsgID, str, {\n noWebPage: this.noWebPage\n });\n }\n else {\n appMessagesManager_1.default.sendText(appImManager.peerID, str, {\n replyToMsgID: this.replyToMsgID == 0 ? undefined : this.replyToMsgID,\n noWebPage: this.noWebPage,\n webPage: this.willSendWebPage\n });\n appImManager.scroll.scrollTop = appImManager.scroll.scrollHeight;\n }\n let dialog = appMessagesManager_1.default.getDialogByPeerID(appImManager.peerID)[0];\n if (dialog && dialog.top_message) {\n appMessagesManager_1.default.readHistory(appImManager.peerID, dialog.top_message); // lol\n }\n this.editMsgID = 0;\n this.replyToMsgID = 0;\n this.noWebPage = false;\n this.replyElements.container.classList.remove('active');\n this.willSendWebPage = null;\n this.messageInput.innerText = '';\n this.btnSend.classList.remove('tgico-send');\n this.btnSend.classList.add('tgico-microphone2');\n }\n ;\n setTopInfo(title, subtitle, input, media) {\n //appImManager.scrollPosition.prepareFor('down');\n if (this.replyElements.container.lastElementChild.tagName == 'DIV') {\n this.replyElements.container.lastElementChild.remove();\n this.replyElements.container.append(wrappers_1.wrapReply(title, subtitle, media));\n }\n //this.replyElements.titleEl.innerHTML = title ? RichTextProcessor.wrapEmojiText(title) : '';\n //this.replyElements.subtitleEl.innerHTML = subtitle ? RichTextProcessor.wrapEmojiText(subtitle) : '';\n this.replyElements.container.classList.add('active');\n if (input !== undefined) {\n this.messageInput.innerHTML = input ? richtextprocessor_1.RichTextProcessor.wrapRichText(input) : '';\n this.btnSend.classList.remove('tgico-microphone2');\n this.btnSend.classList.add('tgico-send');\n }\n //appImManager.scrollPosition.restore();\n }\n}\nclass AppImManager {\n constructor() {\n this.pageEl = document.querySelector('.page-chats');\n this.btnMute = this.pageEl.querySelector('.tool-mute');\n this.btnMenuMute = this.pageEl.querySelector('.menu-mute');\n this.avatarEl = document.getElementById('im-avatar');\n this.titleEl = document.getElementById('im-title');\n this.subtitleEl = document.getElementById('im-subtitle');\n this.chatInner = document.getElementById('bubbles-inner');\n this.searchBtn = this.pageEl.querySelector('.chat-search-button');\n this.goDownBtn = this.pageEl.querySelector('#bubbles-go-down');\n this.getHistoryTimeout = 0;\n this.chatInputC = null;\n this.myID = 0;\n this.peerID = 0;\n this.muted = false;\n this.bubbles = {};\n this.dateMessages = {};\n this.unreaded = [];\n this.unreadOut = [];\n this.needUpdate = []; // if need wrapSingleMessage\n this.offline = false;\n this.updateStatusInterval = 0;\n this.pinnedMsgID = 0;\n this.pinnedMessageContainer = this.pageEl.querySelector('.pinned-message');\n this.pinnedMessageContent = this.pinnedMessageContainer.querySelector('.pinned-message-subtitle');\n this.firstTopMsgID = 0;\n this.loadMediaQueue = [];\n this.loadMediaQueuePromise = null;\n this.loadingMedia = 0;\n this.scroll = null;\n this.scrollPosition = null;\n this.preloader = null;\n this.typingTimeouts = {};\n this.typingUsers = {}; // to peerID\n this.topbar = null;\n this.chatInput = null;\n this.contextMenu = document.getElementById('bubble-contextmenu');\n this.contextMenuPin = this.contextMenu.querySelector('.menu-pin');\n this.contextMenuEdit = this.contextMenu.querySelector('.menu-edit');\n this.popupDeleteMessage = {};\n this.setPeerPromise = null;\n this.log = polyfill_1.logger('IM');\n this.chatInputC = new ChatInput();\n this.preloader = new preloader_1.default(null, false);\n this.popupDeleteMessage.popupEl = this.pageEl.querySelector('.popup-delete-message');\n this.popupDeleteMessage.deleteBothBtn = this.popupDeleteMessage.popupEl.querySelector('.popup-delete-both');\n this.popupDeleteMessage.deleteMeBtn = this.popupDeleteMessage.popupEl.querySelector('.popup-delete-me');\n this.popupDeleteMessage.cancelBtn = this.popupDeleteMessage.popupEl.querySelector('.popup-close');\n apiManager_1.default.getUserID().then((id) => {\n this.myID = id;\n });\n this.topbar = document.getElementById('topbar');\n this.chatInput = document.getElementById('chat-input');\n utils_1.$rootScope.$on('user_auth', (e) => {\n let userAuth = e.detail;\n this.myID = userAuth ? userAuth.id : 0;\n });\n utils_1.$rootScope.$on('history_append', (e) => {\n let details = e.detail;\n this.renderMessagesByIDs([details.messageID]);\n });\n utils_1.$rootScope.$on('history_update', (e) => {\n let details = e.detail;\n if (details.mid && details.peerID == this.peerID) {\n let mid = details.mid;\n let bubble = this.bubbles[mid];\n if (!bubble)\n return;\n let message = appMessagesManager_1.default.getMessage(mid);\n //this.log('history_update', this.bubbles[mid], mid, message);\n this.renderMessage(message, false, false, bubble);\n this.deleteEmptySideDivs();\n }\n });\n utils_1.$rootScope.$on('history_multiappend', (e) => {\n let msgIDsByPeer = e.detail;\n if (!(this.peerID in msgIDsByPeer))\n return;\n let msgIDs = msgIDsByPeer[this.peerID];\n this.renderMessagesByIDs(msgIDs);\n appDialogsManager_1.default.sortDom();\n });\n utils_1.$rootScope.$on('history_delete', (e) => {\n let detail = e.detail;\n this.deleteMessagesByIDs(Object.keys(detail.msgs).map(s => +s));\n setTimeout(() => {\n this.deleteEmptySideDivs();\n }, 0);\n });\n // Calls when message successfully sent and we have an ID\n utils_1.$rootScope.$on('message_sent', (e) => {\n let { tempID, mid } = e.detail;\n ////this.log('message_sent', e.detail);\n let bubble = this.bubbles[tempID];\n if (bubble) {\n this.bubbles[mid] = bubble;\n /////this.log('message_sent', bubble);\n let media = bubble.querySelector('img, video');\n if (media) {\n media.setAttribute('message-id', mid);\n }\n bubble.classList.remove('is-sending');\n bubble.classList.add('is-sent');\n delete this.bubbles[tempID];\n }\n else {\n this.log.warn('message_sent there is no bubble', e.detail);\n }\n let length = this.unreadOut.length;\n for (let i = 0; i < length; i++) {\n if (this.unreadOut[i] == tempID) {\n this.unreadOut[i] = mid;\n }\n }\n });\n utils_1.$rootScope.$on('message_edit', (e) => {\n let { peerID, mid, id, justMedia } = e.detail;\n if (peerID != this.peerID)\n return;\n let bubble = this.bubbles[mid];\n if (!bubble)\n return;\n let message = appMessagesManager_1.default.getMessage(mid);\n this.renderMessage(message, false, false, bubble, false);\n });\n utils_1.$rootScope.$on('messages_downloaded', (e) => {\n let mids = e.detail;\n mids.forEach(mid => {\n if (this.pinnedMsgID == mid) {\n let message = appMessagesManager_1.default.getMessage(mid);\n /////this.log('setting pinned message', message);\n this.pinnedMessageContainer.dataset.mid = '' + mid;\n this.pinnedMessageContainer.style.display = '';\n this.pinnedMessageContent.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(message.message);\n }\n let length = this.needUpdate.length;\n for (let i = length - 1; i >= 0; --i) {\n if (this.needUpdate[i].replyMid == mid) {\n let { mid, replyMid } = this.needUpdate.splice(i, 1)[0];\n //this.log('messages_downloaded', mid, replyMid, i, this.needUpdate, this.needUpdate.length, mids, this.bubbles[mid]);\n let bubble = this.bubbles[mid];\n if (!bubble)\n return;\n let message = appMessagesManager_1.default.getMessage(mid);\n let repliedMessage = appMessagesManager_1.default.getMessage(replyMid);\n if (repliedMessage.deleted) { // чтобы не пыталось бесконечно загрузить удалённое сообщение\n delete message.reply_to_mid; // WARNING!\n }\n this.renderMessage(message, false, false, bubble, false);\n }\n }\n });\n });\n utils_1.$rootScope.$on('apiUpdate', (e) => {\n let update = e.detail;\n this.handleUpdate(update);\n });\n window.addEventListener('blur', () => {\n lottieLoader_1.default.checkAnimations(true);\n this.offline = true;\n this.updateStatus();\n clearInterval(this.updateStatusInterval);\n window.addEventListener('focus', () => {\n lottieLoader_1.default.checkAnimations(false);\n this.offline = false;\n this.updateStatus();\n this.updateStatusInterval = window.setInterval(() => this.updateStatus(), 50e3);\n }, { once: true });\n });\n this.pageEl.querySelector('.person').addEventListener('click', (e) => {\n appSidebarRight_1.default.toggleSidebar(true);\n });\n this.chatInner.addEventListener('click', (e) => {\n let target = e.target;\n let bubble = null;\n try {\n bubble = utils_1.findUpClassName(e.target, 'bubble');\n }\n catch (err) { }\n if (!bubble)\n return;\n if (['IMG', 'VIDEO', 'SVG', 'DIV'].indexOf(target.tagName) === -1)\n target = utils_1.findUpTag(target, 'DIV');\n /* if(target.tagName == 'VIDEO' && bubble.classList.contains('round')) {\n let video = target as HTMLVideoElement;\n video.currentTime = 0;\n if(video.paused) {\n video.play();\n video.volume = 1;\n } else {\n video.pause();\n video.volume = 0;\n }\n return;\n } */\n if (target.tagName == 'DIV') {\n if (target.classList.contains('forward')) {\n let savedFrom = bubble.dataset.savedFrom;\n let splitted = savedFrom.split('_');\n let peerID = +splitted[0];\n let msgID = +splitted[1];\n ////this.log('savedFrom', peerID, msgID);\n this.setPeer(peerID, msgID, true);\n return;\n }\n else if (target.classList.contains('user-avatar') || target.classList.contains('name')) {\n let peerID = +target.dataset.peerID;\n if (!isNaN(peerID)) {\n this.setPeer(peerID);\n }\n return;\n }\n let isReplyClick = false;\n try {\n isReplyClick = !!utils_1.findUpClassName(e.target, 'reply');\n }\n catch (err) { }\n if (isReplyClick && bubble.classList.contains('is-reply') /* || bubble.classList.contains('forwarded') */) {\n let originalMessageID = +bubble.getAttribute('data-original-mid');\n this.setPeer(this.peerID, originalMessageID);\n }\n }\n else if (bubble.classList.contains('round')) {\n }\n else if (target.tagName == 'IMG' && target.parentElement.classList.contains('user-avatar')) {\n let peerID = +target.parentElement.dataset.peerID;\n if (!isNaN(peerID)) {\n this.setPeer(peerID);\n }\n }\n else if ((target.tagName == 'IMG' && !target.classList.contains('emoji')) || target.tagName == 'VIDEO') {\n let messageID = +target.getAttribute('message-id');\n let message = appMessagesManager_1.default.getMessage(messageID);\n if (!message) {\n this.log.warn('no message by messageID:', messageID);\n return;\n }\n let ids = Object.keys(this.bubbles).map(k => +k).filter(id => {\n let message = appMessagesManager_1.default.getMessage(id);\n return message.media && (message.media.photo\n || (message.media.document && (message.media.document.type == 'video' || message.media.document.type == 'gif'))\n || (message.media.webpage && (message.media.webpage.document || message.media.webpage.photo)));\n }).sort();\n let idx = ids.findIndex(i => i == messageID);\n let prev = ids[idx + 1] || null;\n let next = ids[idx - 1] || null;\n let prevTarget = this.bubbles[prev] ? this.bubbles[prev].querySelector('img, video') : null;\n let nextTarget = this.bubbles[next] ? this.bubbles[next].querySelector('img, video') : null;\n /////this.log('ids', ids, idx, this.bubbles[prev], this.bubbles[next]);\n appMediaViewer_1.default.openMedia(message, target, nextTarget, prevTarget);\n //appMediaViewer.openMedia(message, target as HTMLImageElement);\n }\n //console.log('chatInner click', e);\n });\n this.searchBtn.addEventListener('click', (e) => {\n if (this.peerID) {\n appSidebarLeft_1.default.beginSearch(this.peerID);\n }\n });\n this.pinnedMessageContainer.addEventListener('click', (e) => {\n e.preventDefault();\n e.cancelBubble = true;\n let mid = +this.pinnedMessageContainer.getAttribute('data-mid');\n this.setPeer(this.peerID, mid);\n });\n this.btnMenuMute.addEventListener('click', () => this.mutePeer());\n this.btnMute.addEventListener('click', () => this.mutePeer());\n let onKeyDown = (e) => {\n let target = e.target;\n //if(target.tagName == 'INPUT') return;\n //this.log('onkeydown', e);\n if (this.chatInputC.attachMediaPopUp.container.classList.contains('active')) {\n if (target.tagName != 'INPUT') {\n this.chatInputC.attachMediaPopUp.captionInput.focus();\n }\n if (e.key == 'Enter') {\n this.chatInputC.attachMediaPopUp.sendBtn.click();\n }\n else if (e.key == 'Escape') {\n this.chatInputC.attachMediaPopUp.container.classList.remove('active');\n }\n return;\n }\n if (e.key == 'Meta' || e.key == 'Control') {\n return;\n }\n else if (e.key == 'c' && (e.ctrlKey || e.metaKey) && target.tagName != 'INPUT') {\n return;\n }\n if (e.target != this.chatInputC.messageInput && target.tagName != 'INPUT') {\n this.chatInputC.messageInput.focus();\n utils_1.placeCaretAtEnd(this.chatInputC.messageInput);\n }\n };\n document.body.addEventListener('keydown', onKeyDown);\n /* this.chatInner.addEventListener('mouseover', () => {\n document.body.addEventListener('keydown', onKeyDown);\n \n this.log('mouseover');\n \n this.chatInner.addEventListener('mouseout', () => {\n document.body.removeEventListener('keydown', onKeyDown);\n }, {once: true});\n }); */\n this.chatInner.addEventListener('contextmenu', e => {\n let bubble = null;\n try {\n bubble = utils_1.findUpClassName(e.target, 'bubble');\n }\n catch (e) { }\n if (bubble) {\n e.preventDefault();\n e.cancelBubble = true;\n let msgID = 0;\n for (let id in this.bubbles) {\n if (this.bubbles[id] === bubble) {\n msgID = +id;\n break;\n }\n }\n if (!msgID)\n return;\n if (this.myID == this.peerID ||\n (this.peerID < 0 && !appPeersManager_1.default.isChannel(this.peerID) && !appPeersManager_1.default.isMegagroup(this.peerID))) {\n this.contextMenuPin.style.display = '';\n }\n else\n this.contextMenuPin.style.display = 'none';\n this.contextMenuMsgID = msgID;\n let side = bubble.parentElement.classList.contains('in') ? 'left' : 'right';\n this.contextMenuEdit.style.display = side == 'right' ? '' : 'none';\n this.contextMenu.classList.remove('bottom-left', 'bottom-right');\n this.contextMenu.classList.add(side == 'left' ? 'bottom-right' : 'bottom-left');\n let { clientX, clientY } = e;\n this.contextMenu.style.left = (side == 'right' ? clientX - this.contextMenu.scrollWidth : clientX) + 'px';\n if ((clientY + this.contextMenu.scrollHeight) > window.innerHeight) {\n this.contextMenu.style.top = (window.innerHeight - this.contextMenu.scrollHeight) + 'px';\n }\n else {\n this.contextMenu.style.top = clientY + 'px';\n }\n //this.contextMenu.classList.add('active');\n misc_1.openBtnMenu(this.contextMenu);\n /////this.log('contextmenu', e, bubble, msgID, side);\n }\n });\n this.contextMenu.querySelector('.menu-copy').addEventListener('click', () => {\n let message = appMessagesManager_1.default.getMessage(this.contextMenuMsgID);\n let str = message ? message.message : '';\n var textArea = document.createElement(\"textarea\");\n textArea.value = str;\n textArea.style.position = \"fixed\"; //avoid scrolling to bottom\n document.body.appendChild(textArea);\n textArea.focus();\n textArea.select();\n try {\n document.execCommand('copy');\n }\n catch (err) {\n console.error('Oops, unable to copy', err);\n }\n document.body.removeChild(textArea);\n });\n this.contextMenu.querySelector('.menu-delete').addEventListener('click', () => {\n if (this.peerID == this.myID) {\n this.popupDeleteMessage.deleteBothBtn.style.display = 'none';\n this.popupDeleteMessage.deleteMeBtn.innerText = 'DELETE';\n }\n else {\n this.popupDeleteMessage.deleteBothBtn.style.display = '';\n this.popupDeleteMessage.deleteMeBtn.innerText = 'DELETE JUST FOR ME';\n if (this.peerID > 0) {\n let title = appPeersManager_1.default.getPeerTitle(this.peerID);\n this.popupDeleteMessage.deleteBothBtn.innerHTML = 'DELETE FOR ME AND ' + title;\n }\n else {\n this.popupDeleteMessage.deleteBothBtn.innerText = 'DELETE FOR ALL';\n }\n }\n this.popupDeleteMessage.popupEl.classList.add('active');\n });\n this.contextMenu.querySelector('.menu-reply').addEventListener('click', () => {\n let message = appMessagesManager_1.default.getMessage(this.contextMenuMsgID);\n this.chatInputC.setTopInfo(appPeersManager_1.default.getPeerTitle(message.fromID, true), message.message, undefined, message.media);\n this.chatInputC.replyToMsgID = this.contextMenuMsgID;\n this.chatInputC.editMsgID = 0;\n });\n this.contextMenuEdit.addEventListener('click', () => {\n let message = appMessagesManager_1.default.getMessage(this.contextMenuMsgID);\n this.chatInputC.setTopInfo('Editing', message.message, message.message, message.media);\n this.chatInputC.replyToMsgID = 0;\n this.chatInputC.editMsgID = this.contextMenuMsgID;\n });\n this.contextMenuPin.addEventListener('click', () => {\n apiManager_1.default.invokeApi('messages.updatePinnedMessage', {\n flags: 0,\n peer: appPeersManager_1.default.getInputPeerByID(this.peerID),\n id: this.contextMenuMsgID\n }).then(updates => {\n /////this.log('pinned updates:', updates);\n apiUpdatesManager_1.default.processUpdateMessage(updates);\n });\n });\n this.popupDeleteMessage.deleteBothBtn.addEventListener('click', () => {\n this.deleteMessages(true);\n this.popupDeleteMessage.cancelBtn.click();\n });\n this.popupDeleteMessage.deleteMeBtn.addEventListener('click', () => {\n this.deleteMessages(false);\n this.popupDeleteMessage.cancelBtn.click();\n });\n this.goDownBtn.addEventListener('click', () => {\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\n if (dialog) {\n this.setPeer(this.peerID, dialog.top_message);\n }\n else {\n this.scroll.scrollTop = this.scroll.scrollHeight;\n }\n });\n this.updateStatusInterval = window.setInterval(() => this.updateStatus(), 50e3);\n this.updateStatus();\n setInterval(() => this.setPeerStatus(), 60e3);\n this.loadMediaQueueProcess();\n }\n deleteMessages(revoke = false) {\n let flags = revoke ? 1 : 0;\n let ids = [this.contextMenuMsgID];\n apiManager_1.default.invokeApi('messages.deleteMessages', {\n flags: flags,\n revoke: revoke,\n id: ids\n }).then((affectedMessages) => {\n /////this.log('deleted messages:', affectedMessages);\n apiUpdatesManager_1.default.processUpdateMessage({\n _: 'updateShort',\n update: {\n _: 'updatePts',\n pts: affectedMessages.pts,\n pts_count: affectedMessages.pts_count\n }\n });\n apiUpdatesManager_1.default.processUpdateMessage({\n _: 'updateShort',\n update: {\n _: 'updateDeleteMessages',\n messages: ids\n }\n });\n });\n }\n deleteEmptySideDivs() {\n let nodes = Array.from(this.chatInner.childNodes);\n nodes.filter((node) => {\n let childElementCount = node.childElementCount;\n if (!childElementCount) {\n node.remove();\n return false;\n }\n else if (childElementCount == 1) {\n let child = node.firstElementChild;\n if (child.classList.contains('service')) {\n node.remove();\n return false;\n }\n }\n return true;\n }).forEach(node => {\n let nextNode = node.nextElementSibling;\n if (nextNode && node.className == nextNode.className) {\n Array.from(node.childNodes).reverse().forEach(div => {\n nextNode.prepend(div);\n });\n node.remove();\n }\n });\n }\n loadMediaQueuePush(cb) {\n this.loadMediaQueue.push(cb);\n this.loadMediaQueueProcess();\n }\n loadMediaQueueProcessOld() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.loadMediaQueuePromise /* || 1 == 1 */)\n return this.loadMediaQueuePromise;\n let woo = this.loadMediaQueue.splice(-5, 5).reverse().map(f => f());\n if (woo.length) {\n ///this.log('Will load more media:', woo.length);\n woo.forEach((promise) => __awaiter(this, void 0, void 0, function* () {\n try {\n yield promise;\n }\n catch (err) {\n this.log.error('loadMediaQueue error:', err);\n }\n this.loadingMedia--;\n }));\n try {\n this.loadMediaQueuePromise = Promise.all(woo);\n yield this.loadMediaQueuePromise;\n }\n catch (err) {\n this.log.error('loadMediaQueue error:', err);\n }\n }\n this.loadMediaQueuePromise = null;\n if (this.loadMediaQueue.length)\n return this.loadMediaQueueProcess();\n return this.loadMediaQueuePromise;\n });\n }\n loadMediaQueueProcess() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.loadingMedia >= 5)\n return;\n let item = this.loadMediaQueue.pop();\n if (item) {\n this.loadingMedia++;\n let peerID = this.peerID;\n let promise = item();\n try {\n yield promise;\n }\n catch (err) {\n this.log.error('loadMediaQueue error:', err);\n }\n if (peerID == this.peerID) {\n this.loadingMedia--;\n }\n }\n if (this.loadMediaQueue.length)\n return this.loadMediaQueueProcess();\n });\n }\n updateStatus() {\n if (!this.myID)\n return Promise.resolve();\n appUsersManager_1.default.setUserStatus(this.myID, this.offline);\n return apiManager_1.default.invokeApi('account.updateStatus', {\n offline: this.offline\n }, { noErrorBox: true });\n }\n onScroll() {\n let length = this.unreaded.length;\n let readed = [];\n for (let i = length - 1; i >= 0; --i) {\n let msgID = this.unreaded[i];\n let bubble = this.bubbles[msgID];\n if (utils_1.isElementInViewport(bubble)) {\n readed.push(msgID);\n this.unreaded.splice(i, 1);\n }\n }\n lottieLoader_1.default.checkAnimations();\n if (readed.length) {\n let max = Math.max(...readed);\n let min = Math.min(...readed);\n if (this.peerID < 0) {\n max = appMessagesIDsManager_1.default.getMessageIDInfo(max)[0];\n min = appMessagesIDsManager_1.default.getMessageIDInfo(min)[0];\n }\n //appMessagesManager.readMessages(readed);\n appMessagesManager_1.default.readHistory(this.peerID, max, min).catch((err) => {\n this.log.error('readHistory err:', err);\n appMessagesManager_1.default.readHistory(this.peerID, max, min);\n });\n }\n if (this.scroll.scrollHeight - (this.scroll.scrollTop + this.scroll.offsetHeight) == 0 /* <= 5 */) {\n this.scroll.parentElement.classList.add('scrolled-down');\n }\n else if (this.scroll.parentElement.classList.contains('scrolled-down')) {\n this.scroll.parentElement.classList.remove('scrolled-down');\n }\n // load more history\n if (!this.getHistoryPromise && !this.getHistoryTimeout && !testScroll) {\n this.getHistoryTimeout = setTimeout(() => {\n let history = Object.keys(this.bubbles).map(id => +id).sort();\n /* let history = appMessagesManager.historiesStorage[this.peerID].history;\n let length = history.length; */\n // filter negative ids\n let lastBadIndex = -1;\n for (let i = 0; i < history.length; ++i) {\n if (history[i] <= 0)\n lastBadIndex = i;\n else\n break;\n }\n if (lastBadIndex != -1) {\n history = history.slice(lastBadIndex + 1);\n }\n this.getHistoryTimeout = 0;\n let willLoad = false;\n if (!this.scrolledAll) {\n let length = history.length < 10 ? history.length : 10;\n for (let i = 0; i < length; ++i) {\n let msgID = history[i];\n let bubble = this.bubbles[msgID];\n if (!bubble) {\n this.log.error('no bubble by msgID:', msgID);\n continue;\n }\n if (utils_1.isElementInViewport(bubble)) {\n willLoad = true;\n ////this.log('Will load more (up) history by id:', history[0], 'maxID:', history[history.length - 1], history, bubble);\n /* false && */ !testScroll && this.getHistory(history[0], true).then(() => {\n this.onScroll();\n }).catch(err => {\n this.log.warn('Could not load more history, err:', err);\n });\n break;\n }\n }\n }\n if (this.scrolledAllDown)\n return;\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\n /* if(!dialog) {\n this.log.warn('no dialog for load history');\n return;\n } */\n // if scroll down after search\n if (!willLoad && (!dialog || history.indexOf(dialog.top_message) === -1)) {\n let lastMsgIDs = history.slice(-10);\n for (let msgID of lastMsgIDs) {\n let bubble = this.bubbles[msgID];\n if (utils_1.isElementInViewport(bubble)) {\n willLoad = true;\n ////this.log('Will load more (down) history by maxID:', lastMsgIDs[lastMsgIDs.length - 1], lastMsgIDs, bubble);\n /* false && */ !testScroll && this.getHistory(lastMsgIDs[lastMsgIDs.length - 1], false, true).then(() => {\n this.onScroll();\n }).catch(err => {\n this.log.warn('Could not load more history, err:', err);\n });\n break;\n }\n }\n }\n }, 0);\n }\n }\n setScroll(scroll) {\n this.scroll = scroll;\n this.scrollPosition = new ScrollPosition(this.chatInner);\n this.scroll.addEventListener('scroll', this.onScroll.bind(this));\n this.scroll.parentElement.classList.add('scrolled-down');\n }\n setPeerStatus() {\n if (!this.myID)\n return;\n // set subtitle\n this.subtitleEl.innerText = appSidebarRight_1.default.profileElements.subtitle.innerText = '';\n this.subtitleEl.classList.remove('online');\n appSidebarRight_1.default.profileElements.subtitle.classList.remove('online');\n if (this.peerID < 0) { // not human\n let chat = appPeersManager_1.default.getPeer(this.peerID);\n let isChannel = appPeersManager_1.default.isChannel(this.peerID) && !appPeersManager_1.default.isMegagroup(this.peerID);\n ///////this.log('setPeerStatus', chat);\n Promise.all([\n appPeersManager_1.default.isMegagroup(this.peerID) ? apiManager_1.default.invokeApi('messages.getOnlines', {\n peer: appPeersManager_1.default.getInputPeerByID(this.peerID)\n }) : Promise.resolve(),\n // will redirect if wrong\n appProfileManager_1.default.getChatFull(chat.id)\n ]).then(results => {\n let [chatOnlines, chatInfo] = results;\n let onlines = chatOnlines ? chatOnlines.onlines : 1;\n ///////////this.log('chatInfo res:', chatInfo);\n if (chatInfo.pinned_msg_id) { // request pinned message\n this.pinnedMsgID = chatInfo.pinned_msg_id;\n appMessagesManager_1.default.wrapSingleMessage(chatInfo.pinned_msg_id);\n }\n let participants_count = chatInfo.participants_count || chatInfo.participants.participants.length;\n let subtitle = utils_1.numberWithCommas(participants_count) + ' ' + (isChannel ? 'subscribers' : 'members');\n if (onlines > 1) {\n subtitle += ', ' + utils_1.numberWithCommas(onlines) + ' online';\n }\n this.subtitleEl.innerText = appSidebarRight_1.default.profileElements.subtitle.innerText = subtitle;\n });\n }\n else if (!appUsersManager_1.default.isBot(this.peerID)) { // user\n let user = appUsersManager_1.default.getUser(this.peerID);\n //this.subtitleEl.classList.remove('online');\n if (user && user.status && this.myID != this.peerID) {\n let subtitle = '';\n switch (user.status._) {\n case 'userStatusRecently':\n subtitle += 'last seen recently';\n break;\n case 'userStatusOffline':\n subtitle = 'last seen ';\n let date = user.status.was_online;\n let now = Date.now() / 1000;\n if ((now - date) < 60) {\n subtitle += ' just now';\n }\n else if ((now - date) < 3600) {\n subtitle += ((now - date) / 60 | 0) + ' minutes ago';\n }\n else if (now - date < 86400) {\n subtitle += ((now - date) / 3600 | 0) + ' hours ago';\n }\n else {\n let d = new Date(date * 1000);\n subtitle += ('0' + d.getDate()).slice(-2) + '.' + ('0' + (d.getMonth() + 1)).slice(-2) + ' at ' +\n ('0' + d.getHours()).slice(-2) + ':' + ('0' + d.getMinutes()).slice(-2);\n }\n break;\n case 'userStatusOnline':\n this.subtitleEl.classList.add('online');\n appSidebarRight_1.default.profileElements.subtitle.classList.add('online');\n subtitle = 'online';\n break;\n }\n appSidebarRight_1.default.profileElements.subtitle.innerText = subtitle;\n if (this.typingUsers[this.peerID] == this.peerID) {\n this.subtitleEl.innerText = 'typing...';\n this.subtitleEl.classList.add('online');\n }\n else\n this.subtitleEl.innerText = subtitle;\n }\n }\n }\n cleanup() {\n this.peerID = utils_1.$rootScope.selectedPeerID = 0;\n this.scrolledAll = false;\n this.scrolledAllDown = false;\n this.muted = false;\n if (this.lastContainerDiv)\n this.lastContainerDiv.remove();\n if (this.firstContainerDiv)\n this.firstContainerDiv.remove();\n this.lastContainerDiv = undefined;\n this.firstContainerDiv = undefined;\n for (let i in this.bubbles) {\n let bubble = this.bubbles[i];\n bubble.remove();\n }\n this.bubbles = {};\n this.dateMessages = {};\n this.unreaded = [];\n this.unreadOut = [];\n this.loadMediaQueue = [];\n this.loadingMedia = 0;\n this.needUpdate.length = 0;\n lottieLoader_1.default.checkAnimations(false, 'chat', true);\n // clear input \n this.chatInputC.messageInput.innerHTML = '';\n this.chatInputC.replyElements.cancelBtn.click();\n // clear messages\n this.chatInner.innerHTML = '';\n //appSidebarRight.minMediaID = {};\n }\n setPeer(peerID, lastMsgID = 0, forwarding = false) {\n if (peerID == 0) {\n appSidebarRight_1.default.toggleSidebar(false);\n this.topbar.style.display = this.chatInput.style.display = this.goDownBtn.style.display = 'none';\n this.cleanup();\n return Promise.resolve(false);\n }\n let samePeer = this.peerID == peerID;\n if (this.setPeerPromise && samePeer)\n return this.setPeerPromise;\n if (lastMsgID) {\n appMessagesManager_1.default.readHistory(peerID, lastMsgID); // lol\n }\n if (samePeer) {\n if (!testScroll && !lastMsgID) {\n return Promise.resolve(true);\n }\n if (this.bubbles[lastMsgID]) {\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\n if (dialog && lastMsgID == dialog.top_message) {\n this.scroll.scrollTop = this.scroll.scrollHeight;\n }\n else {\n this.bubbles[lastMsgID].scrollIntoView();\n }\n return Promise.resolve(true);\n }\n }\n // clear \n this.cleanup();\n // set new\n this.peerID = utils_1.$rootScope.selectedPeerID = peerID;\n // no dialog\n /* if(!appMessagesManager.getDialogByPeerID(this.peerID).length) {\n this.log.error('No dialog by peerID:', this.peerID);\n return Promise.reject();\n } */\n this.pinnedMessageContainer.style.display = 'none';\n this.preloader.attach(this.chatInner);\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0] || null;\n //////this.log('setPeer peerID:', this.peerID, dialog, lastMsgID);\n appDialogsManager_1.default.loadDialogPhoto(this.avatarEl, this.peerID);\n appDialogsManager_1.default.loadDialogPhoto(appSidebarRight_1.default.profileElements.avatar, this.peerID);\n if (!samePeer && appDialogsManager_1.default.lastActiveListElement) {\n appDialogsManager_1.default.lastActiveListElement.classList.remove('active');\n }\n this.firstTopMsgID = dialog ? dialog.top_message : 0;\n /* let dom = appDialogsManager.getDialogDom(this.peerID);\n if(!dom) {\n this.log.warn('No rendered dialog by peerID:', this.peerID);\n appDialogsManager.addDialog(dialog);\n dom = appDialogsManager.getDialogDom(this.peerID);\n }\n // warning need check\n dom.listEl.classList.add('active'); */\n this.setPeerStatus();\n //this.titleEl.innerHTML = appSidebarRight.profileElements.name.innerHTML = dom.titleSpan.innerHTML;\n this.titleEl.innerHTML = appSidebarRight_1.default.profileElements.name.innerHTML = appPeersManager_1.default.getPeerTitle(this.peerID);\n this.topbar.style.display = this.goDownBtn.style.display = '';\n appSidebarRight_1.default.toggleSidebar(true);\n this.chatInput.style.display = appPeersManager_1.default.isChannel(peerID) && !appPeersManager_1.default.isMegagroup(peerID) ? 'none' : '';\n if (appPeersManager_1.default.isAnyGroup(peerID)) {\n this.chatInner.classList.add('is-chat');\n }\n else {\n this.chatInner.classList.remove('is-chat');\n }\n return this.setPeerPromise = Promise.all([\n this.getHistory(forwarding ? lastMsgID + 1 : lastMsgID).then(() => {\n ////this.log('setPeer removing preloader');\n if (lastMsgID) {\n if (!forwarding) {\n let message = appMessagesManager_1.default.getMessage(lastMsgID);\n //////this.log('setPeer render last message:', message, lastMsgID);\n this.renderMessage(message);\n }\n if (!dialog || lastMsgID != dialog.top_message) {\n let bubble = this.bubbles[lastMsgID];\n if (bubble)\n this.bubbles[lastMsgID].scrollIntoView();\n else\n this.log.warn('no bubble by lastMsgID:', lastMsgID);\n }\n else {\n this.scroll.scrollTop = this.scroll.scrollHeight;\n }\n }\n else if (dialog && dialog.top_message) { // add last message, bc in getHistory will load < max_id\n this.renderMessage(appMessagesManager_1.default.getMessage(dialog.top_message));\n }\n if (this.scroll) {\n this.onScroll();\n }\n this.preloader.detach();\n //setTimeout(() => {\n //appSidebarRight.fillProfileElements();\n appSidebarRight_1.default.loadSidebarMedia();\n //}, 500);\n return true;\n }) /* .catch(err => {\n this.log.error(err);\n }) */,\n appSidebarRight_1.default.fillProfileElements()\n ]).then(() => {\n if (this.peerID == peerID) {\n this.setPeerPromise = null;\n }\n return true;\n }).catch(err => {\n if (this.peerID == peerID) {\n this.setPeerPromise = null;\n }\n this.log.error('setPeer promises error:', err);\n return false;\n });\n }\n setTyping(action) {\n if (!this.peerID)\n return Promise.resolve(false);\n if (typeof (action) == 'string') {\n action = { _: action };\n }\n let input = appPeersManager_1.default.getInputPeerByID(this.peerID);\n return apiManager_1.default.invokeApi('messages.setTyping', {\n peer: input,\n action: action\n });\n }\n updateUnreadByDialog(dialog) {\n let maxID = this.peerID == this.myID ? dialog.read_inbox_max_id : dialog.read_outbox_max_id;\n ///////this.log('updateUnreadByDialog', maxID, dialog, this.unreadOut);\n let length = this.unreadOut.length;\n for (let i = length - 1; i >= 0; --i) {\n let msgID = this.unreadOut[i];\n if (msgID > 0 && msgID <= maxID) {\n let bubble = this.bubbles[msgID];\n bubble.classList.remove('is-sent');\n bubble.classList.add('is-read');\n this.unreadOut.splice(i, 1);\n }\n }\n }\n deleteMessagesByIDs(msgIDs) {\n msgIDs.forEach(id => {\n if (this.firstTopMsgID == id) {\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\n if (dialog) {\n ///////this.log('setting firstTopMsgID after delete:', id, dialog.top_message, dialog);\n this.firstTopMsgID = dialog.top_message;\n }\n }\n if (!(id in this.bubbles))\n return;\n let bubble = this.bubbles[id];\n let parent = bubble.parentNode;\n delete this.bubbles[id];\n bubble.remove();\n if (!parent.childNodes.length) {\n parent.remove();\n }\n });\n lottieLoader_1.default.checkAnimations();\n }\n renderMessagesByIDs(msgIDs) {\n if (!this.bubbles[this.firstTopMsgID] && Object.keys(this.bubbles).length) { // seems search active\n //////this.log('seems search is active, skipping render:', msgIDs);\n return;\n }\n msgIDs.forEach((msgID) => {\n let message = appMessagesManager_1.default.getMessage(msgID);\n /////////this.log('got new message to append:', message);\n //this.unreaded.push(msgID);\n this.renderMessage(message);\n });\n }\n renderMessage(message, reverse = false, multipleRender, bubble = null, updatePosition = true) {\n /////this.log('message to render:', message);\n if (message.deleted)\n return;\n let peerID = this.peerID;\n let our = message.fromID == this.myID;\n let messageDiv = document.createElement('div');\n messageDiv.classList.add('message');\n //messageDiv.innerText = message.message;\n if (!multipleRender) {\n this.scrollPosition.prepareFor(reverse ? 'up' : 'down'); // лагает из-за этого\n }\n // bubble\n if (!bubble) {\n bubble = document.createElement('div');\n bubble.classList.add('bubble');\n this.bubbles[+message.mid] = bubble;\n }\n else {\n bubble.className = 'bubble';\n bubble.innerHTML = '';\n }\n // time section\n let date = new Date(message.date * 1000);\n let time = ('0' + date.getHours()).slice(-2) +\n ':' + ('0' + date.getMinutes()).slice(-2);\n if (message.views) {\n bubble.classList.add('channel-post');\n time = utils_1.formatNumber(message.views, 1) + ' ' + time;\n }\n if (message.edit_date) {\n bubble.classList.add('is-edited');\n time = 'edited ' + time;\n }\n let timeSpan = document.createElement('span');\n timeSpan.classList.add('time');\n let timeInner = document.createElement('div');\n timeInner.classList.add('inner', 'tgico');\n timeInner.innerHTML = time;\n let richText = richtextprocessor_1.RichTextProcessor.wrapRichText(message.message, {\n entities: message.totalEntities\n });\n if (message.totalEntities) {\n let emojiEntities = message.totalEntities.filter((e) => e._ == 'messageEntityEmoji');\n let strLength = message.message.length;\n let emojiStrLength = emojiEntities.reduce((acc, curr) => acc + curr.length, 0);\n if (emojiStrLength == strLength && emojiEntities.length <= 3) {\n let attachmentDiv = document.createElement('div');\n attachmentDiv.classList.add('attachment');\n attachmentDiv.innerHTML = richText;\n messageDiv.classList.add('message-empty');\n bubble.classList.add('emoji-' + emojiEntities.length + 'x', 'emoji-big');\n bubble.append(attachmentDiv);\n }\n else {\n messageDiv.innerHTML = richText;\n }\n /* if(strLength == emojiStrLength) {\n messageDiv.classList.add('emoji-only');\n messageDiv.classList.add('message-empty');\n } */\n }\n else {\n messageDiv.innerHTML = richText;\n }\n //messageDiv.innerHTML = 'samsung samsung samsung';\n timeSpan.appendChild(timeInner);\n messageDiv.append(timeSpan);\n bubble.prepend(messageDiv);\n //bubble.prepend(timeSpan, messageDiv); // that's bad\n if (our) {\n if (message.pFlags.unread || message.mid < 0)\n this.unreadOut.push(message.mid); // message.mid < 0 added 11.02.2020\n let status = '';\n if (message.mid < 0)\n status = 'is-sending';\n else\n status = message.pFlags.unread ? 'is-sent' : 'is-read';\n bubble.classList.add(status);\n }\n else {\n //this.log('not our message', message, message.pFlags.unread);\n if (message.pFlags.unread)\n this.unreaded.push(message.mid);\n }\n // media\n if (message.media) {\n let attachmentDiv = document.createElement('div');\n attachmentDiv.classList.add('attachment');\n if (!message.message) {\n messageDiv.classList.add('message-empty');\n }\n let processingWebPage = false;\n switch (message.media._) {\n case 'messageMediaPending': {\n let pending = message.media;\n let preloader = pending.preloader;\n switch (pending.type) {\n case 'photo': {\n if (pending.size < 5e6) {\n let img = new Image();\n img.src = URL.createObjectURL(pending.file);\n let { w, h } = utils_1.calcImageInBox(pending.w, pending.h, 380, 380);\n attachmentDiv.style.width = w + 'px';\n attachmentDiv.style.height = h + 'px';\n attachmentDiv.append(img);\n preloader.attach(attachmentDiv, false);\n bubble.classList.add('hide-name', 'photo');\n break;\n }\n }\n case 'audio':\n case 'document': {\n let docDiv = wrappers_1.wrapDocument(pending, false, true);\n let icoDiv = docDiv.querySelector('.document-ico');\n preloader.attach(icoDiv, false);\n messageDiv.classList.remove('message-empty');\n messageDiv.append(docDiv);\n processingWebPage = true;\n break;\n }\n }\n break;\n }\n case 'messageMediaPhoto': {\n let photo = message.media.photo;\n ////////this.log('messageMediaPhoto', photo);\n bubble.classList.add('hide-name', 'photo');\n wrappers_1.wrapPhoto.call(this, photo, message, attachmentDiv);\n break;\n }\n case 'messageMediaWebPage': {\n processingWebPage = true;\n let webpage = message.media.webpage;\n ////////this.log('messageMediaWebPage', webpage);\n if (webpage._ == 'webPageEmpty') {\n break;\n }\n bubble.classList.add('webpage');\n let box = document.createElement('div');\n box.classList.add('box', 'web');\n let quote = document.createElement('div');\n quote.classList.add('quote');\n let nameEl = document.createElement('a');\n nameEl.classList.add('name');\n let titleDiv = document.createElement('div');\n titleDiv.classList.add('title');\n let textDiv = document.createElement('div');\n textDiv.classList.add('text');\n let preview = null;\n if (webpage.photo || webpage.document) {\n preview = document.createElement('div');\n preview.classList.add('preview');\n }\n let doc = null;\n if (webpage.document) {\n doc = webpage.document;\n if (doc.type == 'gif' || doc.type == 'video') {\n //if(doc.size <= 20e6) {\n bubble.classList.add('video');\n wrappers_1.wrapVideo.call(this, doc, preview, message);\n //}\n }\n else {\n doc = null;\n }\n }\n if (webpage.photo && !doc) {\n bubble.classList.add('photo');\n //appPhotosManager.savePhoto(webpage.photo); // hot-fix because no webpage manager\n wrappers_1.wrapPhoto.call(this, webpage.photo, message, preview);\n }\n if (preview) {\n quote.append(preview);\n }\n nameEl.setAttribute('target', '_blank');\n nameEl.href = webpage.url || '#';\n nameEl.innerHTML = webpage.site_name ? richtextprocessor_1.RichTextProcessor.wrapEmojiText(webpage.site_name) : '';\n if (webpage.description) {\n textDiv.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.description);\n }\n if (webpage.title) {\n titleDiv.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.title);\n }\n quote.append(nameEl, titleDiv, textDiv);\n box.append(quote);\n //bubble.prepend(box);\n bubble.prepend(timeSpan, box);\n //this.log('night running', bubble.scrollHeight);\n break;\n }\n case 'messageMediaDocument': {\n let doc = message.media.document;\n /* if(document.size > 1e6) { // 1mb\n break;\n } */\n ////////this.log('messageMediaDocument', doc);\n if (doc.sticker && doc.size <= 1e6) {\n bubble.classList.add('sticker');\n if (doc.animated) {\n bubble.classList.add('sticker-animated');\n }\n appPhotosManager_1.default.setAttachmentSize(doc, attachmentDiv, undefined, undefined, true);\n let preloader = new preloader_1.default(attachmentDiv, false);\n bubble.style.height = attachmentDiv.style.height;\n bubble.style.width = attachmentDiv.style.width;\n //appPhotosManager.setAttachmentSize(doc, bubble);\n let load = () => wrappers_1.wrapSticker(doc, attachmentDiv, () => {\n if (this.peerID != peerID) {\n this.log.warn('peer changed, canceling sticker attach');\n return false;\n }\n return true;\n }, null, 'chat', false, !!message.pending || !multipleRender).then(() => {\n preloader.detach();\n /* attachmentDiv.style.width = '';\n attachmentDiv.style.height = ''; */\n });\n this.loadMediaQueuePush(load);\n break;\n }\n else if (doc.mime_type == 'video/mp4' && doc.size <= 20e6) {\n ////////this.log('never get free 2', doc);\n if (doc.type == 'round') {\n bubble.classList.add('round');\n }\n bubble.classList.add('video');\n wrappers_1.wrapVideo.call(this, doc, attachmentDiv, message, true, null, false, doc.type == 'round');\n break;\n }\n else {\n let docDiv = wrappers_1.wrapDocument(doc);\n messageDiv.classList.remove('message-empty');\n messageDiv.append(docDiv);\n processingWebPage = true;\n break;\n }\n }\n default:\n messageDiv.classList.remove('message-empty');\n messageDiv.innerHTML = 'unrecognized media type: ' + message.media._;\n messageDiv.append(timeSpan);\n this.log.warn('unrecognized media type:', message.media._, message);\n break;\n }\n if (!processingWebPage) {\n bubble.append(attachmentDiv);\n }\n }\n if ((this.peerID < 0 && !our) || message.fwd_from || message.reply_to_mid) { // chat\n let title = appPeersManager_1.default.getPeerTitle(message.fwdFromID || message.fromID);\n let isHidden = message.fwd_from && !message.fwd_from.from_id && !message.fwd_from.channel_id;\n if (isHidden) {\n ///////this.log('message to render hidden', message);\n title = message.fwd_from.from_name;\n bubble.classList.add('hidden-profile');\n }\n //this.log(title);\n if (message.fwdFromID || message.fwd_from) {\n bubble.classList.add('forwarded');\n if (message.savedFrom) {\n let fwd = document.createElement('div');\n fwd.classList.add('forward' /* , 'tgico-forward' */);\n fwd.innerHTML = `\n \n \n \n \n \n `;\n bubble.append(fwd);\n bubble.dataset.savedFrom = message.savedFrom;\n }\n if (!bubble.classList.contains('sticker')) {\n let nameDiv = document.createElement('div');\n nameDiv.classList.add('name');\n nameDiv.innerHTML = 'Forwarded from ' + title;\n nameDiv.dataset.peerID = message.fwdFromID;\n //nameDiv.style.color = appPeersManager.getPeerColorByID(message.fromID, false);\n bubble.append(nameDiv);\n }\n }\n else {\n if (message.reply_to_mid) {\n let originalMessage = appMessagesManager_1.default.getMessage(message.reply_to_mid);\n let originalPeerTitle = appPeersManager_1.default.getPeerTitle(originalMessage.fromID, true) || '';\n /////////this.log('message to render reply', originalMessage, originalPeerTitle, bubble, message);\n // need to download separately\n if (originalMessage._ == 'messageEmpty') {\n //////////this.log('message to render reply empty, need download', message, message.reply_to_mid);\n appMessagesManager_1.default.wrapSingleMessage(message.reply_to_mid);\n this.needUpdate.push({ replyMid: message.reply_to_mid, mid: message.mid });\n originalPeerTitle = 'Loading...';\n }\n if (originalMessage.mid) {\n bubble.setAttribute('data-original-mid', originalMessage.mid);\n }\n else {\n bubble.setAttribute('data-original-mid', message.reply_to_mid);\n }\n bubble.append(wrappers_1.wrapReply(originalPeerTitle, originalMessage.message || '', originalMessage.media));\n bubble.classList.add('is-reply');\n }\n if (!bubble.classList.contains('sticker') && (peerID < 0 && peerID != message.fromID)) {\n let nameDiv = document.createElement('div');\n nameDiv.classList.add('name');\n nameDiv.innerHTML = title;\n nameDiv.style.color = appPeersManager_1.default.getPeerColorByID(message.fromID, false);\n nameDiv.dataset.peerID = message.fromID;\n bubble.append(nameDiv);\n }\n else /* if(!message.reply_to_mid) */ {\n bubble.classList.add('hide-name');\n }\n //bubble.prepend(avatarDiv);\n /* if(messageDiv.nextElementSibling) {\n bubble.insertBefore(avatarDiv, messageDiv.nextElementSibling);\n } else { */\n //}\n }\n if (!our && this.peerID < 0 &&\n (!appPeersManager_1.default.isChannel(this.peerID) || appPeersManager_1.default.isMegagroup(this.peerID))) {\n let avatarDiv = document.createElement('div');\n avatarDiv.classList.add('user-avatar');\n /////////this.log('exec loadDialogPhoto', message);\n if (message.fromID) { // if no - user hidden\n appDialogsManager_1.default.loadDialogPhoto(avatarDiv, message.fromID);\n }\n else if (!title && message.fwd_from && message.fwd_from.from_name) {\n title = message.fwd_from.from_name;\n appDialogsManager_1.default.loadDialogPhoto(avatarDiv, title);\n }\n avatarDiv.dataset.peerID = message.fromID;\n bubble.append(avatarDiv);\n }\n }\n else {\n bubble.classList.add('hide-name');\n }\n if (message._ == 'messageService') {\n bubble.className = 'service';\n let action = message.action;\n let title = appPeersManager_1.default.getPeerTitle(message.fromID);\n let name = document.createElement('div');\n name.classList.add('name');\n name.dataset.peerID = message.fromID;\n name.innerHTML = title;\n let _ = action._;\n if (_ == \"messageActionPhoneCall\") {\n _ += '.' + action.type;\n }\n // @ts-ignore\n let str = (name.innerText ? name.outerHTML + ' ' : '') + utils_1.langPack[_];\n bubble.innerHTML = `
${str}
`;\n }\n if (updatePosition) {\n let type = our ? 'out' : 'in';\n let containerDiv = reverse ? this.firstContainerDiv : this.lastContainerDiv;\n if (!containerDiv || !containerDiv.classList.contains(type)) {\n /* if(containerDiv) {\n if(reverse) this.chatInner.prepend(containerDiv);\n else this.chatInner.append(containerDiv);\n } */\n containerDiv = document.createElement('div');\n containerDiv.classList.add(type);\n if (!this.firstContainerDiv)\n this.firstContainerDiv = containerDiv;\n if (reverse)\n this.firstContainerDiv = containerDiv;\n else\n this.lastContainerDiv = containerDiv;\n }\n if (reverse) {\n /* if(!multipleRender) {\n this.scrollPosition.prepareFor('up'); // лагает из-за этого\n } */\n containerDiv.prepend(bubble);\n this.chatInner.prepend(containerDiv);\n }\n else {\n /* if(!multipleRender) {\n this.scrollPosition.prepareFor('down'); // лагает из-за этого\n } */\n containerDiv.append(bubble);\n this.chatInner.append(containerDiv);\n }\n let justDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n let dateTimestamp = justDate.getTime();\n if (!(dateTimestamp in this.dateMessages)) {\n let str = '';\n let today = new Date();\n today.setHours(0);\n today.setMinutes(0);\n today.setSeconds(0);\n if (today < date) {\n str = 'Today';\n }\n else {\n const months = ['January', 'February', 'March', 'April', 'May', 'June',\n 'July', 'August', 'September', 'October', 'November', 'December'];\n str = justDate.getFullYear() == new Date().getFullYear() ?\n months[justDate.getMonth()] + ' ' + justDate.getDate() :\n justDate.toISOString().split('T')[0].split('-').reverse().join('.');\n }\n let div = document.createElement('div');\n div.classList.add('service');\n div.innerHTML = `
${str}
`;\n ////////this.log('need to render date message', dateTimestamp, str);\n this.dateMessages[dateTimestamp] = {\n div,\n firstTimestamp: date.getTime()\n };\n //this.chatInner.insertBefore(div, containerDiv);\n containerDiv.insertBefore(div, bubble);\n }\n else {\n let dateMessage = this.dateMessages[dateTimestamp];\n if (dateMessage.firstTimestamp > date.getTime()) {\n //this.chatInner.insertBefore(dateMessage.div, containerDiv);\n containerDiv.insertBefore(dateMessage.div, bubble);\n }\n }\n }\n /* if(bubble.classList.contains('webpage')) {\n this.log('night running', bubble, bubble.scrollHeight);\n } */\n //return //this.scrollPosition.restore();\n if (!multipleRender) {\n this.scrollPosition.restore(); // лагает из-за этого\n }\n //this.log('history msg', message);\n }\n // reverse means scroll up\n getHistory(maxID = 0, reverse = false, isBackLimit = false) {\n let peerID = this.peerID;\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\n if (!maxID && dialog && dialog.top_message) {\n maxID = dialog.top_message /* + 1 */;\n }\n let loadCount = Object.keys(this.bubbles).length > 0 ?\n 20 :\n (this.chatInner.parentElement.parentElement.scrollHeight) / 30 * 1.25 | 0;\n if (testScroll) {\n loadCount = 1;\n //if(Object.keys(this.bubbles).length > 0)\n return Promise.resolve(true);\n }\n //console.time('render getHistory');\n //console.time('render history total');\n let backLimit = 0;\n if (isBackLimit) {\n backLimit = loadCount;\n loadCount = 0;\n maxID += 1;\n }\n return this.getHistoryPromise = appMessagesManager_1.default.getHistory(this.peerID, maxID, loadCount, backLimit)\n .then((result) => {\n ///////this.log('getHistory result by maxID:', maxID, reverse, isBackLimit, result);\n //console.timeEnd('render getHistory');\n if (this.peerID != peerID) {\n this.log.warn('peer changed');\n //console.timeEnd('render history total');\n return Promise.reject();\n }\n if (!result || !result.history) {\n //console.timeEnd('render history total');\n return true;\n }\n // commented bot getProfile in getHistory!\n if (!result.history /* .filter((id: number) => id > 0) */.length) {\n if (!isBackLimit) {\n this.scrolledAll = true;\n }\n else {\n this.scrolledAllDown = true;\n }\n }\n //this.chatInner.innerHTML = '';\n let history = result.history.slice();\n if (reverse)\n history.reverse();\n //console.time('render history');\n if (!isBackLimit) {\n this.scrollPosition.prepareFor(reverse ? 'up' : 'down');\n }\n let length = history.length;\n for (let i = length - 1; i >= 0; --i) {\n let msgID = history[i];\n let message = appMessagesManager_1.default.getMessage(msgID);\n this.renderMessage(message, reverse, true);\n }\n if (!isBackLimit) {\n this.scrollPosition.restore();\n }\n //console.timeEnd('render history');\n this.getHistoryPromise = undefined;\n //console.timeEnd('render history total');\n return true;\n });\n }\n setMutedState(muted = false) {\n appSidebarRight_1.default.profileElements.notificationsCheckbox.checked = !muted;\n appSidebarRight_1.default.profileElements.notificationsStatus.innerText = muted ? 'Disabled' : 'Enabled';\n let peerID = this.peerID;\n this.muted = muted;\n if (peerID < 0) { // not human\n let isChannel = appPeersManager_1.default.isChannel(peerID) && !appPeersManager_1.default.isMegagroup(peerID);\n if (isChannel) {\n this.btnMute.classList.remove('tgico-mute', 'tgico-unmute');\n this.btnMute.classList.add(muted ? 'tgico-unmute' : 'tgico-mute');\n this.btnMute.style.display = '';\n }\n else {\n this.btnMute.style.display = 'none';\n }\n }\n else {\n this.btnMute.style.display = 'none';\n }\n this.btnMenuMute.classList.remove('tgico-mute', 'tgico-unmute');\n this.btnMenuMute.classList.add(muted ? 'tgico-unmute' : 'tgico-mute');\n let rp = this.btnMenuMute.firstElementChild;\n this.btnMenuMute.innerText = muted ? 'Unmute' : 'Mute';\n this.btnMenuMute.appendChild(rp);\n }\n mutePeer() {\n let inputPeer = appPeersManager_1.default.getInputPeerByID(this.peerID);\n let inputNotifyPeer = {\n _: 'inputNotifyPeer',\n peer: inputPeer\n };\n let settings = {\n _: 'inputPeerNotifySettings',\n flags: 0,\n mute_until: 0\n };\n if (!this.muted) {\n settings.flags |= 1 << 2;\n settings.mute_until = 2147483646;\n }\n else {\n settings.flags |= 2;\n }\n apiManager_1.default.invokeApi('account.updateNotifySettings', {\n peer: inputNotifyPeer,\n settings: settings\n }).then(res => {\n this.handleUpdate({ _: 'updateNotifySettings', peer: inputNotifyPeer, notify_settings: settings });\n });\n /* return apiManager.invokeApi('account.getNotifySettings', {\n peer: inputNotifyPeer\n }).then((settings: any) => {\n settings.flags |= 2 << 1;\n settings.mute_until = 2000000000; // 2147483646\n \n return apiManager.invokeApi('account.updateNotifySettings', {\n peer: inputNotifyPeer,\n settings: Object.assign(settings, {\n _: 'inputPeerNotifySettings'\n })\n }).then(res => {\n this.log('mute result:', res);\n });\n }); */\n }\n handleUpdate(update) {\n switch (update._) {\n case 'updateUserTyping':\n case 'updateChatUserTyping':\n if (this.myID == update.user_id) {\n return;\n }\n var peerID = update._ == 'updateUserTyping' ? update.user_id : -update.chat_id;\n this.typingUsers[update.user_id] = peerID;\n if (!appUsersManager_1.default.hasUser(update.user_id)) {\n if (update.chat_id &&\n appChatsManager_1.default.hasChat(update.chat_id) &&\n !appChatsManager_1.default.isChannel(update.chat_id)) {\n appProfileManager_1.default.getChatFull(update.chat_id);\n }\n //return;\n }\n appUsersManager_1.default.forceUserOnline(update.user_id);\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\n let currentPeer = this.peerID == peerID;\n if (this.typingTimeouts[peerID])\n clearTimeout(this.typingTimeouts[peerID]);\n else if (dialog) {\n appDialogsManager_1.default.setTyping(dialog, appUsersManager_1.default.getUser(update.user_id));\n if (currentPeer) { // user\n this.setPeerStatus();\n }\n }\n this.typingTimeouts[peerID] = setTimeout(() => {\n this.typingTimeouts[peerID] = 0;\n delete this.typingUsers[update.user_id];\n if (dialog) {\n appDialogsManager_1.default.unsetTyping(dialog);\n }\n // лень просчитывать случаи\n this.setPeerStatus();\n }, 6000);\n break;\n case 'updateNotifySettings': {\n let { peer, notify_settings } = update;\n // peer was NotifyPeer\n peer = peer.peer;\n let peerID = appPeersManager_1.default.getPeerID(peer);\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\n if (dialog) {\n dialog.notify_settings = notify_settings;\n }\n if (peerID == this.peerID) {\n let muted = notify_settings.mute_until ? new Date(notify_settings.mute_until * 1000) > new Date() : false;\n this.setMutedState(muted);\n }\n /////this.log('updateNotifySettings', peerID, notify_settings);\n break;\n }\n case 'updateChatPinnedMessage':\n case 'updateUserPinnedMessage': {\n let { id } = update;\n /////this.log('updateUserPinnedMessage', update);\n this.pinnedMsgID = id;\n // hz nado li tut appMessagesIDsManager.getFullMessageID(update.max_id, channelID);\n let peerID = update.user_id || -update.chat_id || -update.channel_id;\n if (peerID == this.peerID) {\n appMessagesManager_1.default.wrapSingleMessage(id);\n }\n break;\n }\n }\n }\n}\nexports.AppImManager = AppImManager;\nconst appImManager = new AppImManager();\nexports.default = appImManager;\n" + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass AppMessagesIDsManager {\r\n constructor() {\r\n this.channelLocals = {};\r\n this.channelsByLocals = {};\r\n this.channelCurLocal = 0;\r\n this.fullMsgIDModulus = 4294967296;\r\n }\r\n getFullMessageID(msgID, channelID) {\r\n if (!channelID || msgID <= 0) {\r\n return msgID;\r\n }\r\n msgID = this.getMessageLocalID(msgID);\r\n var localStart = this.channelLocals[channelID];\r\n if (!localStart) {\r\n localStart = (++this.channelCurLocal) * this.fullMsgIDModulus;\r\n this.channelsByLocals[localStart] = channelID;\r\n this.channelLocals[channelID] = localStart;\r\n }\r\n return localStart + msgID;\r\n }\r\n getMessageIDInfo(fullMsgID) {\r\n if (fullMsgID < this.fullMsgIDModulus) {\r\n return [fullMsgID, 0];\r\n }\r\n var msgID = fullMsgID % this.fullMsgIDModulus;\r\n var channelID = this.channelsByLocals[fullMsgID - msgID];\r\n return [msgID, channelID];\r\n }\r\n getMessageLocalID(fullMsgID) {\r\n if (!fullMsgID) {\r\n return 0;\r\n }\r\n return fullMsgID % this.fullMsgIDModulus;\r\n }\r\n splitMessageIDsByChannels(mids) {\r\n var msgIDsByChannels = {};\r\n var midsByChannels = {};\r\n var i;\r\n var mid, msgChannel;\r\n var channelID;\r\n for (i = 0; i < mids.length; i++) {\r\n mid = mids[i];\r\n msgChannel = this.getMessageIDInfo(mid);\r\n channelID = msgChannel[1];\r\n if (msgIDsByChannels[channelID] === undefined) {\r\n msgIDsByChannels[channelID] = [];\r\n midsByChannels[channelID] = [];\r\n }\r\n msgIDsByChannels[channelID].push(msgChannel[0]);\r\n midsByChannels[channelID].push(mid);\r\n }\r\n return {\r\n msgIDs: msgIDsByChannels,\r\n mids: midsByChannels\r\n };\r\n }\r\n}\r\nexports.AppMessagesIDsManager = AppMessagesIDsManager;\r\nexports.default = new AppMessagesIDsManager();\r\n" }, { "id": 20, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/lottieLoader.ts", - "name": "./src/lib/lottieLoader.ts", - "index": 74, - "index2": 64, - "size": 5314, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\preloader.ts", + "name": "./src/components/preloader.ts", + "index": 56, + "index2": 49, + "size": 4010, "cacheable": true, "built": true, "optional": false, @@ -3600,44 +3539,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "issuerId": 77, - "issuerName": "./src/components/pageAuthCode.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "issuerId": 12, + "issuerName": "./src/lib/appManagers/appImManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", + "id": 12, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "name": "./src/lib/appManagers/appImManager.ts", "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 278, - "building": 994, - "dependencies": 0 + "factory": 45, + "building": 1068, + "dependencies": 99 }, "failed": false, "errors": 0, @@ -3645,49 +3584,49 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", "module": "./src/lib/appManagers/appImManager.ts", "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../lottieLoader", - "loc": "35:39-65" + "userRequest": "../../components/preloader", + "loc": "25:36-73" }, { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "type": "cjs require", + "userRequest": "../../components/preloader", + "loc": "30:36-73" + }, + { + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", "module": "./src/components/wrappers.ts", "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "17:39-69" + "userRequest": "./preloader", + "loc": "29:36-58" }, { - "moduleId": 77, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "module": "./src/components/pageAuthCode.ts", - "moduleName": "./src/components/pageAuthCode.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "20:39-69" + "userRequest": "../../components/preloader", + "loc": "11:36-73" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", "module": "./src/components/emoticonsDropdown.ts", "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "16:39-69" - }, - { - "moduleId": 84, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pagePassword.ts", - "module": "./src/components/pagePassword.ts", - "moduleName": "./src/components/pagePassword.ts", - "type": "cjs require", - "userRequest": "../lib/lottieLoader", - "loc": "18:39-69" + "userRequest": "./preloader", + "loc": "28:36-58" } ], "usedExports": true, @@ -3696,15 +3635,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//import LottiePlayer, { AnimationConfigWithPath, AnimationConfigWithData, AnimationItem } from \"lottie-web\";\n// @ts-ignore\nconst lottie_canvas_min_js_1 = __importDefault(require(\"lottie-web/build/player/lottie_canvas.min.js\"));\n//import LottiePlayer, { AnimationConfigWithPath, AnimationConfigWithData, AnimationItem } from \"lottie-web/build/player/lottie_light.min.js\";\nconst utils_1 = require(\"./utils\");\nclass LottieLoader {\n constructor() {\n this.lottie = null;\n this.animations = {};\n this.debug = false;\n }\n checkAnimations(blurred, group, destroy = false) {\n let groups = group ? [group] : Object.keys(this.animations);\n if (group && !this.animations[group]) {\n console.warn('no animation group:', group);\n this.animations[group] = [];\n //return;\n }\n for (let group of groups) {\n let animations = this.animations[group];\n let length = animations.length;\n for (let i = length - 1; i >= 0; --i) {\n let { animation, container, paused, autoplay, canvas } = animations[i];\n if (canvas && utils_1.isElementInViewport(container)) {\n let c = container.firstElementChild;\n if (!c.height && !c.width) {\n //console.log('lottie need resize');\n animation.resize();\n }\n }\n if (destroy && !utils_1.isInDOM(container)) {\n this.debug && console.log('destroy animation');\n animation.destroy();\n animations.splice(i, 1);\n continue;\n }\n if (!autoplay)\n continue;\n if (!utils_1.isElementInViewport(container) || blurred) {\n if (!paused) {\n this.debug && console.log('pause animation', utils_1.isElementInViewport(container), container);\n animation.pause();\n animations[i].paused = true;\n }\n }\n else if (paused) {\n this.debug && console.log('play animation', container);\n animation.play();\n animations[i].paused = false;\n }\n }\n }\n }\n loadAnimation(params, group = '') {\n return __awaiter(this, void 0, void 0, function* () {\n /* if(!this.lottie) {\n this.lottie = (await import(\n 'lottie-web')).default;\n this.lottie.setQuality('low');\n } */\n //params.autoplay = false;\n params.renderer = 'canvas';\n params.rendererSettings = {\n //context: canvasContext, // the canvas context\n //preserveAspectRatio: 'xMinYMin slice', // Supports the same options as the svg element's preserveAspectRatio property\n clearCanvas: true,\n progressiveLoad: true,\n hideOnTransparent: true,\n };\n if (!this.lottie) {\n this.lottie = lottie_canvas_min_js_1.default;\n //this.lottie.setQuality('low');\n this.lottie.setQuality(10);\n }\n let animation = this.lottie.loadAnimation(params);\n if (!this.animations[group])\n this.animations[group] = [];\n this.animations[group].push({\n animation,\n container: params.container,\n paused: !params.autoplay,\n autoplay: params.autoplay,\n canvas: params.renderer == 'canvas'\n });\n if (params.autoplay) {\n this.checkAnimations();\n }\n return animation;\n });\n }\n getAnimation(el, group = '') {\n let groups = group ? [group] : Object.keys(this.animations);\n //console.log('getAnimation', groups, this.animations);\n for (let group of groups) {\n let animations = this.animations[group];\n let animation = animations.find(a => a.container === el);\n if (animation)\n return animation.animation;\n }\n return null;\n }\n}\nconst lottieLoader = new LottieLoader();\n//(window as any).LottieLoader = lottieLoader;\nexports.default = lottieLoader;\n" + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../lib/utils\");\r\nclass ProgressivePreloader {\r\n constructor(elem, cancelable = true) {\r\n this.cancelable = cancelable;\r\n this.preloader = null;\r\n this.circle = null;\r\n this.progress = 0;\r\n this.promise = null;\r\n this.tempID = 0;\r\n this.detached = true;\r\n this.preloader = document.createElement('div');\r\n this.preloader.classList.add('preloader-container');\r\n this.preloader.innerHTML = `\r\n
\r\n \r\n \r\n \r\n
`;\r\n if (cancelable) {\r\n this.preloader.innerHTML += `\r\n \r\n \r\n \r\n `;\r\n }\r\n else {\r\n this.preloader.classList.add('preloader-swing');\r\n }\r\n this.circle = this.preloader.firstElementChild.firstElementChild.firstElementChild;\r\n if (elem) {\r\n this.attach(elem);\r\n }\r\n if (this.cancelable) {\r\n this.preloader.addEventListener('click', () => {\r\n if (this.promise && this.promise.cancel) {\r\n this.promise.cancel();\r\n this.detach();\r\n }\r\n });\r\n }\r\n }\r\n attach(elem, reset = true, promise) {\r\n if (promise) {\r\n this.promise = promise;\r\n let tempID = --this.tempID;\r\n promise.then(() => {\r\n if (tempID == this.tempID) {\r\n this.detach();\r\n }\r\n });\r\n promise.notify = (details) => {\r\n if (tempID != this.tempID)\r\n return;\r\n console.log('preloader download', promise, details);\r\n let percents = details.done / details.total * 100;\r\n this.setProgress(percents);\r\n };\r\n }\r\n if (this.cancelable && reset) {\r\n this.setProgress(0);\r\n }\r\n this.detached = false;\r\n window.requestAnimationFrame(() => {\r\n if (this.detached)\r\n return;\r\n this.detached = false;\r\n elem.append(this.preloader);\r\n });\r\n /* let isIn = isInDOM(this.preloader);\r\n \r\n if(isIn && this.progress != this.defaultProgress) {\r\n this.setProgress(this.defaultProgress);\r\n }\r\n \r\n elem.append(this.preloader);\r\n \r\n if(!isIn && this.progress != this.defaultProgress) {\r\n this.setProgress(this.defaultProgress);\r\n } */\r\n }\r\n detach() {\r\n this.detached = true;\r\n if (this.preloader.parentElement) {\r\n window.requestAnimationFrame(() => {\r\n if (!this.detached)\r\n return;\r\n this.detached = true;\r\n if (this.preloader.parentElement) {\r\n this.preloader.parentElement.removeChild(this.preloader);\r\n }\r\n });\r\n }\r\n }\r\n setProgress(percents) {\r\n this.progress = percents;\r\n if (!utils_1.isInDOM(this.circle)) {\r\n return;\r\n }\r\n if (percents == 0) {\r\n this.circle.style.strokeDasharray = '';\r\n return;\r\n }\r\n let totalLength = this.circle.getTotalLength();\r\n console.log('setProgress', (percents / 100 * totalLength));\r\n this.circle.style.strokeDasharray = '' + Math.max(5, percents / 100 * totalLength) + ', 200';\r\n }\r\n}\r\nexports.default = ProgressivePreloader;\r\n" }, { "id": 21, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networkerFactory.ts", - "name": "./src/lib/mtproto/networkerFactory.ts", - "index": 27, - "index2": 46, - "size": 1145, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "name": "./src/lib/appManagers/appProfileManager.ts", + "index": 58, + "index2": 52, + "size": 22565, "cacheable": true, "built": true, "optional": false, @@ -3712,44 +3651,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "issuerId": 1, - "issuerName": "./src/lib/mtproto/apiManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -3757,40 +3696,49 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./networkerFactory", - "loc": "24:43-72" + "userRequest": "./appProfileManager", + "loc": "12:44-74" }, { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 26, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", + "module": "./src/lib/appManagers/appDialogsManager.ts", + "moduleName": "./src/lib/appManagers/appDialogsManager.ts", "type": "cjs require", - "userRequest": "./networkerFactory", - "loc": "22:43-72" + "userRequest": "./appProfileManager", + "loc": "23:44-74" }, { - "moduleId": 27, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/apiUpdatesManager.ts", - "module": "./src/lib/appManagers/apiUpdatesManager.ts", - "moduleName": "./src/lib/appManagers/apiUpdatesManager.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "../mtproto/networkerFactory", - "loc": "7:43-81" + "userRequest": "./appProfileManager", + "loc": "16:44-74" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "./networkerFactory", - "loc": "30:43-72" + "userRequest": "./appProfileManager", + "loc": "20:44-74" + }, + { + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", + "type": "cjs require", + "userRequest": "./appManagers/appProfileManager", + "loc": "14:44-86" } ], "usedExports": true, @@ -3799,15 +3747,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst networker_1 = require(\"./networker\");\nclass NetworkerFactory {\n constructor() {\n this.updatesProcessor = null;\n this.offlineInited = false;\n this.akStopped = false;\n /* $rootScope.retryOnline = function() {\n $(document.body).trigger('online');\n } */\n }\n startAll() {\n if (this.akStopped) {\n this.akStopped = false;\n if (this.updatesProcessor) {\n this.updatesProcessor({\n _: 'new_session_created'\n }, true);\n }\n }\n }\n stopAll() {\n this.akStopped = true;\n }\n setUpdatesProcessor(callback) {\n this.updatesProcessor = callback;\n }\n getNetworker(dcID, authKey, authKeyID, serverSalt, options) {\n //console.log(dT(), 'NetworkerFactory: creating new instance of MTPNetworker:', dcID, options);\n return new networker_1.MTPNetworker(dcID, authKey, authKeyID, serverSalt, options);\n }\n}\nexports.NetworkerFactory = NetworkerFactory;\nexports.default = new NetworkerFactory();\n" + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../utils\");\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\n//import apiManager from '../mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\r\nconst misc_1 = require(\"../../components/misc\");\r\nclass AppProfileManager {\r\n constructor() {\r\n this.botInfos = {};\r\n this.usersFull = {};\r\n this.chatsFull = {};\r\n this.chatFullPromises = {};\r\n this.chatParticipantsPromises = {};\r\n this.savedAvatarURLs = {};\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n let update = e.detail;\r\n // console.log('on apiUpdate', update)\r\n switch (update._) {\r\n case 'updateChatParticipants':\r\n var participants = update.participants;\r\n var chatFull = this.chatsFull[participants.id];\r\n if (chatFull !== undefined) {\r\n chatFull.participants = update.participants;\r\n utils_1.$rootScope.$broadcast('chat_full_update', update.chat_id);\r\n }\r\n break;\r\n case 'updateChatParticipantAdd':\r\n var chatFull = this.chatsFull[update.chat_id];\r\n if (chatFull !== undefined) {\r\n var participants = chatFull.participants.participants || [];\r\n for (var i = 0, length = participants.length; i < length; i++) {\r\n if (participants[i].user_id == update.user_id) {\r\n return;\r\n }\r\n }\r\n participants.push({\r\n _: 'chatParticipant',\r\n user_id: update.user_id,\r\n inviter_id: update.inviter_id,\r\n date: utils_1.tsNow(true)\r\n });\r\n chatFull.participants.version = update.version;\r\n utils_1.$rootScope.$broadcast('chat_full_update', update.chat_id);\r\n }\r\n break;\r\n case 'updateChatParticipantDelete':\r\n var chatFull = this.chatsFull[update.chat_id];\r\n if (chatFull !== undefined) {\r\n var participants = chatFull.participants.participants || [];\r\n for (var i = 0, length = participants.length; i < length; i++) {\r\n if (participants[i].user_id == update.user_id) {\r\n participants.splice(i, 1);\r\n chatFull.participants.version = update.version;\r\n utils_1.$rootScope.$broadcast('chat_full_update', update.chat_id);\r\n return;\r\n }\r\n }\r\n }\r\n break;\r\n case 'updateChannelPinnedMessage':\r\n var channelID = update.channel_id;\r\n var fullChannel = this.chatsFull[channelID];\r\n if (fullChannel !== undefined) {\r\n fullChannel.pinned_msg_id = appMessagesIDsManager_1.default.getFullMessageID(update.id, channelID);\r\n utils_1.$rootScope.$broadcast('peer_pinned_message', -channelID);\r\n }\r\n break;\r\n }\r\n });\r\n utils_1.$rootScope.$on('chat_update', (e) => {\r\n let chatID = e.detail;\r\n var fullChat = this.chatsFull[chatID];\r\n var chat = appChatsManager_1.default.getChat(chatID);\r\n if (!chat.photo || !fullChat) {\r\n return;\r\n }\r\n var emptyPhoto = chat.photo._ == 'chatPhotoEmpty';\r\n //////console.log('chat_update:', fullChat);\r\n if (fullChat.chat_photo && emptyPhoto != (fullChat.chat_photo._ == 'photoEmpty')) {\r\n delete this.chatsFull[chatID];\r\n utils_1.$rootScope.$broadcast('chat_full_update', chatID);\r\n return;\r\n }\r\n if (emptyPhoto) {\r\n return;\r\n }\r\n var smallUserpic = chat.photo.photo_small;\r\n var smallPhotoSize = appPhotosManager_1.default.choosePhotoSize(fullChat.chat_photo, 0, 0);\r\n if (JSON.stringify(smallUserpic) !== JSON.stringify(smallPhotoSize.location)) {\r\n delete this.chatsFull[chatID];\r\n utils_1.$rootScope.$broadcast('chat_full_update', chatID);\r\n }\r\n });\r\n }\r\n saveBotInfo(botInfo) {\r\n var botID = botInfo && botInfo.user_id;\r\n if (!botID) {\r\n return false;\r\n }\r\n var commands = {};\r\n botInfo.commands.forEach((botCommand) => {\r\n commands[botCommand.command] = botCommand.description;\r\n });\r\n return this.botInfos[botID] = {\r\n id: botID,\r\n version: botInfo.version,\r\n shareText: botInfo.share_text,\r\n description: botInfo.description,\r\n commands: commands\r\n };\r\n }\r\n getProfile(id, override) {\r\n if (this.usersFull[id]) {\r\n return Promise.resolve(this.usersFull[id]);\r\n }\r\n return mtprotoworker_1.default.invokeApi('users.getFullUser', {\r\n id: appUsersManager_1.default.getUserInput(id)\r\n }).then((userFull) => {\r\n if (override && override.phone_number) {\r\n userFull.user.phone = override.phone_number;\r\n if (override.first_name || override.last_name) {\r\n userFull.user.first_name = override.first_name;\r\n userFull.user.last_name = override.last_name;\r\n }\r\n appUsersManager_1.default.saveApiUser(userFull.user);\r\n }\r\n else {\r\n appUsersManager_1.default.saveApiUser(userFull.user, true);\r\n }\r\n if (userFull.profile_photo) {\r\n userFull.profile_photo = appPhotosManager_1.default.savePhoto(userFull.profile_photo, { user_id: id });\r\n /* appPhotosManager.savePhoto(userFull.profile_photo, {user_id: id}); */\r\n }\r\n if (userFull.about !== undefined) {\r\n userFull.rAbout = richtextprocessor_1.RichTextProcessor.wrapRichText(userFull.about, { noLinebreaks: true });\r\n }\r\n // NotificationsManager.savePeerSettings(id, userFull.notify_settings); // warning\r\n if (userFull.bot_info) {\r\n userFull.bot_info = this.saveBotInfo(userFull.bot_info);\r\n }\r\n return this.usersFull[id] = userFull;\r\n });\r\n }\r\n getPeerBots(peerID) {\r\n var peerBots = [];\r\n if (peerID >= 0 && !appUsersManager_1.default.isBot(peerID) ||\r\n (appPeersManager_1.default.isChannel(peerID) && !appPeersManager_1.default.isMegagroup(peerID))) {\r\n return Promise.resolve(peerBots);\r\n }\r\n if (peerID >= 0) {\r\n return this.getProfile(peerID).then((userFull) => {\r\n var botInfo = userFull.bot_info;\r\n if (botInfo && botInfo._ != 'botInfoEmpty') {\r\n peerBots.push(botInfo);\r\n }\r\n return peerBots;\r\n });\r\n }\r\n return this.getChatFull(-peerID).then((chatFull) => {\r\n chatFull.bot_info.forEach((botInfo) => {\r\n peerBots.push(this.saveBotInfo(botInfo));\r\n });\r\n return peerBots;\r\n });\r\n }\r\n getChatFull(id) {\r\n if (appChatsManager_1.default.isChannel(id)) {\r\n return this.getChannelFull(id);\r\n }\r\n if (this.chatsFull[id] !== undefined) {\r\n var chat = appChatsManager_1.default.getChat(id);\r\n if (chat.version == this.chatsFull[id].participants.version ||\r\n chat.pFlags.left) {\r\n return Promise.resolve(this.chatsFull[id]);\r\n }\r\n }\r\n if (this.chatFullPromises[id] !== undefined) {\r\n return this.chatFullPromises[id];\r\n }\r\n // console.trace(dT(), 'Get chat full', id, appChatsManager.getChat(id))\r\n return this.chatFullPromises[id] = mtprotoworker_1.default.invokeApi('messages.getFullChat', {\r\n chat_id: appChatsManager_1.default.getChatInput(id)\r\n }).then((result) => {\r\n appChatsManager_1.default.saveApiChats(result.chats);\r\n appUsersManager_1.default.saveApiUsers(result.users);\r\n var fullChat = result.full_chat;\r\n if (fullChat && fullChat.chat_photo && fullChat.chat_photo.id) {\r\n fullChat.chat_photo = appPhotosManager_1.default.savePhoto(fullChat.chat_photo);\r\n //appPhotosManager.savePhoto(fullChat.chat_photo);\r\n }\r\n /* NotificationsManager.savePeerSettings(-id, fullChat.notify_settings); */ // warning\r\n delete this.chatFullPromises[id];\r\n this.chatsFull[id] = fullChat;\r\n utils_1.$rootScope.$broadcast('chat_full_update', id);\r\n return fullChat;\r\n });\r\n }\r\n getChatInviteLink(id, force) {\r\n return this.getChatFull(id).then((chatFull) => {\r\n if (!force &&\r\n chatFull.exported_invite &&\r\n chatFull.exported_invite._ == 'chatInviteExported') {\r\n return chatFull.exported_invite.link;\r\n }\r\n var promise;\r\n if (appChatsManager_1.default.isChannel(id)) {\r\n promise = mtprotoworker_1.default.invokeApi('channels.exportInvite', {\r\n channel: appChatsManager_1.default.getChannelInput(id)\r\n });\r\n }\r\n else {\r\n promise = mtprotoworker_1.default.invokeApi('messages.exportChatInvite', {\r\n chat_id: appChatsManager_1.default.getChatInput(id)\r\n });\r\n }\r\n return promise.then((exportedInvite) => {\r\n if (this.chatsFull[id] !== undefined) {\r\n this.chatsFull[id].exported_invite = exportedInvite;\r\n }\r\n return exportedInvite.link;\r\n });\r\n });\r\n }\r\n getChannelParticipants(id, filter, limit, offset) {\r\n filter = filter || { _: 'channelParticipantsRecent' };\r\n limit = limit || 200;\r\n offset = offset || 0;\r\n var promiseKey = [id, filter._, offset, limit].join('_');\r\n var promiseData = this.chatParticipantsPromises[promiseKey];\r\n if (filter._ == 'channelParticipantsRecent') {\r\n var chat = appChatsManager_1.default.getChat(id);\r\n if (chat &&\r\n chat.pFlags && (chat.pFlags.kicked ||\r\n chat.pFlags.broadcast && !chat.pFlags.creator && !chat.admin_rights)) {\r\n return Promise.reject();\r\n }\r\n }\r\n var fetchParticipants = (cachedParticipants) => {\r\n var hash = 0;\r\n if (cachedParticipants) {\r\n var userIDs = [];\r\n cachedParticipants.forEach((participant) => {\r\n userIDs.push(participant.user_id);\r\n });\r\n userIDs.sort();\r\n userIDs.forEach((userID) => {\r\n hash = ((hash * 20261) + 0x80000000 + userID) % 0x80000000;\r\n });\r\n }\r\n return mtprotoworker_1.default.invokeApi('channels.getParticipants', {\r\n channel: appChatsManager_1.default.getChannelInput(id),\r\n filter: filter,\r\n offset: offset,\r\n limit: limit,\r\n hash: hash\r\n }).then((result) => {\r\n if (result._ == 'channels.channelParticipantsNotModified') {\r\n return cachedParticipants;\r\n }\r\n appUsersManager_1.default.saveApiUsers(result.users);\r\n return result.participants;\r\n });\r\n };\r\n var maybeAddSelf = (participants) => {\r\n var chat = appChatsManager_1.default.getChat(id);\r\n var selfMustBeFirst = filter._ == 'channelParticipantsRecent' &&\r\n !offset &&\r\n !chat.pFlags.kicked &&\r\n !chat.pFlags.left;\r\n if (selfMustBeFirst) {\r\n participants = utils_1.copy(participants);\r\n var myID = appUsersManager_1.default.getSelf().id;\r\n var myIndex = false;\r\n var myParticipant;\r\n for (var i = 0, len = participants.length; i < len; i++) {\r\n if (participants[i].user_id == myID) {\r\n myIndex = i;\r\n break;\r\n }\r\n }\r\n if (myIndex !== false) {\r\n myParticipant = participants[i];\r\n participants.splice(i, 1);\r\n }\r\n else {\r\n myParticipant = { _: 'channelParticipantSelf', user_id: myID };\r\n }\r\n participants.unshift(myParticipant);\r\n }\r\n return participants;\r\n };\r\n var timeNow = utils_1.tsNow();\r\n if (promiseData !== undefined) {\r\n var promise = promiseData[1];\r\n if (promiseData[0] > timeNow - 60000) {\r\n return promise;\r\n }\r\n let newPromise = promise.then((cachedParticipants) => {\r\n return fetchParticipants(cachedParticipants).then(maybeAddSelf);\r\n });\r\n this.chatParticipantsPromises[promiseKey] = [timeNow, newPromise];\r\n return newPromise;\r\n }\r\n var newPromise = fetchParticipants().then(maybeAddSelf);\r\n this.chatParticipantsPromises[promiseKey] = [timeNow, newPromise];\r\n return newPromise;\r\n }\r\n getChannelFull(id, force) {\r\n if (this.chatsFull[id] !== undefined && !force) {\r\n return Promise.resolve(this.chatsFull[id]);\r\n }\r\n if (this.chatFullPromises[id] !== undefined) {\r\n return this.chatFullPromises[id];\r\n }\r\n return this.chatFullPromises[id] = mtprotoworker_1.default.invokeApi('channels.getFullChannel', {\r\n channel: appChatsManager_1.default.getChannelInput(id)\r\n }).then((result) => {\r\n appChatsManager_1.default.saveApiChats(result.chats);\r\n appUsersManager_1.default.saveApiUsers(result.users);\r\n var fullChannel = result.full_chat;\r\n if (fullChannel && fullChannel.chat_photo.id) {\r\n fullChannel.chat_photo = appPhotosManager_1.default.savePhoto(fullChannel.chat_photo);\r\n //appPhotosManager.savePhoto(fullChannel.chat_photo);\r\n }\r\n /* NotificationsManager.savePeerSettings(-id, fullChannel.notify_settings) */ // warning\r\n if (fullChannel.pinned_msg_id) {\r\n fullChannel.pinned_msg_id = appMessagesIDsManager_1.default.getFullMessageID(fullChannel.pinned_msg_id, id);\r\n }\r\n delete this.chatFullPromises[id];\r\n this.chatsFull[id] = fullChannel;\r\n utils_1.$rootScope.$broadcast('chat_full_update', id);\r\n return fullChannel;\r\n }, (error) => {\r\n switch (error.type) {\r\n case 'CHANNEL_PRIVATE':\r\n var channel = appChatsManager_1.default.getChat(id);\r\n channel = { _: 'channelForbidden', access_hash: channel.access_hash, title: channel.title };\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updates',\r\n updates: [{\r\n _: 'updateChannel',\r\n channel_id: id\r\n }],\r\n chats: [channel],\r\n users: []\r\n });\r\n break;\r\n }\r\n return Promise.reject(error);\r\n });\r\n }\r\n invalidateChannelParticipants(id) {\r\n delete this.chatsFull[id];\r\n delete this.chatFullPromises[id];\r\n for (let key in this.chatParticipantsPromises) {\r\n //let val = this.chatParticipantsPromises[key];\r\n if (+key.split('_')[0] == id) {\r\n delete this.chatParticipantsPromises[key];\r\n }\r\n }\r\n utils_1.$rootScope.$broadcast('chat_full_update', id);\r\n }\r\n getChannelPinnedMessage(id) {\r\n return this.getChannelFull(id).then((fullChannel) => {\r\n var pinnedMessageID = fullChannel && fullChannel.pinned_msg_id;\r\n if (!pinnedMessageID) {\r\n return false;\r\n }\r\n return storage_1.default.get('pinned_hidden' + id).then((hiddenMessageID) => {\r\n if (appMessagesIDsManager_1.default.getMessageLocalID(pinnedMessageID) == hiddenMessageID) {\r\n return false;\r\n }\r\n return pinnedMessageID;\r\n });\r\n });\r\n }\r\n hideChannelPinnedMessage(id, pinnedMessageID) {\r\n var setKeys = {};\r\n setKeys['pinned_hidden' + id] = appMessagesIDsManager_1.default.getMessageLocalID(pinnedMessageID);\r\n storage_1.default.set(setKeys);\r\n utils_1.$rootScope.$broadcast('peer_pinned_message', -id);\r\n }\r\n // peerID == peerID || title\r\n putPhoto(div, peerID, isDialog = false, title = '') {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let inputPeer;\r\n let location;\r\n if (peerID) {\r\n inputPeer = appPeersManager_1.default.getInputPeerByID(peerID);\r\n location = appPeersManager_1.default.getPeerPhoto(peerID);\r\n }\r\n let myID = utils_1.$rootScope.myID;\r\n //console.log('loadDialogPhoto location:', location, inputPeer);\r\n if (peerID == myID && (isDialog || utils_1.$rootScope.selectedPeerID == myID)) {\r\n if (div.firstChild) {\r\n div.firstChild.remove();\r\n }\r\n div.style.backgroundColor = '';\r\n div.classList.add('tgico-savedmessages');\r\n div.classList.remove('tgico-avatar_deletedaccount');\r\n return true;\r\n }\r\n if (peerID) {\r\n let user = appUsersManager_1.default.getUser(peerID);\r\n if (user && user.pFlags && user.pFlags.deleted) {\r\n if (div.firstChild) {\r\n div.firstChild.remove();\r\n }\r\n div.style.backgroundColor = '';\r\n div.classList.add('tgico-avatar_deletedaccount');\r\n return true;\r\n }\r\n }\r\n //if(!location || location.empty || !location.photo_small) {\r\n if (div.firstChild) {\r\n div.firstChild.remove();\r\n }\r\n let color = '';\r\n if (peerID && peerID != myID) {\r\n color = appPeersManager_1.default.getPeerColorByID(peerID);\r\n }\r\n div.classList.remove('tgico-savedmessages', 'tgico-avatar_deletedaccount');\r\n div.style.backgroundColor = color;\r\n let abbrSplitted = (!title && peerID ? appPeersManager_1.default.getPeerTitle(peerID, true) : title).split(' ');\r\n let abbr = (abbrSplitted.length == 2 ?\r\n abbrSplitted[0][0] + abbrSplitted[1][0] :\r\n abbrSplitted[0][0]).toUpperCase();\r\n //div.innerText = peer.initials.toUpperCase();\r\n div.innerText = abbr.toUpperCase();\r\n //return Promise.resolve(true);\r\n //}\r\n if (!location || location.empty || !location.photo_small) {\r\n return true;\r\n }\r\n if (!this.savedAvatarURLs[peerID]) {\r\n let res = yield apiFileManager_1.default.downloadSmallFile({\r\n _: 'inputPeerPhotoFileLocation',\r\n dc_id: location.dc_id,\r\n flags: 0,\r\n peer: inputPeer,\r\n volume_id: location.photo_small.volume_id,\r\n local_id: location.photo_small.local_id\r\n });\r\n this.savedAvatarURLs[peerID] = URL.createObjectURL(res);\r\n }\r\n let img = new Image();\r\n misc_1.renderImageFromUrl(img, this.savedAvatarURLs[peerID]);\r\n div.innerHTML = '';\r\n //div.style.fontSize = '0'; // need\r\n //div.style.backgroundColor = '';\r\n //window.requestAnimationFrame(() => {\r\n div.append(img);\r\n //});\r\n return true;\r\n });\r\n }\r\n}\r\nexports.AppProfileManager = AppProfileManager;\r\nexports.default = new AppProfileManager();\r\n" }, { "id": 22, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", - "index": 34, - "index2": 33, - "size": 2930, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtproto_config.ts", + "name": "./src/lib/mtproto/mtproto_config.ts", + "index": 19, + "index2": 17, + "size": 567, "cacheable": true, "built": true, "optional": false, @@ -3815,44 +3763,33 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "issuerId": 1, - "issuerName": "./src/lib/mtproto/apiManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\storage.ts", + "issuerId": 7, + "issuerName": "./src/lib/storage.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 7, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\storage.ts", + "name": "./src/lib/storage.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "dependencies": 1062 } } ], "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 600, + "building": 134 }, "failed": false, "errors": 0, @@ -3860,40 +3797,40 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", + "moduleId": 7, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\storage.ts", + "module": "./src/lib/storage.ts", + "moduleName": "./src/lib/storage.ts", "type": "cjs require", - "userRequest": "./dcConfigurator", - "loc": "29:41-68" + "userRequest": "./mtproto/mtproto_config", + "loc": "3:25-60" }, { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", "type": "cjs require", - "userRequest": "./dcConfigurator", - "loc": "17:41-68" + "userRequest": "../lib/mtproto/mtproto_config", + "loc": "15:25-65" }, { - "moduleId": 44, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", + "moduleId": 62, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "module": "./src/pages/pageAuthCode.ts", + "moduleName": "./src/pages/pageAuthCode.ts", "type": "cjs require", - "userRequest": "./dcConfigurator", - "loc": "16:41-68" + "userRequest": "../lib/mtproto/mtproto_config", + "loc": "15:25-65" }, { "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.ts", + "module": "./src/lib/mtproto/mtproto.ts", + "moduleName": "./src/lib/mtproto/mtproto.ts", "type": "cjs require", - "userRequest": "./dcConfigurator", - "loc": "31:41-68" + "userRequest": "./mtproto_config", + "loc": "8:25-52" } ], "usedExports": true, @@ -3901,16 +3838,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst websocket_1 = __importDefault(require(\"./transports/websocket\"));\nconst http_1 = __importDefault(require(\"./transports/http\"));\nclass DcConfigurator {\n constructor() {\n this.sslSubdomains = ['pluto', 'venus', 'aurora', 'vesta', 'flora'];\n this.dcOptions = Config.Modes.test\n ? [\n { id: 1, host: '149.154.175.10', port: 80 },\n { id: 2, host: '149.154.167.40', port: 80 },\n { id: 3, host: '149.154.175.117', port: 80 }\n ]\n : [\n { id: 1, host: '149.154.175.50', port: 80 },\n { id: 2, host: '149.154.167.50', port: 80 },\n { id: 3, host: '149.154.175.100', port: 80 },\n { id: 4, host: '149.154.167.91', port: 80 },\n { id: 5, host: '149.154.171.5', port: 80 }\n ];\n this.chosenServers = {\n websocket: {},\n https: {},\n http: {}\n };\n this.chosenUploadServers = {\n websocket: {},\n https: {},\n http: {}\n };\n }\n chooseServer(dcID, upload, transport = 'websocket') {\n let servers = upload && (transport != 'websocket' || Config.Modes.multipleConnections)\n ? this.chosenUploadServers[transport]\n : this.chosenServers[transport];\n if (!(dcID in servers)) {\n let chosenServer = '';\n if (transport == 'websocket') {\n let subdomain = this.sslSubdomains[dcID - 1];\n let path = Config.Modes.test ? 'apiws_test' : 'apiws';\n chosenServer = 'wss://' + subdomain + '.web.telegram.org/' + path;\n return servers[dcID] = new websocket_1.default(dcID, chosenServer);\n }\n if (Config.Modes.ssl || !Config.Modes.http || transport == 'https') {\n let subdomain = this.sslSubdomains[dcID - 1] + (upload ? '-1' : '');\n let path = Config.Modes.test ? 'apiw_test1' : 'apiw1';\n chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path;\n return servers[dcID] = new http_1.default(dcID, chosenServer);\n }\n for (let dcOption of this.dcOptions) {\n if (dcOption.id == dcID) {\n chosenServer = 'http://' + dcOption.host + (dcOption.port != 80 ? ':' + dcOption.port : '') + '/apiw1';\n return servers[dcID] = new http_1.default(dcID, chosenServer);\n }\n }\n console.error('No chosenServer!', dcID);\n return null;\n }\n return servers[dcID];\n }\n}\nexports.DcConfigurator = DcConfigurator;\nexports.default = new DcConfigurator();\n" + "depth": 2, + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.App = {\r\n id: 1025907,\r\n hash: '452b0359b988148995f22ff0f4229750',\r\n version: '0.3.0',\r\n domains: [],\r\n baseDcID: 2\r\n};\r\nexports.Modes = {\r\n test: location.search.indexOf('test=1') > 0 /* || true */,\r\n debug: location.search.indexOf('debug=1') > 0,\r\n http: location.search.indexOf('http=1') > 0,\r\n ssl: location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:' && location.search.indexOf('ssl=0') == -1,\r\n multipleConnections: true\r\n};\r\n" }, { "id": 23, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/serverTimeManager.ts", - "name": "./src/lib/mtproto/serverTimeManager.ts", - "index": 44, - "index2": 37, - "size": 1250, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", + "index": 35, + "index2": 68, + "size": 3012, "cacheable": true, "built": true, "optional": false, @@ -3918,54 +3855,127 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appUsersManager.ts", - "issuerId": 4, - "issuerName": "./src/lib/appManagers/appUsersManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "issuerId": 44, + "issuerName": "./src/index.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } + } + ], + "profile": { + "factory": 842, + "building": 0, + "dependencies": 1062 + }, + "failed": false, + "errors": 0, + "warnings": 0, + "assets": [], + "reasons": [ + { + "moduleId": 44, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "module": "./src/index.ts", + "moduleName": "./src/index.ts", + "type": "cjs require", + "userRequest": "./pages/pageIm", + "loc": "76:57-82" }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "moduleId": 62, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "module": "./src/pages/pageAuthCode.ts", + "moduleName": "./src/pages/pageAuthCode.ts", + "type": "cjs require", + "userRequest": "./pageIm", + "loc": "8:33-52" + }, + { + "moduleId": 63, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "module": "./src/pages/pageSignUp.ts", + "moduleName": "./src/pages/pageSignUp.ts", + "type": "cjs require", + "userRequest": "./pageIm", + "loc": "8:33-52" + }, + { + "moduleId": 74, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagePassword.ts", + "module": "./src/pages/pagePassword.ts", + "moduleName": "./src/pages/pagePassword.ts", + "type": "cjs require", + "userRequest": "./pageIm", + "loc": "6:33-52" + } + ], + "usedExports": true, + "providedExports": null, + "optimizationBailout": [ + "ModuleConcatenation bailout: Module is not an ECMAScript module" + ], + "depth": 1, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst misc_1 = require(\"../components/misc\");\r\n//import {stackBlurImage} from '../lib/StackBlur';\r\nconst page_1 = __importDefault(require(\"./page\"));\r\nlet onFirstMount = () => Promise.resolve().then(() => __importStar(require('../lib/appManagers/appImManager'))).then(() => {\r\n /* fetch('assets/img/camomile.jpg')\r\n .then(res => res.blob())\r\n .then(blob => {\r\n let img = new Image();\r\n let url = URL.createObjectURL(blob);\r\n img.src = url;\r\n img.onload = () => {\r\n let id = 'chat-background-canvas';\r\n var canvas = document.getElementById(id) as HTMLCanvasElement;\r\n //URL.revokeObjectURL(url);\r\n \r\n let elements = ['.chat-container'].map(selector => {\r\n return document.querySelector(selector) as HTMLDivElement;\r\n });\r\n \r\n stackBlurImage(img, id, 15, 0);\r\n \r\n canvas.toBlob(blob => {\r\n //let dataUrl = canvas.toDataURL('image/jpeg', 1);\r\n let dataUrl = URL.createObjectURL(blob);\r\n \r\n elements.forEach(el => {\r\n el.style.backgroundImage = 'url(' + dataUrl + ')';\r\n });\r\n }, 'image/jpeg', 1);\r\n };\r\n }); */\r\n /* toggleEmoticons.onclick = (e) => {\r\n if(!emoticonsDropdown) {\r\n emoticonsDropdown = initEmoticonsDropdown(pageEl, appImManager,\r\n appMessagesManager, messageInput, toggleEmoticons);\r\n } else {\r\n emoticonsDropdown.classList.toggle('active');\r\n }\r\n \r\n toggleEmoticons.classList.toggle('active');\r\n }; */\r\n Promise.resolve().then(() => __importStar(require('../lib/services')));\r\n Array.from(document.getElementsByClassName('rp')).forEach(el => misc_1.ripple(el));\r\n Array.from(document.getElementsByClassName('btn-menu-toggle')).forEach((el) => {\r\n el.addEventListener('click', (e) => {\r\n //console.log('click pageIm');\r\n if (!el.classList.contains('btn-menu-toggle'))\r\n return false;\r\n //window.removeEventListener('mousemove', onMouseMove);\r\n let openedMenu = el.querySelector('.btn-menu');\r\n e.cancelBubble = true;\r\n if (el.classList.contains('menu-open')) {\r\n el.classList.remove('menu-open');\r\n openedMenu.classList.remove('active');\r\n }\r\n else {\r\n misc_1.openBtnMenu(openedMenu);\r\n }\r\n });\r\n });\r\n});\r\nconst page = new page_1.default('page-chats', false, onFirstMount);\r\nexports.default = page;\r\n" + }, + { + "id": 24, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts", + "name": "./src/lib/appManagers/apiUpdatesManager.ts", + "index": 49, + "index2": 43, + "size": 20502, + "cacheable": true, + "built": true, + "optional": false, + "prefetched": false, + "chunks": [ + 0 + ], + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", + "issuerPath": [ + { + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "name": "./src/index.ts", "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 + "factory": 44, + "building": 1570 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 842, + "building": 0, + "dependencies": 1062 } }, { - "id": 4, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appUsersManager.ts", - "name": "./src/lib/appManagers/appUsersManager.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 974, - "building": 125, - "dependencies": 0 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -3973,40 +3983,40 @@ "assets": [], "reasons": [ { - "moduleId": 4, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appUsersManager.ts", - "module": "./src/lib/appManagers/appUsersManager.ts", - "moduleName": "./src/lib/appManagers/appUsersManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "10:44-83" + "userRequest": "./apiUpdatesManager", + "loc": "23:44-74" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", "module": "./src/lib/appManagers/appMessagesManager.ts", "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "26:44-83" + "userRequest": "./apiUpdatesManager", + "loc": "22:44-74" }, { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", + "moduleId": 21, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appProfileManager.ts", + "module": "./src/lib/appManagers/appProfileManager.ts", + "moduleName": "./src/lib/appManagers/appProfileManager.ts", "type": "cjs require", - "userRequest": "../mtproto/serverTimeManager", - "loc": "31:44-83" + "userRequest": "./apiUpdatesManager", + "loc": "22:44-74" }, { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "./serverTimeManager", - "loc": "20:44-74" + "userRequest": "./appManagers/apiUpdatesManager", + "loc": "10:44-86" } ], "usedExports": true, @@ -4014,16 +4024,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst storage_1 = __importDefault(require(\"../storage\"));\nconst utils_1 = require(\"../utils\");\nclass ServerTimeManager {\n constructor() {\n this.timestampNow = utils_1.tsNow(true);\n this.midnightNoOffset = this.timestampNow - (this.timestampNow % 86400);\n this.midnightOffseted = new Date();\n this.midnightOffset = this.midnightNoOffset - (Math.floor(+this.midnightOffseted / 1000));\n this.serverTimeOffset = 0;\n this.timeParams = {\n midnightOffset: this.midnightOffset,\n serverTimeOffset: this.serverTimeOffset\n };\n this.midnightOffseted.setHours(0);\n this.midnightOffseted.setMinutes(0);\n this.midnightOffseted.setSeconds(0);\n storage_1.default.get('server_time_offset').then((to) => {\n if (to) {\n this.serverTimeOffset = to;\n this.timeParams.serverTimeOffset = to;\n }\n });\n }\n}\nexports.ServerTimeManager = ServerTimeManager;\nexports.default = new ServerTimeManager();\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n//import apiManager from '../mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\n//import networkerFactory from '../mtproto/networkerFactory';\r\nconst utils_1 = require(\"../utils\");\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nclass ApiUpdatesManager {\r\n constructor() {\r\n this.updatesState = {\r\n pendingPtsUpdates: [],\r\n pendingSeqUpdates: {},\r\n syncPending: false,\r\n syncLoading: true\r\n };\r\n this.channelStates = {};\r\n this.myID = 0;\r\n mtprotoworker_1.default.getUserID().then((id) => {\r\n this.myID = id;\r\n });\r\n }\r\n popPendingSeqUpdate() {\r\n var nextSeq = this.updatesState.seq + 1;\r\n var pendingUpdatesData = this.updatesState.pendingSeqUpdates[nextSeq];\r\n if (!pendingUpdatesData) {\r\n return false;\r\n }\r\n var updates = pendingUpdatesData.updates;\r\n var length;\r\n for (var i = 0, length = updates.length; i < length; i++) {\r\n this.saveUpdate(updates[i]);\r\n }\r\n this.updatesState.seq = pendingUpdatesData.seq;\r\n if (pendingUpdatesData.date && this.updatesState.date < pendingUpdatesData.date) {\r\n this.updatesState.date = pendingUpdatesData.date;\r\n }\r\n delete this.updatesState.pendingSeqUpdates[nextSeq];\r\n if (!this.popPendingSeqUpdate() &&\r\n this.updatesState.syncPending &&\r\n this.updatesState.syncPending.seqAwaiting &&\r\n this.updatesState.seq >= this.updatesState.syncPending.seqAwaiting) {\r\n if (!this.updatesState.syncPending.ptsAwaiting) {\r\n clearTimeout(this.updatesState.syncPending.timeout);\r\n this.updatesState.syncPending = false;\r\n }\r\n else {\r\n delete this.updatesState.syncPending.seqAwaiting;\r\n }\r\n }\r\n return true;\r\n }\r\n popPendingPtsUpdate(channelID) {\r\n var curState = channelID ? this.getChannelState(channelID) : this.updatesState;\r\n if (!curState.pendingPtsUpdates.length) {\r\n return false;\r\n }\r\n curState.pendingPtsUpdates.sort((a, b) => {\r\n return a.pts - b.pts;\r\n });\r\n // console.log(dT(), 'pop update', channelID, curState.pendingPtsUpdates)\r\n var curPts = curState.pts;\r\n var goodPts = false;\r\n var goodIndex = 0;\r\n var update;\r\n for (var i = 0, length = curState.pendingPtsUpdates.length; i < length; i++) {\r\n update = curState.pendingPtsUpdates[i];\r\n curPts += update.pts_count;\r\n if (curPts >= update.pts) {\r\n goodPts = update.pts;\r\n goodIndex = i;\r\n }\r\n }\r\n if (!goodPts) {\r\n return false;\r\n }\r\n console.log(utils_1.dT(), 'pop pending pts updates', goodPts, curState.pendingPtsUpdates.slice(0, goodIndex + 1));\r\n curState.pts = goodPts;\r\n for (i = 0; i <= goodIndex; i++) {\r\n update = curState.pendingPtsUpdates[i];\r\n this.saveUpdate(update);\r\n }\r\n curState.pendingPtsUpdates.splice(0, goodIndex + 1);\r\n if (!curState.pendingPtsUpdates.length && curState.syncPending) {\r\n if (!curState.syncPending.seqAwaiting) {\r\n clearTimeout(curState.syncPending.timeout);\r\n curState.syncPending = false;\r\n }\r\n else {\r\n delete curState.syncPending.ptsAwaiting;\r\n }\r\n }\r\n return true;\r\n }\r\n forceGetDifference() {\r\n if (!this.updatesState.syncLoading) {\r\n this.getDifference();\r\n }\r\n }\r\n processUpdateMessage(updateMessage) {\r\n // return forceGetDifference()\r\n var processOpts = {\r\n date: updateMessage.date,\r\n seq: updateMessage.seq,\r\n seqStart: updateMessage.seq_start\r\n };\r\n switch (updateMessage._) {\r\n case 'updatesTooLong':\r\n case 'new_session_created':\r\n this.forceGetDifference();\r\n break;\r\n case 'updateShort':\r\n this.processUpdate(updateMessage.update, processOpts);\r\n break;\r\n case 'updateShortMessage':\r\n case 'updateShortChatMessage':\r\n var isOut = updateMessage.flags & 2;\r\n var fromID = updateMessage.from_id || (isOut ? this.myID : updateMessage.user_id);\r\n var toID = updateMessage.chat_id\r\n ? -updateMessage.chat_id\r\n : (isOut ? updateMessage.user_id : this.myID);\r\n this.processUpdate({\r\n _: 'updateNewMessage',\r\n message: {\r\n _: 'message',\r\n flags: updateMessage.flags,\r\n pFlags: updateMessage.pFlags,\r\n id: updateMessage.id,\r\n from_id: fromID,\r\n to_id: appPeersManager_1.default.getOutputPeer(toID),\r\n date: updateMessage.date,\r\n message: updateMessage.message,\r\n fwd_from: updateMessage.fwd_from,\r\n reply_to_msg_id: updateMessage.reply_to_msg_id,\r\n entities: updateMessage.entities\r\n },\r\n pts: updateMessage.pts,\r\n pts_count: updateMessage.pts_count\r\n }, processOpts);\r\n break;\r\n case 'updatesCombined':\r\n case 'updates':\r\n appUsersManager_1.default.saveApiUsers(updateMessage.users);\r\n appChatsManager_1.default.saveApiChats(updateMessage.chats);\r\n updateMessage.updates.forEach((update) => {\r\n this.processUpdate(update, processOpts);\r\n });\r\n break;\r\n default:\r\n console.warn(utils_1.dT(), 'Unknown update message', updateMessage);\r\n }\r\n }\r\n getDifference() {\r\n // console.trace(dT(), 'Get full diff')\r\n let updatesState = this.updatesState;\r\n if (!updatesState.syncLoading) {\r\n updatesState.syncLoading = true;\r\n updatesState.pendingSeqUpdates = {};\r\n updatesState.pendingPtsUpdates = [];\r\n }\r\n if (updatesState.syncPending) {\r\n clearTimeout(updatesState.syncPending.timeout);\r\n updatesState.syncPending = false;\r\n }\r\n mtprotoworker_1.default.invokeApi('updates.getDifference', {\r\n pts: updatesState.pts,\r\n date: updatesState.date,\r\n qts: -1\r\n }, {\r\n timeout: 0x7fffffff\r\n }).then((differenceResult) => {\r\n if (differenceResult._ == 'updates.differenceEmpty') {\r\n console.log(utils_1.dT(), 'apply empty diff', differenceResult.seq);\r\n updatesState.date = differenceResult.date;\r\n updatesState.seq = differenceResult.seq;\r\n updatesState.syncLoading = false;\r\n utils_1.$rootScope.$broadcast('stateSynchronized');\r\n return false;\r\n }\r\n appUsersManager_1.default.saveApiUsers(differenceResult.users);\r\n appChatsManager_1.default.saveApiChats(differenceResult.chats);\r\n // Should be first because of updateMessageID\r\n // console.log(dT(), 'applying', differenceResult.other_updates.length, 'other updates')\r\n differenceResult.other_updates.forEach((update) => {\r\n switch (update._) {\r\n case 'updateChannelTooLong':\r\n case 'updateNewChannelMessage':\r\n case 'updateEditChannelMessage':\r\n this.processUpdate(update);\r\n return;\r\n }\r\n this.saveUpdate(update);\r\n });\r\n // console.log(dT(), 'applying', differenceResult.new_messages.length, 'new messages')\r\n differenceResult.new_messages.forEach((apiMessage) => {\r\n this.saveUpdate({\r\n _: 'updateNewMessage',\r\n message: apiMessage,\r\n pts: updatesState.pts,\r\n pts_count: 0\r\n });\r\n });\r\n var nextState = differenceResult.intermediate_state || differenceResult.state;\r\n updatesState.seq = nextState.seq;\r\n updatesState.pts = nextState.pts;\r\n updatesState.date = nextState.date;\r\n // console.log(dT(), 'apply diff', updatesState.seq, updatesState.pts)\r\n if (differenceResult._ == 'updates.differenceSlice') {\r\n this.getDifference();\r\n }\r\n else {\r\n // console.log(dT(), 'finished get diff')\r\n utils_1.$rootScope.$broadcast('stateSynchronized');\r\n updatesState.syncLoading = false;\r\n }\r\n }, () => {\r\n updatesState.syncLoading = false;\r\n });\r\n }\r\n getChannelDifference(channelID) {\r\n var channelState = this.getChannelState(channelID);\r\n if (!channelState.syncLoading) {\r\n channelState.syncLoading = true;\r\n channelState.pendingPtsUpdates = [];\r\n }\r\n if (channelState.syncPending) {\r\n clearTimeout(channelState.syncPending.timeout);\r\n channelState.syncPending = false;\r\n }\r\n // console.log(dT(), 'Get channel diff', appChatsManager.getChat(channelID), channelState.pts)\r\n mtprotoworker_1.default.invokeApi('updates.getChannelDifference', {\r\n channel: appChatsManager_1.default.getChannelInput(channelID),\r\n filter: { _: 'channelMessagesFilterEmpty' },\r\n pts: channelState.pts,\r\n limit: 30\r\n }, { timeout: 0x7fffffff }).then((differenceResult) => {\r\n // console.log(dT(), 'channel diff result', differenceResult)\r\n channelState.pts = differenceResult.pts;\r\n if (differenceResult._ == 'updates.channelDifferenceEmpty') {\r\n console.log(utils_1.dT(), 'apply channel empty diff', differenceResult);\r\n channelState.syncLoading = false;\r\n utils_1.$rootScope.$broadcast('stateSynchronized');\r\n return false;\r\n }\r\n if (differenceResult._ == 'updates.channelDifferenceTooLong') {\r\n console.log(utils_1.dT(), 'channel diff too long', differenceResult);\r\n channelState.syncLoading = false;\r\n delete this.channelStates[channelID];\r\n this.saveUpdate({ _: 'updateChannelReload', channel_id: channelID });\r\n return false;\r\n }\r\n appUsersManager_1.default.saveApiUsers(differenceResult.users);\r\n appChatsManager_1.default.saveApiChats(differenceResult.chats);\r\n // Should be first because of updateMessageID\r\n console.log(utils_1.dT(), 'applying', differenceResult.other_updates.length, 'channel other updates');\r\n differenceResult.other_updates.forEach((update) => {\r\n this.saveUpdate(update);\r\n });\r\n console.log(utils_1.dT(), 'applying', differenceResult.new_messages.length, 'channel new messages');\r\n differenceResult.new_messages.forEach((apiMessage) => {\r\n this.saveUpdate({\r\n _: 'updateNewChannelMessage',\r\n message: apiMessage,\r\n pts: channelState.pts,\r\n pts_count: 0\r\n });\r\n });\r\n console.log(utils_1.dT(), 'apply channel diff', channelState.pts);\r\n if (differenceResult._ == 'updates.channelDifference' &&\r\n !differenceResult.pFlags['final']) {\r\n this.getChannelDifference(channelID);\r\n }\r\n else {\r\n console.log(utils_1.dT(), 'finished channel get diff');\r\n utils_1.$rootScope.$broadcast('stateSynchronized');\r\n channelState.syncLoading = false;\r\n }\r\n }, () => {\r\n channelState.syncLoading = false;\r\n });\r\n }\r\n addChannelState(channelID, pts) {\r\n if (!pts) {\r\n throw new Error('Add channel state without pts ' + channelID);\r\n }\r\n if (!(channelID in this.channelStates)) {\r\n this.channelStates[channelID] = {\r\n pts: pts,\r\n pendingPtsUpdates: [],\r\n syncPending: false,\r\n syncLoading: false\r\n };\r\n return true;\r\n }\r\n return false;\r\n }\r\n getChannelState(channelID, pts) {\r\n if (this.channelStates[channelID] === undefined) {\r\n this.addChannelState(channelID, pts);\r\n }\r\n return this.channelStates[channelID];\r\n }\r\n processUpdate(update, options = {}) {\r\n var channelID = false;\r\n switch (update._) {\r\n case 'updateNewChannelMessage':\r\n case 'updateEditChannelMessage':\r\n channelID = -appPeersManager_1.default.getPeerID(update.message.to_id);\r\n break;\r\n case 'updateDeleteChannelMessages':\r\n channelID = update.channel_id;\r\n break;\r\n case 'updateChannelTooLong':\r\n channelID = update.channel_id;\r\n if (!(channelID in this.channelStates)) {\r\n return false;\r\n }\r\n break;\r\n }\r\n var curState = channelID ? this.getChannelState(channelID, update.pts) : this.updatesState;\r\n // console.log(dT(), 'process', channelID, curState.pts, update)\r\n if (curState.syncLoading) {\r\n return false;\r\n }\r\n if (update._ == 'updateChannelTooLong') {\r\n if (!curState.lastPtsUpdateTime ||\r\n curState.lastPtsUpdateTime < utils_1.tsNow() - 10000) {\r\n // console.trace(dT(), 'channel too long, get diff', channelID, update)\r\n this.getChannelDifference(channelID);\r\n }\r\n return false;\r\n }\r\n if (update._ == 'updateNewMessage' ||\r\n update._ == 'updateEditMessage' ||\r\n update._ == 'updateNewChannelMessage' ||\r\n update._ == 'updateEditChannelMessage') {\r\n var message = update.message;\r\n var toPeerID = appPeersManager_1.default.getPeerID(message.to_id);\r\n var fwdHeader = message.fwd_from || {};\r\n var reason = false;\r\n if (message.from_id && !appUsersManager_1.default.hasUser(message.from_id, message.pFlags.post /* || channelID*/) && (reason = 'author') ||\r\n fwdHeader.from_id && !appUsersManager_1.default.hasUser(fwdHeader.from_id, !!fwdHeader.channel_id) && (reason = 'fwdAuthor') ||\r\n fwdHeader.channel_id && !appChatsManager_1.default.hasChat(fwdHeader.channel_id, true) && (reason = 'fwdChannel') ||\r\n toPeerID > 0 && !appUsersManager_1.default.hasUser(toPeerID) && (reason = 'toPeer User') ||\r\n toPeerID < 0 && !appChatsManager_1.default.hasChat(-toPeerID) && (reason = 'toPeer Chat')) {\r\n console.warn(utils_1.dT(), 'Not enough data for message update', toPeerID, reason, message);\r\n if (channelID && appChatsManager_1.default.hasChat(channelID)) {\r\n this.getChannelDifference(channelID);\r\n }\r\n else {\r\n this.forceGetDifference();\r\n }\r\n return false;\r\n }\r\n }\r\n else if (channelID && !appChatsManager_1.default.hasChat(channelID)) {\r\n // console.log(dT(), 'skip update, missing channel', channelID, update)\r\n return false;\r\n }\r\n var popPts;\r\n var popSeq;\r\n if (update.pts) {\r\n var newPts = curState.pts + (update.pts_count || 0);\r\n if (newPts < update.pts) {\r\n console.warn(utils_1.dT(), 'Pts hole', curState, update, channelID && appChatsManager_1.default.getChat(channelID));\r\n curState.pendingPtsUpdates.push(update);\r\n if (!curState.syncPending) {\r\n curState.syncPending = {\r\n timeout: setTimeout(() => {\r\n if (channelID) {\r\n this.getChannelDifference(channelID);\r\n }\r\n else {\r\n this.getDifference();\r\n }\r\n }, 5000)\r\n };\r\n }\r\n curState.syncPending.ptsAwaiting = true;\r\n return false;\r\n }\r\n if (update.pts > curState.pts) {\r\n curState.pts = update.pts;\r\n popPts = true;\r\n curState.lastPtsUpdateTime = utils_1.tsNow();\r\n }\r\n else if (update.pts_count) {\r\n // console.warn(dT(), 'Duplicate update', update)\r\n return false;\r\n }\r\n if (channelID && options.date && this.updatesState.date < options.date) {\r\n this.updatesState.date = options.date;\r\n }\r\n }\r\n else if (!channelID && options.seq > 0) {\r\n var seq = options.seq;\r\n var seqStart = options.seqStart || seq;\r\n if (seqStart != curState.seq + 1) {\r\n if (seqStart > curState.seq) {\r\n console.warn(utils_1.dT(), 'Seq hole', curState, curState.syncPending && curState.syncPending.seqAwaiting);\r\n if (curState.pendingSeqUpdates[seqStart] === undefined) {\r\n curState.pendingSeqUpdates[seqStart] = { seq: seq, date: options.date, updates: [] };\r\n }\r\n curState.pendingSeqUpdates[seqStart].updates.push(update);\r\n if (!curState.syncPending) {\r\n curState.syncPending = {\r\n timeout: setTimeout(() => {\r\n this.getDifference();\r\n }, 5000)\r\n };\r\n }\r\n if (!curState.syncPending.seqAwaiting ||\r\n curState.syncPending.seqAwaiting < seqStart) {\r\n curState.syncPending.seqAwaiting = seqStart;\r\n }\r\n return false;\r\n }\r\n }\r\n if (curState.seq != seq) {\r\n curState.seq = seq;\r\n if (options.date && curState.date < options.date) {\r\n curState.date = options.date;\r\n }\r\n popSeq = true;\r\n }\r\n }\r\n this.saveUpdate(update);\r\n if (popPts) {\r\n this.popPendingPtsUpdate(channelID);\r\n }\r\n else if (popSeq) {\r\n this.popPendingSeqUpdate();\r\n }\r\n }\r\n saveUpdate(update) {\r\n utils_1.$rootScope.$broadcast('apiUpdate', update);\r\n }\r\n attach() {\r\n mtprotoworker_1.default.setUpdatesProcessor(this.processUpdateMessage.bind(this));\r\n mtprotoworker_1.default.invokeApi('updates.getState', {}, { noErrorBox: true }).then((stateResult) => {\r\n this.updatesState.seq = stateResult.seq;\r\n this.updatesState.pts = stateResult.pts;\r\n this.updatesState.date = stateResult.date;\r\n setTimeout(() => {\r\n this.updatesState.syncLoading = false;\r\n }, 1000);\r\n // updatesState.seq = 1\r\n // updatesState.pts = stateResult.pts - 5000\r\n // updatesState.date = 1\r\n // getDifference()\r\n });\r\n }\r\n}\r\nexports.ApiUpdatesManager = ApiUpdatesManager;\r\nexports.default = new ApiUpdatesManager();\r\n" }, { - "id": 24, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/filemanager.ts", + "id": 25, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\filemanager.ts", "name": "./src/lib/filemanager.ts", - "index": 48, - "index2": 41, - "size": 10347, + "index": 52, + "index2": 44, + "size": 7505, "cacheable": true, "built": true, "optional": false, @@ -4031,54 +4041,54 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", - "issuerId": 11, + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", + "issuerId": 6, "issuerName": "./src/lib/appManagers/appPhotosManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "name": "./src/lib/services.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 386, + "building": 1105, + "dependencies": 45 } }, { - "id": 11, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", + "id": 6, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", "name": "./src/lib/appManagers/appPhotosManager.ts", "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 576, + "building": 856, + "dependencies": 834 } } ], "profile": { - "factory": 862, - "building": 151, - "dependencies": 0 + "factory": 835, + "building": 185, + "dependencies": 1133 }, "failed": false, "errors": 0, @@ -4086,26 +4096,26 @@ "assets": [], "reasons": [ { - "moduleId": 9, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", + "moduleId": 6, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts", + "module": "./src/lib/appManagers/appPhotosManager.ts", + "moduleName": "./src/lib/appManagers/appPhotosManager.ts", "type": "cjs require", "userRequest": "../filemanager", - "loc": "17:38-63" + "loc": "8:38-63" }, { - "moduleId": 11, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appPhotosManager.ts", - "module": "./src/lib/appManagers/appPhotosManager.ts", - "moduleName": "./src/lib/appManagers/appPhotosManager.ts", + "moduleId": 15, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", + "module": "./src/lib/mtproto/apiFileManager.ts", + "moduleName": "./src/lib/mtproto/apiFileManager.ts", "type": "cjs require", "userRequest": "../filemanager", "loc": "17:38-63" }, { - "moduleId": 18, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDocsManager.ts", + "moduleId": 16, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDocsManager.ts", "module": "./src/lib/appManagers/appDocsManager.ts", "moduleName": "./src/lib/appManagers/appDocsManager.ts", "type": "cjs require", @@ -4113,8 +4123,8 @@ "loc": "16:38-63" }, { - "moduleId": 74, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/idb.ts", + "moduleId": 69, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\idb.ts", "module": "./src/lib/idb.ts", "moduleName": "./src/lib/idb.ts", "type": "cjs require", @@ -4128,15 +4138,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 4, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst bin_utils_1 = require(\"./bin_utils\");\nrequire(\"web-streams-polyfill/ponyfill\");\n// @ts-ignore\nconst streamsaver_1 = __importDefault(require(\"streamsaver\"));\nif (window.location.href.indexOf('localhost') === -1) {\n streamsaver_1.default.mitm = 'mitm.html';\n}\nclass FileManager {\n constructor() {\n this.isSafari = 'safari' in window;\n this.safariVersion = parseFloat(this.isSafari && (navigator.userAgent.match(/Version\\/(\\d+\\.\\d+).* Safari/) || [])[1]);\n this.safariWithDownload = this.isSafari && this.safariVersion >= 11.0;\n this.buggyUnknownBlob = this.isSafari && !this.safariWithDownload;\n this.blobSupported = true;\n try {\n bin_utils_1.blobConstruct([], '');\n }\n catch (e) {\n this.blobSupported = false;\n }\n }\n isAvailable() {\n return this.blobSupported;\n }\n /* public copy(fromFileEntry: any, toFileEntry: any) {\n return this.getFileWriter(toFileEntry).then((fileWriter) => {\n return this.write(fileWriter, fromFileEntry).then(() => {\n return fileWriter;\n }, (error: any) => {\n try {\n // @ts-ignore\n fileWriter.truncate(0);\n } catch (e) {}\n \n return Promise.reject(error);\n });\n });\n } */\n copy(fromFileEntry, toFileEntry) {\n return this.write(toFileEntry, fromFileEntry).then(() => {\n console.log('copy success');\n return toFileEntry;\n }, (error) => {\n console.error('copy error 1:', error);\n try {\n toFileEntry.truncate(0);\n }\n catch (e) {\n console.error('copy error', e);\n }\n return Promise.reject(error);\n });\n }\n /* public write(fileWriter: any, bytes: any) {\n return new Promise((resolve, reject) => {\n fileWriter.onwriteend = function(e: any) {\n resolve();\n };\n fileWriter.onerror = function(e: any) {\n reject(e);\n };\n \n if(bytes.file) {\n bytes.file((file: any) => {\n fileWriter.write(file);\n }, reject);\n } else if(bytes instanceof Blob) { // is file bytes\n fileWriter.write(bytes);\n } else {\n try {\n var blob = blobConstruct([bytesToArrayBuffer(bytes)]);\n fileWriter.write(blob);\n } catch(e) {\n reject(e);\n }\n }\n });\n } */\n write(fileWriter, bytes) {\n if (bytes.file) {\n return bytes.file((file) => {\n return fileWriter.write(file);\n });\n }\n else if (bytes instanceof Blob) { // is file bytes\n return new Promise((resolve, reject) => {\n let fileReader = new FileReader();\n fileReader.onload = function (event) {\n let arrayBuffer = event.target.result;\n let arr = new Uint8Array(arrayBuffer);\n fileWriter.write(arr).then(resolve, reject);\n };\n fileReader.readAsArrayBuffer(bytes);\n });\n }\n else {\n //var blob = blobConstruct([bytesToArrayBuffer(bytes)]);\n //return fileWriter.write(blob);\n return fileWriter.write(bytes);\n }\n }\n chooseSaveFile(fileName, ext, mimeType, size) {\n let fileStream = streamsaver_1.default.createWriteStream(fileName, {\n size: size,\n writableStrategy: undefined,\n readableStrategy: undefined\n });\n let writer = fileStream.getWriter();\n return writer;\n }\n getFakeFileWriter(mimeType, saveFileCallback) {\n var blobParts = [];\n var fakeFileWriter = {\n write: (blob) => __awaiter(this, void 0, void 0, function* () {\n if (!this.blobSupported) {\n throw false;\n }\n blobParts.push(blob);\n }),\n truncate: () => {\n blobParts = [];\n },\n finalize: () => {\n var blob = bin_utils_1.blobConstruct(blobParts, mimeType);\n if (saveFileCallback) {\n saveFileCallback(blob);\n }\n return blob;\n }\n };\n return fakeFileWriter;\n }\n getUrl(fileData, mimeType) {\n var safeMimeType = bin_utils_1.blobSafeMimeType(mimeType);\n // console.log(dT(), 'get url', fileData, mimeType, fileData.toURL !== undefined, fileData instanceof Blob)\n if (fileData.toURL !== undefined) {\n return fileData.toURL(safeMimeType);\n }\n if (fileData instanceof Blob) {\n return URL.createObjectURL(fileData);\n }\n return 'data:' + safeMimeType + ';base64,' + bin_utils_1.bytesToBase64(fileData);\n }\n getByteArray(fileData) {\n if (fileData instanceof Blob) {\n return new Promise((resolve, reject) => {\n try {\n var reader = new FileReader();\n reader.onloadend = (e) => {\n // @ts-ignore\n resolve(new Uint8Array(e.target.result));\n };\n reader.onerror = (e) => {\n reject(e);\n };\n reader.readAsArrayBuffer(fileData);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n else if (fileData.file) {\n return new Promise((resolve, reject) => {\n fileData.file((blob) => {\n this.getByteArray(blob).then(resolve, reject);\n }, reject);\n });\n }\n return Promise.resolve(fileData);\n //return $q.when(fileData);\n }\n getDataUrl(blob) {\n return new Promise((resolve, reject) => {\n try {\n var reader = new FileReader();\n reader.onloadend = () => {\n resolve(reader.result);\n };\n reader.readAsDataURL(blob);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n getFileCorrectUrl(blob, mimeType) {\n if (this.buggyUnknownBlob && blob instanceof Blob) {\n // @ts-ignore\n mimeType = blob.type || blob.mimeType || mimeType || '';\n if (!mimeType.match(/image\\/(jpeg|gif|png|bmp)|video\\/quicktime/)) {\n return this.getDataUrl(blob);\n }\n }\n return Promise.resolve(this.getUrl(blob, mimeType));\n }\n // downloadFile\n download(blob, mimeType, fileName) {\n if (window.navigator && navigator.msSaveBlob !== undefined) {\n window.navigator.msSaveBlob(blob, fileName);\n return false;\n }\n if (window.navigator && 'getDeviceStorage' in navigator) {\n var storageName = 'sdcard';\n var subdir = 'telegram/';\n switch (mimeType.split('/')[0]) {\n case 'video':\n storageName = 'videos';\n break;\n case 'audio':\n storageName = 'music';\n break;\n case 'image':\n storageName = 'pictures';\n break;\n }\n // @ts-ignore\n var deviceStorage = navigator.getDeviceStorage(storageName);\n var request = deviceStorage.addNamed(blob, subdir + fileName);\n request.onsuccess = function () {\n console.log('Device storage save result', this.result);\n };\n request.onerror = () => { };\n return;\n }\n var popup;\n if (this.isSafari && !this.safariWithDownload) {\n popup = window.open();\n }\n this.getFileCorrectUrl(blob, mimeType).then((url) => {\n if (popup) {\n try {\n // @ts-ignore\n popup.location.href = url;\n return;\n }\n catch (e) { }\n }\n var anchor = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');\n anchor.href = url;\n if (!this.safariWithDownload) {\n anchor.target = '_blank';\n }\n anchor.download = fileName;\n if (anchor.dataset) {\n anchor.dataset.downloadurl = ['video/quicktime', fileName, url].join(':');\n }\n anchor.style.position = 'absolute';\n anchor.style.top = '1px';\n anchor.style.left = '1px';\n document.body.append(anchor);\n try {\n var clickEvent = document.createEvent('MouseEvents');\n clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n anchor.dispatchEvent(clickEvent);\n }\n catch (e) {\n console.error('Download click error', e);\n try {\n anchor.click();\n }\n catch (e) {\n window.open(url, '_blank');\n }\n }\n setTimeout(() => {\n anchor.remove();\n }, 100);\n });\n }\n}\nexports.default = new FileManager();\n" + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst bin_utils_1 = require(\"./bin_utils\");\r\n/* import 'web-streams-polyfill/ponyfill';\r\n// @ts-ignore\r\nimport streamSaver from 'streamsaver';\r\nif(window.location.href.indexOf('localhost') === -1) {\r\n streamSaver.mitm = 'mitm.html';\r\n} */\r\nclass FileManager {\r\n constructor() {\r\n this.blobSupported = true;\r\n try {\r\n bin_utils_1.blobConstruct([], '');\r\n }\r\n catch (e) {\r\n this.blobSupported = false;\r\n }\r\n }\r\n isAvailable() {\r\n return this.blobSupported;\r\n }\r\n /* public copy(fromFileEntry: any, toFileEntry: any) {\r\n return this.getFileWriter(toFileEntry).then((fileWriter) => {\r\n return this.write(fileWriter, fromFileEntry).then(() => {\r\n return fileWriter;\r\n }, (error: any) => {\r\n try {\r\n // @ts-ignore\r\n fileWriter.truncate(0);\r\n } catch (e) {}\r\n \r\n return Promise.reject(error);\r\n });\r\n });\r\n } */\r\n copy(fromFileEntry, toFileEntry) {\r\n return this.write(toFileEntry, fromFileEntry).then(() => {\r\n console.log('copy success');\r\n return toFileEntry;\r\n }, (error) => {\r\n console.error('copy error 1:', error);\r\n try {\r\n toFileEntry.truncate(0);\r\n }\r\n catch (e) {\r\n console.error('copy error', e);\r\n }\r\n return Promise.reject(error);\r\n });\r\n }\r\n /* public write(fileWriter: any, bytes: any) {\r\n return new Promise((resolve, reject) => {\r\n fileWriter.onwriteend = function(e: any) {\r\n resolve();\r\n };\r\n fileWriter.onerror = function(e: any) {\r\n reject(e);\r\n };\r\n \r\n if(bytes.file) {\r\n bytes.file((file: any) => {\r\n fileWriter.write(file);\r\n }, reject);\r\n } else if(bytes instanceof Blob) { // is file bytes\r\n fileWriter.write(bytes);\r\n } else {\r\n try {\r\n var blob = blobConstruct([bytesToArrayBuffer(bytes)]);\r\n fileWriter.write(blob);\r\n } catch(e) {\r\n reject(e);\r\n }\r\n }\r\n });\r\n } */\r\n write(fileWriter, bytes) {\r\n if (bytes.file) {\r\n return bytes.file((file) => {\r\n return fileWriter.write(file);\r\n });\r\n }\r\n else if (bytes instanceof Blob) { // is file bytes\r\n return new Promise((resolve, reject) => {\r\n let fileReader = new FileReader();\r\n fileReader.onload = function (event) {\r\n let arrayBuffer = event.target.result;\r\n let arr = new Uint8Array(arrayBuffer);\r\n fileWriter.write(arr).then(resolve, reject);\r\n };\r\n fileReader.readAsArrayBuffer(bytes);\r\n });\r\n }\r\n else {\r\n //var blob = blobConstruct([bytesToArrayBuffer(bytes)]);\r\n //return fileWriter.write(blob);\r\n return fileWriter.write(bytes);\r\n }\r\n }\r\n chooseSaveFile(fileName, ext, mimeType, size) {\r\n throw new Error('no writer');\r\n /* let fileStream = streamSaver.createWriteStream(fileName, {\r\n size: size,\r\n writableStrategy: undefined,\r\n readableStrategy: undefined\r\n });\r\n let writer = fileStream.getWriter();\r\n return writer; */\r\n }\r\n getFakeFileWriter(mimeType, saveFileCallback) {\r\n var blobParts = [];\r\n var fakeFileWriter = {\r\n write: (blob) => __awaiter(this, void 0, void 0, function* () {\r\n if (!this.blobSupported) {\r\n throw false;\r\n }\r\n blobParts.push(blob);\r\n }),\r\n truncate: () => {\r\n blobParts = [];\r\n },\r\n finalize: () => {\r\n var blob = bin_utils_1.blobConstruct(blobParts, mimeType);\r\n if (saveFileCallback) {\r\n saveFileCallback(blob);\r\n }\r\n return blob;\r\n }\r\n };\r\n return fakeFileWriter;\r\n }\r\n getFileCorrectUrl(fileData, mimeType) {\r\n var safeMimeType = bin_utils_1.blobSafeMimeType(mimeType);\r\n if (fileData instanceof Blob) {\r\n return URL.createObjectURL(fileData);\r\n }\r\n return 'data:' + safeMimeType + ';base64,' + bin_utils_1.bytesToBase64(fileData);\r\n }\r\n download(blob, mimeType, fileName) {\r\n if (window.navigator && navigator.msSaveBlob !== undefined) {\r\n window.navigator.msSaveBlob(blob, fileName);\r\n return false;\r\n }\r\n if (window.navigator && 'getDeviceStorage' in navigator) {\r\n var storageName = 'sdcard';\r\n var subdir = 'telegram/';\r\n switch (mimeType.split('/')[0]) {\r\n case 'video':\r\n storageName = 'videos';\r\n break;\r\n case 'audio':\r\n storageName = 'music';\r\n break;\r\n case 'image':\r\n storageName = 'pictures';\r\n break;\r\n }\r\n // @ts-ignore\r\n var deviceStorage = navigator.getDeviceStorage(storageName);\r\n var request = deviceStorage.addNamed(blob, subdir + fileName);\r\n request.onsuccess = function () {\r\n console.log('Device storage save result', this.result);\r\n };\r\n request.onerror = () => { };\r\n return;\r\n }\r\n let url = this.getFileCorrectUrl(blob, mimeType);\r\n var anchor = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');\r\n anchor.href = url;\r\n anchor.download = fileName;\r\n if (anchor.dataset) {\r\n anchor.dataset.downloadurl = ['video/quicktime', fileName, url].join(':');\r\n }\r\n anchor.style.position = 'absolute';\r\n anchor.style.top = '1px';\r\n anchor.style.left = '1px';\r\n document.body.append(anchor);\r\n try {\r\n var clickEvent = document.createEvent('MouseEvents');\r\n clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\r\n anchor.dispatchEvent(clickEvent);\r\n }\r\n catch (e) {\r\n console.error('Download click error', e);\r\n try {\r\n anchor.click();\r\n }\r\n catch (e) {\r\n window.open(url, '_blank');\r\n }\r\n }\r\n setTimeout(() => {\r\n anchor.remove();\r\n }, 100);\r\n }\r\n}\r\nexports.default = new FileManager();\r\n" }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", - "index": 56, - "index2": 78, - "size": 6938, + "id": 26, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts", + "name": "./src/lib/appManagers/appDialogsManager.ts", + "index": 59, + "index2": 53, + "size": 31189, "cacheable": true, "built": true, "optional": false, @@ -4144,24 +4154,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "issuerId": 52, - "issuerName": "./src/index.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 + } + }, + { + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", + "profile": { + "factory": 842, + "building": 0, + "dependencies": 1062 + } + }, + { + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -4169,40 +4199,40 @@ "assets": [], "reasons": [ { - "moduleId": 52, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./components/pageIm", - "loc": "74:57-87" + "userRequest": "./appDialogsManager", + "loc": "13:44-74" }, { - "moduleId": 77, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "module": "./src/components/pageAuthCode.ts", - "moduleName": "./src/components/pageAuthCode.ts", + "moduleId": 41, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "module": "./src/components/appSearch.ts", + "moduleName": "./src/components/appSearch.ts", "type": "cjs require", - "userRequest": "./pageIm", - "loc": "17:33-52" + "userRequest": "../lib/appManagers/appDialogsManager", + "loc": "6:44-91" }, { - "moduleId": 78, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "module": "./src/components/pageSignUp.ts", - "moduleName": "./src/components/pageSignUp.ts", + "moduleId": 42, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", + "module": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", "type": "cjs require", - "userRequest": "./pageIm", - "loc": "10:33-52" + "userRequest": "./appDialogsManager", + "loc": "14:44-74" }, { - "moduleId": 84, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pagePassword.ts", - "module": "./src/components/pagePassword.ts", - "moduleName": "./src/components/pagePassword.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "./pageIm", - "loc": "15:33-52" + "userRequest": "./appManagers/appDialogsManager", + "loc": "12:44-86" } ], "usedExports": true, @@ -4210,16 +4240,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 1, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//import { appImManager, appMessagesManager, appDialogsManager, apiUpdatesManager, appUsersManager } from \"../lib/services\";\nconst misc_1 = require(\"./misc\");\nconst scrollable_1 = __importDefault(require(\"./scrollable\"));\nconst StackBlur_1 = require(\"../lib/StackBlur\");\nconst appSidebarLeft_1 = __importDefault(require(\"../lib/appManagers/appSidebarLeft\"));\n/* (window as any).libraryLoaded = function(lol: any) {\n // @ts-ignore\n console.log('libraryLoaded', lol, this, window.webpMachine);\n} */\nexports.default = () => Promise.resolve().then(() => __importStar(require('../lib/services'))).then(services => {\n //console.log('included services', services);\n let { appImManager, appMessagesManager, appDialogsManager, apiUpdatesManager, appUsersManager } = services;\n //export default () => {\n let pageEl = document.body.getElementsByClassName('page-chats')[0];\n pageEl.style.display = '';\n let chatScroll = new scrollable_1.default(document.getElementById('bubbles')).container;\n apiUpdatesManager.attach();\n // @ts-ignore\n document.addEventListener('user_update', (e) => {\n let userID = e.detail;\n let user = appUsersManager.getUser(userID);\n let dialog = appMessagesManager.getDialogByPeerID(user.id)[0];\n //console.log('updating user:', user, dialog);\n if (dialog && !appUsersManager.isBot(dialog.peerID) && dialog.peerID != appImManager.myID) {\n let online = user.status._ == 'userStatusOnline';\n let dom = appDialogsManager.getDialogDom(dialog.peerID);\n if (dom) {\n if (online) {\n dom.avatarDiv.classList.add('is-online');\n }\n else {\n dom.avatarDiv.classList.remove('is-online');\n }\n }\n }\n if (appImManager.peerID == user.id) {\n appImManager.setPeerStatus();\n }\n });\n // @ts-ignore\n document.addEventListener('dialog_top', (e) => {\n let dialog = e.detail;\n appDialogsManager.setLastMessage(dialog);\n appDialogsManager.sortDom();\n });\n // @ts-ignore\n document.addEventListener('dialogs_multiupdate', (e) => {\n let dialogs = e.detail;\n let performed = 0;\n for (let id in dialogs) {\n let dialog = dialogs[id];\n /////console.log('updating dialog:', dialog);\n ++performed;\n if (!(dialog.peerID in appDialogsManager.doms)) {\n appDialogsManager.addDialog(dialog);\n continue;\n }\n appDialogsManager.setLastMessage(dialog);\n }\n if (performed) {\n /////////console.log('will sortDom');\n appDialogsManager.sortDom();\n appDialogsManager.sortDom(true);\n }\n });\n // @ts-ignore\n document.addEventListener('dialog_unread', (e) => {\n let info = e.detail;\n let dialog = appMessagesManager.getDialogByPeerID(info.peerID)[0];\n if (dialog) {\n appDialogsManager.setUnreadMessages(dialog);\n if (dialog.peerID == appImManager.peerID) {\n appImManager.updateUnreadByDialog(dialog);\n }\n }\n });\n /*\n loadDialogs().then(result => {\n //appImManager.setScroll(chatScroll);\n });\n return;\n */\n /* function placeCaretAfterNode(node: HTMLElement) {\n if (typeof window.getSelection != \"undefined\") {\n var range = document.createRange();\n range.setStartAfter(node);\n range.collapse(true);\n var selection = window.getSelection();\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n \n messageInput.onclick = (e) => {\n let target = e.target as HTMLElement;\n if(target.classList.contains('emoji-inner')) {\n placeCaretAfterNode(target.parentElement);\n } else if(target.classList.contains('emoji-sizer')) {\n placeCaretAfterNode(target);\n }\n console.log('lol', target);\n }; */\n /* window.addEventListener('click', function(this, e) {\n // @ts-ignore\n let isInput = e.target.tagName == 'INPUT';\n if(!isInput && !window.getSelection().toString()) {\n console.log('click');\n messageInput.focus();\n }\n }); */\n fetch('assets/img/camomile.jpg')\n .then(res => res.blob())\n .then(blob => {\n let img = new Image();\n let url = URL.createObjectURL(blob);\n img.src = url;\n img.onload = () => {\n let id = 'chat-background-canvas';\n var canvas = document.getElementById(id);\n URL.revokeObjectURL(url);\n StackBlur_1.stackBlurImage(img, id, 15, 0);\n canvas.toBlob(blob => {\n //let dataUrl = canvas.toDataURL('image/jpeg', 1);\n let dataUrl = URL.createObjectURL(blob);\n [/* '.chat-background', '#chat-closed' */ '.chat-container'].forEach(selector => {\n let bg = document.querySelector(selector);\n bg.style.backgroundImage = 'url(' + dataUrl + ')';\n });\n }, 'image/jpeg', 1);\n };\n });\n /* toggleEmoticons.onclick = (e) => {\n if(!emoticonsDropdown) {\n emoticonsDropdown = initEmoticonsDropdown(pageEl, appImManager,\n appMessagesManager, messageInput, toggleEmoticons);\n } else {\n emoticonsDropdown.classList.toggle('active');\n }\n \n toggleEmoticons.classList.toggle('active');\n }; */\n Array.from(document.getElementsByClassName('btn-menu-toggle')).forEach((el) => {\n el.addEventListener('click', (e) => {\n console.log('click pageIm');\n if (!el.classList.contains('btn-menu-toggle'))\n return false;\n //window.removeEventListener('mousemove', onMouseMove);\n let openedMenu = el.querySelector('.btn-menu');\n e.cancelBubble = true;\n if (el.classList.contains('menu-open')) {\n el.classList.remove('menu-open');\n openedMenu.classList.remove('active');\n }\n else {\n misc_1.openBtnMenu(openedMenu);\n }\n });\n });\n appSidebarLeft_1.default.loadDialogs().then(result => {\n appSidebarLeft_1.default.onChatsScroll();\n appImManager.setScroll(chatScroll);\n appSidebarLeft_1.default.loadDialogs(true);\n });\n});\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../utils\");\r\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst misc_1 = require(\"../../components/misc\");\r\nconst scrollable_1 = __importDefault(require(\"../../components/scrollable\"));\r\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nlet testScroll = false;\r\nclass AppDialogsManager {\r\n constructor() {\r\n this.chatList = document.getElementById('dialogs');\r\n this.chatListArchived = document.getElementById('dialogs-archived');\r\n this.doms = {};\r\n this.domsArchived = {};\r\n this.lastActiveListElement = null;\r\n this.rippleCallback = null;\r\n this.lastClickID = 0;\r\n this.lastGoodClickID = 0;\r\n this.chatsArchivedContainer = document.getElementById('chats-archived-container');\r\n this.chatsContainer = document.getElementById('chats-container');\r\n this.chatsArchivedOffsetIndex = 0;\r\n this.chatsOffsetIndex = 0;\r\n this.loadedAll = false;\r\n this.loadedArchivedAll = false;\r\n this.scroll = null;\r\n this.scrollArchived = null;\r\n this.log = polyfill_1.logger('DIALOGS');\r\n this.chatsPreloader = misc_1.putPreloader(null, true);\r\n //this.chatsContainer.append(this.chatsPreloader);\r\n this.pinnedDelimiter = document.createElement('div');\r\n this.pinnedDelimiter.classList.add('pinned-delimiter');\r\n this.pinnedDelimiter.appendChild(document.createElement('span'));\r\n //this.chatsLoadCount = Math.round(document.body.scrollHeight / 70 * 1.5);\r\n let splitOffset = 1110;\r\n this.scroll = new scrollable_1.default(this.chatsContainer, 'y', splitOffset, 'CL', this.chatList, 500);\r\n this.scroll.setVirtualContainer(this.chatList);\r\n this.scroll.onScrolledBottom = this.onChatsScroll.bind(this);\r\n this.chatsHidden = this.scroll.hiddenElements;\r\n this.chatsVisible = this.scroll.visibleElements;\r\n this.scrollArchived = new scrollable_1.default(this.chatsArchivedContainer, 'y', splitOffset, 'CLA', this.chatListArchived, 500);\r\n this.scrollArchived.setVirtualContainer(this.chatListArchived);\r\n this.scrollArchived.onScrolledBottom = this.onChatsArchivedScroll.bind(this);\r\n this.chatsArchivedHidden = this.scrollArchived.hiddenElements;\r\n this.chatsArchivedVisible = this.scrollArchived.visibleElements;\r\n //this.scrollArchived.container.addEventListener('scroll', this.onChatsArchivedScroll.bind(this));\r\n //let chatClosedDiv = document.getElementById('chat-closed');\r\n this.setListClickListener(this.chatList);\r\n this.setListClickListener(this.chatListArchived);\r\n if (testScroll) {\r\n for (let i = 0; i < 1000; ++i) {\r\n let li = document.createElement('li');\r\n li.dataset.id = '' + i;\r\n li.innerHTML = `

${i}18:33

-_-_-_-: qweasd

`;\r\n this.scroll.append(li);\r\n }\r\n }\r\n window.addEventListener('resize', () => {\r\n //this.chatsLoadCount = Math.round(document.body.scrollHeight / 70 * 1.5);\r\n setTimeout(() => {\r\n this.onChatsArchivedScroll();\r\n }, 0);\r\n });\r\n utils_1.$rootScope.$on('user_update', (e) => {\r\n let userID = e.detail;\r\n let user = appUsersManager_1.default.getUser(userID);\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(user.id)[0];\r\n //console.log('updating user:', user, dialog);\r\n if (dialog && !appUsersManager_1.default.isBot(dialog.peerID) && dialog.peerID != utils_1.$rootScope.myID) {\r\n let online = user.status && user.status._ == 'userStatusOnline';\r\n let dom = this.getDialogDom(dialog.peerID);\r\n if (dom) {\r\n if (online) {\r\n dom.avatarDiv.classList.add('is-online');\r\n }\r\n else {\r\n dom.avatarDiv.classList.remove('is-online');\r\n }\r\n }\r\n }\r\n if (appImManager_1.default.peerID == user.id) {\r\n appImManager_1.default.setPeerStatus();\r\n }\r\n });\r\n utils_1.$rootScope.$on('dialog_top', (e) => {\r\n let dialog = e.detail;\r\n this.setLastMessage(dialog);\r\n this.sortDom();\r\n });\r\n utils_1.$rootScope.$on('dialogs_multiupdate', (e) => {\r\n let dialogs = e.detail;\r\n let performed = 0;\r\n for (let id in dialogs) {\r\n let dialog = dialogs[id];\r\n /////console.log('updating dialog:', dialog);\r\n ++performed;\r\n if (!(dialog.peerID in this.doms)) {\r\n this.addDialog(dialog);\r\n continue;\r\n }\r\n this.setLastMessage(dialog);\r\n }\r\n if (performed /* && false */) {\r\n /////////console.log('will sortDom');\r\n this.sortDom();\r\n this.sortDom(true);\r\n }\r\n });\r\n utils_1.$rootScope.$on('dialog_unread', (e) => {\r\n let info = e.detail;\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(info.peerID)[0];\r\n if (dialog) {\r\n this.setUnreadMessages(dialog);\r\n if (dialog.peerID == appImManager_1.default.peerID) {\r\n appImManager_1.default.updateUnreadByDialog(dialog);\r\n }\r\n }\r\n });\r\n this.loadDialogs().then(result => {\r\n //appSidebarLeft.onChatsScroll();\r\n this.loadDialogs(true);\r\n });\r\n }\r\n loadDialogs(archived = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (testScroll) {\r\n return;\r\n }\r\n if (this.loadDialogsPromise /* || 1 == 1 */)\r\n return this.loadDialogsPromise;\r\n (archived ? this.chatsArchivedContainer : this.chatsContainer).append(this.chatsPreloader);\r\n //let offset = appMessagesManager.generateDialogIndex();/* appMessagesManager.dialogsNum */;\r\n let offset = archived ? this.chatsArchivedOffsetIndex : this.chatsOffsetIndex;\r\n //let offset = 0;\r\n let scroll = archived ? this.scrollArchived : this.scroll;\r\n scroll.lock();\r\n try {\r\n console.time('getDialogs time');\r\n let loadCount = 50 /*this.chatsLoadCount */;\r\n this.loadDialogsPromise = appMessagesManager_1.default.getConversations('', offset, loadCount, +archived);\r\n let result = yield this.loadDialogsPromise;\r\n console.timeEnd('getDialogs time');\r\n if (result && result.dialogs && result.dialogs.length) {\r\n let index = result.dialogs[result.dialogs.length - 1].index;\r\n if (archived)\r\n this.chatsArchivedOffsetIndex = index;\r\n else\r\n this.chatsOffsetIndex = index;\r\n result.dialogs.forEach((dialog) => {\r\n this.addDialog(dialog);\r\n });\r\n }\r\n if (!result.dialogs.length || (archived ? this.scrollArchived.length == result.count : this.scroll.length == result.count)) { // loaded all\r\n if (archived)\r\n this.loadedArchivedAll = true;\r\n else\r\n this.loadedAll = true;\r\n }\r\n /* if(archived) {\r\n let count = result.count;\r\n this.archivedCount.innerText = '' + count;\r\n } */\r\n this.log('getDialogs ' + loadCount + ' dialogs by offset:', offset, result, this.scroll.length);\r\n this.scroll.onScroll();\r\n }\r\n catch (err) {\r\n this.log.error(err);\r\n }\r\n this.chatsPreloader.remove();\r\n this.loadDialogsPromise = undefined;\r\n scroll.unlock();\r\n });\r\n }\r\n onChatsScroll() {\r\n if (this.loadedAll || this.scroll.hiddenElements.down.length > 0 || this.loadDialogsPromise /* || 1 == 1 */)\r\n return;\r\n this.loadDialogs();\r\n }\r\n onChatsArchivedScroll() {\r\n if (this.loadedArchivedAll || this.scrollArchived.hiddenElements.down.length > 0 || this.loadDialogsPromise /* || 1 == 1 */)\r\n return;\r\n this.loadDialogs(true);\r\n }\r\n setListClickListener(list, onFound) {\r\n list.addEventListener('click', (e) => {\r\n //return;\r\n console.log('dialogs click list');\r\n let target = e.target;\r\n let elem = target.classList.contains('rp') ? target : utils_1.findUpClassName(target, 'rp');\r\n if (!elem) {\r\n return;\r\n }\r\n elem = elem.parentElement;\r\n let samePeer = this.lastActiveListElement == elem;\r\n if (this.lastActiveListElement && !samePeer) {\r\n this.lastActiveListElement.classList.remove('active');\r\n }\r\n let startTime = Date.now();\r\n let result;\r\n //console.log('appDialogsManager: lock lazyLoadQueue');\r\n if (elem) {\r\n /* if(chatClosedDiv) {\r\n chatClosedDiv.style.display = 'none';\r\n } */\r\n if (onFound)\r\n onFound();\r\n let peerID = +elem.getAttribute('data-peerID');\r\n let lastMsgID = +elem.dataset.mid;\r\n if (!samePeer) {\r\n elem.classList.add('active');\r\n this.lastActiveListElement = elem;\r\n }\r\n result = appImManager_1.default.setPeer(peerID, lastMsgID, false, true);\r\n if (result instanceof Promise) {\r\n this.lastGoodClickID = this.lastClickID;\r\n appImManager_1.default.lazyLoadQueue.lock();\r\n }\r\n }\r\n else /* if(chatClosedDiv) */ {\r\n result = appImManager_1.default.setPeer(0);\r\n //chatClosedDiv.style.display = '';\r\n }\r\n /* if(!(result instanceof Promise)) { // if click on same dialog\r\n this.rippleCallback();\r\n this.rippleCallback = null;\r\n } */\r\n /* promise.then(() => {\r\n appImManager.lazyLoadQueue.unlock();\r\n }); */\r\n /* promise.then(() => {\r\n let length = appImManager.lazyLoadQueue.length();\r\n console.log('pre ripple callback', length);\r\n \r\n if(length) {\r\n setTimeout(() => {\r\n this.rippleCallback();\r\n }, length * 25);\r\n } else {\r\n let elapsedTime = Date.now() - startTime;\r\n this.rippleCallback(elapsedTime > 200);\r\n }\r\n }); */\r\n });\r\n }\r\n sortDom(archived = false) {\r\n //return;\r\n //if(archived) return;\r\n let dialogs = appMessagesManager_1.default.dialogsStorage.dialogs.slice();\r\n let inUpper = [];\r\n let inBottom = [];\r\n let inVisible = [];\r\n let pinnedDialogs = [];\r\n let sorted = dialogs;\r\n if (!archived) {\r\n for (let i = 0; i < dialogs.length; ++i) {\r\n let dialog = dialogs[i];\r\n if (!dialog.pFlags.pinned)\r\n break;\r\n pinnedDialogs.push(dialog);\r\n }\r\n if (pinnedDialogs.length) {\r\n let dom = this.getDialogDom(pinnedDialogs[pinnedDialogs.length - 1].peerID);\r\n if (dom) {\r\n dom.listEl.append(this.pinnedDelimiter);\r\n }\r\n }\r\n else {\r\n if (this.pinnedDelimiter.parentElement) {\r\n this.pinnedDelimiter.parentElement.removeChild(this.pinnedDelimiter);\r\n }\r\n }\r\n sorted = sorted.filter((d) => !d.pFlags.pinned && d.folder_id != 1);\r\n }\r\n else {\r\n sorted = sorted.filter((d) => d.folder_id == 1);\r\n }\r\n sorted = sorted.sort((a, b) => {\r\n let timeA = appMessagesManager_1.default.getMessage(a.top_message).date;\r\n let timeB = appMessagesManager_1.default.getMessage(b.top_message).date;\r\n return timeB - timeA;\r\n });\r\n if (!archived) {\r\n sorted = pinnedDialogs.concat(sorted);\r\n }\r\n //console.log('sortDom', sorted, this.chatsHidden, this.chatsHidden.up, this.chatsHidden.down);\r\n let chatList = archived ? this.chatListArchived : this.chatList;\r\n let chatsHidden = archived ? this.chatsArchivedHidden : this.chatsHidden;\r\n let chatsVisible = archived ? this.chatsArchivedVisible : this.chatsVisible;\r\n let hiddenLength = chatsHidden.up.length;\r\n let inViewportLength = chatList.childElementCount;\r\n let concated = chatsHidden.up.concat(chatsVisible, chatsHidden.down);\r\n //console.log('sortDom clearing innerHTML', archived, hiddenLength, inViewportLength);\r\n chatList.innerHTML = '';\r\n let inViewportIndex = 0;\r\n sorted.forEach((d, idx) => {\r\n let dom = this.getDialogDom(d.peerID);\r\n if (!dom)\r\n return;\r\n let child = concated.find(obj => obj.element == dom.listEl);\r\n if (!child) {\r\n return this.log.error('no child by listEl:', dom.listEl, archived, concated);\r\n }\r\n if (inUpper.length < hiddenLength) {\r\n inUpper.push(child);\r\n }\r\n else if (inViewportIndex <= inViewportLength - 1) {\r\n chatList.append(dom.listEl);\r\n inVisible.push(child);\r\n ++inViewportIndex;\r\n }\r\n else {\r\n inBottom.push(child);\r\n }\r\n });\r\n //console.log('sortDom', sorted.length, inUpper.length, chatList.childElementCount, inBottom.length);\r\n chatsHidden.up = inUpper;\r\n chatsVisible.length = 0;\r\n chatsVisible.push(...inVisible);\r\n chatsHidden.down = inBottom;\r\n }\r\n setLastMessage(dialog, lastMessage, dom, highlightWord) {\r\n if (!lastMessage) {\r\n lastMessage = appMessagesManager_1.default.getMessage(dialog.top_message);\r\n }\r\n ///////console.log('setlastMessage:', lastMessage);\r\n if (lastMessage._ == 'messageEmpty')\r\n return;\r\n if (!dom) {\r\n dom = this.getDialogDom(dialog.peerID);\r\n }\r\n let peer = dialog.peer;\r\n let peerID = dialog.peerID;\r\n //let peerID = appMessagesManager.getMessagePeer(lastMessage);\r\n //console.log('setting last message:', lastMessage);\r\n /* if(!dom.lastMessageSpan.classList.contains('user-typing')) */ {\r\n let lastMessageText = '';\r\n if (lastMessage.media) {\r\n switch (lastMessage.media._) {\r\n case 'messageMediaPhoto':\r\n lastMessageText += 'Photo' + (lastMessage.message ? ', ' : '') + '';\r\n break;\r\n case 'messageMediaGeo':\r\n lastMessageText += 'Geolocation';\r\n break;\r\n case 'messageMediaDocument':\r\n let document = lastMessage.media.document;\r\n let found = false;\r\n for (let attribute of document.attributes) {\r\n if (found)\r\n break;\r\n switch (attribute._) {\r\n case 'documentAttributeSticker':\r\n lastMessageText += richtextprocessor_1.RichTextProcessor.wrapRichText(attribute.alt) + 'Sticker';\r\n found = true;\r\n break;\r\n case 'documentAttributeFilename':\r\n lastMessageText += '' + attribute.file_name + '';\r\n found = true;\r\n break;\r\n /* default:\r\n console.warn('Got unknown document type!', lastMessage);\r\n break; */\r\n }\r\n }\r\n if (document.type == 'video') {\r\n lastMessageText = 'Video' + (lastMessage.message ? ', ' : '') + '';\r\n found = true;\r\n }\r\n else if (document.type == 'voice') {\r\n lastMessageText = 'Voice message';\r\n found = true;\r\n }\r\n else if (document.type == 'gif') {\r\n lastMessageText = 'GIF' + (lastMessage.message ? ', ' : '') + '';\r\n found = true;\r\n }\r\n else if (document.type == 'round') {\r\n lastMessageText = 'Video message' + (lastMessage.message ? ', ' : '') + '';\r\n found = true;\r\n }\r\n if (found) {\r\n break;\r\n }\r\n default:\r\n ///////console.warn('Got unknown lastMessage.media type!', lastMessage);\r\n break;\r\n }\r\n }\r\n if (lastMessage.action) {\r\n let action = lastMessage.action;\r\n console.log('lastMessage action:', action);\r\n let suffix = '';\r\n let _ = action._;\r\n if (_ == \"messageActionPhoneCall\") {\r\n _ += '.' + action.type;\r\n let duration = action.duration;\r\n if (duration) {\r\n let d = [];\r\n d.push(duration % 60 + ' s');\r\n if (duration > 60)\r\n d.push((duration / 60 | 0) + ' min');\r\n if (duration > 3600)\r\n d.push((duration / 3600 | 0) + ' h');\r\n suffix = ' (' + d.reverse().join(' ') + ')';\r\n }\r\n }\r\n // @ts-ignore\r\n lastMessageText = '' + utils_1.langPack[_] + suffix + '';\r\n }\r\n let messageText = lastMessage.message;\r\n let messageWrapped = '';\r\n if (messageText) {\r\n let entities = richtextprocessor_1.RichTextProcessor.parseEntities(messageText.replace(/\\n/g, ' '), { noLinebreakers: true });\r\n if (highlightWord) {\r\n let regExp = new RegExp(utils_1.escapeRegExp(highlightWord), 'gi');\r\n let match;\r\n if (!entities)\r\n entities = [];\r\n let found = false;\r\n while ((match = regExp.exec(messageText)) !== null) {\r\n entities.push({ _: 'messageEntityHighlight', length: highlightWord.length, offset: match.index });\r\n found = true;\r\n }\r\n if (found) {\r\n entities.sort((a, b) => a.offset - b.offset);\r\n }\r\n }\r\n messageWrapped = richtextprocessor_1.RichTextProcessor.wrapRichText(messageText, {\r\n noLinebreakers: true,\r\n entities: entities,\r\n noTextFormat: true\r\n });\r\n }\r\n dom.lastMessageSpan.innerHTML = lastMessageText + messageWrapped;\r\n /* if(lastMessage.from_id == auth.id) { // You: */\r\n if (peer._ != 'peerUser' && peerID != -lastMessage.from_id) {\r\n let sender = appUsersManager_1.default.getUser(lastMessage.from_id);\r\n if (sender && sender.id) {\r\n let senderBold = document.createElement('b');\r\n let str = '';\r\n if (sender.id == utils_1.$rootScope.myID) {\r\n str = 'You';\r\n }\r\n else {\r\n str = sender.first_name || sender.last_name || sender.username;\r\n }\r\n //senderBold.innerText = str + ': ';\r\n senderBold.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(str, { noLinebreakers: true }) + ': ';\r\n //console.log(sender, senderBold.innerText);\r\n dom.lastMessageSpan.prepend(senderBold);\r\n } //////// else console.log('no sender', lastMessage, peerID);\r\n }\r\n }\r\n let timeStr = '';\r\n let timestamp = lastMessage.date;\r\n let now = Date.now() / 1000;\r\n let time = new Date(lastMessage.date * 1000);\r\n if ((now - timestamp) < 86400) { // if < 1 day\r\n timeStr = ('0' + time.getHours()).slice(-2) +\r\n ':' + ('0' + time.getMinutes()).slice(-2);\r\n }\r\n else if ((now - timestamp) < (86400 * 7)) { // week\r\n let date = new Date(timestamp * 1000);\r\n timeStr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][date.getDay()];\r\n }\r\n else {\r\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n timeStr = months[time.getMonth()] +\r\n ' ' + ('0' + time.getDate()).slice(-2);\r\n }\r\n dom.lastTimeSpan.innerHTML = timeStr;\r\n dom.listEl.setAttribute('data-mid', lastMessage.mid);\r\n if (this.doms[peerID] || this.domsArchived[peerID]) {\r\n this.setUnreadMessages(dialog);\r\n }\r\n }\r\n setUnreadMessages(dialog) {\r\n let dom = this.getDialogDom(dialog.peerID);\r\n dom.statusSpan.innerHTML = '';\r\n let lastMessage = appMessagesManager_1.default.getMessage(dialog.top_message);\r\n if (lastMessage._ != 'messageEmpty' &&\r\n lastMessage.from_id == utils_1.$rootScope.myID && lastMessage.peerID != utils_1.$rootScope.myID &&\r\n dialog.read_outbox_max_id) { // maybe comment, 06.20.2020\r\n let outgoing = (lastMessage.pFlags && lastMessage.pFlags.unread); // maybe uncomment, 31.01.2020\r\n //console.log('outgoing', outgoing, lastMessage);\r\n if (outgoing) {\r\n dom.statusSpan.classList.remove('tgico-checks');\r\n dom.statusSpan.classList.add('tgico-check');\r\n }\r\n else {\r\n dom.statusSpan.classList.remove('tgico-check');\r\n dom.statusSpan.classList.add('tgico-checks');\r\n }\r\n }\r\n else\r\n dom.statusSpan.classList.remove('tgico-check', 'tgico-checks');\r\n dom.unreadMessagesSpan.innerHTML = '';\r\n if (dialog.unread_count) {\r\n dom.unreadMessagesSpan.innerHTML = dialog.unread_count;\r\n dom.unreadMessagesSpan.classList.remove('tgico-pinnedchat');\r\n dom.unreadMessagesSpan.classList.add(new Date(dialog.notify_settings.mute_until * 1000) > new Date() ?\r\n 'unread-muted' : 'unread');\r\n }\r\n else if (dialog.pFlags.pinned) {\r\n dom.unreadMessagesSpan.classList.remove('unread', 'unread-muted');\r\n dom.unreadMessagesSpan.classList.add('tgico-pinnedchat');\r\n }\r\n // set archived new count\r\n if (dialog.folder_id == 1) {\r\n let sum = Object.keys(this.domsArchived).map(p => +p).reduce((acc, peerID) => {\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n if (dialog) {\r\n return acc + dialog.unread_count;\r\n }\r\n return acc;\r\n }, 0);\r\n utils_1.$rootScope.$broadcast('dialogs_archived_unread', { count: sum });\r\n }\r\n }\r\n getDialogDom(peerID) {\r\n return this.doms[peerID] || this.domsArchived[peerID];\r\n }\r\n addDialog(dialog, container, drawStatus = true) {\r\n let peerID = dialog.peerID;\r\n if ((this.doms[peerID] || this.domsArchived[peerID]) && !container)\r\n return;\r\n let title = appPeersManager_1.default.getPeerTitle(peerID);\r\n let avatarDiv = document.createElement('div');\r\n avatarDiv.classList.add('user-avatar');\r\n if (drawStatus && peerID != utils_1.$rootScope.myID) {\r\n let peer = dialog.peer;\r\n switch (peer._) {\r\n case 'peerUser':\r\n let user = appUsersManager_1.default.getUser(peerID);\r\n //console.log('found user', user);\r\n if (user.status && user.status._ == 'userStatusOnline') {\r\n avatarDiv.classList.add('is-online');\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n let captionDiv = document.createElement('div');\r\n captionDiv.classList.add('user-caption');\r\n let titleSpan = document.createElement('span');\r\n titleSpan.classList.add('user-title');\r\n if (peerID == utils_1.$rootScope.myID) {\r\n title = 'Saved Messages';\r\n }\r\n //console.log('trying to load photo for:', title);\r\n appProfileManager_1.default.putPhoto(avatarDiv, dialog.peerID, true);\r\n titleSpan.innerHTML = title;\r\n //p.classList.add('')\r\n let span = document.createElement('span');\r\n span.classList.add('user-last-message');\r\n //captionDiv.append(titleSpan);\r\n //captionDiv.append(span);\r\n let paddingDiv = document.createElement('div');\r\n paddingDiv.classList.add('rp');\r\n paddingDiv.append(avatarDiv, captionDiv);\r\n misc_1.ripple(paddingDiv, (id) => {\r\n this.log('dialogs click element');\r\n this.lastClickID = id;\r\n return new Promise((resolve, reject) => {\r\n this.rippleCallback = resolve;\r\n //setTimeout(() => resolve(), 100);\r\n //window.requestAnimationFrame(() => window.requestAnimationFrame(() => resolve()));\r\n });\r\n }, (id) => {\r\n //console.log('appDialogsManager: ripple onEnd called!');\r\n if (id == this.lastGoodClickID) {\r\n appImManager_1.default.lazyLoadQueue.unlock();\r\n }\r\n });\r\n let li = document.createElement('li');\r\n li.append(paddingDiv);\r\n li.setAttribute('data-peerID', '' + peerID);\r\n let statusSpan = document.createElement('span');\r\n statusSpan.classList.add('message-status');\r\n let lastTimeSpan = document.createElement('span');\r\n lastTimeSpan.classList.add('message-time');\r\n let unreadMessagesSpan = document.createElement('span');\r\n let titleP = document.createElement('p');\r\n let rightSpan = document.createElement('span');\r\n rightSpan.append(statusSpan, lastTimeSpan);\r\n titleP.append(titleSpan, rightSpan);\r\n let messageP = document.createElement('p');\r\n messageP.append(span, unreadMessagesSpan);\r\n captionDiv.append(titleP, messageP);\r\n let dom = {\r\n avatarDiv,\r\n captionDiv,\r\n titleSpan,\r\n statusSpan,\r\n lastTimeSpan,\r\n unreadMessagesSpan,\r\n lastMessageSpan: span,\r\n containerEl: paddingDiv,\r\n listEl: li\r\n };\r\n if (!container) {\r\n if (dialog.folder_id && dialog.folder_id == 1) {\r\n this.scrollArchived.append(li);\r\n this.domsArchived[dialog.peerID] = dom;\r\n }\r\n else {\r\n this.scroll.append(li);\r\n this.doms[dialog.peerID] = dom;\r\n }\r\n if (dialog.pFlags.pinned) {\r\n li.classList.add('dialog-pinned');\r\n //this.chatList.insertBefore(this.pinnedDelimiter, li.nextSibling);\r\n dom.listEl.append(this.pinnedDelimiter);\r\n }\r\n this.setLastMessage(dialog);\r\n }\r\n else {\r\n container.append(li);\r\n }\r\n return { dom, dialog };\r\n }\r\n setTyping(dialog, user) {\r\n let dom = this.getDialogDom(dialog.peerID);\r\n let str = '';\r\n let senderBold = document.createElement('i');\r\n if (dialog.peerID < 0)\r\n str = (user.first_name || user.last_name || user.username) + ' ';\r\n str += 'typing...';\r\n senderBold.innerText = str;\r\n dom.lastMessageSpan.innerHTML = '';\r\n dom.lastMessageSpan.append(senderBold);\r\n dom.lastMessageSpan.classList.add('user-typing');\r\n }\r\n unsetTyping(dialog) {\r\n let dom = this.getDialogDom(dialog.peerID);\r\n dom.lastMessageSpan.classList.remove('user-typing');\r\n this.setLastMessage(dialog, null, dom);\r\n }\r\n}\r\nexports.AppDialogsManager = AppDialogsManager;\r\nexports.default = new AppDialogsManager();\r\n" }, { - "id": 26, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "name": "./src/lib/appManagers/appSidebarLeft.ts", - "index": 58, - "index2": 77, - "size": 18861, + "id": 27, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "name": "./src/components/wrappers.ts", + "index": 64, + "index2": 59, + "size": 30356, "cacheable": true, "built": true, "optional": false, @@ -4227,34 +4257,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "issuerId": 25, - "issuerName": "./src/components/pageIm.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "issuerId": 12, + "issuerName": "./src/lib/appManagers/appImManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 + } + }, + { + "id": 12, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "name": "./src/lib/appManagers/appImManager.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 45, + "building": 1068, + "dependencies": 99 }, "failed": false, "errors": 0, @@ -4262,40 +4302,40 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", "module": "./src/lib/appManagers/appImManager.ts", "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./appSidebarLeft", - "loc": "37:41-68" + "userRequest": "../../components/wrappers", + "loc": "24:19-55" }, { - "moduleId": 25, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "module": "./src/components/pageIm.ts", - "moduleName": "./src/components/pageIm.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "../lib/appManagers/appSidebarLeft", - "loc": "17:41-85" + "userRequest": "../../components/wrappers", + "loc": "26:19-55" }, { - "moduleId": 28, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", - "module": "./src/lib/appManagers/appDialogsManager.ts", - "moduleName": "./src/lib/appManagers/appDialogsManager.ts", + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", "type": "cjs require", - "userRequest": "./appSidebarLeft", - "loc": "24:41-68" + "userRequest": "./wrappers", + "loc": "20:19-40" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "module": "./src/components/emoticonsDropdown.ts", + "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "./appManagers/appSidebarLeft", - "loc": "20:41-80" + "userRequest": "./wrappers", + "loc": "25:19-40" } ], "usedExports": true, @@ -4303,16 +4343,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 2, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst polyfill_1 = require(\"../polyfill\");\nconst misc_1 = require(\"../../components/misc\");\nconst scrollable_1 = __importDefault(require(\"../../components/scrollable\"));\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\nconst appDialogsManager_1 = __importDefault(require(\"./appDialogsManager\"));\nconst utils_1 = require(\"../utils\");\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst services_1 = require(\"../services\");\nclass SearchGroup {\n constructor(name, type) {\n this.name = name;\n this.type = type;\n this.list = document.createElement('ul');\n this.container = document.createElement('div');\n this.nameEl = document.createElement('div');\n this.nameEl.classList.add('search-group__name');\n this.nameEl.innerText = name;\n this.container.classList.add('search-group');\n this.container.append(this.nameEl, this.list);\n this.container.style.display = 'none';\n appDialogsManager_1.default.setListClickListener(this.list);\n }\n clear() {\n this.container.style.display = 'none';\n this.list.innerHTML = '';\n }\n setActive() {\n this.container.style.display = '';\n }\n}\nclass AppSidebarLeft {\n constructor() {\n this.sidebarEl = document.querySelector('.page-chats .chats-container');\n this.searchInput = document.getElementById('global-search');\n this.toolsBtn = this.sidebarEl.querySelector('.sidebar-tools-button');\n this.backBtn = this.sidebarEl.querySelector('.sidebar-back-button');\n this.searchContainer = this.sidebarEl.querySelector('#search-container');\n this.menuEl = this.toolsBtn.querySelector('.btn-menu');\n this.savedBtn = this.menuEl.querySelector('.menu-saved');\n this.archivedBtn = this.menuEl.querySelector('.menu-archive');\n this.archivedCount = this.archivedBtn.querySelector('.archived-count');\n this.listsContainer = null;\n this.chatsArchivedContainer = document.getElementById('chats-archived-container');\n this.chatsContainer = document.getElementById('chats-container');\n this.chatsArchivedOffsetIndex = 0;\n this.chatsOffsetIndex = 0;\n this.chatsLoadCount = 0;\n this.log = polyfill_1.logger('SL');\n this.peerID = 0;\n this.minMsgID = 0;\n this.loadedCount = 0;\n this.foundCount = 0;\n this.offsetRate = 0;\n this.searchPromise = null;\n this.searchTimeout = 0;\n this.query = '';\n this.scroll = null;\n this.scrollArchived = null;\n this.searchGroups = {\n contacts: new SearchGroup('Contacts and Chats', 'contacts'),\n globalContacts: new SearchGroup('Global Search', 'contacts'),\n globalMessages: new SearchGroup('Global Search', 'messages'),\n privateMessages: new SearchGroup('Private Search', 'messages')\n };\n this.chatsPreloader = document.createElement('div');\n this.chatsPreloader.classList.add('preloader');\n misc_1.putPreloader(this.chatsPreloader);\n this.chatsContainer.append(this.chatsPreloader);\n this.chatsLoadCount = Math.round(document.body.scrollHeight / 70 * 1.5);\n this.scroll = new scrollable_1.default(this.chatsContainer);\n this.scroll.setVirtualContainer(appDialogsManager_1.default.chatList);\n appDialogsManager_1.default.chatsHidden = this.scroll.hiddenElements;\n this.scroll.container.addEventListener('scroll', this.onChatsScroll.bind(this));\n this.scrollArchived = new scrollable_1.default(this.chatsArchivedContainer);\n this.scrollArchived.setVirtualContainer(appDialogsManager_1.default.chatListArchived);\n appDialogsManager_1.default.chatsArchivedHidden = this.scrollArchived.hiddenElements;\n this.scroll.container.addEventListener('scroll', this.onChatsArchivedScroll.bind(this));\n this.listsContainer = new scrollable_1.default(this.searchContainer).container;\n for (let i in this.searchGroups) {\n this.listsContainer.append(this.searchGroups[i].container);\n }\n this.savedBtn.addEventListener('click', (e) => {\n ///////this.log('savedbtn click');\n setTimeout(() => {\n let dom = appDialogsManager_1.default.getDialogDom(appImManager_1.default.myID);\n if (dom) {\n dom.listEl.click();\n }\n else {\n appImManager_1.default.setPeer(appImManager_1.default.myID);\n }\n }, 0);\n });\n this.archivedBtn.addEventListener('click', (e) => {\n this.chatsArchivedContainer.classList.add('active');\n this.toolsBtn.classList.remove('active');\n this.backBtn.classList.add('active');\n //this.toolsBtn.classList.remove('tgico-menu', 'btn-menu-toggle');\n //this.toolsBtn.classList.add('tgico-back');\n });\n /* this.listsContainer.insertBefore(this.searchMessagesList, this.listsContainer.lastElementChild);\n for(let i = 0; i < 25; ++i) {\n let li = document.createElement('li');\n li.innerHTML = `

Влад14:41

это важно

`;\n this.searchMessagesList.append(li);\n } */\n this.listsContainer.addEventListener('scroll', this.onSidebarScroll.bind(this));\n //this.searchContainer.append(this.listsContainer);\n this.searchInput.addEventListener('focus', (e) => {\n /* this.toolsBtn.classList.remove('tgico-menu', 'btn-menu-toggle');\n this.toolsBtn.classList.add('tgico-back'); */\n this.toolsBtn.classList.remove('active');\n this.backBtn.classList.add('active');\n this.searchContainer.classList.add('active');\n if (!this.searchInput.value) {\n for (let i in this.searchGroups) {\n this.searchGroups[i].clear();\n }\n }\n this.searchInput.addEventListener('blur', (e) => {\n if (!this.searchInput.value) {\n /* this.toolsBtn.classList.add('tgico-menu');\n this.toolsBtn.classList.remove('tgico-back'); */\n this.toolsBtn.classList.add('active');\n this.backBtn.classList.remove('active');\n this.searchContainer.classList.remove('active');\n this.backBtn.click();\n /* setTimeout(() => {\n //this.toolsBtn.click();\n this.toolsBtn.classList.add('btn-menu-toggle');\n }, 200); */\n }\n /* this.peerID = 0;\n this.loadedCount = 0;\n this.minMsgID = 0; */\n }, { once: true });\n });\n this.searchInput.addEventListener('input', (e) => {\n //console.log('messageInput input', this.innerText, serializeNodes(Array.from(messageInput.childNodes)));\n let value = this.searchInput.value;\n ////////this.log('input', value);\n if (!value.trim()) {\n //this.peerID = 0;\n return;\n }\n this.query = value;\n this.minMsgID = 0;\n this.loadedCount = 0;\n this.foundCount = 0;\n this.offsetRate = 0;\n for (let i in this.searchGroups) {\n this.searchGroups[i].clear();\n }\n this.searchPromise = null;\n this.searchMore();\n });\n this.backBtn.addEventListener('click', (e) => {\n this.chatsArchivedContainer.classList.remove('active');\n this.toolsBtn.classList.add('active');\n this.backBtn.classList.remove('active');\n this.searchInput.value = '';\n this.searchContainer.classList.remove('active');\n this.peerID = 0;\n });\n window.addEventListener('resize', () => {\n this.chatsLoadCount = Math.round(document.body.scrollHeight / 70 * 1.5);\n setTimeout(() => {\n this.onSidebarScroll();\n this.scroll.onScroll();\n this.onChatsScroll();\n this.onChatsArchivedScroll();\n }, 0);\n });\n /* appUsersManager.getTopPeers().then(categories => {\n this.log('got top categories:', categories);\n }); */\n }\n loadDialogs(archived = false) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.loadDialogsPromise /* || 1 == 1 */)\n return this.loadDialogsPromise;\n (archived ? this.chatsArchivedContainer : this.chatsContainer).append(this.chatsPreloader);\n //let offset = appMessagesManager.generateDialogIndex();/* appMessagesManager.dialogsNum */;\n let offset = archived ? this.chatsArchivedOffsetIndex : this.chatsOffsetIndex;\n //let offset = 0;\n try {\n this.loadDialogsPromise = appMessagesManager_1.default.getConversations('', offset, this.chatsLoadCount, +archived);\n let result = yield this.loadDialogsPromise;\n if (result && result.dialogs && result.dialogs.length) {\n let index = result.dialogs[result.dialogs.length - 1].index;\n if (archived)\n this.chatsArchivedOffsetIndex = index;\n else\n this.chatsOffsetIndex = index;\n result.dialogs.forEach((dialog) => {\n appDialogsManager_1.default.addDialog(dialog);\n });\n }\n /* if(archived) {\n let count = result.count;\n this.archivedCount.innerText = '' + count;\n } */\n /////this.log('loaded ' + this.chatsLoadCount + ' dialogs by offset:', offset, result, this.scroll.hiddenElements);\n this.scroll.onScroll();\n }\n catch (err) {\n this.log.error(err);\n }\n this.chatsPreloader.remove();\n this.loadDialogsPromise = undefined;\n });\n }\n onChatsScroll() {\n //this.log(this.scroll.hiddenElements.down.length, this.loadDialogsPromise, appDialogsManager.chatList.childNodes);\n if (this.scroll.hiddenElements.down.length > 0 /* || 1 == 1 */)\n return;\n if (!this.loadDialogsPromise) {\n let d = Array.from(appDialogsManager_1.default.chatList.childNodes).slice(-5);\n for (let node of d) {\n if (utils_1.isElementInViewport(node)) {\n this.loadDialogs();\n break;\n }\n }\n //console.log('last 5 dialogs:', d);\n }\n }\n onChatsArchivedScroll() {\n //this.log(this.scrollArchived.hiddenElements.down.length, this.loadDialogsPromise, appDialogsManager.chatListArchived.childNodes);\n if (this.scrollArchived.hiddenElements.down.length > 0 /* || 1 == 1 */)\n return;\n if (!this.loadDialogsPromise) {\n let d = Array.from(appDialogsManager_1.default.chatListArchived.childNodes).slice(-5);\n for (let node of d) {\n if (utils_1.isElementInViewport(node)) {\n this.loadDialogs(true);\n break;\n }\n }\n //console.log('last 5 dialogs:', d);\n }\n }\n onSidebarScroll() {\n if (!this.query.trim())\n return;\n let elements = Array.from(this.searchGroups[this.peerID ? 'privateMessages' : 'globalMessages'].list.childNodes).slice(-5);\n for (let li of elements) {\n if (utils_1.isElementInViewport(li)) {\n this.log('Will load more search');\n if (!this.searchTimeout) {\n this.searchTimeout = setTimeout(() => {\n this.searchMore();\n this.searchTimeout = 0;\n }, 0);\n }\n break;\n }\n }\n }\n beginSearch(peerID) {\n if (peerID) {\n this.peerID = peerID;\n }\n this.searchInput.focus();\n }\n searchMore() {\n if (this.searchPromise)\n return this.searchPromise;\n let query = this.query;\n if (!query.trim())\n return;\n if (this.loadedCount != 0 && this.loadedCount >= this.foundCount) {\n return Promise.resolve();\n }\n let maxID = appMessagesIDsManager_1.default.getMessageIDInfo(this.minMsgID)[0];\n if (!this.peerID && !maxID) {\n appUsersManager_1.default.searchContacts(query, 20).then((contacts) => {\n if (this.searchInput.value != query) {\n return;\n }\n ///////this.log('input search contacts result:', contacts);\n let setResults = (results, group, showMembersCount = false) => {\n results.forEach((inputPeer) => {\n let peerID = services_1.appPeersManager.getPeerID(inputPeer);\n let peer = services_1.appPeersManager.getPeer(peerID);\n let originalDialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\n //////////this.log('contacts peer', peer);\n if (!originalDialog) {\n /////////this.log('no original dialog by peerID:', peerID);\n originalDialog = {\n peerID: peerID,\n pFlags: {},\n peer: peer\n };\n }\n let { dialog, dom } = appDialogsManager_1.default.addDialog(originalDialog, group.list, false);\n if (showMembersCount && (peer.participants_count || peer.participants)) {\n let isChannel = services_1.appPeersManager.isChannel(peerID) && !services_1.appPeersManager.isMegagroup(peerID);\n let participants_count = peer.participants_count || peer.participants.participants.length;\n let subtitle = utils_1.numberWithCommas(participants_count) + ' ' + (isChannel ? 'subscribers' : 'members');\n dom.lastMessageSpan.innerText = subtitle;\n }\n else {\n let username = services_1.appPeersManager.getPeerUsername(peerID);\n if (!username) {\n let user = appUsersManager_1.default.getUser(peerID);\n if (user && user.phone) {\n username = '+' + misc_1.formatPhoneNumber(user.phone).formatted;\n }\n }\n else {\n username = '@' + username;\n }\n dom.lastMessageSpan.innerText = username;\n }\n });\n if (results.length) {\n group.setActive();\n }\n };\n setResults(contacts.my_results, this.searchGroups.contacts, true);\n setResults(contacts.results, this.searchGroups.globalContacts);\n });\n }\n return this.searchPromise = appMessagesManager_1.default.getSearch(this.peerID, query, null, maxID, 20, this.offsetRate).then(res => {\n this.searchPromise = null;\n if (this.searchInput.value != query) {\n return;\n }\n /////////this.log('input search result:', this.peerID, query, null, maxID, 20, res);\n let { count, history, next_rate } = res;\n if (history[0] == this.minMsgID) {\n history.shift();\n }\n let searchGroup = this.searchGroups[this.peerID ? 'privateMessages' : 'globalMessages'];\n searchGroup.setActive();\n history.forEach((msgID) => {\n let message = appMessagesManager_1.default.getMessage(msgID);\n let originalDialog = appMessagesManager_1.default.getDialogByPeerID(message.peerID)[0];\n if (!originalDialog) {\n ////////this.log('no original dialog by message:', message);\n originalDialog = {\n peerID: message.peerID,\n pFlags: {},\n peer: message.to_id\n };\n }\n let { dialog, dom } = appDialogsManager_1.default.addDialog(originalDialog, searchGroup.list, false);\n appDialogsManager_1.default.setLastMessage(dialog, message, dom);\n });\n this.minMsgID = history[history.length - 1];\n this.offsetRate = next_rate;\n this.loadedCount += history.length;\n if (!this.foundCount) {\n this.foundCount = count;\n }\n }).catch(err => {\n this.log.error('search error', err);\n this.searchPromise = null;\n });\n }\n}\nexports.default = new AppSidebarLeft();\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst appPhotosManager_1 = __importDefault(require(\"../lib/appManagers/appPhotosManager\"));\r\n//import CryptoWorker from '../lib/crypto/cryptoworker';\r\nconst mtprotoworker_1 = __importDefault(require(\"../lib/mtproto/mtprotoworker\"));\r\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\nconst appStickersManager_1 = __importDefault(require(\"../lib/appManagers/appStickersManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst preloader_1 = __importDefault(require(\"./preloader\"));\r\nconst apiFileManager_1 = __importDefault(require(\"../lib/mtproto/apiFileManager\"));\r\nconst appWebpManager_1 = __importDefault(require(\"../lib/appManagers/appWebpManager\"));\r\nconst mediaPlayer_1 = __importStar(require(\"../lib/mediaPlayer\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst misc_1 = require(\"./misc\");\r\nfunction wrapVideo({ doc, container, message, justLoader, preloader, round, boxWidth, boxHeight, withTail, isOut, middleware, lazyLoadQueue }) {\r\n let img;\r\n if (withTail) {\r\n img = wrapMediaWithTail(doc, message, container, boxWidth, boxHeight, isOut);\r\n }\r\n else {\r\n if (!container.firstElementChild || (container.firstElementChild.tagName != 'IMG' && container.firstElementChild.tagName != 'VIDEO')) {\r\n let size = appPhotosManager_1.default.setAttachmentSize(doc, container, boxWidth, boxHeight);\r\n }\r\n img = container.firstElementChild || new Image();\r\n if (!container.contains(img)) {\r\n container.append(img);\r\n }\r\n }\r\n if (!preloader) {\r\n preloader = new preloader_1.default(container, true);\r\n }\r\n let video = document.createElement('video');\r\n if (withTail) {\r\n let foreignObject = document.createElementNS(\"http://www.w3.org/2000/svg\", 'foreignObject');\r\n let width = img.getAttributeNS(null, 'width');\r\n let height = img.getAttributeNS(null, 'height');\r\n foreignObject.setAttributeNS(null, 'width', width);\r\n foreignObject.setAttributeNS(null, 'height', height);\r\n video.width = +width;\r\n video.height = +height;\r\n foreignObject.append(video);\r\n img.parentElement.append(foreignObject);\r\n }\r\n let source = document.createElement('source');\r\n video.append(source);\r\n let loadVideo = () => {\r\n let promise = appDocsManager_1.default.downloadDoc(doc);\r\n preloader.attach(container, true, promise);\r\n return promise.then(blob => {\r\n if (!middleware()) {\r\n return;\r\n }\r\n //return;\r\n console.log('loaded doc:', doc, doc.url, blob, container);\r\n misc_1.renderImageFromUrl(source, doc.url);\r\n source.type = doc.mime_type;\r\n video.append(source);\r\n if (!withTail) {\r\n if (img && container.contains(img)) {\r\n container.removeChild(img);\r\n }\r\n container.append(video);\r\n }\r\n if (!justLoader || round) {\r\n video.dataset.ckin = round ? 'circle' : 'default';\r\n video.dataset.overlay = '1';\r\n let player = new mediaPlayer_1.default(video, !round);\r\n }\r\n else if (doc.type == 'gif') {\r\n video.autoplay = true;\r\n video.loop = true;\r\n }\r\n });\r\n };\r\n if (doc.type == 'gif' || true) { // extra fix\r\n return doc.downloaded ? loadVideo() : lazyLoadQueue.push({ div: container, load: loadVideo, wasSeen: true });\r\n } /* else { // if video\r\n let load = () => appPhotosManager.preloadPhoto(doc).then((blob) => {\r\n if((this.peerID ? this.peerID : this.currentMessageID) != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n \r\n img.src = URL.createObjectURL(blob);\r\n \r\n if(!justLoader) {\r\n return loadVideo();\r\n } else {\r\n container.style.width = '';\r\n container.style.height = '';\r\n preloader.detach();\r\n }\r\n });\r\n \r\n return this.peerID ? this.loadMediaQueuePush(load) : load();\r\n } */\r\n}\r\nexports.wrapVideo = wrapVideo;\r\nfunction wrapDocument(doc, withTime = false, uploading = false) {\r\n if (doc.type == 'voice') {\r\n return wrapVoiceMessage(doc, withTime);\r\n }\r\n else if (doc.type == 'audio') {\r\n return wrapAudio(doc);\r\n }\r\n let docDiv = document.createElement('div');\r\n docDiv.classList.add('document');\r\n let iconDiv = document.createElement('div');\r\n iconDiv.classList.add('tgico-document');\r\n let extSplitted = doc.file_name ? doc.file_name.split('.') : '';\r\n let ext = '';\r\n ext = extSplitted.length > 1 && Array.isArray(extSplitted) ? extSplitted.pop().toLowerCase() : 'file';\r\n let ext2 = ext;\r\n if (doc.type == 'photo') {\r\n docDiv.classList.add('photo');\r\n ext2 = ``;\r\n }\r\n let fileName = doc.file_name || 'Unknown.file';\r\n let size = utils_1.formatBytes(doc.size);\r\n if (withTime) {\r\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n let date = new Date(doc.date * 1000);\r\n size += ' · ' + months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear()\r\n + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\r\n }\r\n docDiv.innerHTML = `\r\n
${ext2}
\r\n ${!uploading ? `
` : ''}\r\n
${fileName}
\r\n
${size}
\r\n `;\r\n if (!uploading) {\r\n let downloadDiv = docDiv.querySelector('.document-download');\r\n let preloader;\r\n let promise;\r\n docDiv.addEventListener('click', () => {\r\n if (!promise) {\r\n if (downloadDiv.classList.contains('downloading')) {\r\n return; // means not ready yet\r\n }\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n appDocsManager_1.default.saveDocFile(doc.id).then(res => {\r\n promise = res.promise;\r\n preloader.attach(downloadDiv, true, promise);\r\n promise.then(() => {\r\n downloadDiv.classList.remove('downloading');\r\n downloadDiv.remove();\r\n });\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n downloadDiv.classList.remove('downloading');\r\n promise = null;\r\n }\r\n });\r\n }\r\n return docDiv;\r\n}\r\nexports.wrapDocument = wrapDocument;\r\nfunction wrapAudio(doc, withTime = false) {\r\n let div = document.createElement('div');\r\n div.classList.add('audio');\r\n console.log('wrapAudio doc:', doc);\r\n /* let durationStr = String(doc.duration | 0).toHHMMSS(true);\r\n let title = doc.audioTitle || doc.file_name;\r\n let subtitle = doc.audioPerformer ? RichTextProcessor.wrapPlainText(doc.audioPerformer) : ''; */\r\n let durationStr = '3:24';\r\n let title = 'Million Telegrams';\r\n let subtitle = 'Best Artist';\r\n div.innerHTML = `\r\n
${title}
\r\n
${subtitle}
\r\n
\r\n
\r\n
${durationStr}
\r\n `;\r\n //////console.log('wrapping audio', doc, doc.attributes[0].waveform);\r\n let timeDiv = div.lastElementChild;\r\n let downloadDiv = div.querySelector('.audio-download');\r\n let preloader;\r\n let promise;\r\n let progress;\r\n let onClick = () => {\r\n if (!promise) {\r\n if (downloadDiv.classList.contains('downloading')) {\r\n return; // means not ready yet\r\n }\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n let promise = appDocsManager_1.default.downloadDoc(doc.id);\r\n preloader.attach(downloadDiv, true, promise);\r\n promise.then(blob => {\r\n downloadDiv.classList.remove('downloading');\r\n downloadDiv.remove();\r\n let audio = document.createElement('audio');\r\n let source = document.createElement('source');\r\n source.src = URL.createObjectURL(blob);\r\n source.type = doc.mime_type;\r\n audio.volume = 1;\r\n progress = new mediaPlayer_1.MediaProgressLine(audio);\r\n div.removeEventListener('click', onClick);\r\n let toggle = div.querySelector('.audio-toggle');\r\n let subtitle = div.querySelector('.audio-subtitle');\r\n toggle.addEventListener('click', () => {\r\n subtitle.innerHTML = '';\r\n subtitle.append(progress.container);\r\n if (audio.paused) {\r\n if (lastAudioToggle && lastAudioToggle.classList.contains('tgico-largepause')) {\r\n lastAudioToggle.click();\r\n }\r\n audio.currentTime = 0;\r\n audio.play();\r\n lastAudioToggle = toggle;\r\n toggle.classList.remove('tgico-largeplay');\r\n toggle.classList.add('tgico-largepause');\r\n }\r\n else {\r\n audio.pause();\r\n toggle.classList.add('tgico-largeplay');\r\n toggle.classList.remove('tgico-largepause');\r\n }\r\n });\r\n audio.addEventListener('ended', () => {\r\n toggle.classList.add('tgico-largeplay');\r\n toggle.classList.remove('tgico-largepause');\r\n timeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true);\r\n });\r\n audio.style.display = 'none';\r\n audio.append(source);\r\n div.append(audio);\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n downloadDiv.classList.remove('downloading');\r\n promise = null;\r\n }\r\n };\r\n div.addEventListener('click', onClick);\r\n div.click();\r\n return div;\r\n}\r\nexports.wrapAudio = wrapAudio;\r\nlet lastAudioToggle = null;\r\nfunction wrapVoiceMessage(doc, withTime = false) {\r\n let div = document.createElement('div');\r\n div.classList.add('audio', 'is-voice');\r\n let duration = doc.duration;\r\n let durationStr = String(duration | 0).toHHMMSS(true);\r\n div.innerHTML = `\r\n
\r\n
\r\n
${durationStr}
\r\n `;\r\n //////console.log('wrapping audio', doc, doc.attributes[0].waveform);\r\n let timeDiv = div.lastElementChild;\r\n let downloadDiv = div.querySelector('.audio-download');\r\n let preloader;\r\n let promise;\r\n let svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n svg.classList.add('audio-waveform');\r\n svg.setAttributeNS(null, 'width', '190');\r\n svg.setAttributeNS(null, 'height', '23');\r\n svg.setAttributeNS(null, 'viewBox', '0 0 190 23');\r\n div.insertBefore(svg, div.lastElementChild);\r\n let wave = doc.attributes[0].waveform;\r\n let index = 0;\r\n let skipped = 0;\r\n for (let uint8 of wave) {\r\n if (index > 0 && index % 4 == 0) {\r\n ++index;\r\n ++skipped;\r\n continue;\r\n }\r\n let percents = uint8 / 255;\r\n let height = 23 * percents;\r\n if ( /* !height || */height < 2) {\r\n height = 2;\r\n }\r\n svg.insertAdjacentHTML('beforeend', `\r\n \r\n `);\r\n ++index;\r\n }\r\n let progress = div.querySelector('.audio-waveform');\r\n let onClick = () => {\r\n if (!promise) {\r\n if (downloadDiv.classList.contains('downloading')) {\r\n return; // means not ready yet\r\n }\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n let promise = appDocsManager_1.default.downloadDoc(doc.id);\r\n preloader.attach(downloadDiv, true, promise);\r\n promise.then(blob => {\r\n downloadDiv.classList.remove('downloading');\r\n downloadDiv.remove();\r\n let audio = document.createElement('audio');\r\n let source = document.createElement('source');\r\n source.src = URL.createObjectURL(blob);\r\n source.type = doc.mime_type;\r\n audio.volume = 1;\r\n div.removeEventListener('click', onClick);\r\n let toggle = div.querySelector('.audio-toggle');\r\n let interval = 0;\r\n let lastIndex = 0;\r\n toggle.addEventListener('click', () => {\r\n if (audio.paused) {\r\n if (lastAudioToggle && lastAudioToggle.classList.contains('tgico-largepause')) {\r\n lastAudioToggle.click();\r\n }\r\n audio.currentTime = 0;\r\n audio.play();\r\n lastAudioToggle = toggle;\r\n toggle.classList.remove('tgico-largeplay');\r\n toggle.classList.add('tgico-largepause');\r\n Array.from(svg.children).forEach(node => node.classList.remove('active'));\r\n interval = setInterval(() => {\r\n if (lastIndex > svg.childElementCount || isNaN(audio.duration)) {\r\n clearInterval(interval);\r\n return;\r\n }\r\n timeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true);\r\n lastIndex = Math.round(audio.currentTime / audio.duration * 47);\r\n //svg.children[lastIndex].setAttributeNS(null, 'fill', '#000');\r\n //svg.children[lastIndex].classList.add('active'); #Иногда пропускает полоски..\r\n Array.from(svg.children).slice(0, lastIndex + 1).forEach(node => node.classList.add('active'));\r\n //++lastIndex;\r\n //console.log('lastIndex:', lastIndex, audio.currentTime);\r\n //}, duration * 1000 / svg.childElementCount | 0/* 63 * duration / 10 */);\r\n }, 20);\r\n }\r\n else {\r\n audio.pause();\r\n toggle.classList.add('tgico-largeplay');\r\n toggle.classList.remove('tgico-largepause');\r\n clearInterval(interval);\r\n }\r\n });\r\n audio.addEventListener('ended', () => {\r\n toggle.classList.add('tgico-largeplay');\r\n toggle.classList.remove('tgico-largepause');\r\n clearInterval(interval);\r\n Array.from(svg.children).forEach(node => node.classList.remove('active'));\r\n timeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true);\r\n });\r\n let mousedown = false, mousemove = false;\r\n progress.addEventListener('mouseleave', (e) => {\r\n if (mousedown) {\r\n audio.play();\r\n mousedown = false;\r\n }\r\n mousemove = false;\r\n });\r\n progress.addEventListener('mousemove', (e) => {\r\n mousemove = true;\r\n if (mousedown)\r\n scrub(e, audio, progress);\r\n });\r\n progress.addEventListener('mousedown', (e) => {\r\n e.preventDefault();\r\n if (!audio.paused) {\r\n audio.pause();\r\n scrub(e, audio, progress);\r\n mousedown = true;\r\n }\r\n });\r\n progress.addEventListener('mouseup', (e) => {\r\n if (mousemove && mousedown) {\r\n audio.play();\r\n mousedown = false;\r\n }\r\n });\r\n progress.addEventListener('click', (e) => {\r\n if (!audio.paused)\r\n scrub(e, audio, progress);\r\n });\r\n function scrub(e, audio, progress) {\r\n let scrubTime = e.offsetX / 190 /* width */ * audio.duration;\r\n Array.from(svg.children).forEach(node => node.classList.remove('active'));\r\n lastIndex = Math.round(scrubTime / audio.duration * 47);\r\n Array.from(svg.children).slice(0, lastIndex + 1).forEach(node => node.classList.add('active'));\r\n audio.currentTime = scrubTime;\r\n }\r\n audio.style.display = 'none';\r\n audio.append(source);\r\n div.append(audio);\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n downloadDiv.classList.remove('downloading');\r\n promise = null;\r\n }\r\n };\r\n div.addEventListener('click', onClick);\r\n div.click();\r\n return div;\r\n}\r\nexports.wrapVoiceMessage = wrapVoiceMessage;\r\nfunction wrapMediaWithTail(photo, message, container, boxWidth, boxHeight, isOut) {\r\n let svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n svg.classList.add('bubble__media-container', isOut ? 'is-out' : 'is-in');\r\n let image = document.createElementNS(\"http://www.w3.org/2000/svg\", \"image\");\r\n svg.append(image);\r\n let size = appPhotosManager_1.default.setAttachmentSize(photo._ == 'document' ? photo : photo.id, svg, boxWidth, boxHeight);\r\n let width = +svg.getAttributeNS(null, 'width');\r\n let height = +svg.getAttributeNS(null, 'height');\r\n let clipID = 'clip' + message.mid;\r\n svg.dataset.clipID = clipID;\r\n let defs = document.createElementNS(\"http://www.w3.org/2000/svg\", 'defs');\r\n let clipPathHTML = '';\r\n if (message.message) {\r\n //clipPathHTML += ``;\r\n }\r\n else {\r\n if (isOut) {\r\n clipPathHTML += `\r\n \r\n \r\n `;\r\n }\r\n else {\r\n clipPathHTML += `\r\n \r\n \r\n `;\r\n }\r\n }\r\n defs.innerHTML = `${clipPathHTML}`;\r\n svg.prepend(defs);\r\n container.appendChild(svg);\r\n return image;\r\n}\r\nfunction wrapPhoto(photoID, message, container, boxWidth = 380, boxHeight = 380, withTail = true, isOut = false, lazyLoadQueue, middleware) {\r\n let photo = appPhotosManager_1.default.getPhoto(photoID);\r\n let size;\r\n let image;\r\n if (withTail) {\r\n image = wrapMediaWithTail(photo, message, container, boxWidth, boxHeight, isOut);\r\n }\r\n else { // means webpage's preview\r\n size = appPhotosManager_1.default.setAttachmentSize(photoID, container, boxWidth, boxHeight, false);\r\n image = container.firstElementChild || new Image();\r\n if (!container.contains(image)) {\r\n container.appendChild(image);\r\n }\r\n }\r\n console.log('wrapPhoto downloaded:', photo, photo.downloaded, container);\r\n // так нельзя делать, потому что может быть загружен неправильный размер картинки\r\n /* if(photo.downloaded && photo.url) {\r\n renderImageFromUrl(image, photo.url);\r\n return;\r\n } */\r\n let preloader;\r\n if (!photo.downloaded)\r\n preloader = new preloader_1.default(container, false);\r\n let load = () => {\r\n let promise = appPhotosManager_1.default.preloadPhoto(photoID, size);\r\n if (preloader) {\r\n preloader.attach(container, true, promise);\r\n }\r\n return promise.then(() => {\r\n if (middleware && !middleware())\r\n return;\r\n misc_1.renderImageFromUrl(image, photo.url);\r\n });\r\n };\r\n /////////console.log('wrapPhoto', load, container, image);\r\n return photo.downloaded ? load() : lazyLoadQueue.push({ div: container, load: load, wasSeen: true });\r\n}\r\nexports.wrapPhoto = wrapPhoto;\r\nfunction wrapSticker(doc, div, middleware, lazyLoadQueue, group, canvas, play = false, onlyThumb = false) {\r\n let stickerType = doc.mime_type == \"application/x-tgsticker\" ? 2 : (doc.mime_type == \"image/webp\" ? 1 : 0);\r\n if (stickerType == 2 && !lottieLoader_1.default.loaded) {\r\n lottieLoader_1.default.loadLottie();\r\n }\r\n if (!stickerType) {\r\n console.error('wrong doc for wrapSticker!', doc, div);\r\n return Promise.resolve();\r\n }\r\n console.log('wrap sticker', doc, div, onlyThumb);\r\n if (doc.thumbs && !div.firstElementChild && (!doc.downloaded || stickerType == 2)) {\r\n let thumb = doc.thumbs[0];\r\n //console.log('wrap sticker', thumb, div);\r\n if (thumb.bytes) {\r\n apiFileManager_1.default.saveSmallFile(thumb.location, thumb.bytes);\r\n appPhotosManager_1.default.setAttachmentPreview(thumb.bytes, div, true);\r\n if (onlyThumb)\r\n return Promise.resolve();\r\n }\r\n }\r\n if (onlyThumb && doc.thumbs) {\r\n let thumb = doc.thumbs[0];\r\n let load = () => apiFileManager_1.default.downloadSmallFile({\r\n _: 'inputDocumentFileLocation',\r\n access_hash: doc.access_hash,\r\n file_reference: doc.file_reference,\r\n thumb_size: thumb.type,\r\n id: doc.id\r\n }, { dcID: doc.dc_id }).then(blob => {\r\n let img = new Image();\r\n appWebpManager_1.default.polyfillImage(img, blob);\r\n div.append(img);\r\n div.dataset.docID = doc.id;\r\n appStickersManager_1.default.saveSticker(doc);\r\n });\r\n return lazyLoadQueue ? (lazyLoadQueue.push({ div, load }), Promise.resolve()) : load();\r\n }\r\n let load = () => appDocsManager_1.default.downloadDoc(doc.id).then(blob => {\r\n //console.log('loaded sticker:', blob, div);\r\n if (middleware && !middleware())\r\n return;\r\n /* if(div.firstElementChild) {\r\n div.firstElementChild.remove();\r\n } */\r\n if (stickerType == 2) {\r\n const reader = new FileReader();\r\n reader.addEventListener('loadend', (e) => __awaiter(this, void 0, void 0, function* () {\r\n console.time('decompress sticker' + doc.id);\r\n console.time('render sticker' + doc.id);\r\n // @ts-ignore\r\n const text = e.srcElement.result;\r\n let json = yield mtprotoworker_1.default.gzipUncompress(text, true);\r\n console.timeEnd('decompress sticker' + doc.id);\r\n let animation = yield lottieLoader_1.default.loadAnimation({\r\n container: div,\r\n loop: false,\r\n autoplay: false,\r\n animationData: JSON.parse(json),\r\n renderer: canvas ? 'canvas' : 'svg'\r\n }, group);\r\n console.timeEnd('render sticker' + doc.id);\r\n if (div.firstElementChild && div.firstElementChild.tagName != 'CANVAS') {\r\n div.firstElementChild.remove();\r\n }\r\n if (!canvas) {\r\n div.addEventListener('mouseover', (e) => {\r\n let animation = lottieLoader_1.default.getAnimation(div, group);\r\n if (animation) {\r\n //console.log('sticker hover', animation, div);\r\n // @ts-ignore\r\n animation.loop = true;\r\n // @ts-ignore\r\n if (animation.currentFrame == animation.totalFrames - 1) {\r\n animation.goToAndPlay(0, true);\r\n }\r\n else {\r\n animation.play();\r\n }\r\n div.addEventListener('mouseout', () => {\r\n // @ts-ignore\r\n animation.loop = false;\r\n }, { once: true });\r\n }\r\n });\r\n } /* else {\r\n let canvas = div.firstElementChild as HTMLCanvasElement;\r\n if(!canvas.width && !canvas.height) {\r\n console.log('Need lottie resize');\r\n \r\n // @ts-ignore\r\n animation.resize();\r\n }\r\n } */\r\n if (play) {\r\n animation.play();\r\n }\r\n }));\r\n reader.readAsArrayBuffer(blob);\r\n }\r\n else if (stickerType == 1) {\r\n let img = new Image();\r\n if (!doc.url) {\r\n appWebpManager_1.default.polyfillImage(img, blob).then((url) => {\r\n doc.url = url;\r\n if (div.firstElementChild && div.firstElementChild != img) {\r\n div.firstElementChild.remove();\r\n }\r\n });\r\n }\r\n else {\r\n img.src = doc.url;\r\n }\r\n div.append(img);\r\n }\r\n div.dataset.docID = doc.id;\r\n appStickersManager_1.default.saveSticker(doc);\r\n });\r\n return lazyLoadQueue && (!doc.downloaded || stickerType == 2) ? (lazyLoadQueue.push({ div, load, wasSeen: group == 'chat' }), Promise.resolve()) : load();\r\n}\r\nexports.wrapSticker = wrapSticker;\r\nfunction wrapReply(title, subtitle, media) {\r\n let div = document.createElement('div');\r\n div.classList.add('reply');\r\n let replyBorder = document.createElement('div');\r\n replyBorder.classList.add('reply-border');\r\n let replyContent = document.createElement('div');\r\n replyContent.classList.add('reply-content');\r\n let replyTitle = document.createElement('div');\r\n replyTitle.classList.add('reply-title');\r\n let replySubtitle = document.createElement('div');\r\n replySubtitle.classList.add('reply-subtitle');\r\n replyTitle.innerHTML = title ? richtextprocessor_1.RichTextProcessor.wrapEmojiText(title) : '';\r\n if (media) {\r\n if (media.photo) {\r\n replySubtitle.innerHTML = 'Photo';\r\n }\r\n else if (media.document && media.document.type) {\r\n replySubtitle.innerHTML = media.document.type;\r\n }\r\n else if (media.webpage) {\r\n replySubtitle.innerHTML = richtextprocessor_1.RichTextProcessor.wrapPlainText(media.webpage.url);\r\n }\r\n else {\r\n replySubtitle.innerHTML = media._;\r\n }\r\n if (media.photo || (media.document && ['video'].indexOf(media.document.type) !== -1)) {\r\n let replyMedia = document.createElement('div');\r\n replyMedia.classList.add('reply-media');\r\n let photo = media.photo || media.document;\r\n let sizes = photo.sizes || photo.thumbs;\r\n if (sizes && sizes[0].bytes) {\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, replyMedia, false, true);\r\n }\r\n appPhotosManager_1.default.preloadPhoto(photo, appPhotosManager_1.default.choosePhotoSize(photo, 32, 32))\r\n .then(blob => {\r\n misc_1.renderImageFromUrl(replyMedia, photo._ == 'photo' ? photo.url : URL.createObjectURL(blob));\r\n });\r\n replyContent.append(replyMedia);\r\n div.classList.add('is-reply-media');\r\n }\r\n }\r\n else {\r\n replySubtitle.innerHTML = subtitle ? richtextprocessor_1.RichTextProcessor.wrapEmojiText(subtitle) : '';\r\n }\r\n replyContent.append(replyTitle, replySubtitle);\r\n div.append(replyBorder, replyContent);\r\n /////////console.log('wrapReply', title, subtitle, media);\r\n return div;\r\n}\r\nexports.wrapReply = wrapReply;\r\n" }, { - "id": 27, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/apiUpdatesManager.ts", - "name": "./src/lib/appManagers/apiUpdatesManager.ts", - "index": 63, - "index2": 57, - "size": 20000, + "id": 30, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts", + "name": "./src/lib/mtproto/serverTimeManager.ts", + "index": 45, + "index2": 38, + "size": 1281, "cacheable": true, "built": true, "optional": false, @@ -4320,44 +4360,54 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", + "issuerId": 4, + "issuerName": "./src/lib/appManagers/appUsersManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "name": "./src/lib/services.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 386, + "building": 1105, + "dependencies": 45 + } + }, + { + "id": 4, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", + "name": "./src/lib/appManagers/appUsersManager.ts", + "profile": { + "factory": 576, + "building": 856, + "dependencies": 834 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 946, + "building": 139, + "dependencies": 0 }, "failed": false, "errors": 0, @@ -4365,40 +4415,31 @@ "assets": [], "reasons": [ { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./apiUpdatesManager", - "loc": "22:44-74" - }, - { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", + "moduleId": 4, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appUsersManager.ts", + "module": "./src/lib/appManagers/appUsersManager.ts", + "moduleName": "./src/lib/appManagers/appUsersManager.ts", "type": "cjs require", - "userRequest": "./apiUpdatesManager", - "loc": "40:44-74" + "userRequest": "../mtproto/serverTimeManager", + "loc": "11:44-83" }, { - "moduleId": 37, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "module": "./src/lib/appManagers/appProfileManager.ts", - "moduleName": "./src/lib/appManagers/appProfileManager.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./apiUpdatesManager", - "loc": "13:44-74" + "userRequest": "../mtproto/serverTimeManager", + "loc": "26:44-83" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "./appManagers/apiUpdatesManager", - "loc": "10:44-86" + "userRequest": "../mtproto/serverTimeManager", + "loc": "31:44-83" } ], "usedExports": true, @@ -4406,16 +4447,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst apiManager_1 = __importDefault(require(\"../mtproto/apiManager\"));\nconst networkerFactory_1 = __importDefault(require(\"../mtproto/networkerFactory\"));\nconst utils_1 = require(\"../utils\");\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\nclass ApiUpdatesManager {\n constructor() {\n this.updatesState = {\n pendingPtsUpdates: [],\n pendingSeqUpdates: {},\n syncPending: false,\n syncLoading: true\n };\n this.channelStates = {};\n this.myID = 0;\n apiManager_1.default.getUserID().then((id) => {\n this.myID = id;\n });\n }\n popPendingSeqUpdate() {\n var nextSeq = this.updatesState.seq + 1;\n var pendingUpdatesData = this.updatesState.pendingSeqUpdates[nextSeq];\n if (!pendingUpdatesData) {\n return false;\n }\n var updates = pendingUpdatesData.updates;\n var length;\n for (var i = 0, length = updates.length; i < length; i++) {\n this.saveUpdate(updates[i]);\n }\n this.updatesState.seq = pendingUpdatesData.seq;\n if (pendingUpdatesData.date && this.updatesState.date < pendingUpdatesData.date) {\n this.updatesState.date = pendingUpdatesData.date;\n }\n delete this.updatesState.pendingSeqUpdates[nextSeq];\n if (!this.popPendingSeqUpdate() &&\n this.updatesState.syncPending &&\n this.updatesState.syncPending.seqAwaiting &&\n this.updatesState.seq >= this.updatesState.syncPending.seqAwaiting) {\n if (!this.updatesState.syncPending.ptsAwaiting) {\n clearTimeout(this.updatesState.syncPending.timeout);\n this.updatesState.syncPending = false;\n }\n else {\n delete this.updatesState.syncPending.seqAwaiting;\n }\n }\n return true;\n }\n popPendingPtsUpdate(channelID) {\n var curState = channelID ? this.getChannelState(channelID) : this.updatesState;\n if (!curState.pendingPtsUpdates.length) {\n return false;\n }\n curState.pendingPtsUpdates.sort((a, b) => {\n return a.pts - b.pts;\n });\n // console.log(dT(), 'pop update', channelID, curState.pendingPtsUpdates)\n var curPts = curState.pts;\n var goodPts = false;\n var goodIndex = 0;\n var update;\n for (var i = 0, length = curState.pendingPtsUpdates.length; i < length; i++) {\n update = curState.pendingPtsUpdates[i];\n curPts += update.pts_count;\n if (curPts >= update.pts) {\n goodPts = update.pts;\n goodIndex = i;\n }\n }\n if (!goodPts) {\n return false;\n }\n console.log(utils_1.dT(), 'pop pending pts updates', goodPts, curState.pendingPtsUpdates.slice(0, goodIndex + 1));\n curState.pts = goodPts;\n for (i = 0; i <= goodIndex; i++) {\n update = curState.pendingPtsUpdates[i];\n this.saveUpdate(update);\n }\n curState.pendingPtsUpdates.splice(0, goodIndex + 1);\n if (!curState.pendingPtsUpdates.length && curState.syncPending) {\n if (!curState.syncPending.seqAwaiting) {\n clearTimeout(curState.syncPending.timeout);\n curState.syncPending = false;\n }\n else {\n delete curState.syncPending.ptsAwaiting;\n }\n }\n return true;\n }\n forceGetDifference() {\n if (!this.updatesState.syncLoading) {\n this.getDifference();\n }\n }\n processUpdateMessage(updateMessage) {\n // return forceGetDifference()\n var processOpts = {\n date: updateMessage.date,\n seq: updateMessage.seq,\n seqStart: updateMessage.seq_start\n };\n switch (updateMessage._) {\n case 'updatesTooLong':\n case 'new_session_created':\n this.forceGetDifference();\n break;\n case 'updateShort':\n this.processUpdate(updateMessage.update, processOpts);\n break;\n case 'updateShortMessage':\n case 'updateShortChatMessage':\n var isOut = updateMessage.flags & 2;\n var fromID = updateMessage.from_id || (isOut ? this.myID : updateMessage.user_id);\n var toID = updateMessage.chat_id\n ? -updateMessage.chat_id\n : (isOut ? updateMessage.user_id : this.myID);\n this.processUpdate({\n _: 'updateNewMessage',\n message: {\n _: 'message',\n flags: updateMessage.flags,\n pFlags: updateMessage.pFlags,\n id: updateMessage.id,\n from_id: fromID,\n to_id: appPeersManager_1.default.getOutputPeer(toID),\n date: updateMessage.date,\n message: updateMessage.message,\n fwd_from: updateMessage.fwd_from,\n reply_to_msg_id: updateMessage.reply_to_msg_id,\n entities: updateMessage.entities\n },\n pts: updateMessage.pts,\n pts_count: updateMessage.pts_count\n }, processOpts);\n break;\n case 'updatesCombined':\n case 'updates':\n appUsersManager_1.default.saveApiUsers(updateMessage.users);\n appChatsManager_1.default.saveApiChats(updateMessage.chats);\n updateMessage.updates.forEach((update) => {\n this.processUpdate(update, processOpts);\n });\n break;\n default:\n console.warn(utils_1.dT(), 'Unknown update message', updateMessage);\n }\n }\n getDifference() {\n // console.trace(dT(), 'Get full diff')\n let updatesState = this.updatesState;\n if (!updatesState.syncLoading) {\n updatesState.syncLoading = true;\n updatesState.pendingSeqUpdates = {};\n updatesState.pendingPtsUpdates = [];\n }\n if (updatesState.syncPending) {\n clearTimeout(updatesState.syncPending.timeout);\n updatesState.syncPending = false;\n }\n apiManager_1.default.invokeApi('updates.getDifference', {\n pts: updatesState.pts,\n date: updatesState.date,\n qts: -1\n }, {\n timeout: 0x7fffffff\n }).then((differenceResult) => {\n if (differenceResult._ == 'updates.differenceEmpty') {\n console.log(utils_1.dT(), 'apply empty diff', differenceResult.seq);\n updatesState.date = differenceResult.date;\n updatesState.seq = differenceResult.seq;\n updatesState.syncLoading = false;\n utils_1.$rootScope.$broadcast('stateSynchronized');\n return false;\n }\n appUsersManager_1.default.saveApiUsers(differenceResult.users);\n appChatsManager_1.default.saveApiChats(differenceResult.chats);\n // Should be first because of updateMessageID\n // console.log(dT(), 'applying', differenceResult.other_updates.length, 'other updates')\n differenceResult.other_updates.forEach((update) => {\n switch (update._) {\n case 'updateChannelTooLong':\n case 'updateNewChannelMessage':\n case 'updateEditChannelMessage':\n this.processUpdate(update);\n return;\n }\n this.saveUpdate(update);\n });\n // console.log(dT(), 'applying', differenceResult.new_messages.length, 'new messages')\n differenceResult.new_messages.forEach((apiMessage) => {\n this.saveUpdate({\n _: 'updateNewMessage',\n message: apiMessage,\n pts: updatesState.pts,\n pts_count: 0\n });\n });\n var nextState = differenceResult.intermediate_state || differenceResult.state;\n updatesState.seq = nextState.seq;\n updatesState.pts = nextState.pts;\n updatesState.date = nextState.date;\n // console.log(dT(), 'apply diff', updatesState.seq, updatesState.pts)\n if (differenceResult._ == 'updates.differenceSlice') {\n this.getDifference();\n }\n else {\n // console.log(dT(), 'finished get diff')\n utils_1.$rootScope.$broadcast('stateSynchronized');\n updatesState.syncLoading = false;\n }\n }, () => {\n updatesState.syncLoading = false;\n });\n }\n getChannelDifference(channelID) {\n var channelState = this.getChannelState(channelID);\n if (!channelState.syncLoading) {\n channelState.syncLoading = true;\n channelState.pendingPtsUpdates = [];\n }\n if (channelState.syncPending) {\n clearTimeout(channelState.syncPending.timeout);\n channelState.syncPending = false;\n }\n // console.log(dT(), 'Get channel diff', appChatsManager.getChat(channelID), channelState.pts)\n apiManager_1.default.invokeApi('updates.getChannelDifference', {\n channel: appChatsManager_1.default.getChannelInput(channelID),\n filter: { _: 'channelMessagesFilterEmpty' },\n pts: channelState.pts,\n limit: 30\n }, { timeout: 0x7fffffff }).then((differenceResult) => {\n // console.log(dT(), 'channel diff result', differenceResult)\n channelState.pts = differenceResult.pts;\n if (differenceResult._ == 'updates.channelDifferenceEmpty') {\n console.log(utils_1.dT(), 'apply channel empty diff', differenceResult);\n channelState.syncLoading = false;\n utils_1.$rootScope.$broadcast('stateSynchronized');\n return false;\n }\n if (differenceResult._ == 'updates.channelDifferenceTooLong') {\n console.log(utils_1.dT(), 'channel diff too long', differenceResult);\n channelState.syncLoading = false;\n delete this.channelStates[channelID];\n this.saveUpdate({ _: 'updateChannelReload', channel_id: channelID });\n return false;\n }\n appUsersManager_1.default.saveApiUsers(differenceResult.users);\n appChatsManager_1.default.saveApiChats(differenceResult.chats);\n // Should be first because of updateMessageID\n console.log(utils_1.dT(), 'applying', differenceResult.other_updates.length, 'channel other updates');\n differenceResult.other_updates.forEach((update) => {\n this.saveUpdate(update);\n });\n console.log(utils_1.dT(), 'applying', differenceResult.new_messages.length, 'channel new messages');\n differenceResult.new_messages.forEach((apiMessage) => {\n this.saveUpdate({\n _: 'updateNewChannelMessage',\n message: apiMessage,\n pts: channelState.pts,\n pts_count: 0\n });\n });\n console.log(utils_1.dT(), 'apply channel diff', channelState.pts);\n if (differenceResult._ == 'updates.channelDifference' &&\n !differenceResult.pFlags['final']) {\n this.getChannelDifference(channelID);\n }\n else {\n console.log(utils_1.dT(), 'finished channel get diff');\n utils_1.$rootScope.$broadcast('stateSynchronized');\n channelState.syncLoading = false;\n }\n }, () => {\n channelState.syncLoading = false;\n });\n }\n addChannelState(channelID, pts) {\n if (!pts) {\n throw new Error('Add channel state without pts ' + channelID);\n }\n if (!(channelID in this.channelStates)) {\n this.channelStates[channelID] = {\n pts: pts,\n pendingPtsUpdates: [],\n syncPending: false,\n syncLoading: false\n };\n return true;\n }\n return false;\n }\n getChannelState(channelID, pts) {\n if (this.channelStates[channelID] === undefined) {\n this.addChannelState(channelID, pts);\n }\n return this.channelStates[channelID];\n }\n processUpdate(update, options = {}) {\n var channelID = false;\n switch (update._) {\n case 'updateNewChannelMessage':\n case 'updateEditChannelMessage':\n channelID = -appPeersManager_1.default.getPeerID(update.message.to_id);\n break;\n case 'updateDeleteChannelMessages':\n channelID = update.channel_id;\n break;\n case 'updateChannelTooLong':\n channelID = update.channel_id;\n if (!(channelID in this.channelStates)) {\n return false;\n }\n break;\n }\n var curState = channelID ? this.getChannelState(channelID, update.pts) : this.updatesState;\n // console.log(dT(), 'process', channelID, curState.pts, update)\n if (curState.syncLoading) {\n return false;\n }\n if (update._ == 'updateChannelTooLong') {\n if (!curState.lastPtsUpdateTime ||\n curState.lastPtsUpdateTime < utils_1.tsNow() - 10000) {\n // console.trace(dT(), 'channel too long, get diff', channelID, update)\n this.getChannelDifference(channelID);\n }\n return false;\n }\n if (update._ == 'updateNewMessage' ||\n update._ == 'updateEditMessage' ||\n update._ == 'updateNewChannelMessage' ||\n update._ == 'updateEditChannelMessage') {\n var message = update.message;\n var toPeerID = appPeersManager_1.default.getPeerID(message.to_id);\n var fwdHeader = message.fwd_from || {};\n var reason = false;\n if (message.from_id && !appUsersManager_1.default.hasUser(message.from_id, message.pFlags.post /* || channelID*/) && (reason = 'author') ||\n fwdHeader.from_id && !appUsersManager_1.default.hasUser(fwdHeader.from_id, !!fwdHeader.channel_id) && (reason = 'fwdAuthor') ||\n fwdHeader.channel_id && !appChatsManager_1.default.hasChat(fwdHeader.channel_id, true) && (reason = 'fwdChannel') ||\n toPeerID > 0 && !appUsersManager_1.default.hasUser(toPeerID) && (reason = 'toPeer User') ||\n toPeerID < 0 && !appChatsManager_1.default.hasChat(-toPeerID) && (reason = 'toPeer Chat')) {\n console.warn(utils_1.dT(), 'Not enough data for message update', toPeerID, reason, message);\n if (channelID && appChatsManager_1.default.hasChat(channelID)) {\n this.getChannelDifference(channelID);\n }\n else {\n this.forceGetDifference();\n }\n return false;\n }\n }\n else if (channelID && !appChatsManager_1.default.hasChat(channelID)) {\n // console.log(dT(), 'skip update, missing channel', channelID, update)\n return false;\n }\n var popPts;\n var popSeq;\n if (update.pts) {\n var newPts = curState.pts + (update.pts_count || 0);\n if (newPts < update.pts) {\n console.warn(utils_1.dT(), 'Pts hole', curState, update, channelID && appChatsManager_1.default.getChat(channelID));\n curState.pendingPtsUpdates.push(update);\n if (!curState.syncPending) {\n curState.syncPending = {\n timeout: setTimeout(() => {\n if (channelID) {\n this.getChannelDifference(channelID);\n }\n else {\n this.getDifference();\n }\n }, 5000)\n };\n }\n curState.syncPending.ptsAwaiting = true;\n return false;\n }\n if (update.pts > curState.pts) {\n curState.pts = update.pts;\n popPts = true;\n curState.lastPtsUpdateTime = utils_1.tsNow();\n }\n else if (update.pts_count) {\n // console.warn(dT(), 'Duplicate update', update)\n return false;\n }\n if (channelID && options.date && this.updatesState.date < options.date) {\n this.updatesState.date = options.date;\n }\n }\n else if (!channelID && options.seq > 0) {\n var seq = options.seq;\n var seqStart = options.seqStart || seq;\n if (seqStart != curState.seq + 1) {\n if (seqStart > curState.seq) {\n console.warn(utils_1.dT(), 'Seq hole', curState, curState.syncPending && curState.syncPending.seqAwaiting);\n if (curState.pendingSeqUpdates[seqStart] === undefined) {\n curState.pendingSeqUpdates[seqStart] = { seq: seq, date: options.date, updates: [] };\n }\n curState.pendingSeqUpdates[seqStart].updates.push(update);\n if (!curState.syncPending) {\n curState.syncPending = {\n timeout: setTimeout(() => {\n this.getDifference();\n }, 5000)\n };\n }\n if (!curState.syncPending.seqAwaiting ||\n curState.syncPending.seqAwaiting < seqStart) {\n curState.syncPending.seqAwaiting = seqStart;\n }\n return false;\n }\n }\n if (curState.seq != seq) {\n curState.seq = seq;\n if (options.date && curState.date < options.date) {\n curState.date = options.date;\n }\n popSeq = true;\n }\n }\n this.saveUpdate(update);\n if (popPts) {\n this.popPendingPtsUpdate(channelID);\n }\n else if (popSeq) {\n this.popPendingSeqUpdate();\n }\n }\n saveUpdate(update) {\n utils_1.$rootScope.$broadcast('apiUpdate', update);\n }\n attach() {\n networkerFactory_1.default.setUpdatesProcessor(this.processUpdateMessage.bind(this));\n apiManager_1.default.invokeApi('updates.getState', {}, { noErrorBox: true }).then((stateResult) => {\n this.updatesState.seq = stateResult.seq;\n this.updatesState.pts = stateResult.pts;\n this.updatesState.date = stateResult.date;\n setTimeout(() => {\n this.updatesState.syncLoading = false;\n }, 1000);\n // updatesState.seq = 1\n // updatesState.pts = stateResult.pts - 5000\n // updatesState.date = 1\n // getDifference()\n });\n }\n}\nexports.ApiUpdatesManager = ApiUpdatesManager;\nexports.default = new ApiUpdatesManager();\n" + "depth": 4, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst utils_1 = require(\"../utils\");\r\nclass ServerTimeManager {\r\n constructor() {\r\n this.timestampNow = utils_1.tsNow(true);\r\n this.midnightNoOffset = this.timestampNow - (this.timestampNow % 86400);\r\n this.midnightOffseted = new Date();\r\n this.midnightOffset = this.midnightNoOffset - (Math.floor(+this.midnightOffseted / 1000));\r\n this.serverTimeOffset = 0;\r\n this.timeParams = {\r\n midnightOffset: this.midnightOffset,\r\n serverTimeOffset: this.serverTimeOffset\r\n };\r\n this.midnightOffseted.setHours(0);\r\n this.midnightOffseted.setMinutes(0);\r\n this.midnightOffseted.setSeconds(0);\r\n storage_1.default.get('server_time_offset').then((to) => {\r\n if (to) {\r\n this.serverTimeOffset = to;\r\n this.timeParams.serverTimeOffset = to;\r\n }\r\n });\r\n }\r\n}\r\nexports.ServerTimeManager = ServerTimeManager;\r\nexports.default = new ServerTimeManager();\r\n" }, { - "id": 28, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appDialogsManager.ts", - "name": "./src/lib/appManagers/appDialogsManager.ts", - "index": 69, - "index2": 61, - "size": 21847, + "id": 31, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "name": "./src/lib/appManagers/appMediaViewer.ts", + "index": 61, + "index2": 55, + "size": 29087, "cacheable": true, "built": true, "optional": false, @@ -4423,44 +4464,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "name": "./src/lib/services.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -4468,40 +4509,31 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", "module": "./src/lib/appManagers/appImManager.ts", "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./appDialogsManager", - "loc": "29:44-74" - }, - { - "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "./appDialogsManager", - "loc": "19:44-74" + "userRequest": "./appMediaViewer", + "loc": "19:41-68" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "./appDialogsManager", - "loc": "7:44-74" + "userRequest": "./appMediaViewer", + "loc": "24:41-68" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "module": "./src/lib/services.ts", "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "./appManagers/appDialogsManager", - "loc": "12:44-86" + "userRequest": "./appManagers/appMediaViewer", + "loc": "21:41-80" } ], "usedExports": true, @@ -4510,15 +4542,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst apiManager_1 = __importDefault(require(\"../mtproto/apiManager\"));\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\nconst utils_1 = require(\"../utils\");\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nconst misc_1 = require(\"../../components/misc\");\nconst appSidebarLeft_1 = __importDefault(require(\"./appSidebarLeft\"));\nclass AppDialogsManager {\n constructor() {\n this.chatList = document.getElementById('dialogs');\n this.chatListArchived = document.getElementById('dialogs-archived');\n this.myID = 0;\n this.doms = {};\n this.domsArchived = {};\n this.lastActiveListElement = null;\n this.pinnedDelimiter = document.createElement('div');\n this.pinnedDelimiter.classList.add('pinned-delimiter');\n this.pinnedDelimiter.appendChild(document.createElement('span'));\n apiManager_1.default.getUserID().then((id) => {\n this.myID = id;\n });\n utils_1.$rootScope.$on('user_auth', (e) => {\n let userAuth = e.detail;\n this.myID = userAuth ? userAuth.id : 0;\n });\n //let chatClosedDiv = document.getElementById('chat-closed');\n this.setListClickListener(this.chatList);\n this.setListClickListener(this.chatListArchived);\n }\n setListClickListener(list, onFound) {\n list.addEventListener('click', (e) => {\n let target = e.target;\n let elem = target.tagName != 'LI' ? utils_1.findUpTag(target, 'LI') : target;\n if (!elem) {\n return;\n }\n /* if(this.lastActiveListElement) {\n this.lastActiveListElement.classList.remove('active');\n } */\n if (elem) {\n /* if(chatClosedDiv) {\n chatClosedDiv.style.display = 'none';\n } */\n if (onFound)\n onFound();\n let peerID = +elem.getAttribute('data-peerID');\n let lastMsgID = +elem.getAttribute('data-mid');\n appImManager_1.default.setPeer(peerID, lastMsgID);\n elem.classList.add('active');\n this.lastActiveListElement = elem;\n }\n else /* if(chatClosedDiv) */ {\n appImManager_1.default.setPeer(0);\n //chatClosedDiv.style.display = '';\n }\n });\n }\n loadDialogPhoto(div, peerID, isDialog = false) {\n return __awaiter(this, void 0, void 0, function* () {\n let inputPeer;\n let location;\n if (typeof (peerID) != 'string') {\n inputPeer = appPeersManager_1.default.getInputPeerByID(peerID);\n location = appPeersManager_1.default.getPeerPhoto(peerID);\n }\n //console.log('loadDialogPhoto location:', location, inputPeer);\n if (peerID == this.myID && (isDialog || utils_1.$rootScope.selectedPeerID == this.myID)) {\n if (div.firstChild) {\n div.firstChild.remove();\n }\n div.style.backgroundColor = '';\n div.style.fontSize = '';\n div.classList.add('tgico-savedmessages');\n return true;\n }\n //if(!location || location.empty || !location.photo_small) {\n if (div.firstChild) {\n div.firstChild.remove();\n }\n let color = '';\n if (typeof (peerID) != 'string' && peerID != this.myID) {\n color = appPeersManager_1.default.getPeerColorByID(peerID);\n }\n div.classList.remove('tgico-savedmessages');\n div.style.fontSize = '';\n div.style.backgroundColor = color;\n let abbrSplitted = (typeof (peerID) != 'string' ? appPeersManager_1.default.getPeerTitle(peerID, true) : peerID).split(' ');\n let abbr = (abbrSplitted.length == 2 ?\n abbrSplitted[0][0] + abbrSplitted[1][0] :\n abbrSplitted[0][0]).toUpperCase();\n //div.innerText = peer.initials.toUpperCase();\n div.innerText = abbr.toUpperCase();\n //return Promise.resolve(true);\n //}\n if (!location || location.empty || !location.photo_small) {\n return true;\n }\n let res = yield apiFileManager_1.default.downloadSmallFile({\n _: 'inputPeerPhotoFileLocation',\n dc_id: location.dc_id,\n flags: 0,\n peer: inputPeer,\n volume_id: location.photo_small.volume_id,\n local_id: location.photo_small.local_id\n });\n let img = new Image();\n img.src = URL.createObjectURL(res);\n div.innerHTML = '';\n div.style.fontSize = '0'; // need\n div.append(img);\n return true;\n });\n }\n sortDom(archived = false) {\n //return;\n let dialogs = appMessagesManager_1.default.dialogsStorage.dialogs.slice();\n let inUpper = [];\n let inBottom = [];\n let pinnedDialogs = [];\n let sorted = dialogs;\n if (!archived) {\n for (let i = 0; i < dialogs.length; ++i) {\n let dialog = dialogs[i];\n if (!dialog.pFlags.pinned)\n break;\n pinnedDialogs.push(dialog);\n }\n if (pinnedDialogs.length) {\n let dom = this.getDialogDom(pinnedDialogs[pinnedDialogs.length - 1].peerID);\n if (dom) {\n dom.listEl.append(this.pinnedDelimiter);\n }\n }\n else {\n if (this.pinnedDelimiter.parentElement) {\n this.pinnedDelimiter.parentElement.removeChild(this.pinnedDelimiter);\n }\n }\n sorted = sorted.filter((d) => !d.pFlags.pinned && d.folder_id != 1);\n }\n else {\n sorted = sorted.filter((d) => d.folder_id == 1);\n }\n sorted = sorted.sort((a, b) => {\n let timeA = appMessagesManager_1.default.getMessage(a.top_message).date;\n let timeB = appMessagesManager_1.default.getMessage(b.top_message).date;\n return timeB - timeA;\n });\n if (!archived) {\n sorted = pinnedDialogs.concat(sorted);\n }\n //console.log('sortDom', sorted, this.chatsHidden, this.chatsHidden.up, this.chatsHidden.down);\n let chatList = archived ? this.chatListArchived : this.chatList;\n let chatsHidden = archived ? this.chatsArchivedHidden : this.chatsHidden;\n let hiddenLength = chatsHidden.up.length;\n let inViewportLength = chatList.childElementCount;\n chatList.innerHTML = '';\n let inViewportIndex = 0;\n sorted.forEach((d, idx) => {\n let dom = this.getDialogDom(d.peerID);\n if (!dom)\n return;\n if (inUpper.length < hiddenLength) {\n inUpper.push(dom.listEl);\n }\n else if (inViewportIndex <= inViewportLength - 1) {\n chatList.append(dom.listEl);\n ++inViewportIndex;\n //this.chatList.insertBefore(dom.listEl, this.chatList.children[inViewportIndex++]);\n }\n else {\n inBottom.push(dom.listEl);\n }\n /* if(this.chatsHidden.up.find((d: HTMLLIElement) => d === dom.listEl)) {\n inUpper.push(dom.listEl);\n } else if(isElementInViewport(dom.listEl)) {\n this.chatList.insertBefore(dom.listEl, this.chatList.children[++inViewportIndex]);\n } else if(this.chatsHidden.down.find((d: HTMLLIElement) => d === dom.listEl)) {\n inBottom.push(dom.listEl);\n } else {\n //console.warn('sortDom found no dom!', dom, d);\n } */\n //this.chatList.append(dom.listEl);\n });\n //////console.log('sortDom', sorted.length, inUpper.length, chatList.childElementCount, inBottom.length);\n chatsHidden.up = inUpper;\n chatsHidden.down = inBottom;\n }\n setLastMessage(dialog, lastMessage, dom) {\n if (!lastMessage) {\n lastMessage = appMessagesManager_1.default.getMessage(dialog.top_message);\n }\n ///////console.log('setlastMessage:', lastMessage);\n if (lastMessage._ == 'messageEmpty')\n return;\n if (!dom) {\n dom = this.getDialogDom(dialog.peerID);\n }\n let peer = dialog.peer;\n let peerID = dialog.peerID;\n //let peerID = appMessagesManager.getMessagePeer(lastMessage);\n //console.log('setting last message:', lastMessage);\n /* if(!dom.lastMessageSpan.classList.contains('user-typing')) */ {\n let lastMessageText = '';\n if (lastMessage.media) {\n switch (lastMessage.media._) {\n case 'messageMediaPhoto':\n lastMessageText += 'Photo' + (lastMessage.message ? ', ' : '') + '';\n break;\n case 'messageMediaGeo':\n lastMessageText += 'Geolocation';\n break;\n case 'messageMediaDocument':\n let document = lastMessage.media.document;\n let found = false;\n for (let attribute of document.attributes) {\n if (found)\n break;\n switch (attribute._) {\n case 'documentAttributeSticker':\n lastMessageText += richtextprocessor_1.RichTextProcessor.wrapRichText(attribute.alt) + 'Sticker';\n found = true;\n break;\n case 'documentAttributeFilename':\n lastMessageText += '' + attribute.file_name + '';\n found = true;\n break;\n /* default:\n console.warn('Got unknown document type!', lastMessage);\n break; */\n }\n }\n if (document.type == 'video') {\n lastMessageText = 'Video' + (lastMessage.message ? ', ' : '') + '';\n found = true;\n }\n else if (document.type == 'voice') {\n lastMessageText = 'Voice message';\n found = true;\n }\n else if (document.type == 'gif') {\n lastMessageText = 'GIF' + (lastMessage.message ? ', ' : '') + '';\n found = true;\n }\n else if (document.type == 'round') {\n lastMessageText = 'Videomessage' + (lastMessage.message ? ', ' : '') + '';\n found = true;\n }\n if (found) {\n break;\n }\n default:\n ///////console.warn('Got unknown lastMessage.media type!', lastMessage);\n break;\n }\n }\n if (lastMessage.action) {\n // @ts-ignore\n lastMessageText = utils_1.langPack[lastMessage.action._];\n }\n dom.lastMessageSpan.innerHTML = lastMessageText +\n (lastMessage.message ? richtextprocessor_1.RichTextProcessor.wrapRichText(lastMessage.message.replace(/\\n/g, ' '), { noLinebreakers: true }) : '');\n /* if(lastMessage.from_id == auth.id) { // You: */\n if (peer._ != 'peerUser' && peerID != -lastMessage.from_id) {\n let sender = appUsersManager_1.default.getUser(lastMessage.from_id);\n if (sender && sender.id) {\n let senderBold = document.createElement('b');\n let str = '';\n if (sender.id == this.myID) {\n str = 'You';\n }\n else {\n str = sender.first_name || sender.last_name || sender.username;\n }\n senderBold.innerText = str + ': ';\n //console.log(sender, senderBold.innerText);\n dom.lastMessageSpan.prepend(senderBold);\n } //////// else console.log('no sender', lastMessage, peerID);\n }\n }\n let timeStr = '';\n let timestamp = lastMessage.date;\n let now = Date.now() / 1000;\n let time = new Date(lastMessage.date * 1000);\n if ((now - timestamp) < 86400) { // if < 1 day\n timeStr = ('0' + time.getHours()).slice(-2) +\n ':' + ('0' + time.getMinutes()).slice(-2);\n }\n else if ((now - timestamp) < (86400 * 7)) { // week\n let date = new Date(timestamp * 1000);\n timeStr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][date.getDay()];\n }\n else {\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n timeStr = months[time.getMonth()] +\n ' ' + ('0' + time.getDate()).slice(-2);\n }\n dom.lastTimeSpan.innerHTML = timeStr;\n dom.listEl.setAttribute('data-mid', lastMessage.mid);\n if (this.doms[peerID]) {\n this.setUnreadMessages(dialog);\n }\n }\n setUnreadMessages(dialog) {\n let dom = this.getDialogDom(dialog.peerID);\n dom.statusSpan.innerHTML = '';\n let lastMessage = appMessagesManager_1.default.getMessage(dialog.top_message);\n if (lastMessage._ != 'messageEmpty' &&\n lastMessage.from_id == this.myID && lastMessage.peerID != this.myID &&\n dialog.read_outbox_max_id) { // maybe comment, 06.20.2020\n let outgoing = (lastMessage.pFlags && lastMessage.pFlags.unread); // maybe uncomment, 31.01.2020\n //console.log('outgoing', outgoing, lastMessage);\n if (outgoing) {\n dom.statusSpan.classList.remove('tgico-checks');\n dom.statusSpan.classList.add('tgico-check');\n }\n else {\n dom.statusSpan.classList.remove('tgico-check');\n dom.statusSpan.classList.add('tgico-checks');\n }\n }\n else\n dom.statusSpan.classList.remove('tgico-check', 'tgico-checks');\n dom.unreadMessagesSpan.innerHTML = '';\n if (dialog.unread_count) {\n dom.unreadMessagesSpan.innerHTML = dialog.unread_count;\n dom.unreadMessagesSpan.classList.remove('tgico-pinnedchat');\n dom.unreadMessagesSpan.classList.add(new Date(dialog.notify_settings.mute_until * 1000) > new Date() ?\n 'unread-muted' : 'unread');\n }\n else if (dialog.pFlags.pinned) {\n dom.unreadMessagesSpan.classList.remove('unread', 'unread-muted');\n dom.unreadMessagesSpan.classList.add('tgico-pinnedchat');\n }\n // set archived new count\n if (dialog.folder_id == 1) {\n let sum = Object.keys(this.domsArchived).map(p => +p).reduce((acc, peerID) => {\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\n if (dialog) {\n return acc + dialog.unread_count;\n }\n return acc;\n }, 0);\n appSidebarLeft_1.default.archivedCount.innerText = '' + sum;\n }\n }\n getDialogDom(peerID) {\n return this.doms[peerID] || this.domsArchived[peerID];\n }\n addDialog(dialog, container, drawStatus = true) {\n let peerID = dialog.peerID;\n if ((this.doms[peerID] || this.domsArchived[peerID]) && !container)\n return;\n let title = appPeersManager_1.default.getPeerTitle(peerID);\n let avatarDiv = document.createElement('div');\n avatarDiv.classList.add('user-avatar');\n if (drawStatus && peerID != this.myID) {\n let peer = dialog.peer;\n switch (peer._) {\n case 'peerUser':\n let user = appUsersManager_1.default.getUser(peerID);\n //console.log('found user', user);\n if (user.status && user.status._ == 'userStatusOnline') {\n avatarDiv.classList.add('is-online');\n }\n break;\n default:\n break;\n }\n }\n let captionDiv = document.createElement('div');\n captionDiv.classList.add('user-caption');\n let titleSpan = document.createElement('span');\n titleSpan.classList.add('user-title');\n if (peerID == this.myID) {\n title = 'Saved Messages';\n }\n //console.log('trying to load photo for:', title);\n this.loadDialogPhoto(avatarDiv, dialog.peerID, true);\n titleSpan.innerHTML = title;\n //p.classList.add('')\n let span = document.createElement('span');\n span.classList.add('user-last-message');\n //captionDiv.append(titleSpan);\n //captionDiv.append(span);\n let paddingDiv = document.createElement('div');\n paddingDiv.classList.add('rp');\n paddingDiv.append(avatarDiv, captionDiv);\n misc_1.ripple(paddingDiv);\n let li = document.createElement('li');\n li.append(paddingDiv);\n li.setAttribute('data-peerID', '' + peerID);\n /* let li = document.createElement('li');\n li.classList.add('rp');\n li.append(avatarDiv, captionDiv);\n li.setAttribute('data-peerID', '' + peerID);\n \n ripple(li); */\n /* let detailsDiv = document.createElement('div');\n detailsDiv.classList.add('dialog-details'); */\n let statusSpan = document.createElement('span');\n statusSpan.classList.add('message-status');\n let lastTimeSpan = document.createElement('span');\n lastTimeSpan.classList.add('message-time');\n let unreadMessagesSpan = document.createElement('span');\n let titleP = document.createElement('p');\n let rightSpan = document.createElement('span');\n rightSpan.append(statusSpan, lastTimeSpan);\n titleP.append(titleSpan, rightSpan);\n let messageP = document.createElement('p');\n messageP.append(span, unreadMessagesSpan);\n captionDiv.append(titleP, messageP);\n let dom = {\n avatarDiv,\n captionDiv,\n titleSpan,\n statusSpan,\n lastTimeSpan,\n unreadMessagesSpan,\n lastMessageSpan: span,\n containerEl: paddingDiv,\n listEl: li\n };\n if (!container) {\n if (dialog.folder_id && dialog.folder_id == 1) {\n this.chatListArchived.append(li);\n this.domsArchived[dialog.peerID] = dom;\n }\n else {\n this.chatList.append(li);\n this.doms[dialog.peerID] = dom;\n }\n //this.appendTo.push(li);\n if (dialog.pFlags.pinned) {\n li.classList.add('dialog-pinned');\n //this.chatList.insertBefore(this.pinnedDelimiter, li.nextSibling);\n dom.listEl.append(this.pinnedDelimiter);\n }\n this.setLastMessage(dialog);\n }\n else {\n container.append(li);\n }\n return { dom, dialog };\n }\n setTyping(dialog, user) {\n let dom = this.getDialogDom(dialog.peerID);\n let str = '';\n let senderBold = document.createElement('i');\n if (dialog.peerID < 0)\n str = (user.first_name || user.last_name || user.username) + ' ';\n str += 'typing...';\n senderBold.innerText = str;\n dom.lastMessageSpan.innerHTML = '';\n dom.lastMessageSpan.append(senderBold);\n dom.lastMessageSpan.classList.add('user-typing');\n }\n unsetTyping(dialog) {\n let dom = this.getDialogDom(dialog.peerID);\n dom.lastMessageSpan.classList.remove('user-typing');\n this.setLastMessage(dialog, null, dom);\n }\n}\nexports.AppDialogsManager = AppDialogsManager;\nexports.default = new AppDialogsManager();\n" + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst preloader_1 = __importDefault(require(\"../../components/preloader\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nconst mediaPlayer_1 = __importDefault(require(\"../mediaPlayer\"));\r\nconst misc_1 = require(\"../../components/misc\");\r\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\r\nclass AppMediaViewer {\r\n constructor() {\r\n this.overlaysDiv = document.querySelector('.overlays');\r\n this.mediaViewerDiv = this.overlaysDiv.firstElementChild;\r\n this.author = {\r\n avatarEl: this.overlaysDiv.querySelector('.user-avatar'),\r\n nameEl: this.overlaysDiv.querySelector('.media-viewer-name'),\r\n date: this.overlaysDiv.querySelector('.media-viewer-date')\r\n };\r\n this.buttons = {\r\n delete: this.overlaysDiv.querySelector('.media-viewer-delete-button'),\r\n forward: this.overlaysDiv.querySelector('.media-viewer-forward-button'),\r\n download: this.overlaysDiv.querySelector('.media-viewer-download-button'),\r\n close: this.overlaysDiv.querySelector('.media-viewer-close-button'),\r\n prev: this.overlaysDiv.querySelector('.media-viewer-switcher-left'),\r\n next: this.overlaysDiv.querySelector('.media-viewer-switcher-right'),\r\n };\r\n this.content = {\r\n container: this.overlaysDiv.querySelector('.media-viewer-media'),\r\n caption: this.overlaysDiv.querySelector('.media-viewer-caption'),\r\n //mover: this.overlaysDiv.querySelector('.media-viewer-mover') as HTMLDivElement\r\n mover: document.querySelector('.media-viewer-mover')\r\n };\r\n this.currentMessageID = 0;\r\n this.preloader = null;\r\n this.lastTarget = null;\r\n this.prevTargets = [];\r\n this.nextTargets = [];\r\n this.targetContainer = null;\r\n this.loadMore = null;\r\n this.peerID = 0;\r\n this.loadMediaPromiseUp = null;\r\n this.loadMediaPromiseDown = null;\r\n this.loadedAllMediaUp = false;\r\n this.loadedAllMediaDown = false;\r\n this.reverse = false; // reverse means next = higher msgid\r\n this.log = polyfill_1.logger('AMV');\r\n this.preloader = new preloader_1.default();\r\n this.onKeyDownBinded = this.onKeyDown.bind(this);\r\n this.buttons.close.addEventListener('click', () => {\r\n //this.overlaysDiv.classList.remove('active');\r\n this.content.container.innerHTML = '';\r\n if (this.content.container.firstElementChild) {\r\n URL.revokeObjectURL(this.content.container.firstElementChild.src);\r\n }\r\n this.peerID = 0;\r\n this.currentMessageID = 0;\r\n this.setMoverToTarget(this.lastTarget, true);\r\n this.lastTarget = null;\r\n this.prevTargets = [];\r\n this.nextTargets = [];\r\n this.loadedAllMediaUp = this.loadedAllMediaDown = false;\r\n this.loadMediaPromiseUp = this.loadMediaPromiseDown = null;\r\n window.removeEventListener('keydown', this.onKeyDownBinded);\r\n });\r\n this.buttons.prev.addEventListener('click', () => {\r\n let target = this.prevTargets.pop();\r\n if (target) {\r\n this.nextTargets.unshift({ element: this.lastTarget, mid: this.currentMessageID });\r\n this.openMedia(appMessagesManager_1.default.getMessage(target.mid), target.element);\r\n }\r\n else {\r\n this.buttons.prev.style.display = 'none';\r\n }\r\n });\r\n this.buttons.next.addEventListener('click', () => {\r\n let target = this.nextTargets.shift();\r\n if (target) {\r\n this.prevTargets.push({ element: this.lastTarget, mid: this.currentMessageID });\r\n this.openMedia(appMessagesManager_1.default.getMessage(target.mid), target.element);\r\n }\r\n else {\r\n this.buttons.next.style.display = 'none';\r\n }\r\n });\r\n this.buttons.download.addEventListener('click', () => {\r\n let message = appMessagesManager_1.default.getMessage(this.currentMessageID);\r\n if (message.media.photo) {\r\n appPhotosManager_1.default.downloadPhoto(message.media.photo.id);\r\n }\r\n else {\r\n let document = null;\r\n if (message.media.webpage)\r\n document = message.media.webpage.document;\r\n else\r\n document = message.media.document;\r\n if (document) {\r\n console.log('will save document:', document);\r\n appDocsManager_1.default.saveDocFile(document.id);\r\n }\r\n }\r\n });\r\n this.onClickBinded = (e) => {\r\n let target = e.target;\r\n let mover = null;\r\n ['media-viewer-mover', 'media-viewer-buttons', 'media-viewer-author'].find(s => {\r\n try {\r\n mover = utils_1.findUpClassName(target, s);\r\n if (mover)\r\n return true;\r\n }\r\n catch (err) {\r\n return false;\r\n }\r\n });\r\n if ( /* target == this.mediaViewerDiv */!mover || target.tagName == 'IMG' || target.tagName == 'image') {\r\n this.buttons.close.click();\r\n }\r\n };\r\n this.overlaysDiv.addEventListener('click', this.onClickBinded);\r\n this.content.mover.addEventListener('click', this.onClickBinded);\r\n //this.content.mover.append(this.buttons.prev, this.buttons.next);\r\n }\r\n onKeyDown(e) {\r\n //this.log('onKeyDown', e);\r\n if (e.key == 'ArrowRight') {\r\n this.buttons.next.click();\r\n }\r\n else if (e.key == 'ArrowLeft') {\r\n this.buttons.prev.click();\r\n }\r\n }\r\n setMoverToTarget(target, closing = false, fromRight = 0) {\r\n let mover = this.content.mover;\r\n if (!closing) {\r\n mover.innerHTML = '';\r\n mover.append(this.buttons.prev, this.buttons.next);\r\n }\r\n let wasActive = fromRight !== 0;\r\n let delay = wasActive ? 350 : 200;\r\n //let delay = wasActive ? 350 : 10000;\r\n /* if(wasActive) {\r\n this.moveTheMover(mover);\r\n mover = this.setNewMover();\r\n } */\r\n ///////this.log('setMoverToTarget', target, closing, wasActive, fromRight);\r\n let realParent;\r\n let rect;\r\n if (target) {\r\n if (target instanceof SVGImageElement || target.parentElement instanceof SVGForeignObjectElement) {\r\n realParent = utils_1.findUpClassName(target, 'attachment');\r\n rect = realParent.getBoundingClientRect();\r\n }\r\n else {\r\n realParent = target.parentElement;\r\n rect = target.getBoundingClientRect();\r\n }\r\n }\r\n let containerRect = this.content.container.getBoundingClientRect();\r\n let transform = '';\r\n let left;\r\n let top;\r\n if (wasActive) {\r\n left = fromRight === 1 ? appPhotosManager_1.default.windowW : -containerRect.width;\r\n top = containerRect.top;\r\n }\r\n else {\r\n left = rect.left;\r\n top = rect.top;\r\n }\r\n transform += `translate(${left}px,${top}px) `;\r\n mover.style.width = containerRect.width + 'px';\r\n mover.style.height = containerRect.height + 'px';\r\n mover.classList.remove('cover');\r\n let scaleX = rect.width / containerRect.width;\r\n let scaleY = rect.height / containerRect.height;\r\n if (!wasActive) {\r\n transform += `scale(${scaleX},${scaleY}) `;\r\n }\r\n let borderRadius = window.getComputedStyle(realParent).getPropertyValue('border-radius');\r\n let brSplitted = borderRadius.split(' ');\r\n if (brSplitted.length != 4) {\r\n if (!brSplitted[0])\r\n brSplitted[0] = '0px';\r\n for (let i = brSplitted.length; i < 4; ++i) {\r\n brSplitted[i] = brSplitted[i % 2] || brSplitted[0] || '0px';\r\n }\r\n }\r\n borderRadius = brSplitted.map(r => (parseInt(r) / scaleX) + 'px').join(' ');\r\n if (!wasActive) {\r\n mover.style.borderRadius = borderRadius;\r\n }\r\n mover.style.transform = transform;\r\n /* if(wasActive) {\r\n this.log('setMoverToTarget', mover.style.transform);\r\n } */\r\n let path;\r\n let isOut = target.classList.contains('is-out');\r\n if (!closing) {\r\n let img;\r\n let video;\r\n if (target.tagName == 'DIV') { // means backgrounded with cover\r\n //img.style.objectFit = 'cover';\r\n img = new Image();\r\n img.src = target.style.backgroundImage.slice(5, -2);\r\n //mover.classList.add('cover');\r\n //mover.style.backgroundImage = target.style.backgroundImage;\r\n }\r\n else if (target.tagName == 'IMG' || target.tagName == 'image') {\r\n img = new Image();\r\n img.src = target instanceof SVGImageElement ? target.getAttributeNS(null, 'href') : target.src;\r\n img.style.objectFit = 'contain';\r\n }\r\n else if (target.tagName == 'VIDEO') {\r\n video = document.createElement('video');\r\n let source = document.createElement('source');\r\n source.src = target.querySelector('source').src;\r\n video.append(source);\r\n }\r\n else if (target instanceof SVGSVGElement) {\r\n let clipID = target.dataset.clipID;\r\n let newClipID = clipID + '-mv';\r\n let { width, height } = containerRect;\r\n let newSvg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n newSvg.setAttributeNS(null, 'width', '' + width);\r\n newSvg.setAttributeNS(null, 'height', '' + height);\r\n newSvg.insertAdjacentHTML('beforeend', target.firstElementChild.outerHTML.replace(clipID, newClipID));\r\n newSvg.insertAdjacentHTML('beforeend', target.lastElementChild.outerHTML.replace(clipID, newClipID));\r\n // теперь надо выставить новую позицию для хвостика\r\n let defs = newSvg.firstElementChild;\r\n let use = defs.firstElementChild.firstElementChild;\r\n if (use instanceof SVGUseElement) {\r\n let transform = use.getAttributeNS(null, 'transform');\r\n transform = transform.replace(/translate\\((.+?), (.+?)\\) scale\\((.+?), (.+?)\\)/, (match, x, y, sX, sY) => {\r\n x = +x;\r\n if (x != 2) {\r\n x = width - (2 / scaleX);\r\n }\r\n else {\r\n x = 2 / scaleX;\r\n }\r\n y = height;\r\n return `translate(${x}, ${y}) scale(${+sX / scaleX}, ${+sY / scaleY})`;\r\n });\r\n use.setAttributeNS(null, 'transform', transform);\r\n // и новый RECT\r\n path = defs.firstElementChild.lastElementChild;\r\n // код ниже нужен только чтобы скрыть моргание до момента как сработает таймаут\r\n let d;\r\n let br = borderRadius.split(' ').map(v => parseInt(v));\r\n if (isOut)\r\n d = utils_1.generatePathData(0, 0, width - 9 / scaleX, height, ...br);\r\n else\r\n d = utils_1.generatePathData(9 / scaleX, 0, width - 9 / scaleX, height, ...br);\r\n path.setAttributeNS(null, 'd', d);\r\n }\r\n let mediaEl = newSvg.lastElementChild;\r\n mediaEl.setAttributeNS(null, 'width', '' + containerRect.width);\r\n mediaEl.setAttributeNS(null, 'height', '' + containerRect.height);\r\n mover.prepend(newSvg);\r\n }\r\n if (img) {\r\n img.style.borderRadius = borderRadius;\r\n mover.prepend(img);\r\n }\r\n else if (video) {\r\n video.style.borderRadius = borderRadius;\r\n mover.prepend(video);\r\n }\r\n mover.style.display = '';\r\n setTimeout(() => {\r\n mover.classList.add(wasActive ? 'moving' : 'active');\r\n }, 0);\r\n }\r\n else {\r\n if (target instanceof SVGSVGElement) {\r\n path = mover.querySelector('path');\r\n if (path) {\r\n this.sizeTailPath(path, containerRect, scaleX, delay, false, isOut, borderRadius);\r\n }\r\n }\r\n setTimeout(() => {\r\n this.overlaysDiv.classList.remove('active');\r\n }, 0);\r\n setTimeout(() => {\r\n mover.style.borderRadius = borderRadius;\r\n if (mover.firstElementChild) {\r\n mover.firstElementChild.style.borderRadius = borderRadius;\r\n }\r\n if (target.tagName == 'DIV') {\r\n mover.classList.add('cover');\r\n }\r\n }, delay / 2);\r\n setTimeout(() => {\r\n mover.innerHTML = '';\r\n mover.classList.remove('moving', 'active', 'cover');\r\n mover.style.display = 'none';\r\n }, delay);\r\n }\r\n return () => {\r\n mover.style.transform = `translate(${containerRect.left}px,${containerRect.top}px) scale(1,1)`;\r\n setTimeout(() => {\r\n mover.style.borderRadius = '';\r\n if (mover.firstElementChild) {\r\n mover.firstElementChild.style.borderRadius = '';\r\n }\r\n mover.classList.remove('cover');\r\n }, delay / 2);\r\n if (path) {\r\n this.sizeTailPath(path, containerRect, scaleX, delay, true, isOut, borderRadius);\r\n }\r\n };\r\n }\r\n sizeTailPath(path, rect, scaleX, delay, upscale, isOut, borderRadius) {\r\n let start = Date.now();\r\n let { width, height } = rect;\r\n delay = delay / 2;\r\n let br = borderRadius.split(' ').map(v => parseInt(v));\r\n let step = () => {\r\n let diff = Date.now() - start;\r\n let progress = diff / delay;\r\n if (progress > 1)\r\n progress = 1;\r\n if (upscale)\r\n progress = 1 - progress;\r\n let _br = br.map(v => v * progress);\r\n let d;\r\n if (isOut)\r\n d = utils_1.generatePathData(0, 0, width - (9 / scaleX * progress), height, ..._br);\r\n else\r\n d = utils_1.generatePathData(9 / scaleX * progress, 0, width /* width - (9 / scaleX * progress) */, height, ..._br);\r\n path.setAttributeNS(null, 'd', d);\r\n if (diff < delay)\r\n window.requestAnimationFrame(step);\r\n };\r\n //window.requestAnimationFrame(step);\r\n step();\r\n }\r\n moveTheMover(mover, toLeft = true) {\r\n let windowW = appPhotosManager_1.default.windowW;\r\n mover.classList.add('moving');\r\n let rect = mover.getBoundingClientRect();\r\n let newTransform = mover.style.transform.replace(/translate\\((.+?),/, (match, p1) => {\r\n /////////this.log('replace func', match, p1);\r\n let x = +p1.slice(0, -2);\r\n x = toLeft ? -rect.width : windowW;\r\n return match.replace(p1, x + 'px');\r\n });\r\n ////////this.log('set newTransform:', newTransform, mover.style.transform, toLeft);\r\n mover.style.transform = newTransform;\r\n setTimeout(() => {\r\n mover.remove();\r\n }, 350);\r\n }\r\n setNewMover() {\r\n let newMover = document.createElement('div');\r\n newMover.classList.add('media-viewer-mover');\r\n let oldMover = this.content.mover;\r\n oldMover.parentElement.append(newMover);\r\n newMover.addEventListener('click', this.onClickBinded);\r\n return this.content.mover = newMover;\r\n }\r\n isElementVisible(container, target) {\r\n let rect = container.getBoundingClientRect();\r\n let targetRect = target.getBoundingClientRect();\r\n return targetRect.bottom > rect.top && targetRect.top < rect.bottom;\r\n }\r\n // нет смысла делать проверку для reverse и loadMediaPromise\r\n loadMoreMedia(older = true) {\r\n //if(!older && this.reverse) return;\r\n if (older && this.loadedAllMediaDown)\r\n return;\r\n else if (!older && this.loadedAllMediaUp)\r\n return;\r\n if (older && this.loadMediaPromiseDown)\r\n return this.loadMediaPromiseDown;\r\n else if (!older && this.loadMediaPromiseUp)\r\n return this.loadMediaPromiseUp;\r\n let loadCount = 50;\r\n let backLimit = older ? 0 : loadCount;\r\n let maxID = this.currentMessageID;\r\n let anchor;\r\n if (older) {\r\n anchor = this.reverse ? this.prevTargets[0] : this.nextTargets[this.nextTargets.length - 1];\r\n }\r\n else {\r\n anchor = this.reverse ? this.nextTargets[this.nextTargets.length - 1] : this.prevTargets[0];\r\n }\r\n if (anchor)\r\n maxID = anchor.mid;\r\n if (!older)\r\n maxID += 1;\r\n let peerID = this.peerID;\r\n let promise = appMessagesManager_1.default.getSearch(peerID, '', { _: 'inputMessagesFilterPhotoVideo' }, maxID, loadCount /* older ? loadCount : 0 */, 0, backLimit).then(value => {\r\n if (this.peerID != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n this.log('loaded more media by maxID:', maxID, value, older, this.reverse);\r\n if (value.history.length < loadCount) {\r\n /* if(this.reverse) {\r\n if(older) this.loadedAllMediaUp = true;\r\n else this.loadedAllMediaDown = true;\r\n } else { */\r\n if (older)\r\n this.loadedAllMediaDown = true;\r\n else\r\n this.loadedAllMediaUp = true;\r\n //}\r\n }\r\n let method = older ? value.history.forEach : value.history.forEachReverse;\r\n method.call(value.history, mid => {\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n let media = message.media;\r\n if (!media || !(media.photo || media.document || (media.webpage && media.webpage.document)))\r\n return;\r\n if (media._ == 'document' && media.type != 'video')\r\n return;\r\n let t = { element: null, mid: mid };\r\n if (older) {\r\n if (this.reverse)\r\n this.prevTargets.unshift(t);\r\n else\r\n this.nextTargets.push(t);\r\n }\r\n else {\r\n if (this.reverse)\r\n this.nextTargets.push(t);\r\n else\r\n this.prevTargets.unshift(t);\r\n }\r\n });\r\n this.buttons.prev.style.display = this.prevTargets.length ? '' : 'none';\r\n this.buttons.next.style.display = this.nextTargets.length ? '' : 'none';\r\n }, () => { }).then(() => {\r\n if (older)\r\n this.loadMediaPromiseDown = null;\r\n else\r\n this.loadMediaPromiseUp = null;\r\n });\r\n if (older)\r\n this.loadMediaPromiseDown = promise;\r\n else\r\n this.loadMediaPromiseUp = promise;\r\n return promise;\r\n }\r\n updateMediaSource(target, url, tagName) {\r\n //if(target instanceof SVGSVGElement) {\r\n let el = target.querySelector(tagName);\r\n misc_1.renderImageFromUrl(el, url);\r\n /* } else {\r\n \r\n } */\r\n }\r\n openMedia(message, target, reverse = false, targetContainer, prevTargets = [], nextTargets = [], loadMore = null) {\r\n ////////this.log('openMedia doc:', message, prevTarget, nextTarget);\r\n let media = message.media.photo || message.media.document || message.media.webpage.document || message.media.webpage.photo;\r\n let isVideo = media.mime_type == 'video/mp4';\r\n let isFirstOpen = !this.peerID;\r\n if (isFirstOpen) {\r\n this.peerID = utils_1.$rootScope.selectedPeerID;\r\n this.targetContainer = targetContainer;\r\n this.prevTargets = prevTargets;\r\n this.nextTargets = nextTargets;\r\n this.reverse = reverse;\r\n //this.loadMore = loadMore;\r\n }\r\n /* if(this.nextTargets.length < 10 && this.loadMore) {\r\n this.loadMore();\r\n } */\r\n let fromRight = 0;\r\n if (!isFirstOpen) {\r\n //if(this.lastTarget === prevTarget) {\r\n if (this.reverse)\r\n fromRight = this.currentMessageID < message.mid ? 1 : -1;\r\n else\r\n fromRight = this.currentMessageID > message.mid ? 1 : -1;\r\n }\r\n //if(prevTarget && (!prevTarget.parentElement || !this.isElementVisible(this.targetContainer, prevTarget))) prevTarget = null;\r\n //if(nextTarget && (!nextTarget.parentElement || !this.isElementVisible(this.targetContainer, nextTarget))) nextTarget = null;\r\n this.buttons.prev.style.display = this.prevTargets.length ? '' : 'none';\r\n this.buttons.next.style.display = this.nextTargets.length ? '' : 'none';\r\n let container = this.content.container;\r\n let useContainerAsTarget = !target;\r\n if (useContainerAsTarget)\r\n target = container;\r\n this.currentMessageID = message.mid;\r\n this.lastTarget = target;\r\n if (this.nextTargets.length < 20) {\r\n this.loadMoreMedia(!this.reverse);\r\n }\r\n if (this.prevTargets.length < 20) {\r\n this.loadMoreMedia(this.reverse);\r\n }\r\n if (container.firstElementChild) {\r\n container.innerHTML = '';\r\n }\r\n let date = new Date(media.date * 1000);\r\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n let dateStr = months[date.getMonth()] + ' ' + date.getDate() + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\r\n this.author.date.innerText = dateStr;\r\n let name = appPeersManager_1.default.getPeerTitle(message.fromID);\r\n this.author.nameEl.innerHTML = name;\r\n if (message.message) {\r\n this.content.caption.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(message.message, {\r\n entities: message.totalEntities\r\n });\r\n }\r\n else {\r\n this.content.caption.innerHTML = '';\r\n }\r\n appProfileManager_1.default.putPhoto(this.author.avatarEl, message.fromID);\r\n // ok set\r\n let wasActive = fromRight !== 0;\r\n if (wasActive) {\r\n this.moveTheMover(this.content.mover, fromRight === 1);\r\n this.setNewMover();\r\n }\r\n else {\r\n window.addEventListener('keydown', this.onKeyDownBinded);\r\n this.overlaysDiv.classList.add('active');\r\n }\r\n ////////this.log('wasActive:', wasActive);\r\n let mover = this.content.mover;\r\n let maxWidth = appPhotosManager_1.default.windowW - 16;\r\n let maxHeight = appPhotosManager_1.default.windowH - 100;\r\n if (isVideo) {\r\n let size = appPhotosManager_1.default.setAttachmentSize(media, container, maxWidth, maxHeight);\r\n ////////this.log('will wrap video', media, size);\r\n if (useContainerAsTarget)\r\n target = target.querySelector('img, video') || target;\r\n let afterTimeout = this.setMoverToTarget(target, false, fromRight);\r\n //if(wasActive) return;\r\n //return;\r\n setTimeout(() => {\r\n afterTimeout();\r\n //return;\r\n let video = mover.querySelector('video') || document.createElement('video');\r\n let source;\r\n if (video.firstElementChild) {\r\n source = video.firstElementChild;\r\n }\r\n video.dataset.ckin = 'default';\r\n video.dataset.overlay = '1';\r\n if (!source || !source.src) {\r\n let promise = appDocsManager_1.default.downloadDoc(media);\r\n this.preloader.attach(mover, true, promise);\r\n promise.then(blob => {\r\n if (this.currentMessageID != message.mid) {\r\n this.log.warn('media viewer changed video');\r\n return;\r\n }\r\n let url = media.url;\r\n if (target instanceof SVGSVGElement) {\r\n this.updateMediaSource(mover, url, 'source');\r\n this.updateMediaSource(target, url, 'source');\r\n }\r\n else {\r\n let img = mover.firstElementChild;\r\n if (img instanceof Image) {\r\n mover.removeChild(img);\r\n }\r\n source = document.createElement('source');\r\n misc_1.renderImageFromUrl(source, url);\r\n source.type = media.mime_type;\r\n mover.prepend(video);\r\n video.append(source);\r\n }\r\n let player = new mediaPlayer_1.default(video, true);\r\n });\r\n }\r\n else {\r\n let player = new mediaPlayer_1.default(video, true);\r\n }\r\n /* wrapVideo.call(this, media, mover, message, false, this.preloader).then(() => {\r\n if(this.currentMessageID != message.mid) {\r\n this.log.warn('media viewer changed video');\r\n return;\r\n }\r\n }); */\r\n }, 0);\r\n }\r\n else {\r\n let size = appPhotosManager_1.default.setAttachmentSize(media.id, container, maxWidth, maxHeight);\r\n if (useContainerAsTarget)\r\n target = target.querySelector('img, video') || target;\r\n let afterTimeout = this.setMoverToTarget(target, false, fromRight);\r\n //return;\r\n //if(wasActive) return;\r\n setTimeout(() => {\r\n afterTimeout();\r\n //return;\r\n this.preloader.attach(mover);\r\n let cancellablePromise = appPhotosManager_1.default.preloadPhoto(media.id, size);\r\n cancellablePromise.then(() => {\r\n if (this.currentMessageID != message.mid) {\r\n this.log.warn('media viewer changed photo');\r\n return;\r\n }\r\n ///////this.log('indochina', blob);\r\n let url = media.url;\r\n if (target instanceof SVGSVGElement) {\r\n this.updateMediaSource(target, url, 'image');\r\n this.updateMediaSource(mover, url, 'image');\r\n }\r\n else {\r\n let image = mover.firstElementChild || new Image();\r\n //image.src = url;\r\n misc_1.renderImageFromUrl(image, url);\r\n mover.prepend(image);\r\n }\r\n this.preloader.detach();\r\n }).catch(err => {\r\n this.log.error(err);\r\n });\r\n }, 0);\r\n }\r\n }\r\n}\r\nexports.AppMediaViewer = AppMediaViewer;\r\nexports.default = new AppMediaViewer();\r\n" }, { - "id": 29, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/preloader.ts", - "name": "./src/components/preloader.ts", - "index": 72, - "index2": 62, - "size": 3413, + "id": 32, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\lazyLoadQueue.ts", + "name": "./src/components/lazyLoadQueue.ts", + "index": 63, + "index2": 56, + "size": 4807, "cacheable": true, "built": true, "optional": false, @@ -4526,54 +4558,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "issuerId": 15, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "issuerId": 12, + "issuerName": "./src/lib/appManagers/appImManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "dependencies": 1062 } }, { - "id": 15, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", + "id": 12, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "name": "./src/lib/appManagers/appImManager.ts", "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 523, - "building": 172, - "dependencies": 0 + "factory": 45, + "building": 1068, + "dependencies": 99 }, "failed": false, "errors": 0, @@ -4581,40 +4603,31 @@ "assets": [], "reasons": [ { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "../../components/preloader", - "loc": "30:36-73" - }, - { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", "module": "./src/lib/appManagers/appImManager.ts", "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "../../components/preloader", - "loc": "43:36-73" + "userRequest": "../../components/lazyLoadQueue", + "loc": "30:40-81" }, { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "./preloader", - "loc": "21:36-58" + "userRequest": "../../components/lazyLoadQueue", + "loc": "25:40-81" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "module": "./src/components/emoticonsDropdown.ts", + "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "../../components/preloader", - "loc": "12:36-73" + "userRequest": "./lazyLoadQueue", + "loc": "24:40-66" } ], "usedExports": true, @@ -4622,16 +4635,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../lib/utils\");\nclass ProgressivePreloader {\n constructor(elem, cancelable = true) {\n this.cancelable = cancelable;\n this.preloader = null;\n this.circle = null;\n this.progress = 0;\n this.promise = null;\n this.tempID = 0;\n this.preloader = document.createElement('div');\n this.preloader.classList.add('preloader-container');\n this.preloader.innerHTML = `\n
\n \n \n \n
`;\n if (cancelable) {\n this.preloader.innerHTML += `\n \n \n \n `;\n }\n else {\n this.preloader.classList.add('preloader-swing');\n }\n this.circle = this.preloader.firstElementChild.firstElementChild.firstElementChild;\n if (elem) {\n this.attach(elem);\n }\n if (this.cancelable) {\n this.preloader.addEventListener('click', () => {\n if (this.promise && this.promise.cancel) {\n this.promise.cancel();\n this.detach();\n }\n });\n }\n }\n attach(elem, reset = true, promise) {\n if (promise) {\n this.promise = promise;\n let tempID = --this.tempID;\n promise.then(() => {\n if (tempID == this.tempID) {\n this.detach();\n }\n });\n promise.notify = (details) => {\n if (tempID != this.tempID)\n return;\n console.log('preloader download', promise, details);\n let percents = details.done / details.total * 100;\n this.setProgress(percents);\n };\n }\n if (this.cancelable && reset) {\n this.setProgress(0);\n }\n elem.append(this.preloader);\n /* let isIn = isInDOM(this.preloader);\n \n if(isIn && this.progress != this.defaultProgress) {\n this.setProgress(this.defaultProgress);\n }\n \n elem.append(this.preloader);\n \n if(!isIn && this.progress != this.defaultProgress) {\n this.setProgress(this.defaultProgress);\n } */\n }\n detach() {\n if (this.preloader.parentElement) {\n this.preloader.parentElement.removeChild(this.preloader);\n }\n }\n setProgress(percents) {\n this.progress = percents;\n if (!utils_1.isInDOM(this.circle)) {\n return;\n }\n if (percents == 0) {\n this.circle.style.strokeDasharray = '';\n return;\n }\n let totalLength = this.circle.getTotalLength();\n console.log('setProgress', (percents / 100 * totalLength));\n this.circle.style.strokeDasharray = '' + Math.max(5, percents / 100 * totalLength) + ', 200';\n }\n}\nexports.default = ProgressivePreloader;\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../lib/utils\");\r\nclass LazyLoadQueue {\r\n constructor(parallelLimit = 5) {\r\n this.parallelLimit = parallelLimit;\r\n this.lazyLoadMedia = [];\r\n this.loadingMedia = 0;\r\n this.tempID = 0;\r\n this.lockPromise = null;\r\n this.unlockResolve = null;\r\n this.log = console.log.bind(console, '[LL]:');\r\n }\r\n clear() {\r\n this.tempID--;\r\n this.lazyLoadMedia.length = 0;\r\n this.loadingMedia = 0;\r\n }\r\n length() {\r\n return this.lazyLoadMedia.length + this.loadingMedia;\r\n }\r\n lock() {\r\n if (this.lockPromise)\r\n return;\r\n this.lockPromise = new Promise((resolve, reject) => {\r\n this.unlockResolve = resolve;\r\n });\r\n }\r\n unlock() {\r\n if (!this.unlockResolve)\r\n return;\r\n this.lockPromise = null;\r\n this.unlockResolve();\r\n this.unlockResolve = null;\r\n }\r\n processQueue(id) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.parallelLimit > 0 && this.loadingMedia >= this.parallelLimit)\r\n return;\r\n let item;\r\n let index;\r\n if (id !== undefined)\r\n item = this.lazyLoadMedia.splice(id, 1)[0];\r\n else {\r\n item = this.lazyLoadMedia.findAndSplice(i => utils_1.isElementInViewport(i.div));\r\n if (!item) {\r\n let length = this.lazyLoadMedia.length;\r\n for (index = length - 1; index >= 0; --index) {\r\n if (this.lazyLoadMedia[index].wasSeen) {\r\n item = this.lazyLoadMedia.splice(index, 1)[0];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (item) {\r\n this.loadingMedia++;\r\n let tempID = this.tempID;\r\n this.log('will load media', this.lockPromise, item);\r\n try {\r\n if (this.lockPromise) {\r\n let perf = performance.now();\r\n yield this.lockPromise;\r\n this.log('waited lock:', performance.now() - perf);\r\n }\r\n yield new Promise((resolve, reject) => window.requestAnimationFrame(() => window.requestAnimationFrame(resolve)));\r\n yield item.load();\r\n }\r\n catch (err) {\r\n console.error('loadMediaQueue error:', err, item, id, index);\r\n }\r\n if (tempID == this.tempID) {\r\n this.loadingMedia--;\r\n }\r\n this.log('loaded media');\r\n if (this.lazyLoadMedia.length) {\r\n this.processQueue();\r\n }\r\n }\r\n });\r\n }\r\n check(id) {\r\n if (id !== undefined) {\r\n let { div, wasSeen } = this.lazyLoadMedia[id];\r\n if (!wasSeen && utils_1.isElementInViewport(div)) {\r\n //console.log('will load div by id:', div, div.getBoundingClientRect());\r\n this.lazyLoadMedia[id].wasSeen = true;\r\n this.processQueue(id);\r\n }\r\n return;\r\n }\r\n let length = this.lazyLoadMedia.length;\r\n for (let i = length - 1; i >= 0; --i) {\r\n let { div, wasSeen } = this.lazyLoadMedia[i];\r\n if (!wasSeen && utils_1.isElementInViewport(div)) {\r\n //console.log('will load div:', div);\r\n this.lazyLoadMedia[i].wasSeen = true;\r\n this.processQueue(i);\r\n //this.lazyLoadMedia.splice(i, 1);\r\n }\r\n }\r\n }\r\n push(el) {\r\n let id = this.lazyLoadMedia.push(el) - 1;\r\n if (el.wasSeen) {\r\n this.processQueue(id);\r\n }\r\n else {\r\n el.wasSeen = false;\r\n this.check(id);\r\n }\r\n }\r\n}\r\nexports.default = LazyLoadQueue;\r\n" }, { - "id": 30, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "name": "./src/components/wrappers.ts", - "index": 73, - "index2": 68, - "size": 20125, + "id": 33, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appStickersManager.ts", + "name": "./src/lib/appManagers/appStickersManager.ts", + "index": 65, + "index2": 57, + "size": 4564, "cacheable": true, "built": true, "optional": false, @@ -4639,54 +4652,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "issuerId": 19, - "issuerName": "./src/lib/appManagers/appImManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "name": "./src/lib/services.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 - } - }, - { - "id": 19, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 208, - "building": 300, - "dependencies": 449 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -4694,40 +4697,31 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "../../components/wrappers", - "loc": "42:19-55" - }, - { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "module": "./src/components/wrappers.ts", + "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "../../components/wrappers", - "loc": "19:19-55" + "userRequest": "../lib/appManagers/appStickersManager", + "loc": "26:45-93" }, { - "moduleId": 46, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "module": "./src/lib/appManagers/appMediaViewer.ts", - "moduleName": "./src/lib/appManagers/appMediaViewer.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "module": "./src/components/emoticonsDropdown.ts", + "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "../../components/wrappers", - "loc": "13:19-55" + "userRequest": "../lib/appManagers/appStickersManager", + "loc": "20:45-93" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "module": "./src/components/emoticonsDropdown.ts", - "moduleName": "./src/components/emoticonsDropdown.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "./wrappers", - "loc": "24:19-40" + "userRequest": "./appManagers/appStickersManager", + "loc": "17:45-88" } ], "usedExports": true, @@ -4735,16 +4729,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst appPhotosManager_1 = __importDefault(require(\"../lib/appManagers/appPhotosManager\"));\nconst cryptoworker_1 = __importDefault(require(\"../lib/crypto/cryptoworker\"));\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\nconst appStickersManager_1 = __importDefault(require(\"../lib/appManagers/appStickersManager\"));\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\nconst utils_1 = require(\"../lib/utils\");\nconst preloader_1 = __importDefault(require(\"./preloader\"));\nconst apiFileManager_1 = __importDefault(require(\"../lib/mtproto/apiFileManager\"));\nconst appWebpManager_1 = __importDefault(require(\"../lib/appManagers/appWebpManager\"));\nconst ckin_1 = require(\"../lib/ckin\");\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\nfunction wrapVideo(doc, container, message, justLoader = true, preloader, controls = true, round = false) {\n if (!container.firstElementChild || (container.firstElementChild.tagName != 'IMG' && container.firstElementChild.tagName != 'VIDEO')) {\n let size = appPhotosManager_1.default.setAttachmentSize(doc, container);\n }\n let peerID = this.peerID ? this.peerID : this.currentMessageID;\n //container.classList.add('video');\n let img = container.firstElementChild || new Image();\n img.setAttribute('message-id', '' + message.mid);\n if (!container.contains(img)) {\n container.append(img);\n }\n //return Promise.resolve();\n if (!preloader) {\n preloader = new preloader_1.default(container, true);\n }\n let loadVideo = () => {\n let promise = appDocsManager_1.default.downloadDoc(doc);\n preloader.attach(container, true, promise);\n return promise.then(blob => {\n if ((this.peerID ? this.peerID : this.currentMessageID) != peerID) {\n this.log.warn('peer changed');\n return;\n }\n ///////console.log('loaded doc:', doc, blob, container);\n let video = document.createElement('video');\n /* video.loop = controls;\n video.autoplay = controls;\n \n if(!justLoader) {\n video.controls = controls;\n } else {\n video.volume = 0;\n } */\n video.setAttribute('message-id', '' + message.mid);\n let source = document.createElement('source');\n //source.src = doc.url;\n source.src = URL.createObjectURL(blob);\n source.type = doc.mime_type;\n if (img && container.contains(img)) {\n container.removeChild(img);\n }\n video.append(source);\n container.append(video);\n if (!justLoader || round) {\n video.dataset.ckin = round ? 'circle' : 'default';\n video.dataset.overlay = '1';\n let wrapper = ckin_1.wrapPlayer(video);\n if (!round) {\n wrapper.querySelector('.toggle').click();\n }\n }\n else if (doc.type == 'gif') {\n video.autoplay = true;\n video.loop = true;\n }\n //container.style.width = '';\n //container.style.height = '';\n });\n };\n if (doc.type == 'gif' || true) { // extra fix\n return this.peerID ? this.loadMediaQueuePush(loadVideo) : loadVideo();\n }\n else { // if video\n let load = () => appPhotosManager_1.default.preloadPhoto(doc).then((blob) => {\n if ((this.peerID ? this.peerID : this.currentMessageID) != peerID) {\n this.log.warn('peer changed');\n return;\n }\n img.src = URL.createObjectURL(blob);\n /* image.style.height = doc.h + 'px';\n image.style.width = doc.w + 'px'; */\n /* if(justLoader) { // extra fix\n justLoader = false;\n controls = false;\n } */\n if (!justLoader) {\n return loadVideo();\n }\n else {\n container.style.width = '';\n container.style.height = '';\n preloader.detach();\n }\n });\n return this.peerID ? this.loadMediaQueuePush(load) : load();\n }\n}\nexports.wrapVideo = wrapVideo;\nfunction wrapDocument(doc, withTime = false, uploading = false) {\n if (doc.type == 'voice') {\n return wrapAudio(doc, withTime);\n }\n let docDiv = document.createElement('div');\n docDiv.classList.add('document');\n let iconDiv = document.createElement('div');\n iconDiv.classList.add('tgico-document');\n let extSplitted = doc.file_name ? doc.file_name.split('.') : '';\n let ext = '';\n ext = extSplitted.length > 1 && Array.isArray(extSplitted) ? extSplitted.pop().toLowerCase() : 'file';\n let ext2 = ext;\n if (doc.type == 'photo') {\n docDiv.classList.add('photo');\n ext2 = ``;\n }\n let fileName = doc.file_name || 'Unknown.file';\n let size = utils_1.formatBytes(doc.size);\n if (withTime) {\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n let date = new Date(doc.date * 1000);\n size += ' · ' + months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear()\n + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\n }\n docDiv.innerHTML = `\n
${ext2}
\n ${!uploading ? `
` : ''}\n
${fileName}
\n
${size}
\n `;\n if (!uploading) {\n let downloadDiv = docDiv.querySelector('.document-download');\n let preloader;\n let promise;\n docDiv.addEventListener('click', () => {\n if (!promise) {\n if (downloadDiv.classList.contains('downloading')) {\n return; // means not ready yet\n }\n if (!preloader) {\n preloader = new preloader_1.default(null, true);\n }\n appDocsManager_1.default.saveDocFile(doc.id).then(res => {\n promise = res.promise;\n preloader.attach(downloadDiv, true, promise);\n promise.then(() => {\n downloadDiv.classList.remove('downloading');\n downloadDiv.remove();\n });\n });\n downloadDiv.classList.add('downloading');\n }\n else {\n downloadDiv.classList.remove('downloading');\n promise = null;\n }\n });\n }\n return docDiv;\n}\nexports.wrapDocument = wrapDocument;\nlet lastAudioToggle = null;\nfunction wrapAudio(doc, withTime = false) {\n let div = document.createElement('div');\n div.classList.add('audio');\n let duration = doc.duration;\n // @ts-ignore\n let durationStr = String(duration | 0).toHHMMSS(true);\n div.innerHTML = `\n
\n
\n
${durationStr}
\n `;\n //////console.log('wrapping audio', doc, doc.attributes[0].waveform);\n let timeDiv = div.lastElementChild;\n let downloadDiv = div.querySelector('.audio-download');\n let preloader;\n let promise;\n let svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n svg.classList.add('audio-waveform');\n svg.setAttributeNS(null, 'width', '250');\n svg.setAttributeNS(null, 'height', '23');\n svg.setAttributeNS(null, 'viewBox', '0 0 250 23');\n div.insertBefore(svg, div.lastElementChild);\n let wave = doc.attributes[0].waveform;\n let index = 0;\n for (let uint8 of wave) {\n let percents = uint8 / 255;\n let height = 23 * percents;\n if ( /* !height || */height < 2) {\n height = 2;\n }\n svg.insertAdjacentHTML('beforeend', `\n \n `);\n ++index;\n }\n let onClick = () => {\n if (!promise) {\n if (downloadDiv.classList.contains('downloading')) {\n return; // means not ready yet\n }\n if (!preloader) {\n preloader = new preloader_1.default(null, true);\n }\n let promise = appDocsManager_1.default.downloadDoc(doc.id);\n preloader.attach(downloadDiv, true, promise);\n promise.then(blob => {\n downloadDiv.classList.remove('downloading');\n downloadDiv.remove();\n let audio = document.createElement('audio');\n let source = document.createElement('source');\n source.src = URL.createObjectURL(blob);\n source.type = doc.mime_type;\n audio.volume = 1;\n div.removeEventListener('click', onClick);\n let toggle = div.querySelector('.audio-toggle');\n let interval = 0;\n toggle.addEventListener('click', () => {\n if (audio.paused) {\n if (lastAudioToggle && lastAudioToggle.classList.contains('tgico-largepause')) {\n lastAudioToggle.click();\n }\n audio.currentTime = 0;\n audio.play();\n lastAudioToggle = toggle;\n toggle.classList.remove('tgico-largeplay');\n toggle.classList.add('tgico-largepause');\n Array.from(svg.children).forEach(node => node.classList.remove('active'));\n let lastIndex = 0;\n interval = setInterval(() => {\n if (lastIndex >= svg.childElementCount) {\n clearInterval(interval);\n return;\n }\n // @ts-ignore\n timeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true);\n //svg.children[lastIndex].setAttributeNS(null, 'fill', '#000');\n svg.children[lastIndex].classList.add('active');\n ++lastIndex;\n //console.log('lastIndex:', lastIndex, audio.currentTime);\n }, duration * 1000 / svg.childElementCount | 0 /* 63 * duration / 10 */);\n }\n else {\n audio.pause();\n toggle.classList.add('tgico-largeplay');\n toggle.classList.remove('tgico-largepause');\n clearInterval(interval);\n }\n });\n audio.addEventListener('ended', () => {\n toggle.classList.add('tgico-largeplay');\n toggle.classList.remove('tgico-largepause');\n clearInterval(interval);\n // @ts-ignore\n timeDiv.innerText = String(audio.currentTime | 0).toHHMMSS(true);\n });\n audio.append(source);\n audio.style.display = 'none';\n div.append(audio);\n });\n downloadDiv.classList.add('downloading');\n }\n else {\n downloadDiv.classList.remove('downloading');\n promise = null;\n }\n };\n div.addEventListener('click', onClick);\n div.click();\n return div;\n}\nexports.wrapAudio = wrapAudio;\nfunction wrapPhoto(photo, message, container) {\n //container.classList.add('photo');\n let peerID = this.peerID;\n let size = appPhotosManager_1.default.setAttachmentSize(photo.id, container);\n let image = container.firstElementChild || new Image();\n //let size = appPhotosManager.setAttachmentSize(photo.id, image);\n image.setAttribute('message-id', message.mid);\n if (!container.contains(image)) {\n container.append(image);\n }\n let preloader = new preloader_1.default(container, false);\n let load = () => {\n let promise = appPhotosManager_1.default.preloadPhoto(photo.id, size);\n preloader.attach(container, true, promise);\n return promise.then((blob) => {\n if (this.peerID != peerID) {\n this.log.warn('peer changed');\n return;\n }\n image.src = URL.createObjectURL(blob);\n //image.style.width = '';\n //image.style.height = '';\n //container.style.width = '';\n //container.style.height = '';\n });\n };\n /////////console.log('wrapPhoto', load, container, image);\n return this.loadMediaQueue ? this.loadMediaQueuePush(load) : load();\n}\nexports.wrapPhoto = wrapPhoto;\nfunction wrapSticker(doc, div, middleware, lazyLoadQueue, group, canvas, play = false) {\n let stickerType = doc.mime_type == \"application/x-tgsticker\" ? 2 : (doc.mime_type == \"image/webp\" ? 1 : 0);\n if (!stickerType) {\n console.error('wrong doc for wrapSticker!', doc, div);\n }\n ///////console.log('wrap sticker', doc);\n if (doc.thumbs && !div.firstElementChild) {\n let thumb = doc.thumbs[0];\n if (thumb.bytes) {\n apiFileManager_1.default.saveSmallFile(thumb.location, thumb.bytes);\n appPhotosManager_1.default.setAttachmentPreview(thumb.bytes, div, true);\n }\n }\n let load = () => apiFileManager_1.default.downloadSmallFile({\n _: 'inputDocumentFileLocation',\n access_hash: doc.access_hash,\n file_reference: doc.file_reference,\n thumb_size: '' /* document.thumbs[0].type */,\n id: doc.id,\n stickerType: stickerType\n }, { mimeType: doc.mime_type, dcID: doc.dc_id }).then(blob => {\n //console.log('loaded sticker:', blob, div);\n if (middleware && !middleware())\n return;\n if (div.firstElementChild) {\n div.firstElementChild.remove();\n }\n if (stickerType == 2) {\n const reader = new FileReader();\n reader.addEventListener('loadend', (e) => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n const text = e.srcElement.result;\n let json = yield cryptoworker_1.default.gzipUncompress(text, true);\n let animation = yield lottieLoader_1.default.loadAnimation({\n container: div,\n loop: false,\n autoplay: false,\n animationData: JSON.parse(json),\n renderer: canvas ? 'canvas' : 'svg'\n }, group);\n if (!canvas) {\n div.addEventListener('mouseover', (e) => {\n let animation = lottieLoader_1.default.getAnimation(div, group);\n if (animation) {\n //console.log('sticker hover', animation, div);\n // @ts-ignore\n animation.loop = true;\n // @ts-ignore\n if (animation.currentFrame == animation.totalFrames - 1) {\n animation.goToAndPlay(0, true);\n }\n else {\n animation.play();\n }\n div.addEventListener('mouseout', () => {\n // @ts-ignore\n animation.loop = false;\n }, { once: true });\n }\n });\n } /* else {\n let canvas = div.firstElementChild as HTMLCanvasElement;\n if(!canvas.width && !canvas.height) {\n console.log('Need lottie resize');\n \n // @ts-ignore\n animation.resize();\n }\n } */\n if (play) {\n animation.play();\n }\n }));\n reader.readAsArrayBuffer(blob);\n }\n else if (stickerType == 1) {\n let img = new Image();\n appWebpManager_1.default.polyfillImage(img, blob);\n //img.src = URL.createObjectURL(blob);\n /* div.style.height = doc.h + 'px';\n div.style.width = doc.w + 'px'; */\n div.append(img);\n }\n div.setAttribute('file-id', doc.id);\n appStickersManager_1.default.saveSticker(doc);\n });\n return lazyLoadQueue ? (lazyLoadQueue.push({ div, load }), Promise.resolve()) : load();\n}\nexports.wrapSticker = wrapSticker;\nfunction wrapReply(title, subtitle, media) {\n let div = document.createElement('div');\n div.classList.add('reply');\n let replyBorder = document.createElement('div');\n replyBorder.classList.add('reply-border');\n let replyContent = document.createElement('div');\n replyContent.classList.add('reply-content');\n let replyTitle = document.createElement('div');\n replyTitle.classList.add('reply-title');\n let replySubtitle = document.createElement('div');\n replySubtitle.classList.add('reply-subtitle');\n replyTitle.innerHTML = title ? richtextprocessor_1.RichTextProcessor.wrapEmojiText(title) : '';\n if (media) {\n if (media.photo) {\n replySubtitle.innerHTML = 'Photo';\n }\n else if (media.document && media.document.type) {\n replySubtitle.innerHTML = media.document.type;\n }\n else if (media.webpage) {\n replySubtitle.innerHTML = richtextprocessor_1.RichTextProcessor.wrapPlainText(media.webpage.url);\n }\n else {\n replySubtitle.innerHTML = media._;\n }\n if (media.photo || (media.document && ['video'].indexOf(media.document.type) !== -1)) {\n let replyMedia = document.createElement('div');\n replyMedia.classList.add('reply-media');\n let photo = media.photo || media.document;\n let sizes = photo.sizes || photo.thumbs;\n if (sizes && sizes[0].bytes) {\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, replyMedia, false, true);\n }\n appPhotosManager_1.default.preloadPhoto(photo, appPhotosManager_1.default.choosePhotoSize(photo, 32, 32))\n .then((blob) => {\n replyMedia.style.backgroundImage = 'url(' + URL.createObjectURL(blob) + ')';\n });\n replyContent.append(replyMedia);\n div.classList.add('is-reply-media');\n }\n }\n else {\n replySubtitle.innerHTML = subtitle ? richtextprocessor_1.RichTextProcessor.wrapEmojiText(subtitle) : '';\n }\n replyContent.append(replyTitle, replySubtitle);\n div.append(replyBorder, replyContent);\n /////////console.log('wrapReply', title, subtitle, media);\n return div;\n}\nexports.wrapReply = wrapReply;\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\n//import apiManager from '../mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nclass appStickersManager {\r\n constructor() {\r\n this.documents = {};\r\n this.stickerSets = {};\r\n storage_1.default.get('stickerSets').then((sets) => {\r\n if (sets) {\r\n for (let id in sets) {\r\n let set = sets[id];\r\n set.documents.forEach(doc => {\r\n delete doc.downloaded;\r\n delete doc.url;\r\n this.saveSticker(doc);\r\n });\r\n }\r\n this.stickerSets = sets;\r\n }\r\n });\r\n }\r\n saveSticker(doc) {\r\n if (this.documents[doc.id])\r\n return this.documents[doc.id];\r\n /* Object.keys(doc).forEach(key => {\r\n if(doc[key] instanceof Uint8Array) {\r\n doc[key] = Array.from(doc[key]);\r\n }\r\n }); */\r\n doc.file_reference = Array.from(doc.file_reference);\r\n doc = appDocsManager_1.default.saveDoc(doc);\r\n this.documents[doc.id] = doc;\r\n return doc;\r\n }\r\n getSticker(fileID) {\r\n return this.documents[fileID];\r\n }\r\n getStickerSet(set) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.stickerSets[set.id])\r\n return this.stickerSets[set.id];\r\n let promise = mtprotoworker_1.default.invokeApi('messages.getStickerSet', {\r\n stickerset: {\r\n _: 'inputStickerSetID',\r\n id: set.id,\r\n access_hash: set.access_hash\r\n }\r\n });\r\n let res = yield promise;\r\n let stickerSet = res;\r\n this.saveStickerSet(stickerSet);\r\n return stickerSet;\r\n });\r\n }\r\n saveStickerSet(res) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let id = res.set.id;\r\n //console.log('stickers save set', res);\r\n this.stickerSets[id] = {\r\n set: res.set,\r\n packs: res.packs,\r\n documents: res.documents\r\n };\r\n res.documents.forEach(this.saveSticker.bind(this));\r\n //console.log('stickers wrote', this.stickerSets);\r\n yield storage_1.default.set({\r\n stickerSets: this.stickerSets\r\n });\r\n /* AppStorage.get('stickerSets').then((sets: any) => {\r\n this.stickerSets = sets;\r\n console.log('stickers got', this.stickerSets);\r\n }); */\r\n });\r\n }\r\n getStickerSetThumb(stickerSet) {\r\n let thumb = stickerSet.thumb;\r\n let dcID = stickerSet.thumb_dc_id;\r\n let promise = apiFileManager_1.default.downloadSmallFile({\r\n _: 'inputStickerSetThumb',\r\n stickerset: {\r\n _: 'inputStickerSetID',\r\n id: stickerSet.id,\r\n access_hash: stickerSet.access_hash\r\n },\r\n volume_id: thumb.location.volume_id,\r\n local_id: thumb.location.local_id\r\n }, { dcID: dcID });\r\n return promise;\r\n }\r\n cleanup() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield storage_1.default.remove('stickerSets');\r\n });\r\n }\r\n}\r\nexports.default = new appStickersManager();\r\n" }, { - "id": 34, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/http.ts", - "name": "./src/lib/mtproto/transports/http.ts", - "index": 40, - "index2": 32, - "size": 1177, + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", + "index": 20, + "index2": 72, + "size": 10159, "cacheable": true, "built": true, "optional": false, @@ -4752,44 +4746,24 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "issuerId": 1, - "issuerName": "./src/lib/mtproto/apiManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "issuerId": 44, + "issuerName": "./src/index.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 - } - }, - { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", - "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 44, + "building": 1570 } } ], "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 842, + "building": 0, + "dependencies": 1062 }, "failed": false, "errors": 0, @@ -4797,31 +4771,22 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", - "type": "cjs require", - "userRequest": "./transports/http", - "loc": "30:31-59" - }, - { - "moduleId": 22, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/dcConfigurator.ts", - "module": "./src/lib/mtproto/dcConfigurator.ts", - "moduleName": "./src/lib/mtproto/dcConfigurator.ts", + "moduleId": 44, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "module": "./src/index.ts", + "moduleName": "./src/index.ts", "type": "cjs require", - "userRequest": "./transports/http", - "loc": "7:31-59" + "userRequest": "./pages/pageSignIn", + "loc": "47:57-86" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 62, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "module": "./src/pages/pageAuthCode.ts", + "moduleName": "./src/pages/pageAuthCode.ts", "type": "cjs require", - "userRequest": "./transports/http", - "loc": "32:31-59" + "userRequest": "./pageSignIn", + "loc": "6:37-60" } ], "usedExports": true, @@ -4829,16 +4794,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst transport_1 = __importDefault(require(\"./transport\"));\nconst bin_utils_1 = require(\"../../bin_utils\");\nclass HTTP extends transport_1.default {\n constructor(dcID, url) {\n super(dcID, url);\n this.send = (data) => {\n return fetch(this.url, { method: 'POST', body: data }).then(response => {\n //console.log('http response', response/* , response.arrayBuffer() */);\n if (response.status != 200) {\n response.arrayBuffer().then(buffer => {\n console.log('not 200', new TextDecoder(\"utf-8\").decode(new Uint8Array(bin_utils_1.bytesFromArrayBuffer(buffer))));\n });\n throw response;\n }\n return response.arrayBuffer().then(buffer => {\n return new Uint8Array(bin_utils_1.bytesFromArrayBuffer(buffer));\n });\n });\n };\n }\n}\nexports.default = HTTP;\n" + "depth": 1, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst misc_1 = require(\"../components/misc\");\r\nconst scrollable_1 = __importDefault(require(\"../components/scrollable\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst config_1 = __importDefault(require(\"../lib/config\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst pageAuthCode_1 = __importDefault(require(\"./pageAuthCode\"));\r\n//import apiManager from \"../lib/mtproto/apiManager\";\r\nconst mtprotoworker_1 = __importDefault(require(\"../lib/mtproto/mtprotoworker\"));\r\nconst page_1 = __importDefault(require(\"./page\"));\r\nconst mtproto_config_1 = require(\"../lib/mtproto/mtproto_config\");\r\n//import _countries from '../countries_pretty.json';\r\nlet btnNext = null;\r\nlet onFirstMount = () => {\r\n if (mtproto_config_1.Modes.test) {\r\n config_1.default.Countries.push({\r\n name: 'Test Country',\r\n phoneCode: '999 66',\r\n code: 'TC',\r\n emoji: '🤔',\r\n pattern: '999 66 XXX XX'\r\n });\r\n console.log('Added test country to list!');\r\n }\r\n //const countries: Country[] = _countries.default.filter(c => c.emoji);\r\n const countries = config_1.default.Countries.filter(c => c.emoji).sort((a, b) => a.name.localeCompare(b.name));\r\n let lastCountrySelected = '';\r\n var selectCountryCode = page.pageEl.querySelector('input[name=\"countryCode\"]');\r\n var parent = selectCountryCode.parentElement;\r\n var wrapper = document.createElement('div');\r\n wrapper.classList.add('select-wrapper', 'z-depth-3');\r\n var list = document.createElement('ul');\r\n wrapper.appendChild(list);\r\n //let wrapperScroll = OverlayScrollbars(wrapper, (window as any).scrollbarOptions);\r\n let scroll = new scrollable_1.default(wrapper);\r\n let initedSelect = false;\r\n selectCountryCode.addEventListener('focus', function (e) {\r\n /* this.removeAttribute('readonly'); */\r\n if (!initedSelect) {\r\n countries.forEach((c) => {\r\n initedSelect = true;\r\n /* let unified = unifiedCountryCodeEmoji(c.code);\r\n let emoji = unified.split('-').reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), ''); */\r\n //let emoji = countryCodeEmoji(c.code);\r\n let emoji = c.emoji;\r\n let liArr = [];\r\n c.phoneCode.split(' and ').forEach((phoneCode) => {\r\n let li = document.createElement('li');\r\n var spanEmoji = document.createElement('span');\r\n /* spanEmoji.innerHTML = countryCodeEmoji(c.code); */\r\n //spanEmoji.classList.add('emoji-outer', 'emoji-sizer');\r\n //spanEmoji.innerHTML = ``;\r\n let kek = richtextprocessor_1.RichTextProcessor.wrapRichText(emoji);\r\n //console.log(c.name, emoji, kek, spanEmoji.innerHTML);\r\n li.appendChild(spanEmoji);\r\n spanEmoji.outerHTML = kek;\r\n li.append(c.name);\r\n var span = document.createElement('span');\r\n span.classList.add('phone-code');\r\n span.innerText = '+' + phoneCode;\r\n li.appendChild(span);\r\n liArr.push(li);\r\n list.append(li);\r\n });\r\n c.li = liArr;\r\n });\r\n list.addEventListener('mousedown', function (e) {\r\n let target = e.target;\r\n if (target.tagName != 'LI')\r\n target = utils_1.findUpTag(target, 'LI');\r\n let countryName = target.childNodes[1].textContent; //target.innerText.split('\\n').shift();\r\n let phoneCode = target.querySelector('.phone-code').innerText;\r\n selectCountryCode.value = countryName;\r\n lastCountrySelected = countryName;\r\n telEl.value = phoneCode;\r\n setTimeout(() => telEl.focus(), 0);\r\n console.log('clicked', e, countryName, phoneCode);\r\n });\r\n }\r\n parent.appendChild(wrapper);\r\n } /* , {once: true} */);\r\n selectCountryCode.addEventListener('blur', function (e) {\r\n //parent.removeChild(wrapper);\r\n e.cancelBubble = true;\r\n }, { capture: true });\r\n selectCountryCode.addEventListener('keyup', function (e) {\r\n if (e.ctrlKey || e.key == 'Control')\r\n return false;\r\n //let i = new RegExp('^' + this.value, 'i');\r\n let _value = this.value.toLowerCase();\r\n let matches = [];\r\n countries.forEach((c) => {\r\n let good = c.name.toLowerCase().indexOf(_value) !== -1 /* == 0 */; //i.test(c.name);\r\n c.li.forEach(li => li.style.display = good ? '' : 'none');\r\n if (good)\r\n matches.push(c);\r\n });\r\n if (matches.length == 1 && matches[0].li.length == 1) {\r\n if (matches[0].name == lastCountrySelected)\r\n return false;\r\n console.log('clicking', matches[0]);\r\n var clickEvent = document.createEvent('MouseEvents');\r\n clickEvent.initEvent('mousedown', true, true);\r\n matches[0].li[0].dispatchEvent(clickEvent);\r\n return false;\r\n }\r\n else if (matches.length == 0) {\r\n countries.forEach((c) => {\r\n c.li.forEach(li => li.style.display = '');\r\n });\r\n }\r\n });\r\n let arrowDown = page.pageEl.querySelector('.arrow-down');\r\n arrowDown.addEventListener('mousedown', function (e) {\r\n e.cancelBubble = true;\r\n e.preventDefault();\r\n if (selectCountryCode.matches(':focus'))\r\n selectCountryCode.blur();\r\n else\r\n selectCountryCode.focus();\r\n });\r\n let sortedCountries = countries.slice().sort((a, b) => b.phoneCode.length - a.phoneCode.length);\r\n let telEl = page.pageEl.querySelector('input[name=\"phone\"]');\r\n telEl.addEventListener('input', function (e) {\r\n this.classList.remove('error');\r\n let { formatted, country } = misc_1.formatPhoneNumber(this.value);\r\n this.value = formatted ? '+' + formatted : '';\r\n console.log(formatted, country);\r\n let countryName = country ? country.name : '' /* 'Unknown' */;\r\n if (countryName != selectCountryCode.value) {\r\n selectCountryCode.value = countryName;\r\n lastCountrySelected = countryName;\r\n }\r\n if (country && (this.value.length - 1) >= (country.pattern ? country.pattern.length : 9)) {\r\n btnNext.style.visibility = '';\r\n }\r\n else {\r\n btnNext.style.visibility = 'hidden';\r\n }\r\n });\r\n telEl.addEventListener('keypress', function (e) {\r\n if (this.value.length >= 9 && e.key == 'Enter') {\r\n return btnNext.click();\r\n }\r\n else if (/\\D/.test(e.key)) {\r\n e.preventDefault();\r\n return false;\r\n }\r\n });\r\n /* telEl.addEventListener('focus', function(this: typeof telEl, e) {\r\n this.removeAttribute('readonly'); // fix autocomplete\r\n });*/\r\n /* authorizer.auth(2);\r\n networkerFactory.startAll(); */\r\n btnNext.addEventListener('click', function (e) {\r\n this.setAttribute('disabled', 'true');\r\n this.textContent = 'PLEASE WAIT...';\r\n misc_1.putPreloader(this);\r\n //this.innerHTML = 'PLEASE WAIT...';\r\n let phone_number = telEl.value;\r\n mtprotoworker_1.default.invokeApi('auth.sendCode', {\r\n //flags: 0,\r\n phone_number: phone_number,\r\n api_id: mtproto_config_1.App.id,\r\n api_hash: mtproto_config_1.App.hash,\r\n settings: {\r\n _: 'codeSettings',\r\n flags: 0\r\n }\r\n //lang_code: navigator.language || 'en'\r\n }).then((code) => {\r\n console.log('got code', code);\r\n pageAuthCode_1.default.mount(Object.assign(code, { phone_number: phone_number }));\r\n }).catch(err => {\r\n this.removeAttribute('disabled');\r\n this.innerText = 'NEXT';\r\n switch (err.type) {\r\n case 'PHONE_NUMBER_INVALID':\r\n telEl.classList.add('error');\r\n break;\r\n default:\r\n console.error('auth.sendCode error:', err);\r\n this.innerText = err.type;\r\n break;\r\n }\r\n });\r\n });\r\n let tryAgain = () => {\r\n mtprotoworker_1.default.invokeApi('help.getNearestDc').then((nearestDcResult) => {\r\n if (nearestDcResult.nearest_dc != nearestDcResult.this_dc) {\r\n //MTProto.apiManager.baseDcID = nearestDcResult.nearest_dc;\r\n mtprotoworker_1.default.getNetworker(nearestDcResult.nearest_dc);\r\n }\r\n return nearestDcResult;\r\n }).then((nearestDcResult) => {\r\n let country = countries.find((c) => c.code == nearestDcResult.country);\r\n if (country) {\r\n if (!selectCountryCode.value.length && !telEl.value.length) {\r\n selectCountryCode.value = country.name;\r\n lastCountrySelected = country.name;\r\n telEl.value = '+' + country.phoneCode.split(' and ').shift();\r\n }\r\n }\r\n return console.log('woohoo', nearestDcResult, country);\r\n }); //.catch(tryAgain);\r\n };\r\n tryAgain();\r\n};\r\nconst page = new page_1.default('page-sign', true, onFirstMount, () => {\r\n if (!btnNext) {\r\n btnNext = page.pageEl.querySelector('button');\r\n }\r\n btnNext.textContent = 'NEXT';\r\n btnNext.removeAttribute('disabled');\r\n});\r\nexports.default = page;\r\n" }, { - "id": 35, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/tl_utils.ts", - "name": "./src/lib/tl_utils.ts", - "index": 42, - "index2": 34, - "size": 24266, + "id": 37, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts", + "name": "./src/lib/appManagers/appWebPagesManager.ts", + "index": 57, + "index2": 50, + "size": 4216, "cacheable": true, "built": true, "optional": false, @@ -4846,53 +4811,53 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "issuerId": 44, - "issuerName": "./src/lib/mtproto/authorizer.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "issuerId": 14, + "issuerName": "./src/lib/appManagers/appMessagesManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 386, + "building": 1105, + "dependencies": 45 } }, { - "id": 44, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", + "id": 14, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "name": "./src/lib/appManagers/appMessagesManager.ts", "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 576, + "building": 856, + "dependencies": 834 } } ], "profile": { - "factory": 775, - "building": 644, + "factory": 486, + "building": 201, "dependencies": 0 }, "failed": false, @@ -4901,31 +4866,22 @@ "assets": [], "reasons": [ { - "moduleId": 43, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/rsaKeysManager.ts", - "module": "./src/lib/mtproto/rsaKeysManager.ts", - "moduleName": "./src/lib/mtproto/rsaKeysManager.ts", - "type": "cjs require", - "userRequest": "../tl_utils", - "loc": "15:19-41" - }, - { - "moduleId": 44, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "../tl_utils", - "loc": "15:19-41" + "userRequest": "./appWebPagesManager", + "loc": "34:45-76" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", "type": "cjs require", - "userRequest": "../tl_utils", - "loc": "25:19-41" + "userRequest": "../lib/appManagers/appWebPagesManager", + "loc": "17:45-93" } ], "usedExports": true, @@ -4934,15 +4890,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 4, - "source": "\"use strict\";\n/*!\n * Webogram v0.7.0 - messaging web application for MTProto\n * https://github.com/zhukov/webogram\n * Copyright (C) 2014 Igor Zhukov \n * https://github.com/zhukov/webogram/blob/master/LICENSE\n */\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst bin_utils_1 = require(\"./bin_utils\");\nconst utils_1 = require(\"./utils\");\nconst Config = __importStar(require(\"./config\"));\nclass TLSerialization {\n constructor(options = {}) {\n this.maxLength = 2048; // 2Kb\n this.offset = 0; // in bytes\n this.mtproto = false;\n this.debug = false; //Config.Modes.debug;\n this.maxLength = options.startMaxLength || 2048; // 2Kb\n this.mtproto = options.mtproto || false;\n this.createBuffer();\n }\n createBuffer() {\n this.buffer = new ArrayBuffer(this.maxLength);\n this.intView = new Int32Array(this.buffer);\n this.byteView = new Uint8Array(this.buffer);\n }\n getArray() {\n let resultBuffer = new ArrayBuffer(this.offset);\n let resultArray = new Int32Array(resultBuffer);\n resultArray.set(this.intView.subarray(0, this.offset / 4));\n return resultArray;\n }\n getBuffer() {\n return this.getArray().buffer;\n }\n getBytes(typed) {\n if (typed) {\n let resultBuffer = new ArrayBuffer(this.offset);\n let resultArray = new Uint8Array(resultBuffer);\n resultArray.set(this.byteView.subarray(0, this.offset));\n return resultArray;\n }\n let bytes = [];\n for (var i = 0; i < this.offset; i++) {\n bytes.push(this.byteView[i]);\n }\n return bytes;\n }\n checkLength(needBytes) {\n if (this.offset + needBytes < this.maxLength) {\n return;\n }\n ///console.trace('Increase buffer', this.offset, needBytes, this.maxLength);\n this.maxLength = Math.ceil(Math.max(this.maxLength * 2, this.offset + needBytes + 16) / 4) * 4;\n var previousBuffer = this.buffer;\n var previousArray = new Int32Array(previousBuffer);\n this.createBuffer();\n new Int32Array(this.buffer).set(previousArray);\n }\n writeInt(i, field) {\n this.debug && console.log('>>>', i.toString(16), i, field);\n this.checkLength(4);\n this.intView[this.offset / 4] = i;\n this.offset += 4;\n }\n storeInt(i, field) {\n this.writeInt(i, (field || '') + ':int');\n }\n storeBool(i, field) {\n if (i) {\n this.writeInt(0x997275b5, (field || '') + ':bool');\n }\n else {\n this.writeInt(0xbc799737, (field || '') + ':bool');\n }\n }\n storeLongP(iHigh, iLow, field) {\n this.writeInt(iLow, (field || '') + ':long[low]');\n this.writeInt(iHigh, (field || '') + ':long[high]');\n }\n storeLong(sLong, field) {\n if (Array.isArray(sLong)) {\n if (sLong.length == 2) {\n return this.storeLongP(sLong[0], sLong[1], field);\n }\n else {\n return this.storeIntBytes(sLong, 64, field);\n }\n }\n if (typeof sLong != 'string') {\n sLong = sLong ? sLong.toString() : '0';\n }\n var divRem = bin_utils_1.bigStringInt(sLong).divideAndRemainder(bin_utils_1.bigint(0x100000000));\n this.writeInt(bin_utils_1.intToUint(divRem[1].intValue()), (field || '') + ':long[low]');\n this.writeInt(bin_utils_1.intToUint(divRem[0].intValue()), (field || '') + ':long[high]');\n }\n storeDouble(f, field) {\n var buffer = new ArrayBuffer(8);\n var intView = new Int32Array(buffer);\n var doubleView = new Float64Array(buffer);\n doubleView[0] = f;\n this.writeInt(intView[0], (field || '') + ':double[low]');\n this.writeInt(intView[1], (field || '') + ':double[high]');\n }\n storeString(s, field) {\n this.debug && console.log('>>>', s, (field || '') + ':string');\n if (s === undefined) {\n s = '';\n }\n var sUTF8 = unescape(encodeURIComponent(s));\n this.checkLength(sUTF8.length + 8);\n var len = sUTF8.length;\n if (len <= 253) {\n this.byteView[this.offset++] = len;\n }\n else {\n this.byteView[this.offset++] = 254;\n this.byteView[this.offset++] = len & 0xFF;\n this.byteView[this.offset++] = (len & 0xFF00) >> 8;\n this.byteView[this.offset++] = (len & 0xFF0000) >> 16;\n }\n for (var i = 0; i < len; i++) {\n this.byteView[this.offset++] = sUTF8.charCodeAt(i);\n }\n // Padding\n while (this.offset % 4) {\n this.byteView[this.offset++] = 0;\n }\n }\n storeBytes(bytes, field) {\n if (bytes instanceof ArrayBuffer) {\n bytes = new Uint8Array(bytes);\n }\n else if (bytes === undefined) {\n bytes = [];\n }\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || '') + ':bytes');\n // if uint8array were json.stringified, then will be: {'0': 123, '1': 123}\n var len = bytes.byteLength || bytes.length;\n this.checkLength(len + 8);\n if (len <= 253) {\n this.byteView[this.offset++] = len;\n }\n else {\n this.byteView[this.offset++] = 254;\n this.byteView[this.offset++] = len & 0xFF;\n this.byteView[this.offset++] = (len & 0xFF00) >> 8;\n this.byteView[this.offset++] = (len & 0xFF0000) >> 16;\n }\n this.byteView.set(bytes, this.offset);\n this.offset += len;\n // Padding\n while (this.offset % 4) {\n this.byteView[this.offset++] = 0;\n }\n }\n storeIntBytes(bytes, bits, field) {\n if (bytes instanceof ArrayBuffer) {\n bytes = new Uint8Array(bytes);\n }\n var len = bytes.length;\n if ((bits % 32) || (len * 8) != bits) {\n throw new Error('Invalid bits: ' + bits + ', ' + bytes.length);\n }\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || '') + ':int' + bits);\n this.checkLength(len);\n this.byteView.set(bytes, this.offset);\n this.offset += len;\n }\n storeRawBytes(bytes, field) {\n if (bytes instanceof ArrayBuffer) {\n bytes = new Uint8Array(bytes);\n }\n var len = bytes.length;\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || ''));\n this.checkLength(len);\n this.byteView.set(bytes, this.offset);\n this.offset += len;\n }\n storeMethod(methodName, params) {\n var schema = this.mtproto ? Config.Schema.MTProto : Config.Schema.API;\n var methodData = false, i;\n for (i = 0; i < schema.methods.length; i++) {\n if (schema.methods[i].method == methodName) {\n methodData = schema.methods[i];\n break;\n }\n }\n if (!methodData) {\n throw new Error('No method ' + methodName + ' found');\n }\n this.storeInt(bin_utils_1.intToUint(methodData.id), methodName + '[id]');\n var param, type;\n var i, condType;\n var fieldBit;\n var len = methodData.params.length;\n //console.log('storeMethod', len, methodData);\n for (i = 0; i < len; i++) {\n param = methodData.params[i];\n type = param.type;\n if (type.indexOf('?') !== -1) {\n condType = type.split('?');\n fieldBit = condType[0].split('.');\n if (!(params[fieldBit[0]] & (1 << fieldBit[1]))) {\n continue;\n }\n type = condType[1];\n }\n this.storeObject(params[param.name], type, methodName + '[' + param.name + ']');\n }\n return methodData.type;\n }\n storeObject(obj, type, field) {\n //console.log('storeObject', obj, type, field, this.offset, this.getBytes(true).hex);\n switch (type) {\n case '#':\n case 'int':\n return this.storeInt(obj, field);\n case 'long':\n return this.storeLong(obj, field);\n case 'int128':\n return this.storeIntBytes(obj, 128, field);\n case 'int256':\n return this.storeIntBytes(obj, 256, field);\n case 'int512':\n return this.storeIntBytes(obj, 512, field);\n case 'string':\n return this.storeString(obj, field);\n case 'bytes':\n return this.storeBytes(obj, field);\n case 'double':\n return this.storeDouble(obj, field);\n case 'Bool':\n return this.storeBool(obj, field);\n case 'true':\n return;\n }\n if (Array.isArray(obj)) {\n if (type.substr(0, 6) == 'Vector') {\n this.writeInt(0x1cb5c415, field + '[id]');\n }\n else if (type.substr(0, 6) != 'vector') {\n throw new Error('Invalid vector type ' + type);\n }\n var itemType = type.substr(7, type.length - 8); // for \"Vector\"\n this.writeInt(obj.length, field + '[count]');\n for (var i = 0; i < obj.length; i++) {\n this.storeObject(obj[i], itemType, field + '[' + i + ']');\n }\n return true;\n }\n else if (type.substr(0, 6).toLowerCase() == 'vector') {\n throw new Error('Invalid vector object');\n }\n if (!utils_1.isObject(obj)) {\n throw new Error('Invalid object for type ' + type);\n }\n var schema = this.mtproto ? Config.Schema.MTProto : Config.Schema.API;\n var predicate = obj['_'];\n var isBare = false;\n var constructorData = false;\n if (isBare = (type.charAt(0) == '%')) {\n type = type.substr(1);\n }\n for (i = 0; i < schema.constructors.length; i++) {\n if (schema.constructors[i].predicate == predicate) {\n constructorData = schema.constructors[i];\n break;\n }\n }\n if (!constructorData) {\n throw new Error('No predicate ' + predicate + ' found');\n }\n if (predicate == type) {\n isBare = true;\n }\n if (!isBare) {\n this.writeInt(bin_utils_1.intToUint(constructorData.id), field + '[' + predicate + '][id]');\n }\n var param, type;\n var condType;\n var fieldBit;\n var len = constructorData.params.length;\n //console.log('storeObject', len, constructorData);\n for (i = 0; i < len; i++) {\n param = constructorData.params[i];\n type = param.type;\n //console.log('storeObject', param, type);\n if (type.indexOf('?') !== -1) {\n condType = type.split('?');\n fieldBit = condType[0].split('.');\n //console.log('storeObject fieldBit', fieldBit, obj[fieldBit[0]]);\n if (!(obj[fieldBit[0]] & (1 << +fieldBit[1]))) {\n continue;\n }\n type = condType[1];\n }\n //console.log('storeObject', param, type);\n this.storeObject(obj[param.name], type, field + '[' + predicate + '][' + param.name + ']');\n }\n return constructorData.type;\n }\n}\nexports.TLSerialization = TLSerialization;\nclass TLDeserialization {\n constructor(buffer, options = {}) {\n this.offset = 0; // in bytes\n // this.debug = \n this.mtproto = false;\n //buffer = addPadding(buffer, 4, true); // fix 21.01.2020 for wss\n //console.log(\"TCL: TLDeserialization -> constructor -> buffer\", buffer, buffer instanceof ArrayBuffer);\n if (buffer instanceof ArrayBuffer) {\n this.buffer = buffer;\n this.byteView = new Uint8Array(this.buffer);\n }\n else {\n this.buffer = buffer.buffer;\n this.byteView = buffer;\n }\n /* this.buffer = buffer;\n //this.intView = new Uint32Array(this.buffer);\n this.byteView = new Uint8Array(this.buffer); */\n //console.log(this.intView);\n this.override = 'override' in options ? options.override : {};\n this.mtproto = 'mtproto' in options ? options.mtproto : false;\n this.debug = options.debug !== undefined ? options.debug : /* Config.Modes.debug */ false;\n }\n readInt(field) {\n //if(this.offset >= this.intView.length * 4) {\n if ((this.byteView.length - this.offset) < 4) {\n console.error(this.byteView, this.offset);\n throw new Error('Nothing to fetch: ' + field);\n }\n //var i = this.intView[this.offset / 4];\n let i = new Uint32Array(this.byteView.buffer.slice(this.offset, this.offset + 4))[0];\n this.debug /* || field.includes('[dialog][read_outbox_max_id]') */\n && console.log('<<<', i.toString(16), i, field, this.byteView.slice(this.offset - 16, this.offset + 16), this.byteView.slice(this.offset - 16, this.offset + 16).hex);\n this.offset += 4;\n return i;\n }\n fetchInt(field) {\n return this.readInt((field || '') + ':int');\n }\n fetchDouble(field) {\n var buffer = new ArrayBuffer(8);\n var intView = new Int32Array(buffer);\n var doubleView = new Float64Array(buffer);\n intView[0] = this.readInt((field || '') + ':double[low]'),\n intView[1] = this.readInt((field || '') + ':double[high]');\n return doubleView[0];\n }\n fetchLong(field) {\n var iLow = this.readInt((field || '') + ':long[low]');\n var iHigh = this.readInt((field || '') + ':long[high]');\n var longDec = bin_utils_1.bigint(iHigh).shiftLeft(32).add(bin_utils_1.bigint(iLow)).toString();\n return longDec;\n }\n fetchBool(field) {\n var i = this.readInt((field || '') + ':bool');\n if (i == 0x997275b5) {\n return true;\n }\n else if (i == 0xbc799737) {\n return false;\n }\n this.offset -= 4;\n return this.fetchObject('Object', field);\n }\n fetchString(field) {\n var len = this.byteView[this.offset++];\n if (len == 254) {\n var len = this.byteView[this.offset++] |\n (this.byteView[this.offset++] << 8) |\n (this.byteView[this.offset++] << 16);\n }\n var sUTF8 = '';\n for (var i = 0; i < len; i++) {\n sUTF8 += String.fromCharCode(this.byteView[this.offset++]);\n }\n // Padding\n while (this.offset % 4) {\n this.offset++;\n }\n try {\n var s = decodeURIComponent(escape(sUTF8));\n }\n catch (e) {\n var s = sUTF8;\n }\n this.debug && console.log('<<<', s, (field || '') + ':string');\n return s;\n }\n fetchBytes(field) {\n var len = this.byteView[this.offset++];\n if (len == 254) {\n len = this.byteView[this.offset++] |\n (this.byteView[this.offset++] << 8) |\n (this.byteView[this.offset++] << 16);\n }\n var bytes = this.byteView.subarray(this.offset, this.offset + len);\n this.offset += len;\n // Padding\n while (this.offset % 4) {\n this.offset++;\n }\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || '') + ':bytes');\n return bytes;\n }\n fetchIntBytes(bits, typed, field) {\n if (bits % 32) {\n throw new Error('Invalid bits: ' + bits);\n }\n var len = bits / 8;\n if (typed) {\n var result = this.byteView.subarray(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n var bytes = [];\n for (var i = 0; i < len; i++) {\n bytes.push(this.byteView[this.offset++]);\n }\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || '') + ':int' + bits);\n return bytes;\n }\n fetchRawBytes(len, typed, field) {\n if (len === false) {\n len = this.readInt((field || '') + '_length');\n if (len > this.byteView.byteLength) {\n throw new Error('Invalid raw bytes length: ' + len + ', buffer len: ' + this.byteView.byteLength);\n }\n }\n if (typed) {\n let bytes = new Uint8Array(len);\n bytes.set(this.byteView.subarray(this.offset, this.offset + len));\n this.offset += len;\n return bytes;\n }\n var bytes = [];\n for (var i = 0; i < len; i++) {\n bytes.push(this.byteView[this.offset++]);\n }\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || ''));\n return bytes;\n }\n fetchObject(type, field) {\n switch (type) {\n case '#':\n case 'int':\n return this.fetchInt(field);\n case 'long':\n return this.fetchLong(field);\n case 'int128':\n return this.fetchIntBytes(128, false, field);\n case 'int256':\n return this.fetchIntBytes(256, false, field);\n case 'int512':\n return this.fetchIntBytes(512, false, field);\n case 'string':\n return this.fetchString(field);\n case 'bytes':\n return this.fetchBytes(field);\n case 'double':\n return this.fetchDouble(field);\n case 'Bool':\n return this.fetchBool(field);\n case 'true':\n return true;\n }\n field = field || type || 'Object';\n if (type.substr(0, 6) == 'Vector' || type.substr(0, 6) == 'vector') {\n if (type.charAt(0) == 'V') {\n var constructor = this.readInt(field + '[id]');\n var constructorCmp = bin_utils_1.uintToInt(constructor);\n if (constructorCmp == 0x3072cfa1) { // Gzip packed\n var compressed = this.fetchBytes(field + '[packed_string]');\n var uncompressed = bin_utils_1.gzipUncompress(compressed);\n var newDeserializer = new TLDeserialization(uncompressed);\n return newDeserializer.fetchObject(type, field);\n }\n if (constructorCmp != 0x1cb5c415) {\n throw new Error('Invalid vector constructor ' + constructor);\n }\n }\n var len = this.readInt(field + '[count]');\n var result = [];\n if (len > 0) {\n var itemType = type.substr(7, type.length - 8); // for \"Vector\"\n for (var i = 0; i < len; i++) {\n result.push(this.fetchObject(itemType, field + '[' + i + ']'));\n }\n }\n return result;\n }\n var schema = (this.mtproto ? Config.Schema.MTProto : Config.Schema.API);\n var predicate = false;\n var constructorData = false;\n if (type.charAt(0) == '%') {\n var checkType = type.substr(1);\n for (var i = 0; i < schema.constructors.length; i++) {\n if (schema.constructors[i].type == checkType) {\n constructorData = schema.constructors[i];\n break;\n }\n }\n if (!constructorData) {\n throw new Error('Constructor not found for type: ' + type);\n }\n }\n else if (type.charAt(0) >= 97 && type.charAt(0) <= 122) {\n for (var i = 0; i < schema.constructors.length; i++) {\n if (schema.constructors[i].predicate == type) {\n constructorData = schema.constructors[i];\n break;\n }\n }\n if (!constructorData) {\n throw new Error('Constructor not found for predicate: ' + type);\n }\n }\n else {\n var constructor = this.readInt(field + '[id]');\n var constructorCmp = bin_utils_1.uintToInt(constructor);\n if (constructorCmp == 0x3072cfa1) { // Gzip packed\n var compressed = this.fetchBytes(field + '[packed_string]');\n var uncompressed = bin_utils_1.gzipUncompress(compressed);\n var newDeserializer = new TLDeserialization(uncompressed);\n return newDeserializer.fetchObject(type, field);\n }\n var index = schema.constructorsIndex;\n if (!index) {\n schema.constructorsIndex = index = {};\n for (var i = 0; i < schema.constructors.length; i++) {\n index[schema.constructors[i].id] = i;\n }\n }\n var i = index[constructorCmp];\n if (i) {\n constructorData = schema.constructors[i];\n }\n var fallback = false;\n if (!constructorData && this.mtproto) {\n var schemaFallback = Config.Schema.API;\n for (i = 0; i < schemaFallback.constructors.length; i++) {\n if (+schemaFallback.constructors[i].id == constructorCmp) {\n constructorData = schemaFallback.constructors[i];\n delete this.mtproto;\n fallback = true;\n break;\n }\n }\n }\n if (!constructorData) {\n throw new Error('Constructor not found: ' + constructor + ' ' + this.fetchInt() + ' ' + this.fetchInt());\n }\n }\n predicate = constructorData.predicate;\n var result = { '_': predicate };\n var overrideKey = (this.mtproto ? 'mt_' : '') + predicate;\n var self = this;\n if (this.override[overrideKey]) {\n this.override[overrideKey].apply(this, [result, field + '[' + predicate + ']']);\n }\n else {\n var i, param;\n var type, isCond;\n var condType, fieldBit;\n var value;\n var len = constructorData.params.length;\n for (i = 0; i < len; i++) {\n param = constructorData.params[i];\n type = param.type;\n if (type == '#' && result.pFlags === undefined) {\n result.pFlags = {};\n }\n if (isCond = (type.indexOf('?') !== -1)) {\n condType = type.split('?');\n fieldBit = condType[0].split('.');\n if (!(result[fieldBit[0]] & (1 << fieldBit[1]))) {\n //console.log('fetchObject bad', constructorData, result[fieldBit[0]], fieldBit);\n continue;\n }\n //console.log('fetchObject good', constructorData, result[fieldBit[0]], fieldBit);\n type = condType[1];\n }\n value = self.fetchObject(type, field + '[' + predicate + '][' + param.name + ']');\n if (isCond && type === 'true') {\n result.pFlags[param.name] = value;\n }\n else {\n /* if(param.name == 'read_outbox_max_id') {\n console.log(result, param.name, value, field + '[' + predicate + '][' + param.name + ']');\n } */\n result[param.name] = value;\n }\n }\n }\n if (fallback) {\n this.mtproto = true;\n }\n return result;\n }\n getOffset() {\n return this.offset;\n }\n fetchEnd() {\n if (this.offset != this.byteView.length) {\n throw new Error('Fetch end with non-empty buffer');\n }\n return true;\n }\n}\nexports.TLDeserialization = TLDeserialization;\n" + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../utils\");\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nclass AppWebPagesManager {\r\n constructor() {\r\n this.webpages = {};\r\n this.pendingWebPages = {};\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n let update = e.detail;\r\n switch (update._) {\r\n case 'updateWebPage':\r\n this.saveWebPage(update.webpage);\r\n break;\r\n }\r\n });\r\n }\r\n saveWebPage(apiWebPage, messageID, mediaContext) {\r\n if (apiWebPage.photo && apiWebPage.photo._ === 'photo') {\r\n //appPhotosManager.savePhoto(apiWebPage.photo, mediaContext);\r\n apiWebPage.photo = appPhotosManager_1.default.savePhoto(apiWebPage.photo, mediaContext);\r\n }\r\n else {\r\n delete apiWebPage.photo;\r\n }\r\n if (apiWebPage.document && apiWebPage.document._ === 'document') {\r\n apiWebPage.document = appDocsManager_1.default.saveDoc(apiWebPage.document, mediaContext); // warning 11.04.2020\r\n }\r\n else {\r\n if (apiWebPage.type == 'document') {\r\n delete apiWebPage.type;\r\n }\r\n delete apiWebPage.document;\r\n }\r\n var siteName = apiWebPage.site_name;\r\n var shortTitle = apiWebPage.title || apiWebPage.author || siteName || '';\r\n if (siteName && shortTitle == siteName) {\r\n delete apiWebPage.site_name;\r\n }\r\n if (shortTitle.length > 100) {\r\n shortTitle = shortTitle.substr(0, 80) + '...';\r\n }\r\n apiWebPage.rTitle = richtextprocessor_1.RichTextProcessor.wrapRichText(shortTitle, { noLinks: true, noLinebreaks: true });\r\n var contextHashtag = '';\r\n if (siteName == 'GitHub') {\r\n var matches = apiWebPage.url.match(/(https?:\\/\\/github\\.com\\/[^\\/]+\\/[^\\/]+)/);\r\n if (matches) {\r\n contextHashtag = matches[0] + '/issues/{1}';\r\n }\r\n }\r\n // delete apiWebPage.description\r\n var shortDescriptionText = (apiWebPage.description || '');\r\n if (shortDescriptionText.length > 180) {\r\n shortDescriptionText = shortDescriptionText.substr(0, 150).replace(/(\\n|\\s)+$/, '') + '...';\r\n }\r\n apiWebPage.rDescription = richtextprocessor_1.RichTextProcessor.wrapRichText(shortDescriptionText, {\r\n contextSite: siteName || 'external',\r\n contextHashtag: contextHashtag\r\n });\r\n if (apiWebPage.type != 'photo' &&\r\n apiWebPage.type != 'video' &&\r\n apiWebPage.type != 'gif' &&\r\n apiWebPage.type != 'document' &&\r\n !apiWebPage.description &&\r\n apiWebPage.photo) {\r\n apiWebPage.type = 'photo';\r\n }\r\n if (messageID) {\r\n if (this.pendingWebPages[apiWebPage.id] === undefined) {\r\n this.pendingWebPages[apiWebPage.id] = {};\r\n }\r\n this.pendingWebPages[apiWebPage.id][messageID] = true;\r\n this.webpages[apiWebPage.id] = apiWebPage;\r\n }\r\n if (this.webpages[apiWebPage.id] === undefined) {\r\n this.webpages[apiWebPage.id] = apiWebPage;\r\n }\r\n else {\r\n utils_1.safeReplaceObject(this.webpages[apiWebPage.id], apiWebPage);\r\n }\r\n if (!messageID && this.pendingWebPages[apiWebPage.id] !== undefined) {\r\n var msgs = [];\r\n for (let msgID in this.pendingWebPages[apiWebPage.id]) {\r\n msgs.push(msgID);\r\n }\r\n utils_1.$rootScope.$broadcast('webpage_updated', {\r\n id: apiWebPage.id,\r\n msgs: msgs\r\n });\r\n }\r\n }\r\n getWebPage(id) {\r\n return this.webpages[id];\r\n }\r\n}\r\nexports.default = new AppWebPagesManager();\r\n" }, { - "id": 36, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/timeManager.ts", - "name": "./src/lib/mtproto/timeManager.ts", - "index": 43, - "index2": 36, - "size": 1884, + "id": 38, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "name": "./src/lib/appManagers/appSidebarRight.ts", + "index": 60, + "index2": 61, + "size": 26275, "cacheable": true, "built": true, "optional": false, @@ -4950,54 +4906,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "issuerId": 16, - "issuerName": "./src/lib/mtproto/mtproto.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "dependencies": 1062 } }, { - "id": 16, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "name": "./src/lib/mtproto/mtproto.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 820, - "building": 593, - "dependencies": 0 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -5005,31 +4951,22 @@ "assets": [], "reasons": [ { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", - "type": "cjs require", - "userRequest": "./timeManager", - "loc": "19:38-62" - }, - { - "moduleId": 44, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./timeManager", - "loc": "20:38-62" + "userRequest": "./appSidebarRight", + "loc": "16:42-70" }, { - "moduleId": 68, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "module": "./src/lib/mtproto/networker.ts", - "moduleName": "./src/lib/mtproto/networker.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "./timeManager", - "loc": "29:38-62" + "userRequest": "./appManagers/appSidebarRight", + "loc": "19:42-82" } ], "usedExports": true, @@ -5037,16 +4974,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst storage_1 = __importDefault(require(\"../storage\"));\nconst utils_1 = require(\"../utils\");\nconst bin_utils_1 = require(\"../bin_utils\");\nclass TimeManager {\n constructor() {\n this.lastMessageID = [0, 0];\n this.timeOffset = 0;\n storage_1.default.get('server_time_offset').then((to) => {\n if (to) {\n this.timeOffset = to;\n }\n });\n }\n generateID() {\n var timeTicks = utils_1.tsNow(), timeSec = Math.floor(timeTicks / 1000) + this.timeOffset, timeMSec = timeTicks % 1000, random = bin_utils_1.nextRandomInt(0xFFFF);\n var messageID = [timeSec, (timeMSec << 21) | (random << 3) | 4];\n if (this.lastMessageID[0] > messageID[0] ||\n this.lastMessageID[0] == messageID[0] && this.lastMessageID[1] >= messageID[1]) {\n messageID = [this.lastMessageID[0], this.lastMessageID[1] + 4];\n }\n this.lastMessageID = messageID;\n // console.log('generated msg id', messageID, timeOffset)\n return bin_utils_1.longFromInts(messageID[0], messageID[1]);\n }\n applyServerTime(serverTime, localTime) {\n var newTimeOffset = serverTime - Math.floor((localTime || utils_1.tsNow()) / 1000);\n var changed = Math.abs(this.timeOffset - newTimeOffset) > 10;\n storage_1.default.set({\n server_time_offset: newTimeOffset\n });\n this.lastMessageID = [0, 0];\n this.timeOffset = newTimeOffset;\n console.log(bin_utils_1.dT(), 'Apply server time', serverTime, localTime, newTimeOffset, changed);\n return changed;\n }\n}\nexports.TimeManager = TimeManager;\nexports.default = new TimeManager();\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst misc_1 = require(\"../../components/misc\");\r\nconst scrollable_1 = __importDefault(require(\"../../components/scrollable\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\r\nconst appMediaViewer_1 = __importDefault(require(\"./appMediaViewer\"));\r\nconst lazyLoadQueue_1 = __importDefault(require(\"../../components/lazyLoadQueue\"));\r\nconst wrappers_1 = require(\"../../components/wrappers\");\r\nconst appSearch_1 = __importStar(require(\"../../components/appSearch\"));\r\nconst testScroll = false;\r\nclass AppSidebarRight {\r\n constructor() {\r\n this.sidebarEl = document.getElementById('column-right');\r\n this.profileContainer = this.sidebarEl.querySelector('.profile-container');\r\n this.profileContentEl = this.sidebarEl.querySelector('.profile-content');\r\n this.profileElements = {\r\n avatar: this.profileContentEl.querySelector('.profile-avatar'),\r\n name: this.profileContentEl.querySelector('.profile-name'),\r\n subtitle: this.profileContentEl.querySelector('.profile-subtitle'),\r\n bio: this.profileContentEl.querySelector('.profile-row-bio'),\r\n username: this.profileContentEl.querySelector('.profile-row-username'),\r\n phone: this.profileContentEl.querySelector('.profile-row-phone'),\r\n notificationsRow: this.profileContentEl.querySelector('.profile-row-notifications'),\r\n notificationsCheckbox: this.profileContentEl.querySelector('#profile-notifications'),\r\n notificationsStatus: this.profileContentEl.querySelector('.profile-row-notifications > p')\r\n };\r\n this.sharedMedia = {\r\n contentMembers: this.profileContentEl.querySelector('#content-members'),\r\n contentMedia: this.profileContentEl.querySelector('#content-media'),\r\n contentDocuments: this.profileContentEl.querySelector('#content-docs'),\r\n contentLinks: this.profileContentEl.querySelector('#content-links'),\r\n contentAudio: this.profileContentEl.querySelector('#content-audio'),\r\n };\r\n this.lastSharedMediaDiv = null;\r\n this.loadSidebarMediaPromises = {};\r\n this.loadedAllMedia = {};\r\n this.sharedMediaTypes = [\r\n 'inputMessagesFilterContacts',\r\n 'inputMessagesFilterPhotoVideo',\r\n 'inputMessagesFilterDocument',\r\n 'inputMessagesFilterUrl',\r\n 'inputMessagesFilterMusic'\r\n ];\r\n this.sharedMediaType = '';\r\n this.sharedMediaSelected = null;\r\n this.lazyLoadQueueSidebar = new lazyLoadQueue_1.default(5);\r\n /* public minMediaID: {\r\n [type: string]: number\r\n } = {}; */\r\n this.cleared = {};\r\n this.historiesStorage = {};\r\n this.usedFromHistory = {};\r\n this.log = polyfill_1.logger('SR');\r\n this.peerID = 0;\r\n this.scroll = null;\r\n this.savedVirtualStates = {};\r\n this.prevTabID = -1;\r\n this.mediaDivsByIDs = {};\r\n this.urlsToRevoke = [];\r\n this.searchContainer = this.sidebarEl.querySelector('#search-private-container');\r\n this.searchCloseBtn = this.searchContainer.querySelector('.sidebar-close-button');\r\n this.searchInput = document.getElementById('private-search');\r\n this.privateSearch = new appSearch_1.default(this.searchContainer.querySelector('.chats-container'), this.searchInput, {\r\n messages: new appSearch_1.SearchGroup('Private Search', 'messages')\r\n });\r\n let container = this.profileContentEl.querySelector('.profile-tabs-content');\r\n this.profileTabs = this.profileContentEl.querySelector('.profile-tabs');\r\n this.scroll = new scrollable_1.default(this.profileContainer, 'y', 1200, 'SR');\r\n this.scroll.container.addEventListener('scroll', this.onSidebarScroll.bind(this));\r\n this.scroll.onScrolledBottom = () => {\r\n if (this.sharedMediaSelected && !this.scroll.hiddenElements.down.length && this.sharedMediaSelected.childElementCount /* && false */) {\r\n this.log('onScrolledBottom will load media');\r\n this.loadSidebarMedia(true);\r\n }\r\n };\r\n misc_1.horizontalMenu(this.profileTabs, container, (id, tabContent) => {\r\n if (this.prevTabID == id)\r\n return;\r\n this.sharedMediaType = this.sharedMediaTypes[id];\r\n this.sharedMediaSelected = tabContent.firstElementChild;\r\n if (this.prevTabID != -1 && !this.sharedMediaSelected.childElementCount) { // quick brown fix\r\n this.loadSidebarMedia(true);\r\n }\r\n if (this.prevTabID != -1) {\r\n this.savedVirtualStates[this.prevTabID] = this.scroll.state;\r\n }\r\n this.prevTabID = id;\r\n this.log('setVirtualContainer', id, this.sharedMediaSelected);\r\n this.scroll.setVirtualContainer(this.sharedMediaSelected);\r\n if (this.savedVirtualStates[id]) {\r\n this.log(this.savedVirtualStates[id]);\r\n this.scroll.state = this.savedVirtualStates[id];\r\n }\r\n }, this.onSidebarScroll.bind(this));\r\n let sidebarCloseBtn = this.sidebarEl.querySelector('.sidebar-close-button');\r\n sidebarCloseBtn.addEventListener('click', () => {\r\n this.toggleSidebar(false);\r\n });\r\n this.searchCloseBtn.addEventListener('click', () => {\r\n this.searchContainer.classList.remove('active');\r\n this.privateSearch.reset();\r\n });\r\n this.sharedMedia.contentMedia.addEventListener('click', (e) => {\r\n let target = e.target;\r\n let messageID = +target.dataset.mid;\r\n if (!messageID) {\r\n this.log.warn('no messageID by click on target:', target);\r\n return;\r\n }\r\n let message = appMessagesManager_1.default.getMessage(messageID);\r\n let ids = Object.keys(this.mediaDivsByIDs).map(k => +k).sort();\r\n let idx = ids.findIndex(i => i == messageID);\r\n let targets = ids.map(id => ({ element: this.mediaDivsByIDs[id], mid: id }));\r\n appMediaViewer_1.default.openMedia(message, target, false, this.sidebarEl, targets.slice(idx + 1).reverse(), targets.slice(0, idx).reverse(), () => this.loadSidebarMedia(true));\r\n });\r\n this.profileElements.notificationsCheckbox.addEventListener('change', () => {\r\n //let checked = this.profileElements.notificationsCheckbox.checked;\r\n appImManager_1.default.mutePeer();\r\n });\r\n window.addEventListener('resize', this.onSidebarScroll.bind(this));\r\n if (testScroll) {\r\n let div = document.createElement('div');\r\n for (let i = 0; i < 500; ++i) {\r\n //div.insertAdjacentHTML('beforeend', `
`);\r\n div.insertAdjacentHTML('beforeend', `
${i / 3 | 0}
`);\r\n if ((i + 1) % 3 == 0) {\r\n this.sharedMedia.contentMedia.append(div);\r\n div = document.createElement('div');\r\n }\r\n div.dataset.id = '' + (i / 3 | 0);\r\n }\r\n this.sharedMedia.contentMedia.append(div);\r\n this.profileTabs.children[1].click(); // set media\r\n }\r\n }\r\n beginSearch() {\r\n this.toggleSidebar(true);\r\n this.searchContainer.classList.add('active');\r\n this.privateSearch.beginSearch(this.peerID);\r\n }\r\n onSidebarScroll() {\r\n this.lazyLoadQueueSidebar.check();\r\n }\r\n toggleSidebar(enable) {\r\n /////this.log('sidebarEl', this.sidebarEl, enable, isElementInViewport(this.sidebarEl));\r\n if (enable !== undefined) {\r\n if (enable) {\r\n setTimeout(() => this.lazyLoadQueueSidebar.check(), 200);\r\n this.sidebarEl.classList.add('active');\r\n }\r\n else\r\n this.sidebarEl.classList.remove('active');\r\n return;\r\n }\r\n this.sidebarEl.classList.toggle('active');\r\n }\r\n performSearchResult(ids, type) {\r\n let peerID = this.peerID;\r\n let sharedMediaDiv;\r\n let messages = [];\r\n for (let mid of ids) {\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n if (message.media)\r\n messages.push(message);\r\n }\r\n let elemsToAppend = [];\r\n // https://core.telegram.org/type/MessagesFilter\r\n switch (type) {\r\n case 'inputMessagesFilterPhotoVideo': {\r\n sharedMediaDiv = this.sharedMedia.contentMedia;\r\n for (let message of messages) {\r\n let media = message.media.photo || message.media.document || (message.media.webpage && message.media.webpage.document);\r\n if (!media) {\r\n //this.log('no media!', message);\r\n continue;\r\n }\r\n if (media._ == 'document' && media.type != 'video' /* && media.type != 'gif' */) {\r\n //this.log('broken video', media);\r\n continue;\r\n }\r\n let div = document.createElement('div');\r\n //console.log(message, photo);\r\n let isPhoto = media._ == 'photo';\r\n let photo = isPhoto ? appPhotosManager_1.default.getPhoto(media.id) : null;\r\n if (!photo || !photo.downloaded) {\r\n //this.log('inputMessagesFilterPhotoVideo', message, media, photo, div);\r\n let sizes = media.sizes || media.thumbs;\r\n if (sizes && sizes[0].bytes) {\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, div, false, true);\r\n } /* else {\r\n this.log('no stripped size', message, media);\r\n } */\r\n }\r\n //this.log('inputMessagesFilterPhotoVideo', message, media);\r\n let load = () => appPhotosManager_1.default.preloadPhoto(isPhoto ? media.id : media, appPhotosManager_1.default.choosePhotoSize(media, 200, 200))\r\n .then((blob) => {\r\n if (utils_1.$rootScope.selectedPeerID != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n if (photo && photo.url) {\r\n misc_1.renderImageFromUrl(div, photo.url);\r\n }\r\n else {\r\n let url = URL.createObjectURL(blob);\r\n this.urlsToRevoke.push(url);\r\n let img = new Image();\r\n img.src = url;\r\n img.onload = () => {\r\n div.style.backgroundImage = 'url(' + url + ')';\r\n };\r\n }\r\n //div.style.backgroundImage = 'url(' + url + ')';\r\n });\r\n div.dataset.mid = '' + message.mid;\r\n if (photo && photo.downloaded)\r\n load();\r\n else\r\n this.lazyLoadQueueSidebar.push({ div, load });\r\n this.lastSharedMediaDiv.append(div);\r\n if (this.lastSharedMediaDiv.childElementCount == 3) {\r\n if (!this.scroll.contains(this.lastSharedMediaDiv)) {\r\n elemsToAppend.push(this.lastSharedMediaDiv);\r\n }\r\n this.lastSharedMediaDiv = document.createElement('div');\r\n }\r\n this.mediaDivsByIDs[message.mid] = div;\r\n //sharedMediaDiv.append(div);\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterDocument': {\r\n sharedMediaDiv = this.sharedMedia.contentDocuments;\r\n for (let message of messages) {\r\n if (!message.media.document || message.media.document.type == 'voice' || message.media.document.type == 'audio') {\r\n continue;\r\n }\r\n let doc = message.media.document;\r\n if (doc.attributes) {\r\n if (doc.attributes.find((a) => a._ == \"documentAttributeSticker\")) {\r\n continue;\r\n }\r\n }\r\n //this.log('come back down to my knees', message);\r\n let div = wrappers_1.wrapDocument(message.media.document, true);\r\n elemsToAppend.push(div);\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterUrl': {\r\n sharedMediaDiv = this.sharedMedia.contentLinks;\r\n for (let message of messages) {\r\n if (!message.media.webpage || message.media.webpage._ == 'webPageEmpty') {\r\n continue;\r\n }\r\n let webpage = message.media.webpage;\r\n let div = document.createElement('div');\r\n let previewDiv = document.createElement('div');\r\n previewDiv.classList.add('preview');\r\n //this.log('wrapping webpage', webpage);\r\n if (webpage.photo) {\r\n let load = () => appPhotosManager_1.default.preloadPhoto(webpage.photo.id, appPhotosManager_1.default.choosePhotoSize(webpage.photo, 60, 60))\r\n .then(() => {\r\n if (utils_1.$rootScope.selectedPeerID != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n misc_1.renderImageFromUrl(previewDiv, webpage.photo.url);\r\n });\r\n this.lazyLoadQueueSidebar.push({ div: previewDiv, load });\r\n }\r\n else {\r\n previewDiv.innerText = (webpage.title || webpage.description || webpage.url || webpage.display_url).slice(0, 1);\r\n previewDiv.classList.add('empty');\r\n }\r\n let title = webpage.rTitle || '';\r\n let subtitle = webpage.rDescription || '';\r\n let url = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.url || '');\r\n if (!title) {\r\n //title = new URL(webpage.url).hostname;\r\n title = webpage.display_url.split('/', 1)[0];\r\n }\r\n div.append(previewDiv);\r\n div.insertAdjacentHTML('beforeend', `\r\n
${title}
\r\n
${subtitle}
\r\n
${url}
\r\n `);\r\n if (div.innerText.trim().length) {\r\n elemsToAppend.push(div);\r\n }\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterMusic': {\r\n sharedMediaDiv = this.sharedMedia.contentAudio;\r\n for (let message of messages) {\r\n if (!message.media.document || message.media.document.type != 'audio') {\r\n continue;\r\n }\r\n let div = wrappers_1.wrapDocument(message.media.document, true);\r\n elemsToAppend.push(div);\r\n }\r\n break;\r\n }\r\n default:\r\n //console.warn('death is my friend', message);\r\n break;\r\n }\r\n if (this.lastSharedMediaDiv.childElementCount && !this.scroll.contains(this.lastSharedMediaDiv)) {\r\n elemsToAppend.push(this.lastSharedMediaDiv);\r\n }\r\n if (elemsToAppend.length) {\r\n //window.requestAnimationFrame(() => {\r\n elemsToAppend.forEach(el => this.scroll.append(el));\r\n //});\r\n }\r\n if (sharedMediaDiv) {\r\n let parent = sharedMediaDiv.parentElement;\r\n if (parent.lastElementChild.classList.contains('preloader')) {\r\n parent.lastElementChild.remove();\r\n }\r\n }\r\n this.onSidebarScroll();\r\n }\r\n loadSidebarMedia(single = false) {\r\n var _a;\r\n if (testScroll /* || 1 == 1 */) {\r\n return;\r\n }\r\n this.log('loadSidebarMedia', single, this.peerID);\r\n let peerID = this.peerID;\r\n let typesToLoad = single ? [this.sharedMediaType] : this.sharedMediaTypes;\r\n typesToLoad = typesToLoad.filter(type => !this.loadedAllMedia[type]);\r\n if (!typesToLoad.length)\r\n return;\r\n let historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = {});\r\n this.scroll.lock();\r\n let promises = typesToLoad.map(type => {\r\n var _a;\r\n if (this.loadSidebarMediaPromises[type])\r\n return this.loadSidebarMediaPromises[type];\r\n let history = (_a = historyStorage[type]) !== null && _a !== void 0 ? _a : (historyStorage[type] = []);\r\n let loadCount = (appPhotosManager_1.default.windowH / 130 | 0) * 3;\r\n // render from cache\r\n if (history.length && this.usedFromHistory[type] < history.length && this.cleared[type]) {\r\n let ids = history.slice(this.usedFromHistory[type], this.usedFromHistory[type] + loadCount);\r\n this.log('will render from cache', this.usedFromHistory[type], history, ids, loadCount);\r\n this.usedFromHistory[type] += ids.length;\r\n this.performSearchResult(ids, type);\r\n return;\r\n }\r\n // заливать новую картинку сюда только после полной отправки!\r\n //let maxID = this.minMediaID[type] || 0;\r\n let maxID = history[history.length - 1] || 0;\r\n let ids = !maxID && appMessagesManager_1.default.historiesStorage[peerID]\r\n ? appMessagesManager_1.default.historiesStorage[peerID].history.slice() : [];\r\n maxID = !maxID && ids.length ? ids[ids.length - 1] : maxID;\r\n this.log('search house of glass pre', type, ids, maxID);\r\n //let loadCount = history.length ? 50 : 15;\r\n return this.loadSidebarMediaPromises[type] = appMessagesManager_1.default.getSearch(peerID, '', { _: type }, maxID, loadCount)\r\n .then(value => {\r\n ids = ids.concat(value.history);\r\n history.push(...ids);\r\n this.log('search house of glass', type, value, ids, this.cleared);\r\n if (utils_1.$rootScope.selectedPeerID != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n if (value.history.length < loadCount) {\r\n this.loadedAllMedia[type] = true;\r\n }\r\n if (this.cleared[type]) {\r\n //ids = history;\r\n delete this.cleared[type];\r\n }\r\n if (ids.length) {\r\n this.performSearchResult(ids, type);\r\n }\r\n }, (err) => {\r\n this.log.error('load error:', err);\r\n }).then(() => {\r\n this.loadSidebarMediaPromises[type] = null;\r\n });\r\n });\r\n return Promise.all(promises).then(() => {\r\n this.scroll.unlock();\r\n });\r\n }\r\n fillProfileElements() {\r\n let peerID = this.peerID = utils_1.$rootScope.selectedPeerID;\r\n this.loadSidebarMediaPromises = {};\r\n this.loadedAllMedia = {};\r\n this.lastSharedMediaDiv = document.createElement('div');\r\n //this.log('fillProfileElements');\r\n window.requestAnimationFrame(() => {\r\n this.profileContentEl.parentElement.scrollTop = 0;\r\n this.profileElements.bio.style.display = 'none';\r\n this.profileElements.phone.style.display = 'none';\r\n this.profileElements.username.style.display = 'none';\r\n this.profileElements.notificationsRow.style.display = '';\r\n this.profileElements.notificationsCheckbox.checked = true;\r\n this.profileElements.notificationsStatus.innerText = 'Enabled';\r\n Object.keys(this.sharedMedia).forEach(key => {\r\n this.sharedMedia[key].innerHTML = '';\r\n let parent = this.sharedMedia[key].parentElement;\r\n if (!parent.querySelector('.preloader')) {\r\n misc_1.putPreloader(parent, true);\r\n }\r\n });\r\n this.savedVirtualStates = {};\r\n this.prevTabID = -1;\r\n this.scroll.setVirtualContainer(null);\r\n this.profileTabs.firstElementChild.children[1].click(); // set media\r\n //this.scroll.getScrollTopOffset();\r\n this.loadSidebarMedia(true);\r\n });\r\n this.mediaDivsByIDs = {};\r\n this.lazyLoadQueueSidebar.clear();\r\n this.urlsToRevoke.forEach(url => {\r\n URL.revokeObjectURL(url);\r\n });\r\n this.urlsToRevoke.length = 0;\r\n this.sharedMediaTypes.forEach(type => {\r\n //this.minMediaID[type] = 0;\r\n this.cleared[type] = true;\r\n this.usedFromHistory[type] = 0;\r\n });\r\n let setText = (text, el) => {\r\n window.requestAnimationFrame(() => {\r\n if (el.childElementCount > 1) {\r\n el.firstElementChild.remove();\r\n }\r\n let p = document.createElement('p');\r\n p.innerHTML = text;\r\n el.prepend(p);\r\n el.style.display = '';\r\n //this.scroll.getScrollTopOffset();\r\n });\r\n };\r\n // username\r\n if (peerID != appImManager_1.default.myID) {\r\n let username = appPeersManager_1.default.getPeerUsername(peerID);\r\n if (username) {\r\n setText(appPeersManager_1.default.getPeerUsername(peerID), this.profileElements.username);\r\n }\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID);\r\n if (dialog.length) {\r\n dialog = dialog[0];\r\n let muted = false;\r\n if (dialog.notify_settings && dialog.notify_settings.mute_until) {\r\n muted = new Date(dialog.notify_settings.mute_until * 1000) > new Date();\r\n }\r\n appImManager_1.default.setMutedState(muted);\r\n }\r\n }\r\n else {\r\n window.requestAnimationFrame(() => {\r\n this.profileElements.notificationsRow.style.display = 'none';\r\n //this.scroll.getScrollTopOffset();\r\n });\r\n }\r\n if (peerID > 0) {\r\n let user = appUsersManager_1.default.getUser(peerID);\r\n if (user.phone && peerID != appImManager_1.default.myID) {\r\n setText('+' + misc_1.formatPhoneNumber(user.phone).formatted, this.profileElements.phone);\r\n }\r\n appProfileManager_1.default.getProfile(peerID, true).then(userFull => {\r\n if (this.peerID != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n if (userFull.rAbout && peerID != appImManager_1.default.myID) {\r\n setText(userFull.rAbout, this.profileElements.bio);\r\n }\r\n //this.log('userFull', userFull);\r\n if (userFull.pinned_msg_id) { // request pinned message\r\n appImManager_1.default.pinnedMsgID = userFull.pinned_msg_id;\r\n appMessagesManager_1.default.wrapSingleMessage(userFull.pinned_msg_id);\r\n }\r\n //this.scroll.getScrollTopOffset();\r\n });\r\n }\r\n else {\r\n let chat = appPeersManager_1.default.getPeer(peerID);\r\n appProfileManager_1.default.getChatFull(chat.id).then((chatFull) => {\r\n if (this.peerID != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n //this.log('chatInfo res 2:', chatFull);\r\n if (chatFull.about) {\r\n setText(richtextprocessor_1.RichTextProcessor.wrapRichText(chatFull.about), this.profileElements.bio);\r\n }\r\n //this.scroll.getScrollTopOffset();\r\n });\r\n }\r\n //this.scroll.getScrollTopOffset();\r\n //this.loadSidebarMedia();\r\n }\r\n}\r\nexports.default = new AppSidebarRight();\r\n" }, { - "id": 37, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appProfileManager.ts", - "name": "./src/lib/appManagers/appProfileManager.ts", - "index": 68, - "index2": 60, - "size": 17583, + "id": 39, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mediaPlayer.ts", + "name": "./src/lib/mediaPlayer.ts", + "index": 62, + "index2": 54, + "size": 13892, "cacheable": true, "built": true, "optional": false, @@ -5054,44 +4991,53 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "issuerId": 31, + "issuerName": "./src/lib/appManagers/appMediaViewer.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", "name": "./src/lib/services.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 386, + "building": 1105, + "dependencies": 45 + } + }, + { + "id": 31, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "name": "./src/lib/appManagers/appMediaViewer.ts", + "profile": { + "factory": 576, + "building": 856, + "dependencies": 834 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 219, + "building": 267 }, "failed": false, "errors": 0, @@ -5099,31 +5045,22 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appProfileManager", - "loc": "27:44-74" - }, - { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "module": "./src/components/wrappers.ts", + "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "./appProfileManager", - "loc": "13:44-74" + "userRequest": "../lib/mediaPlayer", + "loc": "32:35-64" }, { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 31, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts", + "module": "./src/lib/appManagers/appMediaViewer.ts", + "moduleName": "./src/lib/appManagers/appMediaViewer.ts", "type": "cjs require", - "userRequest": "./appManagers/appProfileManager", - "loc": "14:44-86" + "userRequest": "../mediaPlayer", + "loc": "14:38-63" } ], "usedExports": true, @@ -5131,16 +5068,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\nconst storage_1 = __importDefault(require(\"../storage\"));\nconst apiManager_1 = __importDefault(require(\"../mtproto/apiManager\"));\nclass AppProfileManager {\n constructor() {\n this.botInfos = {};\n this.usersFull = {};\n this.chatsFull = {};\n this.chatFullPromises = {};\n this.chatParticipantsPromises = {};\n utils_1.$rootScope.$on('apiUpdate', (e) => {\n let update = e.detail;\n // console.log('on apiUpdate', update)\n switch (update._) {\n case 'updateChatParticipants':\n var participants = update.participants;\n var chatFull = this.chatsFull[participants.id];\n if (chatFull !== undefined) {\n chatFull.participants = update.participants;\n utils_1.$rootScope.$broadcast('chat_full_update', update.chat_id);\n }\n break;\n case 'updateChatParticipantAdd':\n var chatFull = this.chatsFull[update.chat_id];\n if (chatFull !== undefined) {\n var participants = chatFull.participants.participants || [];\n for (var i = 0, length = participants.length; i < length; i++) {\n if (participants[i].user_id == update.user_id) {\n return;\n }\n }\n participants.push({\n _: 'chatParticipant',\n user_id: update.user_id,\n inviter_id: update.inviter_id,\n date: utils_1.tsNow(true)\n });\n chatFull.participants.version = update.version;\n utils_1.$rootScope.$broadcast('chat_full_update', update.chat_id);\n }\n break;\n case 'updateChatParticipantDelete':\n var chatFull = this.chatsFull[update.chat_id];\n if (chatFull !== undefined) {\n var participants = chatFull.participants.participants || [];\n for (var i = 0, length = participants.length; i < length; i++) {\n if (participants[i].user_id == update.user_id) {\n participants.splice(i, 1);\n chatFull.participants.version = update.version;\n utils_1.$rootScope.$broadcast('chat_full_update', update.chat_id);\n return;\n }\n }\n }\n break;\n case 'updateChannelPinnedMessage':\n var channelID = update.channel_id;\n var fullChannel = this.chatsFull[channelID];\n if (fullChannel !== undefined) {\n fullChannel.pinned_msg_id = appMessagesIDsManager_1.default.getFullMessageID(update.id, channelID);\n utils_1.$rootScope.$broadcast('peer_pinned_message', -channelID);\n }\n break;\n }\n });\n utils_1.$rootScope.$on('chat_update', (e) => {\n let chatID = e.detail;\n var fullChat = this.chatsFull[chatID];\n var chat = appChatsManager_1.default.getChat(chatID);\n if (!chat.photo || !fullChat) {\n return;\n }\n var emptyPhoto = chat.photo._ == 'chatPhotoEmpty';\n //////console.log('chat_update:', fullChat);\n if (fullChat.chat_photo && emptyPhoto != (fullChat.chat_photo._ == 'photoEmpty')) {\n delete this.chatsFull[chatID];\n utils_1.$rootScope.$broadcast('chat_full_update', chatID);\n return;\n }\n if (emptyPhoto) {\n return;\n }\n var smallUserpic = chat.photo.photo_small;\n var smallPhotoSize = appPhotosManager_1.default.choosePhotoSize(fullChat.chat_photo, 0, 0);\n if (JSON.stringify(smallUserpic) !== JSON.stringify(smallPhotoSize.location)) {\n delete this.chatsFull[chatID];\n utils_1.$rootScope.$broadcast('chat_full_update', chatID);\n }\n });\n }\n saveBotInfo(botInfo) {\n var botID = botInfo && botInfo.user_id;\n if (!botID) {\n return false;\n }\n var commands = {};\n botInfo.commands.forEach((botCommand) => {\n commands[botCommand.command] = botCommand.description;\n });\n return this.botInfos[botID] = {\n id: botID,\n version: botInfo.version,\n shareText: botInfo.share_text,\n description: botInfo.description,\n commands: commands\n };\n }\n getProfile(id, override) {\n if (this.usersFull[id]) {\n return Promise.resolve(this.usersFull[id]);\n }\n return apiManager_1.default.invokeApi('users.getFullUser', {\n id: appUsersManager_1.default.getUserInput(id)\n }).then((userFull) => {\n if (override && override.phone_number) {\n userFull.user.phone = override.phone_number;\n if (override.first_name || override.last_name) {\n userFull.user.first_name = override.first_name;\n userFull.user.last_name = override.last_name;\n }\n appUsersManager_1.default.saveApiUser(userFull.user);\n }\n else {\n appUsersManager_1.default.saveApiUser(userFull.user, true);\n }\n if (userFull.profile_photo) {\n appPhotosManager_1.default.savePhoto(userFull.profile_photo, {\n user_id: id\n });\n }\n if (userFull.about !== undefined) {\n userFull.rAbout = richtextprocessor_1.RichTextProcessor.wrapRichText(userFull.about, { noLinebreaks: true });\n }\n // NotificationsManager.savePeerSettings(id, userFull.notify_settings); // warning\n if (userFull.bot_info) {\n userFull.bot_info = this.saveBotInfo(userFull.bot_info);\n }\n return this.usersFull[id] = userFull;\n });\n }\n getPeerBots(peerID) {\n var peerBots = [];\n if (peerID >= 0 && !appUsersManager_1.default.isBot(peerID) ||\n (appPeersManager_1.default.isChannel(peerID) && !appPeersManager_1.default.isMegagroup(peerID))) {\n return Promise.resolve(peerBots);\n }\n if (peerID >= 0) {\n return this.getProfile(peerID).then((userFull) => {\n var botInfo = userFull.bot_info;\n if (botInfo && botInfo._ != 'botInfoEmpty') {\n peerBots.push(botInfo);\n }\n return peerBots;\n });\n }\n return this.getChatFull(-peerID).then((chatFull) => {\n chatFull.bot_info.forEach((botInfo) => {\n peerBots.push(this.saveBotInfo(botInfo));\n });\n return peerBots;\n });\n }\n getChatFull(id) {\n if (appChatsManager_1.default.isChannel(id)) {\n return this.getChannelFull(id);\n }\n if (this.chatsFull[id] !== undefined) {\n var chat = appChatsManager_1.default.getChat(id);\n if (chat.version == this.chatsFull[id].participants.version ||\n chat.pFlags.left) {\n return Promise.resolve(this.chatsFull[id]);\n }\n }\n if (this.chatFullPromises[id] !== undefined) {\n return this.chatFullPromises[id];\n }\n // console.trace(dT(), 'Get chat full', id, appChatsManager.getChat(id))\n return this.chatFullPromises[id] = apiManager_1.default.invokeApi('messages.getFullChat', {\n chat_id: appChatsManager_1.default.getChatInput(id)\n }).then((result) => {\n appChatsManager_1.default.saveApiChats(result.chats);\n appUsersManager_1.default.saveApiUsers(result.users);\n var fullChat = result.full_chat;\n if (fullChat && fullChat.chat_photo && fullChat.chat_photo.id) {\n appPhotosManager_1.default.savePhoto(fullChat.chat_photo);\n }\n /* NotificationsManager.savePeerSettings(-id, fullChat.notify_settings); */ // warning\n delete this.chatFullPromises[id];\n this.chatsFull[id] = fullChat;\n utils_1.$rootScope.$broadcast('chat_full_update', id);\n return fullChat;\n });\n }\n getChatInviteLink(id, force) {\n return this.getChatFull(id).then((chatFull) => {\n if (!force &&\n chatFull.exported_invite &&\n chatFull.exported_invite._ == 'chatInviteExported') {\n return chatFull.exported_invite.link;\n }\n var promise;\n if (appChatsManager_1.default.isChannel(id)) {\n promise = apiManager_1.default.invokeApi('channels.exportInvite', {\n channel: appChatsManager_1.default.getChannelInput(id)\n });\n }\n else {\n promise = apiManager_1.default.invokeApi('messages.exportChatInvite', {\n chat_id: appChatsManager_1.default.getChatInput(id)\n });\n }\n return promise.then((exportedInvite) => {\n if (this.chatsFull[id] !== undefined) {\n this.chatsFull[id].exported_invite = exportedInvite;\n }\n return exportedInvite.link;\n });\n });\n }\n getChannelParticipants(id, filter, limit, offset) {\n filter = filter || { _: 'channelParticipantsRecent' };\n limit = limit || 200;\n offset = offset || 0;\n var promiseKey = [id, filter._, offset, limit].join('_');\n var promiseData = this.chatParticipantsPromises[promiseKey];\n if (filter._ == 'channelParticipantsRecent') {\n var chat = appChatsManager_1.default.getChat(id);\n if (chat &&\n chat.pFlags && (chat.pFlags.kicked ||\n chat.pFlags.broadcast && !chat.pFlags.creator && !chat.admin_rights)) {\n return Promise.reject();\n }\n }\n var fetchParticipants = (cachedParticipants) => {\n var hash = 0;\n if (cachedParticipants) {\n var userIDs = [];\n cachedParticipants.forEach((participant) => {\n userIDs.push(participant.user_id);\n });\n userIDs.sort();\n userIDs.forEach((userID) => {\n hash = ((hash * 20261) + 0x80000000 + userID) % 0x80000000;\n });\n }\n return apiManager_1.default.invokeApi('channels.getParticipants', {\n channel: appChatsManager_1.default.getChannelInput(id),\n filter: filter,\n offset: offset,\n limit: limit,\n hash: hash\n }).then((result) => {\n if (result._ == 'channels.channelParticipantsNotModified') {\n return cachedParticipants;\n }\n appUsersManager_1.default.saveApiUsers(result.users);\n return result.participants;\n });\n };\n var maybeAddSelf = (participants) => {\n var chat = appChatsManager_1.default.getChat(id);\n var selfMustBeFirst = filter._ == 'channelParticipantsRecent' &&\n !offset &&\n !chat.pFlags.kicked &&\n !chat.pFlags.left;\n if (selfMustBeFirst) {\n participants = utils_1.copy(participants);\n var myID = appUsersManager_1.default.getSelf().id;\n var myIndex = false;\n var myParticipant;\n for (var i = 0, len = participants.length; i < len; i++) {\n if (participants[i].user_id == myID) {\n myIndex = i;\n break;\n }\n }\n if (myIndex !== false) {\n myParticipant = participants[i];\n participants.splice(i, 1);\n }\n else {\n myParticipant = { _: 'channelParticipantSelf', user_id: myID };\n }\n participants.unshift(myParticipant);\n }\n return participants;\n };\n var timeNow = utils_1.tsNow();\n if (promiseData !== undefined) {\n var promise = promiseData[1];\n if (promiseData[0] > timeNow - 60000) {\n return promise;\n }\n let newPromise = promise.then((cachedParticipants) => {\n return fetchParticipants(cachedParticipants).then(maybeAddSelf);\n });\n this.chatParticipantsPromises[promiseKey] = [timeNow, newPromise];\n return newPromise;\n }\n var newPromise = fetchParticipants().then(maybeAddSelf);\n this.chatParticipantsPromises[promiseKey] = [timeNow, newPromise];\n return newPromise;\n }\n getChannelFull(id, force) {\n if (this.chatsFull[id] !== undefined && !force) {\n return Promise.resolve(this.chatsFull[id]);\n }\n if (this.chatFullPromises[id] !== undefined) {\n return this.chatFullPromises[id];\n }\n return this.chatFullPromises[id] = apiManager_1.default.invokeApi('channels.getFullChannel', {\n channel: appChatsManager_1.default.getChannelInput(id)\n }).then((result) => {\n appChatsManager_1.default.saveApiChats(result.chats);\n appUsersManager_1.default.saveApiUsers(result.users);\n var fullChannel = result.full_chat;\n if (fullChannel && fullChannel.chat_photo.id) {\n appPhotosManager_1.default.savePhoto(fullChannel.chat_photo);\n }\n /* NotificationsManager.savePeerSettings(-id, fullChannel.notify_settings) */ // warning\n if (fullChannel.pinned_msg_id) {\n fullChannel.pinned_msg_id = appMessagesIDsManager_1.default.getFullMessageID(fullChannel.pinned_msg_id, id);\n }\n delete this.chatFullPromises[id];\n this.chatsFull[id] = fullChannel;\n utils_1.$rootScope.$broadcast('chat_full_update', id);\n return fullChannel;\n }, (error) => {\n switch (error.type) {\n case 'CHANNEL_PRIVATE':\n var channel = appChatsManager_1.default.getChat(id);\n channel = { _: 'channelForbidden', access_hash: channel.access_hash, title: channel.title };\n apiUpdatesManager_1.default.processUpdateMessage({\n _: 'updates',\n updates: [{\n _: 'updateChannel',\n channel_id: id\n }],\n chats: [channel],\n users: []\n });\n break;\n }\n return Promise.reject(error);\n });\n }\n invalidateChannelParticipants(id) {\n delete this.chatsFull[id];\n delete this.chatFullPromises[id];\n for (let key in this.chatParticipantsPromises) {\n //let val = this.chatParticipantsPromises[key];\n if (+key.split('_')[0] == id) {\n delete this.chatParticipantsPromises[key];\n }\n }\n utils_1.$rootScope.$broadcast('chat_full_update', id);\n }\n getChannelPinnedMessage(id) {\n return this.getChannelFull(id).then((fullChannel) => {\n var pinnedMessageID = fullChannel && fullChannel.pinned_msg_id;\n if (!pinnedMessageID) {\n return false;\n }\n return storage_1.default.get('pinned_hidden' + id).then((hiddenMessageID) => {\n if (appMessagesIDsManager_1.default.getMessageLocalID(pinnedMessageID) == hiddenMessageID) {\n return false;\n }\n return pinnedMessageID;\n });\n });\n }\n hideChannelPinnedMessage(id, pinnedMessageID) {\n var setKeys = {};\n setKeys['pinned_hidden' + id] = appMessagesIDsManager_1.default.getMessageLocalID(pinnedMessageID);\n storage_1.default.set(setKeys);\n utils_1.$rootScope.$broadcast('peer_pinned_message', -id);\n }\n}\nexports.AppProfileManager = AppProfileManager;\nexports.default = new AppProfileManager();\n" + "depth": 4, + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass MediaProgressLine {\r\n constructor(media) {\r\n this.media = media;\r\n this.duration = 0;\r\n this.container = document.createElement('div');\r\n this.container.classList.add('media-progress');\r\n this.filled = document.createElement('div');\r\n this.filled.classList.add('media-progress__filled');\r\n let seek = this.seek = document.createElement('input');\r\n seek.classList.add('media-progress__seek');\r\n seek.value = '0';\r\n seek.setAttribute('min', '0');\r\n seek.setAttribute('max', '0');\r\n seek.type = 'range';\r\n seek.step = '0.1';\r\n this.setSeekMax();\r\n this.setListeners();\r\n this.container.append(this.filled, seek);\r\n }\r\n setSeekMax() {\r\n let seek = this.seek;\r\n this.duration = this.media.duration;\r\n if (this.duration > 0) {\r\n seek.setAttribute('max', '' + this.duration * 1000);\r\n }\r\n else {\r\n this.media.addEventListener('loadeddata', () => {\r\n this.duration = this.media.duration;\r\n seek.setAttribute('max', '' + this.duration * 1000);\r\n });\r\n }\r\n }\r\n setProgress() {\r\n let currentTime = this.media.currentTime;\r\n let scaleX = (currentTime / this.duration);\r\n this.filled.style.transform = 'scaleX(' + scaleX + ')';\r\n this.seek.value = '' + currentTime * 1000;\r\n }\r\n setListeners() {\r\n let mousedown = false;\r\n let stopAndScrubTimeout = 0;\r\n this.media.addEventListener('ended', () => {\r\n this.setProgress();\r\n });\r\n this.media.addEventListener('play', () => {\r\n let r = () => {\r\n this.setProgress();\r\n !this.media.paused && window.requestAnimationFrame(r);\r\n };\r\n window.requestAnimationFrame(r);\r\n });\r\n this.container.addEventListener('mousemove', (e) => {\r\n mousedown && this.scrub(e);\r\n });\r\n this.container.addEventListener('mousedown', (e) => {\r\n this.scrub(e);\r\n //Таймер для того, чтобы стопать видео, если зажал мышку и не отпустил клик\r\n stopAndScrubTimeout = setTimeout(() => {\r\n !this.media.paused && this.media.pause();\r\n stopAndScrubTimeout = 0;\r\n }, 150);\r\n mousedown = true;\r\n });\r\n this.container.addEventListener('mouseup', () => {\r\n if (stopAndScrubTimeout) {\r\n clearTimeout(stopAndScrubTimeout);\r\n }\r\n this.media.paused && this.media.play();\r\n mousedown = false;\r\n });\r\n }\r\n scrub(e) {\r\n let scrubTime = e.offsetX / this.container.offsetWidth * this.duration;\r\n this.media.currentTime = scrubTime;\r\n let scaleX = scrubTime / this.duration;\r\n if (scaleX > 1)\r\n scaleX = 1;\r\n if (scaleX < 0)\r\n scaleX = 0;\r\n this.filled.style.transform = 'scaleX(' + scaleX + ')';\r\n }\r\n}\r\nexports.MediaProgressLine = MediaProgressLine;\r\nclass VideoPlayer {\r\n constructor(video, play = false) {\r\n var _a;\r\n this.video = video;\r\n this.wrapper = document.createElement('div');\r\n this.wrapper.classList.add('ckin__player');\r\n video.parentNode.insertBefore(this.wrapper, video);\r\n this.wrapper.appendChild(video);\r\n this.skin = (_a = video.dataset.ckin) !== null && _a !== void 0 ? _a : 'default';\r\n this.stylePlayer();\r\n if (this.skin == 'default') {\r\n let controls = this.wrapper.querySelector('.default__controls.ckin__controls');\r\n this.progress = new MediaProgressLine(video);\r\n controls.prepend(this.progress.container);\r\n }\r\n if (play) {\r\n this.wrapper.querySelector('.toggle').click();\r\n }\r\n }\r\n stylePlayer() {\r\n let player = this.wrapper;\r\n let video = this.video;\r\n let skin = this.skin;\r\n player.classList.add(skin);\r\n let html = this.buildControls();\r\n player.insertAdjacentHTML('beforeend', html);\r\n let updateInterval = 0;\r\n let elapsed = 0;\r\n let prevTime = 0;\r\n if (skin === 'default') {\r\n var toggle = player.querySelectorAll('.toggle');\r\n var fullScreenButton = player.querySelector('.fullscreen');\r\n var timeElapsed = player.querySelector('#time-elapsed');\r\n var timeDuration = player.querySelector('#time-duration');\r\n timeDuration.innerHTML = String(video.duration | 0).toHHMMSS();\r\n Array.from(toggle).forEach((button) => {\r\n return button.addEventListener('click', () => {\r\n this.togglePlay();\r\n });\r\n });\r\n video.addEventListener('click', () => {\r\n this.togglePlay();\r\n });\r\n video.addEventListener('play', () => {\r\n this.updateButton(toggle);\r\n });\r\n video.addEventListener('pause', () => {\r\n this.updateButton(toggle);\r\n clearInterval(updateInterval);\r\n });\r\n video.addEventListener('dblclick', () => {\r\n return this.toggleFullScreen(fullScreenButton);\r\n });\r\n fullScreenButton.addEventListener('click', (e) => {\r\n return this.toggleFullScreen(fullScreenButton);\r\n });\r\n let b = () => this.onFullScreen();\r\n 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange'.split(' ').forEach(eventName => {\r\n player.addEventListener(eventName, b, false);\r\n });\r\n }\r\n if (skin === 'circle') {\r\n let wrapper = document.createElement('div');\r\n wrapper.classList.add('circle-time-left');\r\n video.parentNode.insertBefore(wrapper, video);\r\n wrapper.innerHTML = '
';\r\n var circle = player.querySelector('.progress-ring__circle');\r\n var radius = circle.r.baseVal.value;\r\n var circumference = 2 * Math.PI * radius;\r\n var timeDuration = player.querySelector('.circle-time');\r\n var iconVolume = player.querySelector('.iconVolume');\r\n circle.style.strokeDasharray = circumference + ' ' + circumference;\r\n circle.style.strokeDashoffset = '' + circumference;\r\n circle.addEventListener('click', () => {\r\n this.togglePlay();\r\n });\r\n video.addEventListener('play', () => {\r\n iconVolume.style.display = 'none';\r\n updateInterval = setInterval(() => {\r\n //elapsed += 0.02; // Increase with timer interval\r\n if (video.currentTime != prevTime) {\r\n elapsed = video.currentTime; // Update if getCurrentTime was changed\r\n prevTime = video.currentTime;\r\n }\r\n let offset = circumference - elapsed / video.duration * circumference;\r\n circle.style.strokeDashoffset = '' + offset;\r\n if (video.paused)\r\n clearInterval(updateInterval);\r\n }, 20);\r\n });\r\n video.addEventListener('pause', () => {\r\n iconVolume.style.display = '';\r\n });\r\n }\r\n if (video.duration > 0) {\r\n timeDuration.innerHTML = String(Math.round(video.duration)).toHHMMSS();\r\n }\r\n else {\r\n video.addEventListener('loadeddata', () => {\r\n timeDuration.innerHTML = String(Math.round(video.duration)).toHHMMSS();\r\n });\r\n }\r\n video.addEventListener('timeupdate', () => {\r\n if (skin == 'default') {\r\n timeElapsed.innerHTML = String(video.currentTime | 0).toHHMMSS();\r\n }\r\n updateInterval = this.handleProgress(timeDuration, circumference, circle, updateInterval);\r\n });\r\n }\r\n togglePlay(stop) {\r\n if (stop) {\r\n this.video.pause();\r\n this.wrapper.classList.remove('is-playing');\r\n return;\r\n }\r\n else if (stop === false) {\r\n this.video.play();\r\n this.wrapper.classList.add('is-playing');\r\n return;\r\n }\r\n this.video[this.video.paused ? 'play' : 'pause']();\r\n this.video.paused ? this.wrapper.classList.remove('is-playing') : this.wrapper.classList.add('is-playing');\r\n }\r\n handleProgress(timeDuration, circumference, circle, updateInterval) {\r\n let video = this.video;\r\n let skin = this.skin;\r\n clearInterval(updateInterval);\r\n let elapsed = 0;\r\n let prevTime = 0;\r\n if (skin === 'circle') {\r\n updateInterval = setInterval(() => {\r\n if (video.currentTime != prevTime) {\r\n elapsed = video.currentTime; // Update if getCurrentTime was changed\r\n prevTime = video.currentTime;\r\n }\r\n let offset = circumference - elapsed / video.duration * circumference;\r\n circle.style.strokeDashoffset = '' + offset;\r\n if (video.paused)\r\n clearInterval(updateInterval);\r\n }, 20);\r\n let timeLeft = String((video.duration - video.currentTime) | 0).toHHMMSS();\r\n if (timeLeft != '0')\r\n timeDuration.innerHTML = timeLeft;\r\n return updateInterval;\r\n }\r\n }\r\n buildControls() {\r\n let skin = this.skin;\r\n let html = [];\r\n if (skin === 'default') {\r\n html.push('');\r\n html.push('
');\r\n html.push('
');\r\n html.push('
', '
', '
', '', ' / ', '', '
', '
', '
');\r\n html.push('
');\r\n }\r\n else if (skin === 'circle') {\r\n html.push('', '', '');\r\n }\r\n return html.join('');\r\n }\r\n updateButton(toggle) {\r\n let icon = this.video.paused ? 'tgico-play' : 'tgico-pause';\r\n Array.from(toggle).forEach((button) => {\r\n button.classList.remove('tgico-play', 'tgico-pause');\r\n button.classList.add(icon);\r\n });\r\n }\r\n toggleFullScreen(fullScreenButton) {\r\n // alternative standard method\r\n let player = this.wrapper;\r\n // @ts-ignore\r\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {\r\n player.classList.add('ckin__fullscreen');\r\n if (player.requestFullscreen) {\r\n player.requestFullscreen();\r\n // @ts-ignore\r\n }\r\n else if (player.mozRequestFullScreen) {\r\n // @ts-ignore\r\n player.mozRequestFullScreen(); // Firefox\r\n // @ts-ignore\r\n }\r\n else if (player.webkitRequestFullscreen) {\r\n // @ts-ignore\r\n player.webkitRequestFullscreen(); // Chrome and Safari\r\n // @ts-ignore\r\n }\r\n else if (player.msRequestFullscreen) {\r\n // @ts-ignore\r\n player.msRequestFullscreen();\r\n }\r\n fullScreenButton.classList.remove('tgico-fullscreen');\r\n fullScreenButton.classList.add('tgico-smallscreen');\r\n fullScreenButton.setAttribute('title', 'Exit Full Screen');\r\n }\r\n else {\r\n player.classList.remove('ckin__fullscreen');\r\n // @ts-ignore\r\n if (document.cancelFullScreen) {\r\n // @ts-ignore\r\n document.cancelFullScreen();\r\n // @ts-ignore\r\n }\r\n else if (document.mozCancelFullScreen) {\r\n // @ts-ignore\r\n document.mozCancelFullScreen();\r\n // @ts-ignore\r\n }\r\n else if (document.webkitCancelFullScreen) {\r\n // @ts-ignore\r\n document.webkitCancelFullScreen();\r\n // @ts-ignore\r\n }\r\n else if (document.msExitFullscreen) {\r\n // @ts-ignore\r\n document.msExitFullscreen();\r\n }\r\n fullScreenButton.classList.remove('tgico-smallscreen');\r\n fullScreenButton.classList.add('tgico-fullscreen');\r\n fullScreenButton.setAttribute('title', 'Full Screen');\r\n }\r\n }\r\n onFullScreen() {\r\n // @ts-ignore\r\n let isFullscreenNow = document.webkitFullscreenElement !== null;\r\n if (!isFullscreenNow) {\r\n this.wrapper.classList.remove('ckin__fullscreen');\r\n }\r\n else {\r\n }\r\n }\r\n}\r\nexports.default = VideoPlayer;\r\n" }, { - "id": 38, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appStickersManager.ts", - "name": "./src/lib/appManagers/appStickersManager.ts", - "index": 76, - "index2": 65, - "size": 3996, + "id": 40, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appWebpManager.ts", + "name": "./src/lib/appManagers/appWebpManager.ts", + "index": 66, + "index2": 58, + "size": 4652, "cacheable": true, "built": true, "optional": false, @@ -5148,44 +5085,53 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "issuerId": 27, + "issuerName": "./src/components/wrappers.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", + "id": 12, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "name": "./src/lib/appManagers/appImManager.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 + } + }, + { + "id": 27, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", + "name": "./src/components/wrappers.ts", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 45, + "building": 1068, + "dependencies": 99 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 100, + "building": 341 }, "failed": false, "errors": 0, @@ -5193,31 +5139,22 @@ "assets": [], "reasons": [ { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", + "moduleId": 27, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\wrappers.ts", "module": "./src/components/wrappers.ts", "moduleName": "./src/components/wrappers.ts", "type": "cjs require", - "userRequest": "../lib/appManagers/appStickersManager", - "loc": "18:45-93" - }, - { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", - "type": "cjs require", - "userRequest": "./appManagers/appStickersManager", - "loc": "17:45-88" + "userRequest": "../lib/appManagers/appWebpManager", + "loc": "31:41-85" }, { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", + "moduleId": 71, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", "module": "./src/components/emoticonsDropdown.ts", "moduleName": "./src/components/emoticonsDropdown.ts", "type": "cjs require", - "userRequest": "../lib/appManagers/appStickersManager", - "loc": "20:45-93" + "userRequest": "../lib/appManagers/appWebpManager", + "loc": "26:41-85" } ], "usedExports": true, @@ -5225,16 +5162,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst storage_1 = __importDefault(require(\"../storage\"));\nconst apiManager_1 = __importDefault(require(\"../mtproto/apiManager\"));\nconst apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\nclass appStickersManager {\n constructor() {\n this.documents = {};\n this.stickerSets = {};\n storage_1.default.get('stickerSets').then((sets) => {\n if (sets) {\n this.stickerSets = sets;\n }\n });\n }\n saveSticker(doc) {\n /* Object.keys(doc).forEach(key => {\n if(doc[key] instanceof Uint8Array) {\n doc[key] = Array.from(doc[key]);\n }\n }); */\n doc.file_reference = Array.from(doc.file_reference);\n this.documents[doc.id] = doc;\n }\n getSticker(fileID) {\n return this.documents[fileID];\n }\n getStickerSet(set) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.stickerSets[set.id])\n return this.stickerSets[set.id];\n let promise = apiManager_1.default.invokeApi('messages.getStickerSet', {\n stickerset: {\n _: 'inputStickerSetID',\n id: set.id,\n access_hash: set.access_hash\n }\n });\n let res = yield promise;\n let stickerSet = res;\n this.saveStickerSet(stickerSet);\n return stickerSet;\n });\n }\n saveStickerSet(res) {\n return __awaiter(this, void 0, void 0, function* () {\n let id = res.set.id;\n //console.log('stickers save set', res);\n this.stickerSets[id] = {\n set: res.set,\n packs: res.packs,\n documents: res.documents\n };\n res.documents.forEach(this.saveSticker.bind(this));\n //console.log('stickers wrote', this.stickerSets);\n yield storage_1.default.set({\n stickerSets: this.stickerSets\n });\n /* AppStorage.get('stickerSets').then((sets: any) => {\n this.stickerSets = sets;\n console.log('stickers got', this.stickerSets);\n }); */\n });\n }\n getStickerSetThumb(stickerSet) {\n return __awaiter(this, void 0, void 0, function* () {\n let thumb = stickerSet.thumb;\n let dcID = stickerSet.thumb_dc_id;\n let promise = apiFileManager_1.default.downloadSmallFile({\n _: 'inputStickerSetThumb',\n stickerset: {\n _: 'inputStickerSetID',\n id: stickerSet.id,\n access_hash: stickerSet.access_hash\n },\n volume_id: thumb.location.volume_id,\n local_id: thumb.location.local_id\n }, { dcID: dcID });\n return yield promise;\n });\n }\n cleanup() {\n return __awaiter(this, void 0, void 0, function* () {\n yield storage_1.default.remove('stickerSets');\n });\n }\n}\nexports.default = new appStickersManager();\n" + "depth": 4, + "source": "\"use strict\";\r\n// @ts-ignore\r\n//import createWorker from 'offscreen-canvas/create-worker';\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass AppWebpManager {\r\n constructor() {\r\n //let canvas = document.createElement('canvas');\r\n //console.log('got message from worker:', canvas.toDataURL());\r\n /* this.worker = createWorker(canvas, '/webp.bundle.js', (e: any) => {\r\n // Messages from the worker\r\n console.log('got message from worker:', e, canvas.toDataURL());\r\n }); */\r\n this.webpMachine = null;\r\n this.queue = [];\r\n //public worker: any;\r\n this.webpSupport = null;\r\n this.webpSupported().then(res => {\r\n });\r\n }\r\n loadWebpHero() {\r\n if (this.loaded)\r\n return this.loaded;\r\n this.loaded = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\r\n let res = yield this.webpSupported();\r\n if (!res) {\r\n window.webpLoaded = () => {\r\n console.log('webpHero loaded');\r\n this.webpMachine = new window.WebpMachine();\r\n resolve();\r\n };\r\n let sc = document.createElement('script');\r\n sc.src = 'npm.webp-hero.chunk.js';\r\n sc.async = true;\r\n sc.onload = window.webpLoaded;\r\n document.body.appendChild(sc);\r\n }\r\n else {\r\n resolve();\r\n }\r\n }));\r\n }\r\n convert(bytes) {\r\n return this.webpMachine.decode(bytes);\r\n //return this.worker.post({message: 'webpBytes', bytes});\r\n }\r\n processQueue() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.busyPromise)\r\n return;\r\n this.busyPromise = Promise.resolve('');\r\n let { img, bytes, callback } = this.queue.pop();\r\n if (!this.loaded) {\r\n this.loadWebpHero();\r\n }\r\n yield this.loaded;\r\n this.busyPromise = this.convert(bytes);\r\n let url = yield this.busyPromise;\r\n let imgTemp = new Image();\r\n imgTemp.src = url;\r\n imgTemp.onload = () => {\r\n img.src = imgTemp.src;\r\n };\r\n callback(url);\r\n this.busyPromise = null;\r\n if (this.queue.length) {\r\n this.processQueue();\r\n }\r\n });\r\n }\r\n webpSupported() {\r\n if (this.webpSupport)\r\n return this.webpSupport;\r\n return this.webpSupport = new Promise((resolve, reject) => {\r\n var webP = new Image();\r\n webP.src = 'data:image/webp;base64,UklGRi4AAABXRUJQVlA4TCEAAAAvAUAAEB8wAiMw' +\r\n 'AgSSNtse/cXjxyCCmrYNWPwmHRH9jwMA';\r\n webP.onload = webP.onerror = () => {\r\n resolve(webP.height === 2);\r\n };\r\n });\r\n }\r\n polyfillImage(img, blob) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n /* console.log('polyfillImage', this);\r\n return this.webpMachine.polyfillImage(image); */\r\n //if(await this.webpMachine.webpSupport) {\r\n if (yield this.webpSupport) {\r\n let url = URL.createObjectURL(blob);\r\n img.src = url;\r\n return url;\r\n }\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.addEventListener('loadend', (e) => {\r\n // @ts-ignore\r\n let bytes = new Uint8Array(e.srcElement.result);\r\n this.queue.push({ bytes, img, callback: resolve });\r\n this.processQueue();\r\n });\r\n reader.readAsArrayBuffer(blob);\r\n });\r\n });\r\n }\r\n}\r\nexports.default = new AppWebpManager();\r\n" }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", - "index": 21, - "index2": 82, - "size": 9564, + "id": 41, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\appSearch.ts", + "name": "./src/components/appSearch.ts", + "index": 67, + "index2": 60, + "size": 9060, "cacheable": true, "built": true, "optional": false, @@ -5242,24 +5179,54 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "issuerId": 52, - "issuerName": "./src/index.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "issuerId": 38, + "issuerName": "./src/lib/appManagers/appSidebarRight.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 + } + }, + { + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", + "profile": { + "factory": 842, + "building": 0, + "dependencies": 1062 + } + }, + { + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 + } + }, + { + "id": 38, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "name": "./src/lib/appManagers/appSidebarRight.ts", + "profile": { + "factory": 576, + "building": 856, + "dependencies": 834 } } ], "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 + "factory": 328, + "building": 222, + "dependencies": 1 }, "failed": false, "errors": 0, @@ -5267,22 +5234,22 @@ "assets": [], "reasons": [ { - "moduleId": 52, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", + "moduleId": 38, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts", + "module": "./src/lib/appManagers/appSidebarRight.ts", + "moduleName": "./src/lib/appManagers/appSidebarRight.ts", "type": "cjs require", - "userRequest": "./components/pageSignIn", - "loc": "71:57-91" + "userRequest": "../../components/appSearch", + "loc": "27:33-70" }, { - "moduleId": 77, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "module": "./src/components/pageAuthCode.ts", - "moduleName": "./src/components/pageAuthCode.ts", + "moduleId": 42, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", + "module": "./src/lib/appManagers/appSidebarLeft.ts", + "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", "type": "cjs require", - "userRequest": "./pageSignIn", - "loc": "15:37-60" + "userRequest": "../../components/appSearch", + "loc": "19:33-70" } ], "usedExports": true, @@ -5290,16 +5257,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 1, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst misc_1 = require(\"./misc\");\nconst scrollable_1 = __importDefault(require(\"./scrollable\"));\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\nconst Config = __importStar(require(\"../lib/config\"));\nconst utils_1 = require(\"../lib/utils\");\nconst pageAuthCode_1 = __importDefault(require(\"./pageAuthCode\"));\nconst apiManager_1 = __importDefault(require(\"../lib/mtproto/apiManager\"));\nlet installed = false;\n//import _countries from '../countries_pretty.json';\nexports.default = () => {\n //export default () => import('../countries.json').then(_countries => {\n //let pageAuthCode = await import('./pageAuthCode');\n //Array.from(document.querySelectorAll('body > .whole:not(.page-authCode)')).forEach(div => div.style.display = 'none');\n const pageEl = document.body.getElementsByClassName('page-sign')[0];\n pageEl.style.display = '';\n let btnNext = pageEl.querySelector('button');\n if (installed) {\n btnNext.textContent = 'NEXT';\n btnNext.removeAttribute('disabled');\n return;\n }\n installed = true;\n //const countries: Country[] = _countries.default.filter(c => c.emoji);\n const countries = Config.Countries.filter(c => c.emoji);\n let lastCountrySelected = '';\n var selectCountryCode = pageEl.querySelector('input[name=\"countryCode\"]');\n var parent = selectCountryCode.parentElement;\n var wrapper = document.createElement('div');\n wrapper.classList.add('select-wrapper', 'z-depth-4');\n var list = document.createElement('ul');\n wrapper.appendChild(list);\n //let wrapperScroll = OverlayScrollbars(wrapper, (window as any).scrollbarOptions);\n let scroll = new scrollable_1.default(wrapper);\n let initedSelect = false;\n selectCountryCode.addEventListener('focus', function (e) {\n /* this.removeAttribute('readonly'); */\n if (!initedSelect) {\n countries.forEach((c) => {\n initedSelect = true;\n /* let unified = unifiedCountryCodeEmoji(c.code);\n let emoji = unified.split('-').reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), ''); */\n //let emoji = countryCodeEmoji(c.code);\n let emoji = c.emoji;\n let liArr = [];\n c.phoneCode.split(' and ').forEach((phoneCode) => {\n let li = document.createElement('li');\n var spanEmoji = document.createElement('span');\n /* spanEmoji.innerHTML = countryCodeEmoji(c.code); */\n //spanEmoji.classList.add('emoji-outer', 'emoji-sizer');\n //spanEmoji.innerHTML = ``;\n let kek = richtextprocessor_1.RichTextProcessor.wrapRichText(emoji);\n //console.log(c.name, emoji, kek, spanEmoji.innerHTML);\n li.appendChild(spanEmoji);\n spanEmoji.outerHTML = kek;\n li.append(c.name);\n var span = document.createElement('span');\n span.classList.add('phone-code');\n span.innerText = '+' + phoneCode;\n li.appendChild(span);\n liArr.push(li);\n list.append(li);\n });\n c.li = liArr;\n });\n list.addEventListener('mousedown', function (e) {\n let target = e.target;\n if (target.tagName != 'LI')\n target = utils_1.findUpTag(target, 'LI');\n let countryName = target.childNodes[1].textContent; //target.innerText.split('\\n').shift();\n let phoneCode = target.querySelector('.phone-code').innerText;\n selectCountryCode.value = countryName;\n lastCountrySelected = countryName;\n telEl.value = phoneCode;\n setTimeout(() => telEl.focus(), 0);\n console.log('clicked', e, countryName, phoneCode);\n });\n }\n parent.appendChild(wrapper);\n } /* , {once: true} */);\n selectCountryCode.addEventListener('blur', function (e) {\n parent.removeChild(wrapper);\n e.cancelBubble = true;\n }, { capture: true });\n selectCountryCode.addEventListener('keyup', function (e) {\n if (e.ctrlKey || e.key == 'Control')\n return false;\n //let i = new RegExp('^' + this.value, 'i');\n let _value = this.value.toLowerCase();\n let matches = [];\n countries.forEach((c) => {\n let good = c.name.toLowerCase().indexOf(_value) !== -1 /* == 0 */; //i.test(c.name);\n c.li.forEach(li => li.style.display = good ? '' : 'none');\n if (good)\n matches.push(c);\n });\n if (matches.length == 1 && matches[0].li.length == 1) {\n if (matches[0].name == lastCountrySelected)\n return false;\n console.log('clicking', matches[0]);\n var clickEvent = document.createEvent('MouseEvents');\n clickEvent.initEvent('mousedown', true, true);\n matches[0].li[0].dispatchEvent(clickEvent);\n return false;\n }\n else if (matches.length == 0) {\n countries.forEach((c) => {\n c.li.forEach(li => li.style.display = '');\n });\n }\n });\n let arrowDown = pageEl.querySelector('.arrow-down');\n arrowDown.addEventListener('mousedown', function (e) {\n e.cancelBubble = true;\n e.preventDefault();\n if (selectCountryCode.matches(':focus'))\n selectCountryCode.blur();\n else\n selectCountryCode.focus();\n });\n let sortedCountries = countries.slice().sort((a, b) => b.phoneCode.length - a.phoneCode.length);\n let telEl = pageEl.querySelector('input[name=\"phone\"]');\n telEl.addEventListener('input', function (e) {\n this.classList.remove('error');\n let { formatted, country } = misc_1.formatPhoneNumber(this.value);\n this.value = formatted ? '+' + formatted : '';\n console.log(formatted, country);\n let countryName = country ? country.name : '' /* 'Unknown' */;\n if (countryName != selectCountryCode.value) {\n selectCountryCode.value = countryName;\n lastCountrySelected = countryName;\n }\n if (country && (this.value.length - 1) >= (country.pattern ? country.pattern.length : 9)) {\n btnNext.style.display = '';\n }\n else {\n btnNext.style.display = 'none';\n }\n });\n telEl.addEventListener('keypress', function (e) {\n if (this.value.length >= 9 && e.key == 'Enter') {\n return btnNext.click();\n }\n else if (/\\D/.test(e.key)) {\n e.preventDefault();\n return false;\n }\n });\n /* telEl.addEventListener('focus', function(this: typeof telEl, e) {\n this.removeAttribute('readonly'); // fix autocomplete\n });*/\n /* authorizer.auth(2);\n networkerFactory.startAll(); */\n btnNext.addEventListener('click', function (e) {\n this.setAttribute('disabled', 'true');\n this.textContent = 'PLEASE WAIT...';\n misc_1.putPreloader(this);\n //this.innerHTML = 'PLEASE WAIT...';\n let phone_number = telEl.value;\n apiManager_1.default.invokeApi('auth.sendCode', {\n /* flags: 0, */\n phone_number: phone_number,\n api_id: Config.App.id,\n api_hash: Config.App.hash,\n settings: {\n _: 'codeSettings',\n flags: 0\n }\n /* lang_code: navigator.language || 'en' */\n }).then((code) => {\n console.log('got code', code);\n pageEl.style.display = 'none';\n // @ts-ignore\n pageAuthCode_1.default(Object.assign(code, { phone_number: phone_number }));\n }).catch(err => {\n this.removeAttribute('disabled');\n this.innerText = 'NEXT';\n switch (err.type) {\n case 'PHONE_NUMBER_INVALID':\n telEl.classList.add('error');\n break;\n default:\n this.innerText = err.type;\n break;\n }\n });\n });\n let tryAgain = () => {\n misc_1.getNearestDc().then((nearestDcResult) => {\n let country = countries.find((c) => c.code == nearestDcResult.country);\n if (country) {\n if (!selectCountryCode.value.length && !telEl.value.length) {\n selectCountryCode.value = country.name;\n lastCountrySelected = country.name;\n telEl.value = '+' + country.phoneCode.split(' and ').shift();\n }\n }\n return console.log('woohoo', nearestDcResult, country);\n }); //.catch(tryAgain);\n };\n tryAgain();\n};\n" + "depth": 4, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst appDialogsManager_1 = __importDefault(require(\"../lib/appManagers/appDialogsManager\"));\r\nconst scrollable_1 = __importDefault(require(\"./scrollable\"));\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesIDsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../lib/appManagers/appUsersManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"../lib/appManagers/appPeersManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst misc_1 = require(\"./misc\");\r\nclass SearchGroup {\r\n constructor(name, type) {\r\n this.name = name;\r\n this.type = type;\r\n this.list = document.createElement('ul');\r\n this.container = document.createElement('div');\r\n this.nameEl = document.createElement('div');\r\n this.nameEl.classList.add('search-group__name');\r\n this.nameEl.innerText = name;\r\n this.container.classList.add('search-group');\r\n this.container.append(this.nameEl, this.list);\r\n this.container.style.display = 'none';\r\n appDialogsManager_1.default.setListClickListener(this.list);\r\n }\r\n clear() {\r\n this.container.style.display = 'none';\r\n this.list.innerHTML = '';\r\n }\r\n setActive() {\r\n this.container.style.display = '';\r\n }\r\n}\r\nexports.SearchGroup = SearchGroup;\r\nclass AppSearch {\r\n constructor(container, searchInput, searchGroups) {\r\n this.container = container;\r\n this.searchInput = searchInput;\r\n this.searchGroups = searchGroups;\r\n this.minMsgID = 0;\r\n this.loadedCount = 0;\r\n this.foundCount = 0;\r\n this.offsetRate = 0;\r\n this.searchPromise = null;\r\n this.searchTimeout = 0;\r\n this.query = '';\r\n this.listsContainer = null;\r\n this.peerID = 0; // 0 - means global\r\n this.scrollable = new scrollable_1.default(this.container);\r\n this.listsContainer = this.scrollable.container;\r\n for (let i in this.searchGroups) {\r\n this.listsContainer.append(this.searchGroups[i].container);\r\n }\r\n this.searchInput.addEventListener('input', (e) => {\r\n let value = this.searchInput.value;\r\n if (!value.trim()) {\r\n //this.peerID = 0;\r\n return;\r\n }\r\n this.query = value;\r\n this.reset(false);\r\n this.searchMore();\r\n });\r\n this.scrollable.onScrolledBottom = () => {\r\n if (!this.query.trim())\r\n return;\r\n if (!this.searchTimeout) {\r\n this.searchTimeout = setTimeout(() => {\r\n this.searchMore();\r\n this.searchTimeout = 0;\r\n }, 0);\r\n }\r\n };\r\n }\r\n reset(all = true) {\r\n if (all) {\r\n this.searchInput.value = '';\r\n this.query = '';\r\n this.peerID = 0;\r\n }\r\n this.minMsgID = 0;\r\n this.loadedCount = 0;\r\n this.foundCount = 0;\r\n this.offsetRate = 0;\r\n for (let i in this.searchGroups) {\r\n this.searchGroups[i].clear();\r\n }\r\n this.searchPromise = null;\r\n }\r\n beginSearch(peerID) {\r\n if (peerID) {\r\n this.peerID = peerID;\r\n }\r\n this.searchInput.focus();\r\n }\r\n searchMore() {\r\n if (this.searchPromise)\r\n return this.searchPromise;\r\n let query = this.query;\r\n if (!query.trim())\r\n return;\r\n if (this.loadedCount != 0 && this.loadedCount >= this.foundCount) {\r\n return Promise.resolve();\r\n }\r\n let maxID = appMessagesIDsManager_1.default.getMessageIDInfo(this.minMsgID)[0];\r\n if (!this.peerID && !maxID) {\r\n appUsersManager_1.default.searchContacts(query, 20).then((contacts) => {\r\n if (this.searchInput.value != query) {\r\n return;\r\n }\r\n ///////this.log('input search contacts result:', contacts);\r\n let setResults = (results, group, showMembersCount = false) => {\r\n results.forEach((inputPeer) => {\r\n let peerID = appPeersManager_1.default.getPeerID(inputPeer);\r\n let peer = appPeersManager_1.default.getPeer(peerID);\r\n let originalDialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n //////////this.log('contacts peer', peer);\r\n if (!originalDialog) {\r\n /////////this.log('no original dialog by peerID:', peerID);\r\n originalDialog = {\r\n peerID: peerID,\r\n pFlags: {},\r\n peer: peer\r\n };\r\n }\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(originalDialog, group.list, false);\r\n if (showMembersCount && (peer.participants_count || peer.participants)) {\r\n let regExp = new RegExp(`(${utils_1.escapeRegExp(query)})`, 'gi');\r\n dom.titleSpan.innerHTML = dom.titleSpan.innerHTML.replace(regExp, '$1');\r\n let isChannel = appPeersManager_1.default.isChannel(peerID) && !appPeersManager_1.default.isMegagroup(peerID);\r\n let participants_count = peer.participants_count || peer.participants.participants.length;\r\n let subtitle = utils_1.numberWithCommas(participants_count) + ' ' + (isChannel ? 'subscribers' : 'members');\r\n dom.lastMessageSpan.innerText = subtitle;\r\n }\r\n else {\r\n let username = appPeersManager_1.default.getPeerUsername(peerID);\r\n if (!username) {\r\n let user = appUsersManager_1.default.getUser(peerID);\r\n if (user && user.phone) {\r\n username = '+' + misc_1.formatPhoneNumber(user.phone).formatted;\r\n }\r\n }\r\n else {\r\n username = '@' + username;\r\n }\r\n dom.lastMessageSpan.innerHTML = '' + username + '';\r\n }\r\n });\r\n if (results.length)\r\n group.setActive();\r\n else\r\n group.clear();\r\n };\r\n setResults(contacts.my_results, this.searchGroups.contacts, true);\r\n setResults(contacts.results, this.searchGroups.globalContacts);\r\n });\r\n }\r\n return this.searchPromise = appMessagesManager_1.default.getSearch(this.peerID, query, null, maxID, 20, this.offsetRate).then(res => {\r\n this.searchPromise = null;\r\n if (this.searchInput.value != query) {\r\n return;\r\n }\r\n /////////this.log('input search result:', this.peerID, query, null, maxID, 20, res);\r\n let { count, history, next_rate } = res;\r\n if (history[0] == this.minMsgID) {\r\n history.shift();\r\n }\r\n let searchGroup = this.searchGroups['messages'];\r\n searchGroup.setActive();\r\n history.forEach((msgID) => {\r\n let message = appMessagesManager_1.default.getMessage(msgID);\r\n let originalDialog = appMessagesManager_1.default.getDialogByPeerID(message.peerID)[0];\r\n if (!originalDialog) {\r\n ////////this.log('no original dialog by message:', message);\r\n originalDialog = {\r\n peerID: message.peerID,\r\n pFlags: {},\r\n peer: message.to_id\r\n };\r\n }\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(originalDialog, searchGroup.list, false);\r\n appDialogsManager_1.default.setLastMessage(dialog, message, dom, query);\r\n });\r\n this.minMsgID = history[history.length - 1];\r\n this.offsetRate = next_rate;\r\n this.loadedCount += history.length;\r\n if (!this.foundCount) {\r\n this.foundCount = count;\r\n }\r\n }).catch(err => {\r\n console.error('search error', err);\r\n this.searchPromise = null;\r\n });\r\n }\r\n}\r\nexports.default = AppSearch;\r\n" }, { - "id": 41, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/passwordManager.ts", - "name": "./src/lib/mtproto/passwordManager.ts", - "index": 30, - "index2": 26, - "size": 13251, + "id": 42, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts", + "name": "./src/lib/appManagers/appSidebarLeft.ts", + "index": 68, + "index2": 62, + "size": 4740, "cacheable": true, "built": true, "optional": false, @@ -5307,54 +5274,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pagePassword.ts", - "issuerId": 84, - "issuerName": "./src/components/pagePassword.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "issuerId": 73, + "issuerName": "./src/lib/services.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "dependencies": 1062 } }, { - "id": 84, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pagePassword.ts", - "name": "./src/components/pagePassword.ts", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", "profile": { - "factory": 278, - "building": 994, - "dependencies": 0 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 1063, - "building": 53, - "dependencies": 1 + "factory": 576, + "building": 856, + "dependencies": 834 }, "failed": false, "errors": 0, @@ -5362,22 +5319,22 @@ "assets": [], "reasons": [ { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./passwordManager", - "loc": "16:42-70" + "userRequest": "./appSidebarLeft", + "loc": "20:41-68" }, { - "moduleId": 84, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pagePassword.ts", - "module": "./src/components/pagePassword.ts", - "moduleName": "./src/components/pagePassword.ts", + "moduleId": 73, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "module": "./src/lib/services.ts", + "moduleName": "./src/lib/services.ts", "type": "cjs require", - "userRequest": "../lib/mtproto/passwordManager", - "loc": "19:42-83" + "userRequest": "./appManagers/appSidebarLeft", + "loc": "20:41-80" } ], "usedExports": true, @@ -5385,16 +5342,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\nconst bin_utils_1 = require(\"../bin_utils\");\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\nconst leemon_1 = require(\"leemon\");\nclass PasswordManager {\n getState(options = {}) {\n return apiManager_1.default.invokeApi('account.getPassword', {}, options).then((result) => {\n return result;\n });\n }\n /* public updateSettings(state: any, settings: any) {\n var currentHashPromise;\n var newHashPromise;\n var params: any = {\n new_settings: {\n _: 'account.passwordInputSettings',\n flags: 0,\n hint: settings.hint || ''\n }\n };\n \n if(typeof settings.cur_password === 'string' &&\n settings.cur_password.length > 0) {\n currentHashPromise = this.makePasswordHash(state.current_salt, settings.cur_password);\n } else {\n currentHashPromise = Promise.resolve([]);\n }\n \n if (typeof settings.new_password === 'string' &&\n settings.new_password.length > 0) {\n var saltRandom = new Array(8);\n var newSalt = bufferConcat(state.new_salt, saltRandom);\n secureRandom.nextBytes(saltRandom);\n newHashPromise = this.makePasswordHash(newSalt, settings.new_password);\n params.new_settings.new_salt = newSalt;\n params.new_settings.flags |= 1;\n } else {\n if(typeof settings.new_password === 'string') {\n params.new_settings.flags |= 1;\n params.new_settings.new_salt = [];\n }\n newHashPromise = Promise.resolve([]);\n }\n \n if(typeof settings.email === 'string') {\n params.new_settings.flags |= 2;\n params.new_settings.email = settings.email || '';\n }\n \n return Promise.all([currentHashPromise, newHashPromise]).then((hashes) => {\n params.current_password_hash = hashes[0];\n params.new_settings.new_password_hash = hashes[1];\n \n return apiManager.invokeApi('account.updatePasswordSettings', params);\n });\n } */\n check(state, password, options = {}) {\n return this.computeCheck(password, state).then((inputCheckPassword) => {\n return apiManager_1.default.invokeApi('auth.checkPassword', {\n password: inputCheckPassword\n }, options);\n });\n }\n requestRecovery(options = {}) {\n return apiManager_1.default.invokeApi('auth.requestPasswordRecovery', {}, options);\n }\n recover(code, options = {}) {\n return apiManager_1.default.invokeApi('auth.recoverPassword', {\n code: code\n }, options);\n }\n /* public makePasswordHash(salt: any, password: any) {\n var passwordUTF8 = unescape(encodeURIComponent(password));\n \n var buffer = new ArrayBuffer(passwordUTF8.length);\n var byteView = new Uint8Array(buffer);\n for(var i = 0, len = passwordUTF8.length; i < len; i++) {\n byteView[i] = passwordUTF8.charCodeAt(i);\n }\n \n buffer = bufferConcat(bufferConcat(salt, byteView), salt);\n \n return CryptoWorker.sha256Hash(buffer);\n } */\n makePasswordHash(password, client_salt, server_salt) {\n var passwordUTF8 = unescape(encodeURIComponent(password));\n // @ts-ignore\n const textEncoder = new TextEncoder(\"utf-8\");\n const passwordBuffer = textEncoder.encode(passwordUTF8);\n // right\n let buffer = bin_utils_1.bufferConcats(client_salt, passwordBuffer, client_salt);\n return cryptoworker_1.default.sha256Hash(buffer).then((buffer) => {\n console.log('encoded 1', bin_utils_1.bytesToHex(new Uint8Array(buffer)));\n buffer = bin_utils_1.bufferConcats(server_salt, buffer, server_salt);\n return cryptoworker_1.default.sha256Hash(buffer).then((buffer) => {\n console.log('encoded 2', buffer, bin_utils_1.bytesToHex(new Uint8Array(buffer)));\n return cryptoworker_1.default.pbkdf2(new Uint8Array(buffer), client_salt, 100000).then((hash) => {\n console.log('encoded 3', hash, bin_utils_1.bytesToHex(new Uint8Array(hash)));\n hash = bin_utils_1.bufferConcats(server_salt, hash, server_salt);\n return cryptoworker_1.default.sha256Hash(hash).then((buffer) => {\n console.log('got password hash:', buffer, bin_utils_1.bytesToHex(new Uint8Array(buffer)));\n return buffer;\n });\n });\n });\n });\n }\n computeCheck(password, state) {\n return __awaiter(this, void 0, void 0, function* () {\n let algo = state.current_algo;\n let p = leemon_1.str2bigInt(bin_utils_1.bytesToHex(algo.p), 16);\n let B = leemon_1.str2bigInt(bin_utils_1.bytesToHex(state.srp_B), 16);\n let g = leemon_1.int2bigInt(algo.g, 32, 256);\n console.log('p', leemon_1.bigInt2str(p, 16));\n console.log('B', leemon_1.bigInt2str(B, 16));\n /* if(B.compareTo(BigInteger.ZERO) < 0) {\n console.error('srp_B < 0')\n }\n \n if(B.compareTo(p) <= 0) {\n console.error('srp_B <= p');\n } */\n /* let check_prime_and_good = (bytes: any, g: number) => {\n let good_prime = 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b';\n \n if(bytesToHex(bytes) == good_prime && [3, 4, 5, 7].indexOf(g) !== -1) {\n return true;\n }\n \n // TO-DO check_prime_and_good_check\n }; */\n //check_prime_and_good(algo.p, g);\n let pw_hash = yield this.makePasswordHash(password, new Uint8Array(algo.salt1), new Uint8Array(algo.salt2));\n let x = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(pw_hash)), 16);\n console.warn('computed pw_hash:', pw_hash, x, bin_utils_1.bytesToHex(new Uint8Array(pw_hash)));\n var padArray = function (arr, len, fill = 0) {\n return Array(len).fill(fill).concat(arr).slice(-len);\n };\n let pForHash = padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(p, 16)), 256);\n let gForHash = padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(g, 16)), 256); // like uint8array\n let b_for_hash = padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(B, 16)), 256);\n console.log(bin_utils_1.bytesToHex(pForHash));\n console.log(bin_utils_1.bytesToHex(gForHash));\n console.log(bin_utils_1.bytesToHex(b_for_hash));\n let g_x = leemon_1.powMod(g, x, p);\n console.log('g_x', leemon_1.bigInt2str(g_x, 16));\n let k = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(pForHash, gForHash));\n k = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(k)), 16);\n console.log('k', leemon_1.bigInt2str(k, 16));\n // kg_x = (k * g_x) % p\n let kg_x = leemon_1.mod(leemon_1.mult(k, g_x), p);\n // good\n console.log('kg_x', leemon_1.bigInt2str(kg_x, 16));\n let is_good_mod_exp_first = (modexp, prime) => {\n let diff = leemon_1.sub(prime, modexp);\n let min_diff_bits_count = 2048 - 64;\n let max_mod_exp_size = 256;\n if (leemon_1.negative(diff) ||\n leemon_1.bitSize(diff) < min_diff_bits_count ||\n leemon_1.bitSize(modexp) < min_diff_bits_count ||\n Math.floor((leemon_1.bitSize(modexp) + 7) / 8) > max_mod_exp_size)\n return false;\n return true;\n };\n let generate_and_check_random = () => __awaiter(this, void 0, void 0, function* () {\n //let random_size = 256;\n while (true) {\n /* let a = addPadding([], random_size, false, true);\n a = str2bigInt(bytesToHex(a), 16); */\n //let a = randBigInt(random_size, 1);\n let a = leemon_1.str2bigInt(bin_utils_1.bytesToHex(state.secure_random), 16);\n /* console.log('a', bigInt2str(a, 16));\n break; */\n let A = leemon_1.powMod(g, a, p);\n //console.log('A', bigInt2str(A, 16));\n if (is_good_mod_exp_first(A, p)) {\n // a_for_hash = big_num_for_hash(A)\n let a_for_hash = bin_utils_1.bytesFromHex(leemon_1.bigInt2str(A, 16));\n let s = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(new Uint8Array(a_for_hash), new Uint8Array(b_for_hash)));\n let u = leemon_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(s)), 16);\n //if(u > 0)\n if (!leemon_1.isZero(u) && !leemon_1.negative(u))\n return { a, a_for_hash, u };\n }\n }\n });\n let { a, a_for_hash, u } = yield generate_and_check_random();\n console.log('a', leemon_1.bigInt2str(a, 16));\n console.log('a_for_hash', bin_utils_1.bytesToHex(a_for_hash));\n console.log('u', leemon_1.bigInt2str(u, 16));\n // g_b = (B - kg_x) % p\n console.log('B - kg_x', leemon_1.bigInt2str(leemon_1.sub(B, kg_x), 16));\n //let g_b = mod(sub(B, kg_x), p);\n /* let g_b = sub(B, kg_x);\n if(negative(g_b)) g_b = add(g_b, p);\n else g_b = mod(g_b, p); */\n /* let g_b; // g_b = sub(mod(B, p), kg_x);\n if(!negative(sub(B, kg_x))) g_b = sub(mod(B, p), kg_x);\n else g_b = mod(sub(B, kg_x), p); */\n /* let lol = trim(sub(B, kg_x), 10);\n console.log('llalala', bigInt2str(lol, 16)); */\n let g_b;\n if (!leemon_1.greater(B, kg_x)) {\n console.log('negative');\n g_b = leemon_1.add(B, p);\n }\n else\n g_b = B;\n g_b = leemon_1.mod(leemon_1.sub(g_b, kg_x), p);\n //g_b = mod(g_b, p);\n //console.log('g_b', bigInt2str(g_b, 16));\n /* if(!is_good_mod_exp_first(g_b, p))\n throw new Error('bad g_b'); */\n let ux = leemon_1.mult(u, x);\n let a_ux = leemon_1.add(a, ux);\n let S = leemon_1.powMod(g_b, a_ux, p);\n let K = yield cryptoworker_1.default.sha256Hash(padArray(bin_utils_1.bytesFromHex(leemon_1.bigInt2str(S, 16)), 256));\n let h1 = yield cryptoworker_1.default.sha256Hash(pForHash);\n let h2 = yield cryptoworker_1.default.sha256Hash(gForHash);\n h1 = bin_utils_1.bytesXor(new Uint8Array(h1), new Uint8Array(h2));\n /* let buff = bufferConcat(h1, await CryptoWorker.sha256Hash(algo.salt1));\n buff = bufferConcat(buff, await CryptoWorker.sha256Hash(algo.salt2));\n buff = bufferConcat(buff, a_for_hash);\n buff = bufferConcat(buff, b_for_hash);\n buff = bufferConcat(buff, K); */\n let buff = bin_utils_1.bufferConcats(h1, yield cryptoworker_1.default.sha256Hash(algo.salt1), yield cryptoworker_1.default.sha256Hash(algo.salt2), a_for_hash, b_for_hash, K);\n let M1 = yield cryptoworker_1.default.sha256Hash(buff);\n let out = {\n _: 'inputCheckPasswordSRP',\n srp_id: state.srp_id,\n A: new Uint8Array(a_for_hash),\n M1: new Uint8Array(M1)\n };\n console.log('out', bin_utils_1.bytesToHex(out.A), bin_utils_1.bytesToHex(out.M1));\n return out;\n /* console.log(gForHash, pForHash, bForHash); */\n });\n }\n}\nexports.PasswordManager = PasswordManager;\nexports.default = new PasswordManager();\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n//import { logger } from \"../polyfill\";\r\nconst appDialogsManager_1 = __importDefault(require(\"./appDialogsManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\r\n//import apiManager from '../mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst appSearch_1 = __importStar(require(\"../../components/appSearch\"));\r\nclass AppSidebarLeft {\r\n constructor() {\r\n this.sidebarEl = document.getElementById('column-left');\r\n this.toolsBtn = this.sidebarEl.querySelector('.sidebar-tools-button');\r\n this.backBtn = this.sidebarEl.querySelector('.sidebar-back-button');\r\n this.searchContainer = this.sidebarEl.querySelector('#search-container');\r\n this.searchInput = document.getElementById('global-search');\r\n this.menuEl = this.toolsBtn.querySelector('.btn-menu');\r\n this.savedBtn = this.menuEl.querySelector('.menu-saved');\r\n this.archivedBtn = this.menuEl.querySelector('.menu-archive');\r\n this.logOutBtn = this.menuEl.querySelector('.menu-logout');\r\n this.archivedCount = this.archivedBtn.querySelector('.archived-count');\r\n //private log = logger('SL');\r\n this.globalSearch = new appSearch_1.default(this.searchContainer, this.searchInput, {\r\n contacts: new appSearch_1.SearchGroup('Contacts and Chats', 'contacts'),\r\n globalContacts: new appSearch_1.SearchGroup('Global Search', 'contacts'),\r\n messages: new appSearch_1.SearchGroup('Global Search', 'messages')\r\n });\r\n this.savedBtn.addEventListener('click', (e) => {\r\n ///////this.log('savedbtn click');\r\n setTimeout(() => {\r\n let dom = appDialogsManager_1.default.getDialogDom(appImManager_1.default.myID);\r\n appImManager_1.default.setPeer(appImManager_1.default.myID);\r\n }, 0);\r\n });\r\n this.archivedBtn.addEventListener('click', (e) => {\r\n appDialogsManager_1.default.chatsArchivedContainer.classList.add('active');\r\n this.toolsBtn.classList.remove('active');\r\n this.backBtn.classList.add('active');\r\n //this.toolsBtn.classList.remove('tgico-menu', 'btn-menu-toggle');\r\n //this.toolsBtn.classList.add('tgico-back');\r\n });\r\n this.logOutBtn.addEventListener('click', (e) => {\r\n mtprotoworker_1.default.logOut();\r\n });\r\n this.searchInput.addEventListener('focus', (e) => {\r\n this.toolsBtn.classList.remove('active');\r\n this.backBtn.classList.add('active');\r\n this.searchContainer.classList.add('active');\r\n /* if(!this.globalSearch.searchInput.value) {\r\n for(let i in this.globalSearch.searchGroups) {\r\n this.globalSearch.searchGroups[i].clear();\r\n }\r\n } */\r\n this.searchInput.addEventListener('blur', (e) => {\r\n if (!this.searchInput.value) {\r\n this.toolsBtn.classList.add('active');\r\n this.backBtn.classList.remove('active');\r\n this.searchContainer.classList.remove('active');\r\n this.backBtn.click();\r\n }\r\n /* this.peerID = 0;\r\n this.loadedCount = 0;\r\n this.minMsgID = 0; */\r\n }, { once: true });\r\n });\r\n this.backBtn.addEventListener('click', (e) => {\r\n appDialogsManager_1.default.chatsArchivedContainer.classList.remove('active');\r\n this.toolsBtn.classList.add('active');\r\n this.backBtn.classList.remove('active');\r\n this.searchContainer.classList.remove('active');\r\n this.globalSearch.reset();\r\n });\r\n utils_1.$rootScope.$on('dialogs_archived_unread', (e) => {\r\n this.archivedCount.innerText = '' + e.detail.count;\r\n });\r\n /* appUsersManager.getTopPeers().then(categories => {\r\n this.log('got top categories:', categories);\r\n }); */\r\n }\r\n}\r\nconst appSidebarLeft = new AppSidebarLeft();\r\nwindow.appSidebarLeft = appSidebarLeft;\r\nexports.default = appSidebarLeft;\r\n" }, { - "id": 42, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/transport.ts", - "name": "./src/lib/mtproto/transports/transport.ts", - "index": 36, - "index2": 27, - "size": 215, + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "name": "./src/index.ts", + "index": 0, + "index2": 73, + "size": 4590, "cacheable": true, "built": true, "optional": false, @@ -5402,53 +5359,13 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/http.ts", - "issuerId": 34, - "issuerName": "./src/lib/mtproto/transports/http.ts", - "issuerPath": [ - { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 41, - "building": 1632 - } - }, - { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", - "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 - } - }, - { - "id": 34, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/http.ts", - "name": "./src/lib/mtproto/transports/http.ts", - "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 - } - } - ], + "issuer": null, + "issuerId": null, + "issuerName": null, + "issuerPath": null, "profile": { - "factory": 31, - "building": 643 + "factory": 44, + "building": 1570 }, "failed": false, "errors": 0, @@ -5456,22 +5373,13 @@ "assets": [], "reasons": [ { - "moduleId": 34, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/http.ts", - "module": "./src/lib/mtproto/transports/http.ts", - "moduleName": "./src/lib/mtproto/transports/http.ts", - "type": "cjs require", - "userRequest": "./transport", - "loc": "6:36-58" - }, - { - "moduleId": 71, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/websocket.ts", - "module": "./src/lib/mtproto/transports/websocket.ts", - "moduleName": "./src/lib/mtproto/transports/websocket.ts", - "type": "cjs require", - "userRequest": "./transport", - "loc": "6:36-58" + "moduleId": null, + "moduleIdentifier": null, + "module": null, + "moduleName": null, + "type": "single entry", + "userRequest": "./src/index.ts", + "loc": "index" } ], "usedExports": true, @@ -5479,16 +5387,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass MTTransport {\n constructor(dcID, url) {\n this.dcID = dcID;\n this.url = url;\n }\n}\nexports.default = MTTransport;\n" + "depth": 0, + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nrequire(\"./materialize.scss\");\r\nrequire(\"./scss/style.scss\");\r\nrequire(\"./scss/tgico.scss\");\r\n//console.log('pineapples in my head');\r\n/* Promise.all([\r\n import('./components/pageIm'),\r\n import('./components/pageSignIn'),\r\n import('./components/misc'),\r\n import('./lib/storage')\r\n]).then(imports => {\r\n let [pageIm, pageSignIn, misc, AppStorage] = imports; */\r\ndocument.addEventListener('DOMContentLoaded', () => __awaiter(void 0, void 0, void 0, function* () {\r\n //let socket = new Socket(2);\r\n /* authorizer.auth(2).then((auth: any) => {\r\n console.log('authorized', auth);\r\n }, (error: any) => {\r\n console.log('Get networker error', error, error.stack);\r\n return Promise.reject(error);\r\n });\r\n \r\n return; */\r\n //console.time('get storage');\r\n let AppStorage = (yield Promise.resolve().then(() => __importStar(require('./lib/storage')))).default;\r\n let auth = yield AppStorage.get('user_auth');\r\n console.log('got auth:', auth);\r\n //console.timeEnd('get storage');\r\n let userID = auth.id || 0;\r\n if (!userID /* || 1 == 1 */) {\r\n (yield Promise.resolve().then(() => __importStar(require('./pages/pageSignIn')))).default.mount();\r\n /* setTimeout(async() => {\r\n (await import('./pages/pageAuthCode')).default.mount({\r\n \"_\": \"auth.sentCode\",\r\n \"pFlags\": {},\r\n \"flags\": 6,\r\n \"type\": {\r\n \"_\": \"auth.sentCodeTypeSms\",\r\n \"length\": 5\r\n },\r\n \"phone_code_hash\": \"98008787f0546e7419\",\r\n \"next_type\": {\r\n \"_\": \"auth.codeTypeCall\"\r\n },\r\n \"timeout\": 120,\r\n \"phone_number\": \"+380 50 914 45 04\"\r\n });\r\n }, 500); */\r\n /* setTimeout(async() => {\r\n (await import('./pages/pagePassword')).default.mount();\r\n }, 500); */\r\n /* setTimeout(async() => {\r\n (await import('./pages/pageSignUp')).default.mount({\r\n \"phone_code_hash\": \"98008787f0546e7419\",\r\n \"phone_number\": \"+380 50 914 45 04\"\r\n });\r\n }, 500); */\r\n }\r\n else {\r\n (yield Promise.resolve().then(() => __importStar(require('./pages/pageIm')))).default.mount();\r\n //getNearestDc();\r\n }\r\n let findUpClassName = (yield Promise.resolve().then(() => __importStar(require('./lib/utils')))).findUpClassName;\r\n Array.from(document.body.getElementsByClassName('popup-close')).forEach(el => {\r\n let popup = findUpClassName(el, 'popup');\r\n el.addEventListener('click', () => {\r\n popup.classList.remove('active');\r\n });\r\n });\r\n //MTProto.apiFileManager.uploadFile(photo).then(function (inputFile) {\r\n //console.log('uploaded smthn', inputFile);\r\n /* MTProto.apiManager.invokeApi('photos.uploadProfilePhoto', {\r\n file: inputFile,\r\n caption: '',\r\n geo_point: {_: 'inputGeoPointEmpty'}\r\n }).then(function (updateResult) {\r\n AppUsersManager.saveApiUsers(updateResult.users)\r\n MtpApiManager.getUserID().then(function (id) {\r\n AppPhotosManager.savePhoto(updateResult.photo, {\r\n user_id: id\r\n })\r\n ApiUpdatesManager.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateUserPhoto',\r\n user_id: id,\r\n date: tsNow(true),\r\n photo: AppUsersManager.getUser(id).photo,\r\n previous: true\r\n }\r\n })\r\n $scope.photo = {}\r\n })\r\n }) */\r\n //});\r\n}));\r\n//});\r\n" }, { - "id": 43, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/rsaKeysManager.ts", - "name": "./src/lib/mtproto/rsaKeysManager.ts", - "index": 41, - "index2": 35, - "size": 9367, + "id": 45, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\materialize.scss", + "name": "./src/materialize.scss", + "index": 1, + "index2": 3, + "size": 662, "cacheable": true, "built": true, "optional": false, @@ -5496,77 +5404,38 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "issuerId": 16, - "issuerName": "./src/lib/mtproto/mtproto.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "issuerId": 44, + "issuerName": "./src/index.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 - } - }, - { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", - "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 - } - }, - { - "id": 16, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "name": "./src/lib/mtproto/mtproto.ts", - "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 44, + "building": 1570 } } ], "profile": { - "factory": 820, - "building": 593, - "dependencies": 0 + "factory": 842, + "building": 0, + "dependencies": 1062 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ - { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", - "type": "cjs require", - "userRequest": "./rsaKeysManager", - "loc": "18:41-68" - }, { "moduleId": 44, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "module": "./src/lib/mtproto/authorizer.ts", - "moduleName": "./src/lib/mtproto/authorizer.ts", + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "module": "./src/index.ts", + "moduleName": "./src/index.ts", "type": "cjs require", - "userRequest": "./rsaKeysManager", - "loc": "18:41-68" + "userRequest": "./materialize.scss", + "loc": "19:0-29" } ], "usedExports": true, @@ -5574,16 +5443,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tl_utils_1 = require(\"../tl_utils\");\nconst bin_utils_1 = require(\"../bin_utils\");\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\nclass RSAKeysManager {\n constructor() {\n /**\n * Server public key, obtained from here: https://core.telegram.org/api/obtaining_api_id\n *\n *\n * -----BEGIN RSA PUBLIC KEY-----\n * MIIBCgKCAQEAwVACPi9w23mF3tBkdZz+zwrzKOaaQdr01vAbU4E1pvkfj4sqDsm6\n * lyDONS789sVoD/xCS9Y0hkkC3gtL1tSfTlgCMOOul9lcixlEKzwKENj1Yz/s7daS\n * an9tqw3bfUV/nqgbhGX81v/+7RFAEd+RwFnK7a+XYl9sluzHRyVVaTTveB2GazTw\n * Efzk2DWgkBluml8OREmvfraX3bkHZJTKX4EQSjBbbdJ2ZXIsRrYOXfaA+xayEGB+\n * 8hdlLmAjbCVfaigxX0CDqWeR1yFL9kwd9P0NsZRPsmoqVwMbMu7mStFai6aIhc3n\n * Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB\n * -----END RSA PUBLIC KEY-----\n *\n * -----BEGIN PUBLIC KEY-----\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAruw2yP/BCcsJliRoW5eB\n * VBVle9dtjJw+OYED160Wybum9SXtBBLXriwt4rROd9csv0t0OHCaTmRqBcQ0J8fx\n * hN6/cpR1GWgOZRUAiQxoMnlt0R93LCX/j1dnVa/gVbCjdSxpbrfY2g2L4frzjJvd\n * l84Kd9ORYjDEAyFnEA7dD556OptgLQQ2e2iVNq8NZLYTzLp5YpOdO1doK+ttrltg\n * gTCy5SrKeLoCPPbOgGsdxJxyz5KKcZnSLj16yE5HvJQn0CNpRdENvRUXe6tBP78O\n * 39oJ8BTHp9oIjd6XWXAsp2CvK45Ol8wFXGF710w9lwCGNbmNxNYhtIkdqfsEcwR5\n * JwIDAQAB\n * -----END PUBLIC KEY-----\n *\n * -----BEGIN PUBLIC KEY-----\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvfLHfYH2r9R70w8prHbl\n * Wt/nDkh+XkgpflqQVcnAfSuTtO05lNPspQmL8Y2XjVT4t8cT6xAkdgfmmvnvRPOO\n * KPi0OfJXoRVylFzAQG/j83u5K3kRLbae7fLccVhKZhY46lvsueI1hQdLgNV9n1cQ\n * 3TDS2pQOCtovG4eDl9wacrXOJTG2990VjgnIKNA0UMoP+KF03qzryqIt3oTvZq03\n * DyWdGK+AZjgBLaDKSnC6qD2cFY81UryRWOab8zKkWAnhw2kFpcqhI0jdV5QaSCEx\n * vnsjVaX0Y1N0870931/5Jb9ICe4nweZ9kSDF/gip3kWLG0o8XQpChDfyvsqB9OLV\n * /wIDAQAB\n * -----END PUBLIC KEY-----\n *\n * -----BEGIN PUBLIC KEY-----\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/ditzm+mPND6xkhzwFI\n * z6J/968CtkcSE/7Z2qAJiXbmZ3UDJPGrzqTDHkO30R8VeRM/Kz2f4nR05GIFiITl\n * 4bEjvpy7xqRDspJcCFIOcyXm8abVDhF+th6knSU0yLtNKuQVP6voMrnt9MV1X92L\n * GZQLgdHZbPQz0Z5qIpaKhdyA8DEvWWvSUwwc+yi1/gGaybwlzZwqXYoPOhwMebzK\n * Uk0xW14htcJrRrq+PXXQbRzTMynseCoPIoke0dtCodbA3qQxQovE16q9zz4Otv2k\n * 4j63cz53J+mhkVWAeWxVGI0lltJmWtEYK6er8VqqWot3nqmWMXogrgRLggv/Nbbo\n * oQIDAQAB\n * -----END PUBLIC KEY-----\n *\n * -----BEGIN PUBLIC KEY-----\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvmpxVY7ld/8DAjz6F6q0\n * 5shjg8/4p6047bn6/m8yPy1RBsvIyvuDuGnP/RzPEhzXQ9UJ5Ynmh2XJZgHoE9xb\n * nfxL5BXHplJhMtADXKM9bWB11PU1Eioc3+AXBB8QiNFBn2XI5UkO5hPhbb9mJpjA\n * 9Uhw8EdfqJP8QetVsI/xrCEbwEXe0xvifRLJbY08/Gp66KpQvy7g8w7VB8wlgePe\n * xW3pT13Ap6vuC+mQuJPyiHvSxjEKHgqePji9NP3tJUFQjcECqcm0yV7/2d0t/pbC\n * m+ZH1sadZspQCEPPrtbkQBlvHb4OLiIWPGHKSMeRFvp3IWcmdJqXahxLCUS1Eh6M\n * AQIDAQAB\n * -----END PUBLIC KEY-----\n *\n * Bytes can be got via\n * $ openssl rsa -pubin -in key.pub -text -noout\n */\n this.publisKeysHex = [{\n modulus: 'c150023e2f70db7985ded064759cfecf0af328e69a41daf4d6f01b538135a6f91f8f8b2a0ec9ba9720ce352efcf6c5680ffc424bd634864902de0b4bd6d49f4e580230e3ae97d95c8b19442b3c0a10d8f5633fecedd6926a7f6dab0ddb7d457f9ea81b8465fcd6fffeed114011df91c059caedaf97625f6c96ecc74725556934ef781d866b34f011fce4d835a090196e9a5f0e4449af7eb697ddb9076494ca5f81104a305b6dd27665722c46b60e5df680fb16b210607ef217652e60236c255f6a28315f4083a96791d7214bf64c1df4fd0db1944fb26a2a57031b32eee64ad15a8ba68885cde74a5bfc920f6abf59ba5c75506373e7130f9042da922179251f',\n exponent: '010001'\n }, {\n modulus: 'aeec36c8ffc109cb099624685b97815415657bd76d8c9c3e398103d7ad16c9bba6f525ed0412d7ae2c2de2b44e77d72cbf4b7438709a4e646a05c43427c7f184debf72947519680e651500890c6832796dd11f772c25ff8f576755afe055b0a3752c696eb7d8da0d8be1faf38c9bdd97ce0a77d3916230c4032167100edd0f9e7a3a9b602d04367b689536af0d64b613ccba7962939d3b57682beb6dae5b608130b2e52aca78ba023cf6ce806b1dc49c72cf928a7199d22e3d7ac84e47bc9427d0236945d10dbd15177bab413fbf0edfda09f014c7a7da088dde9759702ca760af2b8e4e97cc055c617bd74c3d97008635b98dc4d621b4891da9fb0473047927',\n exponent: '010001'\n }, {\n modulus: 'bdf2c77d81f6afd47bd30f29ac76e55adfe70e487e5e48297e5a9055c9c07d2b93b4ed3994d3eca5098bf18d978d54f8b7c713eb10247607e69af9ef44f38e28f8b439f257a11572945cc0406fe3f37bb92b79112db69eedf2dc71584a661638ea5becb9e23585074b80d57d9f5710dd30d2da940e0ada2f1b878397dc1a72b5ce2531b6f7dd158e09c828d03450ca0ff8a174deacebcaa22dde84ef66ad370f259d18af806638012da0ca4a70baa83d9c158f3552bc9158e69bf332a45809e1c36905a5caa12348dd57941a482131be7b2355a5f4635374f3bd3ddf5ff925bf4809ee27c1e67d9120c5fe08a9de458b1b4a3c5d0a428437f2beca81f4e2d5ff',\n exponent: '010001'\n }, {\n modulus: 'b3f762b739be98f343eb1921cf0148cfa27ff7af02b6471213fed9daa0098976e667750324f1abcea4c31e43b7d11f1579133f2b3d9fe27474e462058884e5e1b123be9cbbc6a443b2925c08520e7325e6f1a6d50e117eb61ea49d2534c8bb4d2ae4153fabe832b9edf4c5755fdd8b19940b81d1d96cf433d19e6a22968a85dc80f0312f596bd2530c1cfb28b5fe019ac9bc25cd9c2a5d8a0f3a1c0c79bcca524d315b5e21b5c26b46babe3d75d06d1cd33329ec782a0f22891ed1db42a1d6c0dea431428bc4d7aabdcf3e0eb6fda4e23eb7733e7727e9a1915580796c55188d2596d2665ad1182ba7abf15aaa5a8b779ea996317a20ae044b820bff35b6e8a1',\n exponent: '010001'\n }, {\n modulus: 'be6a71558ee577ff03023cfa17aab4e6c86383cff8a7ad38edb9fafe6f323f2d5106cbc8cafb83b869cffd1ccf121cd743d509e589e68765c96601e813dc5b9dfc4be415c7a6526132d0035ca33d6d6075d4f535122a1cdfe017041f1088d1419f65c8e5490ee613e16dbf662698c0f54870f0475fa893fc41eb55b08ff1ac211bc045ded31be27d12c96d8d3cfc6a7ae8aa50bf2ee0f30ed507cc2581e3dec56de94f5dc0a7abee0be990b893f2887bd2c6310a1e0a9e3e38bd34fded2541508dc102a9c9b4c95effd9dd2dfe96c29be647d6c69d66ca500843cfaed6e440196f1dbe0e2e22163c61ca48c79116fa77216726749a976a1c4b0944b5121e8c01',\n exponent: '010001'\n }];\n this.publicKeysParsed = {};\n this.prepared = false;\n this.preparePromise = null;\n }\n // prepareRsaKeys\n prepare() {\n if (this.preparePromise)\n return this.preparePromise;\n else if (this.prepared) {\n return Promise.resolve();\n }\n return this.preparePromise = Promise.all(this.publisKeysHex.map(keyParsed => {\n let RSAPublicKey = new tl_utils_1.TLSerialization();\n RSAPublicKey.storeBytes(bin_utils_1.bytesFromHex(keyParsed.modulus), 'n');\n RSAPublicKey.storeBytes(bin_utils_1.bytesFromHex(keyParsed.exponent), 'e');\n let buffer = RSAPublicKey.getBuffer();\n return cryptoworker_1.default.sha1Hash(buffer).then(hash => {\n let fingerprintBytes = bin_utils_1.bytesFromArrayBuffer(hash).slice(-8);\n fingerprintBytes.reverse();\n this.publicKeysParsed[bin_utils_1.bytesToHex(fingerprintBytes)] = {\n modulus: keyParsed.modulus,\n exponent: keyParsed.exponent\n };\n });\n })).then(() => {\n this.prepared = true;\n console.log('[MT] Prepared keys');\n this.preparePromise = null;\n });\n }\n // selectRsaKeyByFingerPrint\n select(fingerprints) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.prepare();\n var fingerprintHex, foundKey, i;\n for (i = 0; i < fingerprints.length; i++) {\n fingerprintHex = bin_utils_1.bigStringInt(fingerprints[i]).toString(16);\n if (fingerprintHex.length < 16) {\n fingerprintHex = new Array(16 - fingerprintHex.length).fill('0').join('') + fingerprintHex;\n }\n console.log(fingerprintHex, this.publicKeysParsed);\n if (foundKey = this.publicKeysParsed[fingerprintHex]) {\n return Object.assign({\n fingerprint: fingerprints[i]\n }, foundKey);\n }\n }\n return false;\n });\n }\n}\nexports.RSAKeysManager = RSAKeysManager;\nexports.default = new RSAKeysManager();\n" + "depth": 1, + "source": "var api = require(\"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../node_modules/css-loader/dist/cjs.js!../node_modules/resolve-url-loader/index.js!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./materialize.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\nvar exported = content.locals ? content.locals : {};\n\n\n\nmodule.exports = exported;" }, { - "id": 44, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/authorizer.ts", - "name": "./src/lib/mtproto/authorizer.ts", - "index": 45, - "index2": 38, - "size": 22899, + "id": 46, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\materialize.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/materialize.scss", + "index": 3, + "index2": 2, + "size": 4474, "cacheable": true, "built": true, "optional": false, @@ -5591,44 +5460,34 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "issuerId": 1, - "issuerName": "./src/lib/mtproto/apiManager.ts", + "issuer": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\materialize.scss", + "issuerId": 45, + "issuerName": "./src/materialize.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 45, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\materialize.scss", + "name": "./src/materialize.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "dependencies": 1062 } } ], "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 1066, + "building": 2527, + "dependencies": 967 }, "failed": false, "errors": 0, @@ -5636,22 +5495,13 @@ "assets": [], "reasons": [ { - "moduleId": 1, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "module": "./src/lib/mtproto/apiManager.ts", - "moduleName": "./src/lib/mtproto/apiManager.ts", - "type": "cjs require", - "userRequest": "./authorizer", - "loc": "26:37-60" - }, - { - "moduleId": 16, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/mtproto.ts", - "module": "./src/lib/mtproto/mtproto.ts", - "moduleName": "./src/lib/mtproto/mtproto.ts", + "moduleId": 45, + "moduleIdentifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\materialize.scss", + "module": "./src/materialize.scss", + "moduleName": "./src/materialize.scss", "type": "cjs require", - "userRequest": "./authorizer", - "loc": "21:37-60" + "userRequest": "!!../node_modules/css-loader/dist/cjs.js!../node_modules/resolve-url-loader/index.js!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./materialize.scss", + "loc": "2:26-190" } ], "usedExports": true, @@ -5659,16 +5509,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tl_utils_1 = require(\"../tl_utils\");\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\nconst bin_utils_1 = require(\"../bin_utils\");\nconst rsaKeysManager_1 = __importDefault(require(\"./rsaKeysManager\"));\nconst utils_1 = require(\"../utils\");\nconst timeManager_1 = __importDefault(require(\"./timeManager\"));\n// @ts-ignore\nconst jsbn_1 = require(\"jsbn\");\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\nconst mtproto_1 = require(\"./mtproto\");\nclass Authorizer {\n constructor() {\n this.cached = {};\n }\n mtpSendPlainRequest(dcID, requestArray) {\n var requestLength = requestArray.byteLength;\n //requestArray = new /* Int32Array */Uint8Array(requestBuffer);\n var header = new tl_utils_1.TLSerialization();\n header.storeLongP(0, 0, 'auth_key_id'); // Auth key\n header.storeLong(timeManager_1.default.generateID(), 'msg_id'); // Msg_id\n header.storeInt(requestLength, 'request_length');\n let headerArray = header.getBytes(true);\n let resultArray = new Uint8Array(headerArray.byteLength + requestLength);\n resultArray.set(headerArray);\n resultArray.set(requestArray, headerArray.length);\n /* var headerBuffer = header.getBuffer(),\n headerArray = new Int32Array(headerBuffer);\n var headerLength = headerBuffer.byteLength;\n \n var resultBuffer = new ArrayBuffer(headerLength + requestLength),\n resultArray = new Int32Array(resultBuffer);\n \n resultArray.set(headerArray);\n resultArray.set(requestArray, headerArray.length);\n \n let requestData = xhrSendBuffer ? resultBuffer : resultArray; */\n let transport = dcConfigurator_1.default.chooseServer(dcID);\n let baseError = {\n code: 406,\n type: 'NETWORK_BAD_RESPONSE',\n transport: transport\n };\n console.log(bin_utils_1.dT(), 'mtpSendPlainRequest: creating requestPromise');\n return transport.send(resultArray).then(result => {\n console.log(bin_utils_1.dT(), 'mtpSendPlainRequest: in good sector', result);\n if (!result || !result.byteLength) {\n return Promise.reject(baseError);\n }\n try {\n /* result = fResult ? fResult : result;\n fResult = new Uint8Array(0); */\n let deserializer = new tl_utils_1.TLDeserialization(result, { mtproto: true });\n let auth_key_id = deserializer.fetchLong('auth_key_id');\n if (auth_key_id != 0)\n console.error('auth_key_id != 0', auth_key_id);\n let msg_id = deserializer.fetchLong('msg_id');\n if (msg_id == 0)\n console.error('msg_id == 0', msg_id);\n let msg_len = deserializer.fetchInt('msg_len');\n if (!msg_len)\n console.error('no msg_len', msg_len);\n return deserializer;\n }\n catch (e) {\n console.error('mtpSendPlainRequest: deserialization went bad', e);\n let error = Object.assign(baseError, { originalError: e });\n throw error;\n }\n }, error => {\n if (!error.message && !error.type) {\n error = Object.assign(baseError, {\n originalError: error\n });\n }\n return Promise.reject(error);\n });\n }\n mtpSendReqPQ(auth) {\n return __awaiter(this, void 0, void 0, function* () {\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\n request.storeMethod('req_pq_multi', { nonce: auth.nonce });\n // need\n rsaKeysManager_1.default.prepare().then(() => { });\n console.log(bin_utils_1.dT(), 'Send req_pq', auth.nonce.hex);\n try {\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, request.getBytes(true));\n }\n catch (error) {\n console.error(bin_utils_1.dT(), 'req_pq error', error.message);\n throw error;\n }\n var response = deserializer.fetchObject('ResPQ');\n if (response._ != 'resPQ') {\n throw new Error('[MT] resPQ response invalid: ' + response._);\n }\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\n console.log(auth.nonce, response.nonce);\n throw new Error('[MT] resPQ nonce mismatch');\n }\n //auth.serverNonce = response.server_nonce;\n auth.serverNonce = new Uint8Array(response.server_nonce); // need\n auth.pq = response.pq;\n auth.fingerprints = response.server_public_key_fingerprints;\n console.log(bin_utils_1.dT(), 'Got ResPQ', bin_utils_1.bytesToHex(auth.serverNonce), bin_utils_1.bytesToHex(auth.pq), auth.fingerprints);\n let publicKey = yield rsaKeysManager_1.default.select(auth.fingerprints);\n if (!publicKey) {\n throw new Error('[MT] No public key found');\n }\n auth.publicKey = publicKey;\n console.log(bin_utils_1.dT(), 'PQ factorization start', auth.pq);\n try {\n var pAndQ = yield cryptoworker_1.default.factorize(auth.pq);\n }\n catch (error) {\n console.error('worker error factorize', error);\n throw error;\n }\n auth.p = pAndQ[0];\n auth.q = pAndQ[1];\n console.log(bin_utils_1.dT(), 'PQ factorization done', pAndQ);\n /* let p = new Uint32Array(new Uint8Array(auth.p).buffer)[0];\n let q = new Uint32Array(new Uint8Array(auth.q).buffer)[0];\n console.log(dT(), 'PQ factorization done', pAndQ, p.toString(16), q.toString(16)); */\n return this.mtpSendReqDhParams(auth);\n });\n }\n mtpSendReqDhParams(auth) {\n return __awaiter(this, void 0, void 0, function* () {\n auth.newNonce = new Uint8Array(32).randomize();\n /* auth.newNonce = new Array(32); // need array, not uint8array!\n MTProto.secureRandom.nextBytes(auth.newNonce); */\n //console.log(\"TCL: Authorizer -> mtpSendReqDhParams -> auth.newNonce\", auth.newNonce)\n // remove\n // auth.newNonce = fNewNonce ? fNewNonce : auth.newNonce;\n // console.log(\"TCL: Authorizer -> mtpSendReqDhParams -> auth.newNonce\", auth.newNonce);\n let p_q_inner_data = {\n _: 'p_q_inner_data',\n pq: auth.pq,\n p: auth.p,\n q: auth.q,\n nonce: auth.nonce,\n server_nonce: auth.serverNonce,\n new_nonce: auth.newNonce\n };\n let data = new tl_utils_1.TLSerialization({ mtproto: true });\n data.storeObject(p_q_inner_data, 'P_Q_inner_data', 'DECRYPTED_DATA');\n /* console.log('p_q_inner_data', p_q_inner_data,\n bytesToHex(bytesFromArrayBuffer(data.getBuffer())),\n sha1BytesSync(data.getBuffer()),\n bytesFromArrayBuffer(await CryptoWorker.sha1Hash(data.getBuffer()))); */\n let uint8Data = data.getBytes(true);\n let sha1Hashed = yield cryptoworker_1.default.sha1Hash(uint8Data);\n //var dataWithHash = sha1BytesSync(data.getBuffer()).concat(data.getBytes() as number[]);\n let dataWithHash = sha1Hashed.concat(uint8Data);\n //dataWithHash = addPadding(dataWithHash, 255);\n //dataWithHash = dataWithHash.concat(bytesFromHex('96228ea7790e71caaabc2ab67f4412e9aa224c664d232cc08617a32ce1796aa052da4a737083211689858f461e4473fd6394afd3aa0c8014840dc13f47beaf4fc3b9229aea9cfa83f9f6e676e50ee7676542fb75606879ee7e65cf3a2295b4ba0934ceec1011560c62395a6e9593bfb117cd0da75ba56723672d100ac17ec4d805aa59f7852e3a25a79ee4'));\n //console.log('sha1Hashed', bytesToHex(sha1Hashed), 'dataWithHash', bytesToHex(dataWithHash), dataWithHash.length);\n let rsaEncrypted = yield cryptoworker_1.default.rsaEncrypt(auth.publicKey, dataWithHash);\n //let rsaEncrypted = await CryptoWorker.rsaEncrypt(auth.publicKey, dataWithHash);\n //console.log('rsaEncrypted', rsaEncrypted, new Uint8Array(rsaEncrypted).hex);\n let req_DH_params = {\n nonce: auth.nonce,\n server_nonce: auth.serverNonce,\n p: auth.p,\n q: auth.q,\n public_key_fingerprint: auth.publicKey.fingerprint,\n encrypted_data: rsaEncrypted\n };\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\n request.storeMethod('req_DH_params', req_DH_params);\n let requestBytes = request.getBytes(true);\n console.log(bin_utils_1.dT(), 'Send req_DH_params', req_DH_params /* , requestBytes.hex */);\n try {\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, requestBytes);\n }\n catch (error) {\n console.log(bin_utils_1.dT(), 'Send req_DH_params FAIL!', error);\n throw error;\n }\n var response = deserializer.fetchObject('Server_DH_Params', 'RESPONSE');\n console.log(bin_utils_1.dT(), 'Sent req_DH_params, response:', response);\n if (response._ != 'server_DH_params_fail' && response._ != 'server_DH_params_ok') {\n throw new Error('[MT] Server_DH_Params response invalid: ' + response._);\n }\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\n throw new Error('[MT] Server_DH_Params nonce mismatch');\n }\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\n throw new Error('[MT] Server_DH_Params server_nonce mismatch');\n }\n if (response._ == 'server_DH_params_fail') {\n //var newNonceHash = sha1BytesSync(auth.newNonce).slice(-16);\n var newNonceHash = (yield cryptoworker_1.default.sha1Hash(auth.newNonce)).slice(-16);\n if (!bin_utils_1.bytesCmp(newNonceHash, response.new_nonce_hash)) {\n throw new Error('[MT] server_DH_params_fail new_nonce_hash mismatch');\n }\n throw new Error('[MT] server_DH_params_fail');\n }\n // fill auth object\n try {\n yield this.mtpDecryptServerDhDataAnswer(auth, response.encrypted_answer);\n }\n catch (e) {\n console.error(bin_utils_1.dT(), 'mtpDecryptServerDhDataAnswer FAILED!', e);\n throw e;\n }\n //console.log(dT(), 'mtpSendReqDhParams: executing mtpSendSetClientDhParams...');\n return this.mtpSendSetClientDhParams(auth); // костыль\n });\n }\n mtpDecryptServerDhDataAnswer(auth, encryptedAnswer) {\n return __awaiter(this, void 0, void 0, function* () {\n auth.localTime = utils_1.tsNow();\n // can't concat Array with Uint8Array!\n //auth.tmpAesKey = sha1BytesSync(auth.newNonce.concat(auth.serverNonce)).concat(sha1BytesSync(auth.serverNonce.concat(auth.newNonce)).slice(0, 12));\n //auth.tmpAesIv = sha1BytesSync(auth.serverNonce.concat(auth.newNonce)).slice(12).concat(sha1BytesSync([].concat(auth.newNonce, auth.newNonce)), auth.newNonce.slice(0, 4));\n auth.tmpAesKey = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat(auth.serverNonce)))\n .concat((yield cryptoworker_1.default.sha1Hash(auth.serverNonce.concat(auth.newNonce))).slice(0, 12));\n auth.tmpAesIv = (yield cryptoworker_1.default.sha1Hash(auth.serverNonce.concat(auth.newNonce))).slice(12)\n .concat(yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat(auth.newNonce)), auth.newNonce.slice(0, 4));\n /* console.log(auth.serverNonce.concat(auth.newNonce));\n console.log(auth.newNonce.concat(auth.serverNonce));\n console.log(auth.newNonce.concat(auth.newNonce)); */\n //var answerWithHash = aesDecryptSync(encryptedAnswer, auth.tmpAesKey, auth.tmpAesIv);\n var answerWithHash = new Uint8Array(yield cryptoworker_1.default.aesDecrypt(encryptedAnswer, auth.tmpAesKey, auth.tmpAesIv));\n var hash = answerWithHash.slice(0, 20);\n var answerWithPadding = answerWithHash.slice(20);\n // console.log('hash', hash);\n var deserializer = new tl_utils_1.TLDeserialization(answerWithPadding, { mtproto: true });\n var response = deserializer.fetchObject('Server_DH_inner_data');\n if (response._ != 'server_DH_inner_data') {\n throw new Error('[MT] server_DH_inner_data response invalid: ' + response);\n }\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\n throw new Error('[MT] server_DH_inner_data nonce mismatch');\n }\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\n throw new Error('[MT] server_DH_inner_data serverNonce mismatch');\n }\n console.log(bin_utils_1.dT(), 'Done decrypting answer');\n auth.g = response.g;\n auth.dhPrime = response.dh_prime;\n auth.gA = response.g_a;\n auth.serverTime = response.server_time;\n auth.retry = 0;\n this.mtpVerifyDhParams(auth.g, auth.dhPrime, auth.gA);\n var offset = deserializer.getOffset();\n //if(!bytesCmp(hash, sha1BytesSync(answerWithPadding.slice(0, offset)))) {\n if (!bin_utils_1.bytesCmp(hash, yield cryptoworker_1.default.sha1Hash(answerWithPadding.slice(0, offset)))) {\n throw new Error('[MT] server_DH_inner_data SHA1-hash mismatch');\n }\n timeManager_1.default.applyServerTime(auth.serverTime, auth.localTime);\n });\n }\n mtpVerifyDhParams(g, dhPrime, gA) {\n console.log(bin_utils_1.dT(), 'Verifying DH params');\n var dhPrimeHex = bin_utils_1.bytesToHex(dhPrime);\n if (g != 3 || dhPrimeHex !== 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b') {\n // The verified value is from https://core.telegram.org/mtproto/security_guidelines\n throw new Error('[MT] DH params are not verified: unknown dhPrime');\n }\n console.log(bin_utils_1.dT(), 'dhPrime cmp OK');\n var gABigInt = new jsbn_1.BigInteger(bin_utils_1.bytesToHex(gA), 16);\n var dhPrimeBigInt = new jsbn_1.BigInteger(dhPrimeHex, 16);\n if (gABigInt.compareTo(jsbn_1.BigInteger.ONE) <= 0) {\n throw new Error('[MT] DH params are not verified: gA <= 1');\n }\n if (gABigInt.compareTo(dhPrimeBigInt.subtract(jsbn_1.BigInteger.ONE)) >= 0) {\n throw new Error('[MT] DH params are not verified: gA >= dhPrime - 1');\n }\n console.log(bin_utils_1.dT(), '1 < gA < dhPrime-1 OK');\n var two = new jsbn_1.BigInteger(/* null */ '');\n two.fromInt(2);\n var twoPow = two.pow(2048 - 64);\n if (gABigInt.compareTo(twoPow) < 0) {\n throw new Error('[MT] DH params are not verified: gA < 2^{2048-64}');\n }\n if (gABigInt.compareTo(dhPrimeBigInt.subtract(twoPow)) >= 0) {\n throw new Error('[MT] DH params are not verified: gA > dhPrime - 2^{2048-64}');\n }\n console.log(bin_utils_1.dT(), '2^{2048-64} < gA < dhPrime-2^{2048-64} OK');\n return true;\n }\n mtpSendSetClientDhParams(auth) {\n return __awaiter(this, void 0, void 0, function* () {\n var gBytes = bin_utils_1.bytesFromHex(auth.g.toString(16));\n auth.b = new Array(256);\n mtproto_1.MTProto.secureRandom.nextBytes(auth.b);\n try {\n var gB = yield cryptoworker_1.default.modPow(gBytes, auth.b, auth.dhPrime);\n }\n catch (error) {\n throw error;\n }\n var data = new tl_utils_1.TLSerialization({ mtproto: true });\n data.storeObject({\n _: 'client_DH_inner_data',\n nonce: auth.nonce,\n server_nonce: auth.serverNonce,\n retry_id: [0, auth.retry++],\n g_b: gB\n }, 'Client_DH_Inner_Data');\n //var dataWithHash = sha1BytesSync(data.getBuffer()).concat(data.getBytes());\n var dataWithHash = (yield cryptoworker_1.default.sha1Hash(data.getBuffer())).concat(data.getBytes());\n //var encryptedData = aesEncryptSync(dataWithHash, auth.tmpAesKey, auth.tmpAesIv);\n var encryptedData = yield cryptoworker_1.default.aesEncrypt(dataWithHash, auth.tmpAesKey, auth.tmpAesIv);\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\n request.storeMethod('set_client_DH_params', {\n nonce: auth.nonce,\n server_nonce: auth.serverNonce,\n encrypted_data: encryptedData\n });\n console.log(bin_utils_1.dT(), 'Send set_client_DH_params');\n try {\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, request.getBytes(true));\n }\n catch (err) {\n throw err;\n }\n let response = deserializer.fetchObject('Set_client_DH_params_answer');\n if (response._ != 'dh_gen_ok' && response._ != 'dh_gen_retry' && response._ != 'dh_gen_fail') {\n throw new Error('[MT] Set_client_DH_params_answer response invalid: ' + response._);\n }\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\n throw new Error('[MT] Set_client_DH_params_answer nonce mismatch');\n }\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\n throw new Error('[MT] Set_client_DH_params_answer server_nonce mismatch');\n }\n try {\n var authKey = yield cryptoworker_1.default.modPow(auth.gA, auth.b, auth.dhPrime);\n }\n catch (err) {\n throw authKey;\n }\n //var authKeyHash = sha1BytesSync(authKey),\n let authKeyHash = yield cryptoworker_1.default.sha1Hash(authKey), authKeyAux = authKeyHash.slice(0, 8), authKeyID = authKeyHash.slice(-8);\n console.log(bin_utils_1.dT(), 'Got Set_client_DH_params_answer', response._, authKey);\n switch (response._) {\n case 'dh_gen_ok':\n var newNonceHash1 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([1], authKeyAux))).slice(-16);\n //var newNonceHash1 = sha1BytesSync(auth.newNonce.concat([1], authKeyAux)).slice(-16);\n if (!bin_utils_1.bytesCmp(newNonceHash1, response.new_nonce_hash1)) {\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash1 mismatch');\n }\n var serverSalt = bin_utils_1.bytesXor(auth.newNonce.slice(0, 8), auth.serverNonce.slice(0, 8));\n console.log('Auth successfull!', authKeyID, authKey, serverSalt);\n auth.authKeyID = authKeyID;\n auth.authKey = authKey;\n auth.serverSalt = serverSalt;\n return auth;\n break;\n case 'dh_gen_retry':\n //var newNonceHash2 = sha1BytesSync(auth.newNonce.concat([2], authKeyAux)).slice(-16);\n var newNonceHash2 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([2], authKeyAux))).slice(-16);\n if (!bin_utils_1.bytesCmp(newNonceHash2, response.new_nonce_hash2)) {\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash2 mismatch');\n }\n return this.mtpSendSetClientDhParams(auth);\n case 'dh_gen_fail':\n //var newNonceHash3 = sha1BytesSync(auth.newNonce.concat([3], authKeyAux)).slice(-16);\n var newNonceHash3 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([3], authKeyAux))).slice(-16);\n if (!bin_utils_1.bytesCmp(newNonceHash3, response.new_nonce_hash3)) {\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash3 mismatch');\n }\n throw new Error('[MT] Set_client_DH_params_answer fail');\n }\n });\n }\n // mtpAuth\n auth(dcID) {\n return __awaiter(this, void 0, void 0, function* () {\n if (dcID in this.cached) {\n return this.cached[dcID];\n }\n let nonce = /* fNonce ? fNonce : */ new Uint8Array(16).randomize();\n /* var nonce = new Array(16);\n MTProto.secureRandom.nextBytes(nonce); */\n if (!dcConfigurator_1.default.chooseServer(dcID)) {\n return Promise.reject(new Error('[MT] No server found for dc ' + dcID));\n }\n try {\n let promise = this.mtpSendReqPQ({ dcID, nonce });\n this.cached[dcID] = promise;\n return yield promise;\n }\n catch (err) {\n delete this.cached[dcID];\n throw err;\n }\n });\n }\n}\nexports.Authorizer = Authorizer;\nexports.default = new Authorizer();\n" + "depth": 2, + "source": "// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:0.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type=\\\"button\\\"],[type=\\\"reset\\\"],[type=\\\"submit\\\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\\\"button\\\"]::-moz-focus-inner,[type=\\\"reset\\\"]::-moz-focus-inner,[type=\\\"submit\\\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\\\"button\\\"]:-moz-focusring,[type=\\\"reset\\\"]:-moz-focusring,[type=\\\"submit\\\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=\\\"checkbox\\\"],[type=\\\"radio\\\"]{box-sizing:border-box;padding:0}[type=\\\"number\\\"]::-webkit-inner-spin-button,[type=\\\"number\\\"]::-webkit-outer-spin-button{height:auto}[type=\\\"search\\\"]{-webkit-appearance:textfield;outline-offset:-2px}[type=\\\"search\\\"]::-webkit-search-cancel-button,[type=\\\"search\\\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ul:not(.browser-default){padding-left:0;list-style-type:none}ul:not(.browser-default)>li{list-style-type:none}a{text-decoration:none;-webkit-tap-highlight-color:transparent}.valign-wrapper{display:flex;align-items:center}.clearfix{clear:both}.z-depth-0{box-shadow:none !important}.z-depth-1{box-shadow:0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2)}.z-depth-1-half{box-shadow:0 3px 3px 0 rgba(0,0,0,0.14),0 1px 7px 0 rgba(0,0,0,0.12),0 3px 1px -1px rgba(0,0,0,0.2)}.z-depth-2{box-shadow:0 4px 5px 0 rgba(0,0,0,0.14),0 1px 10px 0 rgba(0,0,0,0.12),0 2px 4px -1px rgba(0,0,0,0.3)}.z-depth-3{box-shadow:0 8px 17px 2px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12),0 5px 5px -3px rgba(0,0,0,0.2)}.z-depth-4{box-shadow:0 16px 24px 2px rgba(0,0,0,0.14),0 6px 30px 5px rgba(0,0,0,0.12),0 8px 10px -7px rgba(0,0,0,0.2)}.z-depth-5{box-shadow:0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12),0 11px 15px -7px rgba(0,0,0,0.2)}.hoverable{transition:box-shadow .25s}.hoverable:hover{box-shadow:0 8px 17px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)}i{line-height:inherit}i.left{float:left;margin-right:15px}i.right{float:right;margin-left:15px}i.tiny{font-size:1rem}i.small{font-size:2rem}i.medium{font-size:4rem}i.large{font-size:6rem}ul.staggered-list li{opacity:0}.fade-in{opacity:0;transform-origin:0 50%}.hide{display:none !important}.left-align{text-align:left}.right-align{text-align:right}.center,.center-align{text-align:center}.left{float:left !important}.right{float:right !important}.no-select{user-select:none}.circle{border-radius:50%}a{text-decoration:none}html{line-height:1.5;font-weight:normal}h1,h2,h3,h4,h5,h6{font-weight:400;line-height:1.3}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{font-weight:inherit}em{font-style:italic}strong{font-weight:500}small{font-size:75%}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n" }, { - "id": 45, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", - "index": 70, - "index2": 71, - "size": 21590, + "id": 47, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./src/scss/style.scss", + "index": 5, + "index2": 10, + "size": 668, "cacheable": true, "built": true, "optional": false, @@ -5676,44 +5526,24 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "issuerId": 50, - "issuerName": "./src/lib/services.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "issuerId": 44, + "issuerName": "./src/index.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 - } - }, - { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", - "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "factory": 44, + "building": 1570 } } ], "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 842, + "building": 0, + "dependencies": 1062 }, "failed": false, "errors": 0, @@ -5721,22 +5551,13 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appSidebarRight", - "loc": "32:42-70" - }, - { - "moduleId": 50, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "module": "./src/lib/services.ts", - "moduleName": "./src/lib/services.ts", + "moduleId": 44, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "module": "./src/index.ts", + "moduleName": "./src/index.ts", "type": "cjs require", - "userRequest": "./appManagers/appSidebarRight", - "loc": "19:42-82" + "userRequest": "./scss/style.scss", + "loc": "20:0-28" } ], "usedExports": true, @@ -5744,16 +5565,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst misc_1 = require(\"../../components/misc\");\nconst scrollable_1 = __importDefault(require(\"../../components/scrollable\"));\nconst utils_1 = require(\"../utils\");\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nconst polyfill_1 = require(\"../polyfill\");\nconst appImManager_1 = __importDefault(require(\"./appImManager\"));\nconst appMediaViewer_1 = __importDefault(require(\"./appMediaViewer\"));\nconst lazyLoadQueue_1 = __importDefault(require(\"../../components/lazyLoadQueue\"));\nconst wrappers_1 = require(\"../../components/wrappers\");\nclass AppSidebarRight {\n constructor() {\n this.sidebarEl = document.querySelector('.profile-container');\n this.profileContentEl = document.querySelector('.profile-content');\n this.profileElements = {\n avatar: this.profileContentEl.querySelector('.profile-avatar'),\n name: this.profileContentEl.querySelector('.profile-name'),\n subtitle: this.profileContentEl.querySelector('.profile-subtitle'),\n bio: this.profileContentEl.querySelector('.profile-row-bio'),\n username: this.profileContentEl.querySelector('.profile-row-username'),\n phone: this.profileContentEl.querySelector('.profile-row-phone'),\n notificationsRow: this.profileContentEl.querySelector('.profile-row-notifications'),\n notificationsCheckbox: this.profileContentEl.querySelector('#profile-notifications'),\n notificationsStatus: this.profileContentEl.querySelector('.profile-row-notifications > p')\n };\n this.sharedMedia = {\n contentMembers: this.profileContentEl.querySelector('#content-members'),\n contentMedia: this.profileContentEl.querySelector('#content-media'),\n contentDocuments: this.profileContentEl.querySelector('#content-docs'),\n contentLinks: this.profileContentEl.querySelector('#content-links'),\n contentAudio: this.profileContentEl.querySelector('#content-audio'),\n };\n this.lastSharedMediaDiv = null;\n this.loadSidebarMediaPromises = {};\n this.sharedMediaTypes = [\n 'inputMessagesFilterContacts',\n 'inputMessagesFilterPhotoVideo',\n 'inputMessagesFilterDocument',\n 'inputMessagesFilterUrl',\n 'inputMessagesFilterVoice'\n ];\n this.sharedMediaType = '';\n this.sharedMediaSelected = null;\n this.lazyLoadQueueSidebar = new lazyLoadQueue_1.default(5);\n /* public minMediaID: {\n [type: string]: number\n } = {}; */\n this.cleared = {};\n this.historiesStorage = {};\n this.log = polyfill_1.logger('SR');\n this.peerID = 0;\n this.sidebarScroll = null;\n this.prevTabID = -1;\n this.mediaDivsByIDs = {};\n let container = this.profileContentEl.querySelector('.profile-tabs-content');\n this.profileTabs = this.profileContentEl.querySelector('.profile-tabs');\n this.sidebarScroll = new scrollable_1.default(this.sidebarEl);\n this.sidebarScroll.container.addEventListener('scroll', this.onSidebarScroll.bind(this));\n misc_1.horizontalMenu(this.profileTabs, container, (id, tabContent) => {\n this.sharedMediaType = this.sharedMediaTypes[id];\n this.sharedMediaSelected = tabContent.firstElementChild;\n if (this.prevTabID != -1) {\n this.savedVirtualStates[this.prevTabID] = {\n hiddenElements: {\n up: this.sidebarScroll.hiddenElements.up.slice(),\n down: this.sidebarScroll.hiddenElements.down.slice(),\n },\n paddings: {\n up: this.sidebarScroll.paddings.up,\n down: this.sidebarScroll.paddings.down\n }\n };\n }\n this.prevTabID = id;\n //this.log('setVirtualContainer', id, this.sharedMediaSelected);\n this.sidebarScroll.setVirtualContainer(this.sharedMediaSelected);\n if (this.savedVirtualStates[id]) {\n this.log(this.savedVirtualStates[id]);\n this.sidebarScroll.hiddenElements = this.savedVirtualStates[id].hiddenElements;\n this.sidebarScroll.paddings = this.savedVirtualStates[id].paddings;\n }\n }, this.onSidebarScroll.bind(this));\n //(this.profileTabs.children[1] as HTMLLIElement).click(); // set media\n let sidebarCloseBtn = this.sidebarEl.querySelector('.sidebar-close-button');\n sidebarCloseBtn.addEventListener('click', () => {\n this.toggleSidebar(false);\n });\n this.sharedMedia.contentMedia.addEventListener('click', (e) => {\n let target = e.target;\n let messageID = +target.getAttribute('message-id');\n if (!messageID) {\n this.log.warn('no messageID by click on target:', target);\n return;\n }\n let message = appMessagesManager_1.default.getMessage(messageID);\n let ids = Object.keys(this.mediaDivsByIDs).map(k => +k).sort();\n let idx = ids.findIndex(i => i == messageID);\n let prev = ids[idx + 1] || null;\n let next = ids[idx - 1] || null;\n appMediaViewer_1.default.openMedia(message, target, this.mediaDivsByIDs[prev] || null, this.mediaDivsByIDs[next] || null);\n });\n this.profileElements.notificationsCheckbox.addEventListener('change', () => {\n let checked = this.profileElements.notificationsCheckbox.checked;\n appImManager_1.default.mutePeer();\n });\n window.addEventListener('resize', () => {\n setTimeout(() => {\n this.sidebarScroll.onScroll();\n this.onSidebarScroll();\n }, 0);\n });\n }\n onSidebarScroll() {\n this.lazyLoadQueueSidebar.check();\n if (this.sharedMediaSelected && !this.sidebarScroll.hiddenElements.down.length /* && false */) {\n let media = Array.from(this.sharedMediaSelected.childNodes).slice(-15);\n for (let div of media) {\n if (utils_1.isElementInViewport(div)) {\n //this.log('Will load more media');\n this.loadSidebarMedia(true);\n break;\n }\n }\n }\n }\n toggleSidebar(enable) {\n /////this.log('sidebarEl', this.sidebarEl, enable, isElementInViewport(this.sidebarEl));\n /* if(enable !== undefined) {\n this.sidebarEl.style.display = enable ? 'block' : 'none';\n return;\n }\n \n this.sidebarEl.style.display = isElementInViewport(this.sidebarEl) ? 'none' : 'block'; */\n if (enable !== undefined) {\n this.sidebarEl.style.width = enable ? '25%' : '0%';\n return;\n }\n this.sidebarEl.style.width = utils_1.isElementInViewport(this.sidebarEl) ? '0%' : '25%';\n }\n loadSidebarMedia(single = false) {\n let peerID = this.peerID;\n let typesToLoad = single ? [this.sharedMediaType] : this.sharedMediaTypes;\n if (!this.historiesStorage[peerID])\n this.historiesStorage[peerID] = {};\n let historyStorage = this.historiesStorage[peerID];\n let promises = typesToLoad.map(type => {\n if (this.loadSidebarMediaPromises[type])\n return this.loadSidebarMediaPromises[type];\n if (!historyStorage[type])\n historyStorage[type] = [];\n let history = historyStorage[type];\n // заливать новую картинку сюда только после полной отправки!\n //let maxID = this.minMediaID[type] || 0;\n let maxID = history[history.length - 1] || 0;\n let ids = !maxID && appMessagesManager_1.default.historiesStorage[peerID]\n ? appMessagesManager_1.default.historiesStorage[peerID].history.slice() : [];\n maxID = !maxID && ids.length ? ids[ids.length - 1] : maxID;\n //this.log('search house of glass pre', type, ids, maxID);\n return this.loadSidebarMediaPromises[type] = appMessagesManager_1.default.getSearch(peerID, '', { _: type }, maxID, 50)\n .then(value => {\n ids = ids.concat(value.history);\n history.push(...ids);\n //this.log('search house of glass', type, value, ids, this.cleared);\n if (utils_1.$rootScope.selectedPeerID != peerID) {\n this.log.warn('peer changed');\n return;\n }\n if (this.cleared[type]) {\n ids = history;\n delete this.cleared[type];\n }\n ids.forEach(mid => {\n //this.minMediaID[type] = mid;\n let message = appMessagesManager_1.default.getMessage(mid);\n if (!message.media)\n return;\n /*'inputMessagesFilterContacts',\n 'inputMessagesFilterPhotoVideo',\n 'inputMessagesFilterDocument',\n 'inputMessagesFilterUrl',\n 'inputMessagesFilterVoice'*/\n switch (type) {\n case 'inputMessagesFilterPhotoVideo': {\n /* if(!(message.media.photo || message.media.document || message.media.webpage.document)) {\n this.log.error('no media!', message);\n break;\n } */\n let media = message.media.photo || message.media.document || (message.media.webpage && message.media.webpage.document);\n if (!media) {\n //this.log('no media!', message);\n break;\n }\n if (media._ == 'document' && media.type != 'video' /* && media.type != 'gif' */) {\n //this.log('broken video', media);\n break;\n }\n let div = document.createElement('div');\n //console.log(message, photo);\n let sizes = media.sizes || media.thumbs;\n if (sizes && sizes[0].bytes) {\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, div, false, true);\n } /* else {\n this.log('no stripped size', message, media);\n } */\n //this.log('inputMessagesFilterPhotoVideo', message, media);\n let load = () => appPhotosManager_1.default.preloadPhoto(media, appPhotosManager_1.default.choosePhotoSize(media, 380, 0))\n .then((blob) => {\n if (utils_1.$rootScope.selectedPeerID != peerID) {\n this.log.warn('peer changed');\n return;\n }\n div.style.backgroundImage = 'url(' + URL.createObjectURL(blob) + ')';\n });\n div.setAttribute('message-id', '' + mid);\n this.lazyLoadQueueSidebar.push({ div, load });\n this.lastSharedMediaDiv.append(div);\n if (this.lastSharedMediaDiv.childElementCount == 3) {\n this.sharedMedia.contentMedia.append(this.lastSharedMediaDiv);\n this.lastSharedMediaDiv = document.createElement('div');\n }\n this.mediaDivsByIDs[mid] = div;\n //this.sharedMedia.contentMedia.append(div);\n break;\n }\n case 'inputMessagesFilterDocument': {\n if (!message.media.document || message.media.document.type == 'voice') {\n break;\n }\n let doc = message.media.document;\n if (doc.attributes) {\n if (doc.attributes.find((a) => a._ == \"documentAttributeSticker\")) {\n break;\n }\n }\n //this.log('come back down to my knees', message);\n let div = wrappers_1.wrapDocument(message.media.document, true);\n this.sharedMedia.contentDocuments.append(div);\n break;\n }\n case 'inputMessagesFilterUrl': {\n if (!message.media.webpage || message.media.webpage._ == 'webPageEmpty') {\n break;\n }\n let webpage = message.media.webpage;\n let div = document.createElement('div');\n let previewDiv = document.createElement('div');\n previewDiv.classList.add('preview');\n //this.log('wrapping webpage', webpage);\n if (webpage.photo) {\n let load = () => appPhotosManager_1.default.preloadPhoto(webpage.photo.id, appPhotosManager_1.default.choosePhotoSize(webpage.photo, 380, 0))\n .then((blob) => {\n if (utils_1.$rootScope.selectedPeerID != peerID) {\n this.log.warn('peer changed');\n return;\n }\n previewDiv.style.backgroundImage = 'url(' + URL.createObjectURL(blob) + ')';\n });\n this.lazyLoadQueueSidebar.push({ div: previewDiv, load });\n }\n else {\n previewDiv.innerText = (webpage.title || webpage.description || webpage.url || webpage.display_url).slice(0, 1);\n previewDiv.classList.add('empty');\n }\n let title = webpage.rTitle || '';\n let subtitle = webpage.rDescription || '';\n let url = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.url || '');\n if (!title) {\n //title = new URL(webpage.url).hostname;\n title = webpage.display_url.split('/', 1)[0];\n }\n div.append(previewDiv);\n div.insertAdjacentHTML('beforeend', `\n
${title}
\n
${subtitle}
\n
${url}
\n `);\n if (div.innerText.trim().length) {\n this.sharedMedia.contentLinks.append(div);\n }\n break;\n }\n /* case 'inputMessagesFilterVoice': {\n //this.log('wrapping audio', message.media);\n if(!message.media || !message.media.document || message.media.document.type != 'voice') {\n break;\n }\n \n let doc = message.media.document;\n \n this.log('wrapping audio', doc);\n \n let audioDiv = wrapAudio(doc);\n \n this.sharedMedia.contentAudio.append(audioDiv);\n \n break;\n } */\n default:\n //console.warn('death is my friend', message);\n break;\n }\n });\n this.onSidebarScroll();\n }).then(() => {\n this.loadSidebarMediaPromises[type] = null;\n }, (err) => {\n this.log.error('load error:', err);\n this.loadSidebarMediaPromises[type] = null;\n });\n });\n return promises;\n }\n fillProfileElements() {\n let peerID = this.peerID = utils_1.$rootScope.selectedPeerID;\n this.loadSidebarMediaPromises = {};\n this.lastSharedMediaDiv = document.createElement('div');\n //this.log('fillProfileElements');\n this.savedVirtualStates = {};\n this.prevTabID = -1;\n this.sidebarScroll.setVirtualContainer(null);\n this.profileTabs.children[1].click(); // set media\n if (this.sharedMediaSelected) {\n //this.sidebarScroll.setVirtualContainer(this.sharedMediaSelected);\n }\n this.profileContentEl.parentElement.scrollTop = 0;\n this.profileElements.bio.style.display = 'none';\n this.profileElements.phone.style.display = 'none';\n this.profileElements.username.style.display = 'none';\n this.profileElements.notificationsRow.style.display = '';\n this.profileElements.notificationsCheckbox.checked = true;\n this.profileElements.notificationsStatus.innerText = 'Enabled';\n this.mediaDivsByIDs = {};\n this.lazyLoadQueueSidebar.clear();\n Object.keys(this.sharedMedia).forEach(key => {\n this.sharedMedia[key].innerHTML = '';\n });\n this.sharedMediaTypes.forEach(type => {\n //this.minMediaID[type] = 0;\n this.cleared[type] = true;\n });\n let setText = (text, el) => {\n el.style.display = '';\n if (el.childElementCount > 1) {\n el.firstElementChild.remove();\n }\n let p = document.createElement('p');\n p.innerHTML = text;\n el.prepend(p);\n };\n // username\n if (peerID != appImManager_1.default.myID) {\n let username = appPeersManager_1.default.getPeerUsername(peerID);\n if (username) {\n setText(appPeersManager_1.default.getPeerUsername(peerID), this.profileElements.username);\n }\n }\n if (peerID > 0) {\n let user = appUsersManager_1.default.getUser(peerID);\n if (user.phone && peerID != appImManager_1.default.myID) {\n setText('+' + misc_1.formatPhoneNumber(user.phone).formatted, this.profileElements.phone);\n }\n appProfileManager_1.default.getProfile(peerID, true).then(userFull => {\n if (this.peerID != peerID) {\n this.log.warn('peer changed');\n return;\n }\n if (userFull.rAbout && peerID != appImManager_1.default.myID) {\n setText(userFull.rAbout, this.profileElements.bio);\n }\n //this.log('userFull', userFull);\n if (userFull.pinned_msg_id) { // request pinned message\n appImManager_1.default.pinnedMsgID = userFull.pinned_msg_id;\n appMessagesManager_1.default.wrapSingleMessage(userFull.pinned_msg_id);\n }\n });\n }\n else {\n let chat = appPeersManager_1.default.getPeer(peerID);\n appProfileManager_1.default.getChatFull(chat.id).then((chatFull) => {\n if (this.peerID != peerID) {\n this.log.warn('peer changed');\n return;\n }\n //this.log('chatInfo res 2:', chatFull);\n if (chatFull.about) {\n setText(richtextprocessor_1.RichTextProcessor.wrapRichText(chatFull.about), this.profileElements.bio);\n }\n });\n }\n if (peerID != appImManager_1.default.myID) {\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID);\n if (dialog.length) {\n dialog = dialog[0];\n let muted = false;\n if (dialog.notify_settings && dialog.notify_settings.mute_until) {\n muted = new Date(dialog.notify_settings.mute_until * 1000) > new Date();\n }\n appImManager_1.default.setMutedState(muted);\n }\n }\n else {\n this.profileElements.notificationsRow.style.display = 'none';\n }\n //this.loadSidebarMedia();\n }\n}\nexports.default = new AppSidebarRight();\n" + "depth": 1, + "source": "var api = require(\"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./style.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\nvar exported = content.locals ? content.locals : {};\n\n\n\nmodule.exports = exported;" }, { - "id": 46, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMediaViewer.ts", - "name": "./src/lib/appManagers/appMediaViewer.ts", - "index": 71, - "index2": 69, - "size": 15034, + "id": 48, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "index": 6, + "index2": 9, + "size": 68332, "cacheable": true, "built": true, "optional": false, @@ -5761,54 +5582,34 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "issuerId": 19, - "issuerName": "./src/lib/appManagers/appImManager.ts", + "issuer": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "issuerId": 47, + "issuerName": "./src/scss/style.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 47, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./src/scss/style.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 - } - }, - { - "id": 19, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "dependencies": 1062 } } ], "profile": { - "factory": 208, - "building": 300, - "dependencies": 449 + "factory": 1062, + "building": 4761, + "dependencies": 0 }, "failed": false, "errors": 0, @@ -5816,22 +5617,13 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", - "type": "cjs require", - "userRequest": "./appMediaViewer", - "loc": "36:41-68" - }, - { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", + "moduleId": 47, + "moduleIdentifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "module": "./src/scss/style.scss", + "moduleName": "./src/scss/style.scss", "type": "cjs require", - "userRequest": "./appMediaViewer", - "loc": "17:41-68" + "userRequest": "!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./style.scss", + "loc": "2:26-193" } ], "usedExports": true, @@ -5839,16 +5631,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\nconst appDialogsManager_1 = __importDefault(require(\"./appDialogsManager\"));\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nconst polyfill_1 = require(\"../polyfill\");\nconst preloader_1 = __importDefault(require(\"../../components/preloader\"));\nconst wrappers_1 = require(\"../../components/wrappers\");\nconst utils_1 = require(\"../utils\");\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\nclass AppMediaViewer {\n constructor() {\n this.overlaysDiv = document.querySelector('.overlays');\n this.mediaViewerDiv = this.overlaysDiv.firstElementChild;\n this.author = {\n avatarEl: this.overlaysDiv.querySelector('.user-avatar'),\n nameEl: this.overlaysDiv.querySelector('.media-viewer-name'),\n date: this.overlaysDiv.querySelector('.media-viewer-date')\n };\n this.buttons = {\n delete: this.overlaysDiv.querySelector('.media-viewer-delete-button'),\n forward: this.overlaysDiv.querySelector('.media-viewer-forward-button'),\n download: this.overlaysDiv.querySelector('.media-viewer-download-button'),\n close: this.overlaysDiv.querySelector('.media-viewer-close-button'),\n prev: this.overlaysDiv.querySelector('.media-viewer-switcher-left'),\n next: this.overlaysDiv.querySelector('.media-viewer-switcher-right'),\n };\n this.content = {\n container: this.overlaysDiv.querySelector('.media-viewer-media'),\n caption: this.overlaysDiv.querySelector('.media-viewer-caption'),\n //mover: this.overlaysDiv.querySelector('.media-viewer-mover') as HTMLDivElement\n mover: document.querySelector('.media-viewer-mover')\n };\n this.currentMessageID = 0;\n this.preloader = null;\n this.lastTarget = null;\n this.prevTarget = null;\n this.nextTarget = null;\n this.log = polyfill_1.logger('AMV');\n this.preloader = new preloader_1.default();\n this.onKeyDownBinded = this.onKeyDown.bind(this);\n this.buttons.close.addEventListener('click', () => {\n //this.overlaysDiv.classList.remove('active');\n this.content.container.innerHTML = '';\n this.currentMessageID = 0;\n this.setMoverToTarget(this.lastTarget, true);\n this.lastTarget = null;\n this.prevTarget = null;\n this.nextTarget = null;\n window.removeEventListener('keydown', this.onKeyDownBinded);\n });\n this.buttons.prev.addEventListener('click', () => {\n let target = this.prevTarget;\n if (target) {\n target.click();\n }\n else {\n this.buttons.prev.style.display = 'none';\n }\n });\n this.buttons.next.addEventListener('click', () => {\n let target = this.nextTarget;\n if (target) {\n target.click();\n }\n else {\n this.buttons.next.style.display = 'none';\n }\n });\n this.buttons.download.addEventListener('click', () => {\n let message = appMessagesManager_1.default.getMessage(this.currentMessageID);\n if (message.media.photo) {\n appPhotosManager_1.default.downloadPhoto(message.media.photo.id);\n }\n else {\n let document = null;\n if (message.media.webpage)\n document = message.media.webpage.document;\n else\n document = message.media.document;\n if (document) {\n console.log('will save document:', document);\n appDocsManager_1.default.saveDocFile(document.id);\n }\n }\n });\n this.onClickBinded = (e) => {\n let target = e.target;\n let mover = null;\n ['media-viewer-mover', 'media-viewer-buttons', 'media-viewer-author'].find(s => {\n try {\n mover = utils_1.findUpClassName(target, s);\n if (mover)\n return true;\n }\n catch (err) {\n return false;\n }\n });\n if ( /* target == this.mediaViewerDiv */!mover || target.tagName == 'IMG') {\n this.buttons.close.click();\n }\n };\n this.overlaysDiv.addEventListener('click', this.onClickBinded);\n this.content.mover.addEventListener('click', this.onClickBinded);\n //this.content.mover.append(this.buttons.prev, this.buttons.next);\n }\n onKeyDown(e) {\n //this.log('onKeyDown', e);\n if (e.key == 'ArrowRight') {\n this.buttons.next.click();\n }\n else if (e.key == 'ArrowLeft') {\n this.buttons.prev.click();\n }\n }\n setMoverToTarget(target, closing = false, fromRight = 0) {\n let mover = this.content.mover;\n if (!closing) {\n mover.innerHTML = '';\n mover.append(this.buttons.prev, this.buttons.next);\n }\n let wasActive = fromRight !== 0;\n let delay = wasActive ? 350 : 200;\n /* if(wasActive) {\n this.moveTheMover(mover);\n mover = this.setNewMover();\n } */\n ///////this.log('setMoverToTarget', target, closing, wasActive, fromRight);\n let rect = target.getBoundingClientRect();\n let containerRect = this.content.container.getBoundingClientRect();\n let transform = '';\n let left;\n let top;\n if (wasActive) {\n left = fromRight === 1 ? appPhotosManager_1.default.windowW : -containerRect.width;\n top = containerRect.top;\n }\n else {\n left = rect.left;\n top = rect.top;\n }\n transform += `translate(${left}px,${top}px) `;\n mover.style.width = containerRect.width + 'px';\n mover.style.height = containerRect.height + 'px';\n mover.classList.remove('cover');\n let borderRadius = '';\n if (!wasActive) {\n let scaleX = rect.width / containerRect.width;\n let scaleY = rect.height / containerRect.height;\n transform += `scale(${scaleX},${scaleY}) `;\n borderRadius = window.getComputedStyle(target.parentElement).getPropertyValue('border-radius');\n mover.style.borderRadius = borderRadius;\n }\n mover.style.transform = transform;\n /* if(wasActive) {\n this.log('setMoverToTarget', mover.style.transform);\n } */\n if (!closing) {\n let img;\n let video;\n if (target.tagName == 'DIV') { // means backgrounded with cover\n //img.style.objectFit = 'cover';\n img = new Image();\n img.src = target.style.backgroundImage.slice(5, -2);\n //mover.classList.add('cover');\n //mover.style.backgroundImage = target.style.backgroundImage;\n }\n else if (target.tagName == 'IMG') {\n img = new Image();\n img.src = target.src;\n img.style.objectFit = 'contain';\n }\n else if (target.tagName == 'VIDEO') {\n video = document.createElement('video');\n let source = document.createElement('source');\n source.src = target.querySelector('source').src;\n video.append(source);\n }\n if (img) {\n img.style.borderRadius = borderRadius;\n mover.prepend(img);\n }\n else if (video) {\n video.style.borderRadius = borderRadius;\n mover.prepend(video);\n }\n mover.style.display = '';\n setTimeout(() => {\n mover.classList.add(wasActive ? 'moving' : 'active');\n }, 0);\n }\n else {\n setTimeout(() => {\n this.overlaysDiv.classList.remove('active');\n }, 0);\n setTimeout(() => {\n mover.style.borderRadius = borderRadius;\n if (mover.firstElementChild) {\n mover.firstElementChild.style.borderRadius = borderRadius;\n }\n if (target.tagName == 'DIV') {\n mover.classList.add('cover');\n }\n }, delay / 2);\n setTimeout(() => {\n mover.innerHTML = '';\n mover.classList.remove('moving', 'active', 'cover');\n mover.style.display = 'none';\n }, delay);\n }\n return () => {\n mover.style.transform = `translate(${containerRect.left}px,${containerRect.top}px) scale(1,1)`;\n setTimeout(() => {\n mover.style.borderRadius = '';\n if (mover.firstElementChild) {\n mover.firstElementChild.style.borderRadius = '';\n }\n mover.classList.remove('cover');\n }, delay / 2);\n };\n }\n moveTheMover(mover, toLeft = true) {\n let windowW = appPhotosManager_1.default.windowW;\n let windowH = appPhotosManager_1.default.windowH;\n mover.classList.add('moving');\n let rect = mover.getBoundingClientRect();\n let newTransform = mover.style.transform.replace(/translate\\((.+?),/, /* 'translate(-' + windowW + 'px,', */ (match, p1) => {\n /////////this.log('replace func', match, p1);\n let x = +p1.slice(0, -2);\n x = toLeft ? -rect.width : windowW;\n return match.replace(p1, x + 'px');\n });\n ////////this.log('set newTransform:', newTransform, mover.style.transform, toLeft);\n mover.style.transform = newTransform;\n setTimeout(() => {\n mover.remove();\n }, 350);\n }\n setNewMover() {\n let newMover = document.createElement('div');\n newMover.classList.add('media-viewer-mover');\n let oldMover = this.content.mover;\n oldMover.parentElement.append(newMover);\n newMover.addEventListener('click', this.onClickBinded);\n return this.content.mover = newMover;\n }\n openMedia(message, target, prevTarget, nextTarget) {\n ////////this.log('openMedia doc:', message, prevTarget, nextTarget);\n let media = message.media.photo || message.media.document || message.media.webpage.document || message.media.webpage.photo;\n let isVideo = media.mime_type == 'video/mp4';\n let fromRight = 0;\n if (this.lastTarget !== null) {\n if (this.lastTarget === prevTarget) {\n fromRight = 1;\n }\n else if (this.lastTarget === nextTarget) {\n fromRight = -1;\n }\n }\n this.currentMessageID = message.mid;\n this.prevTarget = prevTarget || null;\n this.nextTarget = nextTarget || null;\n this.lastTarget = target;\n let container = this.content.container;\n if (container.firstElementChild) {\n container.innerHTML = '';\n }\n let date = new Date(media.date * 1000);\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n let dateStr = months[date.getMonth()] + ' ' + date.getDate() + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\n this.author.date.innerText = dateStr;\n let name = appPeersManager_1.default.getPeerTitle(message.fromID);\n this.author.nameEl.innerHTML = name;\n if (message.message) {\n this.content.caption.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(message.message, {\n entities: message.totalEntities\n });\n }\n else {\n this.content.caption.innerHTML = '';\n }\n appDialogsManager_1.default.loadDialogPhoto(this.author.avatarEl, message.fromID);\n // ok set\n let wasActive = fromRight !== 0;\n if (wasActive) {\n this.moveTheMover(this.content.mover, fromRight === 1);\n this.setNewMover();\n }\n else {\n window.addEventListener('keydown', this.onKeyDownBinded);\n this.overlaysDiv.classList.add('active');\n }\n ////////this.log('wasActive:', wasActive);\n let mover = this.content.mover;\n let maxWidth = appPhotosManager_1.default.windowW - 16;\n let maxHeight = appPhotosManager_1.default.windowH - 100;\n if (isVideo) {\n let size = appPhotosManager_1.default.setAttachmentSize(media, container, maxWidth, maxHeight);\n ////////this.log('will wrap video', media, size);\n let afterTimeout = this.setMoverToTarget(target, false, fromRight);\n //if(wasActive) return;\n setTimeout(() => {\n afterTimeout();\n wrappers_1.wrapVideo.call(this, media, mover, message, false, this.preloader).then(() => {\n if (this.currentMessageID != message.mid) {\n this.log.warn('media viewer changed video');\n return;\n }\n });\n }, 0);\n }\n else {\n let size = appPhotosManager_1.default.setAttachmentSize(media.id, container, maxWidth, maxHeight);\n let afterTimeout = this.setMoverToTarget(target, false, fromRight);\n //if(wasActive) return;\n setTimeout(() => {\n afterTimeout();\n this.preloader.attach(mover);\n let cancellablePromise = appPhotosManager_1.default.preloadPhoto(media.id, size);\n cancellablePromise.then((blob) => {\n if (this.currentMessageID != message.mid) {\n this.log.warn('media viewer changed photo');\n return;\n }\n ///////this.log('indochina', blob);\n let image = mover.firstElementChild || new Image();\n image.src = URL.createObjectURL(blob);\n mover.prepend(image);\n this.preloader.detach();\n }).catch(err => {\n this.log.error(err);\n });\n }, 0);\n }\n this.buttons.prev.style.display = this.prevTarget ? '' : 'none';\n this.buttons.next.style.display = this.nextTarget ? '' : 'none';\n }\n}\nexports.AppMediaViewer = AppMediaViewer;\nexports.default = new AppMediaViewer();\n" + "depth": 2, + "source": "// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_GET_URL_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/getUrl.js\");\nvar ___CSS_LOADER_URL_IMPORT_0___ = require(\"../../public/assets/img/camomile_blurred.jpg\");\nvar ___CSS_LOADER_URL_IMPORT_1___ = require(\"../assets/img/msg-tail-left.svg\");\nvar ___CSS_LOADER_URL_IMPORT_2___ = require(\"../assets/img/msg-tail-right.svg\");\nvar ___CSS_LOADER_URL_IMPORT_3___ = require(\"../assets/img/doc-in.svg\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\nvar ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___);\n// Module\nexports.push([module.id, \".chats-container{position:relative}.chats-container .input-search{position:relative;width:100%;margin-left:22px}.chats-container .input-search input{background-color:rgba(112,117,121,0.08);border:2px solid transparent;height:44px;border-radius:22px;box-sizing:border-box;padding:0px 1.5rem 0 40px;-webkit-transition:all .15s ease-out;transition:all .15s ease-out;width:100%;font-size:16px}.chats-container .input-search input:focus{background-color:rgba(112,117,121,0);border:2px solid #4EA4F6}.chats-container .input-search input:focus+.tgico{color:#4EA4F6;opacity:1}.chats-container .input-search .tgico{position:absolute;left:12px;top:50%;transform:translateY(-50%);text-align:center;font-size:24px;color:#707579;opacity:.6;-webkit-transition:all .15s ease-out;transition:all .15s ease-out}.chats-container .input-search .tgico:before{vertical-align:middle}.chats-container ul{margin:0;display:flex;flex-direction:column;width:100%}.chats-container li{padding:2px 0;background-color:#fff}.chats-container li>.rp{height:70px;max-height:70px;border-radius:8px;display:flex;align-items:flex-start;flex-direction:row;position:relative;cursor:pointer;padding:7px 8.5px;margin:0px 8px 2px 7px;overflow:hidden}.chats-container li>.rp:hover{background:rgba(112,117,121,0.08)}.chats-container li.active>.rp{background:rgba(112,117,121,0.08)}.chats-container .pinned-delimiter{display:flex;padding:6px 0 6px}.chats-container .pinned-delimiter span{margin:0;width:100%;height:1px;background-color:#DADCE0}.chats-container p{margin:0;display:flex;justify-content:space-between;flex-direction:row;align-items:flex-start;height:27px}.chats-container p .user-title+span{font-size:.75rem;padding:1px 0px 0px 0px}.chats-container p .user-last-message+span:not(.tgico-pinnedchat){font-size:.9rem}.chats-container span{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;line-height:27px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chats-container .user-avatar{flex:0 0 auto}.chats-container .user-caption{max-width:100%;max-height:100%;overflow:hidden;color:#707579;flex:1 1 auto;padding-right:3.5px;padding-left:9px;padding-top:1px}.chats-container .user-caption p:last-child{margin-top:-3px}.chats-container .user-title img.emoji{vertical-align:top;width:18px;height:18px}.chats-container .user-title span.emoji{overflow:visible;margin:0;width:auto;font-size:14px;margin-top:-1.5px}.chats-container .user-last-message img.emoji{width:20px;height:20px}.chats-container .user-last-message span.emoji{font-size:1.2rem;margin:0 .125rem;overflow:visible;margin-top:-1.5px}.chats-container .user-title,.chats-container .user-last-message{max-width:80%}.chats-container .user-title i,.chats-container .user-last-message i{font-style:normal;color:#50a2e9}.chats-container .message-status{margin-right:.1rem;margin-top:-.3rem}.chats-container .message-status[class*=\\\" tgico-\\\"]{color:#4DCD5E;font-size:1.25rem}.chats-container .message-status:before{vertical-align:middle}.chats-container .unread,.chats-container .unread-muted,.chats-container .tgico-pinnedchat{height:24px;text-align:center;line-height:24px;color:#fff;border-radius:12px;margin-top:1.5px;margin-right:-2px}.chats-container .unread,.chats-container .unread-muted{min-width:24px;padding:0 8px;font-weight:500}.chats-container .tgico-pinnedchat{width:24px;font-size:1.5rem}.chats-container .unread:empty,.chats-container .unread-muted:empty{visibility:hidden}.chats-container .unread{background:#4DCD5E}.chats-container .unread-muted,.chats-container .tgico-pinnedchat{background:#c5c9cc}.chats-container .search-group{width:100%;border-bottom:1px solid #DADCE0;padding:1rem 0 .5rem;margin-bottom:.5rem}.chats-container .search-group__name{color:#707579;padding:0 1.85rem;padding-bottom:1rem}.chat-container{display:flex;width:100%;align-items:center;height:100vh;overflow:hidden;flex-direction:column;position:relative;background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \");background-size:cover;background-position:center center}.chat-container #im-title{cursor:pointer}.chat-container #im-title span.emoji{vertical-align:inherit}.chat-container #chat-background-canvas{display:none}.chat-container #topbar{width:100%;background-color:#fff;box-sizing:border-box;user-select:none;-webkit-user-select:none;display:flex;align-items:center;box-shadow:0 1px 2px 0 rgba(16,35,47,0.07);padding:.5rem 15px;flex:0 0 auto;min-height:61px;max-height:61px;border-bottom:1px solid #DADCE0}.chat-container #topbar .chat-more-button{margin-left:8px}.chat-container #topbar .chat-info{flex-grow:1}.chat-container #topbar .content{flex:1;padding-left:17px;line-height:1.6}.chat-container #topbar .person{display:flex;align-items:center;cursor:pointer;margin-left:4px}.chat-container #topbar .person:hover{background-color:transparent}.chat-container #topbar .person .user-avatar{width:44px;height:44px;line-height:44px}.chat-container #topbar .person .bottom{font-size:14px;line-height:18px;color:#707579}.chat-container #topbar .person .bottom .online{color:#50a2e9}.chat-container #bubbles{width:100%;height:100%;max-height:100%;flex:1 1 auto;overflow:hidden;position:relative}.chat-container #bubbles>.scrollable{height:auto;position:absolute;bottom:0;left:0;display:block}.chat-container #bubbles:not(.scrolled-down){-webkit-mask-image:-webkit-linear-gradient(bottom, transparent, #000 20px);mask-image:linear-gradient(0deg, transparent 0, #000 20px)}.chat-container #bubbles:not(.scrolled-down) #bubbles-go-down{opacity:1}.chat-container #bubbles .preloader{width:100%;height:100%}.chat-container #bubbles .preloader svg{width:50px;height:50px}.chat-container #bubbles #bubbles-inner{width:100%;display:flex;flex-direction:column;flex-shrink:1;margin:0 auto;box-sizing:border-box;min-height:100%;justify-content:flex-end}.chat-container #bubbles #bubbles-inner.is-chat .is-in .bubble__container{margin-left:3rem}.chat-container #bubbles #bubbles-inner.is-scrolling .is-sticky{opacity:1}.chat-container #bubbles #bubbles-go-down{position:absolute;background-color:#fff;border-radius:50%;width:3.25rem;height:3.25rem;color:#9e9e9e;font-size:30px;display:flex;align-items:center;justify-content:center;right:17.5px;bottom:17.5px;cursor:pointer;opacity:0;transition:.2s opacity;user-select:none;-webkit-user-select:none}.chat-container #bubbles #bubbles-go-down:before{margin-left:.75px}.chat-container #bubbles .service{align-self:center}.chat-container #bubbles .service .service-msg{color:#fff;background-color:rgba(0,0,0,0.24);font-size:14px;padding:0 8px;line-height:24px;border-radius:12px;user-select:none;display:flex;align-items:center;justify-content:center}.chat-container #bubbles .service .service-msg .name{cursor:pointer;margin-right:5px}.chat-container #bubbles .bubble{padding-top:5px;display:grid;grid-template-columns:1fr 696px 1fr;grid-row-gap:0px}.chat-container #bubbles .bubble.is-date{position:-webkit-sticky;position:sticky;top:5px;z-index:2;pointer-events:none}.chat-container #bubbles .bubble.is-date.is-sticky{-webkit-transition:opacity .3s ease;transition:opacity .3s ease;opacity:0}.chat-container #bubbles .bubble:before,.chat-container #bubbles .bubble:after{content:\\\" \\\";width:100%}.chat-container #bubbles .bubble__container{min-width:56px;max-width:85%;border-radius:12px;box-shadow:0 1px 2px 0 rgba(16,35,47,0.15);position:relative;display:flex;flex-direction:column-reverse;width:max-content;height:fit-content}.chat-container #bubbles .bubble.service{padding:5px 0}.chat-container #bubbles .bubble.service .bubble__container{justify-self:center;max-width:100%}.chat-container #bubbles .bubble.forwarded .forward{opacity:0;position:absolute;right:-46px;bottom:0;width:38px;height:38px;font-size:1.5rem;align-items:center;display:flex;justify-content:center;color:#fff;border-radius:50%;background:rgba(0,0,0,0.16);cursor:pointer;transition:.2s opacity}.chat-container #bubbles .bubble.forwarded .forward svg{width:20px;height:20px}.chat-container #bubbles .bubble.is-group-last{padding-bottom:5px}.chat-container #bubbles .bubble:not(.forwarded):not(.is-group-first) .bubble__container>.name{display:none}.chat-container #bubbles .bubble:not(.forwarded):not(.is-group-first):not(.is-message-empty):not(.is-reply) .message{padding-top:6px}.chat-container #bubbles .bubble:not(.is-group-last) .user-avatar{display:none}.chat-container #bubbles .bubble:not(.hide-name) .audio{margin:4px 0}.chat-container #bubbles .bubble:hover .forward{opacity:1}.chat-container #bubbles .bubble .reply{width:auto}.chat-container #bubbles .bubble .reply .reply-content{height:auto;min-height:32px}.chat-container #bubbles .bubble.photo .bubble__container,.chat-container #bubbles .bubble.video .bubble__container{width:min-content}.chat-container #bubbles .bubble.photo .box.web,.chat-container #bubbles .bubble.video .box.web{max-width:100%}.chat-container #bubbles .bubble.webpage .time{float:none;width:0}.chat-container #bubbles .bubble img.emoji{height:18px;width:18px;margin:0 .05rem;vertical-align:bottom}.chat-container #bubbles .bubble span.emoji{height:auto;width:auto;overflow:visible;vertical-align:unset}.chat-container #bubbles .bubble.emoji-big{font-size:0}.chat-container #bubbles .bubble.emoji-big .bubble__container{background:none !important;box-shadow:none;line-height:1;user-select:none;-webkit-user-select:none}.chat-container #bubbles .bubble.emoji-big .attachment{padding-top:.5rem;padding-bottom:1.5rem;max-width:fit-content !important;max-height:fit-content !important}.chat-container #bubbles .bubble.emoji-big .attachment span.emoji{height:auto;width:auto}.chat-container #bubbles .bubble.emoji-1x{font-size:96px}.chat-container #bubbles .bubble.emoji-1x img.emoji{height:64px;width:64px}.chat-container #bubbles .bubble.emoji-2x{font-size:64px}.chat-container #bubbles .bubble.emoji-2x img.emoji{height:48px;width:48px}.chat-container #bubbles .bubble.emoji-3x{font-size:52px}.chat-container #bubbles .bubble.emoji-3x img.emoji{height:32px;width:32px}.chat-container #bubbles .bubble.sticker .bubble__container,.chat-container #bubbles .bubble.round .bubble__container{cursor:pointer;background:none !important;box-shadow:none}.chat-container #bubbles .bubble.sticker img,.chat-container #bubbles .bubble.round img{object-fit:contain}.chat-container #bubbles .bubble.sticker.is-message-empty .message,.chat-container #bubbles .bubble.round.is-message-empty .message{display:none}.chat-container #bubbles .bubble.sticker.is-message-empty:hover .message,.chat-container #bubbles .bubble.round.is-message-empty:hover .message{display:block}.chat-container #bubbles .bubble.sticker .attachment{border-radius:0}.chat-container #bubbles .bubble.sticker .bubble__container{max-width:200px;max-height:200px}.chat-container #bubbles .bubble.round .attachment{max-width:200px;max-height:200px}.chat-container #bubbles .bubble.round .attachment img{border-radius:50%}.chat-container #bubbles .bubble:not(.is-message-empty) .attachment{border-bottom-left-radius:0;border-bottom-right-radius:0}.chat-container #bubbles .bubble:not(.emoji-big) .attachment{font-size:0}.chat-container #bubbles .bubble .attachment{max-width:100%;border-radius:inherit;overflow:hidden;display:flex;justify-content:center;position:relative}.chat-container #bubbles .bubble .attachment img,.chat-container #bubbles .bubble .attachment video{width:auto;height:auto;max-width:100%;cursor:pointer}.chat-container #bubbles .bubble:not(.sticker) .attachment{max-width:380px;max-height:380px;width:max-content}.chat-container #bubbles .bubble:not(.sticker) img:not(.emoji),.chat-container #bubbles .bubble:not(.sticker) video{object-fit:cover;width:100%;height:100%}.chat-container #bubbles .bubble.round.video .attachment{max-height:200px;max-width:200px}.chat-container #bubbles .bubble .box,.chat-container #bubbles .bubble .reply{font-size:.95rem;margin:4px 4px 4px 6px;padding:4px;margin-bottom:-5px;border-radius:4px}.chat-container #bubbles .bubble .box.web,.chat-container #bubbles .bubble .reply.web{margin-top:-6px;max-width:100%;overflow:hidden}.chat-container #bubbles .bubble .box.web .preview,.chat-container #bubbles .bubble .reply.web .preview{max-height:300px;max-width:380px;border-radius:4px;margin-bottom:3px;overflow:hidden;user-select:none;-webkit-user-select:none;cursor:pointer;position:relative;width:max-content}.chat-container #bubbles .bubble .box.web .preview img,.chat-container #bubbles .bubble .box.web .preview video,.chat-container #bubbles .bubble .reply.web .preview img,.chat-container #bubbles .bubble .reply.web .preview video{max-width:100%}.chat-container #bubbles .bubble .box.web .title,.chat-container #bubbles .bubble .reply.web .title{letter-spacing:-0.2px;line-height:1.2;font-weight:500}.chat-container #bubbles .bubble .box.web .name,.chat-container #bubbles .bubble .reply.web .name{letter-spacing:-0.3px;display:block}.chat-container #bubbles .bubble .box.web .name:hover,.chat-container #bubbles .bubble .reply.web .name:hover{text-decoration:underline}.chat-container #bubbles .bubble .box.web .text,.chat-container #bubbles .bubble .reply.web .text{overflow:hidden;text-overflow:ellipsis;line-height:1.2;letter-spacing:-0.3px;margin-top:2px;font-size:0.965rem}.chat-container #bubbles .bubble .box .quote,.chat-container #bubbles .bubble .reply .quote{padding-left:0.55rem;max-width:100%;overflow:hidden;width:100%}.chat-container #bubbles .bubble .box .text,.chat-container #bubbles .bubble .reply .text{line-height:1.2}.chat-container #bubbles .bubble .box .name,.chat-container #bubbles .bubble .box .reply-title,.chat-container #bubbles .bubble .reply .name,.chat-container #bubbles .bubble .reply .reply-title{font-weight:500;display:inline !important}.chat-container #bubbles .bubble .reply{max-width:300px;margin-bottom:6px;margin-top:0;cursor:pointer}.chat-container #bubbles .bubble.is-reply.emoji-big .reply,.chat-container #bubbles .bubble.is-reply.sticker .reply{padding:10px;border-radius:12px;border:1px solid #ccc;max-width:300px;height:54px;max-height:54px;white-space:nowrap;position:absolute;top:0;margin-bottom:0}.chat-container #bubbles .bubble.is-reply.emoji-big .reply .reply-content,.chat-container #bubbles .bubble.is-reply.sticker .reply .reply-content{margin-top:0}.chat-container #bubbles .bubble.is-reply .reply-content{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.chat-container #bubbles .bubble .message{font-size:16px;padding:0 .6rem 6px .6rem;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:#000;line-height:21px;word-break:break-word}.chat-container #bubbles .bubble .message *{overflow:hidden;text-overflow:ellipsis}.chat-container #bubbles .bubble .message:last-child{padding-top:6px}.chat-container #bubbles .bubble .message .emoji{font-size:1.2rem}.chat-container #bubbles .bubble.is-message-empty .message{position:absolute;bottom:.1rem;right:.2rem;border-radius:12px;background-color:rgba(0,0,0,0.4);padding:0 .2rem;z-index:2}.chat-container #bubbles .bubble.is-message-empty .message .time{color:#fff;padding:0;display:flex;align-items:center;width:auto}.chat-container #bubbles .bubble.is-message-empty .message .time .inner{margin-bottom:0;position:relative;padding:0 2.5px;bottom:0}.chat-container #bubbles .bubble .time{font-size:.8rem;user-select:none;float:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:20px;line-height:20px}.chat-container #bubbles .bubble .time .inner{position:absolute;bottom:0;right:0;font-size:12px;display:flex;align-items:center;line-height:1}.chat-container #bubbles .bubble .time .inner i{font-size:1.15rem;margin-right:.4rem;margin-left:.1rem}.chat-container #bubbles .bubble .time .inner i.edited{overflow:visible;font-size:.8rem}.chat-container #bubbles .bubble.is-edited.channel-post .time{min-width:calc(5rem + 46px)}.chat-container #bubbles .bubble.channel-post .time{width:5rem}.chat-container #bubbles .bubble.is-edited .time{width:90px}.chat-container #bubbles .bubble .user-avatar{position:absolute;left:-3rem;width:40px;height:40px;line-height:40px;bottom:0;font-size:1rem;cursor:pointer}.chat-container #bubbles .bubble:not(.forwarded).hide-name .name,.chat-container #bubbles .bubble.emoji-big .name{display:none}.chat-container #bubbles .bubble .name{cursor:pointer}.chat-container #bubbles .bubble__container>.name{padding:5px .6rem 0 .6rem;font-weight:500;color:#50a2e9;font-size:.9rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.chat-container #bubbles .bubble:not(.webpage).photo .name,.chat-container #bubbles .bubble:not(.webpage).video .name{padding-bottom:6px}.chat-container #bubbles .bubble:not(.webpage).photo:not(.is-message-empty) .message,.chat-container #bubbles .bubble:not(.webpage).video:not(.is-message-empty) .message{padding-top:6px}.chat-container #bubbles .bubble.hide-name:not(.is-reply):not(.is-message-empty) .message{padding-top:6px}.chat-container #bubbles .bubble:not(.sticker):not(.emoji-big).hide-name .reply,.chat-container #bubbles .bubble:not(.sticker):not(.emoji-big):not(.is-group-first) .reply{margin-top:6px}.chat-container #bubbles .bubble:not(.sticker):not(.emoji-big):not(.round).is-group-last .bubble__container:after{position:absolute;bottom:0;width:11px;height:20px;background-repeat:no-repeat repeat;content:'';background-size:11px 20px;background-position-y:1px}.chat-container #bubbles .bubble.photo.is-message-empty.is-group-last.is-group-last .bubble__container:after,.chat-container #bubbles .bubble.video:not(.round).is-message-empty.is-group-last.is-group-last .bubble__container:after{display:none}.chat-container #bubbles .bubble.photo.is-message-empty.is-group-last .attachment,.chat-container #bubbles .bubble.video:not(.round).is-message-empty.is-group-last .attachment{overflow:visible}.chat-container #bubbles .bubble__media-container{cursor:pointer}.chat-container #bubbles .bubble-audio.is-in .time{width:inherit}.chat-container #bubbles .bubble-audio.is-out .time{width:inherit}.chat-container #bubbles .is-in .bubble__container{margin-right:auto;background-color:#ffffff;border-radius:6px 12px 12px 6px}.chat-container #bubbles .is-in.is-group-first .bubble__container{border-radius:12px 12px 12px 6px}.chat-container #bubbles .is-in.is-group-last .bubble__container{border-radius:6px 12px 12px 0px}.chat-container #bubbles .is-in.is-group-last .bubble__container:after{left:-8.4px;background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \")}.chat-container #bubbles .is-in.is-group-first.is-group-last .bubble__container{border-radius:12px 12px 12px 0px}.chat-container #bubbles .is-in.forwarded .attachment,.chat-container #bubbles .is-in.is-reply .attachment,.chat-container #bubbles .is-in:not(.hide-name).is-message-empty .attachment{border-top-left-radius:0;border-top-right-radius:0}.chat-container #bubbles .is-in a{color:#50a2e9}.chat-container #bubbles .is-in .quote:hover,.chat-container #bubbles .is-in .reply:hover{background-color:rgba(112,117,121,0.08)}.chat-container #bubbles .is-in.is-reply.emoji-big .reply,.chat-container #bubbles .is-in.is-reply.sticker .reply{left:calc(100% + 10px);background-color:#fff}.chat-container #bubbles .is-in .quote{border-left:2px #50a2e9 solid}.chat-container #bubbles .is-in .quote *{overflow:hidden;text-overflow:ellipsis}.chat-container #bubbles .is-in .quote .name,.chat-container #bubbles .is-in .reply-title{color:#50a2e9}.chat-container #bubbles .is-in .time{color:#a3adb6;width:36px}.chat-container #bubbles .is-in .time .inner{padding:0 7px 0 5px;margin-bottom:4px}.chat-container #bubbles .is-in.photo.is-message-empty.is-group-last .attachment,.chat-container #bubbles .is-in.video:not(.round).is-message-empty.is-group-last .attachment{border-bottom-left-radius:0}.chat-container #bubbles .is-in.photo.is-message-empty.is-group-last .attachment .bubble__media-container,.chat-container #bubbles .is-in.video:not(.round).is-message-empty.is-group-last .attachment .bubble__media-container{margin-left:-9px}.chat-container #bubbles .is-out .bubble__container{margin-left:auto;background-color:#eeffde;border-radius:12px 6px 6px 12px}.chat-container #bubbles .is-out.is-group-first .bubble__container{border-radius:12px 12px 6px 12px}.chat-container #bubbles .is-out.is-group-last .bubble__container{border-radius:12px 6px 0px 12px}.chat-container #bubbles .is-out.is-group-last .bubble__container:after{right:-8.4px;background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \")}.chat-container #bubbles .is-out.is-group-first.is-group-last .bubble__container{border-radius:12px 12px 0px 12px}.chat-container #bubbles .is-out.forwarded .attachment,.chat-container #bubbles .is-out.is-reply .attachment{border-top-left-radius:0;border-top-right-radius:0}.chat-container #bubbles .is-out .quote:hover,.chat-container #bubbles .is-out .reply:hover{background-color:rgba(77,205,94,0.12)}.chat-container #bubbles .is-out.is-reply.emoji-big .box,.chat-container #bubbles .is-out.is-reply.emoji-big .reply,.chat-container #bubbles .is-out.is-reply.sticker .box,.chat-container #bubbles .is-out.is-reply.sticker .reply{background-color:#eeffde;right:calc(100% + 10px);border-color:rgba(77,205,94,0.12)}.chat-container #bubbles .is-out .quote{border-left:2px #50af4f solid}.chat-container #bubbles .is-out .reply-border{background-color:#50af4f}.chat-container #bubbles .is-out .quote .name,.chat-container #bubbles .is-out .reply-title{color:#50af4f}.chat-container #bubbles .is-out .time{color:#50af4f;width:50px;display:inline-block}.chat-container #bubbles .is-out .time .inner{padding:0 4px 0 4px;bottom:1px}.chat-container #bubbles .is-out .time .tgico:after{font-size:19px;vertical-align:middle;margin-left:1px}.chat-container #bubbles .is-out.forwarded .name{color:#50af4f}.chat-container #bubbles .is-out.is-read .time .tgico:after{content:\\\"\\\"}.chat-container #bubbles .is-out.is-sent .time .tgico:after{content:\\\"\\\"}.chat-container #bubbles .is-out.is-sending .time .tgico:after{content:\\\"\\\"}.chat-container #bubbles .is-out.is-reply .name{display:none}.chat-container #bubbles .is-out.is-edited .time{width:85px}.chat-container #bubbles .is-out .user-avatar{left:auto;right:-2.5rem}.chat-container #bubbles .is-out .audio-waveform rect{fill:#B8DDA9}.chat-container #bubbles .is-out .audio-waveform rect.active{fill:#68AB5A}.chat-container #bubbles .is-out .audio-time,.chat-container #bubbles .is-out .audio-subtitle{color:#68AB5A}.chat-container #bubbles .is-out .audio-toggle,.chat-container #bubbles .is-out .audio-download{background-color:#4FAE4E}.chat-container #bubbles .is-out.photo.is-message-empty.is-group-last .attachment,.chat-container #bubbles .is-out.video:not(.round).is-message-empty.is-group-last .attachment{border-bottom-right-radius:0}.chat-container #bubbles .is-out.photo.is-message-empty.is-group-last .attachment .bubble__media-container,.chat-container #bubbles .is-out.video:not(.round).is-message-empty.is-group-last .attachment .bubble__media-container{margin-right:-9px}.chat-container #chat-input{display:flex;align-items:center;width:100%;max-width:696px;padding-top:.35rem;padding-bottom:21px;justify-content:space-between;flex:0 0 auto;position:relative}.chat-container #chat-input #input-message{background:none;border:none;width:100%;font-size:16px;padding:10px 9px;max-height:30rem;overflow-y:none;resize:none;border:none;outline:none;cursor:text}.chat-container #chat-input [contenteditable=true]:empty:before{content:attr(data-placeholder);color:#a2acb4;display:block}.chat-container #chat-input .btn-circle{flex:0 0 auto;font-size:1.5rem;line-height:1.5rem;height:54px;width:54px;color:#9e9e9e;background-color:#fff;align-self:flex-end}.chat-container #chat-input .btn-circle.tgico-send{color:#50a2e9}.chat-container #chat-input .os-scrollbar-handle{background:rgba(0,0,0,0.2)}.chat-container .input-message{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3.75rem);justify-content:center;background-color:#fff;border-radius:12px;border-bottom-right-radius:0;box-shadow:0 1px 2px 0 rgba(16,35,47,0.07);margin-right:9px;padding:4.5px .5rem;min-height:54px;max-height:30rem;caret-color:#4EA4F6;flex:1;position:relative}.chat-container .input-message:after{position:absolute;bottom:-1px;width:11px;height:20px;background-repeat:no-repeat repeat;content:'';background-size:11px 20px;right:-9px;background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \");transform:scaleX(-1)}.chat-container .input-message #attach-file.menu-open{color:#50a2e9}.chat-container .input-message>div{display:flex;justify-content:space-between;align-items:center;width:100%}.chat-container .input-message .reply-wrapper{justify-content:flex-start;overflow:hidden;transition:.2s all;height:0px}.chat-container .input-message .reply-wrapper.active{height:39px}.chat-container .input-message .reply-wrapper .reply{width:100%;margin-left:.5rem;min-height:35px}.chat-container .input-message .new-message-wrapper{align-items:flex-end}.chat-container .input-message .new-message-wrapper .btn-icon:before{vertical-align:bottom}.chat-container .input-message .input-message-container{width:1%;max-height:inherit;flex:1 1 auto;position:relative;overflow:hidden}.chat-container .input-message .input-message-container>.scrollable{position:relative}.chat-container .input-message .btn-icon{display:block;transition:.2s color;flex:0 0 auto;font-size:24px;line-height:24px;padding:10px 7px 9px 7.5px;color:#8d969c}.chat-container .input-message .btn-icon.active{color:#50a2e9}.chat-container .input-message .emoji{font-size:24px;height:24px;width:24px}.chat-container .pinned-message,.chat-container .reply{cursor:pointer;display:flex;flex-direction:row;align-items:center;overflow:hidden;box-sizing:border-box;width:187px;margin-right:1rem;max-height:35px;position:relative}.chat-container .pinned-message.is-reply-media .pinned-message-content,.chat-container .pinned-message.is-reply-media .reply-content,.chat-container .reply.is-reply-media .pinned-message-content,.chat-container .reply.is-reply-media .reply-content{padding-left:40px}.chat-container .pinned-message:hover,.chat-container .reply:hover{background-color:rgba(112,117,121,0.08)}.chat-container .pinned-message-border,.chat-container .reply-border{height:32px;border-radius:1px;min-width:2px;background:#50a2e9}.chat-container .pinned-message-content,.chat-container .reply-content{margin-left:8px;flex-grow:1;flex-shrink:1;overflow:hidden;pointer-events:none;position:relative;height:32px;display:flex;flex-direction:column;justify-content:space-between}.chat-container .pinned-message-title,.chat-container .reply-title{color:#50a2e9}.chat-container .pinned-message-title,.chat-container .pinned-message-subtitle,.chat-container .reply-title,.chat-container .reply-subtitle{font-size:14px;line-height:15px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-container .pinned-message-subtitle,.chat-container .reply-subtitle{white-space:nowrap;color:#111}.chat-container .pinned-message-media,.chat-container .reply-media{height:32px;width:32px;border-radius:8px;overflow:hidden;position:absolute;left:0;top:0;background-repeat:no-repeat;background-size:cover;background-position:center center}.chat-container .pinned-message img.emoji,.chat-container .reply img.emoji{height:16px;width:16px;vertical-align:top}.chat-container .pinned-message span.emoji,.chat-container .reply span.emoji{font-size:16px;vertical-align:unset}#bubble-contextmenu{position:fixed;right:auto;bottom:auto}.popup.popup-delete-message .popup-header{margin-bottom:1rem}.popup .popup-buttons{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end}.popup .popup-buttons button{background:none;outline:none;border:none;padding:.5rem .5rem;text-transform:uppercase;transition:.2s;border-radius:8px;cursor:pointer;color:#50a2e9}.popup .popup-buttons button:hover{background-color:rgba(112,117,121,0.08)}.popup .popup-buttons button+button{margin-top:.5rem}.sidebar{background-color:#fff;overflow:hidden}.sidebar-left{border-right:1px solid #DADCE0}.sidebar-right{border-left:1px solid #DADCE0}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:7.5px 20px 7.5px 15px;min-height:60px}.sidebar-header__title{flex:1;font-weight:500;padding-left:23px;font-size:20px}.sidebar-header .btn-icon+.btn-icon{margin-left:.5rem}.sidebar-close-button{padding-left:10px}.sidebar-content{width:100%;max-height:100%;height:100%;overflow:hidden;display:flex;position:relative}.sidebar-content>div{width:100%}#column-left{display:flex;flex-direction:column}#column-left #chats-container{max-height:100%;overflow:hidden;position:relative}#column-left .sidebar-header__btn-container{position:relative;width:39.75px;height:39px}#column-left .sidebar-header__btn-container>*{visibility:hidden;opacity:0;position:absolute;left:0;top:0;transition:.2s opacity;z-index:2}#column-left .sidebar-header__btn-container>*:before{transition:.2s transform;transform:rotate(180deg)}#column-left .sidebar-header__btn-container>*+*{margin-left:0 !important}#column-left .sidebar-header__btn-container>*.active{opacity:1;visibility:visible;color:#707579}#column-left .sidebar-header__btn-container>*.active:before{transform:rotate(0deg)}#column-left .sidebar-tools-button .btn-menu{width:217px}#column-left .sidebar-tools-button .btn-menu .archived-count{border-radius:12px;min-width:24px;padding:0 8px;height:24px;text-align:center;line-height:24px;color:#fff;font-weight:500;background-color:#c5c9cc;justify-self:flex-end;position:absolute;right:16px}#column-left .sidebar-tools-button .btn-menu .archived-count:empty{display:none}#column-right{width:0%;position:relative;transition:.2s ease-in-out}#column-right .profile-container>.scrollable{min-width:25vw;display:flex;flex-direction:column}@media (min-width: 1680px){#column-right .profile-container>.scrollable{min-width:calc(1680px / 4 - 1px)}}#column-right:not(.active){border-left-width:0}#column-right.active{width:25%}#column-right .sidebar-header{flex:0 0 auto;padding:10px 20px 11px 15px}#column-right #search-private-container .chats-container{position:relative;flex:1 1 auto}.profile-content{flex:1 1 auto;display:flex;flex-direction:column;height:100%}.profile-content [type=\\\"checkbox\\\"]+span{padding-left:54px;margin-left:-54px}.profile-content-wrapper{flex:0 0 auto;display:flex;flex-direction:column}.profile-content .content-container{width:100%;max-width:100%;flex:1 1 auto;position:relative}.profile-name{text-align:center;font-size:24px;line-height:1.4;font-weight:500}.profile-name span.emoji{vertical-align:inherit;min-width:min-content}.profile-subtitle{text-align:center;color:#707579;font-size:14px;margin-bottom:2px}.profile-subtitle.online{color:#50a2e9}.profile-row{display:flex;width:100%;flex-direction:column;padding-left:80px;padding-right:12px;font-size:15px;position:relative;margin-top:31px;line-height:1.4}.profile-row:before{position:absolute;left:24px;font-size:24px;color:#707579}.profile-row p{color:#000;margin:0;font-size:1rem}.profile-row-bio .emoji{width:24px;height:24px}.profile-row-label{color:#9e9e9e !important;font-size:14px !important}.profile-avatar.user-avatar{width:120px;height:120px;margin:0 auto 21px;font-size:4rem !important}.profile-avatar.user-avatar.tgico-avatar_deletedaccount{font-size:6rem}.profile-tabs{margin-top:36px}.profile-tabs-content{min-height:100%;position:absolute}.profile-tabs-content>div{position:relative}.profile-tabs-content .preloader{padding:0;position:absolute;height:100%}.profile-tabs-content .preloader>svg{height:50px;width:50px}.profile-tabs-content #content-media{width:100%;display:flex;flex-direction:column;padding-top:4px}.profile-tabs-content #content-media>div{display:grid;grid-template-columns:1fr 1fr 1fr;grid-auto-rows:max-content;grid-gap:3.5px;place-items:start;padding-top:3.5px}.profile-tabs-content #content-media>div>div{width:100%;cursor:pointer;background-repeat:no-repeat;background-size:cover;background-position:center center;display:flex;justify-content:center;align-items:center}.profile-tabs-content #content-media>div>div::before{content:\\\"\\\";display:inline-block;width:1px;height:0;padding-bottom:100%}.profile-tabs-content #content-docs{padding:7px 20px}.profile-tabs-content #content-docs .document{padding-left:4rem;padding-right:1rem;height:calc(50px + 1.5rem)}.profile-tabs-content #content-docs .document-ico,.profile-tabs-content #content-docs .document-download{width:48px;height:48px}.profile-tabs-content #content-docs .document-name{font-weight:normal;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis}.profile-tabs-content #content-links{padding:0 30px 15px 15px}.profile-tabs-content #content-links>div{display:flex;flex-direction:column;margin-top:20px;margin-left:5px;padding-bottom:2px;position:relative;padding-left:60px;overflow:hidden;min-height:58px}.profile-tabs-content #content-links>div .preview{height:48px;width:48px;border-radius:5px;overflow:hidden;position:absolute;left:0;top:0;background-repeat:no-repeat;background-size:cover;background-position:center center}.profile-tabs-content #content-links>div .preview.empty{display:flex;align-items:center;justify-content:center;font-size:2rem;color:#fff;text-transform:uppercase;background-color:#50a2e9}.profile-tabs-content #content-links>div .url{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.profile-tabs-content #content-links .title{font-size:16px;margin-top:3px}.profile-tabs-content #content-links .subtitle{font-size:14px}.profile-tabs-content #content-audio{padding:0 15px 15px 15px}.profile-tabs-content #content-audio>div{margin-top:15px;padding-bottom:10px;min-height:60px}.media-viewer{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.9);display:flex;align-items:center;justify-content:center}.media-viewer-author{position:absolute;top:0;left:0;height:60px;padding:8px 8px 8px 80px;display:flex;flex-direction:column;justify-content:center;color:#8b8b8b;transition:.2s}.media-viewer-author:hover{color:#fff}.media-viewer-author .user-avatar{width:44px;height:44px;position:absolute;top:8px;left:20px}.media-viewer-author .media-viewer-name{font-weight:500}.media-viewer-author .media-viewer-date{font-size:15px}.media-viewer-buttons{position:absolute;top:0;right:0;display:flex;flex-flow:row nowrap;padding:8px}.media-viewer-buttons .btn-icon{margin:0 .25rem;transition:.2s}.media-viewer-buttons .btn-icon:hover{color:#fff}.media-viewer-content{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;max-height:100%;max-width:100%;overflow:hidden}.media-viewer-content .media-viewer-stub{flex:1}.media-viewer-content .media-viewer-container{align-self:center;position:relative;max-width:100%;max-height:100%;overflow:hidden;flex:1 1 auto;display:flex;align-items:center}.media-viewer-content .media-viewer-media{display:flex;align-items:center;justify-content:center;visibility:hidden}.media-viewer-content .media-viewer-media.loading img,.media-viewer-content .media-viewer-media.loading video{object-fit:cover;width:100%;height:100%}.media-viewer-content img,.media-viewer-content video{max-height:calc(100vh - 100px);max-width:calc(100vw - 16px)}.media-viewer-content img{object-fit:contain}.media-viewer-content video{width:100%;height:100%;object-fit:contain}.media-viewer-content .media-viewer-caption{flex:1;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#707579;transition:.2s}.media-viewer-content .media-viewer-caption:hover{color:#fff}.media-viewer-switcher-left,.media-viewer-switcher-right{position:absolute;left:0;top:0;width:10rem;height:100%;cursor:pointer;z-index:5}.media-viewer-switcher-left:hover>span,.media-viewer-switcher-right:hover>span{opacity:1}.media-viewer-switcher-right{left:auto;right:0}.media-viewer-prev-button,.media-viewer-next-button{cursor:pointer;position:absolute;color:#fff;font-size:3rem;left:2rem;top:50%;transform:translateY(-50%) rotate(90deg);opacity:0;transition:.2s opacity;z-index:5}.media-viewer-next-button{left:auto;right:2rem;transform:translateY(-50%) rotate(-90deg)}.media-viewer-mover{position:fixed !important;z-index:4;display:flex;justify-content:center;align-items:center;min-height:auto !important;left:0;top:0;transform-origin:top left;overflow:hidden;background-repeat:no-repeat;background-size:cover;background-position:center center}.media-viewer-mover .ckin__player{width:100%;height:100%}.media-viewer-mover img,.media-viewer-mover video{width:100%;height:100%;opacity:1;transition:.2s opacity;user-select:none}.media-viewer-mover.cover{align-items:center}.media-viewer-mover.cover img,.media-viewer-mover.cover video{width:auto;height:auto;overflow:hidden;opacity:0}.media-viewer-mover.active{transition:.2s transform}.media-viewer-mover.moving{transition:350ms transform ease}.ckin__player{letter-spacing:0.02em}.ckin__overlay{position:relative}.ckin__overlay:before{background:radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.5) 100%)}.ckin__overlay--2:before{background:rgba(24,24,24,0.8)}.ckin__player.ckin__fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:100%;width:100%;z-index:10000000;background:#000;border-radius:0 !important;display:-ms-flexbox;display:flex}.ckin__player.ckin__fullscreen video{max-height:none;max-width:none}.default{border:0 solid rgba(0,0,0,0.2);box-shadow:0 0 20px rgba(0,0,0,0.2);position:relative;font-size:0;overflow:hidden;cursor:pointer}.default:before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;transition:opacity .2s;opacity:1;visibility:visible}.default__title{position:absolute;left:20px;top:20px;z-index:1;font-size:24px;color:rgba(255,255,255,0.8);font-style:italic}.default__button{background:none;border:0;color:#fff;outline:0;padding:3px 10px 6px 10px;cursor:pointer;font-size:24px;line-height:1;display:flex;align-items:center}.default__button i{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.default__button--big{background:none;border:0;line-height:1;color:#fff;text-align:center;outline:0;padding:0;cursor:pointer;position:absolute;opacity:1;visibility:visible;top:50%;left:50%;-ms-transform:translate(-50%, -50%) scale(1);transform:translate(-50%, -50%) scale(1);font-size:64px;transition:all .2s;-ms-touch-action:manipulation;touch-action:manipulation}.default__slider{width:10px;height:30px}.default__controls{position:absolute;bottom:0;right:0;left:0;transition:all .3s;text-align:left;direction:ltr;border-radius:0 0 5px 5px;z-index:6}.default__gradient-bottom{height:49px;padding-top:93px;bottom:0;z-index:2;background-position:bottom;width:100%;position:absolute;background-repeat:repeat-x;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==);-moz-transition:all .3s;-webkit-transition:all .3s;transition:all .3s;pointer-events:none}.default.is-playing .default__gradient-bottom{-ms-transform:translateY(50px);transform:translateY(50px)}.default.is-playing:hover .default__gradient-bottom{-ms-transform:translateY(0px);transform:translateY(0px)}.default.is-playing:before{opacity:0;visibility:hidden;-ms-transform:translate(-50%, -50%) scale(1.3);transform:translate(-50%, -50%) scale(1.3)}.default.is-playing .default__button--big{opacity:0;visibility:hidden}.default.is-playing .default__controls{-ms-transform:translateY(52px);transform:translateY(52px)}.default.is-playing:hover .default__controls{-ms-transform:translateY(0);transform:translateY(0)}.default .media-progress{margin:0 16px;height:5px;transition:height 0.3s;background:rgba(255,255,255,0.38);border-radius:4px;overflow:visible}.default .media-progress__filled{background:#63a2e3;transform-origin:left;border-radius:4px;height:5px;transform:scaleX(0)}@media (max-width: 480px){.ckin__player button{font-size:18px}}video::-webkit-media-controls-enclosure{display:none !important}.media-progress{position:relative;cursor:pointer}.media-progress input[type=range]{-webkit-appearance:none;-moz-appearance:none;background:transparent;height:4.5px;cursor:pointer;padding:0;outline:none}.media-progress input[type=range]:focus{outline:none}.media-progress input[type=range]:focus::-webkit-slider-runnable-track{background:transparent}.media-progress input[type=range]:focus::-moz-range-track{outline:none}.media-progress input[type=range]::-webkit-slider-runnable-track{width:100%;cursor:pointer;border-radius:1.3px;-webkit-appearance:none;transition:all 0.4s ease}.media-progress input[type=range]::-webkit-slider-thumb{height:15px;width:15px;border-radius:16px;background:#63a2e3;cursor:pointer;-webkit-appearance:none;margin-left:-1px}.media-progress input[type=range]::-moz-range-track{width:100%;height:8.4px;cursor:pointer;border:1px solid transparent;background:transparent;border-radius:1.3px}.media-progress input[type=range]::-moz-range-thumb{height:14px;width:14px;border-radius:50px;border:1px solid #63a2e3;background:#63a2e3;cursor:pointer;margin-top:5px}.media-progress__seek{position:absolute;top:0;width:100%;cursor:pointer;margin:0}input[type=range]::-ms-track{visibility:hidden}input[type=range]::-ms-ticks{background:none;color:none;border:none}input[type=range]::-ms-thumb{visibility:hidden}input[type=range]::-ms-tooltip{visibility:hidden}.left-controls{display:flex;align-items:center}.right-controls{float:right}.bottom-controls{padding:3px 4px 0px 4px;display:flex;justify-content:space-between;align-items:center}.time{float:right;padding:7px 0px 9px 14px;font-size:15px;color:white}.circle .circle-time{color:#fff;font-size:13px;float:left}.circle .circle-time-left{position:absolute;top:3px;left:2px;border-radius:12px;background-color:rgba(0,0,0,0.23);padding:1px 7px 2px 7px;z-index:2;display:flex;align-items:center}video[data-ckin=\\\"circle\\\"]{border-radius:50%;overflow:hidden}.progress-ring{position:absolute;top:0;left:0;cursor:pointer}.progress-ring__circle{transition:stroke-dashoffset}.ckin__player.circle{position:relative;width:200px;height:200px}.iconVolume{padding:0 1px 0 3px;display:flex;align-items:center;font-size:1.25rem;color:#fff}.emoji-dropdown{position:absolute;left:0;top:calc(-420px + -0.75rem);display:flex;flex-direction:column;width:420px;height:420px;background:#fff;box-shadow:0px 5px 10px 5px rgba(16,35,47,0.14);border-radius:10px;z-index:2;display:flex;overflow:hidden;transition:all 0.2s ease-out;transform:scale(0);transform-origin:0 100%}.emoji-dropdown.active{transition:all 0.2s ease-in;transform:scale(1)}.emoji-dropdown>.menu-horizontal{padding:0px 58px 0px 58px;font-weight:500;margin-top:2px}.emoji-dropdown>.menu-horizontal>li.active:after{left:29px;right:28px}.emoji-dropdown .emoji-container{width:100%;max-width:100%;overflow:hidden;height:100%}.emoji-dropdown .btn-icon{color:#8d969c}.emoji-dropdown .tabs-container{height:100%}.emoji-dropdown .tabs-container .emoji-category{font-size:2.25rem;line-height:2.25rem;padding-top:1px;display:grid;grid-column-gap:2.44px;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr}.emoji-dropdown .tabs-container .emoji-category:first-child{padding-top:5px}.emoji-dropdown .tabs-container .emoji-category>*{margin:0;padding:4px 4px;line-height:inherit;border-radius:8px;cursor:pointer;user-select:none;-webkit-user-select:none;width:42px;height:42px}.emoji-dropdown .tabs-container .emoji-category>* .emoji{width:100%;height:100%}.emoji-dropdown .tabs-container .emoji-category>*:hover{background-color:rgba(112,117,121,0.08)}.emoji-dropdown .tabs-container .sticker-category{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.emoji-dropdown .tabs-container .sticker-category::after{content:\\\"\\\";flex:auto}.emoji-dropdown .tabs-container .sticker-category>div{width:80px;height:80px;display:flex;align-items:center;cursor:pointer;user-select:none;-webkit-user-select:none;padding:1px 2.5px;justify-content:center;border-radius:12px;padding:0}.emoji-dropdown .tabs-container .sticker-category>div:hover{background-color:rgba(112,117,121,0.08)}.emoji-dropdown .tabs-container .sticker-category>div>*{max-width:100%;max-height:100%}.emoji-dropdown .tabs-container>div{min-height:100%;flex-direction:column;height:100%}.emoji-dropdown .tabs-container>div>div:first-of-type{flex:1;padding:0}.emoji-dropdown .tabs-container .scrollable{padding:0 10px}.emoji-dropdown .emoji-padding .menu-horizontal{border-top:1px solid #dadce0}.emoji-dropdown .emoji-padding .menu-horizontal,.emoji-dropdown .stickers-padding .menu-horizontal{height:47px;border-bottom:none;padding:2px 2px 2px 2px;width:100%}.emoji-dropdown .emoji-padding .menu-horizontal li,.emoji-dropdown .stickers-padding .menu-horizontal li{padding:0;width:50px;height:50px;line-height:50px;display:flex;align-items:center}.emoji-dropdown .emoji-padding .menu-horizontal li.active:after,.emoji-dropdown .stickers-padding .menu-horizontal li.active:after{display:none}.emoji-dropdown #content-stickers .scrollable{padding:15px 5px 0}.emoji-dropdown .emoji-padding .menu-horizontal li,.emoji-dropdown .stickers-padding .menu-horizontal li{font-size:1.65rem}.emoji-dropdown .stickers-padding .menu-wrapper{padding:0;height:50px;max-width:100%;border-top:1px solid #dadce0}.emoji-dropdown .stickers-padding .menu-wrapper .menu-horizontal{width:100%;height:100%}.emoji-dropdown .stickers-padding li{flex:0 0 auto}.emoji-dropdown .stickers-padding li.active:not(.tgico-recent){background-color:rgba(112,117,121,0.08)}.emoji-dropdown .stickers-padding li>*{padding:.75rem;max-width:100%;max-height:100%;width:100%;height:100%}.emoji-dropdown #content-gifs .gifs-masonry{display:flex;flex-wrap:wrap}.emoji-dropdown #content-gifs .gifs-masonry>div{flex:1 0 auto;max-width:100%;height:100px;margin:2.5px;cursor:pointer;background:#000;position:relative}.emoji-dropdown #content-gifs .gifs-masonry>div video{object-fit:cover;width:100%;height:100%}html,body{height:100%;width:100%}html{font-size:16px}a{color:#50a2e9}button,input,optgroup,select,textarea,html{font-family:\\\"Roboto\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \\\"Helvetica Neue\\\", sans-serif}.whole{height:100vh;min-height:100vh;width:100%;margin:0 auto;max-width:1680px}.disable-hover,.disable-hover *{pointer-events:none !important}.container{margin:0 auto}h1,h2,h3,h4,h5,h6{letter-spacing:-.66px;font-weight:500}h4{font-size:2rem;margin:1.5rem 0 1rem 0;line-height:110%}input{caret-color:#4EA4F6}.subtitle{color:#9e9e9e;line-height:1.25}.page-authCode .auth-image{transform:translateY(12px)}.page-authCode .phone-wrapper{display:flex;align-items:center;justify-content:center}.page-authCode .phone-wrapper h4[contenteditable=\\\"true\\\"]{padding:0 1rem;border:none;outline:none;padding:0 1rem;border-bottom:2px solid #4EA4F6}.page-authCode .phone-wrapper .phone.error{border-color:#E53935 !important}.page-authCode .subtitle{margin-top:0}.btn-icon{text-align:center;font-size:1.5rem;line-height:1.5rem;border-radius:50%;-webkit-transition:background-color .15s ease-out;transition:background-color .15s ease-out;color:#707579;cursor:pointer;background:none;border:none;padding:.5rem;position:relative;display:flex;align-items:center;justify-content:center}.btn-icon.active{color:#50a2e9}.btn-icon:hover{background-color:rgba(112,117,121,0.08)}.danger{color:#E53935 !important}.btn-menu-toggle{position:relative;overflow:visible}.btn-menu-toggle.menu-open{background-color:rgba(112,117,121,0.08)}.btn-menu{visibility:hidden;position:absolute;background:#fff;box-shadow:0 5px 8px 1px rgba(0,0,0,0.24);z-index:3;top:100%;margin-top:8px;padding:9px 0;border-radius:8px;opacity:0;transform:scale(0.8);transition-property:opacity,transform,visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);font-size:16px}.btn-menu.active{visibility:visible;opacity:1;transform:scale(1)}.btn-menu.bottom-left{right:0;top:100%;transform-origin:top right}.btn-menu.bottom-right{left:0;top:100%;transform-origin:top left}.btn-menu.top-left{top:initial;right:0;bottom:100%;transform-origin:bottom right}.btn-menu.top-right{top:initial;left:0;bottom:100%;transform-origin:bottom left}.btn-menu>div{display:flex;position:relative;padding:0 40px 0 20px;height:56px;cursor:pointer;background-position:16px center;background-size:24px 24px;background-repeat:no-repeat;color:#000;text-transform:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center}.btn-menu>div:hover{background-color:rgba(112,117,121,0.06)}.btn-menu>div:before{color:#707579;font-size:1.5rem;margin-right:35px}.btn-menu>div.danger:before{color:#E53935}.user-avatar{color:#fff;width:54px;height:54px;line-height:54px;border-radius:50%;background-color:#4EA4F6;text-align:center;font-size:1.25em;position:relative;user-select:none;display:flex;align-items:center;justify-content:center}.user-avatar img{width:100%;height:100%;border-radius:inherit;user-select:none}.user-avatar[class*=\\\" tgico-\\\"]{line-height:52px;font-size:28px}.user-avatar path{fill:white}.user-avatar.is-online:after{position:absolute;content:\\\" \\\";display:block;border-radius:50%;border:2px solid white;background-color:#4DCD5E;left:70%;top:79%;width:12px;height:12px}.user-avatar.tgico-avatar_deletedaccount{font-size:3rem}.user-title,b,.user-last-message b{color:#000;font-weight:normal}.rp{position:relative}.c-ripple{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;overflow:hidden;background:transparent;border-radius:inherit}.c-ripple__circle{background-color:rgba(0,0,0,0.08);display:block;position:absolute;transform:scale(0);border-radius:50%;animation:ripple-effect .7s forwards;transition:.35s opacity;overflow:hidden}.c-ripple__circle.hiding{opacity:0}@keyframes ripple-effect{0%{transform:scale(0)}to{transform:scale(2)}}.document{padding-left:4.5rem;height:70px}.document-ico,.document-download{font-weight:500;letter-spacing:1px;font-size:1.1rem;background-size:contain;overflow:hidden;text-overflow:ellipsis}.document-download{background-color:#65a1e3;border-radius:8px}.document:not(.photo) .document-ico{padding-top:1.5rem;background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \")}.document.photo .document-ico{border-radius:8px}.document-name{white-space:nowrap;font-weight:500;line-height:1.3}.document-size{white-space:nowrap;color:#707579;font-size:14px;padding-right:32px;line-height:1.3}.document,.audio{display:flex;flex-direction:column;justify-content:center;cursor:pointer;position:relative}.document-ico,.document-download,.audio-ico,.audio-download{position:absolute;left:0;width:54px;height:54px;color:#fff;display:flex;justify-content:center}.document-download,.audio-download{z-index:2;align-items:center;font-size:24px;cursor:pointer}.document-download .tgico-download,.audio-download .tgico-download{transform:scale(1);transition:.2s scale}.document-download.downloading .tgico-download,.audio-download.downloading .tgico-download{transform:scale(0)}.document .preloader-container,.audio .preloader-container{width:42px;height:42px}.audio{position:relative;padding-left:67px;min-height:58px;max-width:244px;overflow:visible !important}.audio-toggle,.audio-download{border-radius:50%;background-color:#50a2e9;font-size:2.3rem;align-items:center}.audio-download{z-index:2}.audio-waveform{height:23px}.audio-waveform rect{fill:#CBCBCB}.audio-waveform rect.active{fill:#50a2e9}.audio-title{font-size:1rem;color:#000}.audio-time,.audio-subtitle{font-size:14px;color:#707579;margin-top:3px;margin-left:-1px}#auth-pages{max-width:720px;overflow:hidden}#auth-pages .subtitle{margin:0}#auth-pages .input-wrapper{margin-top:49px}#auth-pages .tabs-container{height:100%}#auth-pages .tabs-container.animated{transition:.42s transform}#auth-pages .tabs-container>div:before,#auth-pages .tabs-container>div:after{content:\\\" \\\";flex:1;min-height:3rem;width:100%}#auth-pages .tabs-container>div>div{height:810px;padding:0;flex:1 1 auto;display:flex;flex-direction:column}@media (max-height: 858px){#auth-pages{height:auto}}.page-sign .auth-image,.page-signUp .auth-image{width:10rem;height:10rem;margin-bottom:1.5rem}.page-signUp .auth-image{border-radius:50%;cursor:pointer;position:relative;overflow:hidden}.page-signUp .auth-image canvas{max-width:100%;max-height:100%;width:100%;height:100%;background-color:#4EA4F6}.page-signUp .auth-image svg{position:absolute;width:36px;height:36px;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);z-index:2}.input-wrapper{width:360px;margin:0 auto}.input-field{position:relative}.input-field .arrow-down{position:absolute;content:\\\" \\\";top:50%;bottom:0;right:21px;cursor:pointer;height:0;width:0;border:solid #bdbdbd;border-radius:1px;border-width:0 2px 2px 0;display:inline-block;padding:5px;vertical-align:middle;z-index:2;margin-top:-9px;transform:rotate(45deg);-webkit-transform:rotate(45deg);transition:.2s all}.input-field label{position:absolute;color:#9e9e9e;left:1rem;right:auto;z-index:2;top:50%;transform:translateY(-50%);background-color:#fff;transition:.2s all, .1s opacity;display:inline-block;cursor:text}.input-field input{border:1px solid #DADCE0;border-radius:10px;padding:0 1rem;box-sizing:border-box;width:100%;height:54px;transition:.2s border-color;position:relative;z-index:1}.input-field input:focus{border-color:#4EA4F6;border-width:2px;padding:0 calc(1rem - 1px)}.input-field input:disabled{background-color:#fff;color:#000}.input-field input.error{border-color:#E53935;transition:.2s border-width}.input-field input.error+label{color:#E53935 !important}.input-field input:focus ~ .arrow-down{margin-top:-4px;transform:rotate(225deg);-webkit-transform:rotate(225deg);border-color:#4EA4F6}.input-field input:focus+label{color:#4EA4F6}.input-field input:focus+label,.input-field input:valid+label,.input-field input:disabled+label{top:-.5rem;transform:none;padding:0 5px;left:.75rem;font-size:0.75rem !important;opacity:1}.checkbox-field{margin:1.25rem 0;display:block;text-align:left;padding:0 19px;position:relative}[type=\\\"checkbox\\\"]{position:absolute;opacity:0;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=\\\"checkbox\\\"]+span{position:relative;padding-left:calc(18px + 2.25rem);cursor:pointer;display:inline-block;height:25px;line-height:25px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[type=\\\"checkbox\\\"]+span:before,[type=\\\"checkbox\\\"]+span:after{content:'';left:0;position:absolute;-webkit-transition:border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;transition:border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s}[type=\\\"checkbox\\\"]+span:before{border-radius:2px;z-index:1}[type=\\\"checkbox\\\"]+span:after{height:18px;width:18px;z-index:0;border:2px solid #4EA4F6;border-radius:3px;top:50%;transform:translateY(-50%)}[type=\\\"checkbox\\\"]:not(:checked)+span:before{width:0;height:0;border:2px solid transparent;left:6px;top:10px;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=\\\"checkbox\\\"]:checked+span:before{top:4px;left:-1px;width:8px;height:14px;border-top:2px solid transparent;border-left:2px solid transparent;border-right:2px solid #fff;border-bottom:2px solid #fff;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=\\\"checkbox\\\"]:not(:checked)+span:after{background-color:transparent}[type=\\\"checkbox\\\"]:checked+span:after{background-color:#4EA4F6}.input-wrapper>* ~ *{margin-top:1.5rem}.select-wrapper{max-height:23.5rem;position:absolute;width:100%;top:calc(100% + .5rem);left:0;overflow:hidden;background-color:#fff;z-index:3;border-radius:10px;display:flex;flex-direction:column;flex-wrap:wrap}.select-wrapper ul{margin:.5rem 0}.select-wrapper li{align-items:center;padding:0 1rem;justify-content:space-between;height:3.5rem;cursor:pointer;text-align:left;display:grid;grid-template-columns:calc(26px + 2rem) 1fr 50px}.select-wrapper li:hover{background-color:rgba(112,117,121,0.08)}.select-wrapper .emoji{height:26px;width:26px;font-size:26px;line-height:1}.select-wrapper .scrollable{position:relative}.phone-code{color:#9e9e9e;text-align:right}::placeholder{color:#9e9e9e;opacity:1}:-ms-input-placeholder{color:#9e9e9e}::-ms-input-placeholder{color:#9e9e9e}input:focus,button:focus{outline:none}.auth-image{width:166px;height:166px;margin:0 auto 18px}.phone-edit{display:inline-block;width:24px;height:24px;margin-left:.4rem;opacity:.5;transition:.2s;cursor:pointer;font-size:1.5rem}.phone-edit:hover{opacity:1}.btn-primary{background:#4EA4F6;color:#fff;border-radius:10px;width:100%;text-align:center;height:54px;border:none;font-weight:500;cursor:pointer;overflow:hidden;position:relative;padding:0}.btn-primary:hover{background:#2790f4}.btn-primary svg,.btn-primary use{height:calc(100% - 20px);right:12.5px;left:auto;margin:auto 0}.preloader-circular{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.preloader-path{stroke-dasharray:1, 200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke-linecap:round;stroke:white;stroke-width:3}.preloader-container{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:50px;height:50px}.preloader-container .you-spin-me-round{width:100%;height:100%;animation:rotate 2s linear infinite}.preloader-container .preloader-circular{animation:none;cursor:pointer;background-color:rgba(0,0,0,0.7);border-radius:50%;width:100%;height:100%}.preloader-container .preloader-path-new{stroke-dasharray:5, 200;stroke-dashoffset:0;transition:stroke-dasharray 400ms ease-in-out;stroke-linecap:round;stroke:white;stroke-width:1.5}.preloader-container.preloader-swing{cursor:default}.preloader-container.preloader-swing .preloader-circular{cursor:default}.preloader-container.preloader-swing .preloader-path-new{stroke-dasharray:1, 200;stroke-dashoffset:0;animation:dashNew 1.5s ease-in-out infinite}.preloader-container .preloader-close{cursor:pointer;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;color:#fff;stroke:#fff;width:34%;height:34%}.preloader-container .preloader-close:hover{background:none}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}@keyframes dashNew{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-286%}}.emoji{display:inline-block;max-width:100%;max-height:100%;vertical-align:middle;line-height:1em;font-size:1em;font-family:apple color emoji,segoe ui emoji,noto color emoji,android emoji,emojisymbols,emojione mozilla,twemoji mozilla,segoe ui symbol}img.emoji{width:18px;height:18px}.popup{position:fixed !important;left:0;top:0;height:100%;max-width:none;width:100%;z-index:3;background-color:rgba(0,0,0,0.35);margin:0;padding:0;box-shadow:none;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s 0s, visibility 0s 0.3s;-moz-transition:opacity 0.3s 0s, visibility 0s 0.3s;transition:opacity 0.3s 0s, visibility 0s 0.3s;overflow:auto;display:flex;align-items:center;justify-content:center}.popup.active{opacity:1;visibility:visible;-webkit-transition:opacity 0.3s 0s, visibility 0s 0s;-moz-transition:opacity 0.3s 0s, visibility 0s 0s;transition:opacity 0.3s 0s, visibility 0s 0s}.popup-container{position:relative;border-radius:8px;background-color:#fff;padding:1rem;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px);backface-visibility:hidden;-webkit-backface-visibility:hidden;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;transition-property:transform;-webkit-transition-duration:0.3s;-moz-transition-duration:0.3s;transition-duration:0.3s}span.popup-close{cursor:pointer;color:#707579;z-index:3;text-align:center;justify-self:center;line-height:1;transition:.2s}span.popup-close:hover{color:#000}.popup.active .popup-container{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}.btn-circle{border-radius:50%;width:44px;height:44px}.btn-circle path{fill:white}.popup-header{display:flex;margin-bottom:2rem;align-items:center}.popup-avatar .popup-container{max-width:600px;max-height:600px}.popup-avatar .popup-container>button{position:absolute;bottom:15px;right:15px}.popup-avatar .popup-close{font-size:1.5rem}.popup-avatar h6{font-size:1.1rem;text-align:left;margin:0;margin-left:1.5rem;font-weight:400}.popup-avatar .crop{max-width:200%;max-height:200%;padding:0 2.75rem 2.75rem;border-radius:8px}.popup-avatar .crop img{border-radius:8px}.overlay::selection{background:transparent}.crop-component::selection{background:transparent}.crop-image,.overlay>img{width:auto;height:auto;display:block;object-fit:contain;object-position:center}.crop-image{display:block;position:relative;pointer-events:none}.crop-component{position:relative;z-index:999;background-color:white;margin:0 auto;overflow:hidden}.crop-component>img{max-width:100%}.crop-component .crop-overlay-color{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(255,255,255,0.7);border-radius:8px}.overlay{position:absolute;left:50%;top:50%;z-index:999;margin-left:-100px;margin-top:-100px;width:200px;height:200px;overflow:hidden;box-sizing:content-box;border-radius:50%}.overlay:hover,.overlay:active{cursor:move}.overlay>img{position:absolute;display:block}.overlays{top:0;left:0;width:100%;height:100%;position:fixed !important;background-color:rgba(0,0,0,0.2);z-index:4;opacity:0;visibility:hidden;-webkit-transition:opacity 0.2s 0s, visibility 0s 0.2s;-moz-transition:opacity 0.2s 0s, visibility 0s 0.2s;transition:opacity 0.2s 0s, visibility 0s 0.2s}.overlays.active{opacity:1;visibility:visible;-webkit-transition:opacity 0.2s 0s, visibility 0s 0s;-moz-transition:opacity 0.2s 0s, visibility 0s 0s;transition:opacity 0.2s 0s, visibility 0s 0s}div.scrollable::-webkit-scrollbar{width:0;height:0}div.scrollable::-webkit-scrollbar-thumb{width:0;height:0}::-webkit-scrollbar-button{width:0;height:0;display:none}::-webkit-scrollbar-corner{background-color:transparent}.scrollable{width:100%;height:100%;overflow-y:hidden;overflow-x:hidden;max-height:100%;transform:translateZ(0);-webkit-transform:translateZ(0);position:absolute;top:0px;left:0px;bottom:0px;right:0px;display:flex;flex-direction:column}.scrollable.scrollable-x{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.scrollable.scrollable-y{overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.scrollable.scrollable-x ~ .scrollbar-thumb{top:auto;right:auto;width:auto;height:4px;bottom:0px}.scrollable .scroll-padding{flex:0 0 auto}.scrollable .scroll-padding:first-child+*{flex:1 1 auto}.scrollbar-thumb{position:absolute;top:0;right:2px;width:4px;background-color:#000;cursor:default;opacity:0;transition-property:opacity;transition-duration:.2s;transition-timing-function:ease-in-out;border-radius:8px;z-index:2}:hover>.scrollbar-thumb{opacity:.4}[contenteditable]{-webkit-user-select:text;user-select:text}.menu-horizontal{color:#707579;border-bottom:1px solid #dadce0;position:relative}.menu-horizontal ul{width:100%;height:100%;margin:0;display:flex;justify-content:space-around;align-items:center;position:relative;z-index:2}.menu-horizontal li{display:inline-block;padding:.75rem 1rem;cursor:pointer;text-align:center;flex:1;user-select:none;font-size:1rem}.menu-horizontal li.active{color:#50a2e9}.menu-horizontal__stripe{position:absolute;background:#50a2e9;left:-2px;transition:.3s transform, .3s width;bottom:-1px;height:4px;width:1px;transform:scaleX(1) translateX(0px);border-top-left-radius:2px;border-top-right-radius:2px;z-index:1}.tabs-container{min-width:100%;width:100%;display:flex;overflow-x:hidden}.tabs-container.animated{transition:.3s transform}.tabs-container>div{width:100%;max-width:100%;overflow:hidden;display:none}.tabs-container>div.active{display:flex;flex-direction:column}.tabs-container>div>div:not(.scroll-padding){width:100%;padding:7.5px;max-width:100%;overflow:hidden;position:relative}.justify-start{justify-content:flex-start !important}.popup-send-photo .popup-container{width:420px;max-width:420px;max-height:425px;overflow:hidden;padding:12px 20px 32.5px;border-radius:10px}.popup-send-photo .popup-header{justify-content:space-between;align-items:center;margin-bottom:12.5px}.popup-send-photo .popup-header .popup-close{font-size:1.5rem;margin-left:.5rem}.popup-send-photo .popup-header .popup-title{flex:1;padding:0 2rem;margin:0;font-size:1.35rem;font-weight:500}.popup-send-photo .popup-header .btn-primary{width:80px;height:35px;font-size:1rem;padding:0;border-radius:10px}.popup-send-photo .popup-photo{max-width:378px;max-height:256px;display:flex;overflow:hidden;justify-content:center;width:fit-content;border-radius:10px;margin:0 auto}.popup-send-photo .popup-photo.is-document{margin-left:0}.popup-send-photo .popup-photo .document{max-width:100%;overflow:hidden;cursor:default}.popup-send-photo .popup-photo .document .document-name{font-weight:normal;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis}.popup-send-photo .popup-photo img{object-fit:contain}.popup-send-photo .input-field{margin-top:25px}.popup-send-photo .input-field input{height:55px;font-size:1.15rem;padding:0 15px;border-radius:10px}.popup-send-photo .input-field input:focus{padding:0 14.5px}.popup-send-photo .input-field label{font-size:inherit;opacity:0}.page-chats{display:flex;max-height:100vh;min-height:100vh}.page-chats>div{height:100%;position:relative;min-height:100%;max-height:100%}.page-chats #column-left{width:25%}.page-chats .chat-container{background-color:#e6ebee;width:100%;flex:1}.page-chats .preloader{width:50px;height:50px;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}.page-chats .preloader .preloader-path{stroke:#4EA4F6}.page-chats #search-container,.page-chats #chats-archived-container,.page-chats .sidebar-search{display:none;flex-direction:column;width:100%;max-height:100%;height:100%;overflow:hidden;position:absolute;left:0;top:0;z-index:3;background:#fff}.page-chats #search-container.active,.page-chats #chats-archived-container.active,.page-chats .sidebar-search.active{display:flex}@media (min-width: 1680px){.page-chats{border-top-width:0;border-bottom-width:0;border-left-width:1px;border-right-width:1px;border-style:solid;border-color:#DADCE0}}.page-password #password{padding-right:2.5rem}.page-password #password[type=\\\"password\\\"]{font-size:2.25rem;padding-left:10px}.page-password .toggle-visible{position:absolute;right:.25rem;z-index:2;top:50%;transform:translateY(-50%);font-size:1.25rem;color:#9e9e9e;cursor:pointer;transition:.2s;padding:.5rem}.page-password .toggle-visible:hover{color:#000}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n" }, { - "id": 47, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appWebpManager.ts", - "name": "./src/lib/appManagers/appWebpManager.ts", - "index": 77, - "index2": 66, - "size": 4230, + "id": 49, + "identifier": "F:\\tweb\\node_modules\\file-loader\\dist\\cjs.js??ref--7!F:\\tweb\\public\\assets\\img\\camomile_blurred.jpg", + "name": "./public/assets/img/camomile_blurred.jpg", + "index": 8, + "index2": 5, + "size": 51, "cacheable": true, "built": true, "optional": false, @@ -5856,86 +5648,59 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "issuerId": 83, - "issuerName": "./src/components/emoticonsDropdown.ts", + "issuer": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "issuerId": 48, + "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 47, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./src/scss/style.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", + "id": 48, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 - } - }, - { - "id": 19, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 - } - }, - { - "id": 83, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "name": "./src/components/emoticonsDropdown.ts", - "profile": { - "factory": 208, - "building": 300, - "dependencies": 449 + "factory": 1062, + "building": 4761, + "dependencies": 0 } } ], "profile": { - "factory": 493, - "building": 59 + "factory": 4, + "building": 1 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [], + "assets": [ + "assets/img/camomile_blurred.jpg" + ], "reasons": [ { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", - "type": "cjs require", - "userRequest": "../lib/appManagers/appWebpManager", - "loc": "23:41-85" - }, - { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "module": "./src/components/emoticonsDropdown.ts", - "moduleName": "./src/components/emoticonsDropdown.ts", + "moduleId": 48, + "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "type": "cjs require", - "userRequest": "../lib/appManagers/appWebpManager", - "loc": "25:41-85" + "userRequest": "../../public/assets/img/camomile_blurred.jpg", + "loc": "4:36-91" } ], "usedExports": true, @@ -5943,16 +5708,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 5, - "source": "\"use strict\";\n// @ts-ignore\n//import createWorker from 'offscreen-canvas/create-worker';\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass AppWebpManager {\n constructor() {\n //let canvas = document.createElement('canvas');\n //console.log('got message from worker:', canvas.toDataURL());\n /* this.worker = createWorker(canvas, '/webp.bundle.js', (e: any) => {\n // Messages from the worker\n console.log('got message from worker:', e, canvas.toDataURL());\n }); */\n this.webpMachine = null;\n this.queue = [];\n //public worker: any;\n this.webpSupport = null;\n this.webpSupported().then(res => {\n });\n }\n loadWebpHero() {\n if (this.loaded)\n return this.loaded;\n this.loaded = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n let res = yield this.webpSupported();\n if (!res) {\n window.webpLoaded = () => {\n console.log('webpHero loaded');\n this.webpMachine = new window.WebpMachine();\n resolve();\n };\n let sc = document.createElement('script');\n sc.src = 'npm.webp-hero.chunk.js';\n sc.async = true;\n sc.onload = window.webpLoaded;\n document.body.appendChild(sc);\n }\n else {\n resolve();\n }\n }));\n }\n convert(bytes) {\n return this.webpMachine.decode(bytes);\n //return this.worker.post({message: 'webpBytes', bytes});\n }\n processQueue() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.busyPromise)\n return;\n this.busyPromise = Promise.resolve('');\n let { img, bytes } = this.queue.pop();\n if (!this.loaded) {\n this.loadWebpHero();\n }\n yield this.loaded;\n this.busyPromise = this.convert(bytes);\n img.src = yield this.busyPromise;\n this.busyPromise = null;\n if (this.queue.length) {\n this.processQueue();\n }\n });\n }\n webpSupported() {\n if (this.webpSupport)\n return this.webpSupport;\n return this.webpSupport = new Promise((resolve, reject) => {\n var webP = new Image();\n webP.src = 'data:image/webp;base64,UklGRi4AAABXRUJQVlA4TCEAAAAvAUAAEB8wAiMw' +\n 'AgSSNtse/cXjxyCCmrYNWPwmHRH9jwMA';\n webP.onload = webP.onerror = () => {\n resolve(webP.height === 2);\n };\n });\n }\n polyfillImage(img, blob) {\n return __awaiter(this, void 0, void 0, function* () {\n /* console.log('polyfillImage', this);\n return this.webpMachine.polyfillImage(image); */\n //if(await this.webpMachine.webpSupport) {\n if (yield this.webpSupport) {\n img.src = URL.createObjectURL(blob);\n return;\n }\n const reader = new FileReader();\n reader.addEventListener('loadend', (e) => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n let bytes = new Uint8Array(e.srcElement.result);\n this.queue.push({ bytes, img });\n this.processQueue();\n }));\n reader.readAsArrayBuffer(blob);\n });\n }\n}\nexports.default = new AppWebpManager();\n" + "depth": 3, + "source": "module.exports = \"assets/img/camomile_blurred.jpg\";" }, { - "id": 48, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/lazyLoadQueue.ts", - "name": "./src/components/lazyLoadQueue.ts", - "index": 79, - "index2": 70, - "size": 4991, + "id": 50, + "identifier": "F:\\tweb\\node_modules\\file-loader\\dist\\cjs.js??ref--7!F:\\tweb\\src\\assets\\img\\msg-tail-left.svg", + "name": "./src/assets/img/msg-tail-left.svg", + "index": 9, + "index2": 6, + "size": 48, "cacheable": true, "built": true, "optional": false, @@ -5960,77 +5725,59 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "issuerId": 45, - "issuerName": "./src/lib/appManagers/appSidebarRight.ts", + "issuer": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "issuerId": 48, + "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 47, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./src/scss/style.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "dependencies": 1062 } }, { - "id": 45, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "name": "./src/lib/appManagers/appSidebarRight.ts", + "id": 48, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 1062, + "building": 4761, + "dependencies": 0 } } ], "profile": { - "factory": 121, - "building": 309, - "dependencies": 1 + "factory": 4, + "building": 1 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [], + "assets": [ + "assets/img/msg-tail-left.svg" + ], "reasons": [ { - "moduleId": 45, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarRight.ts", - "module": "./src/lib/appManagers/appSidebarRight.ts", - "moduleName": "./src/lib/appManagers/appSidebarRight.ts", - "type": "cjs require", - "userRequest": "../../components/lazyLoadQueue", - "loc": "18:40-81" - }, - { - "moduleId": 83, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "module": "./src/components/emoticonsDropdown.ts", - "moduleName": "./src/components/emoticonsDropdown.ts", + "moduleId": 48, + "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "type": "cjs require", - "userRequest": "./lazyLoadQueue", - "loc": "23:40-66" + "userRequest": "../assets/img/msg-tail-left.svg", + "loc": "5:36-78" } ], "usedExports": true, @@ -6038,16 +5785,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../lib/utils\");\nclass LazyLoadQueue {\n constructor(parallelLimit = 0) {\n this.parallelLimit = parallelLimit;\n this.lazyLoadMedia = [];\n this.loadingMedia = 0;\n this.tempID = 0;\n }\n clear() {\n this.tempID--;\n this.lazyLoadMedia.length = 0;\n this.loadingMedia = 0;\n }\n processQueue(id) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.parallelLimit > 0 && this.loadingMedia >= this.parallelLimit)\n return;\n let item;\n let index;\n /* if(id) item = this.lazyLoadMedia.splice(id, 1) as any;\n else item = this.lazyLoadMedia.pop(); */\n if (id !== undefined)\n item = this.lazyLoadMedia.splice(id, 1)[0];\n else {\n index = this.lazyLoadMedia.findIndex(i => utils_1.isElementInViewport(i.div));\n if (index !== -1) {\n item = this.lazyLoadMedia.splice(index, 1)[0];\n }\n else {\n //index = this.lazyLoadMedia.findIndex(i => i.wasSeen);\n //if(index !== -1) {\n //item = this.lazyLoadMedia.splice(index, 1)[0];\n /*} else {\n item = this.lazyLoadMedia.pop();\n } */\n let length = this.lazyLoadMedia.length;\n for (index = length - 1; index >= 0; --index) {\n if (this.lazyLoadMedia[index].wasSeen) {\n item = this.lazyLoadMedia.splice(index, 1)[0];\n break;\n }\n }\n }\n }\n if (item) {\n this.loadingMedia++;\n let tempID = this.tempID;\n try {\n yield item.load();\n }\n catch (err) {\n console.error('loadMediaQueue error:', err, item, id, index);\n }\n if (tempID == this.tempID) {\n this.loadingMedia--;\n }\n if (this.lazyLoadMedia.length) {\n this.processQueue();\n }\n }\n });\n }\n check(id) {\n /* if(id !== undefined) {\n let {div, load} = this.lazyLoadMedia[id];\n if(isElementInViewport(div)) {\n //console.log('will load div by id:', div, div.getBoundingClientRect());\n load();\n this.lazyLoadMedia.splice(id, 1);\n }\n \n return;\n }\n \n let length = this.lazyLoadMedia.length;\n for(let i = length - 1; i >= 0; --i) {\n let {div, load} = this.lazyLoadMedia[i];\n \n if(isElementInViewport(div)) {\n console.log('will load div:', div);\n load();\n this.lazyLoadMedia.splice(i, 1);\n }\n } */\n if (id !== undefined) {\n let { div } = this.lazyLoadMedia[id];\n if (utils_1.isElementInViewport(div)) {\n //console.log('will load div by id:', div, div.getBoundingClientRect());\n this.lazyLoadMedia[id].wasSeen = true;\n this.processQueue(id);\n }\n return;\n }\n let length = this.lazyLoadMedia.length;\n for (let i = length - 1; i >= 0; --i) {\n let { div } = this.lazyLoadMedia[i];\n if (utils_1.isElementInViewport(div)) {\n //console.log('will load div:', div);\n this.lazyLoadMedia[i].wasSeen = true;\n this.processQueue(i);\n //this.lazyLoadMedia.splice(i, 1);\n }\n }\n /* this.lazyLoadMedia = this.lazyLoadMedia.filter(({div, load}) => {\n if(isElementInViewport(div)) {\n //console.log('will load div:', div, div.getBoundingClientRect());\n load();\n return false;\n }\n \n return true;\n }); */\n }\n push(el) {\n el.wasSeen = false;\n let id = this.lazyLoadMedia.push(el) - 1;\n this.check(id);\n }\n}\nexports.default = LazyLoadQueue;\n" + "depth": 3, + "source": "module.exports = \"assets/img/msg-tail-left.svg\";" }, { - "id": 49, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appWebPagesManager.ts", - "name": "./src/lib/appManagers/appWebPagesManager.ts", - "index": 81, - "index2": 73, - "size": 5767, + "id": 51, + "identifier": "F:\\tweb\\node_modules\\file-loader\\dist\\cjs.js??ref--7!F:\\tweb\\src\\assets\\img\\msg-tail-right.svg", + "name": "./src/assets/img/msg-tail-right.svg", + "index": 10, + "index2": 7, + "size": 49, "cacheable": true, "built": true, "optional": false, @@ -6055,77 +5802,59 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "issuerId": 15, - "issuerName": "./src/lib/appManagers/appMessagesManager.ts", + "issuer": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "issuerId": 48, + "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 47, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./src/scss/style.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 + "dependencies": 1062 } }, { - "id": 15, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "name": "./src/lib/appManagers/appMessagesManager.ts", + "id": 48, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "factory": 1062, + "building": 4761, + "dependencies": 0 } } ], "profile": { - "factory": 523, - "building": 172, - "dependencies": 0 + "factory": 4, + "building": 1 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [], + "assets": [ + "assets/img/msg-tail-right.svg" + ], "reasons": [ { - "moduleId": 15, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appMessagesManager.ts", - "module": "./src/lib/appManagers/appMessagesManager.ts", - "moduleName": "./src/lib/appManagers/appMessagesManager.ts", - "type": "cjs require", - "userRequest": "./appWebPagesManager", - "loc": "33:45-76" - }, - { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", + "moduleId": 48, + "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "type": "cjs require", - "userRequest": "./appWebPagesManager", - "loc": "45:45-76" + "userRequest": "../assets/img/msg-tail-right.svg", + "loc": "6:36-79" } ], "usedExports": true, @@ -6133,16 +5862,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\nclass AppWebPagesManager {\n constructor() {\n this.webpages = {};\n this.pendingWebPages = {};\n utils_1.$rootScope.$on('apiUpdate', (e) => {\n let update = e.detail;\n switch (update._) {\n case 'updateWebPage':\n this.saveWebPage(update.webpage);\n break;\n }\n });\n }\n saveWebPage(apiWebPage, messageID, mediaContext) {\n if (apiWebPage.photo && apiWebPage.photo._ === 'photo') {\n appPhotosManager_1.default.savePhoto(apiWebPage.photo, mediaContext);\n }\n else {\n delete apiWebPage.photo;\n }\n if (apiWebPage.document && apiWebPage.document._ === 'document') {\n appDocsManager_1.default.saveDoc(apiWebPage.document, mediaContext);\n }\n else {\n if (apiWebPage.type == 'document') {\n delete apiWebPage.type;\n }\n delete apiWebPage.document;\n }\n var siteName = apiWebPage.site_name;\n var shortTitle = apiWebPage.title || apiWebPage.author || siteName || '';\n if (siteName && shortTitle == siteName) {\n delete apiWebPage.site_name;\n }\n if (shortTitle.length > 100) {\n shortTitle = shortTitle.substr(0, 80) + '...';\n }\n apiWebPage.rTitle = richtextprocessor_1.RichTextProcessor.wrapRichText(shortTitle, { noLinks: true, noLinebreaks: true });\n var contextHashtag = '';\n if (siteName == 'GitHub') {\n var matches = apiWebPage.url.match(/(https?:\\/\\/github\\.com\\/[^\\/]+\\/[^\\/]+)/);\n if (matches) {\n contextHashtag = matches[0] + '/issues/{1}';\n }\n }\n // delete apiWebPage.description\n var shortDescriptionText = (apiWebPage.description || '');\n if (shortDescriptionText.length > 180) {\n shortDescriptionText = shortDescriptionText.substr(0, 150).replace(/(\\n|\\s)+$/, '') + '...';\n }\n apiWebPage.rDescription = richtextprocessor_1.RichTextProcessor.wrapRichText(shortDescriptionText, {\n contextSite: siteName || 'external',\n contextHashtag: contextHashtag\n });\n if (apiWebPage.type != 'photo' &&\n apiWebPage.type != 'video' &&\n apiWebPage.type != 'gif' &&\n apiWebPage.type != 'document' &&\n !apiWebPage.description &&\n apiWebPage.photo) {\n apiWebPage.type = 'photo';\n }\n if (messageID) {\n if (this.pendingWebPages[apiWebPage.id] === undefined) {\n this.pendingWebPages[apiWebPage.id] = {};\n }\n this.pendingWebPages[apiWebPage.id][messageID] = true;\n this.webpages[apiWebPage.id] = apiWebPage;\n }\n if (this.webpages[apiWebPage.id] === undefined) {\n this.webpages[apiWebPage.id] = apiWebPage;\n }\n else {\n utils_1.safeReplaceObject(this.webpages[apiWebPage.id], apiWebPage);\n }\n if (!messageID && this.pendingWebPages[apiWebPage.id] !== undefined) {\n var msgs = [];\n for (let msgID in this.pendingWebPages[apiWebPage.id]) {\n msgs.push(msgID);\n }\n utils_1.$rootScope.$broadcast('webpage_updated', {\n id: apiWebPage.id,\n msgs: msgs\n });\n }\n }\n wrapForHistory(webPageID) {\n var webPage = utils_1.copy(this.webpages[webPageID]) || { _: 'webPageEmpty' };\n if (webPage.photo && webPage.photo.id) {\n webPage.photo = appPhotosManager_1.default.wrapForHistory(webPage.photo.id, { website: webPage.type != 'photo' && webPage.type != 'video' });\n }\n /* if (webPage.document && webPage.document.id) {\n webPage.document = appDocsManager.wrapForHistory(webPage.document.id)\n } */ // warning\n return webPage;\n }\n wrapForFull(webPageID) {\n var webPage = this.wrapForHistory(webPageID);\n if (!webPage.embed_url) {\n return webPage;\n }\n var fullWidth = window.innerWidth;\n var fullHeight = window.innerHeight;\n var full = {\n width: fullWidth,\n height: fullHeight\n };\n if (!webPage.embed_width || !webPage.embed_height) {\n full.height = full.width = Math.min(fullWidth, fullHeight);\n }\n else {\n var wh = utils_1.calcImageInBox(webPage.embed_width, webPage.embed_height, fullWidth, fullHeight);\n full.width = wh.w;\n full.height = wh.h;\n }\n var embedTag = Config.Modes.chrome_packed ? 'webview' : 'iframe';\n var embedType = webPage.embed_type != 'iframe' ? webPage.embed_type || 'text/html' : 'text/html';\n var embedHtml = '<' + embedTag + ' src=\"' + utils_1.encodeEntities(webPage.embed_url) + '\" type=\"' + utils_1.encodeEntities(embedType) + '\" frameborder=\"0\" border=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen width=\"' + full.width + '\" height=\"' + full.height + '\" style=\"width: ' + full.width + 'px; height: ' + full.height + 'px;\">';\n full.html = embedHtml;\n webPage.full = full;\n return webPage;\n }\n}\nexports.default = new AppWebPagesManager();\n" + "depth": 3, + "source": "module.exports = \"assets/img/msg-tail-right.svg\";" }, { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "index": 82, - "index2": 76, - "size": 2695, + "id": 52, + "identifier": "F:\\tweb\\node_modules\\file-loader\\dist\\cjs.js??ref--7!F:\\tweb\\src\\assets\\img\\doc-in.svg", + "name": "./src/assets/img/doc-in.svg", + "index": 11, + "index2": 8, + "size": 41, "cacheable": true, "built": true, "optional": false, @@ -6150,102 +5879,59 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "issuerId": 25, - "issuerName": "./src/components/pageIm.ts", + "issuer": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "issuerId": 48, + "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 47, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./src/scss/style.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } - } - ], - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "assets": [], - "reasons": [ - { - "moduleId": 25, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "module": "./src/components/pageIm.ts", - "moduleName": "./src/components/pageIm.ts", - "type": "cjs require", - "userRequest": "../lib/services", - "loc": "22:66-92" }, { - "moduleId": 26, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appSidebarLeft.ts", - "module": "./src/lib/appManagers/appSidebarLeft.ts", - "moduleName": "./src/lib/appManagers/appSidebarLeft.ts", - "type": "cjs require", - "userRequest": "../services", - "loc": "24:19-41" + "id": 48, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "profile": { + "factory": 1062, + "building": 4761, + "dependencies": 0 + } } ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [ - "ModuleConcatenation bailout: Module is not an ECMAScript module" - ], - "depth": 2, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconsole.log('Services included!');\nconst appUsersManager_1 = __importDefault(require(\"./appManagers/appUsersManager\"));\nconst appChatsManager_1 = __importDefault(require(\"./appManagers/appChatsManager\"));\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appManagers/appMessagesIDsManager\"));\nconst apiUpdatesManager_1 = __importDefault(require(\"./appManagers/apiUpdatesManager\"));\nconst appPhotosManager_1 = __importDefault(require(\"./appManagers/appPhotosManager\"));\nconst appDialogsManager_1 = __importDefault(require(\"./appManagers/appDialogsManager\"));\nconst appMessagesManager_1 = __importDefault(require(\"./appManagers/appMessagesManager\"));\nconst appProfileManager_1 = __importDefault(require(\"./appManagers/appProfileManager\"));\nconst appImManager_1 = __importDefault(require(\"./appManagers/appImManager\"));\nconst appPeersManager_1 = __importDefault(require(\"./appManagers/appPeersManager\"));\nconst appStickersManager_1 = __importDefault(require(\"./appManagers/appStickersManager\"));\nconst appDocsManager_1 = __importDefault(require(\"./appManagers/appDocsManager\"));\nconst appSidebarRight_1 = __importDefault(require(\"./appManagers/appSidebarRight\"));\nconst appSidebarLeft_1 = __importDefault(require(\"./appManagers/appSidebarLeft\"));\n//import AppSharedMediaManager from './appManagers/appSharedMediaManager';\nexports.appUsersManager = appUsersManager_1.default;\nexports.appChatsManager = appChatsManager_1.default;\nexports.appMessagesIDsManager = appMessagesIDsManager_1.default;\nexports.apiUpdatesManager = apiUpdatesManager_1.default;\nexports.appPhotosManager = appPhotosManager_1.default;\nexports.appDialogsManager = appDialogsManager_1.default;\nexports.appMessagesManager = appMessagesManager_1.default;\nexports.appProfileManager = appProfileManager_1.default;\nexports.appImManager = appImManager_1.default;\nexports.appPeersManager = appPeersManager_1.default;\nexports.appStickersManager = appStickersManager_1.default;\nexports.appDocsManager = appDocsManager_1.default;\n//export const appSharedMediaManager = AppSharedMediaManager;\nexports.appSidebarRight = appSidebarRight_1.default;\nexports.appSidebarLeft = appSidebarLeft_1.default;\n/* (window as any).Services = {\n appUsersManager,\n appChatsManager,\n apiUpdatesManager,\n appMessagesManager,\n appPeersManager,\n appProfileManager,\n appPhotosManager,\n appDocsManager,\n\n appDialogsManager,\n appImManager,\n appStickersManager,\n appSidebarRight,\n appSidebarLeft\n //appSharedMediaManager\n}; */\n" - }, - { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "name": "./src/index.ts", - "index": 0, - "index2": 83, - "size": 4365, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": null, - "issuerId": null, - "issuerName": null, - "issuerPath": null, "profile": { - "factory": 41, - "building": 1632 + "factory": 4, + "building": 1 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [], + "assets": [ + "assets/img/doc-in.svg" + ], "reasons": [ { - "moduleId": null, - "moduleIdentifier": null, - "module": null, - "moduleName": null, - "type": "single entry", - "userRequest": "./src/index.ts", - "loc": "index" + "moduleId": 48, + "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "type": "cjs require", + "userRequest": "../assets/img/doc-in.svg", + "loc": "7:36-71" } ], "usedExports": true, @@ -6253,16 +5939,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 0, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nrequire(\"./materialize.scss\");\n//import 'overlayscrollbars/css/OverlayScrollbars.min.css';\nrequire(\"./scss/style.scss\");\nrequire(\"./scss/tgico.scss\");\nconst utils_1 = require(\"./lib/utils\");\n//import {appUsersManager} from './lib/services';\n/* import pageIm from './components/pageIm';\nimport pageSignIn from './components/pageSignIn';\nimport { ripple } from './components/misc'; */\n//import { getNearestDc } from './components/misc';\n/* import registerServiceWorker from './registerServiceWorker';\n\nregisterServiceWorker(); */\n//console.log('pineapples in my head');\n/* Promise.all([\n import('./components/pageIm'),\n import('./components/pageSignIn'),\n import('./components/misc'),\n import('./lib/storage')\n]).then(imports => {\n let [pageIm, pageSignIn, misc, AppStorage] = imports; */\ndocument.addEventListener('DOMContentLoaded', () => __awaiter(void 0, void 0, void 0, function* () {\n /* pageAuthCode({\n \"_\": \"auth.sentCode\",\n \"pFlags\": {},\n \"flags\": 6,\n \"type\": {\n \"_\": \"auth.sentCodeTypeSms\",\n \"length\": 5\n },\n \"phone_code_hash\": \"98008787f0546e7419\",\n \"next_type\": {\n \"_\": \"auth.codeTypeCall\"\n },\n \"timeout\": 120,\n \"phone_number\": \"+380509144504\"\n }); */\n //let socket = new Socket(2);\n /* authorizer.auth(2).then((auth: any) => {\n console.log('authorized', auth);\n }, (error: any) => {\n console.log('Get networker error', error, error.stack);\n return Promise.reject(error);\n //return $q.reject(error);\n });\n \n return; */\n //pagePassword();\n let AppStorage = (yield Promise.resolve().then(() => __importStar(require('./lib/storage')))).default;\n let auth = yield AppStorage.get('user_auth');\n let userID = auth.id || 0;\n if (!userID) {\n (yield Promise.resolve().then(() => __importStar(require('./components/pageSignIn')))).default();\n }\n else {\n (yield Promise.resolve().then(() => __importStar(require('./components/pageIm')))).default();\n //getNearestDc();\n }\n let misc = yield Promise.resolve().then(() => __importStar(require('./components/misc')));\n Array.from(document.getElementsByClassName('rp')).forEach(misc.ripple);\n Array.from(document.body.getElementsByClassName('popup-close')).forEach(el => {\n let popup = utils_1.findUpClassName(el, 'popup');\n el.addEventListener('click', () => {\n popup.classList.remove('active');\n });\n });\n //MTProto.apiFileManager.uploadFile(photo).then(function (inputFile) {\n //console.log('uploaded smthn', inputFile);\n /* MTProto.apiManager.invokeApi('photos.uploadProfilePhoto', {\n file: inputFile,\n caption: '',\n geo_point: {_: 'inputGeoPointEmpty'}\n }).then(function (updateResult) {\n AppUsersManager.saveApiUsers(updateResult.users)\n MtpApiManager.getUserID().then(function (id) {\n AppPhotosManager.savePhoto(updateResult.photo, {\n user_id: id\n })\n ApiUpdatesManager.processUpdateMessage({\n _: 'updateShort',\n update: {\n _: 'updateUserPhoto',\n user_id: id,\n date: tsNow(true),\n photo: AppUsersManager.getUser(id).photo,\n previous: true\n }\n })\n $scope.photo = {}\n })\n }) */\n //});\n}));\n//});\n" + "depth": 3, + "source": "module.exports = \"assets/img/doc-in.svg\";" }, { "id": 53, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/materialize.scss", - "name": "./src/materialize.scss", - "index": 1, - "index2": 3, - "size": 504, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./src/scss/tgico.scss", + "index": 12, + "index2": 16, + "size": 668, "cacheable": true, "built": true, "optional": false, @@ -6270,24 +5956,24 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "issuerId": 52, + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", + "issuerId": 44, "issuerName": "./src/index.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } } ], "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 }, "failed": false, "errors": 0, @@ -6295,13 +5981,13 @@ "assets": [], "reasons": [ { - "moduleId": 52, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "moduleId": 44, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "module": "./src/index.ts", "moduleName": "./src/index.ts", "type": "cjs require", - "userRequest": "./materialize.scss", - "loc": "19:0-29" + "userRequest": "./scss/tgico.scss", + "loc": "21:0-28" } ], "usedExports": true, @@ -6310,15 +5996,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, - "source": "var content = require(\"!!../node_modules/css-loader/dist/cjs.js!../node_modules/resolve-url-loader/index.js!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./materialize.scss\");\n\nif (typeof content === 'string') {\n content = [[module.id, content, '']];\n}\n\nvar options = {}\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = require(\"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\")(content, options);\n\nif (content.locals) {\n module.exports = content.locals;\n}\n" + "source": "var api = require(\"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./tgico.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\nvar exported = content.locals ? content.locals : {};\n\n\n\nmodule.exports = exported;" }, { "id": 54, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/materialize.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/materialize.scss", - "index": 2, - "index2": 1, - "size": 4380, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "index": 13, + "index2": 15, + "size": 5835, "cacheable": true, "built": true, "optional": false, @@ -6326,34 +6012,33 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/materialize.scss", + "issuer": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", "issuerId": 53, - "issuerName": "./src/materialize.scss", + "issuerName": "./src/scss/tgico.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { "id": 53, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/materialize.scss", - "name": "./src/materialize.scss", + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./src/scss/tgico.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } } ], "profile": { - "factory": 537, - "building": 1988, - "dependencies": 349 + "factory": 1062, + "building": 2152 }, "failed": false, "errors": 0, @@ -6362,12 +6047,12 @@ "reasons": [ { "moduleId": 53, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/materialize.scss", - "module": "./src/materialize.scss", - "moduleName": "./src/materialize.scss", + "moduleIdentifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "module": "./src/scss/tgico.scss", + "moduleName": "./src/scss/tgico.scss", "type": "cjs require", - "userRequest": "!!../node_modules/css-loader/dist/cjs.js!../node_modules/resolve-url-loader/index.js!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./materialize.scss", - "loc": "1:14-178" + "userRequest": "!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./tgico.scss", + "loc": "2:26-193" } ], "usedExports": true, @@ -6376,15 +6061,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2, - "source": "exports = module.exports = require(\"../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:0.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type=\\\"button\\\"],[type=\\\"reset\\\"],[type=\\\"submit\\\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\\\"button\\\"]::-moz-focus-inner,[type=\\\"reset\\\"]::-moz-focus-inner,[type=\\\"submit\\\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\\\"button\\\"]:-moz-focusring,[type=\\\"reset\\\"]:-moz-focusring,[type=\\\"submit\\\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=\\\"checkbox\\\"],[type=\\\"radio\\\"]{box-sizing:border-box;padding:0}[type=\\\"number\\\"]::-webkit-inner-spin-button,[type=\\\"number\\\"]::-webkit-outer-spin-button{height:auto}[type=\\\"search\\\"]{-webkit-appearance:textfield;outline-offset:-2px}[type=\\\"search\\\"]::-webkit-search-cancel-button,[type=\\\"search\\\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ul:not(.browser-default){padding-left:0;list-style-type:none}ul:not(.browser-default)>li{list-style-type:none}a{text-decoration:none;-webkit-tap-highlight-color:transparent}.valign-wrapper{display:flex;align-items:center}.clearfix{clear:both}.z-depth-0{box-shadow:none !important}.z-depth-1{box-shadow:0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2)}.z-depth-1-half{box-shadow:0 3px 3px 0 rgba(0,0,0,0.14),0 1px 7px 0 rgba(0,0,0,0.12),0 3px 1px -1px rgba(0,0,0,0.2)}.z-depth-2{box-shadow:0 4px 5px 0 rgba(0,0,0,0.14),0 1px 10px 0 rgba(0,0,0,0.12),0 2px 4px -1px rgba(0,0,0,0.3)}.z-depth-3{box-shadow:0 8px 17px 2px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12),0 5px 5px -3px rgba(0,0,0,0.2)}.z-depth-4{box-shadow:0 16px 24px 2px rgba(0,0,0,0.14),0 6px 30px 5px rgba(0,0,0,0.12),0 8px 10px -7px rgba(0,0,0,0.2)}.z-depth-5{box-shadow:0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12),0 11px 15px -7px rgba(0,0,0,0.2)}.hoverable{transition:box-shadow .25s}.hoverable:hover{box-shadow:0 8px 17px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)}i{line-height:inherit}i.left{float:left;margin-right:15px}i.right{float:right;margin-left:15px}i.tiny{font-size:1rem}i.small{font-size:2rem}i.medium{font-size:4rem}i.large{font-size:6rem}ul.staggered-list li{opacity:0}.fade-in{opacity:0;transform-origin:0 50%}.hide{display:none !important}.left-align{text-align:left}.right-align{text-align:right}.center,.center-align{text-align:center}.left{float:left !important}.right{float:right !important}.no-select{user-select:none}.circle{border-radius:50%}a{text-decoration:none}html{line-height:1.5;font-weight:normal}h1,h2,h3,h4,h5,h6{font-weight:400;line-height:1.3}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{font-weight:inherit}em{font-style:italic}strong{font-weight:500}small{font-size:75%}\\n\", \"\"]);\n" + "source": "// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_GET_URL_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/getUrl.js\");\nvar ___CSS_LOADER_URL_IMPORT_0___ = require(\"../assets/fonts/tgico.eot\");\nvar ___CSS_LOADER_URL_IMPORT_1___ = require(\"../assets/fonts/tgico.ttf\");\nvar ___CSS_LOADER_URL_IMPORT_2___ = require(\"../assets/fonts/tgico.woff\");\nvar ___CSS_LOADER_URL_IMPORT_3___ = require(\"../assets/fonts/tgico.svg\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\nvar ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___);\n// Module\nexports.push([module.id, \"@font-face{font-family:\\\"tgico\\\";src:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \");src:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format(\\\"embedded-opentype\\\"),url(\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \") format(\\\"truetype\\\"),url(\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \") format(\\\"woff\\\"),url(\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \") format(\\\"svg\\\");font-weight:normal;font-style:normal;font-display:block}[class^=\\\"tgico-\\\"],.tgico:before,.tgico:after,[class*=\\\" tgico-\\\"]:before,[class*=\\\" tgico-\\\"]:after{font-family:\\\"tgico\\\" !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tgico-check:before{content:\\\"\\\"}.tgico-settings:before{content:\\\"\\\\e901\\\"}.tgico-smallscreen:before{content:\\\"\\\\e902\\\"}.tgico-smile:before{content:\\\"\\\\e903\\\"}.tgico-sport:before{content:\\\"\\\\e904\\\"}.tgico-stop:before{content:\\\"\\\\e905\\\"}.tgico-unarchive:before{content:\\\"\\\\e906\\\"}.tgico-unlock:before{content:\\\"\\\\e907\\\"}.tgico-unmute:before{content:\\\"\\\\e908\\\"}.tgico-unpin:before{content:\\\"\\\\e909\\\"}.tgico-unread:before{content:\\\"\\\\e90a\\\"}.tgico-up:before{content:\\\"\\\\e90b\\\"}.tgico-username:before{content:\\\"\\\\e90c\\\"}.tgico-user:before{content:\\\"\\\\e90d\\\"}.tgico-play:before{content:\\\"\\\\e90e\\\"}.tgico-poll:before{content:\\\"\\\\e90f\\\"}.tgico-radiooff:before{content:\\\"\\\\e910\\\"}.tgico-radioon:before{content:\\\"\\\\e911\\\"}.tgico-recent:before{content:\\\"\\\\e912\\\"}.tgico-reply:before{content:\\\"\\\\e913\\\"}.tgico-revote:before{content:\\\"\\\\e914\\\"}.tgico-savedmessages:before{content:\\\"\\\\e915\\\"}.tgico-search:before{content:\\\"\\\\e916\\\"}.tgico-send:before{content:\\\"\\\\e917\\\"}.tgico-send2:before{content:\\\"\\\\e918\\\"}.tgico-sending:before{content:\\\"\\\"}.tgico-sendingerror:before{content:\\\"\\\\e91a\\\"}.tgico-mute:before{content:\\\"\\\\e91b\\\"}.tgico-newchannel:before{content:\\\"\\\\e91c\\\"}.tgico-newchat_filled:before{content:\\\"\\\\e91d\\\"}.tgico-newgroup:before{content:\\\"\\\\e91e\\\"}.tgico-newprivate:before{content:\\\"\\\\e91f\\\"}.tgico-next:before{content:\\\"\\\\e920\\\"}.tgico-nosound:before{content:\\\"\\\\e921\\\"}.tgico-pause:before{content:\\\"\\\\e922\\\"}.tgico-permissions:before{content:\\\"\\\\e923\\\"}.tgico-phone:before{content:\\\"\\\\e924\\\"}.tgico-photo:before{content:\\\"\\\\e925\\\"}.tgico-pin:before{content:\\\"\\\\e926\\\"}.tgico-pinnedchat:before{content:\\\"\\\\e927\\\"}.tgico-largepause:before{content:\\\"\\\\e928\\\"}.tgico-largeplay:before{content:\\\"\\\\e929\\\"}.tgico-livelocation:before{content:\\\"\\\\e92a\\\"}.tgico-location:before{content:\\\"\\\\e92b\\\"}.tgico-lock:before{content:\\\"\\\\e92c\\\"}.tgico-logout:before{content:\\\"\\\\e92d\\\"}.tgico-menu:before{content:\\\"\\\\e92e\\\"}.tgico-message:before{content:\\\"\\\\e92f\\\"}.tgico-microphone:before{content:\\\"\\\\e930\\\"}.tgico-microphone2:before{content:\\\"\\\\e931\\\"}.tgico-minus:before{content:\\\"\\\\e932\\\"}.tgico-more:before{content:\\\"\\\\e933\\\"}.tgico-download:before{content:\\\"\\\\e934\\\"}.tgico-eats:before{content:\\\"\\\\e935\\\"}.tgico-edit:before{content:\\\"\\\\e936\\\"}.tgico-eye1:before{content:\\\"\\\\e937\\\"}.tgico-eye2:before{content:\\\"\\\\e938\\\"}.tgico-flag:before{content:\\\"\\\\e939\\\"}.tgico-forward:before{content:\\\"\\\\e93a\\\"}.tgico-fullscreen:before{content:\\\"\\\\e93b\\\"}.tgico-group:before{content:\\\"\\\\e93c\\\"}.tgico-help:before{content:\\\"\\\\e93d\\\"}.tgico-info:before{content:\\\"\\\\e93e\\\"}.tgico-lamp:before{content:\\\"\\\\e93f\\\"}.tgico-language:before{content:\\\"\\\\e940\\\"}.tgico-checkboxempty:before{content:\\\"\\\\e941\\\"}.tgico-checkboxon:before{content:\\\"\\\\e942\\\"}.tgico-close:before{content:\\\"\\\\e943\\\"}.tgico-colorize:before{content:\\\"\\\\e944\\\"}.tgico-copy:before{content:\\\"\\\\e945\\\"}.tgico-data:before{content:\\\"\\\\e946\\\"}.tgico-delete_filled:before{content:\\\"\\\\e947\\\"}.tgico-delete:before{content:\\\"\\\\e948\\\"}.tgico-deleteuser:before{content:\\\"\\\\e949\\\"}.tgico-document:before{content:\\\"\\\\e94a\\\"}.tgico-down:before{content:\\\"\\\\e94b\\\"}.tgico-attach:before{content:\\\"\\\\e94c\\\"}.tgico-avatar_archivedchats:before{content:\\\"\\\\e94d\\\"}.tgico-avatar_deletedaccount:before{content:\\\"\\\\e94e\\\"}.tgico-avatar_savedmessages:before{content:\\\"\\\\e94f\\\"}.tgico-back:before{content:\\\"\\\\e950\\\"}.tgico-camera:before{content:\\\"\\\\e951\\\"}.tgico-cameraadd:before{content:\\\"\\\\e952\\\"}.tgico-car:before{content:\\\"\\\\e953\\\"}.tgico-channel:before{content:\\\"\\\\e954\\\"}.tgico-channelviews:before{content:\\\"\\\\e955\\\"}.tgico-chatsplaceholder:before{content:\\\"\\\\e956\\\"}.tgico-check1:before{content:\\\"\\\\e957\\\"}.tgico-checkbox:before{content:\\\"\\\\e958\\\"}.tgico-checkboxblock:before{content:\\\"\\\\e959\\\"}.tgico-checks:before{content:\\\"\\\"}.tgico-activesessions:before{content:\\\"\\\\e95b\\\"}.tgico-add:before{content:\\\"\\\\e95c\\\"}.tgico-addmember_filled:before{content:\\\"\\\\e95d\\\"}.tgico-adduser:before{content:\\\"\\\\e95e\\\"}.tgico-admin:before{content:\\\"\\\\e95f\\\"}.tgico-animals:before{content:\\\"\\\\e960\\\"}.tgico-archive:before{content:\\\"\\\\e961\\\"}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n" }, { "id": 55, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./src/scss/style.scss", - "index": 5, - "index2": 10, - "size": 510, + "identifier": "F:\\tweb\\node_modules\\file-loader\\dist\\cjs.js??ref--7!F:\\tweb\\src\\assets\\fonts\\tgico.eot", + "name": "./src/assets/fonts/tgico.eot", + "index": 14, + "index2": 11, + "size": 42, "cacheable": true, "built": true, "optional": false, @@ -6392,38 +6077,58 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "issuerId": 52, - "issuerName": "./src/index.ts", + "issuer": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "issuerId": 54, + "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 + } + }, + { + "id": 53, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./src/scss/tgico.scss", + "profile": { + "factory": 842, + "building": 0, + "dependencies": 1062 + } + }, + { + "id": 54, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "profile": { + "factory": 1062, + "building": 2152 } } ], "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 + "factory": 1699, + "building": 442 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [], + "assets": [ + "assets/fonts/tgico.eot" + ], "reasons": [ { - "moduleId": 52, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", + "moduleId": 54, + "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "type": "cjs require", - "userRequest": "./scss/style.scss", - "loc": "21:0-28" + "userRequest": "../assets/fonts/tgico.eot", + "loc": "4:36-72" } ], "usedExports": true, @@ -6431,16 +6136,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 1, - "source": "var content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./style.scss\");\n\nif (typeof content === 'string') {\n content = [[module.id, content, '']];\n}\n\nvar options = {}\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = require(\"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\")(content, options);\n\nif (content.locals) {\n module.exports = content.locals;\n}\n" + "depth": 3, + "source": "module.exports = \"assets/fonts/tgico.eot\";" }, { "id": 56, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", - "index": 6, - "index2": 9, - "size": 62278, + "identifier": "F:\\tweb\\node_modules\\file-loader\\dist\\cjs.js??ref--7!F:\\tweb\\src\\assets\\fonts\\tgico.ttf", + "name": "./src/assets/fonts/tgico.ttf", + "index": 15, + "index2": 12, + "size": 42, "cacheable": true, "built": true, "optional": false, @@ -6448,48 +6153,58 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "issuerId": 55, - "issuerName": "./src/scss/style.scss", + "issuer": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "issuerId": 54, + "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 55, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./src/scss/style.scss", + "id": 53, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./src/scss/tgico.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 + } + }, + { + "id": 54, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "profile": { + "factory": 1062, + "building": 2152 } } ], "profile": { - "factory": 536, - "building": 3038, - "dependencies": 1 + "factory": 1699, + "building": 442 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [], + "assets": [ + "assets/fonts/tgico.ttf" + ], "reasons": [ { - "moduleId": 55, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "module": "./src/scss/style.scss", - "moduleName": "./src/scss/style.scss", + "moduleId": 54, + "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "type": "cjs require", - "userRequest": "!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./style.scss", - "loc": "1:14-181" + "userRequest": "../assets/fonts/tgico.ttf", + "loc": "5:36-72" } ], "usedExports": true, @@ -6497,15 +6212,15 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 2, - "source": "exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Imports\nvar getUrl = require(\"../../node_modules/css-loader/dist/runtime/getUrl.js\");\nvar ___CSS_LOADER_URL___0___ = getUrl(require(\"../../public/assets/img/camomile.jpg\"));\nvar ___CSS_LOADER_URL___1___ = getUrl(require(\"../assets/img/msg-tail-left.svg\"));\nvar ___CSS_LOADER_URL___2___ = getUrl(require(\"../assets/img/msg-tail-right.svg\"));\nvar ___CSS_LOADER_URL___3___ = getUrl(require(\"../assets/img/doc-in.svg\"));\n// Module\nexports.push([module.id, \".chats-container .input-search{position:relative;width:100%;margin-left:1rem}.chats-container .input-search input{background-color:rgba(112,117,121,0.08);border:2px solid transparent;height:3rem;border-radius:22px;box-sizing:border-box;padding:0 1.5rem 0 3rem;-webkit-transition:all .15s ease-out;transition:all .15s ease-out;width:100%}.chats-container .input-search input:focus{background-color:rgba(112,117,121,0);border:2px solid #4EA4F6}.chats-container .input-search input:focus+.tgico{color:#4EA4F6;opacity:1}.chats-container .input-search .tgico{position:absolute;left:1rem;top:50%;transform:translateY(-50%);text-align:center;font-size:1.65rem;color:#707579;opacity:.6;-webkit-transition:all .15s ease-out;transition:all .15s ease-out}.chats-container ul{margin:0;display:flex;flex-direction:column;width:100%}.chats-container li{padding:2px 0;overflow:hidden;background-color:#fff}.chats-container li>.rp{height:70px;max-height:70px;border-radius:8px;display:grid;align-items:center;grid-template-columns:64px calc(100% - 64px - 6.5px);position:relative;cursor:pointer;padding:0 8.5px;margin:0 8.5px 0 8px;overflow:hidden}.chats-container li>.rp:hover{background:rgba(112,117,121,0.08)}.chats-container li.active>.rp{background:rgba(112,117,121,0.08)}.chats-container .pinned-delimiter{display:flex;padding:8px 0 4px}.chats-container .pinned-delimiter span{margin:0;width:100%;height:1px;background-color:#DADCE0}.chats-container p{margin:0;display:flex;justify-content:space-between;align-items:center;height:1.7rem}.chats-container p .user-title+span{font-size:.8rem}.chats-container p .user-last-message+span:not(.tgico-pinnedchat){font-size:.9rem}.chats-container span{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;margin:.1rem 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chats-container .user-caption{max-width:100%;max-height:100%;overflow:hidden;color:#707579}.chats-container .user-title{max-width:80%}.chats-container .user-title img.emoji{vertical-align:top;width:18px;height:18px}.chats-container .user-title span.emoji{overflow:visible;margin:0;width:auto;font-size:14px;vertical-align:unset}.chats-container .user-last-message{max-width:80%}.chats-container .user-last-message i{font-style:normal;color:#50a2e9}.chats-container .user-last-message img.emoji{width:20px;height:20px}.chats-container .user-last-message span.emoji{font-size:1.2rem;margin:0 .125rem;overflow:visible}.chats-container .message-status{margin-right:.1rem;margin-top:.3rem}.chats-container .message-status[class*=\\\" tgico-\\\"]{color:#4DCD5E;font-size:1.25rem}.chats-container .unread,.chats-container .unread-muted{border-radius:12px;min-width:24px;padding:0 8px;height:24px;text-align:center;line-height:24px;color:#fff;font-weight:500}.chats-container .tgico-pinnedchat{border-radius:50%;width:24px;height:24px;line-height:24px;font-size:1.5rem;color:#fff;text-align:center}.chats-container .unread:empty,.chats-container .unread-muted:empty{visibility:hidden}.chats-container .unread{background:#4DCD5E}.chats-container .unread-muted,.chats-container .tgico-pinnedchat{background:#c5c9cc}.chat-container{display:flex;width:100%;align-items:center;height:100vh;overflow:hidden;flex-direction:column;position:relative;background-image:url(\" + ___CSS_LOADER_URL___0___ + \");background-size:cover;background-position:center center}.chat-container #im-title{cursor:pointer}.chat-container #im-title span.emoji{vertical-align:inherit}.chat-container #chat-background-canvas{display:none}.chat-container #topbar{width:100%;background-color:#fff;box-sizing:border-box;user-select:none;-webkit-user-select:none;display:flex;align-items:center;box-shadow:0 1px 2px 0 rgba(16,35,47,0.07);padding:.5rem 1rem;flex:0 0 auto;min-height:60px;max-height:60px}.chat-container #topbar>*{margin:0 2px}.chat-container #topbar .chat-info{flex-grow:1}.chat-container #topbar .content{padding-left:1rem;flex:1}.chat-container #topbar .person{display:flex;align-items:center;cursor:pointer}.chat-container #topbar .person:hover{background-color:transparent}.chat-container #topbar .person .user-avatar{width:44px;height:44px;line-height:44px}.chat-container #topbar .person .bottom{font-size:14px;line-height:18px;color:#9e9e9e}.chat-container #topbar .person .bottom .online{color:#50a2e9}.chat-container #bubbles{width:100%;height:100%;max-height:100%;flex:1 1 auto;overflow:hidden;position:relative}.chat-container #bubbles>.scrollable{position:unset}.chat-container #bubbles:not(.scrolled-down){-webkit-mask-image:-webkit-linear-gradient(bottom, transparent, #000 20px);mask-image:linear-gradient(0deg, transparent 0, #000 20px)}.chat-container #bubbles:not(.scrolled-down) #bubbles-go-down{opacity:1}.chat-container #bubbles .preloader{width:100%;height:100%}.chat-container #bubbles .preloader svg{width:50px;height:50px}.chat-container #bubbles #bubbles-inner{max-width:700px;width:100%;display:flex;flex-direction:column;flex-shrink:1;padding-top:9px;margin:0 auto;box-sizing:border-box;min-height:100%;justify-content:flex-end}.chat-container #bubbles #bubbles-inner.is-chat .in{padding-left:45px}.chat-container #bubbles #bubbles-go-down{position:absolute;background-color:#fff;border-radius:50%;width:3.25rem;height:3.25rem;color:#9e9e9e;font-size:30px;display:flex;align-items:center;justify-content:center;right:17.5px;bottom:17.5px;cursor:pointer;opacity:0;transition:.2s opacity;user-select:none;-webkit-user-select:none}.chat-container #bubbles #bubbles-go-down:before{margin-left:.75px}.chat-container #bubbles .service{margin:1rem 0;align-self:center}.chat-container #bubbles .service .service-msg{color:#fff;background-color:rgba(0,0,0,0.22);padding:0 8px;line-height:24px;font-size:15px;border-radius:12px;user-select:none;display:flex;align-items:center;justify-content:center}.chat-container #bubbles .service .service-msg .name{cursor:pointer;margin-right:5px}.chat-container #bubbles .bubble{min-width:60px;max-width:85%;border-radius:12px;box-shadow:0 1px 2px 0 rgba(16,35,47,0.15);position:relative;display:flex;flex-direction:column-reverse;font-size:0;width:max-content;height:fit-content}.chat-container #bubbles .bubble.forwarded .forward{opacity:0;position:absolute;right:-46px;bottom:0;width:38px;height:38px;font-size:1.5rem;align-items:center;display:flex;justify-content:center;color:#fff;border-radius:50%;background:rgba(0,0,0,0.16);cursor:pointer;transition:.2s opacity}.chat-container #bubbles .bubble.forwarded .forward svg{width:20px;height:20px}.chat-container #bubbles .bubble:not(.hide-name) .audio{margin:4px 0}.chat-container #bubbles .bubble:hover .forward{opacity:1}.chat-container #bubbles .bubble .reply{width:auto}.chat-container #bubbles .bubble .reply .reply-content{height:auto;min-height:32px}.chat-container #bubbles .bubble.photo,.chat-container #bubbles .bubble.video{width:min-content}.chat-container #bubbles .bubble.photo .box.web,.chat-container #bubbles .bubble.video .box.web{max-width:100%}.chat-container #bubbles .bubble.webpage .time{float:none;width:0}.chat-container #bubbles .bubble img.emoji{height:18px;width:18px;margin:0 .05rem}.chat-container #bubbles .bubble span.emoji{height:auto;width:auto;overflow:visible;vertical-align:unset}.chat-container #bubbles .bubble.emoji-big{font-size:0;background:none !important;box-shadow:none;line-height:1;user-select:none;-webkit-user-select:none}.chat-container #bubbles .bubble.emoji-big .attachment{padding-top:.5rem;padding-bottom:1.5rem;max-width:fit-content !important;max-height:fit-content !important}.chat-container #bubbles .bubble.emoji-big .attachment span.emoji{height:auto;width:auto}.chat-container #bubbles .bubble.emoji-1x{font-size:96px}.chat-container #bubbles .bubble.emoji-1x img.emoji{height:64px;width:64px}.chat-container #bubbles .bubble.emoji-2x{font-size:64px}.chat-container #bubbles .bubble.emoji-2x img.emoji{height:48px;width:48px}.chat-container #bubbles .bubble.emoji-3x{font-size:52px}.chat-container #bubbles .bubble.emoji-3x img.emoji{height:32px;width:32px}.chat-container #bubbles .bubble.sticker,.chat-container #bubbles .bubble.round{cursor:pointer;background:none !important;box-shadow:none;max-width:300px;max-height:300px}.chat-container #bubbles .bubble.sticker img,.chat-container #bubbles .bubble.round img{object-fit:contain}.chat-container #bubbles .bubble.sticker .message.message-empty,.chat-container #bubbles .bubble.round .message.message-empty{display:none}.chat-container #bubbles .bubble.sticker:hover .message.message-empty,.chat-container #bubbles .bubble.round:hover .message.message-empty{display:block}.chat-container #bubbles .bubble.round .attachment{max-width:200px;max-height:200px}.chat-container #bubbles .bubble .message:not(.message-empty)+.attachment,.chat-container #bubbles .bubble.is-reply .message:not(.message-empty)+.attachment{border-bottom-left-radius:0;border-bottom-right-radius:0}.chat-container #bubbles .bubble:not(.emoji-big) .attachment{font-size:0}.chat-container #bubbles .bubble .attachment{max-width:100%;border-radius:inherit;overflow:hidden;display:flex;justify-content:center;position:relative}.chat-container #bubbles .bubble .attachment img,.chat-container #bubbles .bubble .attachment video{width:auto;height:auto;max-width:100%;cursor:pointer}.chat-container #bubbles .bubble:not(.sticker) .attachment{max-width:380px;max-height:380px;width:max-content}.chat-container #bubbles .bubble:not(.sticker) img:not(.emoji),.chat-container #bubbles .bubble:not(.sticker) video{object-fit:cover;width:100%;height:100%}.chat-container #bubbles .bubble.round.video .attachment{max-height:200px;max-width:200px}.chat-container #bubbles .bubble .box,.chat-container #bubbles .bubble .reply{font-size:.95rem;margin:4px 4px 4px 6px;padding:.25rem;margin-bottom:-5px;border-radius:4px}.chat-container #bubbles .bubble .box.web,.chat-container #bubbles .bubble .reply.web{margin-top:-6px;max-width:100%;overflow:hidden}.chat-container #bubbles .bubble .box.web .preview,.chat-container #bubbles .bubble .reply.web .preview{max-height:300px;max-width:380px;border-radius:4px;margin-bottom:3px;overflow:hidden;user-select:none;-webkit-user-select:none;cursor:pointer;position:relative;width:max-content}.chat-container #bubbles .bubble .box.web .preview img,.chat-container #bubbles .bubble .box.web .preview video,.chat-container #bubbles .bubble .reply.web .preview img,.chat-container #bubbles .bubble .reply.web .preview video{max-width:100%}.chat-container #bubbles .bubble .box.web .title,.chat-container #bubbles .bubble .reply.web .title{letter-spacing:-0.2px;line-height:1.2;font-weight:500}.chat-container #bubbles .bubble .box.web .name,.chat-container #bubbles .bubble .reply.web .name{letter-spacing:-0.3px;display:block}.chat-container #bubbles .bubble .box.web .name:hover,.chat-container #bubbles .bubble .reply.web .name:hover{text-decoration:underline}.chat-container #bubbles .bubble .box.web .text,.chat-container #bubbles .bubble .reply.web .text{overflow:hidden;text-overflow:ellipsis;line-height:1.2;letter-spacing:-0.3px;margin-top:2px;font-size:0.965rem}.chat-container #bubbles .bubble .box .quote,.chat-container #bubbles .bubble .reply .quote{padding-left:0.55rem;max-width:100%;overflow:hidden;width:100%}.chat-container #bubbles .bubble .box .text,.chat-container #bubbles .bubble .reply .text{line-height:1.2}.chat-container #bubbles .bubble .box .name,.chat-container #bubbles .bubble .box .reply-title,.chat-container #bubbles .bubble .reply .name,.chat-container #bubbles .bubble .reply .reply-title{font-weight:500;display:inline !important}.chat-container #bubbles .bubble .reply{max-width:300px;margin-bottom:6px;margin-top:0;cursor:pointer}.chat-container #bubbles .bubble.is-reply.emoji-big .reply,.chat-container #bubbles .bubble.is-reply.sticker .reply{padding:10px;border-radius:12px;border:1px solid #ccc;max-width:300px;height:54px;max-height:54px;white-space:nowrap;position:absolute;top:0;margin-bottom:0}.chat-container #bubbles .bubble.is-reply.emoji-big .reply .reply-content,.chat-container #bubbles .bubble.is-reply.sticker .reply .reply-content{margin-top:0}.chat-container #bubbles .bubble.is-reply .reply-content{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.chat-container #bubbles .bubble .message{font-size:16px;padding:0 .6rem 6px .6rem;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:#000;line-height:21px}.chat-container #bubbles .bubble .message *{overflow:hidden;text-overflow:ellipsis}.chat-container #bubbles .bubble .message:last-child{padding-top:6px}.chat-container #bubbles .bubble .message.message-empty{position:absolute;bottom:.1rem;right:.1rem;border-radius:12px;background-color:rgba(0,0,0,0.4);padding:0 .3rem;z-index:2}.chat-container #bubbles .bubble .message.message-empty .time{color:#fff}.chat-container #bubbles .bubble .message .emoji{font-size:1.2rem}.chat-container #bubbles .bubble .time{font-size:.8rem;user-select:none;float:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:20px;line-height:20px}.chat-container #bubbles .bubble .time .inner{position:absolute;bottom:0;right:0;font-size:12px;display:flex;align-items:center;line-height:1}.chat-container #bubbles .bubble .time .inner i{font-size:1.15rem;margin-right:.4rem;margin-left:.1rem}.chat-container #bubbles .bubble .time .inner i.edited{overflow:visible;font-size:.8rem}.chat-container #bubbles .bubble.is-edited.channel-post .time{width:calc(5rem + 42px)}.chat-container #bubbles .bubble.channel-post .time{width:5rem}.chat-container #bubbles .bubble.is-edited .time{width:90px}.chat-container #bubbles .bubble .message.message-empty .time{padding:0;display:flex;align-items:center;width:auto}.chat-container #bubbles .bubble .message.message-empty .time .inner{margin-bottom:0;position:relative;padding:0 2.5px;bottom:0}.chat-container #bubbles .bubble .user-avatar{position:absolute;left:-3rem;width:40px;height:40px;line-height:40px;bottom:0;font-size:1rem;cursor:pointer}.chat-container #bubbles .bubble:not(.forwarded).hide-name .name,.chat-container #bubbles .bubble.emoji-big .name{display:none}.chat-container #bubbles .bubble .name{cursor:pointer}.chat-container #bubbles .bubble>.name{padding:.32rem .6rem 0 .6rem;font-weight:500;color:#50a2e9;font-size:.9rem;width:max-content;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-container #bubbles .bubble:not(.webpage).photo .name,.chat-container #bubbles .bubble:not(.webpage).video .name{padding-bottom:6px}.chat-container #bubbles .bubble:not(.webpage).photo .message:not(.message-empty),.chat-container #bubbles .bubble:not(.webpage).video .message:not(.message-empty){padding-top:6px}.chat-container #bubbles .bubble.hide-name:not(.is-reply) .message:not(.message-empty){padding-top:6px}.chat-container #bubbles .bubble.hide-name:not(.sticker):not(.emoji-big) .reply{margin-top:6px}.chat-container #bubbles .bubble:not(.sticker):not(.emoji-big):not(.round):last-child:after{position:absolute;bottom:-1px;width:11px;height:20px;background-repeat:no-repeat repeat;content:'';background-size:11px 20px}.chat-container #bubbles .bubble+.bubble{margin-top:5px}.chat-container #bubbles .in,.chat-container #bubbles .out{display:flex;flex-direction:column;padding:5px 0}.chat-container #bubbles .in{align-items:flex-start}.chat-container #bubbles .in a{color:#50a2e9}.chat-container #bubbles .in .quote:hover,.chat-container #bubbles .in .reply:hover{background-color:rgba(112,117,121,0.08)}.chat-container #bubbles .in .bubble.is-reply.emoji-big .box,.chat-container #bubbles .in .bubble.is-reply.emoji-big .reply,.chat-container #bubbles .in .bubble.is-reply.sticker .box,.chat-container #bubbles .in .bubble.is-reply.sticker .reply{left:calc(100% + 10px);background-color:#fff}.chat-container #bubbles .in .quote{border-left:2px #50a2e9 solid}.chat-container #bubbles .in .quote *{overflow:hidden;text-overflow:ellipsis}.chat-container #bubbles .in .quote .name,.chat-container #bubbles .in .reply-title{color:#50a2e9}.chat-container #bubbles .in .time{color:#a3adb6;width:36px}.chat-container #bubbles .in .time .inner{padding:0 7px 0 5px;margin-bottom:4px}.chat-container #bubbles .in .bubble{background-color:#ffffff;border-radius:6px 12px 12px 6px}.chat-container #bubbles .in .bubble:first-child{border-radius:12px 12px 12px 6px}.chat-container #bubbles .in .bubble:last-child{border-radius:6px 12px 12px 0px}.chat-container #bubbles .in .bubble:last-child:after{left:-8.4px;background-image:url(\" + ___CSS_LOADER_URL___1___ + \")}.chat-container #bubbles .in .bubble:first-child:last-child{border-radius:12px 12px 12px 0px}.chat-container #bubbles .in .bubble.forwarded .attachment,.chat-container #bubbles .in .bubble.is-reply .attachment,.chat-container #bubbles .in .bubble:not(.hide-name) .message-empty+.attachment{border-top-left-radius:0;border-top-right-radius:0}.chat-container #bubbles .out{align-items:flex-end}.chat-container #bubbles .out .quote:hover,.chat-container #bubbles .out .reply:hover{background-color:rgba(77,205,94,0.12)}.chat-container #bubbles .out .bubble.is-reply.emoji-big .box,.chat-container #bubbles .out .bubble.is-reply.emoji-big .reply,.chat-container #bubbles .out .bubble.is-reply.sticker .box,.chat-container #bubbles .out .bubble.is-reply.sticker .reply{background-color:#eeffde;right:calc(100% + 10px);border-color:rgba(77,205,94,0.12)}.chat-container #bubbles .out .quote{border-left:2px #50af4f solid}.chat-container #bubbles .out .reply-border{background-color:#50af4f}.chat-container #bubbles .out .quote .name,.chat-container #bubbles .out .reply-title{color:#50af4f}.chat-container #bubbles .out .time{color:#50af4f;width:50px;display:inline-block}.chat-container #bubbles .out .time .inner{padding:0 4px 0 4px;bottom:1px}.chat-container #bubbles .out .bubble .time .tgico:after{font-size:19px;vertical-align:middle;margin-left:1px}.chat-container #bubbles .out .bubble.forwarded .name{color:#50af4f}.chat-container #bubbles .out .bubble.is-read .time .tgico:after{content:\\\"\\\"}.chat-container #bubbles .out .bubble.is-sent .time .tgico:after{content:\\\"\\\"}.chat-container #bubbles .out .bubble.is-sending .time .tgico:after{content:\\\"\\\"}.chat-container #bubbles .out .bubble.is-reply .name{display:none}.chat-container #bubbles .out .bubble.is-edited .time{width:85px}.chat-container #bubbles .out .bubble{background-color:#eeffde;border-radius:12px 6px 6px 12px}.chat-container #bubbles .out .bubble:first-child{border-radius:12px 12px 6px 12px}.chat-container #bubbles .out .bubble:last-child{border-radius:12px 6px 0px 12px}.chat-container #bubbles .out .bubble:last-child:after{right:-8.4px;background-image:url(\" + ___CSS_LOADER_URL___2___ + \")}.chat-container #bubbles .out .bubble:first-child:last-child{border-radius:12px 12px 0px 12px}.chat-container #bubbles .out .bubble.forwarded .attachment,.chat-container #bubbles .out .bubble.is-reply .attachment{border-top-left-radius:0;border-top-right-radius:0}.chat-container #bubbles .out .user-avatar{left:auto;right:-2.5rem}.chat-container #bubbles .out .audio-waveform rect{fill:#B8DDA9}.chat-container #bubbles .out .audio-waveform rect.active{fill:#68AB5A}.chat-container #bubbles .out .audio-time{color:#68AB5A}.chat-container #bubbles .out .audio-toggle,.chat-container #bubbles .out .audio-download{background-color:#4FAE4E}.chat-container #chat-input{display:flex;align-items:center;width:100%;max-width:700px;padding-top:.35rem;padding-bottom:1rem;justify-content:space-between;flex:0 0 auto;position:relative}.chat-container #chat-input #input-message{background:none;border:none;width:100%;padding:.5rem .5rem;font-size:.95rem;max-height:30rem;overflow-y:none;resize:none;border:none;outline:none;cursor:text}.chat-container #chat-input [contenteditable=true]:empty:before{content:attr(data-placeholder);color:#9e9e9e;display:block}.chat-container #chat-input .btn-circle{flex:0 0 auto;font-size:1.5rem;line-height:1.5rem;height:3.25rem;width:3.25rem;color:#9e9e9e;background-color:#fff;align-self:flex-end}.chat-container #chat-input .btn-circle.tgico-send{color:#50a2e9}.chat-container #chat-input .os-scrollbar-handle{background:rgba(0,0,0,0.2)}.chat-container .input-message{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3.75rem);justify-content:center;background-color:#fff;border-radius:12px;border-bottom-right-radius:0;box-shadow:0 1px 2px 0 rgba(16,35,47,0.07);margin-right:9px;padding:4.5px .5rem;min-height:3.25rem;max-height:30rem;caret-color:#4EA4F6;flex:1;position:relative}.chat-container .input-message:after{position:absolute;bottom:-1px;width:11px;height:20px;background-repeat:no-repeat repeat;content:'';background-size:11px 20px;right:-9px;background-image:url(\" + ___CSS_LOADER_URL___1___ + \");transform:scaleX(-1)}.chat-container .input-message #attach-file.menu-open{color:#50a2e9}.chat-container .input-message>div{display:flex;justify-content:space-between;align-items:center;width:100%}.chat-container .input-message .reply-wrapper{justify-content:flex-start;overflow:hidden;transition:.2s all;height:0px}.chat-container .input-message .reply-wrapper.active{height:39px}.chat-container .input-message .reply-wrapper .reply{width:100%;margin-left:.5rem;min-height:35px}.chat-container .input-message .new-message-wrapper{align-items:flex-end}.chat-container .input-message .new-message-wrapper .btn-icon:before{vertical-align:bottom}.chat-container .input-message .input-message-container{width:1%;max-height:inherit;flex:1 1 auto;position:relative;overflow:hidden}.chat-container .input-message .btn-icon{display:block;color:#9e9e9e;font-size:1.5rem;line-height:1.5rem;transition:.2s color;flex:0 0 auto}.chat-container .input-message .btn-icon.active{color:#50a2e9}.chat-container .input-message .emoji{font-size:24px;height:24px;width:24px}.chat-container .pinned-message,.chat-container .reply{cursor:pointer;display:flex;flex-direction:row;align-items:center;overflow:hidden;box-sizing:border-box;width:187px;margin-right:1rem;max-height:35px;position:relative}.chat-container .pinned-message.is-reply-media .pinned-message-content,.chat-container .pinned-message.is-reply-media .reply-content,.chat-container .reply.is-reply-media .pinned-message-content,.chat-container .reply.is-reply-media .reply-content{padding-left:40px}.chat-container .pinned-message:hover,.chat-container .reply:hover{background-color:rgba(112,117,121,0.08)}.chat-container .pinned-message-border,.chat-container .reply-border{height:32px;border-radius:1px;min-width:2px;background:#50a2e9}.chat-container .pinned-message-content,.chat-container .reply-content{margin-left:8px;flex-grow:1;flex-shrink:1;overflow:hidden;pointer-events:none;position:relative;height:32px;display:flex;flex-direction:column;justify-content:space-between}.chat-container .pinned-message-title,.chat-container .reply-title{color:#50a2e9}.chat-container .pinned-message-title,.chat-container .pinned-message-subtitle,.chat-container .reply-title,.chat-container .reply-subtitle{font-size:14px;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-container .pinned-message-subtitle,.chat-container .reply-subtitle{white-space:nowrap;color:#111}.chat-container .pinned-message-media,.chat-container .reply-media{height:32px;width:32px;border-radius:8px;overflow:hidden;position:absolute;left:0;top:0;background-repeat:no-repeat;background-size:cover;background-position:center center}.chat-container .pinned-message img.emoji,.chat-container .reply img.emoji{height:16px;width:16px;vertical-align:top}.chat-container .pinned-message span.emoji,.chat-container .reply span.emoji{font-size:16px;vertical-align:unset}#bubble-contextmenu{position:fixed;right:auto;bottom:auto}.emoji-dropdown{position:absolute;left:0;top:calc(-420px + -0.75rem);display:flex;flex-direction:column;width:420px;height:420px;background:#fff;box-shadow:0px 5px 10px 5px rgba(16,35,47,0.14);border-radius:12px;z-index:2;display:flex;overflow:hidden;transition:all 0.2s ease-out;transform:scale(0);transform-origin:0 100%}.emoji-dropdown.active{transition:all 0.2s ease-in;transform:scale(1)}.emoji-dropdown>.menu-horizontal{padding:0 3rem}.emoji-dropdown .emoji-container{width:100%;max-width:100%;overflow:hidden;height:100%}.emoji-dropdown .tabs-container{height:100%}.emoji-dropdown .tabs-container .emoji-category{font-size:2.25rem;line-height:2.25rem;margin-top:1px}.emoji-dropdown .tabs-container .emoji-category>*{margin:0;padding:5px 5px;line-height:inherit;border-radius:8px;cursor:pointer;user-select:none;-webkit-user-select:none;width:44px;height:44px}.emoji-dropdown .tabs-container .emoji-category>* .emoji{width:100%;height:100%}.emoji-dropdown .tabs-container .emoji-category>*:hover{background-color:rgba(112,117,121,0.08)}.emoji-dropdown .tabs-container .emoji-category,.emoji-dropdown .tabs-container .sticker-category{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.emoji-dropdown .tabs-container .emoji-category::after,.emoji-dropdown .tabs-container .sticker-category::after{content:\\\"\\\";flex:auto}.emoji-dropdown .tabs-container .sticker-category>div{width:80px;height:80px;display:flex;align-items:center;cursor:pointer;user-select:none;-webkit-user-select:none;padding:1px 2.5px;justify-content:center;border-radius:12px}.emoji-dropdown .tabs-container .sticker-category>div:hover{background-color:rgba(112,117,121,0.08)}.emoji-dropdown .tabs-container .sticker-category>div>*{max-width:100%;max-height:100%}.emoji-dropdown .tabs-container>div{min-height:100%;flex-direction:column;height:100%}.emoji-dropdown .tabs-container>div>div:first-of-type{flex:1;padding:0;padding-top:10px}.emoji-dropdown .tabs-container .scrollable{padding:0 10px}.emoji-dropdown .emoji-padding .menu-horizontal{border-top:1px solid #dadce0}.emoji-dropdown .emoji-padding .menu-horizontal,.emoji-dropdown .stickers-padding .menu-horizontal{height:50px;border-bottom:none;padding:0;width:100%}.emoji-dropdown .emoji-padding .menu-horizontal li,.emoji-dropdown .stickers-padding .menu-horizontal li{padding:0;width:50px;height:50px;line-height:50px;display:flex;align-items:center}.emoji-dropdown .emoji-padding .menu-horizontal li.active:after,.emoji-dropdown .stickers-padding .menu-horizontal li.active:after{display:none}.emoji-dropdown .emoji-padding .menu-horizontal>li{font-size:1.65rem}.emoji-dropdown .stickers-padding .menu-wrapper{padding:0;height:50px;max-width:100%;border-top:1px solid #dadce0}.emoji-dropdown .stickers-padding .menu-wrapper .menu-horizontal{width:100%;height:100%}.emoji-dropdown .stickers-padding li{flex:0 0 auto}.emoji-dropdown .stickers-padding li.active:not(.tgico-recent){background-color:rgba(112,117,121,0.08)}.emoji-dropdown .stickers-padding li>*{padding:.75rem;max-width:100%;max-height:100%;width:100%;height:100%}.popup.popup-delete-message .popup-header{margin-bottom:1rem}.popup .popup-buttons{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end}.popup .popup-buttons button{background:none;outline:none;border:none;padding:.5rem .5rem;text-transform:uppercase;transition:.2s;border-radius:8px;cursor:pointer;color:#50a2e9}.popup .popup-buttons button:hover{background-color:rgba(112,117,121,0.08)}.popup .popup-buttons button+button{margin-top:.5rem}.sidebar{background-color:#fff;overflow:hidden}.sidebar-left{border-right:1px solid #DADCE0}.sidebar-right{border-left:1px solid #DADCE0}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1.25rem;min-height:60px}.sidebar-header .sidebar-title{flex:1;padding-left:2rem;font-weight:500;font-size:1.4rem}.sidebar-header .btn-icon+.btn-icon{margin-left:.5rem}.profile-content .profile-name{text-align:center;font-size:23px;font-weight:500;margin:3px 0}.profile-content .profile-name span.emoji{vertical-align:inherit;min-width:min-content}.profile-content .profile-subtitle{text-align:center;color:#707579;font-size:14px;margin:0 0 18px}.profile-content .profile-subtitle.online{color:#50a2e9}.profile-content .profile-row{display:flex;width:100%;flex-direction:column;padding-left:80px;padding-top:2px;padding-right:12px;font-size:15px;position:relative;margin:1.75rem 0}.profile-content .profile-row:before{position:absolute;left:24px;font-size:24px;color:#707579}.profile-content .profile-row p{color:#000;margin:0}.profile-content .profile-row .profile-row-label{color:#9e9e9e;font-size:14px;margin-top:1px}.profile-content .profile-row-bio .emoji{width:24px;height:24px}.profile-content .user-avatar{width:120px;height:120px;margin:0 auto 20px;font-size:4rem !important}.profile-content [type=\\\"checkbox\\\"]+span{padding-left:54px;margin-left:-54px}.profile-content .content-container{width:100%;max-width:100%;overflow:hidden}.profile-content .profile-tabs{margin-top:40px}.profile-content .profile-tabs-content #content-media{width:100%;display:flex;flex-direction:column}.profile-content .profile-tabs-content #content-media>div{display:grid;grid-template-columns:1fr 1fr 1fr;grid-auto-rows:max-content;grid-gap:3.5px;place-items:start}.profile-content .profile-tabs-content #content-media>div+div{margin-top:3.5px}.profile-content .profile-tabs-content #content-media>div>div{width:100%;cursor:pointer;background-repeat:no-repeat;background-size:cover;background-position:center center}.profile-content .profile-tabs-content #content-media>div>div::before{content:\\\"\\\";display:inline-block;width:1px;height:0;padding-bottom:100%}.profile-content .profile-tabs-content #content-docs{padding:7px 20px}.profile-content .profile-tabs-content #content-docs .document{padding-left:4rem;padding-right:1rem;height:calc(50px + 1.5rem)}.profile-content .profile-tabs-content #content-docs .document-ico,.profile-content .profile-tabs-content #content-docs .document-download{width:48px;height:48px}.profile-content .profile-tabs-content #content-docs .document-name{font-weight:normal;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis}.profile-content .profile-tabs-content #content-links{padding:0 30px 15px 15px}.profile-content .profile-tabs-content #content-links>div{display:flex;flex-direction:column;margin-top:20px;margin-left:5px;padding-bottom:2px;position:relative;padding-left:60px;overflow:hidden;min-height:58px}.profile-content .profile-tabs-content #content-links>div .preview{height:48px;width:48px;border-radius:5px;overflow:hidden;position:absolute;left:0;top:0;background-repeat:no-repeat;background-size:cover;background-position:center center}.profile-content .profile-tabs-content #content-links>div .preview.empty{display:flex;align-items:center;justify-content:center;font-size:2rem;color:#fff;text-transform:uppercase;background-color:#50a2e9}.profile-content .profile-tabs-content #content-links>div .url{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.profile-content .profile-tabs-content #content-links .title{font-size:16px;margin-top:3px}.profile-content .profile-tabs-content #content-links .subtitle{font-size:14px}.profile-content .profile-tabs-content #content-audio{padding:0 15px 15px 15px}.profile-content .profile-tabs-content #content-audio>div{margin-top:15px;padding-bottom:10px;min-height:60px}.chats-container{display:flex;flex-direction:column}.chats-container .sidebar-content{width:100%;max-height:100%;height:100%;overflow:hidden;display:flex;position:relative}.chats-container .sidebar-content>div{width:100%}.chats-container #chats-container{max-height:100%;overflow:hidden;position:relative}.chats-container #search-container,.chats-container #chats-archived-container{display:none;width:100%;max-height:100%;height:100%;overflow:hidden;position:absolute;left:0;top:0;z-index:3;background:#fff}.chats-container #search-container.active,.chats-container #chats-archived-container.active{display:flex}.chats-container .sidebar-header__btn-container{position:relative;width:39.75px;height:39px}.chats-container .sidebar-header__btn-container>*{visibility:hidden;opacity:0;position:absolute;left:0;top:0;transition:.2s opacity;z-index:2}.chats-container .sidebar-header__btn-container>*:before{transition:.2s transform;transform:rotate(180deg)}.chats-container .sidebar-header__btn-container>*+*{margin-left:0 !important}.chats-container .sidebar-header__btn-container>*.active{margin-top:1px;opacity:1;visibility:visible;color:#707579}.chats-container .sidebar-header__btn-container>*.active:before{transform:rotate(0deg)}.chats-container .sidebar-tools-button .btn-menu{width:217px}.chats-container .sidebar-tools-button .btn-menu .archived-count{border-radius:12px;min-width:24px;padding:0 8px;height:24px;text-align:center;line-height:24px;color:#fff;font-weight:500;background-color:#c5c9cc;justify-self:flex-end;position:absolute;right:16px}.chats-container .sidebar-tools-button .btn-menu .archived-count:empty{display:none}.chats-container .search-group{width:100%;border-bottom:1px solid #DADCE0;padding:1rem 0 .5rem;margin-bottom:.5rem}.chats-container .search-group__name{color:#707579;padding:0 1.85rem;padding-bottom:1rem}.media-viewer{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.9);display:flex;align-items:center;justify-content:center}.media-viewer-author{position:absolute;top:0;left:0;height:60px;padding:8px 8px 8px 80px;display:flex;flex-direction:column;justify-content:center;color:#8b8b8b;transition:.2s}.media-viewer-author:hover{color:#fff}.media-viewer-author .user-avatar{width:44px;height:44px;position:absolute;top:8px;left:20px}.media-viewer-author .media-viewer-name{font-weight:500}.media-viewer-author .media-viewer-date{font-size:15px}.media-viewer-buttons{position:absolute;top:0;right:0;display:flex;flex-flow:row nowrap;padding:8px}.media-viewer-buttons .btn-icon{margin:0 .25rem;transition:.2s}.media-viewer-buttons .btn-icon:hover{color:#fff}.media-viewer-content{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;max-height:100%;max-width:100%;overflow:hidden}.media-viewer-content .media-viewer-stub{flex:1}.media-viewer-content .media-viewer-container{align-self:center;position:relative;max-width:100%;max-height:100%;overflow:hidden;flex:1 1 auto;display:flex;align-items:center}.media-viewer-content .media-viewer-media{display:flex;align-items:center;justify-content:center;visibility:hidden}.media-viewer-content .media-viewer-media.loading img,.media-viewer-content .media-viewer-media.loading video{object-fit:cover;width:100%;height:100%}.media-viewer-content img,.media-viewer-content video{max-height:calc(100vh - 100px);max-width:calc(100vw - 16px)}.media-viewer-content img{object-fit:contain}.media-viewer-content video{width:100%;height:100%;object-fit:contain}.media-viewer-content .media-viewer-caption{flex:1;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#707579;transition:.2s}.media-viewer-content .media-viewer-caption:hover{color:#fff}.media-viewer-switcher-left,.media-viewer-switcher-right{position:absolute;left:0;top:0;width:10rem;height:100%;cursor:pointer;z-index:5}.media-viewer-switcher-left:hover>span,.media-viewer-switcher-right:hover>span{opacity:1}.media-viewer-switcher-right{left:auto;right:0}.media-viewer-prev-button,.media-viewer-next-button{cursor:pointer;position:absolute;color:#fff;font-size:3rem;left:2rem;top:50%;transform:translateY(-50%) rotate(90deg);opacity:0;transition:.2s opacity;z-index:5}.media-viewer-next-button{left:auto;right:2rem;transform:translateY(-50%) rotate(-90deg)}.media-viewer-mover{position:fixed !important;z-index:4;display:flex;justify-content:center;min-height:auto !important;left:0;top:0;transform-origin:top left;overflow:hidden;background-repeat:no-repeat;background-size:cover;background-position:center center}.media-viewer-mover .ckin__player{width:100%;height:100%}.media-viewer-mover img,.media-viewer-mover video{width:100%;height:100%;opacity:1;transition:.2s opacity;user-select:none}.media-viewer-mover.cover{align-items:center}.media-viewer-mover.cover img,.media-viewer-mover.cover video{width:auto;height:auto;overflow:hidden;opacity:0}.media-viewer-mover.active{transition:.2s transform}.media-viewer-mover.moving{transition:350ms transform ease}.ckin__player{letter-spacing:0.02em}.ckin__overlay{position:relative}.ckin__overlay:before{background:radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.5) 100%)}.ckin__overlay--2:before{background:rgba(24,24,24,0.8)}.ckin__player.ckin__fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:100%;width:100%;z-index:10000000;background:#000;border-radius:0 !important;display:-ms-flexbox;display:flex}.ckin__player.ckin__fullscreen video{max-height:none;max-width:none}.default{border:0 solid rgba(0,0,0,0.2);box-shadow:0 0 20px rgba(0,0,0,0.2);position:relative;font-size:0;overflow:hidden;cursor:pointer}.default:before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;transition:opacity .2s;opacity:1;visibility:visible}.default__title{position:absolute;left:20px;top:20px;z-index:1;font-size:24px;color:rgba(255,255,255,0.8);font-style:italic}.default__button{background:none;border:0;color:#fff;outline:0;padding:3px 10px 6px 10px;cursor:pointer;font-size:24px;line-height:1;display:flex;align-items:center}.default__button i{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.default__button--big{background:none;border:0;line-height:1;color:#fff;text-align:center;outline:0;padding:0;cursor:pointer;position:absolute;opacity:1;visibility:visible;top:50%;left:50%;-ms-transform:translate(-50%, -50%) scale(1);transform:translate(-50%, -50%) scale(1);font-size:64px;transition:all .2s;-ms-touch-action:manipulation;touch-action:manipulation}.default__slider{width:10px;height:30px}.default__controls{position:absolute;bottom:0;right:0;left:0;transition:all .3s;text-align:left;direction:ltr;border-radius:0 0 5px 5px;z-index:6}.default__gradient-bottom{height:49px;padding-top:93px;bottom:0;z-index:2;background-position:bottom;width:100%;position:absolute;background-repeat:repeat-x;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==);-moz-transition:all .3s;-webkit-transition:all .3s;transition:all .3s;pointer-events:none}.default.is-playing .default__gradient-bottom{-ms-transform:translateY(50px);transform:translateY(50px)}.default.is-playing:hover .default__gradient-bottom{-ms-transform:translateY(0px);transform:translateY(0px)}.default.is-playing:before{opacity:0;visibility:hidden;-ms-transform:translate(-50%, -50%) scale(1.3);transform:translate(-50%, -50%) scale(1.3)}.default.is-playing .default__button--big{opacity:0;visibility:hidden}.default.is-playing .default__controls{-ms-transform:translateY(52px);transform:translateY(52px)}.default.is-playing:hover .default__controls{-ms-transform:translateY(0);transform:translateY(0)}.default .progress{position:relative;margin:0 16px;height:5px;transition:height 0.3s;background:rgba(255,255,255,0.38);cursor:pointer;border-radius:4px;overflow:visible}.default .progress__filled{background:#63a2e3;transform-origin:left;border-radius:4px;height:5px;transform:scaleX(0)}@media (max-width: 480px){.ckin__player button{font-size:18px}}video::-webkit-media-controls-enclosure{display:none !important}.progress input{-webkit-appearance:none;-moz-appearance:none;background:transparent;height:4.5px;cursor:pointer;padding:0;outline:none}.progress input[type=range]:focus{outline:none}.progress input[type=range]::-webkit-slider-runnable-track{width:100%;cursor:pointer;border-radius:1.3px;-webkit-appearance:none;transition:all 0.4s ease}.progress input[type=range]::-webkit-slider-thumb{height:15px;width:15px;border-radius:16px;background:#63a2e3;cursor:pointer;-webkit-appearance:none;margin-left:-1px}.progress input[type=range]:focus::-webkit-slider-runnable-track{background:transparent}.progress input[type=range]::-moz-range-track{width:100%;height:8.4px;cursor:pointer;border:1px solid transparent;background:transparent;border-radius:1.3px}.progress input[type=range]::-moz-range-thumb{height:14px;width:14px;border-radius:50px;border:1px solid #63a2e3;background:#63a2e3;cursor:pointer;margin-top:5px}.progress input[type=range]:focus::-moz-range-track{outline:none}input[type=range]::-ms-track{visibility:hidden}input[type=range]::-ms-ticks{background:none;color:none;border:none}input[type=range]::-ms-thumb{visibility:hidden}input[type=range]::-ms-tooltip{visibility:hidden}.seek{position:absolute;top:0;width:100%;cursor:pointer;margin:0}.seek:hover+.seek-tooltip{display:block}.left-controls{display:flex;align-items:center}.right-controls{float:right}.bottom-controls{padding:3px 4px 0px 4px;display:flex;justify-content:space-between;align-items:center}.time{float:right;padding:7px 0px 9px 14px;font-size:15px;color:white}.circle .circle-time{color:#fff;font-size:13px;float:left}.circle .circle-time-left{position:absolute;top:3px;left:2px;border-radius:12px;background-color:rgba(0,0,0,0.23);padding:1px 7px 2px 7px;z-index:2;display:flex;align-items:center}video[data-ckin=\\\"circle\\\"]{border-radius:50%;overflow:hidden}.progress-ring{position:absolute;top:0;left:0;cursor:pointer}.progress-ring__circle{transition:stroke-dashoffset}.ckin__player.circle{position:relative;width:200px;height:200px}.iconVolume{padding:0 1px 0 3px;display:flex;align-items:center;font-size:1.25rem;color:#fff}html,body{height:100%;width:100%}html{font-size:15px}a{color:#50a2e9}button,input,optgroup,select,textarea,html{font-family:\\\"Roboto\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \\\"Helvetica Neue\\\", sans-serif}.whole{height:100vh;min-height:100vh;width:100%;min-width:100%}.container{margin:0 auto}h1,h2,h3,h4,h5,h6{letter-spacing:-.66px;font-weight:500}h4{font-size:2.28rem;margin:1.52rem 0 .912rem 0;line-height:110%}input{caret-color:#4EA4F6}.subtitle{font-size:1rem;color:#9e9e9e;line-height:1.25}.page-sign .input-wrapper,.page-authCode .input-wrapper,.page-signUp .input-wrapper,.page-password .input-wrapper{margin-top:3rem}.page-authCode .phone-wrapper{display:flex;align-items:center;justify-content:center;margin:1.52rem 0 0.912rem 0}.page-authCode .phone-wrapper h4{margin:0}.page-authCode .phone-wrapper h4[contenteditable=\\\"true\\\"]{padding:0 1rem;border:none;outline:none;padding:0 1rem;border-bottom:2px solid #4EA4F6}.page-authCode .phone-wrapper .phone.error{border-color:#E53935 !important}.btn-icon{text-align:center;font-size:1.65rem;line-height:1.65rem;border-radius:50%;-webkit-transition:background-color .15s ease-out;transition:background-color .15s ease-out;color:#707579;cursor:pointer;background:none;border:none;padding:.5rem;position:relative;display:flex;align-items:center;justify-content:center}.btn-icon.active{color:#50a2e9}.btn-icon:hover{background-color:rgba(112,117,121,0.08)}.danger{color:#E53935 !important}.btn-menu-toggle{position:relative;overflow:visible}.btn-menu-toggle.menu-open{background-color:rgba(112,117,121,0.08)}.btn-menu{visibility:hidden;position:absolute;background:#fff;box-shadow:0 5px 8px 1px rgba(0,0,0,0.24);z-index:3;top:100%;margin-top:8px;padding:9px 0;border-radius:8px;opacity:0;transform:scale(0.8);transition-property:opacity,transform,visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);font-size:16px}.btn-menu.active{visibility:visible;opacity:1;transform:scale(1)}.btn-menu.bottom-left{right:0;top:100%;transform-origin:top right}.btn-menu.bottom-right{left:0;top:100%;transform-origin:top left}.btn-menu.top-left{top:initial;right:0;bottom:100%;transform-origin:bottom right}.btn-menu.top-right{top:initial;left:0;bottom:100%;transform-origin:bottom left}.btn-menu>div{display:flex;position:relative;padding:0 40px 0 20px;height:56px;cursor:pointer;background-position:16px center;background-size:24px 24px;background-repeat:no-repeat;color:#000;text-transform:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center}.btn-menu>div:hover{background-color:rgba(112,117,121,0.06)}.btn-menu>div:before{color:#707579;font-size:1.5rem;margin-right:35px}.btn-menu>div.danger:before{color:#E53935}.user-avatar{color:#fff;width:54px;height:54px;line-height:54px;border-radius:50%;background-color:#4EA4F6;text-align:center;font-size:1.25em;position:relative;user-select:none;display:flex;align-items:center;justify-content:center}.user-avatar img{width:100%;height:100%;border-radius:inherit;user-select:none}.user-avatar[class*=\\\" tgico-\\\"]{line-height:52px;font-size:1.5rem}.user-avatar path{fill:white}.user-avatar.is-online:after{position:absolute;content:\\\" \\\";display:block;border-radius:50%;border:2px solid white;background-color:#4DCD5E;left:70%;top:79%;width:12px;height:12px}.user-title,b,.user-last-message b{color:#000;font-weight:normal}.rp{position:relative}.c-ripple{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;background:transparent;border-radius:inherit}.c-ripple__circle{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);opacity:0;width:0;height:0;border-radius:50%;background:rgba(112,117,121,0.08)}.c-ripple.active .c-ripple__circle{will-change:padding-bottom, width, opacity;-webkit-animation:a-ripple 625ms ease-in-out;animation:a-ripple 625ms ease-in-out}@-webkit-keyframes a-ripple{0%{opacity:0}25%{opacity:1}100%{width:200%;padding-bottom:200%;opacity:0}}@keyframes a-ripple{0%{opacity:0}25%{opacity:1}100%{width:200%;padding-bottom:200%;opacity:0}}.document{padding-left:4.5rem;height:70px}.document-ico,.document-download{font-weight:500;letter-spacing:1px;font-size:1.1rem;background-size:contain;overflow:hidden;text-overflow:ellipsis}.document-download{background-color:#65a1e3;border-radius:8px}.document:not(.photo) .document-ico{padding-top:1.5rem;background-image:url(\" + ___CSS_LOADER_URL___3___ + \")}.document.photo .document-ico{border-radius:8px}.document-name{white-space:nowrap;font-weight:500;line-height:1.3}.document-size{white-space:nowrap;color:#707579;font-size:14px;padding-right:32px;line-height:1.3}.document,.audio{display:flex;flex-direction:column;justify-content:center;cursor:pointer;position:relative}.document-ico,.document-download,.audio-ico,.audio-download{position:absolute;left:0;width:54px;height:54px;color:#fff;display:flex;justify-content:center}.document-download,.audio-download{z-index:2;align-items:center;font-size:24px;cursor:pointer}.document-download .tgico-download,.audio-download .tgico-download{transform:scale(1);transition:.2s scale}.document-download.downloading .tgico-download,.audio-download.downloading .tgico-download{transform:scale(0)}.document .preloader-container,.audio .preloader-container{width:42px;height:42px}.audio{position:relative;padding-left:67px;min-height:58px;max-width:286px;overflow:visible !important}.audio-toggle,.audio-download{border-radius:50%;background-color:#50a2e9;font-size:2.2rem;align-items:center}.audio-download{z-index:2}.audio-waveform{height:23px}.audio-waveform rect{fill:#CBCBCB}.audio-waveform rect.active{fill:#50a2e9}.audio-time{font-size:14px;color:#707579;margin-top:3px;margin-left:-1px}.page-signUp .auth-image{border-radius:50%;cursor:pointer;position:relative;overflow:hidden}.page-signUp .auth-image canvas{max-width:100%;max-height:100%;width:100%;height:100%;background-color:#4EA4F6}.page-signUp .auth-image svg{position:absolute;width:36px;height:36px;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);z-index:2}.input-wrapper{width:350px;margin:0 auto}.input-field{position:relative}.input-field .arrow-down{position:absolute;content:\\\" \\\";top:50%;bottom:0;right:15px;cursor:pointer;height:0;width:0;border:solid #bdbdbd;border-radius:1px;border-width:0 2px 2px 0;display:inline-block;padding:4px;vertical-align:middle;z-index:2;margin-top:-7px;transform:rotate(45deg);-webkit-transform:rotate(45deg);transition:.2s all}.input-field label{position:absolute;color:#9e9e9e;left:12.5px;right:auto;z-index:2;top:50%;transform:translateY(-50%);background-color:#fff;font-size:0.85rem;transition:.2s all, .1s opacity;display:inline-block;cursor:text}.input-field input{border:1px solid #DADCE0;border-radius:8px;padding:0 12.5px;box-sizing:border-box;font-size:0.85rem;width:100%;height:45px;transition:.2s border-color;position:relative;z-index:1}.input-field input:focus{border-color:#4EA4F6;border-width:1.5px;padding:0 12px}.input-field input:disabled{background-color:#fff;color:#000}.input-field input.error{border-color:#E53935;transition:.2s border-width}.input-field input.error+label{color:#E53935 !important}.input-field input:focus ~ .arrow-down{margin-top:-2px;transform:rotate(225deg);-webkit-transform:rotate(225deg);border-color:#4EA4F6}.input-field input:focus+label{color:#4EA4F6}.input-field input:focus+label,.input-field input:valid+label,.input-field input:disabled+label{top:-8.5px;transform:none;padding:0 5px;left:7.5px;font-size:0.85rem !important;opacity:1}.checkbox-field{margin:1rem 0;display:block;text-align:left;padding:0 1rem;position:relative}[type=\\\"checkbox\\\"]{position:absolute;opacity:0;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=\\\"checkbox\\\"]+span{position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[type=\\\"checkbox\\\"]+span:before,[type=\\\"checkbox\\\"]+span:after{content:'';left:0;position:absolute;-webkit-transition:border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;transition:border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s}[type=\\\"checkbox\\\"]+span:before{border-radius:2px;z-index:1}[type=\\\"checkbox\\\"]+span:after{height:18px;width:18px;z-index:0;border:2px solid #4EA4F6;border-radius:3px;top:50%;transform:translateY(-50%)}[type=\\\"checkbox\\\"]:not(:checked)+span:before{width:0;height:0;border:2px solid transparent;left:6px;top:10px;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=\\\"checkbox\\\"]:checked+span:before{top:4px;left:-1px;width:8px;height:14px;border-top:2px solid transparent;border-left:2px solid transparent;border-right:2px solid #fff;border-bottom:2px solid #fff;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=\\\"checkbox\\\"]:not(:checked)+span:after{background-color:transparent}[type=\\\"checkbox\\\"]:checked+span:after{background-color:#4EA4F6}.input-wrapper>* ~ *{margin-top:1.2rem}.select-wrapper{max-height:300px;position:absolute;width:100%;top:calc(100% + 10px);left:0;overflow:hidden;background-color:#fff;z-index:3;border-radius:8px;display:flex;flex-direction:column;flex-wrap:wrap}.select-wrapper ul{margin:10px 0}.select-wrapper li{align-items:center;padding:0 12.5px;justify-content:space-between;height:50px;cursor:pointer;font-weight:500;text-align:left;display:grid;grid-template-columns:15% 60% 25%}.select-wrapper li:hover{background-color:rgba(112,117,121,0.08)}.select-wrapper .emoji{height:24px;width:24px;font-size:24px;line-height:1}.phone-code{color:#9e9e9e;text-align:right}::placeholder{color:#9e9e9e;opacity:1}:-ms-input-placeholder{color:#9e9e9e}::-ms-input-placeholder{color:#9e9e9e}input:focus,button:focus{outline:none}.auth-image{width:133px;height:133px;margin-left:auto;margin-right:auto;margin-bottom:1rem}.phone-edit{display:inline-block;width:24px;height:24px;margin-left:.4rem;opacity:.5;transition:.2s;cursor:pointer;font-size:1.5rem}.phone-edit:hover{opacity:1}.btn-primary{background:#4EA4F6;color:#fff;border-radius:8px;width:100%;text-align:center;font-size:0.85rem;height:45px;border:none;font-weight:500;cursor:pointer;overflow:hidden;position:relative;padding:0}.btn-primary:hover{background:#2790f4}.btn-primary svg,.btn-primary use{height:calc(100% - 20px);right:12.5px;left:auto;margin:auto 0}.preloader-circular{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.preloader-path{stroke-dasharray:1, 200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke-linecap:round;stroke:white;stroke-width:3}.preloader-container{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:50px;height:50px}.preloader-container .you-spin-me-round{width:100%;height:100%;animation:rotate 2s linear infinite}.preloader-container .preloader-circular{animation:none;cursor:pointer;background-color:rgba(0,0,0,0.7);border-radius:50%;width:100%;height:100%}.preloader-container .preloader-path-new{stroke-dasharray:5, 200;stroke-dashoffset:0;transition:stroke-dasharray 400ms ease-in-out;stroke-linecap:round;stroke:white;stroke-width:1.5}.preloader-container.preloader-swing{cursor:default}.preloader-container.preloader-swing .preloader-circular{cursor:default}.preloader-container.preloader-swing .preloader-path-new{stroke-dasharray:1, 200;stroke-dashoffset:0;animation:dashNew 1.5s ease-in-out infinite}.preloader-container .preloader-close{cursor:pointer;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;color:#fff;stroke:#fff;width:34%;height:34%}.preloader-container .preloader-close:hover{background:none}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}@keyframes dashNew{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-286%}}.emoji{display:inline-block;max-width:100%;max-height:100%;vertical-align:middle;line-height:1em;font-size:1em;font-family:apple color emoji,segoe ui emoji,noto color emoji,android emoji,emojisymbols,emojione mozilla,twemoji mozilla,segoe ui symbol}img.emoji{width:18px;height:18px}.popup{position:fixed !important;left:0;top:0;height:100%;max-width:none;width:100%;z-index:3;background-color:rgba(0,0,0,0.35);margin:0;padding:0;box-shadow:none;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s 0s, visibility 0s 0.3s;-moz-transition:opacity 0.3s 0s, visibility 0s 0.3s;transition:opacity 0.3s 0s, visibility 0s 0.3s;overflow:auto;display:flex;align-items:center;justify-content:center}.popup.active{opacity:1;visibility:visible;-webkit-transition:opacity 0.3s 0s, visibility 0s 0s;-moz-transition:opacity 0.3s 0s, visibility 0s 0s;transition:opacity 0.3s 0s, visibility 0s 0s}.popup-container{position:relative;border-radius:8px;background-color:#fff;padding:1rem;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px);backface-visibility:hidden;-webkit-backface-visibility:hidden;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;transition-property:transform;-webkit-transition-duration:0.3s;-moz-transition-duration:0.3s;transition-duration:0.3s}span.popup-close{cursor:pointer;color:#707579;z-index:3;text-align:center;justify-self:center;line-height:1;transition:.2s}span.popup-close:hover{color:#000}.popup.active .popup-container{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}.btn-circle{border-radius:50%;width:44px;height:44px}.btn-circle path{fill:white}.popup-header{display:flex;margin-bottom:2rem;align-items:center}.popup-avatar .popup-container{max-width:600px;max-height:600px}.popup-avatar .popup-container>button{position:absolute;bottom:15px;right:15px}.popup-avatar .popup-close{font-size:1.5rem}.popup-avatar h6{font-size:1.1rem;text-align:left;margin:0;margin-left:1.5rem;font-weight:400}.popup-avatar .crop{max-width:200%;max-height:200%;padding:0 2.75rem 2.75rem;border-radius:8px}.popup-avatar .crop img{border-radius:8px}.overlay::selection{background:transparent}.crop-component::selection{background:transparent}.crop-image,.overlay>img{width:auto;height:auto;display:block;object-fit:contain;object-position:center}.crop-image{display:block;position:relative;pointer-events:none}.crop-component{position:relative;z-index:999;background-color:white;margin:0 auto;overflow:hidden}.crop-component>img{max-width:100%}.crop-component .crop-overlay-color{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(255,255,255,0.7);border-radius:8px}.overlay{position:absolute;left:50%;top:50%;z-index:999;margin-left:-100px;margin-top:-100px;width:200px;height:200px;overflow:hidden;box-sizing:content-box;border-radius:50%}.overlay:hover,.overlay:active{cursor:move}.overlay>img{position:absolute;display:block}.overlays{top:0;left:0;width:100%;height:100%;position:fixed !important;background-color:rgba(0,0,0,0.2);z-index:4;opacity:0;visibility:hidden;-webkit-transition:opacity 0.2s 0s, visibility 0s 0.2s;-moz-transition:opacity 0.2s 0s, visibility 0s 0.2s;transition:opacity 0.2s 0s, visibility 0s 0.2s}.overlays.active{opacity:1;visibility:visible;-webkit-transition:opacity 0.2s 0s, visibility 0s 0s;-moz-transition:opacity 0.2s 0s, visibility 0s 0s;transition:opacity 0.2s 0s, visibility 0s 0s}div.scrollable::-webkit-scrollbar{width:0;height:0}div.scrollable::-webkit-scrollbar-thumb{width:0;height:0}::-webkit-scrollbar-button{width:0;height:0;display:none}::-webkit-scrollbar-corner{background-color:transparent}.scrollable{width:100%;height:100%;overflow-y:hidden;overflow-x:hidden;max-height:100%;position:relative}.scrollable.scrollable-x{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.scrollable.scrollable-y{overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.scrollable.scrollable-x ~ .scrollbar-thumb{top:auto;right:auto;width:auto;height:4px;bottom:0px}.scrollbar-thumb{position:absolute;top:0;right:2px;width:4px;background-color:#000;cursor:default;opacity:0;transition-property:opacity,width,right;transition-duration:.2s;transition-timing-function:ease-in-out;border-radius:8px;z-index:2}:hover>.scrollbar-thumb{opacity:.4}[contenteditable]{-webkit-user-select:text;user-select:text}.menu-horizontal{width:100%;color:#707579;margin-top:0px;margin-bottom:0;border-bottom:1px solid #dadce0;display:flex;justify-content:space-around;align-items:center}.menu-horizontal>li{display:inline-block;padding:.75rem 1rem;cursor:pointer;text-align:center;flex:1;user-select:none;font-size:16px}.menu-horizontal>li.active{position:relative;color:#50a2e9}.menu-horizontal>li.active:after{content:'';position:absolute;background:#50a2e9;left:24px;right:24px;bottom:-1px;height:4px;border-top-left-radius:2px;border-top-right-radius:2px}.tabs-container{min-width:100%;display:flex;overflow-x:hidden}.tabs-container.animated{transition:.2s margin-left}.tabs-container>div{width:100%;max-width:100%;overflow:hidden;display:none}.tabs-container>div.active{display:flex;flex-direction:column}.tabs-container>div>div:not(.scroll-padding){width:100%;padding:7.5px;max-width:100%;overflow:hidden;position:relative}.justify-start{justify-content:flex-start}.popup-send-photo .popup-container{width:420px;max-width:420px;max-height:425px;overflow:hidden;padding:12px 20px 32.5px;border-radius:10px}.popup-send-photo .popup-header{justify-content:space-between;align-items:center;margin-bottom:12.5px}.popup-send-photo .popup-header .popup-close{font-size:1.5rem;margin-left:.5rem}.popup-send-photo .popup-header .popup-title{flex:1;padding:0 2rem;margin:0;font-size:1.35rem;font-weight:500}.popup-send-photo .popup-header .btn-primary{width:80px;height:35px;font-size:1rem;padding:0;border-radius:10px}.popup-send-photo .popup-photo{max-width:378px;max-height:256px;display:flex;overflow:hidden;justify-content:center;width:fit-content;border-radius:10px;margin:0 auto}.popup-send-photo .popup-photo.is-document{margin-left:0}.popup-send-photo .popup-photo .document{max-width:100%;overflow:hidden;cursor:default}.popup-send-photo .popup-photo .document .document-name{font-weight:normal;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis}.popup-send-photo .popup-photo img{object-fit:contain}.popup-send-photo .input-field{margin-top:25px}.popup-send-photo .input-field input{height:55px;font-size:1.15rem;padding:0 15px;border-radius:10px}.popup-send-photo .input-field input:focus{padding:0 14.5px}.popup-send-photo .input-field label{font-size:inherit;opacity:0}.page-chats{display:flex;max-height:100vh;min-height:100vh}.page-chats>div{height:100%;position:relative;min-height:100%;max-height:100%}.page-chats .chats-container{width:25%}.page-chats .chat-container{background-color:#e6ebee;width:100%;flex:1}.page-chats .profile-container{width:0%;position:relative;transition:.2s ease-in-out}.page-chats .profile-container>.scrollable{min-width:25vw}.page-chats .preloader{width:50px;height:50px;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}.page-chats .preloader .preloader-path{stroke:#4EA4F6}.page-password #password{padding-right:2.5rem}.page-password #password[type=\\\"password\\\"]{font-size:2.25rem;padding-left:10px}.page-password .toggle-visible{position:absolute;right:.25rem;z-index:2;top:50%;transform:translateY(-50%);font-size:1.25rem;color:#9e9e9e;cursor:pointer;transition:.2s;padding:.5rem}.page-password .toggle-visible:hover{color:#000}\\n\", \"\"]);\n" + "depth": 3, + "source": "module.exports = \"assets/fonts/tgico.ttf\";" }, { "id": 57, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/file-loader/dist/cjs.js??ref--7!/Users/kuzmenko/Documents/projects/tweb/public/assets/img/camomile.jpg", - "name": "./public/assets/img/camomile.jpg", - "index": 8, - "index2": 5, + "identifier": "F:\\tweb\\node_modules\\file-loader\\dist\\cjs.js??ref--7!F:\\tweb\\src\\assets\\fonts\\tgico.woff", + "name": "./src/assets/fonts/tgico.woff", + "index": 16, + "index2": 13, "size": 43, "cacheable": true, "built": true, @@ -6514,59 +6229,58 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "issuerId": 56, - "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "issuer": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "issuerId": 54, + "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 55, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./src/scss/style.scss", + "id": 53, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./src/scss/tgico.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 56, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "id": 54, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "profile": { - "factory": 536, - "building": 3038, - "dependencies": 1 + "factory": 1062, + "building": 2152 } } ], "profile": { - "factory": 73, - "building": 18 + "factory": 1699, + "building": 442 }, "failed": false, "errors": 0, "warnings": 0, "assets": [ - "assets/img/camomile.jpg" + "assets/fonts/tgico.woff" ], "reasons": [ { - "moduleId": 56, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", - "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "moduleId": 54, + "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "type": "cjs require", - "userRequest": "../../public/assets/img/camomile.jpg", - "loc": "4:38-85" + "userRequest": "../assets/fonts/tgico.woff", + "loc": "6:36-73" } ], "usedExports": true, @@ -6575,15 +6289,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "module.exports = \"assets/img/camomile.jpg\";" + "source": "module.exports = \"assets/fonts/tgico.woff\";" }, { "id": 58, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/file-loader/dist/cjs.js??ref--7!/Users/kuzmenko/Documents/projects/tweb/src/assets/img/msg-tail-left.svg", - "name": "./src/assets/img/msg-tail-left.svg", - "index": 9, - "index2": 6, - "size": 48, + "identifier": "F:\\tweb\\node_modules\\file-loader\\dist\\cjs.js??ref--7!F:\\tweb\\src\\assets\\fonts\\tgico.svg", + "name": "./src/assets/fonts/tgico.svg", + "index": 17, + "index2": 14, + "size": 42, "cacheable": true, "built": true, "optional": false, @@ -6591,59 +6305,58 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "issuerId": 56, - "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "issuer": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "issuerId": 54, + "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 55, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./src/scss/style.scss", + "id": 53, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./src/scss/tgico.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 56, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "id": 54, + "identifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "profile": { - "factory": 536, - "building": 3038, - "dependencies": 1 + "factory": 1062, + "building": 2152 } } ], "profile": { - "factory": 73, - "building": 18 + "factory": 1699, + "building": 442 }, "failed": false, "errors": 0, "warnings": 0, "assets": [ - "assets/img/msg-tail-left.svg" + "assets/fonts/tgico.svg" ], "reasons": [ { - "moduleId": 56, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", - "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "moduleId": 54, + "moduleIdentifier": "F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", "type": "cjs require", - "userRequest": "../assets/img/msg-tail-left.svg", - "loc": "5:38-80" + "userRequest": "../assets/fonts/tgico.svg", + "loc": "7:36-72" } ], "usedExports": true, @@ -6652,15 +6365,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "module.exports = \"assets/img/msg-tail-left.svg\";" + "source": "module.exports = \"assets/fonts/tgico.svg\";" }, { - "id": 59, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/file-loader/dist/cjs.js??ref--7!/Users/kuzmenko/Documents/projects/tweb/src/assets/img/msg-tail-right.svg", - "name": "./src/assets/img/msg-tail-right.svg", - "index": 10, - "index2": 7, - "size": 49, + "id": 62, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "name": "./src/pages/pageAuthCode.ts", + "index": 32, + "index2": 71, + "size": 9968, "cacheable": true, "built": true, "optional": false, @@ -6668,59 +6381,48 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "issuerId": 56, - "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "issuerId": 35, + "issuerName": "./src/pages/pageSignIn.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 55, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./src/scss/style.scss", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 56, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", - "profile": { - "factory": 536, - "building": 3038, - "dependencies": 1 + "dependencies": 1062 } } ], "profile": { - "factory": 73, - "building": 18 + "factory": 527, + "building": 1006, + "dependencies": 2 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [ - "assets/img/msg-tail-right.svg" - ], + "assets": [], "reasons": [ { - "moduleId": 56, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", - "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "moduleId": 35, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "module": "./src/pages/pageSignIn.ts", + "moduleName": "./src/pages/pageSignIn.ts", "type": "cjs require", - "userRequest": "../assets/img/msg-tail-right.svg", - "loc": "6:38-81" + "userRequest": "./pageAuthCode", + "loc": "11:39-64" } ], "usedExports": true, @@ -6728,16 +6430,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "module.exports = \"assets/img/msg-tail-right.svg\";" + "depth": 2, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst pageSignIn_1 = __importDefault(require(\"./pageSignIn\"));\r\nconst pageSignUp_1 = __importDefault(require(\"./pageSignUp\"));\r\nconst pageIm_1 = __importDefault(require(\"./pageIm\"));\r\nconst pagePassword_1 = __importDefault(require(\"./pagePassword\"));\r\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\n//import CryptoWorker from '../lib/crypto/cryptoworker';\r\n//import apiManager from '../lib/mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../lib/mtproto/mtprotoworker\"));\r\nconst page_1 = __importDefault(require(\"./page\"));\r\nconst mtproto_config_1 = require(\"../lib/mtproto/mtproto_config\");\r\nlet authCode = null;\r\nconst EDITONSAMEPAGE = false;\r\nlet headerElement = null;\r\nlet sentTypeElement = null;\r\nlet onFirstMount = () => {\r\n let needFrame = 0, lastLength = 0;\r\n let animation = /* AnimationItem */ undefined;\r\n const CODELENGTH = authCode.type.length;\r\n const codeInput = page.pageEl.querySelector('#code');\r\n const codeInputLabel = codeInput.nextElementSibling;\r\n const editButton = page.pageEl.querySelector('.phone-edit');\r\n if (EDITONSAMEPAGE) {\r\n let editable = false;\r\n let changePhonePromise;\r\n let changePhone = () => {\r\n if (changePhonePromise)\r\n return;\r\n let phone_number = '+' + headerElement.innerText.replace(/\\D/g, '');\r\n if (authCode.phone_number == phone_number)\r\n return;\r\n codeInput.setAttribute('disabled', 'true');\r\n changePhonePromise = mtprotoworker_1.default.invokeApi('auth.sendCode', {\r\n /* flags: 0, */\r\n phone_number: phone_number,\r\n api_id: mtproto_config_1.App.id,\r\n api_hash: mtproto_config_1.App.hash,\r\n settings: {\r\n _: 'codeSettings',\r\n flags: 0\r\n }\r\n /* lang_code: navigator.language || 'en' */\r\n }).then((code) => {\r\n console.log('got code 2', code);\r\n authCode = Object.assign(code, { phone_number });\r\n changePhonePromise = undefined;\r\n codeInput.removeAttribute('disabled');\r\n codeInput.focus();\r\n }).catch(err => {\r\n switch (err.type) {\r\n case 'PHONE_NUMBER_INVALID':\r\n headerElement.classList.add('error');\r\n editable = true;\r\n headerElement.setAttribute('contenteditable', '' + editable);\r\n headerElement.focus();\r\n break;\r\n default:\r\n codeInputLabel.innerText = err.type;\r\n break;\r\n }\r\n changePhonePromise = undefined;\r\n codeInput.removeAttribute('disabled');\r\n });\r\n };\r\n headerElement.addEventListener('keypress', function (e) {\r\n if (e.key == 'Enter') {\r\n editable = false;\r\n headerElement.setAttribute('contenteditable', '' + editable);\r\n changePhone();\r\n }\r\n if (/\\D/.test(e.key)) {\r\n e.preventDefault();\r\n return false;\r\n }\r\n this.classList.remove('error');\r\n });\r\n editButton.addEventListener('click', function () {\r\n if (changePhonePromise)\r\n return;\r\n editable = !editable;\r\n headerElement.setAttribute('contenteditable', '' + editable);\r\n if (!editable)\r\n changePhone();\r\n });\r\n }\r\n else {\r\n editButton.addEventListener('click', function () {\r\n return pageSignIn_1.default.mount();\r\n });\r\n }\r\n let submitCode = (code) => {\r\n codeInput.setAttribute('disabled', 'true');\r\n let params = {\r\n phone_number: authCode.phone_number,\r\n phone_code_hash: authCode.phone_code_hash,\r\n phone_code: code\r\n };\r\n console.log('invoking auth.signIn with params:', params);\r\n mtprotoworker_1.default.invokeApi('auth.signIn', params, { ignoreErrors: true })\r\n .then((response) => {\r\n console.log('auth.signIn response:', response);\r\n switch (response._) {\r\n case 'auth.authorization':\r\n mtprotoworker_1.default.setUserAuth({\r\n id: response.user.id\r\n });\r\n pageIm_1.default.mount();\r\n if (animation)\r\n animation.destroy();\r\n break;\r\n case 'auth.authorizationSignUpRequired':\r\n console.log('Registration needed!');\r\n pageSignUp_1.default.mount({\r\n 'phone_number': authCode.phone_number,\r\n 'phone_code_hash': authCode.phone_code_hash\r\n });\r\n if (animation)\r\n animation.destroy();\r\n break;\r\n default:\r\n codeInput.innerText = response._;\r\n break;\r\n }\r\n }).catch(err => {\r\n codeInput.removeAttribute('disabled');\r\n switch (err.type) {\r\n case 'SESSION_PASSWORD_NEEDED':\r\n console.warn('pageAuthCode: SESSION_PASSWORD_NEEDED');\r\n err.handled = true;\r\n if (animation)\r\n animation.destroy();\r\n pagePassword_1.default.mount();\r\n break;\r\n case 'PHONE_CODE_EMPTY':\r\n case 'PHONE_CODE_INVALID':\r\n codeInput.classList.add('error');\r\n codeInputLabel.innerText = 'Invalid Code';\r\n break;\r\n default:\r\n codeInputLabel.innerText = err.type;\r\n break;\r\n }\r\n });\r\n };\r\n const max = 45;\r\n // 1st symbol = frame 15\r\n // end symbol = frame 165\r\n codeInput.addEventListener('input', function (e) {\r\n this.classList.remove('error');\r\n this.value = this.value.replace(/\\D/g, '');\r\n if (this.value.length > CODELENGTH) {\r\n this.value = this.value.slice(0, CODELENGTH);\r\n }\r\n let length = this.value.length;\r\n if (length == CODELENGTH) { // submit code\r\n submitCode(this.value);\r\n }\r\n else if (length == lastLength) {\r\n return;\r\n }\r\n lastLength = length;\r\n if (!animation)\r\n return;\r\n let frame;\r\n if (length)\r\n frame = Math.round((length > max ? max : length) * (165 / max) + 11.33);\r\n else\r\n frame = 0;\r\n //animation.playSegments([1, 2]);\r\n let direction = needFrame > frame ? -1 : 1;\r\n //console.log('keydown', length, frame, direction);\r\n animation.setDirection(direction);\r\n if (needFrame != 0 && frame == 0) {\r\n animation.setSpeed(7);\r\n }\r\n /* let diff = Math.abs(needFrame - frame * direction);\r\n if((diff / 20) > 1) animation.setSpeed(diff / 20 | 0); */\r\n needFrame = frame;\r\n animation.play();\r\n /* animation.goToAndStop(15, true); */\r\n //animation.goToAndStop(length / max * );\r\n });\r\n return Promise.all([\r\n lottieLoader_1.default.loadLottie(),\r\n fetch('assets/img/TwoFactorSetupMonkeyTracking.tgs')\r\n .then(res => res.arrayBuffer())\r\n .then(data => mtprotoworker_1.default.gzipUncompress(data, true))\r\n .then(str => lottieLoader_1.default.loadAnimation({\r\n container: page.pageEl.querySelector('.auth-image'),\r\n renderer: 'svg',\r\n loop: false,\r\n autoplay: false,\r\n animationData: JSON.parse(str)\r\n }))\r\n .then(_animation => {\r\n animation = _animation;\r\n animation.setSpeed(1);\r\n //console.log(animation.getDuration(), animation.getDuration(true));\r\n animation.addEventListener('enterFrame', (e) => {\r\n //console.log('enterFrame', e, needFrame);\r\n let currentFrame = Math.round(e.currentTime);\r\n if ((e.direction == 1 && currentFrame >= needFrame) ||\r\n (e.direction == -1 && currentFrame <= needFrame)) {\r\n animation.setSpeed(1);\r\n animation.pause();\r\n }\r\n });\r\n })\r\n ]);\r\n};\r\nconst page = new page_1.default('page-authCode', true, onFirstMount, (_authCode) => {\r\n authCode = _authCode;\r\n if (!headerElement) {\r\n headerElement = page.pageEl.getElementsByClassName('phone')[0];\r\n sentTypeElement = page.pageEl.getElementsByClassName('sent-type')[0];\r\n }\r\n //let LottieLoader = (await import('../lib/lottieLoader')).default;\r\n headerElement.innerText = authCode.phone_number;\r\n switch (authCode.type._) {\r\n case 'auth.sentCodeTypeSms':\r\n sentTypeElement.innerHTML = 'We have sent you an SMS
with the code.';\r\n break;\r\n case 'auth.sentCodeTypeApp':\r\n sentTypeElement.innerHTML = 'We have sent you a message in Telegram
with the code.';\r\n break;\r\n case 'auth.sentCodeTypeCall':\r\n sentTypeElement.innerHTML = 'We will call you and voice
the code.';\r\n break;\r\n default:\r\n sentTypeElement.innerHTML = `Please check everything
for a code (type: ${authCode.type._})`;\r\n break;\r\n }\r\n});\r\nexports.default = page;\r\n" }, { - "id": 60, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/file-loader/dist/cjs.js??ref--7!/Users/kuzmenko/Documents/projects/tweb/src/assets/img/doc-in.svg", - "name": "./src/assets/img/doc-in.svg", - "index": 11, - "index2": 8, - "size": 41, + "id": 63, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "name": "./src/pages/pageSignUp.ts", + "index": 33, + "index2": 69, + "size": 6470, "cacheable": true, "built": true, "optional": false, @@ -6745,59 +6447,58 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "issuerId": 56, - "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "issuerId": 62, + "issuerName": "./src/pages/pageAuthCode.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 55, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./src/scss/style.scss", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 56, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "id": 62, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "name": "./src/pages/pageAuthCode.ts", "profile": { - "factory": 536, - "building": 3038, - "dependencies": 1 + "factory": 527, + "building": 1006, + "dependencies": 2 } } ], "profile": { - "factory": 73, - "building": 18 + "factory": 913, + "building": 92, + "dependencies": 0 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [ - "assets/img/doc-in.svg" - ], + "assets": [], "reasons": [ { - "moduleId": 56, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/style.scss", - "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", - "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/style.scss", + "moduleId": 62, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "module": "./src/pages/pageAuthCode.ts", + "moduleName": "./src/pages/pageAuthCode.ts", "type": "cjs require", - "userRequest": "../assets/img/doc-in.svg", - "loc": "7:38-73" + "userRequest": "./pageSignUp", + "loc": "7:37-60" } ], "usedExports": true, @@ -6806,15 +6507,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "module.exports = \"assets/img/doc-in.svg\";" + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst misc_1 = require(\"../components/misc\");\r\nconst cropper_1 = __importDefault(require(\"../lib/cropper\"));\r\nconst pageIm_1 = __importDefault(require(\"./pageIm\"));\r\n//import apiManager from '../lib/mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../lib/mtproto/mtprotoworker\"));\r\nconst apiFileManager_1 = __importDefault(require(\"../lib/mtproto/apiFileManager\"));\r\nconst page_1 = __importDefault(require(\"./page\"));\r\nlet authCode = null;\r\nlet onFirstMount = () => {\r\n const pageElement = page.pageEl;\r\n const avatarInput = document.getElementById('avatar-input');\r\n const avatarPopup = pageElement.getElementsByClassName('popup-avatar')[0];\r\n const avatarPreview = pageElement.querySelector('#canvas-avatar');\r\n const cropContainer = avatarPopup.getElementsByClassName('crop')[0];\r\n let avatarImage = new Image();\r\n cropContainer.append(avatarImage);\r\n let avatarBlob;\r\n avatarPopup.getElementsByClassName('popup-close')[0]\r\n .addEventListener('click', function (e) {\r\n /* let popup = findUpClassName(this, 'popup');\r\n popup.classList.remove('active'); */\r\n setTimeout(() => {\r\n cropper.removeHandlers();\r\n if (avatarImage) {\r\n avatarImage.remove();\r\n }\r\n }, 200);\r\n /* e.cancelBubble = true;\r\n return false; */\r\n });\r\n let cropper = {\r\n crop: () => { },\r\n removeHandlers: () => { }\r\n };\r\n // apply\r\n avatarPopup.getElementsByClassName('btn-crop')[0].addEventListener('click', () => {\r\n cropper.crop();\r\n avatarPopup.classList.remove('active');\r\n cropper.removeHandlers();\r\n avatarPreview.toBlob(blob => {\r\n avatarBlob = blob; // save blob to send after reg\r\n // darken\r\n let ctx = avatarPreview.getContext('2d');\r\n ctx.fillStyle = \"rgba(0, 0, 0, 0.3)\";\r\n ctx.fillRect(0, 0, avatarPreview.width, avatarPreview.height);\r\n }, 'image/jpeg', 1);\r\n avatarImage.remove();\r\n });\r\n avatarInput.addEventListener('change', (e) => {\r\n var file = e.target.files[0];\r\n if (!file) {\r\n return;\r\n }\r\n var reader = new FileReader();\r\n reader.onload = (e) => {\r\n var contents = e.target.result;\r\n avatarImage = new Image();\r\n cropContainer.append(avatarImage);\r\n avatarImage.src = contents;\r\n avatarImage.onload = () => {\r\n cropper = cropper_1.default(avatarImage, avatarPreview);\r\n avatarInput.value = '';\r\n };\r\n avatarPopup.classList.add('active');\r\n };\r\n reader.readAsDataURL(file);\r\n }, false);\r\n pageElement.querySelector('.auth-image').addEventListener('click', () => {\r\n avatarInput.click();\r\n });\r\n const headerName = pageElement.getElementsByClassName('fullName')[0];\r\n let handleInput = function (e) {\r\n let name = fieldName.value || '';\r\n let lastName = fieldLastName.value || '';\r\n let fullName = name || lastName\r\n ? (name + ' ' + lastName).trim()\r\n : 'Your Name';\r\n if (headerName.innerText != fullName)\r\n headerName.innerText = fullName;\r\n this.classList.remove('error');\r\n };\r\n let sendAvatar = () => new Promise((resolve, reject) => {\r\n if (!avatarBlob) {\r\n console.log('User has not selected avatar');\r\n return resolve();\r\n }\r\n console.log('invoking uploadFile...');\r\n apiFileManager_1.default.uploadFile(avatarBlob).then((inputFile) => {\r\n console.log('uploaded smthn', inputFile);\r\n mtprotoworker_1.default.invokeApi('photos.uploadProfilePhoto', {\r\n file: inputFile\r\n }).then((updateResult) => {\r\n console.log('updated photo!');\r\n resolve();\r\n }, reject);\r\n }, reject);\r\n });\r\n const fieldName = document.getElementById('name');\r\n fieldName.addEventListener('input', handleInput);\r\n const fieldLastName = document.getElementById('lastName');\r\n fieldLastName.addEventListener('input', handleInput);\r\n const signUpButton = document.getElementById('signUp');\r\n signUpButton.addEventListener('click', function (e) {\r\n this.setAttribute('disabled', 'true');\r\n if (!fieldName.value.length) {\r\n fieldName.classList.add('error');\r\n return false;\r\n }\r\n let name = fieldName.value;\r\n let lastName = fieldLastName.value;\r\n let params = {\r\n 'phone_number': authCode.phone_number,\r\n 'phone_code_hash': authCode.phone_code_hash,\r\n 'first_name': name,\r\n 'last_name': lastName\r\n };\r\n console.log('invoking auth.signUp with params:', params);\r\n this.textContent = 'PLEASE WAIT...';\r\n misc_1.putPreloader(this);\r\n mtprotoworker_1.default.invokeApi('auth.signUp', params)\r\n .then((response) => {\r\n console.log('auth.signUp response:', response);\r\n switch (response._) {\r\n case 'auth.authorization': // success\r\n mtprotoworker_1.default.setUserAuth({\r\n id: response.user.id\r\n });\r\n sendAvatar().then(() => {\r\n pageIm_1.default.mount();\r\n }, () => {\r\n pageIm_1.default.mount();\r\n });\r\n break;\r\n default:\r\n this.innerText = response._;\r\n break;\r\n }\r\n /* (document.body.getElementsByClassName('page-sign')[0] as HTMLDivElement).style.display = 'none';\r\n pageAuthCode(Object.assign(code, {phoneNumber})); */\r\n }).catch(err => {\r\n this.removeAttribute('disabled');\r\n switch (err.type) {\r\n default:\r\n this.innerText = err.type;\r\n break;\r\n }\r\n });\r\n });\r\n};\r\nconst page = new page_1.default('page-signUp', true, onFirstMount, (_authCode) => {\r\n authCode = _authCode;\r\n});\r\nexports.default = page;\r\n" }, { - "id": 61, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./src/scss/tgico.scss", - "index": 12, - "index2": 16, - "size": 510, + "id": 64, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\cropper.ts", + "name": "./src/lib/cropper.ts", + "index": 34, + "index2": 30, + "size": 7890, "cacheable": true, "built": true, "optional": false, @@ -6822,24 +6523,54 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "issuerId": 52, - "issuerName": "./src/index.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "issuerId": 63, + "issuerName": "./src/pages/pageSignUp.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 + } + }, + { + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", + "profile": { + "factory": 842, + "building": 0, + "dependencies": 1062 + } + }, + { + "id": 62, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "name": "./src/pages/pageAuthCode.ts", + "profile": { + "factory": 527, + "building": 1006, + "dependencies": 2 + } + }, + { + "id": 63, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "name": "./src/pages/pageSignUp.ts", + "profile": { + "factory": 913, + "building": 92, + "dependencies": 0 } } ], "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 + "factory": 1026, + "building": 135, + "dependencies": 1 }, "failed": false, "errors": 0, @@ -6847,13 +6578,13 @@ "assets": [], "reasons": [ { - "moduleId": 52, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "module": "./src/index.ts", - "moduleName": "./src/index.ts", + "moduleId": 63, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "module": "./src/pages/pageSignUp.ts", + "moduleName": "./src/pages/pageSignUp.ts", "type": "cjs require", - "userRequest": "./scss/tgico.scss", - "loc": "22:0-28" + "userRequest": "../lib/cropper", + "loc": "7:34-59" } ], "usedExports": true, @@ -6861,16 +6592,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 1, - "source": "var content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./tgico.scss\");\n\nif (typeof content === 'string') {\n content = [[module.id, content, '']];\n}\n\nvar options = {}\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = require(\"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\")(content, options);\n\nif (content.locals) {\n module.exports = content.locals;\n}\n" + "depth": 4, + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nfunction resizeableImage(image_target, resize_canvas) {\r\n var cropComponent, container, crop_img, event_state = {}, ratio = 1.0, keyZoomValue = 4.0, MINWIDTH = 50\r\n //, MINHEIGHT = 50\r\n , CROPWIDTH = 200, CROPHEIGHT = 200, cropLeft = 0, cropTop = 0, cropWidth = 0, cropHeight = 0;\r\n if (image_target.complete) {\r\n init();\r\n }\r\n else {\r\n image_target.onload = init;\r\n }\r\n function removeHandlers() {\r\n container.removeEventListener('mousedown', startMoving);\r\n container.removeEventListener('touchstart', startMoving);\r\n container.removeEventListener('wheel', resizing);\r\n document.removeEventListener('mouseup', endMoving);\r\n document.removeEventListener('touchend', endMoving);\r\n document.removeEventListener('mousemove', moving);\r\n document.removeEventListener('touchmove', moving);\r\n document.removeEventListener('keypress', keyHandler);\r\n cropComponent.remove();\r\n container.remove();\r\n crop_img.remove();\r\n }\r\n function addHandlers() {\r\n container.addEventListener('mousedown', startMoving, false);\r\n container.addEventListener('touchstart', startMoving, false);\r\n container.addEventListener('wheel', resizing, false);\r\n document.addEventListener('keypress', keyHandler, false);\r\n //document.querySelector('.btn-crop').addEventListener('click', openCropCanvasImg);\r\n }\r\n function init() {\r\n var wraper, left, top;\r\n if (image_target.dataset.isCrop) {\r\n throw 'image is already crop';\r\n }\r\n image_target.dataset.isCrop = 'true';\r\n image_target.classList.add('crop-blur');\r\n image_target.draggable = false;\r\n crop_img = new Image();\r\n crop_img.crossOrigin = image_target.crossOrigin;\r\n crop_img.src = image_target.src;\r\n crop_img.draggable = false;\r\n if (!resize_canvas) {\r\n resize_canvas = document.createElement('canvas');\r\n }\r\n cropComponent = document.createElement('div');\r\n cropComponent.classList.add('crop-component');\r\n container = document.createElement('div');\r\n container.classList.add('overlay');\r\n let overlayColor = document.createElement('div');\r\n overlayColor.classList.add('crop-overlay-color');\r\n cropComponent.appendChild(container);\r\n wraper = image_target.parentNode;\r\n wraper.appendChild(cropComponent);\r\n cropComponent.appendChild(crop_img);\r\n cropComponent.appendChild(image_target);\r\n cropComponent.appendChild(overlayColor);\r\n container.appendChild(crop_img);\r\n crop_img.style.maxWidth = image_target.width + 'px';\r\n left = image_target.offsetWidth / 2 - CROPWIDTH / 2;\r\n top = image_target.offsetHeight / 2 - CROPHEIGHT / 2;\r\n updateCropImage(left, top);\r\n addHandlers();\r\n }\r\n function updateCropSize(width, height) {\r\n container.style.width = width + 'px';\r\n container.style.height = height + 'px';\r\n }\r\n function updateCropImage(left, top) {\r\n cropLeft = -left * ratio;\r\n cropTop = -top * ratio;\r\n crop_img.style.top = -top + 'px';\r\n crop_img.style.left = -left + 'px';\r\n }\r\n function updateContainer(left, top) {\r\n let _top = top + (CROPWIDTH / 2) + 'px';\r\n let _left = left + (CROPHEIGHT / 2) + 'px';\r\n container.style.top = _top;\r\n container.style.left = _left;\r\n }\r\n // Save the initial event details and container state\r\n function saveEventState(e) {\r\n event_state.container_width = container.offsetWidth;\r\n event_state.container_height = container.offsetHeight;\r\n event_state.container_left = container.offsetLeft;\r\n event_state.container_top = container.offsetTop;\r\n event_state.mouse_x = (e.clientX || e.pageX || e.touches && e.touches[0].clientX) + window.scrollX;\r\n event_state.mouse_y = (e.clientY || e.pageY || e.touches && e.touches[0].clientY) + window.scrollY;\r\n }\r\n function imgZoom(zoom) {\r\n zoom = zoom * Math.PI * 2;\r\n var newWidth = Math.floor(container.clientWidth + zoom), newHeight = Math.floor(container.clientHeight + zoom), w = crop_img.clientWidth, h = crop_img.clientHeight, left, top, right, bottom;\r\n if (newWidth < MINWIDTH) {\r\n return;\r\n }\r\n else if (newWidth > w) {\r\n return;\r\n }\r\n left = container.offsetLeft - (zoom / 2);\r\n top = container.offsetTop - (zoom / 2);\r\n right = left + newWidth;\r\n bottom = top + newHeight;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n if (right > w) {\r\n return;\r\n }\r\n if (bottom > h) {\r\n return;\r\n }\r\n ratio = CROPWIDTH / newWidth;\r\n updateCropSize(newWidth, newWidth);\r\n updateCropImage(left, top);\r\n updateContainer(left, top);\r\n //crop();\r\n }\r\n function keyHandler(e) {\r\n e.preventDefault();\r\n switch (String.fromCharCode(e.charCode)) {\r\n case '+':\r\n imgZoom(keyZoomValue);\r\n break;\r\n case '-':\r\n imgZoom(-keyZoomValue);\r\n break;\r\n }\r\n }\r\n function resizing(e) {\r\n e.preventDefault();\r\n imgZoom(e.deltaY > 0 ? 1 : -1);\r\n }\r\n function startMoving(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n saveEventState(e);\r\n document.addEventListener('mousemove', moving);\r\n document.addEventListener('touchmove', moving);\r\n document.addEventListener('mouseup', endMoving);\r\n document.addEventListener('touchend', endMoving);\r\n }\r\n function endMoving(e) {\r\n e.preventDefault();\r\n document.removeEventListener('mouseup', endMoving);\r\n document.removeEventListener('touchend', endMoving);\r\n document.removeEventListener('mousemove', moving);\r\n document.removeEventListener('touchmove', moving);\r\n }\r\n function moving(e) {\r\n var curuntTouch = { x: 0, y: 0 }, left, top, w, h;\r\n e.preventDefault();\r\n e.stopPropagation();\r\n curuntTouch.x = e.pageX || e.touches && e.touches[0].pageX;\r\n curuntTouch.y = e.pageY || e.touches && e.touches[0].pageY;\r\n left = curuntTouch.x - (event_state.mouse_x - event_state.container_left);\r\n top = curuntTouch.y - (event_state.mouse_y - event_state.container_top);\r\n w = container.offsetWidth;\r\n h = container.offsetHeight;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n else if (left > crop_img.offsetWidth - w) {\r\n left = crop_img.offsetWidth - w;\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n else if (top > crop_img.offsetHeight - h) {\r\n top = crop_img.offsetHeight - h;\r\n }\r\n updateCropImage(left, top);\r\n updateContainer(left, top);\r\n }\r\n function crop() {\r\n cropWidth = crop_img.width * ratio;\r\n cropHeight = crop_img.height * ratio;\r\n resize_canvas.width = CROPWIDTH;\r\n resize_canvas.height = CROPHEIGHT;\r\n var ctx = resize_canvas.getContext('2d');\r\n ctx.drawImage(crop_img, cropLeft, cropTop, cropWidth, cropHeight);\r\n }\r\n return { crop, removeHandlers };\r\n /* function openCropCanvasImg() {\r\n crop();\r\n \r\n try {\r\n var base64Img = resize_canvas.toDataURL('image/png', 1.0);\r\n window.open(base64Img);\r\n } catch(e) {\r\n alert(e);\r\n } finally {\r\n // removeHandlers();\r\n }\r\n \r\n } */\r\n}\r\n//resizeableImage(document.querySelector('.crop-image'));\r\nexports.default = resizeableImage;\r\n" }, { - "id": 62, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", - "index": 13, - "index2": 15, - "size": 5269, + "id": 65, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagesManager.ts", + "name": "./src/pages/pagesManager.ts", + "index": 37, + "index2": 32, + "size": 1571, "cacheable": true, "built": true, "optional": false, @@ -6878,33 +6609,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "issuerId": 61, - "issuerName": "./src/scss/tgico.scss", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\page.ts", + "issuerId": 18, + "issuerName": "./src/pages/page.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 61, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./src/scss/tgico.scss", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 + } + }, + { + "id": 18, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\page.ts", + "name": "./src/pages/page.ts", + "profile": { + "factory": 527, + "building": 1006, + "dependencies": 2 } } ], "profile": { - "factory": 536, - "building": 1483 + "factory": 1002, + "building": 12, + "dependencies": 1 }, "failed": false, "errors": 0, @@ -6912,13 +6654,13 @@ "assets": [], "reasons": [ { - "moduleId": 61, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "module": "./src/scss/tgico.scss", - "moduleName": "./src/scss/tgico.scss", + "moduleId": 18, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\page.ts", + "module": "./src/pages/page.ts", + "moduleName": "./src/pages/page.ts", "type": "cjs require", - "userRequest": "!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./tgico.scss", - "loc": "1:14-181" + "userRequest": "./pagesManager", + "loc": "15:39-64" } ], "usedExports": true, @@ -6926,16 +6668,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 2, - "source": "exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Imports\nvar getUrl = require(\"../../node_modules/css-loader/dist/runtime/getUrl.js\");\nvar ___CSS_LOADER_URL___0___ = getUrl(require(\"../assets/fonts/tgico.eot\"));\nvar ___CSS_LOADER_URL___1___ = getUrl(require(\"../assets/fonts/tgico.ttf\"));\nvar ___CSS_LOADER_URL___2___ = getUrl(require(\"../assets/fonts/tgico.woff\"));\nvar ___CSS_LOADER_URL___3___ = getUrl(require(\"../assets/fonts/tgico.svg\"));\n// Module\nexports.push([module.id, \"@font-face{font-family:\\\"tgico\\\";src:url(\" + ___CSS_LOADER_URL___0___ + \");src:url(\" + ___CSS_LOADER_URL___0___ + \") format(\\\"embedded-opentype\\\"),url(\" + ___CSS_LOADER_URL___1___ + \") format(\\\"truetype\\\"),url(\" + ___CSS_LOADER_URL___2___ + \") format(\\\"woff\\\"),url(\" + ___CSS_LOADER_URL___3___ + \") format(\\\"svg\\\");font-weight:normal;font-style:normal;font-display:block}[class^=\\\"tgico-\\\"],.tgico:before,.tgico:after,[class*=\\\" tgico-\\\"]:before,[class*=\\\" tgico-\\\"]:after{font-family:\\\"tgico\\\" !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tgico-check:before{content:\\\"\\\"}.tgico-settings:before{content:\\\"\\\\e901\\\"}.tgico-smallscreen:before{content:\\\"\\\\e902\\\"}.tgico-smile:before{content:\\\"\\\\e903\\\"}.tgico-sport:before{content:\\\"\\\\e904\\\"}.tgico-stop:before{content:\\\"\\\\e905\\\"}.tgico-unarchive:before{content:\\\"\\\\e906\\\"}.tgico-unlock:before{content:\\\"\\\\e907\\\"}.tgico-unmute:before{content:\\\"\\\\e908\\\"}.tgico-unpin:before{content:\\\"\\\\e909\\\"}.tgico-unread:before{content:\\\"\\\\e90a\\\"}.tgico-up:before{content:\\\"\\\\e90b\\\"}.tgico-username:before{content:\\\"\\\\e90c\\\"}.tgico-user:before{content:\\\"\\\\e90d\\\"}.tgico-play:before{content:\\\"\\\\e90e\\\"}.tgico-poll:before{content:\\\"\\\\e90f\\\"}.tgico-radiooff:before{content:\\\"\\\\e910\\\"}.tgico-radioon:before{content:\\\"\\\\e911\\\"}.tgico-recent:before{content:\\\"\\\\e912\\\"}.tgico-reply:before{content:\\\"\\\\e913\\\"}.tgico-revote:before{content:\\\"\\\\e914\\\"}.tgico-savedmessages:before{content:\\\"\\\\e915\\\"}.tgico-search:before{content:\\\"\\\\e916\\\"}.tgico-send:before{content:\\\"\\\\e917\\\"}.tgico-send2:before{content:\\\"\\\\e918\\\"}.tgico-sending:before{content:\\\"\\\"}.tgico-sendingerror:before{content:\\\"\\\\e91a\\\"}.tgico-mute:before{content:\\\"\\\\e91b\\\"}.tgico-newchannel:before{content:\\\"\\\\e91c\\\"}.tgico-newchat_filled:before{content:\\\"\\\\e91d\\\"}.tgico-newgroup:before{content:\\\"\\\\e91e\\\"}.tgico-newprivate:before{content:\\\"\\\\e91f\\\"}.tgico-next:before{content:\\\"\\\\e920\\\"}.tgico-nosound:before{content:\\\"\\\\e921\\\"}.tgico-pause:before{content:\\\"\\\\e922\\\"}.tgico-permissions:before{content:\\\"\\\\e923\\\"}.tgico-phone:before{content:\\\"\\\\e924\\\"}.tgico-photo:before{content:\\\"\\\\e925\\\"}.tgico-pin:before{content:\\\"\\\\e926\\\"}.tgico-pinnedchat:before{content:\\\"\\\\e927\\\"}.tgico-largepause:before{content:\\\"\\\\e928\\\"}.tgico-largeplay:before{content:\\\"\\\\e929\\\"}.tgico-livelocation:before{content:\\\"\\\\e92a\\\"}.tgico-location:before{content:\\\"\\\\e92b\\\"}.tgico-lock:before{content:\\\"\\\\e92c\\\"}.tgico-logout:before{content:\\\"\\\\e92d\\\"}.tgico-menu:before{content:\\\"\\\\e92e\\\"}.tgico-message:before{content:\\\"\\\\e92f\\\"}.tgico-microphone:before{content:\\\"\\\\e930\\\"}.tgico-microphone2:before{content:\\\"\\\\e931\\\"}.tgico-minus:before{content:\\\"\\\\e932\\\"}.tgico-more:before{content:\\\"\\\\e933\\\"}.tgico-download:before{content:\\\"\\\\e934\\\"}.tgico-eats:before{content:\\\"\\\\e935\\\"}.tgico-edit:before{content:\\\"\\\\e936\\\"}.tgico-eye1:before{content:\\\"\\\\e937\\\"}.tgico-eye2:before{content:\\\"\\\\e938\\\"}.tgico-flag:before{content:\\\"\\\\e939\\\"}.tgico-forward:before{content:\\\"\\\\e93a\\\"}.tgico-fullscreen:before{content:\\\"\\\\e93b\\\"}.tgico-group:before{content:\\\"\\\\e93c\\\"}.tgico-help:before{content:\\\"\\\\e93d\\\"}.tgico-info:before{content:\\\"\\\\e93e\\\"}.tgico-lamp:before{content:\\\"\\\\e93f\\\"}.tgico-language:before{content:\\\"\\\\e940\\\"}.tgico-checkboxempty:before{content:\\\"\\\\e941\\\"}.tgico-checkboxon:before{content:\\\"\\\\e942\\\"}.tgico-close:before{content:\\\"\\\\e943\\\"}.tgico-colorize:before{content:\\\"\\\\e944\\\"}.tgico-copy:before{content:\\\"\\\\e945\\\"}.tgico-data:before{content:\\\"\\\\e946\\\"}.tgico-delete_filled:before{content:\\\"\\\\e947\\\"}.tgico-delete:before{content:\\\"\\\\e948\\\"}.tgico-deleteuser:before{content:\\\"\\\\e949\\\"}.tgico-document:before{content:\\\"\\\\e94a\\\"}.tgico-down:before{content:\\\"\\\\e94b\\\"}.tgico-attach:before{content:\\\"\\\\e94c\\\"}.tgico-avatar_archivedchats:before{content:\\\"\\\\e94d\\\"}.tgico-avatar_deletedaccount:before{content:\\\"\\\\e94e\\\"}.tgico-avatar_savedmessages:before{content:\\\"\\\\e94f\\\"}.tgico-back:before{content:\\\"\\\\e950\\\"}.tgico-camera:before{content:\\\"\\\\e951\\\"}.tgico-cameraadd:before{content:\\\"\\\\e952\\\"}.tgico-car:before{content:\\\"\\\\e953\\\"}.tgico-channel:before{content:\\\"\\\\e954\\\"}.tgico-channelviews:before{content:\\\"\\\\e955\\\"}.tgico-chatsplaceholder:before{content:\\\"\\\\e956\\\"}.tgico-check1:before{content:\\\"\\\\e957\\\"}.tgico-checkbox:before{content:\\\"\\\\e958\\\"}.tgico-checkboxblock:before{content:\\\"\\\\e959\\\"}.tgico-checks:before{content:\\\"\\\"}.tgico-activesessions:before{content:\\\"\\\\e95b\\\"}.tgico-add:before{content:\\\"\\\\e95c\\\"}.tgico-addmember_filled:before{content:\\\"\\\\e95d\\\"}.tgico-adduser:before{content:\\\"\\\\e95e\\\"}.tgico-admin:before{content:\\\"\\\\e95f\\\"}.tgico-animals:before{content:\\\"\\\\e960\\\"}.tgico-archive:before{content:\\\"\\\\e961\\\"}\\n\", \"\"]);\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst misc_1 = require(\"../components/misc\");\r\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\nclass PagesManager {\r\n constructor() {\r\n this.pageID = -1;\r\n this.pagesDiv = document.getElementById('auth-pages');\r\n this.selectTab = misc_1.horizontalMenu(null, this.pagesDiv.firstElementChild, null, null, 420);\r\n }\r\n setPage(page) {\r\n if (page.isAuthPage) {\r\n this.pagesDiv.style.display = '';\r\n let id = utils_1.whichChild(page.pageEl);\r\n if (this.pageID == id)\r\n return;\r\n this.selectTab(id);\r\n // это нужно чтобы ресайзнуть канвас (из-за скрытого рендера будет 0х0)\r\n if (this.pageID != -1) {\r\n lottieLoader_1.default.loadLottie().then(() => {\r\n // @ts-ignore\r\n lottieLoader_1.default.lottie.resize();\r\n });\r\n }\r\n this.pageID = id;\r\n }\r\n else {\r\n this.pagesDiv.style.display = 'none';\r\n page.pageEl.style.display = '';\r\n this.pageID = -1;\r\n }\r\n }\r\n}\r\nconst pagesManager = new PagesManager();\r\nwindow.pagesManager = pagesManager;\r\nexports.default = pagesManager;\r\n" }, { - "id": 63, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/file-loader/dist/cjs.js??ref--7!/Users/kuzmenko/Documents/projects/tweb/src/assets/fonts/tgico.eot", - "name": "./src/assets/fonts/tgico.eot", - "index": 14, - "index2": 11, - "size": 42, + "id": 66, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\crypto\\crypto_methods.ts", + "name": "./src/lib/crypto/crypto_methods.ts", + "index": 41, + "index2": 34, + "size": 1422, "cacheable": true, "built": true, "optional": false, @@ -6943,58 +6685,58 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "issuerId": 62, - "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "issuerId": 1, + "issuerName": "./src/lib/mtproto/mtprotoworker.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 61, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./src/scss/tgico.scss", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 62, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "id": 1, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "name": "./src/lib/mtproto/mtprotoworker.ts", "profile": { - "factory": 536, - "building": 1483 + "factory": 527, + "building": 1006, + "dependencies": 2 } } ], "profile": { - "factory": 1461, - "building": 153 + "factory": 2064, + "building": 2674, + "dependencies": 212 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [ - "assets/fonts/tgico.eot" - ], + "assets": [], "reasons": [ { - "moduleId": 62, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", - "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "moduleId": 1, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "module": "./src/lib/mtproto/mtprotoworker.ts", + "moduleName": "./src/lib/mtproto/mtprotoworker.ts", "type": "cjs require", - "userRequest": "../assets/fonts/tgico.eot", - "loc": "4:38-74" + "userRequest": "../crypto/crypto_methods", + "loc": "15:41-76" } ], "usedExports": true, @@ -7003,74 +6745,74 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "module.exports = \"assets/fonts/tgico.eot\";" + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nclass CryptoWorkerMethods {\r\n sha1Hash(bytes) {\r\n return this.performTaskWorker('sha1-hash', bytes);\r\n }\r\n sha256Hash(bytes) {\r\n return this.performTaskWorker('sha256-hash', bytes);\r\n }\r\n pbkdf2(buffer, salt, iterations) {\r\n return this.performTaskWorker('pbkdf2', buffer, salt, iterations);\r\n }\r\n aesEncrypt(bytes, keyBytes, ivBytes) {\r\n return this.performTaskWorker('aes-encrypt', bin_utils_1.convertToArrayBuffer(bytes), bin_utils_1.convertToArrayBuffer(keyBytes), bin_utils_1.convertToArrayBuffer(ivBytes));\r\n }\r\n aesDecrypt(encryptedBytes, keyBytes, ivBytes) {\r\n return this.performTaskWorker('aes-decrypt', encryptedBytes, keyBytes, ivBytes)\r\n .then(bytes => bin_utils_1.convertToArrayBuffer(bytes));\r\n }\r\n rsaEncrypt(publicKey, bytes) {\r\n return this.performTaskWorker('rsa-encrypt', publicKey, bytes);\r\n }\r\n factorize(bytes) {\r\n bytes = bin_utils_1.convertToByteArray(bytes);\r\n return this.performTaskWorker('factorize', bytes);\r\n }\r\n modPow(x, y, m) {\r\n return this.performTaskWorker('mod-pow', x, y, m);\r\n }\r\n gzipUncompress(bytes, toString) {\r\n return this.performTaskWorker('unzip', bytes, toString);\r\n }\r\n}\r\nexports.default = CryptoWorkerMethods;\r\n" }, { - "id": 64, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/file-loader/dist/cjs.js??ref--7!/Users/kuzmenko/Documents/projects/tweb/src/assets/fonts/tgico.ttf", - "name": "./src/assets/fonts/tgico.ttf", - "index": 15, - "index2": 12, - "size": 42, - "cacheable": true, + "id": 67, + "identifier": "F:\\tweb\\node_modules\\worker-loader\\dist\\cjs.js!F:\\tweb\\src\\lib\\mtproto\\mtproto.worker.js", + "name": "./src/lib/mtproto/mtproto.worker.js", + "index": 42, + "index2": 35, + "size": 113, + "cacheable": false, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "issuerId": 62, - "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "issuerId": 1, + "issuerName": "./src/lib/mtproto/mtprotoworker.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 61, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./src/scss/tgico.scss", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 62, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "id": 1, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "name": "./src/lib/mtproto/mtprotoworker.ts", "profile": { - "factory": 536, - "building": 1483 + "factory": 527, + "building": 1006, + "dependencies": 2 } } ], "profile": { - "factory": 1461, - "building": 153 + "factory": 2064, + "building": 2674, + "dependencies": 212 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [ - "assets/fonts/tgico.ttf" - ], + "assets": [], "reasons": [ { - "moduleId": 62, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", - "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "moduleId": 1, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts", + "module": "./src/lib/mtproto/mtprotoworker.ts", + "moduleName": "./src/lib/mtproto/mtprotoworker.ts", "type": "cjs require", - "userRequest": "../assets/fonts/tgico.ttf", - "loc": "5:38-74" + "userRequest": "./mtproto.worker.js", + "loc": "27:54-84" } ], "usedExports": true, @@ -7079,15 +6821,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3, - "source": "module.exports = \"assets/fonts/tgico.ttf\";" + "source": "module.exports = function() {\n return new Worker(__webpack_public_path__ + \"13e15c04959af0ca33a5.worker.js\");\n};" }, { - "id": 65, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/file-loader/dist/cjs.js??ref--7!/Users/kuzmenko/Documents/projects/tweb/src/assets/fonts/tgico.woff", - "name": "./src/assets/fonts/tgico.woff", - "index": 16, - "index2": 13, - "size": 43, + "id": 68, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\mtproto.ts", + "name": "./src/lib/mtproto/mtproto.ts", + "index": 48, + "index2": 41, + "size": 2895, "cacheable": true, "built": true, "optional": false, @@ -7095,58 +6837,68 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "issuerId": 62, - "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "issuerId": 14, + "issuerName": "./src/lib/appManagers/appMessagesManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 61, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./src/scss/tgico.scss", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 62, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "id": 73, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", + "profile": { + "factory": 386, + "building": 1105, + "dependencies": 45 + } + }, + { + "id": 14, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "name": "./src/lib/appManagers/appMessagesManager.ts", "profile": { - "factory": 536, - "building": 1483 + "factory": 576, + "building": 856, + "dependencies": 834 } } ], "profile": { - "factory": 1461, - "building": 153 + "factory": 486, + "building": 201, + "dependencies": 0 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [ - "assets/fonts/tgico.woff" - ], + "assets": [], "reasons": [ { - "moduleId": 62, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", - "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "moduleId": 14, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts", + "module": "./src/lib/appManagers/appMessagesManager.ts", + "moduleName": "./src/lib/appManagers/appMessagesManager.ts", "type": "cjs require", - "userRequest": "../assets/fonts/tgico.woff", - "loc": "6:38-75" + "userRequest": "../mtproto/mtproto", + "loc": "21:18-47" } ], "usedExports": true, @@ -7154,16 +6906,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "module.exports = \"assets/fonts/tgico.woff\";" + "depth": 4, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst utils_1 = require(\"../utils\");\r\nconst mtproto_config_1 = require(\"./mtproto_config\");\r\n/* import PasswordManager from './passwordManager';\r\nimport DcConfigurator from './dcConfigurator';\r\nimport RSAKeysManager from './rsaKeysManager';\r\nimport TimeManager from './timeManager';\r\nimport ServerTimeManager from './serverTimeManager';\r\nimport Authorizer from './authorizer';\r\nimport NetworkerFactory from './networkerFactory';\r\nimport ApiManager from './apiManager';\r\nimport ApiFileManager from './apiFileManager'; */\r\nclass TelegramMeWebService {\r\n constructor() {\r\n this.disabled = mtproto_config_1.Modes.test ||\r\n mtproto_config_1.App.domains.indexOf(location.hostname) == -1 ||\r\n location.protocol != 'http:' && location.protocol != 'https:' ||\r\n location.protocol == 'https:' && location.hostname != 'web.telegram.org';\r\n }\r\n setAuthorized(canRedirect) {\r\n if (this.disabled) {\r\n return false;\r\n }\r\n storage_1.default.get('tgme_sync').then((curValue) => {\r\n var ts = utils_1.tsNow(true);\r\n if (canRedirect &&\r\n curValue &&\r\n curValue.canRedirect == canRedirect &&\r\n curValue.ts + 86400 > ts) {\r\n return false;\r\n }\r\n storage_1.default.set({ tgme_sync: { canRedirect: canRedirect, ts: ts } });\r\n var urls = [\r\n '//telegram.me/_websync_?authed=' + (canRedirect ? '1' : '0'),\r\n '//t.me/_websync_?authed=' + (canRedirect ? '1' : '0')\r\n ];\r\n urls.forEach(url => {\r\n let script = document.createElement('script');\r\n script.onload = script.onerror = function () {\r\n script.remove();\r\n };\r\n script.src = url;\r\n document.body.appendChild(script);\r\n });\r\n });\r\n }\r\n}\r\nexports.TelegramMeWebService = TelegramMeWebService;\r\nexports.telegramMeWebService = new TelegramMeWebService();\r\n/* export namespace MTProto {\r\n //$($window).on('click keydown', rng_seed_time); // WARNING!\r\n\r\n export const passwordManager = PasswordManager;\r\n export const dcConfigurator = DcConfigurator;\r\n export const rsaKeysManager = RSAKeysManager;\r\n export const timeManager = TimeManager;\r\n export const authorizer = Authorizer;\r\n export const networkerFactory = NetworkerFactory;\r\n export const apiManager = ApiManager;\r\n export const apiFileManager = ApiFileManager;\r\n export const serverTimeManager = ServerTimeManager;\r\n}\r\n\r\n//(window as any).MTProto = MTProto; */\r\n" }, { - "id": 66, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/file-loader/dist/cjs.js??ref--7!/Users/kuzmenko/Documents/projects/tweb/src/assets/fonts/tgico.svg", - "name": "./src/assets/fonts/tgico.svg", - "index": 17, - "index2": 14, - "size": 42, + "id": 69, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\idb.ts", + "name": "./src/lib/idb.ts", + "index": 54, + "index2": 45, + "size": 9434, "cacheable": true, "built": true, "optional": false, @@ -7171,58 +6923,78 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "issuerId": 62, - "issuerName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", + "issuerId": 15, + "issuerName": "./src/lib/mtproto/apiFileManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 61, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/style-loader/dist/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./src/scss/tgico.scss", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { "id": 62, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "name": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "name": "./src/pages/pageAuthCode.ts", + "profile": { + "factory": 527, + "building": 1006, + "dependencies": 2 + } + }, + { + "id": 63, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignUp.ts", + "name": "./src/pages/pageSignUp.ts", + "profile": { + "factory": 913, + "building": 92, + "dependencies": 0 + } + }, + { + "id": 15, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", + "name": "./src/lib/mtproto/apiFileManager.ts", "profile": { - "factory": 536, - "building": 1483 + "factory": 1026, + "building": 135, + "dependencies": 1 } } ], "profile": { - "factory": 1461, - "building": 153 + "factory": 1184, + "building": 96, + "dependencies": 1 }, "failed": false, "errors": 0, "warnings": 0, - "assets": [ - "assets/fonts/tgico.svg" - ], + "assets": [], "reasons": [ { - "moduleId": 62, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/css-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/resolve-url-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/node_modules/sass-loader/dist/cjs.js??ref--4-3!/Users/kuzmenko/Documents/projects/tweb/src/scss/tgico.scss", - "module": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", - "moduleName": "./node_modules/css-loader/dist/cjs.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/scss/tgico.scss", + "moduleId": 15, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\mtproto\\apiFileManager.ts", + "module": "./src/lib/mtproto/apiFileManager.ts", + "moduleName": "./src/lib/mtproto/apiFileManager.ts", "type": "cjs require", - "userRequest": "../assets/fonts/tgico.svg", - "loc": "7:38-74" + "userRequest": "../idb", + "loc": "16:30-47" } ], "usedExports": true, @@ -7230,16 +7002,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "module.exports = \"assets/fonts/tgico.svg\";" + "depth": 5, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst bin_utils_1 = require(\"./bin_utils\");\r\nconst filemanager_1 = __importDefault(require(\"./filemanager\"));\r\nclass IdbFileStorage {\r\n constructor() {\r\n this.dbName = 'cachedFiles';\r\n this.dbStoreName = 'files';\r\n this.dbVersion = 2;\r\n this.storageIsAvailable = true;\r\n this.storeBlobsAvailable = true;\r\n this.name = 'IndexedDB';\r\n this.openDatabase();\r\n }\r\n isAvailable() {\r\n return this.storageIsAvailable;\r\n }\r\n openDatabase() {\r\n if (this.openDbPromise) {\r\n return this.openDbPromise;\r\n }\r\n var createObjectStore;\r\n try {\r\n var request = indexedDB.open(this.dbName, this.dbVersion);\r\n createObjectStore = (db) => {\r\n db.createObjectStore(this.dbStoreName);\r\n };\r\n if (!request) {\r\n throw new Error();\r\n }\r\n }\r\n catch (error) {\r\n console.error('error opening db', error.message);\r\n this.storageIsAvailable = false;\r\n return Promise.reject(error);\r\n }\r\n var finished = false;\r\n setTimeout(() => {\r\n if (!finished) {\r\n request.onerror({ type: 'IDB_CREATE_TIMEOUT' });\r\n }\r\n }, 3000);\r\n return this.openDbPromise = new Promise((resolve, reject) => {\r\n request.onsuccess = (event) => {\r\n finished = true;\r\n var db = request.result;\r\n db.onerror = (error) => {\r\n this.storageIsAvailable = false;\r\n console.error('Error creating/accessing IndexedDB database', error);\r\n reject(error);\r\n };\r\n resolve(db);\r\n };\r\n request.onerror = (event) => {\r\n finished = true;\r\n this.storageIsAvailable = false;\r\n console.error('Error creating/accessing IndexedDB database', event);\r\n reject(event);\r\n };\r\n request.onupgradeneeded = (event) => {\r\n finished = true;\r\n console.warn('performing idb upgrade from', event.oldVersion, 'to', event.newVersion);\r\n // @ts-ignore\r\n var db = event.target.result;\r\n if (event.oldVersion == 1) {\r\n db.deleteObjectStore(this.dbStoreName);\r\n }\r\n createObjectStore(db);\r\n };\r\n });\r\n }\r\n deleteFile(fileName) {\r\n return this.openDatabase().then((db) => {\r\n try {\r\n var objectStore = db.transaction([this.dbStoreName], 'readwrite')\r\n .objectStore(this.dbStoreName);\r\n console.log('Delete file: `' + fileName + '`');\r\n var request = objectStore.delete(fileName);\r\n }\r\n catch (error) {\r\n return Promise.reject(error);\r\n }\r\n return new Promise((resolve, reject) => {\r\n request.onsuccess = function (event) {\r\n console.log('deleted file', event);\r\n resolve();\r\n };\r\n request.onerror = function (error) {\r\n reject(error);\r\n };\r\n });\r\n });\r\n }\r\n saveFile(fileName, blob) {\r\n return this.openDatabase().then((db) => {\r\n if (!this.storeBlobsAvailable) {\r\n return this.saveFileBase64(db, fileName, blob);\r\n }\r\n if (!(blob instanceof Blob)) {\r\n blob = bin_utils_1.blobConstruct([blob]);\r\n }\r\n try {\r\n var objectStore = db.transaction([this.dbStoreName], 'readwrite')\r\n .objectStore(this.dbStoreName);\r\n var request = objectStore.put(blob, fileName);\r\n }\r\n catch (error) {\r\n if (this.storeBlobsAvailable) {\r\n this.storeBlobsAvailable = false;\r\n return this.saveFileBase64(db, fileName, blob);\r\n }\r\n this.storageIsAvailable = false;\r\n return Promise.reject(error);\r\n }\r\n return new Promise((resolve, reject) => {\r\n request.onsuccess = function (event) {\r\n resolve(blob);\r\n };\r\n request.onerror = function (error) {\r\n reject(error);\r\n };\r\n });\r\n });\r\n }\r\n saveFileBase64(db, fileName, blob) {\r\n if (this.getBlobSize(blob) > 10 * 1024 * 1024) {\r\n return Promise.reject();\r\n }\r\n if (!(blob instanceof Blob)) {\r\n var safeMimeType = bin_utils_1.blobSafeMimeType(blob.type || 'image/jpeg');\r\n var address = 'data:' + safeMimeType + ';base64,' + bin_utils_1.bytesToBase64(blob);\r\n return this.storagePutB64String(db, fileName, address).then(() => {\r\n return blob;\r\n });\r\n }\r\n try {\r\n var reader = new FileReader();\r\n }\r\n catch (e) {\r\n this.storageIsAvailable = false;\r\n return Promise.reject();\r\n }\r\n let promise = new Promise((resolve, reject) => {\r\n reader.onloadend = () => {\r\n this.storagePutB64String(db, fileName, reader.result).then(() => {\r\n resolve(blob);\r\n }, reject);\r\n };\r\n reader.onerror = reject;\r\n });\r\n try {\r\n reader.readAsDataURL(blob);\r\n }\r\n catch (e) {\r\n this.storageIsAvailable = false;\r\n return Promise.reject();\r\n }\r\n return promise;\r\n }\r\n storagePutB64String(db, fileName, b64string) {\r\n try {\r\n var objectStore = db.transaction([this.dbStoreName], 'readwrite')\r\n .objectStore(this.dbStoreName);\r\n var request = objectStore.put(b64string, fileName);\r\n }\r\n catch (error) {\r\n this.storageIsAvailable = false;\r\n return Promise.reject(error);\r\n }\r\n return new Promise((resolve, reject) => {\r\n request.onsuccess = function (event) {\r\n resolve();\r\n };\r\n request.onerror = reject;\r\n });\r\n }\r\n getBlobSize(blob) {\r\n return blob.size || blob.byteLength || blob.length;\r\n }\r\n getFile(fileName, size) {\r\n return this.openDatabase().then((db) => {\r\n var objectStore = db.transaction([this.dbStoreName], 'readonly')\r\n .objectStore(this.dbStoreName);\r\n var request = objectStore.get(fileName);\r\n return new Promise((resolve, reject) => {\r\n request.onsuccess = function (event) {\r\n // @ts-ignore\r\n var result = event.target.result;\r\n if (result === undefined) {\r\n reject();\r\n }\r\n else if (typeof result === 'string' &&\r\n result.substr(0, 5) === 'data:') {\r\n resolve(bin_utils_1.dataUrlToBlob(result));\r\n }\r\n else {\r\n resolve(result);\r\n }\r\n };\r\n request.onerror = reject;\r\n });\r\n });\r\n }\r\n getAllKeys() {\r\n console.time('getAllEntries');\r\n return this.openDatabase().then((db) => {\r\n var objectStore = db.transaction([this.dbStoreName], 'readonly')\r\n .objectStore(this.dbStoreName);\r\n var request = objectStore.getAllKeys();\r\n return new Promise((resolve, reject) => {\r\n request.onsuccess = function (event) {\r\n // @ts-ignore\r\n var result = event.target.result;\r\n resolve(result);\r\n console.timeEnd('getAllEntries');\r\n };\r\n request.onerror = reject;\r\n });\r\n });\r\n }\r\n isFileExists(fileName) {\r\n console.time('isFileExists');\r\n return this.openDatabase().then((db) => {\r\n var objectStore = db.transaction([this.dbStoreName], 'readonly')\r\n .objectStore(this.dbStoreName);\r\n var request = objectStore.openCursor(fileName);\r\n return new Promise((resolve, reject) => {\r\n request.onsuccess = function (event) {\r\n // @ts-ignore\r\n var cursor = event.target.result;\r\n resolve(!!cursor);\r\n console.timeEnd('isFileExists');\r\n };\r\n request.onerror = reject;\r\n });\r\n });\r\n }\r\n getFileWriter(fileName, mimeType) {\r\n var fakeWriter = filemanager_1.default.getFakeFileWriter(mimeType, (blob) => {\r\n this.saveFile(fileName, blob);\r\n });\r\n return Promise.resolve(fakeWriter);\r\n }\r\n}\r\nconst idbFileStorage = new IdbFileStorage();\r\n//(window as any).IdbFileStorage = idbFileStorage;\r\nexports.default = idbFileStorage;\r\n" }, { - "id": 68, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networker.ts", - "name": "./src/lib/mtproto/networker.ts", - "index": 28, - "index2": 45, - "size": 44866, + "id": 70, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "name": "./src/components/chatInput.ts", + "index": 69, + "index2": 64, + "size": 19249, "cacheable": true, "built": true, "optional": false, @@ -7247,54 +7019,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networkerFactory.ts", - "issuerId": 21, - "issuerName": "./src/lib/mtproto/networkerFactory.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "issuerId": 12, + "issuerName": "./src/lib/appManagers/appImManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "dependencies": 1062 } }, { - "id": 21, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networkerFactory.ts", - "name": "./src/lib/mtproto/networkerFactory.ts", + "id": 12, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "name": "./src/lib/appManagers/appImManager.ts", "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 79, - "building": 579, - "dependencies": 1 + "factory": 45, + "building": 1068, + "dependencies": 99 }, "failed": false, "errors": 0, @@ -7302,13 +7064,13 @@ "assets": [], "reasons": [ { - "moduleId": 21, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/networkerFactory.ts", - "module": "./src/lib/mtproto/networkerFactory.ts", - "moduleName": "./src/lib/mtproto/networkerFactory.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./networker", - "loc": "3:20-42" + "userRequest": "../../components/chatInput", + "loc": "27:20-57" } ], "usedExports": true, @@ -7316,70 +7078,71 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst bin_utils_1 = require(\"../bin_utils\");\nconst mtproto_1 = require(\"./mtproto\");\nconst tl_utils_1 = require(\"../tl_utils\");\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\nconst storage_1 = __importDefault(require(\"../storage\"));\nconst Config = __importStar(require(\"../config\"));\nconst timeManager_1 = __importDefault(require(\"./timeManager\"));\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\nconst http_1 = __importDefault(require(\"./transports/http\"));\nconst polyfill_1 = require(\"../polyfill\");\nclass MTPNetworker {\n constructor(dcID, authKey, authKeyID, serverSalt, options = {}) {\n this.dcID = dcID;\n this.authKey = authKey;\n this.authKeyID = authKeyID;\n this.serverSalt = serverSalt;\n this.options = options;\n this.lastServerMessages = [];\n this.sentMessages = {};\n this.pendingMessages = {};\n this.pendingAcks = [];\n this.pendingResends = [];\n this.connectionInited = false;\n //private longPollInt: number;\n this.longPollPending = 0;\n this.seqNo = 0;\n this.prevSessionID = [];\n this.sessionID = [];\n this.sleepAfter = 0;\n this.offline = false;\n this.checkConnectionPeriod = 0;\n this.nextReq = 0;\n this.onOnlineCb = this.checkConnection.bind(this);\n this.debug = false;\n this.lastResendReq = null;\n this.authKeyUint8 = bin_utils_1.convertToUint8Array(this.authKey);\n //this.authKeyID = sha1BytesSync(this.authKey).slice(-8);\n this.upload = this.options.fileUpload || this.options.fileDownload || false;\n this.log = polyfill_1.logger('NET-' + dcID + (this.upload ? '-U' : ''));\n this.log('constructor' /* , this.authKey, this.authKeyID, this.serverSalt */);\n this.updateSession();\n if (!networkerFactory_1.default.offlineInited) {\n networkerFactory_1.default.offlineInited = true;\n /* $rootScope.offline = true\n $rootScope.offlineConnecting = true */\n }\n if (Config.Navigator.mobile) {\n this.setupMobileSleep();\n }\n this.transport = dcConfigurator_1.default.chooseServer(this.dcID, this.upload);\n if (this.transport instanceof http_1.default) {\n /* this.longPollInt = */ window.setInterval(this.checkLongPoll.bind(this), 10000);\n this.checkLongPoll();\n }\n else {\n this.transport.networker = this;\n }\n }\n updateSession() {\n this.seqNo = 0;\n this.prevSessionID = this.sessionID;\n this.sessionID = new Array(8);\n mtproto_1.MTProto.secureRandom.nextBytes(this.sessionID);\n }\n setupMobileSleep() {\n /* $rootScope.$watch('idle.isIDLE', (isIDLE) => {\n if(isIDLE) {\n this.sleepAfter = tsNow() + 30000;\n } else {\n delete this.sleepAfter;\n this.checkLongPoll();\n }\n })\n \n $rootScope.$on('push_received', function() {\n // this.log('push recieved', self.sleepAfter)\n if(this.sleepAfter) {\n this.sleepAfter = tsNow() + 30000;\n this.checkLongPoll();\n }\n }) */\n }\n updateSentMessage(sentMessageID) {\n var sentMessage = this.sentMessages[sentMessageID];\n if (!sentMessage) {\n return false;\n }\n var self = this;\n if (sentMessage.container) {\n var newInner = [];\n sentMessage.inner.forEach((innerSentMessageID) => {\n var innerSentMessage = self.updateSentMessage(innerSentMessageID);\n if (innerSentMessage) {\n newInner.push(innerSentMessage.msg_id);\n }\n });\n sentMessage.inner = newInner;\n }\n sentMessage.msg_id = timeManager_1.default.generateID();\n sentMessage.seq_no = this.generateSeqNo(sentMessage.notContentRelated ||\n sentMessage.container);\n this.sentMessages[sentMessage.msg_id] = sentMessage;\n delete self.sentMessages[sentMessageID];\n return sentMessage;\n }\n generateSeqNo(notContentRelated) {\n var seqNo = this.seqNo * 2;\n if (!notContentRelated) {\n seqNo++;\n this.seqNo++;\n }\n return seqNo;\n }\n wrapMtpCall(method, params = {}, options = {}) {\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\n serializer.storeMethod(method, params);\n var messageID = timeManager_1.default.generateID();\n var seqNo = this.generateSeqNo();\n var message = {\n msg_id: messageID,\n seq_no: seqNo,\n body: serializer.getBytes()\n };\n if (Config.Modes.debug) {\n this.log('MT call', method, params, messageID, seqNo);\n }\n return this.pushMessage(message, options);\n }\n wrapMtpMessage(object = {}, options = {}) {\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\n serializer.storeObject(object, 'Object');\n var messageID = timeManager_1.default.generateID();\n var seqNo = this.generateSeqNo(options.notContentRelated);\n var message = {\n msg_id: messageID,\n seq_no: seqNo,\n body: serializer.getBytes()\n };\n if (Config.Modes.debug) {\n this.log('MT message', object, messageID, seqNo);\n }\n return this.pushMessage(message, options);\n }\n wrapApiCall(method, params = {}, options = {}) {\n let serializer = new tl_utils_1.TLSerialization(options);\n if (!this.connectionInited) { // this will call once for each new session\n ///////this.log('Wrap api call !this.connectionInited');\n let invokeWithLayer = Config.Schema.API.methods.find((m) => m.method == 'invokeWithLayer');\n if (!invokeWithLayer)\n throw new Error('no invokeWithLayer!');\n serializer.storeInt(+invokeWithLayer.id >>> 0, 'invokeWithLayer');\n // @ts-ignore\n serializer.storeInt(Config.Schema.API.layer, 'layer');\n let initConnection = Config.Schema.API.methods.find((m) => m.method == 'initConnection');\n if (!initConnection)\n throw new Error('no initConnection!');\n serializer.storeInt(+initConnection.id >>> 0, 'initConnection');\n serializer.storeInt(0x0, 'flags');\n serializer.storeInt(Config.App.id, 'api_id');\n serializer.storeString(navigator.userAgent || 'Unknown UserAgent', 'device_model');\n serializer.storeString(navigator.platform || 'Unknown Platform', 'system_version');\n serializer.storeString(Config.App.version, 'app_version');\n serializer.storeString(navigator.language || 'en', 'system_lang_code');\n serializer.storeString('', 'lang_pack');\n serializer.storeString(navigator.language || 'en', 'lang_code');\n //serializer.storeInt(0x0, 'proxy');\n /* serializer.storeMethod('initConnection', {\n 'flags': 0,\n 'api_id': Config.App.id,\n 'device_model': navigator.userAgent || 'Unknown UserAgent',\n 'system_version': navigator.platform || 'Unknown Platform',\n 'app_version': Config.App.version,\n 'system_lang_code': navigator.language || 'en',\n 'lang_pack': '',\n 'lang_code': navigator.language || 'en'\n }); */\n }\n if (options.afterMessageID) {\n this.log('Api call options.afterMessageID!');\n serializer.storeInt(0xcb9f372d, 'invokeAfterMsg');\n serializer.storeLong(options.afterMessageID, 'msg_id');\n }\n options.resultType = serializer.storeMethod(method, params);\n /* if(method == 'account.updateNotifySettings') {\n this.log('api call body:', serializer.getBytes(true));\n } */\n var messageID = timeManager_1.default.generateID();\n var seqNo = this.generateSeqNo();\n var message = {\n msg_id: messageID,\n seq_no: seqNo,\n body: serializer.getBytes(true),\n isAPI: true\n };\n if (Config.Modes.debug /* || true */) {\n this.log('Api call', method, message, params, options);\n }\n else {\n //////this.log('Api call', method);\n }\n return this.pushMessage(message, options);\n }\n checkLongPoll() {\n var isClean = this.cleanupSent();\n //this.log('Check lp', this.longPollPending, tsNow(), this.dcID, isClean, this);\n if ((this.longPollPending && utils_1.tsNow() < this.longPollPending) ||\n this.offline ||\n networkerFactory_1.default.akStopped) {\n //this.log('No lp this time');\n return false;\n }\n var self = this;\n storage_1.default.get('dc').then((baseDcID) => {\n if (isClean && (baseDcID != self.dcID ||\n self.upload ||\n (self.sleepAfter && utils_1.tsNow() > self.sleepAfter))) {\n //console.warn(dT(), 'Send long-poll for DC is delayed', self.dcID, self.sleepAfter);\n return;\n }\n self.sendLongPoll();\n });\n }\n sendLongPoll() {\n let maxWait = 25000;\n this.longPollPending = utils_1.tsNow() + maxWait;\n //this.log('Set lp', this.longPollPending, tsNow())\n this.wrapMtpCall('http_wait', {\n max_delay: 500,\n wait_after: 150,\n max_wait: maxWait\n }, {\n noResponse: true,\n longPoll: true\n }).then(() => {\n this.longPollPending = 0;\n setTimeout(this.checkLongPoll.bind(this), 0);\n }, (error) => {\n this.log('Long-poll failed', error);\n });\n }\n pushMessage(message, options = {}) {\n return new Promise((resolve, reject) => {\n this.sentMessages[message.msg_id] = Object.assign(message, options, {\n deferred: { resolve, reject }\n });\n // this.log('Networker pushMessage:', this.sentMessages[message.msg_id]);\n this.pendingMessages[message.msg_id] = 0;\n if (!options || !options.noSchedule) {\n this.scheduleRequest();\n }\n if (utils_1.isObject(options)) {\n options.messageID = message.msg_id;\n }\n });\n }\n pushResend(messageID, delay = 0) {\n var value = delay ? utils_1.tsNow() + delay : 0;\n var sentMessage = this.sentMessages[messageID];\n if (sentMessage.container) {\n for (var i = 0; i < sentMessage.inner.length; i++) {\n this.pendingMessages[sentMessage.inner[i]] = value;\n }\n }\n else {\n this.pendingMessages[messageID] = value;\n }\n // this.log('Resend due', messageID, this.pendingMessages)\n this.scheduleRequest(delay);\n }\n getMsgKey(dataWithPadding, isOut) {\n return __awaiter(this, void 0, void 0, function* () {\n var authKey = this.authKeyUint8;\n var x = isOut ? 0 : 8;\n var msgKeyLargePlain = bin_utils_1.bufferConcat(authKey.subarray(88 + x, 88 + x + 32), dataWithPadding);\n let msgKeyLarge = yield cryptoworker_1.default.sha256Hash(msgKeyLargePlain);\n var msgKey = new Uint8Array(msgKeyLarge).subarray(8, 24);\n return msgKey;\n });\n }\n ;\n getAesKeyIv(msgKey, isOut) {\n var authKey = this.authKeyUint8;\n var x = isOut ? 0 : 8;\n var sha2aText = new Uint8Array(52);\n var sha2bText = new Uint8Array(52);\n var promises = [];\n sha2aText.set(msgKey, 0);\n sha2aText.set(authKey.subarray(x, x + 36), 16);\n promises.push(cryptoworker_1.default.sha256Hash(sha2aText));\n sha2bText.set(authKey.subarray(40 + x, 40 + x + 36), 0);\n sha2bText.set(msgKey, 36);\n promises.push(cryptoworker_1.default.sha256Hash(sha2bText));\n return Promise.all(promises).then((results) => {\n var aesKey = new Uint8Array(32);\n var aesIv = new Uint8Array(32);\n var sha2a = new Uint8Array(results[0]);\n var sha2b = new Uint8Array(results[1]);\n aesKey.set(sha2a.subarray(0, 8));\n aesKey.set(sha2b.subarray(8, 24), 8);\n aesKey.set(sha2a.subarray(24, 32), 24);\n aesIv.set(sha2b.subarray(0, 8));\n aesIv.set(sha2a.subarray(8, 24), 8);\n aesIv.set(sha2b.subarray(24, 32), 24);\n return [aesKey, aesIv];\n });\n }\n checkConnection(event) {\n /* $rootScope.offlineConnecting = true */\n this.log('Check connection', event);\n clearTimeout(this.checkConnectionTimeout);\n this.checkConnectionTimeout = 0;\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\n var pingID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\n serializer.storeMethod('ping', {\n ping_id: pingID\n });\n var pingMessage = {\n msg_id: timeManager_1.default.generateID(),\n seq_no: this.generateSeqNo(true),\n body: serializer.getBytes()\n };\n var self = this;\n this.sendEncryptedRequest(pingMessage, {\n timeout: 15000\n }).then((result) => {\n /* delete $rootScope.offlineConnecting */\n self.toggleOffline(false);\n }, () => {\n this.log('Delay ', self.checkConnectionPeriod * 1000);\n self.checkConnectionTimeout = setTimeout(self.checkConnection.bind(self), self.checkConnectionPeriod * 1000 | 0);\n self.checkConnectionPeriod = Math.min(60, self.checkConnectionPeriod * 1.5);\n /* setTimeout(function() {\n delete $rootScope.offlineConnecting\n }, 1000); */\n });\n }\n toggleOffline(enabled) {\n // this.log('toggle ', enabled, this.dcID, this.iii)\n if (this.offline !== undefined && this.offline == enabled) {\n return false;\n }\n this.offline = enabled;\n /* $rootScope.offline = enabled;\n $rootScope.offlineConnecting = false; */\n if (!(this.transport instanceof http_1.default)) {\n this.log('toggle ', enabled, this.dcID);\n return;\n }\n if (this.offline) {\n clearTimeout(this.nextReqTimeout);\n this.nextReqTimeout = 0;\n this.nextReq = 0;\n if (this.checkConnectionPeriod < 1.5) {\n this.checkConnectionPeriod = 0;\n }\n this.checkConnectionTimeout = setTimeout(this.checkConnection.bind(this), this.checkConnectionPeriod * 1000 | 0);\n this.checkConnectionPeriod = Math.min(30, (1 + this.checkConnectionPeriod) * 1.5);\n document.body.addEventListener('online', this.onOnlineCb, false);\n document.body.addEventListener('focus', this.onOnlineCb, false);\n }\n else {\n this.checkLongPoll();\n this.scheduleRequest();\n document.body.removeEventListener('online', this.onOnlineCb);\n document.body.removeEventListener('focus', this.onOnlineCb);\n clearTimeout(this.checkConnectionTimeout);\n this.checkConnectionTimeout = 0;\n }\n }\n performScheduledRequest() {\n // this.log('scheduled', this.dcID, this.iii)\n if (this.offline || networkerFactory_1.default.akStopped) {\n this.log('Cancel scheduled');\n return false;\n }\n this.nextReq = 0;\n if (this.pendingAcks.length) {\n var ackMsgIDs = this.pendingAcks.slice();\n /* for(var i = 0; i < this.pendingAcks.length; i++) {\n ackMsgIDs.push(this.pendingAcks[i]);\n } */\n // this.log('acking messages', ackMsgIDs)\n this.wrapMtpMessage({\n _: 'msgs_ack',\n msg_ids: ackMsgIDs\n }, {\n notContentRelated: true,\n noSchedule: true\n });\n }\n if (this.pendingResends.length) {\n var resendMsgIDs = this.pendingResends.slice();\n var resendOpts = {\n noSchedule: true,\n notContentRelated: true,\n messageID: '' // will set in wrapMtpMessage->pushMessage\n };\n /* for(var i = 0; i < this.pendingResends.length; i++) {\n resendMsgIDs.push(this.pendingResends[i]);\n } */\n // this.log('resendReq messages', resendMsgIDs)\n this.wrapMtpMessage({\n _: 'msg_resend_req',\n msg_ids: resendMsgIDs\n }, resendOpts);\n this.lastResendReq = {\n req_msg_id: resendOpts.messageID,\n resend_msg_ids: resendMsgIDs\n };\n }\n var messages = [], message;\n var messagesByteLen = 0;\n var currentTime = utils_1.tsNow();\n var hasApiCall = false;\n var hasHttpWait = false;\n var lengthOverflow = false;\n var singlesCount = 0;\n var self = this;\n for (let messageID in this.pendingMessages) {\n let value = this.pendingMessages[messageID];\n if (!value || value >= currentTime) {\n if (message = this.sentMessages[messageID]) {\n //this.log('performScheduledRequest message:', message);\n var messageByteLength = ( /* message.body.byteLength || */message.body.length) + 32;\n if (!message.notContentRelated &&\n lengthOverflow) {\n continue; // maybe break here\n }\n if (!message.notContentRelated &&\n messagesByteLen &&\n messagesByteLen + messageByteLength > 655360) { // 640 Kb\n this.log.warn('lengthOverflow', message);\n lengthOverflow = true;\n continue; // maybe break here\n }\n if (message.singleInRequest) {\n singlesCount++;\n if (singlesCount > 1) {\n continue; // maybe break here\n }\n }\n messages.push(message);\n messagesByteLen += messageByteLength;\n if (message.isAPI) {\n hasApiCall = true;\n }\n else if (message.longPoll) {\n hasHttpWait = true;\n }\n }\n else {\n // this.log(message, messageID)\n }\n delete self.pendingMessages[messageID];\n }\n }\n if (hasApiCall && !hasHttpWait && this.transport instanceof http_1.default) {\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\n serializer.storeMethod('http_wait', {\n max_delay: 500,\n wait_after: 150,\n max_wait: 3000\n });\n messages.push({\n msg_id: timeManager_1.default.generateID(),\n seq_no: this.generateSeqNo(),\n body: serializer.getBytes()\n });\n }\n if (!messages.length) {\n // this.log('no scheduled messages')\n return;\n }\n var noResponseMsgs = [];\n if (messages.length > 1) {\n var container = new tl_utils_1.TLSerialization({\n mtproto: true,\n startMaxLength: messagesByteLen + 64\n });\n container.storeInt(0x73f1f8dc, 'CONTAINER[id]');\n container.storeInt(messages.length, 'CONTAINER[count]');\n var innerMessages = [];\n messages.forEach((message, i) => {\n container.storeLong(message.msg_id, 'CONTAINER[' + i + '][msg_id]');\n innerMessages.push(message.msg_id);\n container.storeInt(message.seq_no, 'CONTAINER[' + i + '][seq_no]');\n container.storeInt(message.body.length, 'CONTAINER[' + i + '][bytes]');\n container.storeRawBytes(message.body, 'CONTAINER[' + i + '][body]');\n if (message.noResponse) {\n noResponseMsgs.push(message.msg_id);\n }\n });\n var containerSentMessage = {\n msg_id: timeManager_1.default.generateID(),\n seq_no: this.generateSeqNo(true),\n container: true,\n inner: innerMessages\n };\n message = Object.assign({\n body: container.getBytes(true)\n }, containerSentMessage);\n this.sentMessages[message.msg_id] = containerSentMessage;\n if (Config.Modes.debug || true) {\n this.log('Container', innerMessages, message.msg_id, message.seq_no);\n }\n }\n else {\n if (message.noResponse) {\n noResponseMsgs.push(message.msg_id);\n }\n this.sentMessages[message.msg_id] = message;\n }\n this.pendingAcks = [];\n let promise = this.sendEncryptedRequest(message);\n if (!(this.transport instanceof http_1.default)) {\n if (noResponseMsgs.length)\n this.log.error('noResponseMsgs length!', noResponseMsgs);\n }\n else\n promise.then((result) => {\n self.toggleOffline(false);\n // this.log('parse for', message)\n self.parseResponse(result).then((response) => {\n if (Config.Modes.debug) {\n this.log('Server response', self.dcID, response);\n }\n self.processMessage(response.response, response.messageID, response.sessionID);\n noResponseMsgs.forEach((msgID) => {\n if (self.sentMessages[msgID]) {\n var deferred = self.sentMessages[msgID].deferred;\n delete self.sentMessages[msgID];\n deferred.resolve();\n }\n });\n if (self.transport instanceof http_1.default) {\n self.checkLongPoll();\n this.checkConnectionPeriod = Math.max(1.1, Math.sqrt(this.checkConnectionPeriod));\n }\n });\n }, (error) => {\n this.log.error('Encrypted request failed', error, message);\n if (message.container) {\n message.inner.forEach((msgID) => {\n self.pendingMessages[msgID] = 0;\n });\n delete self.sentMessages[message.msg_id];\n }\n else {\n self.pendingMessages[message.msg_id] = 0;\n }\n noResponseMsgs.forEach((msgID) => {\n if (self.sentMessages[msgID]) {\n var deferred = self.sentMessages[msgID].deferred;\n delete self.sentMessages[msgID];\n delete self.pendingMessages[msgID];\n deferred.reject();\n }\n });\n self.toggleOffline(true);\n });\n if (lengthOverflow || singlesCount > 1) {\n this.scheduleRequest();\n }\n }\n getEncryptedMessage(dataWithPadding) {\n return __awaiter(this, void 0, void 0, function* () {\n let msgKey = yield this.getMsgKey(dataWithPadding, true);\n let keyIv = yield this.getAesKeyIv(msgKey, true);\n // this.log('after msg key iv')\n let encryptedBytes = yield cryptoworker_1.default.aesEncrypt(dataWithPadding, keyIv[0], keyIv[1]);\n // this.log('Finish encrypt')\n return {\n bytes: encryptedBytes,\n msgKey: msgKey\n };\n });\n }\n getDecryptedMessage(msgKey, encryptedData) {\n // this.log('get decrypted start')\n return this.getAesKeyIv(msgKey, false).then((keyIv) => {\n // this.log('after msg key iv')\n return cryptoworker_1.default.aesDecrypt(encryptedData, keyIv[0], keyIv[1]);\n });\n }\n sendEncryptedRequest(message, options = {}) {\n var self = this;\n this.debug && this.log('Send encrypted', message, options, this.authKeyID);\n // console.trace()\n var data = new tl_utils_1.TLSerialization({\n startMaxLength: message.body.length + 2048\n });\n data.storeIntBytes(this.serverSalt, 64, 'salt');\n data.storeIntBytes(this.sessionID, 64, 'session_id');\n data.storeLong(message.msg_id, 'message_id');\n data.storeInt(message.seq_no, 'seq_no');\n data.storeInt(message.body.length, 'message_data_length');\n data.storeRawBytes(message.body, 'message_data');\n var dataBuffer = data.getBuffer();\n var paddingLength = (16 - (data.offset % 16)) + 16 * (1 + bin_utils_1.nextRandomInt(5));\n var padding = new Array(paddingLength);\n mtproto_1.MTProto.secureRandom.nextBytes(padding);\n var dataWithPadding = bin_utils_1.bufferConcat(dataBuffer, padding);\n // this.log('Adding padding', dataBuffer, padding, dataWithPadding)\n // this.log('auth_key_id', bytesToHex(self.authKeyID))\n return this.getEncryptedMessage(dataWithPadding).then((encryptedResult) => {\n this.debug && this.log('Got encrypted out message', encryptedResult);\n let request = new tl_utils_1.TLSerialization({\n startMaxLength: encryptedResult.bytes.byteLength + 256\n });\n request.storeIntBytes(self.authKeyID, 64, 'auth_key_id');\n request.storeIntBytes(encryptedResult.msgKey, 128, 'msg_key');\n request.storeRawBytes(encryptedResult.bytes, 'encrypted_data');\n //var requestData = xhrSendBuffer ? request.getBuffer() : request.getBytes(true) as Uint8Array;\n let requestData = request.getBytes(true);\n let baseError = {\n code: 406,\n type: 'NETWORK_BAD_RESPONSE',\n transport: this.transport\n };\n let promise = this.transport.send(requestData);\n if (!(this.transport instanceof http_1.default))\n return promise;\n return promise.then((result) => {\n if (!result || !result.byteLength) {\n return Promise.reject(baseError);\n }\n return result;\n }, (error) => {\n if (!error.message && !error.type) {\n error = Object.assign(baseError, {\n type: 'NETWORK_BAD_REQUEST',\n originalError: error\n });\n }\n return Promise.reject(error);\n });\n });\n }\n parseResponse(responseBuffer) {\n this.debug && this.log('Start parsing response' /* , responseBuffer */);\n let self = this;\n let deserializer = new tl_utils_1.TLDeserialization(responseBuffer);\n let authKeyID = deserializer.fetchIntBytes(64, true, 'auth_key_id');\n if (!bin_utils_1.bytesCmp(authKeyID, this.authKeyID)) {\n throw new Error('[MT] Invalid server auth_key_id: ' + authKeyID.hex);\n }\n let msgKey = deserializer.fetchIntBytes(128, true, 'msg_key');\n let encryptedData = deserializer.fetchRawBytes(responseBuffer.byteLength - deserializer.getOffset(), true, 'encrypted_data');\n return self.getDecryptedMessage(msgKey, encryptedData).then((dataWithPadding) => {\n // this.log('after decrypt')\n return self.getMsgKey(dataWithPadding, false).then((calcMsgKey) => {\n if (!bin_utils_1.bytesCmp(msgKey, calcMsgKey)) {\n this.log.warn('[MT] msg_keys', msgKey, calcMsgKey);\n this.updateSession(); // fix 28.01.2020\n throw new Error('[MT] server msgKey mismatch, updating session');\n }\n // this.log('after msgKey check')\n let deserializer = new tl_utils_1.TLDeserialization(dataWithPadding, { mtproto: true });\n /* let salt = */ deserializer.fetchIntBytes(64, false, 'salt'); // need\n let sessionID = deserializer.fetchIntBytes(64, false, 'session_id');\n let messageID = deserializer.fetchLong('message_id');\n if (!bin_utils_1.bytesCmp(sessionID, self.sessionID) &&\n (!self.prevSessionID || !bin_utils_1.bytesCmp(sessionID, self.prevSessionID))) {\n this.log.warn('Sessions', sessionID, self.sessionID, self.prevSessionID, dataWithPadding);\n //this.updateSession();\n //this.sessionID = sessionID;\n throw new Error('[MT] Invalid server session_id: ' + bin_utils_1.bytesToHex(sessionID));\n }\n let seqNo = deserializer.fetchInt('seq_no');\n let totalLength = dataWithPadding.byteLength;\n let messageBodyLength = deserializer.fetchInt('message_data[length]');\n let offset = deserializer.getOffset();\n if ((messageBodyLength % 4) ||\n messageBodyLength > totalLength - offset) {\n throw new Error('[MT] Invalid body length: ' + messageBodyLength);\n }\n let messageBody = deserializer.fetchRawBytes(messageBodyLength, true, 'message_data');\n offset = deserializer.getOffset();\n let paddingLength = totalLength - offset;\n if (paddingLength < 12 || paddingLength > 1024) {\n throw new Error('[MT] Invalid padding length: ' + paddingLength);\n }\n //let buffer = bytesToArrayBuffer(messageBody);\n deserializer = new tl_utils_1.TLDeserialization(/* buffer */ messageBody, { mtproto: true });\n // костыль\n deserializer.override = {\n mt_message: (function (result, field) {\n result.msg_id = this.fetchLong(field + '[msg_id]');\n result.seqno = this.fetchInt(field + '[seqno]');\n result.bytes = this.fetchInt(field + '[bytes]');\n var offset = this.getOffset();\n //self.log('mt_message!!!!!', result, field);\n try {\n result.body = this.fetchObject('Object', field + '[body]');\n }\n catch (e) {\n self.log.error('parse error', e.message, e.stack);\n result.body = {\n _: 'parse_error',\n error: e\n };\n }\n if (this.offset != offset + result.bytes) {\n // console.warn(dT(), 'set offset', this.offset, offset, result.bytes)\n // this.log(result)\n this.offset = offset + result.bytes;\n }\n // this.log('override message', result)\n }).bind(deserializer),\n mt_rpc_result: (function (result, field) {\n result.req_msg_id = this.fetchLong(field + '[req_msg_id]');\n var sentMessage = self.sentMessages[result.req_msg_id];\n var type = sentMessage && sentMessage.resultType || 'Object';\n if (result.req_msg_id && !sentMessage) {\n // console.warn(dT(), 'Result for unknown message', result);\n return;\n }\n result.result = this.fetchObject(type, field + '[result]');\n // self.log(dT(), 'override rpc_result', sentMessage, type, result);\n }).bind(deserializer)\n };\n var response = deserializer.fetchObject('', 'INPUT');\n return {\n response: response,\n messageID: messageID,\n sessionID: sessionID,\n seqNo: seqNo\n };\n });\n });\n }\n applyServerSalt(newServerSalt) {\n var serverSalt = bin_utils_1.longToBytes(newServerSalt);\n storage_1.default.set({\n ['dc' + this.dcID + '_server_salt']: bin_utils_1.bytesToHex(serverSalt)\n });\n this.serverSalt = serverSalt;\n return true;\n }\n scheduleRequest(delay = 0) {\n if (!(this.transport instanceof http_1.default)) { // if socket\n return this.performScheduledRequest();\n }\n if (this.offline /* && this.transport instanceof HTTP */) {\n this.checkConnection('forced schedule');\n }\n /* if(delay && !(this.transport instanceof HTTP)) {\n delay = 0;\n } */\n var nextReq = utils_1.tsNow() + delay;\n if (delay && this.nextReq && this.nextReq <= nextReq) {\n return false;\n }\n // this.log('schedule req', delay)\n // console.trace()\n clearTimeout(this.nextReqTimeout);\n this.nextReqTimeout = 0;\n if (delay > 0) {\n this.nextReqTimeout = window.setTimeout(this.performScheduledRequest.bind(this), delay || 0);\n }\n else {\n setTimeout(this.performScheduledRequest.bind(this), 0);\n }\n this.nextReq = nextReq;\n }\n ackMessage(msgID) {\n // this.log('ack message', msgID)\n this.pendingAcks.push(msgID);\n this.scheduleRequest(30000);\n }\n reqResendMessage(msgID) {\n this.log('Req resend', msgID);\n this.pendingResends.push(msgID);\n this.scheduleRequest(100);\n }\n cleanupSent() {\n var self = this;\n var notEmpty = false;\n // this.log('clean start', this.dcID/*, this.sentMessages*/)\n Object.keys(this.sentMessages).forEach((msgID) => {\n let message = this.sentMessages[msgID];\n // this.log('clean iter', msgID, message)\n if (message.notContentRelated && self.pendingMessages[msgID] === undefined) {\n // this.log('clean notContentRelated', msgID)\n delete self.sentMessages[msgID];\n }\n else if (message.container) {\n for (var i = 0; i < message.inner.length; i++) {\n if (self.sentMessages[message.inner[i]] !== undefined) {\n // this.log('clean failed, found', msgID, message.inner[i], self.sentMessages[message.inner[i]].seq_no)\n notEmpty = true;\n return;\n }\n }\n // this.log('clean container', msgID)\n delete self.sentMessages[msgID];\n }\n else {\n notEmpty = true;\n }\n });\n return !notEmpty;\n }\n processMessageAck(messageID) {\n var sentMessage = this.sentMessages[messageID];\n if (sentMessage && !sentMessage.acked) {\n delete sentMessage.body;\n sentMessage.acked = true;\n return true;\n }\n return false;\n }\n processError(rawError) {\n var matches = (rawError.error_message || '').match(/^([A-Z_0-9]+\\b)(: (.+))?/) || [];\n rawError.error_code = bin_utils_1.uintToInt(rawError.error_code);\n return {\n code: !rawError.error_code || rawError.error_code <= 0 ? 500 : rawError.error_code,\n type: matches[1] || 'UNKNOWN',\n description: matches[3] || ('CODE#' + rawError.error_code + ' ' + rawError.error_message),\n originalError: rawError\n };\n }\n processMessage(message, messageID, sessionID) {\n var msgidInt = parseInt(messageID /* .toString(10) */.substr(0, -10), 10);\n if (msgidInt % 2) {\n this.log.warn('[MT] Server even message id: ', messageID, message);\n return;\n }\n this.debug && this.log('process message', message, messageID, sessionID);\n switch (message._) {\n case 'msg_container':\n var len = message.messages.length;\n for (var i = 0; i < len; i++) {\n this.processMessage(message.messages[i], message.messages[i].msg_id, sessionID);\n }\n break;\n case 'bad_server_salt':\n this.log('Bad server salt', message);\n var sentMessage = this.sentMessages[message.bad_msg_id];\n if (!sentMessage || sentMessage.seq_no != message.bad_msg_seqno) {\n this.log(message.bad_msg_id, message.bad_msg_seqno);\n throw new Error('[MT] Bad server salt for invalid message');\n }\n this.applyServerSalt(message.new_server_salt);\n this.pushResend(message.bad_msg_id);\n this.ackMessage(messageID);\n break;\n case 'bad_msg_notification':\n this.log('Bad msg notification', message);\n var sentMessage = this.sentMessages[message.bad_msg_id];\n if (!sentMessage || sentMessage.seq_no != message.bad_msg_seqno) {\n this.log(message.bad_msg_id, message.bad_msg_seqno);\n throw new Error('[MT] Bad msg notification for invalid message');\n }\n if (message.error_code == 16 || message.error_code == 17) {\n if (timeManager_1.default.applyServerTime(bin_utils_1.bigStringInt(messageID).shiftRight(32).toString(10))) {\n this.log('Update session');\n this.updateSession();\n }\n var badMessage = this.updateSentMessage(message.bad_msg_id);\n if (badMessage)\n this.pushResend(badMessage.msg_id); // fix 23.01.2020\n this.ackMessage(messageID);\n }\n break;\n case 'message':\n if (this.lastServerMessages.indexOf(messageID) != -1) {\n // console.warn('[MT] Server same messageID: ', messageID)\n this.ackMessage(messageID);\n return;\n }\n this.lastServerMessages.push(messageID);\n if (this.lastServerMessages.length > 100) {\n this.lastServerMessages.shift();\n }\n this.processMessage(message.body, message.msg_id, sessionID);\n break;\n case 'new_session_created':\n this.ackMessage(messageID);\n this.log('new_session_created in my head');\n //this.updateSession();\n this.processMessageAck(message.first_msg_id);\n this.applyServerSalt(message.server_salt);\n storage_1.default.get('dc').then((baseDcID) => {\n if (baseDcID == this.dcID && !this.upload && networkerFactory_1.default.updatesProcessor) {\n networkerFactory_1.default.updatesProcessor(message, true);\n }\n });\n break;\n case 'msgs_ack':\n for (var i = 0; i < message.msg_ids.length; i++) {\n this.processMessageAck(message.msg_ids[i]);\n }\n break;\n case 'msg_detailed_info':\n if (!this.sentMessages[message.msg_id]) {\n this.ackMessage(message.answer_msg_id);\n break;\n }\n case 'msg_new_detailed_info':\n if (this.pendingAcks.indexOf(message.answer_msg_id)) {\n break;\n }\n this.reqResendMessage(message.answer_msg_id);\n break;\n case 'msgs_state_info':\n this.ackMessage(message.answer_msg_id);\n if (this.lastResendReq &&\n this.lastResendReq.req_msg_id == message.req_msg_id &&\n this.pendingResends.length) {\n var badMsgID, pos;\n for (let i = 0; i < this.lastResendReq.resend_msg_ids.length; i++) {\n badMsgID = this.lastResendReq.resend_msg_ids[i];\n pos = this.pendingResends.indexOf(badMsgID);\n if (pos != -1) {\n this.pendingResends.splice(pos, 1);\n }\n }\n }\n break;\n case 'rpc_result':\n this.ackMessage(messageID);\n var sentMessageID = message.req_msg_id;\n var sentMessage = this.sentMessages[sentMessageID];\n this.processMessageAck(sentMessageID);\n if (sentMessage) {\n var deferred = sentMessage.deferred;\n if (message.result._ == 'rpc_error') {\n var error = this.processError(message.result);\n this.log('Rpc error', error);\n if (deferred) {\n deferred.reject(error);\n }\n }\n else {\n if (deferred) {\n if (Config.Modes.debug) {\n this.debug && this.log('Rpc response', message.result);\n }\n else {\n var dRes = message.result._;\n if (!dRes) {\n if (message.result.length > 5) {\n dRes = '[..' + message.result.length + '..]';\n }\n else {\n dRes = message.result;\n }\n }\n this.debug && this.log('Rpc response', dRes, sentMessage);\n }\n sentMessage.deferred.resolve(message.result);\n }\n if (sentMessage.isAPI && !this.connectionInited) {\n this.connectionInited = true;\n ////this.log('Rpc set connectionInited to:', this.connectionInited);\n }\n }\n delete this.sentMessages[sentMessageID];\n }\n break;\n default:\n this.ackMessage(messageID);\n this.debug && this.log('Update', message);\n if (networkerFactory_1.default.updatesProcessor !== null) {\n networkerFactory_1.default.updatesProcessor(message, true);\n }\n break;\n }\n }\n}\nexports.MTPNetworker = MTPNetworker;\n" + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst scrollable_1 = __importDefault(require(\"./scrollable\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\n//import apiManager from \"../lib/mtproto/apiManager\";\r\nconst mtprotoworker_1 = __importDefault(require(\"../lib/mtproto/mtprotoworker\"));\r\nconst appWebPagesManager_1 = __importDefault(require(\"../lib/appManagers/appWebPagesManager\"));\r\nconst appImManager_1 = __importDefault(require(\"../lib/appManagers/appImManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst wrappers_1 = require(\"./wrappers\");\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst emoticonsDropdown_1 = __importStar(require(\"./emoticonsDropdown\"));\r\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\nclass ChatInput {\r\n constructor() {\r\n this.pageEl = document.querySelector('.page-chats');\r\n this.messageInput = document.getElementById('input-message') /* HTMLInputElement */;\r\n this.fileInput = document.getElementById('input-file');\r\n this.inputMessageContainer = document.getElementsByClassName('input-message-container')[0];\r\n this.inputScroll = new scrollable_1.default(this.inputMessageContainer);\r\n this.btnSend = document.getElementById('btn-send');\r\n this.emoticonsDropdown = null;\r\n this.emoticonsTimeout = 0;\r\n this.emoticonsLazyLoadQueue = null;\r\n this.lastUrl = '';\r\n this.lastTimeType = 0;\r\n this.attachMenu = {};\r\n this.attachMediaPopUp = {};\r\n this.replyElements = {};\r\n this.willSendWebPage = null;\r\n this.replyToMsgID = 0;\r\n this.editMsgID = 0;\r\n this.noWebPage = false;\r\n this.toggleEmoticons = this.pageEl.querySelector('.toggle-emoticons');\r\n this.attachMenu.container = document.getElementById('attach-file');\r\n this.attachMenu.media = this.attachMenu.container.querySelector('.menu-media');\r\n this.attachMenu.document = this.attachMenu.container.querySelector('.menu-document');\r\n this.attachMenu.poll = this.attachMenu.container.querySelector('.menu-poll');\r\n this.attachMediaPopUp.container = this.pageEl.querySelector('.popup-send-photo');\r\n this.attachMediaPopUp.titleEl = this.attachMediaPopUp.container.querySelector('.popup-title');\r\n this.attachMediaPopUp.sendBtn = this.attachMediaPopUp.container.querySelector('.btn-primary');\r\n this.attachMediaPopUp.mediaContainer = this.attachMediaPopUp.container.querySelector('.popup-photo');\r\n this.attachMediaPopUp.captionInput = this.attachMediaPopUp.container.querySelector('input');\r\n this.replyElements.container = this.pageEl.querySelector('.reply-wrapper');\r\n this.replyElements.cancelBtn = this.replyElements.container.querySelector('.reply-cancel');\r\n this.replyElements.titleEl = this.replyElements.container.querySelector('.reply-title');\r\n this.replyElements.subtitleEl = this.replyElements.container.querySelector('.reply-subtitle');\r\n this.messageInput.addEventListener('keydown', (e) => {\r\n if (e.key == 'Enter') {\r\n /* if(e.ctrlKey || e.metaKey) {\r\n this.messageInput.innerHTML += '
';\r\n placeCaretAtEnd(this.message)\r\n return;\r\n } */\r\n if (e.shiftKey || e.ctrlKey || e.metaKey) {\r\n return;\r\n }\r\n this.sendMessage();\r\n }\r\n });\r\n this.messageInput.addEventListener('input', (e) => {\r\n //console.log('messageInput input', this.messageInput.innerText, this.serializeNodes(Array.from(this.messageInput.childNodes)));\r\n let value = this.messageInput.innerText;\r\n let entities = richtextprocessor_1.RichTextProcessor.parseEntities(value);\r\n //console.log('messageInput entities', entities);\r\n let entityUrl = entities.find(e => e._ == 'messageEntityUrl');\r\n if (entityUrl) { // need to get webpage\r\n let url = value.slice(entityUrl.offset, entityUrl.offset + entityUrl.length);\r\n //console.log('messageInput url:', url);\r\n if (this.lastUrl != url) {\r\n this.lastUrl = url;\r\n this.willSendWebPage = null;\r\n mtprotoworker_1.default.invokeApi('messages.getWebPage', {\r\n url: url,\r\n hash: 0\r\n }).then((webpage) => {\r\n appWebPagesManager_1.default.saveWebPage(webpage);\r\n if (this.lastUrl != url)\r\n return;\r\n console.log('got webpage: ', webpage);\r\n this.setTopInfo(webpage.site_name || webpage.title, webpage.description || webpage.url);\r\n this.replyToMsgID = 0;\r\n this.noWebPage = false;\r\n this.willSendWebPage = webpage;\r\n });\r\n }\r\n }\r\n if (!value.trim() && !this.serializeNodes(Array.from(this.messageInput.childNodes)).trim()) {\r\n this.messageInput.innerHTML = '';\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n appImManager_1.default.setTyping('sendMessageCancelAction');\r\n }\r\n else if (!this.btnSend.classList.contains('tgico-send')) {\r\n this.btnSend.classList.add('tgico-send');\r\n this.btnSend.classList.remove('tgico-microphone2');\r\n let time = Date.now();\r\n if (time - this.lastTimeType >= 6000) {\r\n this.lastTimeType = time;\r\n appImManager_1.default.setTyping('sendMessageTypingAction');\r\n }\r\n }\r\n });\r\n if (!richtextprocessor_1.RichTextProcessor.emojiSupported) {\r\n this.messageInput.addEventListener('copy', (e) => {\r\n const selection = document.getSelection();\r\n let range = selection.getRangeAt(0);\r\n let ancestorContainer = range.commonAncestorContainer;\r\n let str = '';\r\n let selectedNodes = Array.from(ancestorContainer.childNodes).slice(range.startOffset, range.endOffset);\r\n if (selectedNodes.length) {\r\n str = this.serializeNodes(selectedNodes);\r\n }\r\n else {\r\n str = selection.toString();\r\n }\r\n //console.log('messageInput copy', str, ancestorContainer.childNodes, range);\r\n //let str = getRichValueWithCaret(this.messageInput);\r\n //console.log('messageInput childNode copy:', str);\r\n // @ts-ignore\r\n event.clipboardData.setData('text/plain', str);\r\n event.preventDefault();\r\n });\r\n }\r\n this.messageInput.addEventListener('paste', (e) => {\r\n //console.log('messageInput paste');\r\n e.preventDefault();\r\n // @ts-ignore\r\n let text = (e.originalEvent || e).clipboardData.getData('text/plain');\r\n // console.log('messageInput paste', text);\r\n text = richtextprocessor_1.RichTextProcessor.wrapEmojiText(text);\r\n // console.log('messageInput paste after', text);\r\n // @ts-ignore\r\n //let html = (e.originalEvent || e).clipboardData.getData('text/html');\r\n // @ts-ignore\r\n //console.log('paste text', text, );\r\n window.document.execCommand('insertHTML', false, text);\r\n });\r\n let attachFile = (file) => {\r\n console.log('selected file:', file, typeof (file));\r\n willAttachFile = file;\r\n willAttachObjectURL = '';\r\n this.fileInput.value = '';\r\n this.attachMediaPopUp.captionInput.value = '';\r\n this.attachMediaPopUp.mediaContainer.innerHTML = '';\r\n this.attachMediaPopUp.mediaContainer.style.width = '';\r\n this.attachMediaPopUp.mediaContainer.style.height = '';\r\n this.attachMediaPopUp.mediaContainer.classList.remove('is-document');\r\n if (file.type.indexOf('video/') === 0) {\r\n willAttach = 'document';\r\n }\r\n else if (file.type.indexOf('image/') === -1 && willAttach == 'media') {\r\n willAttach = 'document';\r\n }\r\n switch (willAttach) {\r\n case 'media': {\r\n let img = new Image();\r\n img.src = willAttachObjectURL = URL.createObjectURL(file);\r\n img.onload = () => {\r\n willAttachWidth = img.naturalWidth;\r\n willAttachHeight = img.naturalHeight;\r\n let { w, h } = utils_1.calcImageInBox(willAttachWidth, willAttachHeight, 378, 256);\r\n this.attachMediaPopUp.mediaContainer.style.width = w + 'px';\r\n this.attachMediaPopUp.mediaContainer.style.height = h + 'px';\r\n this.attachMediaPopUp.mediaContainer.append(img);\r\n };\r\n this.attachMediaPopUp.titleEl.innerText = 'Send Photo';\r\n this.attachMediaPopUp.container.classList.add('active');\r\n break;\r\n }\r\n case 'document': {\r\n let docDiv = wrappers_1.wrapDocument({\r\n file: file,\r\n file_name: file.name || '',\r\n size: file.size,\r\n type: ['image/jpeg',\r\n 'image/png',\r\n 'image/gif',\r\n 'image/webp',\r\n 'image/bmp'].indexOf(file.type) !== -1 ? 'photo' : 'doc'\r\n }, false, true);\r\n this.attachMediaPopUp.titleEl.innerText = 'Send File';\r\n this.attachMediaPopUp.mediaContainer.append(docDiv);\r\n this.attachMediaPopUp.mediaContainer.classList.add('is-document');\r\n this.attachMediaPopUp.container.classList.add('active');\r\n break;\r\n }\r\n }\r\n };\r\n let willAttach = '';\r\n let willAttachFile = null;\r\n let willAttachObjectURL = '';\r\n let willAttachWidth = 0, willAttachHeight = 0;\r\n this.fileInput.addEventListener('change', (e) => {\r\n var file = e.target.files[0];\r\n if (!file) {\r\n return;\r\n }\r\n attachFile(file);\r\n }, false);\r\n this.attachMenu.media.addEventListener('click', () => {\r\n willAttach = 'media';\r\n this.fileInput.click();\r\n });\r\n this.attachMenu.document.addEventListener('click', () => {\r\n willAttach = 'document';\r\n this.fileInput.click();\r\n });\r\n document.addEventListener('paste', (event) => {\r\n if (!appImManager_1.default.peerID || this.attachMediaPopUp.container.classList.contains('active')) {\r\n return;\r\n }\r\n //console.log('document paste');\r\n // @ts-ignore\r\n var items = (event.clipboardData || event.originalEvent.clipboardData).items;\r\n //console.log('item', event.clipboardData.getData());\r\n for (let i = 0; i < items.length; ++i) {\r\n if (items[i].kind == 'file') {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n event.stopPropagation();\r\n let file = items[i].getAsFile();\r\n //console.log(items[i], file);\r\n if (!file)\r\n continue;\r\n willAttach = file.type.indexOf('image/') === 0 ? 'media' : \"document\";\r\n attachFile(file);\r\n }\r\n }\r\n }, true);\r\n this.attachMediaPopUp.sendBtn.addEventListener('click', () => {\r\n this.attachMediaPopUp.container.classList.remove('active');\r\n let caption = this.attachMediaPopUp.captionInput.value;\r\n appMessagesManager_1.default.sendFile(appImManager_1.default.peerID, willAttachFile, {\r\n isMedia: true,\r\n caption,\r\n width: willAttachWidth,\r\n height: willAttachHeight,\r\n objectURL: willAttachObjectURL\r\n });\r\n this.onMessageSent();\r\n });\r\n this.btnSend.addEventListener('click', () => {\r\n if (this.btnSend.classList.contains('tgico-send')) {\r\n this.sendMessage();\r\n }\r\n });\r\n this.toggleEmoticons.onmouseover = (e) => {\r\n clearTimeout(this.emoticonsTimeout);\r\n this.emoticonsTimeout = setTimeout(() => {\r\n if (!this.emoticonsDropdown) {\r\n let res = emoticonsDropdown_1.default(this.pageEl, appImManager_1.default, appMessagesManager_1.default, this.messageInput, this.toggleEmoticons, this.btnSend);\r\n this.emoticonsDropdown = res.dropdown;\r\n this.emoticonsLazyLoadQueue = res.lazyLoadQueue;\r\n this.toggleEmoticons.onmouseout = this.emoticonsDropdown.onmouseout = (e) => {\r\n clearTimeout(this.emoticonsTimeout);\r\n this.emoticonsTimeout = setTimeout(() => {\r\n this.emoticonsDropdown.classList.remove('active');\r\n this.toggleEmoticons.classList.remove('active');\r\n lottieLoader_1.default.checkAnimations(true, emoticonsDropdown_1.EMOTICONSSTICKERGROUP);\r\n }, 200);\r\n };\r\n this.emoticonsDropdown.onmouseover = (e) => {\r\n clearTimeout(this.emoticonsTimeout);\r\n };\r\n }\r\n else {\r\n this.emoticonsDropdown.classList.add('active');\r\n this.emoticonsLazyLoadQueue.check();\r\n }\r\n this.toggleEmoticons.classList.add('active');\r\n lottieLoader_1.default.checkAnimations(false, emoticonsDropdown_1.EMOTICONSSTICKERGROUP);\r\n }, 0 /* 200 */);\r\n };\r\n this.replyElements.cancelBtn.addEventListener('click', () => {\r\n this.replyElements.container.classList.remove('active');\r\n this.replyToMsgID = 0;\r\n if (this.editMsgID) {\r\n if (this.willSendWebPage) {\r\n let message = appMessagesManager_1.default.getMessage(this.editMsgID);\r\n this.setTopInfo('Editing', message.message);\r\n }\r\n else {\r\n this.editMsgID = 0;\r\n this.messageInput.innerHTML = '';\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n }\r\n }\r\n this.noWebPage = true;\r\n this.willSendWebPage = null;\r\n });\r\n }\r\n serializeNodes(nodes) {\r\n return nodes.reduce((str, child) => {\r\n //console.log('childNode', str, child, typeof(child), typeof(child) === 'string', child.innerText);\r\n if (typeof (child) === 'object' && child.textContent)\r\n return str += child.textContent;\r\n if (child.innerText)\r\n return str += child.innerText;\r\n if (child.tagName == 'IMG' && child.classList && child.classList.contains('emoji'))\r\n return str += child.getAttribute('alt');\r\n return str;\r\n }, '');\r\n }\r\n ;\r\n onMessageSent(scrollDown = true, clearInput = true) {\r\n if (scrollDown) {\r\n appImManager_1.default.scroll.scrollTop = appImManager_1.default.scroll.scrollHeight;\r\n }\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(appImManager_1.default.peerID)[0];\r\n if (dialog && dialog.top_message) {\r\n appMessagesManager_1.default.readHistory(appImManager_1.default.peerID, dialog.top_message); // lol\r\n }\r\n if (clearInput) {\r\n this.lastUrl = '';\r\n this.editMsgID = 0;\r\n this.replyToMsgID = 0;\r\n this.noWebPage = false;\r\n this.replyElements.container.classList.remove('active');\r\n this.willSendWebPage = null;\r\n this.messageInput.innerText = '';\r\n this.btnSend.classList.remove('tgico-send');\r\n this.btnSend.classList.add('tgico-microphone2');\r\n }\r\n }\r\n sendMessage() {\r\n //let str = this.serializeNodes(Array.from(this.messageInput.childNodes));\r\n let str = utils_1.getRichValue(this.messageInput);\r\n //console.log('childnode str after:', str/* , getRichValue(this.messageInput) */);\r\n //return;\r\n if (this.editMsgID) {\r\n appMessagesManager_1.default.editMessage(this.editMsgID, str, {\r\n noWebPage: this.noWebPage\r\n });\r\n }\r\n else {\r\n appMessagesManager_1.default.sendText(appImManager_1.default.peerID, str, {\r\n replyToMsgID: this.replyToMsgID == 0 ? undefined : this.replyToMsgID,\r\n noWebPage: this.noWebPage,\r\n webPage: this.willSendWebPage\r\n });\r\n }\r\n this.onMessageSent(!this.editMsgID);\r\n }\r\n ;\r\n setTopInfo(title, subtitle, input, media) {\r\n //appImManager.scrollPosition.prepareFor('down');\r\n if (this.replyElements.container.lastElementChild.tagName == 'DIV') {\r\n this.replyElements.container.lastElementChild.remove();\r\n this.replyElements.container.append(wrappers_1.wrapReply(title, subtitle, media));\r\n }\r\n //this.replyElements.titleEl.innerHTML = title ? RichTextProcessor.wrapEmojiText(title) : '';\r\n //this.replyElements.subtitleEl.innerHTML = subtitle ? RichTextProcessor.wrapEmojiText(subtitle) : '';\r\n this.replyElements.container.classList.add('active');\r\n if (input !== undefined) {\r\n this.messageInput.innerHTML = input ? richtextprocessor_1.RichTextProcessor.wrapRichText(input) : '';\r\n this.btnSend.classList.remove('tgico-microphone2');\r\n this.btnSend.classList.add('tgico-send');\r\n }\r\n //appImManager.scrollPosition.restore();\r\n }\r\n}\r\nexports.ChatInput = ChatInput;\r\n" }, { - "id": 69, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/worker-loader/dist/cjs.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/crypto/crypto.worker.js", - "name": "./src/lib/crypto/crypto.worker.js", - "index": 32, - "index2": 23, - "size": 113, - "cacheable": false, + "id": 71, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\emoticonsDropdown.ts", + "name": "./src/components/emoticonsDropdown.ts", + "index": 70, + "index2": 63, + "size": 19959, + "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/crypto/cryptoworker.ts", - "issuerId": 7, - "issuerName": "./src/lib/crypto/cryptoworker.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "issuerId": 70, + "issuerName": "./src/components/chatInput.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", + "id": 12, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "name": "./src/lib/appManagers/appImManager.ts", "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 386, + "building": 1105, + "dependencies": 45 } }, { - "id": 7, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/crypto/cryptoworker.ts", - "name": "./src/lib/crypto/cryptoworker.ts", + "id": 70, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "name": "./src/components/chatInput.ts", "profile": { - "factory": 278, - "building": 994, - "dependencies": 0 + "factory": 45, + "building": 1068, + "dependencies": 99 } } ], "profile": { - "factory": 886, - "building": 908 + "factory": 34, + "building": 328, + "dependencies": 1 }, "failed": false, "errors": 0, @@ -7387,13 +7150,13 @@ "assets": [], "reasons": [ { - "moduleId": 7, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/crypto/cryptoworker.ts", - "module": "./src/lib/crypto/cryptoworker.ts", - "moduleName": "./src/lib/crypto/cryptoworker.ts", + "moduleId": 70, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\chatInput.ts", + "module": "./src/components/chatInput.ts", + "moduleName": "./src/components/chatInput.ts", "type": "cjs require", - "userRequest": "./crypto.worker.js", - "loc": "24:54-83" + "userRequest": "./emoticonsDropdown", + "loc": "22:41-71" } ], "usedExports": true, @@ -7402,15 +7165,15 @@ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 4, - "source": "module.exports = function() {\n return new Worker(__webpack_public_path__ + \"69d45fed4230730b6030.worker.js\");\n};" + "source": "\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst misc_1 = require(\"./misc\");\r\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\nconst scrollable_1 = __importDefault(require(\"./scrollable\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst appStickersManager_1 = __importDefault(require(\"../lib/appManagers/appStickersManager\"));\r\n//import apiManager from '../lib/mtproto/apiManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../lib/mtproto/mtprotoworker\"));\r\n//import CryptoWorker from '../lib/crypto/cryptoworker';\r\nconst lazyLoadQueue_1 = __importDefault(require(\"./lazyLoadQueue\"));\r\nconst wrappers_1 = require(\"./wrappers\");\r\nconst appWebpManager_1 = __importDefault(require(\"../lib/appManagers/appWebpManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst preloader_1 = __importDefault(require(\"./preloader\"));\r\nconst config_1 = __importDefault(require(\"../lib/config\"));\r\nexports.EMOTICONSSTICKERGROUP = 'emoticons-dropdown';\r\nconst initEmoticonsDropdown = (pageEl, appImManager, appMessagesManager, messageInput, toggleEl, btnSend) => {\r\n let dropdown = pageEl.querySelector('.emoji-dropdown');\r\n dropdown.classList.add('active'); // need\r\n let lazyLoadQueue = new lazyLoadQueue_1.default(5);\r\n let container = pageEl.querySelector('.emoji-container .tabs-container');\r\n let tabs = pageEl.querySelector('.emoji-dropdown .emoji-tabs');\r\n misc_1.horizontalMenu(tabs, container, (id) => {\r\n lottieLoader_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n if (id == 1 && stickersInit) {\r\n stickersInit();\r\n }\r\n else if (id == 2 && gifsInit) {\r\n gifsInit();\r\n }\r\n }, () => {\r\n lottieLoader_1.default.checkAnimations(false, exports.EMOTICONSSTICKERGROUP);\r\n lazyLoadQueue.check(); // for stickers or gifs\r\n });\r\n tabs.firstElementChild.children[0].click(); // set emoji tab\r\n tabs.lastElementChild.style.cssText = 'width: 44.1719px; transform: translateX(88.5781px);'; // мы снова встретились))))))\r\n let emoticonsMenuOnClick = (menu, heights, scroll, menuScroll) => {\r\n menu.addEventListener('click', function (e) {\r\n let target = e.target;\r\n target = utils_1.findUpTag(target, 'LI');\r\n let index = utils_1.whichChild(target);\r\n let y = heights[index - 1 /* 2 */] || 0; // 10 == padding .scrollable\r\n /* if(menuScroll) {\r\n menuScroll.container.scrollLeft = target.scrollWidth * index;\r\n }\r\n console.log('emoticonsMenuOnClick', menu.getBoundingClientRect(), target.getBoundingClientRect());\r\n */\r\n /* scroll.onAddedBottom = () => { // привет, костыль, давно не виделись!\r\n scroll.container.scrollTop = y;\r\n scroll.onAddedBottom = () => {};\r\n }; */\r\n scroll.container.scrollTop = y;\r\n });\r\n };\r\n let emoticonsContentOnScroll = (menu, heights, prevCategoryIndex, scroll, menuScroll) => {\r\n let y = scroll.scrollTop;\r\n //console.log(heights, y);\r\n for (let i = 0; i < heights.length; ++i) {\r\n let height = heights[i];\r\n if (y < height) {\r\n menu.children[prevCategoryIndex].classList.remove('active');\r\n prevCategoryIndex = i /* + 1 */;\r\n menu.children[prevCategoryIndex].classList.add('active');\r\n if (menuScroll) {\r\n if (i < heights.length - 4) {\r\n menuScroll.container.scrollLeft = (i - 3) * 47;\r\n }\r\n else {\r\n menuScroll.container.scrollLeft = i * 47;\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n return prevCategoryIndex;\r\n };\r\n {\r\n let categories = [\"Smileys & Emotion\", \"Animals & Nature\", \"Food & Drink\", \"Travel & Places\", \"Activities\", \"Objects\", /* \"Symbols\", */ \"Flags\", \"Skin Tones\"];\r\n let divs = {};\r\n let keyCategory = config_1.default.Emoji.keyCategory;\r\n let sorted = {};\r\n for (let unified in config_1.default.Emoji.emoji) {\r\n // @ts-ignore\r\n let details = config_1.default.Emoji.emoji[unified];\r\n let category = details[keyCategory];\r\n if (category == 'Symbols')\r\n category = 'Objects';\r\n details.unified = unified;\r\n if (!sorted[category])\r\n sorted[category] = [];\r\n sorted[category][details.sort_order] = details;\r\n }\r\n //console.log('emoticons sorted:', sorted);\r\n Object.keys(sorted).forEach(c => sorted[c].sort());\r\n categories.pop();\r\n delete sorted[\"Skin Tones\"];\r\n //console.time('emojiParse');\r\n for (let category in sorted) {\r\n let div = document.createElement('div');\r\n div.classList.add('emoji-category');\r\n let emojis = sorted[category];\r\n emojis.forEach(details => {\r\n let emoji = details.unified;\r\n //let emoji = (details.unified as string).split('-')\r\n //.reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), '');\r\n let spanEmoji = document.createElement('span');\r\n let kek = richtextprocessor_1.RichTextProcessor.wrapRichText(emoji);\r\n if (!kek.includes('emoji')) {\r\n console.log(details, emoji, kek, spanEmoji, emoji.length, new TextEncoder().encode(emoji));\r\n return;\r\n }\r\n //console.log(kek);\r\n spanEmoji.innerHTML = kek;\r\n //spanEmoji = spanEmoji.firstElementChild as HTMLSpanElement;\r\n //spanEmoji.setAttribute('emoji', emoji);\r\n div.appendChild(spanEmoji);\r\n });\r\n divs[category] = div;\r\n }\r\n //console.timeEnd('emojiParse');\r\n let contentEmojiDiv = document.getElementById('content-emoji');\r\n let heights = [0];\r\n let prevCategoryIndex = 1;\r\n let menu = contentEmojiDiv.nextElementSibling.firstElementChild;\r\n let emojiScroll = new scrollable_1.default(contentEmojiDiv, 'y', 500, 'EMOJI', null);\r\n emojiScroll.container.addEventListener('scroll', (e) => {\r\n prevCategoryIndex = emoticonsContentOnScroll(menu, heights, prevCategoryIndex, emojiScroll.container);\r\n });\r\n //emojiScroll.setVirtualContainer(emojiScroll.container);\r\n categories.map(category => {\r\n let div = divs[category];\r\n if (!div) {\r\n console.error('no div by category:', category);\r\n }\r\n emojiScroll.append(div);\r\n return div;\r\n }).forEach(div => {\r\n //console.log('emoji heights push: ', (heights[heights.length - 1] || 0) + div.scrollHeight, div, div.scrollHeight);\r\n heights.push((heights[heights.length - 1] || 0) + div.scrollHeight);\r\n });\r\n contentEmojiDiv.addEventListener('click', function (e) {\r\n let target = e.target;\r\n //if(target.tagName != 'SPAN') return;\r\n if (target.tagName == 'SPAN' && !target.classList.contains('emoji')) {\r\n target = target.firstElementChild;\r\n }\r\n else if (target.tagName == 'DIV')\r\n return;\r\n //console.log('contentEmoji div', target);\r\n /* if(!target.classList.contains('emoji')) {\r\n target = target.parentElement as HTMLSpanElement;\r\n \r\n if(!target.classList.contains('emoji')) {\r\n return;\r\n }\r\n } */\r\n //messageInput.innerHTML += target.innerHTML;\r\n messageInput.innerHTML += target.outerHTML;\r\n btnSend.classList.add('tgico-send');\r\n btnSend.classList.remove('tgico-microphone2');\r\n });\r\n emoticonsMenuOnClick(menu, heights, emojiScroll);\r\n }\r\n let onMediaClick = (e) => {\r\n let target = e.target;\r\n target = utils_1.findUpTag(target, 'DIV');\r\n let fileID = target.dataset.docID;\r\n let document = appDocsManager_1.default.getDoc(fileID);\r\n if (document._ != 'documentEmpty') {\r\n appMessagesManager.sendFile(appImManager.peerID, document, { isMedia: true });\r\n appImManager.chatInputC.onMessageSent(true, false);\r\n dropdown.classList.remove('active');\r\n toggleEl.classList.remove('active');\r\n }\r\n else {\r\n console.warn('got no doc by id:', fileID);\r\n }\r\n };\r\n let stickersInit = () => {\r\n let contentStickersDiv = document.getElementById('content-stickers');\r\n //let stickersDiv = contentStickersDiv.querySelector('.os-content') as HTMLDivElement;\r\n let menuWrapper = contentStickersDiv.nextElementSibling;\r\n let menu = menuWrapper.firstElementChild.firstElementChild;\r\n let menuScroll = new scrollable_1.default(menuWrapper, 'x');\r\n let stickersDiv = document.createElement('div');\r\n stickersDiv.classList.add('stickers-categories');\r\n contentStickersDiv.append(stickersDiv);\r\n stickersDiv.addEventListener('mouseover', (e) => {\r\n let target = e.target;\r\n if (target.tagName == 'CANVAS') { // turn on sticker\r\n let animation = lottieLoader_1.default.getAnimation(target.parentElement, exports.EMOTICONSSTICKERGROUP);\r\n if (animation) {\r\n // @ts-ignore\r\n if (animation.currentFrame == animation.totalFrames - 1) {\r\n animation.goToAndPlay(0, true);\r\n }\r\n else {\r\n animation.play();\r\n }\r\n }\r\n }\r\n });\r\n stickersDiv.addEventListener('click', onMediaClick);\r\n let heights = [];\r\n let heightRAF = 0;\r\n let categoryPush = (categoryDiv, docs, prepend) => {\r\n //if((docs.length % 5) != 0) categoryDiv.classList.add('not-full');\r\n docs.forEach(doc => {\r\n let div = document.createElement('div');\r\n wrappers_1.wrapSticker(doc, div, undefined, lazyLoadQueue, exports.EMOTICONSSTICKERGROUP, true, false, true);\r\n categoryDiv.append(div);\r\n });\r\n if (prepend)\r\n stickersScroll.prepend(categoryDiv);\r\n else\r\n stickersScroll.append(categoryDiv);\r\n setTimeout(() => lazyLoadQueue.check(), 0);\r\n /* let scrollHeight = categoryDiv.scrollHeight;\r\n let prevHeight = heights[heights.length - 1] || 0;\r\n //console.log('scrollHeight', scrollHeight, categoryDiv, stickersDiv.childElementCount);\r\n if(prepend && heights.length) {// all stickers loaded faster than recent\r\n heights.forEach((h, i) => heights[i] += scrollHeight);\r\n \r\n return heights.unshift(scrollHeight) - 1;\r\n } */\r\n if (heightRAF)\r\n window.cancelAnimationFrame(heightRAF);\r\n heightRAF = window.requestAnimationFrame(() => {\r\n heightRAF = 0;\r\n let paddingTop = parseInt(window.getComputedStyle(stickersScroll.container).getPropertyValue('padding-top')) || 0;\r\n heights.length = 0;\r\n let concated = stickersScroll.hiddenElements.up.concat(stickersScroll.visibleElements, stickersScroll.hiddenElements.down);\r\n concated.forEach((el, i) => {\r\n heights[i] = (heights[i - 1] || 0) + el.height + (i == 0 ? paddingTop : 0);\r\n });\r\n //console.log('stickers concated', concated, heights);\r\n });\r\n /* Array.from(stickersDiv.children).forEach((div, i) => {\r\n heights[i] = (heights[i - 1] || 0) + div.scrollHeight;\r\n }); */\r\n //stickersScroll.onScroll();\r\n //return heights.push(prevHeight + scrollHeight) - 1;\r\n };\r\n let prevCategoryIndex = 0;\r\n let stickersScroll = new scrollable_1.default(contentStickersDiv, 'y', 500, 'STICKERS');\r\n stickersScroll.container.addEventListener('scroll', (e) => {\r\n lazyLoadQueue.check();\r\n lottieLoader_1.default.checkAnimations();\r\n prevCategoryIndex = emoticonsContentOnScroll(menu, heights, prevCategoryIndex, stickersScroll.container, menuScroll);\r\n });\r\n stickersScroll.setVirtualContainer(stickersDiv);\r\n stickersScroll.lock('both');\r\n emoticonsMenuOnClick(menu, heights, stickersScroll, menuScroll);\r\n stickersInit = null;\r\n Promise.all([\r\n mtprotoworker_1.default.invokeApi('messages.getRecentStickers', { flags: 0, hash: 0 }).then((res) => {\r\n let stickers = res;\r\n let categoryDiv = document.createElement('div');\r\n categoryDiv.classList.add('sticker-category');\r\n //stickersScroll.prepend(categoryDiv);\r\n categoryPush(categoryDiv, stickers.stickers, true);\r\n }),\r\n mtprotoworker_1.default.invokeApi('messages.getAllStickers', { hash: 0 }).then((res) => __awaiter(void 0, void 0, void 0, function* () {\r\n let stickers = res;\r\n for (let set of stickers.sets) {\r\n let categoryDiv = document.createElement('div');\r\n categoryDiv.classList.add('sticker-category');\r\n let li = document.createElement('li');\r\n li.classList.add('btn-icon');\r\n menu.append(li);\r\n //stickersScroll.append(categoryDiv);\r\n let stickerSet = yield appStickersManager_1.default.getStickerSet(set);\r\n //console.log('got stickerSet', stickerSet, li);\r\n if (stickerSet.set.thumb) {\r\n appStickersManager_1.default.getStickerSetThumb(stickerSet.set).then((blob) => {\r\n //console.log('setting thumb', stickerSet, blob);\r\n if (stickerSet.set.pFlags.animated) { // means animated\r\n const reader = new FileReader();\r\n reader.addEventListener('loadend', (e) => __awaiter(void 0, void 0, void 0, function* () {\r\n // @ts-ignore\r\n const text = e.srcElement.result;\r\n let json = yield mtprotoworker_1.default.gzipUncompress(text, true);\r\n let animation = yield lottieLoader_1.default.loadAnimation({\r\n container: li,\r\n loop: true,\r\n autoplay: false,\r\n animationData: JSON.parse(json)\r\n }, exports.EMOTICONSSTICKERGROUP);\r\n }));\r\n reader.readAsArrayBuffer(blob);\r\n }\r\n else {\r\n let image = new Image();\r\n //image.src = URL.createObjectURL(blob);\r\n appWebpManager_1.default.polyfillImage(image, blob);\r\n li.append(image);\r\n }\r\n });\r\n }\r\n else { // as thumb will be used first sticker\r\n wrappers_1.wrapSticker(stickerSet.documents[0], li, undefined, undefined, exports.EMOTICONSSTICKERGROUP); // kostil\r\n }\r\n categoryPush(categoryDiv, stickerSet.documents, false);\r\n }\r\n }))\r\n ]).then(() => {\r\n stickersScroll.unlock('both');\r\n });\r\n };\r\n let gifsInit = () => {\r\n let contentDiv = document.getElementById('content-gifs');\r\n let masonry = contentDiv.firstElementChild;\r\n masonry.addEventListener('click', onMediaClick);\r\n let scroll = new scrollable_1.default(contentDiv, 'y', 500, 'GIFS', null);\r\n scroll.container.addEventListener('scroll', (e) => {\r\n lazyLoadQueue.check();\r\n });\r\n let width = 400;\r\n let maxSingleWidth = width - 100;\r\n let height = 100;\r\n mtprotoworker_1.default.invokeApi('messages.getSavedGifs', { hash: 0 }).then((_res) => {\r\n let res = _res;\r\n console.log('getSavedGifs res:', res);\r\n let line = [];\r\n let wastedWidth = 0;\r\n res.gifs.forEach((gif, idx) => {\r\n res.gifs[idx] = appDocsManager_1.default.saveDoc(gif);\r\n });\r\n for (let i = 0, length = res.gifs.length; i < length;) {\r\n let gif = res.gifs[i];\r\n let gifWidth = gif.w;\r\n let gifHeight = gif.h;\r\n if (gifHeight < height) {\r\n gifWidth = height / gifHeight * gifWidth;\r\n gifHeight = height;\r\n }\r\n let willUseWidth = Math.min(maxSingleWidth, width - wastedWidth, gifWidth);\r\n let { w, h } = utils_1.calcImageInBox(gifWidth, gifHeight, willUseWidth, height);\r\n /* wastedWidth += w;\r\n \r\n if(wastedWidth == width || h < height) {\r\n wastedWidth = 0;\r\n console.log('completed line', i, line);\r\n line = [];\r\n continue;\r\n }\r\n \r\n line.push(gif); */\r\n ++i;\r\n console.log('gif:', gif, w, h);\r\n let div = document.createElement('div');\r\n div.style.width = w + 'px';\r\n //div.style.height = h + 'px';\r\n div.dataset.docID = gif.id;\r\n masonry.append(div);\r\n let preloader = new preloader_1.default(div);\r\n lazyLoadQueue.push({\r\n div,\r\n load: () => {\r\n let promise = appDocsManager_1.default.downloadDoc(gif);\r\n preloader.attach(div, true, promise);\r\n promise.then(blob => {\r\n preloader.detach();\r\n div.innerHTML = ``;\r\n });\r\n return promise;\r\n }\r\n });\r\n }\r\n });\r\n gifsInit = undefined;\r\n };\r\n return { dropdown, lazyLoadQueue };\r\n};\r\nexports.default = initEmoticonsDropdown;\r\n" }, { - "id": 71, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/websocket.ts", - "name": "./src/lib/mtproto/transports/websocket.ts", - "index": 35, - "index2": 31, - "size": 6124, + "id": 72, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\bubbleGroups.ts", + "name": "./src/components/bubbleGroups.ts", + "index": 71, + "index2": 65, + "size": 6328, "cacheable": true, "built": true, "optional": false, @@ -7418,54 +7181,44 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/dcConfigurator.ts", - "issuerId": 22, - "issuerName": "./src/lib/mtproto/dcConfigurator.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "issuerId": 12, + "issuerName": "./src/lib/appManagers/appImManager.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "dependencies": 1062 } }, { - "id": 22, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", + "id": 12, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "name": "./src/lib/appManagers/appImManager.ts", "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 + "factory": 386, + "building": 1105, + "dependencies": 45 } } ], "profile": { - "factory": 20, - "building": 660, - "dependencies": 2 + "factory": 45, + "building": 1068, + "dependencies": 99 }, "failed": false, "errors": 0, @@ -7473,13 +7226,13 @@ "assets": [], "reasons": [ { - "moduleId": 22, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/dcConfigurator.ts", - "module": "./src/lib/mtproto/dcConfigurator.ts", - "moduleName": "./src/lib/mtproto/dcConfigurator.ts", + "moduleId": 12, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\appManagers\\appImManager.ts", + "module": "./src/lib/appManagers/appImManager.ts", + "moduleName": "./src/lib/appManagers/appImManager.ts", "type": "cjs require", - "userRequest": "./transports/websocket", - "loc": "6:36-69" + "userRequest": "../../components/bubbleGroups", + "loc": "29:39-79" } ], "usedExports": true, @@ -7487,16 +7240,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst transport_1 = __importDefault(require(\"./transport\"));\nconst aes_js_1 = __importDefault(require(\"aes-js\"));\nconst abridged_1 = __importDefault(require(\"./abridged\"));\nconst polyfill_1 = require(\"../../polyfill\");\nclass Obfuscation {\n init() {\n const initPayload = new Uint8Array(64);\n initPayload.randomize();\n while (true) {\n let val = (initPayload[3] << 24) | (initPayload[2] << 16) | (initPayload[1] << 8) | (initPayload[0]);\n let val2 = (initPayload[7] << 24) | (initPayload[6] << 16) | (initPayload[5] << 8) | (initPayload[4]);\n if (initPayload[0] != 0xef &&\n val != 0x44414548 &&\n val != 0x54534f50 &&\n val != 0x20544547 &&\n val != 0x4954504f &&\n val != 0xeeeeeeee &&\n val2 != 0x00000000) {\n //initPayload[56] = initPayload[57] = initPayload[58] = initPayload[59] = transport;\n break;\n }\n initPayload.randomize();\n }\n ////////////////////////initPayload.subarray(60, 62).hex = dcID;\n const reversedPayload = initPayload.slice().reverse();\n let encKey = initPayload.slice(8, 40);\n let encIv = initPayload.slice(40, 56);\n let decKey = reversedPayload.slice(8, 40);\n let decIv = reversedPayload.slice(40, 56);\n this.enc = new aes_js_1.default.ModeOfOperation.ctr(encKey, new aes_js_1.default.Counter(encIv));\n this.dec = new aes_js_1.default.ModeOfOperation.ctr(decKey, new aes_js_1.default.Counter(decIv));\n initPayload.set(abridged_1.default.obfuscateTag, 56);\n const encrypted = this.encode(initPayload);\n initPayload.set(encrypted.slice(56, 64), 56);\n return initPayload;\n }\n encode(payload) {\n return this.enc.encrypt(payload);\n }\n decode(data) {\n return this.dec.encrypt(data);\n }\n}\nexports.Obfuscation = Obfuscation;\nclass Socket extends transport_1.default {\n constructor(dcID, url) {\n super(dcID, url);\n this.pending = [];\n this.connected = false;\n this.transport = 'websocket';\n this.obfuscation = new Obfuscation();\n this.debug = false;\n this.connect = () => {\n if (this.ws) {\n this.ws.removeEventListener('open', this.handleOpen);\n this.ws.removeEventListener('close', this.handleClose);\n this.ws.removeEventListener('message', this.handleMessage);\n this.ws.close(1000);\n }\n this.ws = new WebSocket(this.url, 'binary');\n this.ws.binaryType = 'arraybuffer';\n this.ws.onopen = this.handleOpen;\n this.ws.onclose = this.handleClose;\n this.ws.onmessage = this.handleMessage;\n };\n this.handleOpen = () => {\n this.log('opened');\n this.ws.send(this.obfuscation.init());\n this.connected = true;\n this.releasePending();\n };\n this.handleClose = (event) => {\n this.log('closed', event);\n this.connected = false;\n this.pending.length = 0;\n if (this.networker) {\n this.networker.cleanupSent();\n }\n this.log('trying to reconnect...');\n this.connect();\n };\n this.handleMessage = (event) => {\n this.debug && this.log('<-', 'handleMessage', event);\n let data = this.obfuscation.decode(new Uint8Array(event.data));\n data = abridged_1.default.readPacket(data);\n if (this.networker) { // authenticated!\n //this.pending = this.pending.filter(p => p.body); // clear pending\n this.debug && this.log('redirecting to networker');\n return this.networker.parseResponse(data).then(response => {\n this.debug && this.log('redirecting to networker response:', response);\n this.networker.processMessage(response.response, response.messageID, response.sessionID);\n });\n }\n //console.log('got hex:', data.hex);\n let pending = this.pending.shift();\n if (!pending) {\n return this.log('no pending for res:', data.hex);\n }\n pending.resolve(data);\n };\n this.send = (body) => {\n this.debug && this.log('-> body length to pending:', body.length);\n if (this.networker) {\n this.pending.push({ body });\n this.releasePending();\n }\n else {\n let promise = new Promise((resolve, reject) => {\n this.pending.push({ resolve, reject, body });\n });\n this.releasePending();\n return promise;\n }\n };\n this.log = polyfill_1.logger(`WS-${dcID}`);\n this.log('constructor');\n this.connect();\n }\n releasePending() {\n if (!this.connected) {\n //this.connect();\n return;\n }\n let length = this.pending.length;\n for (let i = length - 1; i >= 0; --i) {\n let pending = this.pending[i];\n let { body } = pending;\n if (body) {\n let toEncode = abridged_1.default.encodePacket(body);\n //console.log('send before obf:', /* body.hex, nonce.hex, */ toEncode.hex);\n let enc = this.obfuscation.encode(toEncode);\n //console.log('send after obf:', enc.hex);\n this.debug && this.log('-> body length to send:', enc.length);\n this.ws.send(enc);\n if (!pending.resolve) { // remove if no response needed\n this.pending.splice(i, 1);\n }\n delete pending.body;\n }\n }\n }\n}\nexports.default = Socket;\n" + "depth": 3, + "source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst utils_1 = require(\"../lib/utils\");\r\nclass BubbleGroups {\r\n constructor() {\r\n this.bubblesByGroups = []; // map to group\r\n this.groups = [];\r\n //updateRAFs: Map = new Map();\r\n this.newGroupDiff = 120;\r\n }\r\n removeBubble(bubble, mid) {\r\n let details = this.bubblesByGroups.findAndSplice(g => g.mid == mid);\r\n if (details && details.group.length) {\r\n details.group.findAndSplice(d => d == bubble);\r\n if (!details.group.length) {\r\n this.groups.findAndSplice(g => g == details.group);\r\n }\r\n }\r\n }\r\n addBubble(bubble, message, reverse) {\r\n let timestamp = message.date;\r\n let fromID = message.fromID;\r\n let group;\r\n // try to find added\r\n //this.removeBubble(message.mid);\r\n if (this.bubblesByGroups.length) {\r\n if (reverse) {\r\n let g = this.bubblesByGroups[0];\r\n if (g.fromID == fromID && (g.timestamp - timestamp) < this.newGroupDiff) {\r\n group = g.group;\r\n group.unshift(bubble);\r\n }\r\n else {\r\n this.groups.unshift(group = [bubble]);\r\n }\r\n }\r\n else {\r\n let g = this.bubblesByGroups[this.bubblesByGroups.length - 1];\r\n if (g.fromID == fromID && (timestamp - g.timestamp) < this.newGroupDiff) {\r\n group = g.group;\r\n group.push(bubble);\r\n }\r\n else {\r\n this.groups.push(group = [bubble]);\r\n }\r\n }\r\n }\r\n else {\r\n this.groups.push(group = [bubble]);\r\n }\r\n //console.log('addBubble', bubble, message.mid, fromID, reverse, group);\r\n this.bubblesByGroups[reverse ? 'unshift' : 'push']({ timestamp, fromID, mid: message.mid, group });\r\n this.updateGroup(group, reverse);\r\n }\r\n setClipIfNeeded(bubble, remove = false) {\r\n //console.log('setClipIfNeeded', bubble, remove);\r\n if (bubble.classList.contains('is-message-empty') /* && !bubble.classList.contains('is-reply') */\r\n && (bubble.classList.contains('photo') || bubble.classList.contains('video'))) {\r\n let container = bubble.querySelector('.bubble__media-container');\r\n //console.log('setClipIfNeeded', bubble, remove, container);\r\n if (!container)\r\n return;\r\n Array.from(container.children).forEach(object => {\r\n if (object instanceof SVGDefsElement)\r\n return;\r\n if (remove) {\r\n object.removeAttributeNS(null, 'clip-path');\r\n }\r\n else {\r\n let clipID = container.dataset.clipID;\r\n let path = container.firstElementChild.firstElementChild.lastElementChild;\r\n let width = +object.getAttributeNS(null, 'width');\r\n let height = +object.getAttributeNS(null, 'height');\r\n let isOut = bubble.classList.contains('is-out');\r\n let isReply = bubble.classList.contains('is-reply');\r\n let d = '';\r\n //console.log('setClipIfNeeded', object, width, height, isOut);\r\n let tr, tl;\r\n if (bubble.classList.contains('forwarded') || isReply) {\r\n tr = tl = 0;\r\n }\r\n else if (isOut) {\r\n tr = bubble.classList.contains('is-group-first') ? 12 : 6;\r\n tl = 12;\r\n }\r\n else {\r\n tr = 12;\r\n tl = bubble.classList.contains('is-group-first') ? 12 : 6;\r\n }\r\n if (isOut) {\r\n d = utils_1.generatePathData(0, 0, width - 9, height, tl, tr, 0, 12);\r\n }\r\n else {\r\n d = utils_1.generatePathData(9, 0, width - 9, height, tl, tr, 12, 0);\r\n }\r\n path.setAttributeNS(null, 'd', d);\r\n object.setAttributeNS(null, 'clip-path', 'url(#' + clipID + ')');\r\n }\r\n });\r\n }\r\n }\r\n updateGroup(group, reverse = false) {\r\n /* if(this.updateRAFs.has(group)) {\r\n window.cancelAnimationFrame(this.updateRAFs.get(group));\r\n this.updateRAFs.delete(group);\r\n } */\r\n //this.updateRAFs.set(group, window.requestAnimationFrame(() => {\r\n //this.updateRAFs.delete(group);\r\n if (!group.length) {\r\n return;\r\n }\r\n let first = group[0];\r\n //appImManager.scrollPosition.prepareFor(reverse ? 'up' : 'down');\r\n //console.log('updateGroup', group, first);\r\n if (group.length == 1) {\r\n first.classList.add('is-group-first', 'is-group-last');\r\n this.setClipIfNeeded(first);\r\n return;\r\n }\r\n else {\r\n first.classList.remove('is-group-last');\r\n first.classList.add('is-group-first');\r\n this.setClipIfNeeded(first, true);\r\n }\r\n let length = group.length - 1;\r\n for (let i = 1; i < length; ++i) {\r\n let bubble = group[i];\r\n bubble.classList.remove('is-group-last', 'is-group-first');\r\n this.setClipIfNeeded(bubble, true);\r\n }\r\n let last = group[group.length - 1];\r\n last.classList.remove('is-group-first');\r\n last.classList.add('is-group-last');\r\n this.setClipIfNeeded(last);\r\n //appImManager.scrollPosition.restore();\r\n //}));\r\n }\r\n updateGroupByMessageID(mid) {\r\n let details = this.bubblesByGroups.find(g => g.mid == mid);\r\n if (details) {\r\n this.updateGroup(details.group);\r\n }\r\n }\r\n cleanup() {\r\n this.bubblesByGroups = [];\r\n /* for(let value of this.updateRAFs.values()) {\r\n window.cancelAnimationFrame(value);\r\n }\r\n this.updateRAFs.clear(); */\r\n }\r\n}\r\nexports.default = BubbleGroups;\r\n" }, { "id": 73, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/abridged.ts", - "name": "./src/lib/mtproto/transports/abridged.ts", - "index": 38, - "index2": 29, - "size": 1101, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\services.ts", + "name": "./src/lib/services.ts", + "index": 72, + "index2": 67, + "size": 3273, "cacheable": true, "built": true, "optional": false, @@ -7504,64 +7257,34 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/websocket.ts", - "issuerId": 71, - "issuerName": "./src/lib/mtproto/transports/websocket.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "issuerId": 23, + "issuerName": "./src/pages/pageIm.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 23, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "name": "./src/pages/pageIm.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 1, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiManager.ts", - "name": "./src/lib/mtproto/apiManager.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 - } - }, - { - "id": 22, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/dcConfigurator.ts", - "name": "./src/lib/mtproto/dcConfigurator.ts", - "profile": { - "factory": 196, - "building": 1089, - "dependencies": 820 - } - }, - { - "id": 71, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/websocket.ts", - "name": "./src/lib/mtproto/transports/websocket.ts", - "profile": { - "factory": 20, - "building": 660, - "dependencies": 2 + "dependencies": 1062 } } ], "profile": { - "factory": 803, - "building": 43, - "dependencies": 0 + "factory": 386, + "building": 1105, + "dependencies": 45 }, "failed": false, "errors": 0, @@ -7569,13 +7292,13 @@ "assets": [], "reasons": [ { - "moduleId": 71, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/transports/websocket.ts", - "module": "./src/lib/mtproto/transports/websocket.ts", - "moduleName": "./src/lib/mtproto/transports/websocket.ts", + "moduleId": 23, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageIm.ts", + "module": "./src/pages/pageIm.ts", + "moduleName": "./src/pages/pageIm.ts", "type": "cjs require", - "userRequest": "./abridged", - "loc": "8:35-56" + "userRequest": "../lib/services", + "loc": "54:46-72" } ], "usedExports": true, @@ -7583,16 +7306,16 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 5, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst bin_utils_1 = require(\"../../bin_utils\");\nclass AbridgedPacketCodec {\n constructor() {\n this.tag = 0xef;\n this.obfuscateTag = new Uint8Array([this.tag, this.tag, this.tag, this.tag]);\n }\n encodePacket(data) {\n let len = data.byteLength >> 2;\n let header;\n if (len < 127) {\n header = new Uint8Array([len]);\n }\n else {\n header = new Uint8Array([0x7f, ...bin_utils_1.addPadding(bin_utils_1.bytesFromHex(len.toString(16)).reverse(), 3, true) /* .reverse() */]);\n //console.log('got nobody cause im braindead', header, len);\n }\n return new Uint8Array([...header, ...data]);\n }\n readPacket(data) {\n let length = data[0];\n if (length >= 127) { // 0x7f\n length = data[1] | (data[2] << 8) | (data[3] << 16);\n return data.slice(4, length << 2 + 1); // need +1\n }\n return data.slice(1, length << 2 + 1); // need +1\n }\n}\nexports.default = new AbridgedPacketCodec();\n" + "depth": 2, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconsole.log('Services included!');\r\nconst appUsersManager_1 = __importDefault(require(\"./appManagers/appUsersManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appManagers/appChatsManager\"));\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appManagers/appMessagesIDsManager\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./appManagers/apiUpdatesManager\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appManagers/appPhotosManager\"));\r\nconst appDialogsManager_1 = __importDefault(require(\"./appManagers/appDialogsManager\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"./appManagers/appMessagesManager\"));\r\nconst appProfileManager_1 = __importDefault(require(\"./appManagers/appProfileManager\"));\r\nconst appImManager_1 = __importDefault(require(\"./appManagers/appImManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appManagers/appPeersManager\"));\r\nconst appStickersManager_1 = __importDefault(require(\"./appManagers/appStickersManager\"));\r\nconst appDocsManager_1 = __importDefault(require(\"./appManagers/appDocsManager\"));\r\nconst appSidebarRight_1 = __importDefault(require(\"./appManagers/appSidebarRight\"));\r\nconst appSidebarLeft_1 = __importDefault(require(\"./appManagers/appSidebarLeft\"));\r\nconst appMediaViewer_1 = __importDefault(require(\"./appManagers/appMediaViewer\"));\r\n//import AppSharedMediaManager from './appManagers/appSharedMediaManager';\r\nexports.appUsersManager = appUsersManager_1.default;\r\nexports.appChatsManager = appChatsManager_1.default;\r\nexports.appMessagesIDsManager = appMessagesIDsManager_1.default;\r\nexports.apiUpdatesManager = apiUpdatesManager_1.default;\r\nexports.appPhotosManager = appPhotosManager_1.default;\r\nexports.appMessagesManager = appMessagesManager_1.default;\r\nexports.appProfileManager = appProfileManager_1.default;\r\nexports.appImManager = appImManager_1.default;\r\nexports.appPeersManager = appPeersManager_1.default;\r\nexports.appStickersManager = appStickersManager_1.default;\r\nexports.appDocsManager = appDocsManager_1.default;\r\n//export const appSharedMediaManager = AppSharedMediaManager;\r\nexports.appSidebarRight = appSidebarRight_1.default;\r\nexports.appSidebarLeft = appSidebarLeft_1.default;\r\nexports.appMediaViewer = appMediaViewer_1.default;\r\nexports.appDialogsManager = appDialogsManager_1.default;\r\nwindow.Services = {\r\n appUsersManager: exports.appUsersManager,\r\n appChatsManager: exports.appChatsManager,\r\n apiUpdatesManager: exports.apiUpdatesManager,\r\n appMessagesManager: exports.appMessagesManager,\r\n appPeersManager: exports.appPeersManager,\r\n appProfileManager: exports.appProfileManager,\r\n appPhotosManager: exports.appPhotosManager,\r\n appDocsManager: exports.appDocsManager,\r\n appDialogsManager: exports.appDialogsManager,\r\n appImManager: exports.appImManager,\r\n appStickersManager: exports.appStickersManager,\r\n appSidebarRight: exports.appSidebarRight,\r\n appSidebarLeft: exports.appSidebarLeft,\r\n appMediaViewer: exports.appMediaViewer\r\n //appSharedMediaManager\r\n};\r\n" }, { "id": 74, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/idb.ts", - "name": "./src/lib/idb.ts", - "index": 47, - "index2": 42, - "size": 8812, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pagePassword.ts", + "name": "./src/pages/pagePassword.ts", + "index": 73, + "index2": 70, + "size": 4547, "cacheable": true, "built": true, "optional": false, @@ -7600,63 +7323,43 @@ "chunks": [ 0 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiFileManager.ts", - "issuerId": 9, - "issuerName": "./src/lib/mtproto/apiFileManager.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "issuerId": 62, + "issuerName": "./src/pages/pageAuthCode.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", + "id": 62, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "name": "./src/pages/pageAuthCode.ts", "profile": { - "factory": 392, - "building": 505, + "factory": 527, + "building": 1006, "dependencies": 2 } - }, - { - "id": 78, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "name": "./src/components/pageSignUp.ts", - "profile": { - "factory": 278, - "building": 994, - "dependencies": 0 - } - }, - { - "id": 9, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiFileManager.ts", - "name": "./src/lib/mtproto/apiFileManager.ts", - "profile": { - "factory": 1027, - "building": 121, - "dependencies": 1 - } } ], "profile": { - "factory": 630, - "building": 30, + "factory": 913, + "building": 92, "dependencies": 0 }, "failed": false, @@ -7665,13 +7368,13 @@ "assets": [], "reasons": [ { - "moduleId": 9, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/mtproto/apiFileManager.ts", - "module": "./src/lib/mtproto/apiFileManager.ts", - "moduleName": "./src/lib/mtproto/apiFileManager.ts", + "moduleId": 62, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageAuthCode.ts", + "module": "./src/pages/pageAuthCode.ts", + "moduleName": "./src/pages/pageAuthCode.ts", "type": "cjs require", - "userRequest": "../idb", - "loc": "16:30-47" + "userRequest": "./pagePassword", + "loc": "9:39-64" } ], "usedExports": true, @@ -7679,51 +7382,63 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 5, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst bin_utils_1 = require(\"./bin_utils\");\nconst filemanager_1 = __importDefault(require(\"./filemanager\"));\nclass IdbFileStorage {\n constructor() {\n this.dbName = 'cachedFiles';\n this.dbStoreName = 'files';\n this.dbVersion = 2;\n this.name = 'IndexedDB';\n // @ts-ignore\n //window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB;\n // @ts-ignore\n window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.OIDBTransaction || window.msIDBTransaction;\n this.storageIsAvailable = window.indexedDB !== undefined && window.IDBTransaction !== undefined;\n // IndexedDB is REALLY slow without blob support in Safari 8, no point in it\n if (this.storageIsAvailable &&\n navigator.userAgent.indexOf('Safari') != -1 &&\n navigator.userAgent.indexOf('Chrome') == -1 &&\n navigator.userAgent.match(/Version\\/[678]/)) {\n this.storageIsAvailable = false;\n }\n this.storeBlobsAvailable = this.storageIsAvailable || false;\n this.openDatabase();\n }\n isAvailable() {\n return this.storageIsAvailable;\n }\n openDatabase() {\n if (this.openDbPromise) {\n return this.openDbPromise;\n }\n var createObjectStore;\n try {\n var request = indexedDB.open(this.dbName, this.dbVersion);\n createObjectStore = (db) => {\n db.createObjectStore(this.dbStoreName);\n };\n if (!request) {\n throw new Error();\n }\n }\n catch (error) {\n console.error('error opening db', error.message);\n this.storageIsAvailable = false;\n return Promise.reject(error);\n }\n var finished = false;\n setTimeout(() => {\n if (!finished) {\n request.onerror({ type: 'IDB_CREATE_TIMEOUT' });\n }\n }, 3000);\n return this.openDbPromise = new Promise((resolve, reject) => {\n request.onsuccess = (event) => {\n finished = true;\n var db = request.result;\n db.onerror = (error) => {\n this.storageIsAvailable = false;\n console.error('Error creating/accessing IndexedDB database', error);\n reject(error);\n };\n resolve(db);\n };\n request.onerror = (event) => {\n finished = true;\n this.storageIsAvailable = false;\n console.error('Error creating/accessing IndexedDB database', event);\n reject(event);\n };\n request.onupgradeneeded = (event) => {\n finished = true;\n console.warn('performing idb upgrade from', event.oldVersion, 'to', event.newVersion);\n // @ts-ignore\n var db = event.target.result;\n if (event.oldVersion == 1) {\n db.deleteObjectStore(this.dbStoreName);\n }\n createObjectStore(db);\n };\n });\n }\n deleteFile(fileName) {\n return this.openDatabase().then((db) => {\n try {\n // @ts-ignore\n var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ_WRITE || 'readwrite')\n .objectStore(this.dbStoreName);\n console.log('Delete file: `' + fileName + '`');\n var request = objectStore.delete(fileName);\n }\n catch (error) {\n return Promise.reject(error);\n }\n return new Promise((resolve, reject) => {\n request.onsuccess = function (event) {\n console.log('deleted file', event);\n resolve();\n };\n request.onerror = function (error) {\n reject(error);\n };\n });\n });\n }\n saveFile(fileName, blob) {\n return this.openDatabase().then((db) => {\n if (!this.storeBlobsAvailable) {\n return this.saveFileBase64(db, fileName, blob);\n }\n if (!(blob instanceof Blob)) {\n blob = bin_utils_1.blobConstruct([blob]);\n }\n try {\n // @ts-ignore\n var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ_WRITE || 'readwrite')\n .objectStore(this.dbStoreName);\n var request = objectStore.put(blob, fileName);\n }\n catch (error) {\n if (this.storeBlobsAvailable) {\n this.storeBlobsAvailable = false;\n return this.saveFileBase64(db, fileName, blob);\n }\n this.storageIsAvailable = false;\n return Promise.reject(error);\n }\n return new Promise((resolve, reject) => {\n request.onsuccess = function (event) {\n resolve(blob);\n };\n request.onerror = function (error) {\n reject(error);\n };\n });\n });\n }\n saveFileBase64(db, fileName, blob) {\n if (this.getBlobSize(blob) > 10 * 1024 * 1024) {\n return Promise.reject();\n }\n if (!(blob instanceof Blob)) {\n var safeMimeType = bin_utils_1.blobSafeMimeType(blob.type || 'image/jpeg');\n var address = 'data:' + safeMimeType + ';base64,' + bin_utils_1.bytesToBase64(blob);\n return this.storagePutB64String(db, fileName, address).then(() => {\n return blob;\n });\n }\n try {\n var reader = new FileReader();\n }\n catch (e) {\n this.storageIsAvailable = false;\n return Promise.reject();\n }\n let promise = new Promise((resolve, reject) => {\n reader.onloadend = () => {\n this.storagePutB64String(db, fileName, reader.result).then(() => {\n resolve(blob);\n }, reject);\n };\n reader.onerror = reject;\n });\n try {\n reader.readAsDataURL(blob);\n }\n catch (e) {\n this.storageIsAvailable = false;\n return Promise.reject();\n }\n return promise;\n }\n storagePutB64String(db, fileName, b64string) {\n try {\n // @ts-ignore\n var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ_WRITE || 'readwrite')\n .objectStore(this.dbStoreName);\n var request = objectStore.put(b64string, fileName);\n }\n catch (error) {\n this.storageIsAvailable = false;\n return Promise.reject(error);\n }\n return new Promise((resolve, reject) => {\n request.onsuccess = function (event) {\n resolve();\n };\n request.onerror = reject;\n });\n }\n getBlobSize(blob) {\n return blob.size || blob.byteLength || blob.length;\n }\n getFile(fileName, size) {\n return this.openDatabase().then((db) => {\n // @ts-ignore\n var objectStore = db.transaction([this.dbStoreName], IDBTransaction.READ || 'readonly')\n .objectStore(this.dbStoreName);\n var request = objectStore.get(fileName);\n return new Promise((resolve, reject) => {\n request.onsuccess = function (event) {\n // @ts-ignore\n var result = event.target.result;\n if (result === undefined) {\n reject();\n }\n else if (typeof result === 'string' &&\n result.substr(0, 5) === 'data:') {\n resolve(bin_utils_1.dataUrlToBlob(result));\n }\n else {\n resolve(result);\n }\n };\n request.onerror = reject;\n });\n });\n }\n getFileWriter(fileName, mimeType) {\n var fakeWriter = filemanager_1.default.getFakeFileWriter(mimeType, (blob) => {\n this.saveFile(fileName, blob);\n });\n return Promise.resolve(fakeWriter);\n }\n}\nconst idbFileStorage = new IdbFileStorage();\nwindow.IdbFileStorage = idbFileStorage;\nexports.default = idbFileStorage;\n" - }, + "depth": 3, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst pageIm_1 = __importDefault(require(\"./pageIm\"));\r\n//import CryptoWorker from '../lib/crypto/cryptoworker';\r\n//import apiManager from '../lib/mtproto/apiManager';\r\nconst misc_1 = require(\"../components/misc\");\r\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\n//import passwordManager from '../lib/mtproto/passwordManager';\r\nconst mtprotoworker_1 = __importDefault(require(\"../lib/mtproto/mtprotoworker\"));\r\nconst page_1 = __importDefault(require(\"./page\"));\r\nlet onFirstMount = () => {\r\n let needFrame = 0;\r\n let animation = /* AnimationItem */ undefined;\r\n let passwordVisible = false;\r\n const btnNext = page.pageEl.querySelector('button');\r\n const passwordInput = document.getElementById('password');\r\n //const passwordInputLabel = passwordInput.nextElementSibling as HTMLLabelElement;\r\n const toggleVisible = page.pageEl.querySelector('.toggle-visible');\r\n let handleError = (err) => {\r\n btnNext.removeAttribute('disabled');\r\n switch (err.type) {\r\n default:\r\n btnNext.innerText = err.type;\r\n break;\r\n }\r\n };\r\n toggleVisible.addEventListener('click', function (e) {\r\n if (!passwordVisible) {\r\n this.classList.add('tgico-eye2');\r\n passwordInput.setAttribute('type', 'text');\r\n animation.setDirection(-1);\r\n needFrame = 0;\r\n animation.play();\r\n }\r\n else {\r\n this.classList.remove('tgico-eye2');\r\n passwordInput.setAttribute('type', 'password');\r\n animation.setDirection(1);\r\n needFrame = 49;\r\n animation.play();\r\n }\r\n passwordVisible = !passwordVisible;\r\n });\r\n btnNext.addEventListener('click', function (e) {\r\n if (!passwordInput.value.length) {\r\n passwordInput.classList.add('error');\r\n return;\r\n }\r\n this.setAttribute('disabled', 'true');\r\n let value = passwordInput.value;\r\n this.textContent = 'PLEASE WAIT...';\r\n misc_1.putPreloader(this);\r\n mtprotoworker_1.default.checkPassword(value).then((response) => {\r\n console.log('passwordManager response:', response);\r\n switch (response._) {\r\n case 'auth.authorization':\r\n mtprotoworker_1.default.setUserAuth({\r\n id: response.user.id\r\n });\r\n pageIm_1.default.mount();\r\n if (animation)\r\n animation.destroy();\r\n break;\r\n default:\r\n btnNext.removeAttribute('disabled');\r\n btnNext.innerText = response._;\r\n break;\r\n }\r\n }).catch(handleError);\r\n });\r\n passwordInput.addEventListener('keypress', function (e) {\r\n this.classList.remove('error');\r\n if (e.key == 'Enter') {\r\n return btnNext.click();\r\n }\r\n });\r\n /* passwordInput.addEventListener('input', function(this, e) {\r\n \r\n }); */\r\n return Promise.all([\r\n lottieLoader_1.default.loadLottie(),\r\n fetch('assets/img/TwoFactorSetupMonkeyClose.tgs')\r\n .then(res => res.arrayBuffer())\r\n .then(data => mtprotoworker_1.default.gzipUncompress(data, true))\r\n .then(str => lottieLoader_1.default.loadAnimation({\r\n container: page.pageEl.querySelector('.auth-image'),\r\n renderer: 'svg',\r\n loop: false,\r\n autoplay: false,\r\n animationData: JSON.parse(str)\r\n }))\r\n .then(_animation => {\r\n animation = _animation;\r\n animation.addEventListener('enterFrame', (e) => {\r\n //console.log('enterFrame', e, needFrame);\r\n let currentFrame = Math.round(e.currentTime);\r\n if ((e.direction == 1 && currentFrame >= needFrame) ||\r\n (e.direction == -1 && currentFrame <= needFrame)) {\r\n animation.setSpeed(1);\r\n animation.pause();\r\n }\r\n });\r\n needFrame = 49;\r\n animation.play();\r\n })\r\n ]);\r\n};\r\nconst page = new page_1.default('page-password', true, onFirstMount);\r\nexports.default = page;\r\n" + } + ], + "filteredModules": 0, + "origins": [ { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", - "index": 53, - "index2": 81, - "size": 10348, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "issuerId": 40, - "issuerName": "./src/components/pageSignIn.ts", - "issuerPath": [ - { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 41, - "building": 1632 - } - }, - { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", - "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 - } - } + "module": "", + "moduleIdentifier": "", + "moduleName": "", + "loc": "index", + "request": "./src/index.ts", + "reasons": [] + } + ] + }, + { + "id": 1, + "rendered": true, + "initial": true, + "entry": true, + "size": 466, + "names": [ + "lottie" + ], + "files": [ + "lottie.bundle.js" + ], + "hash": "c1a64c5ffa4519eee558", + "siblings": [ + 3 + ], + "parents": [], + "children": [], + "childrenByOrder": {}, + "modules": [ + { + "id": 81, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\lottie.ts", + "name": "./src/lib/lottie.ts", + "index": 81, + "index2": 82, + "size": 466, + "cacheable": true, + "built": true, + "optional": false, + "prefetched": false, + "chunks": [ + 1 ], + "issuer": null, + "issuerId": null, + "issuerName": null, + "issuerPath": null, "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 + "factory": 141, + "building": 1476 }, "failed": false, "errors": 0, @@ -7731,13 +7446,13 @@ "assets": [], "reasons": [ { - "moduleId": 40, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "module": "./src/components/pageSignIn.ts", - "moduleName": "./src/components/pageSignIn.ts", - "type": "cjs require", - "userRequest": "./pageAuthCode", - "loc": "18:39-64" + "moduleId": null, + "moduleIdentifier": null, + "module": null, + "moduleName": null, + "type": "single entry", + "userRequest": "./src/lib/lottie.ts", + "loc": "lottie" } ], "usedExports": true, @@ -7745,61 +7460,105 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 2, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst pageSignIn_1 = __importDefault(require(\"./pageSignIn\"));\nconst pageSignUp_1 = __importDefault(require(\"./pageSignUp\"));\nconst pageIm_1 = __importDefault(require(\"./pageIm\"));\nconst pagePassword_1 = __importDefault(require(\"./pagePassword\"));\nconst cryptoworker_1 = __importDefault(require(\"../lib/crypto/cryptoworker\"));\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\nconst apiManager_1 = __importDefault(require(\"../lib/mtproto/apiManager\"));\nlet installed = false;\nlet authCode = null;\nconst EDITONSAMEPAGE = false;\nexports.default = (_authCode) => __awaiter(void 0, void 0, void 0, function* () {\n authCode = _authCode;\n //let LottieLoader = (await import('../lib/lottieLoader')).default;\n let pageElement = document.body.getElementsByClassName('page-authCode')[0];\n pageElement.style.display = '';\n let headerElement = pageElement.getElementsByClassName('phone')[0];\n headerElement.innerText = authCode.phone_number;\n let sentTypeElement = pageElement.getElementsByClassName('sent-type')[0];\n switch (authCode.type._) {\n case 'auth.sentCodeTypeSms':\n sentTypeElement.innerHTML = 'We have sent you an SMS
with the code.';\n break;\n case 'auth.sentCodeTypeApp':\n sentTypeElement.innerHTML = 'We have sent you a message in Telegram
with the code.';\n break;\n case 'auth.sentCodeTypeCall':\n sentTypeElement.innerHTML = 'We will call you and voice
the code.';\n break;\n default:\n sentTypeElement.innerHTML = `Please check everything
for a code (type: ${authCode.type._})`;\n break;\n }\n if (installed)\n return;\n installed = true;\n let needFrame = 0, lastLength = 0;\n let animation = /* AnimationItem */ undefined;\n const CODELENGTH = authCode.type.length;\n fetch('assets/img/TwoFactorSetupMonkeyTracking.tgs')\n .then(res => res.arrayBuffer())\n .then((data) => __awaiter(void 0, void 0, void 0, function* () {\n let str = yield cryptoworker_1.default.gzipUncompress(data, true);\n animation = yield lottieLoader_1.default.loadAnimation({\n container: document.body.querySelector('.page-authCode .auth-image'),\n renderer: 'svg',\n loop: false,\n autoplay: false,\n animationData: JSON.parse(str)\n });\n animation.setSpeed(1);\n //console.log(animation.getDuration(), animation.getDuration(true));\n animation.addEventListener('enterFrame', (e) => {\n //console.log('enterFrame', e, needFrame);\n let currentFrame = Math.round(e.currentTime);\n if ((e.direction == 1 && currentFrame >= needFrame) ||\n (e.direction == -1 && currentFrame <= needFrame)) {\n animation.setSpeed(1);\n animation.pause();\n }\n });\n }));\n const codeInput = document.getElementById('code');\n const codeInputLabel = codeInput.nextElementSibling;\n const editButton = document.querySelector('.phone-edit');\n if (EDITONSAMEPAGE) {\n let editable = false;\n let changePhonePromise;\n let changePhone = () => {\n if (changePhonePromise)\n return;\n let phone_number = '+' + headerElement.innerText.replace(/\\D/g, '');\n if (authCode.phone_number == phone_number)\n return;\n codeInput.setAttribute('disabled', 'true');\n changePhonePromise = apiManager_1.default.invokeApi('auth.sendCode', {\n /* flags: 0, */\n phone_number: phone_number,\n api_id: Config.App.id,\n api_hash: Config.App.hash,\n settings: {\n _: 'codeSettings',\n flags: 0\n }\n /* lang_code: navigator.language || 'en' */\n }).then((code) => {\n console.log('got code 2', code);\n authCode = Object.assign(code, { phone_number });\n changePhonePromise = undefined;\n codeInput.removeAttribute('disabled');\n codeInput.focus();\n }).catch(err => {\n switch (err.type) {\n case 'PHONE_NUMBER_INVALID':\n headerElement.classList.add('error');\n editable = true;\n headerElement.setAttribute('contenteditable', '' + editable);\n headerElement.focus();\n break;\n default:\n codeInputLabel.innerText = err.type;\n break;\n }\n changePhonePromise = undefined;\n codeInput.removeAttribute('disabled');\n });\n };\n headerElement.addEventListener('keypress', function (e) {\n if (e.key == 'Enter') {\n editable = false;\n headerElement.setAttribute('contenteditable', '' + editable);\n changePhone();\n }\n if (/\\D/.test(e.key)) {\n e.preventDefault();\n return false;\n }\n this.classList.remove('error');\n });\n editButton.addEventListener('click', function () {\n if (changePhonePromise)\n return;\n editable = !editable;\n headerElement.setAttribute('contenteditable', '' + editable);\n if (!editable)\n changePhone();\n });\n }\n else {\n editButton.addEventListener('click', function () {\n pageElement.style.display = 'none';\n return pageSignIn_1.default();\n });\n }\n let submitCode = (code) => {\n codeInput.setAttribute('disabled', 'true');\n let params = {\n phone_number: authCode.phone_number,\n phone_code_hash: authCode.phone_code_hash,\n phone_code: code\n };\n console.log('invoking auth.signIn with params:', params);\n apiManager_1.default.invokeApi('auth.signIn', params)\n .then((response) => {\n console.log('auth.signIn response:', response);\n switch (response._) {\n case 'auth.authorization':\n apiManager_1.default.setUserAuth({\n id: response.user.id\n });\n pageElement.style.display = 'none';\n pageIm_1.default();\n if (animation)\n animation.destroy();\n break;\n case 'auth.authorizationSignUpRequired':\n console.log('Registration needed!');\n pageElement.style.display = 'none';\n pageSignUp_1.default({\n 'phone_number': authCode.phone_number,\n 'phone_code_hash': authCode.phone_code_hash\n });\n if (animation)\n animation.destroy();\n break;\n default:\n codeInput.innerText = response._;\n break;\n }\n }).catch(err => {\n codeInput.removeAttribute('disabled');\n switch (err.type) {\n case 'SESSION_PASSWORD_NEEDED':\n console.warn('pageAuthCode: SESSION_PASSWORD_NEEDED');\n err.handled = true;\n pageElement.style.display = 'none';\n if (animation)\n animation.destroy();\n pagePassword_1.default();\n break;\n case 'PHONE_CODE_EMPTY':\n case 'PHONE_CODE_INVALID':\n codeInput.classList.add('error');\n codeInputLabel.innerText = 'Invalid Code';\n break;\n default:\n codeInputLabel.innerText = err.type;\n break;\n }\n });\n };\n const max = 45;\n // 1st symbol = frame 15\n // end symbol = frame 165\n codeInput.addEventListener('input', function (e) {\n this.classList.remove('error');\n this.value = this.value.replace(/\\D/g, '');\n if (this.value.length > CODELENGTH) {\n this.value = this.value.slice(0, CODELENGTH);\n }\n let length = this.value.length;\n if (length == CODELENGTH) { // submit code\n submitCode(this.value);\n }\n else if (length == lastLength) {\n return;\n }\n lastLength = length;\n if (!animation)\n return;\n let frame;\n if (length)\n frame = Math.round((length > max ? max : length) * (165 / max) + 11.33);\n else\n frame = 0;\n //animation.playSegments([1, 2]);\n let direction = needFrame > frame ? -1 : 1;\n //console.log('keydown', length, frame, direction);\n // @ts-ignore\n animation.setDirection(direction);\n if (needFrame != 0 && frame == 0) {\n animation.setSpeed(7);\n }\n /* let diff = Math.abs(needFrame - frame * direction);\n if((diff / 20) > 1) animation.setSpeed(diff / 20 | 0); */\n needFrame = frame;\n animation.play();\n /* animation.goToAndStop(15, true); */\n //animation.goToAndStop(length / max * );\n });\n});\n" - }, + "depth": 0, + "source": "\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n// @ts-ignore\r\nconst lottie_canvas_min_js_1 = __importDefault(require(\"lottie-web/build/player/lottie_canvas.min.js\"));\r\n//import LottiePlayer from \"lottie-web/build/player/lottie_light.min.js\";\r\nwindow.lottie = lottie_canvas_min_js_1.default;\r\n" + } + ], + "filteredModules": 0, + "origins": [ { - "id": 78, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "name": "./src/components/pageSignUp.ts", - "index": 54, - "index2": 79, - "size": 6341, + "module": "", + "moduleIdentifier": "", + "moduleName": "", + "loc": "lottie", + "request": "./src/lib/lottie.ts", + "reasons": [] + } + ] + }, + { + "id": 2, + "rendered": true, + "initial": true, + "entry": false, + "reason": "split chunk (cache group: vendor) (name: npm.jsbn)", + "size": 42308, + "names": [ + "npm.jsbn" + ], + "files": [ + "npm.jsbn.chunk.js" + ], + "hash": "348a0325f3a11c020173", + "siblings": [ + 0, + 5 + ], + "parents": [], + "children": [], + "childrenByOrder": {}, + "modules": [ + { + "id": 36, + "identifier": "F:\\tweb\\node_modules\\jsbn\\index.js", + "name": "./node_modules/jsbn/index.js", + "index": 29, + "index2": 24, + "size": 42308, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ - 0 + 2 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "issuerId": 77, - "issuerName": "./src/components/pageAuthCode.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\polyfill.ts", + "issuerId": 9, + "issuerName": "./src/lib/polyfill.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", + "id": 35, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\pages\\pageSignIn.ts", + "name": "./src/pages/pageSignIn.ts", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 + "dependencies": 1062 } }, { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", + "id": 8, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\components\\scrollable.ts", + "name": "./src/components/scrollable.ts", "profile": { - "factory": 392, - "building": 505, + "factory": 527, + "building": 1006, "dependencies": 2 } + }, + { + "id": 9, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\polyfill.ts", + "name": "./src/lib/polyfill.ts", + "profile": { + "factory": 1401, + "building": 7, + "dependencies": 194 + } } ], "profile": { - "factory": 278, - "building": 994, - "dependencies": 0 + "factory": 1512, + "building": 42 }, "failed": false, "errors": 0, @@ -7807,13 +7566,22 @@ "assets": [], "reasons": [ { - "moduleId": 77, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "module": "./src/components/pageAuthCode.ts", - "moduleName": "./src/components/pageAuthCode.ts", + "moduleId": 9, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\polyfill.ts", + "module": "./src/lib/polyfill.ts", + "moduleName": "./src/lib/polyfill.ts", "type": "cjs require", - "userRequest": "./pageSignUp", - "loc": "16:37-60" + "userRequest": "jsbn", + "loc": "5:15-30" + }, + { + "moduleId": 10, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\bin_utils.ts", + "module": "./src/lib/bin_utils.ts", + "moduleName": "./src/lib/bin_utils.ts", + "type": "cjs require", + "userRequest": "jsbn", + "loc": "13:15-30" } ], "usedExports": true, @@ -7821,71 +7589,74 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 3, - "source": "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst misc_1 = require(\"./misc\");\nlet installed = false;\nlet authCode = null;\nconst cropper_1 = __importDefault(require(\"../lib/cropper\"));\nconst pageIm_1 = __importDefault(require(\"./pageIm\"));\nconst apiManager_1 = __importDefault(require(\"../lib/mtproto/apiManager\"));\nconst apiFileManager_1 = __importDefault(require(\"../lib/mtproto/apiFileManager\"));\nexports.default = (_authCode) => {\n authCode = _authCode;\n if (installed)\n return;\n installed = true;\n let pageElement = document.body.getElementsByClassName('page-signUp')[0];\n pageElement.style.display = '';\n const avatarInput = document.getElementById('avatar-input');\n const avatarPopup = pageElement.getElementsByClassName('popup-avatar')[0];\n const avatarPreview = pageElement.querySelector('#canvas-avatar');\n const cropContainer = avatarPopup.getElementsByClassName('crop')[0];\n let avatarImage = new Image();\n cropContainer.append(avatarImage);\n let avatarBlob;\n avatarPopup.getElementsByClassName('popup-close')[0]\n .addEventListener('click', function (e) {\n /* let popup = findUpClassName(this, 'popup');\n popup.classList.remove('active'); */\n setTimeout(() => {\n cropper.removeHandlers();\n if (avatarImage) {\n avatarImage.remove();\n }\n }, 200);\n /* e.cancelBubble = true;\n return false; */\n });\n let cropper = {\n crop: () => { },\n removeHandlers: () => { }\n };\n // apply\n avatarPopup.getElementsByClassName('btn-crop')[0].addEventListener('click', () => {\n cropper.crop();\n avatarPopup.classList.remove('active');\n cropper.removeHandlers();\n avatarPreview.toBlob(blob => {\n avatarBlob = blob; // save blob to send after reg\n // darken\n let ctx = avatarPreview.getContext('2d');\n ctx.fillStyle = \"rgba(0, 0, 0, 0.3)\";\n ctx.fillRect(0, 0, avatarPreview.width, avatarPreview.height);\n }, 'image/jpeg', 1);\n avatarImage.remove();\n });\n avatarInput.addEventListener('change', (e) => {\n var file = e.target.files[0];\n if (!file) {\n return;\n }\n var reader = new FileReader();\n reader.onload = (e) => {\n var contents = e.target.result;\n avatarImage = new Image();\n cropContainer.append(avatarImage);\n avatarImage.src = contents;\n avatarImage.onload = () => {\n cropper = cropper_1.default(avatarImage, avatarPreview);\n avatarInput.value = '';\n };\n avatarPopup.classList.add('active');\n };\n reader.readAsDataURL(file);\n }, false);\n pageElement.querySelector('.auth-image').addEventListener('click', () => {\n avatarInput.click();\n });\n const headerName = pageElement.getElementsByClassName('fullName')[0];\n let handleInput = function (e) {\n let name = fieldName.value || '';\n let lastName = fieldLastName.value || '';\n let fullName = name || lastName\n ? (name + ' ' + lastName).trim()\n : 'Your Name';\n if (headerName.innerText != fullName)\n headerName.innerText = fullName;\n this.classList.remove('error');\n };\n let sendAvatar = () => new Promise((resolve, reject) => {\n if (!avatarBlob) {\n console.log('User has not selected avatar');\n return resolve();\n }\n console.log('invoking uploadFile...');\n apiFileManager_1.default.uploadFile(avatarBlob).then((inputFile) => {\n console.log('uploaded smthn', inputFile);\n apiManager_1.default.invokeApi('photos.uploadProfilePhoto', {\n file: inputFile\n }).then((updateResult) => {\n console.log('updated photo!');\n resolve();\n }, reject);\n }, reject);\n });\n const fieldName = document.getElementById('name');\n fieldName.addEventListener('input', handleInput);\n const fieldLastName = document.getElementById('lastName');\n fieldLastName.addEventListener('input', handleInput);\n const signUpButton = document.getElementById('signUp');\n signUpButton.addEventListener('click', function (e) {\n this.setAttribute('disabled', 'true');\n if (!fieldName.value.length) {\n fieldName.classList.add('error');\n return false;\n }\n let name = fieldName.value;\n let lastName = fieldLastName.value;\n let params = {\n 'phone_number': authCode.phone_number,\n 'phone_code_hash': authCode.phone_code_hash,\n 'first_name': name,\n 'last_name': lastName\n };\n console.log('invoking auth.signUp with params:', params);\n this.textContent = 'PLEASE WAIT...';\n misc_1.putPreloader(this);\n apiManager_1.default.invokeApi('auth.signUp', params)\n .then((response) => {\n console.log('auth.signUp response:', response);\n switch (response._) {\n case 'auth.authorization': // success\n apiManager_1.default.setUserAuth({\n id: response.user.id\n });\n sendAvatar().then(() => {\n pageElement.style.display = 'none';\n pageIm_1.default();\n }, () => {\n pageElement.style.display = 'none';\n pageIm_1.default();\n });\n break;\n default:\n this.innerText = response._;\n break;\n }\n /* (document.body.getElementsByClassName('page-sign')[0] as HTMLDivElement).style.display = 'none';\n pageAuthCode(Object.assign(code, {phoneNumber})); */\n }).catch(err => {\n this.removeAttribute('disabled');\n switch (err.type) {\n default:\n this.innerText = err.type;\n break;\n }\n });\n });\n};\n" - }, + "depth": 4, + "source": "(function(){\n\n // Copyright (c) 2005 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Basic JavaScript BN library - subset useful for RSA encryption.\n\n // Bits per digit\n var dbits;\n\n // JavaScript engine analysis\n var canary = 0xdeadbeefcafe;\n var j_lm = ((canary&0xffffff)==0xefcafe);\n\n // (public) Constructor\n function BigInteger(a,b,c) {\n if(a != null)\n if(\"number\" == typeof a) this.fromNumber(a,b,c);\n else if(b == null && \"string\" != typeof a) this.fromString(a,256);\n else this.fromString(a,b);\n }\n\n // return new, unset BigInteger\n function nbi() { return new BigInteger(null); }\n\n // am: Compute w_j += (x*this_i), propagate carries,\n // c is initial carry, returns final carry.\n // c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n // We need to select the fastest one that works in this environment.\n\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n function am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n }\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n function am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n }\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n function am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n }\n var inBrowser = typeof navigator !== \"undefined\";\n if(inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n }\n else if(inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n }\n else { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n }\n\n BigInteger.prototype.DB = dbits;\n BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n }\n\n // (protected) set from integer value x, -DV <= x < DV\n function bnpFromInt(x) {\n this.t = 1;\n this.s = (x<0)?-1:0;\n if(x > 0) this[0] = x;\n else if(x < -1) this[0] = x+this.DV;\n else this.t = 0;\n }\n\n // return bigint initialized to value\n function nbv(i) { var r = nbi(); r.fromInt(i); return r; }\n\n // (protected) set from string and radix\n function bnpFromString(s,b) {\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 256) k = 8; // byte array\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else { this.fromRadix(s,b); return; }\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while(--i >= 0) {\n var x = (k==8)?s[i]&0xff:intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if(sh == 0)\n this[this.t++] = x;\n else if(sh+k > this.DB) {\n this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<= this.DB) sh -= this.DB;\n }\n if(k == 8 && (s[0]&0x80) != 0) {\n this.s = -1;\n if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t;\n }\n\n // (public) return string representation in given radix\n function bnToString(b) {\n if(this.s < 0) return \"-\"+this.negate().toString(b);\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else return this.toRadix(b);\n var km = (1< 0) {\n if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }\n while(i >= 0) {\n if(p < k) {\n d = (this[i]&((1<>(p+=this.DB-k);\n }\n else {\n d = (this[i]>>(p-=k))&km;\n if(p <= 0) { p += this.DB; --i; }\n }\n if(d > 0) m = true;\n if(m) r += int2char(d);\n }\n }\n return m?r:\"0\";\n }\n\n // (public) -this\n function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }\n\n // (public) |this|\n function bnAbs() { return (this.s<0)?this.negate():this; }\n\n // (public) return + if this > a, - if this < a, 0 if equal\n function bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r:r;\n while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;\n return 0;\n }\n\n // returns bit length of the integer x\n function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }\n\n // (public) return the number of bits in \"this\"\n function bnBitLength() {\n if(this.t <= 0) return 0;\n return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));\n }\n\n // (protected) r = this << n*DB\n function bnpDLShiftTo(n,r) {\n var i;\n for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];\n for(i = n-1; i >= 0; --i) r[i] = 0;\n r.t = this.t+n;\n r.s = this.s;\n }\n\n // (protected) r = this >> n*DB\n function bnpDRShiftTo(n,r) {\n for(var i = n; i < this.t; ++i) r[i-n] = this[i];\n r.t = Math.max(this.t-n,0);\n r.s = this.s;\n }\n\n // (protected) r = this << n\n function bnpLShiftTo(n,r) {\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<= 0; --i) r[i] = 0;\n r[ds] = c;\n r.t = this.t+ds+1;\n r.s = this.s;\n r.clamp();\n }\n\n // (protected) r = this >> n\n function bnpRShiftTo(n,r) {\n r.s = this.s;\n var ds = Math.floor(n/this.DB);\n if(ds >= this.t) { r.t = 0; return; }\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB;\n }\n if(a.t < this.t) {\n c -= a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c -= a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c<0)?-1:0;\n if(c < -1) r[i++] = this.DV+c;\n else if(c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n }\n\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyTo(a,r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i+y.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);\n r.s = 0;\n r.clamp();\n if(this.s != a.s) BigInteger.ZERO.subTo(r,r);\n }\n\n // (protected) r = this^2, r != this (HAC 14.16)\n function bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2*x.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < x.t-1; ++i) {\n var c = x.am(i,x[i],r,2*i,0,1);\n if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {\n r[i+x.t] -= x.DV;\n r[i+x.t+1] = 1;\n }\n }\n if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);\n r.s = 0;\n r.clamp();\n }\n\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n function bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus\n if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }\n else { pm.copyTo(y); pt.copyTo(r); }\n var ys = y.t;\n var y0 = y[ys-1];\n if(y0 == 0) return;\n var yt = y0*(1<1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<= 0) {\n r[r.t++] = 1;\n r.subTo(t,r);\n }\n BigInteger.ONE.dlShiftTo(ys,t);\n t.subTo(y,y); // \"negative\" y so we can replace sub with am later\n while(y.t < ys) y[y.t++] = 0;\n while(--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);\n if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out\n y.dlShiftTo(j,t);\n r.subTo(t,r);\n while(r[i] < --qd) r.subTo(t,r);\n }\n }\n if(q != null) {\n r.drShiftTo(ys,q);\n if(ts != ms) BigInteger.ZERO.subTo(q,q);\n }\n r.t = ys;\n r.clamp();\n if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder\n if(ts < 0) BigInteger.ZERO.subTo(r,r);\n }\n\n // (public) this mod a\n function bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a,null,r);\n if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);\n return r;\n }\n\n // Modular reduction using \"classic\" algorithm\n function Classic(m) { this.m = m; }\n function cConvert(x) {\n if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n else return x;\n }\n function cRevert(x) { return x; }\n function cReduce(x) { x.divRemTo(this.m,null,x); }\n function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n Classic.prototype.convert = cConvert;\n Classic.prototype.revert = cRevert;\n Classic.prototype.reduce = cReduce;\n Classic.prototype.mulTo = cMulTo;\n Classic.prototype.sqrTo = cSqrTo;\n\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\n function bnpInvDigit() {\n if(this.t < 1) return 0;\n var x = this[0];\n if((x&1) == 0) return 0;\n var y = x&3; // y == 1/x mod 2^2\n y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4\n y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8\n y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y>0)?this.DV-y:-y;\n }\n\n // Montgomery reduction\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp&0x7fff;\n this.mph = this.mp>>15;\n this.um = (1<<(m.DB-15))-1;\n this.mt2 = 2*m.t;\n }\n\n // xR mod m\n function montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t,r);\n r.divRemTo(this.m,null,r);\n if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);\n return r;\n }\n\n // x/R mod m\n function montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n\n // x = x/R mod m (HAC 14.32)\n function montReduce(x) {\n while(x.t <= this.mt2) // pad x so am has enough room later\n x[x.t++] = 0;\n for(var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i]&0x7fff;\n var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i+this.m.t;\n x[j] += this.m.am(0,u0,x,i,0,this.m.t);\n // propagate carry\n while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }\n }\n x.clamp();\n x.drShiftTo(this.m.t,x);\n if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = \"x^2/R mod m\"; x != r\n function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = \"xy/R mod m\"; x,y != r\n function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Montgomery.prototype.convert = montConvert;\n Montgomery.prototype.revert = montRevert;\n Montgomery.prototype.reduce = montReduce;\n Montgomery.prototype.mulTo = montMulTo;\n Montgomery.prototype.sqrTo = montSqrTo;\n\n // (protected) true iff this is even\n function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }\n\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n function bnpExp(e,z) {\n if(e > 0xffffffff || e < 1) return BigInteger.ONE;\n var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;\n g.copyTo(r);\n while(--i >= 0) {\n z.sqrTo(r,r2);\n if((e&(1< 0) z.mulTo(r2,g,r);\n else { var t = r; r = r2; r2 = t; }\n }\n return z.revert(r);\n }\n\n // (public) this^e % m, 0 <= e < 2^32\n function bnModPowInt(e,m) {\n var z;\n if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);\n return this.exp(e,z);\n }\n\n // protected\n BigInteger.prototype.copyTo = bnpCopyTo;\n BigInteger.prototype.fromInt = bnpFromInt;\n BigInteger.prototype.fromString = bnpFromString;\n BigInteger.prototype.clamp = bnpClamp;\n BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n BigInteger.prototype.lShiftTo = bnpLShiftTo;\n BigInteger.prototype.rShiftTo = bnpRShiftTo;\n BigInteger.prototype.subTo = bnpSubTo;\n BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n BigInteger.prototype.squareTo = bnpSquareTo;\n BigInteger.prototype.divRemTo = bnpDivRemTo;\n BigInteger.prototype.invDigit = bnpInvDigit;\n BigInteger.prototype.isEven = bnpIsEven;\n BigInteger.prototype.exp = bnpExp;\n\n // public\n BigInteger.prototype.toString = bnToString;\n BigInteger.prototype.negate = bnNegate;\n BigInteger.prototype.abs = bnAbs;\n BigInteger.prototype.compareTo = bnCompareTo;\n BigInteger.prototype.bitLength = bnBitLength;\n BigInteger.prototype.mod = bnMod;\n BigInteger.prototype.modPowInt = bnModPowInt;\n\n // \"constants\"\n BigInteger.ZERO = nbv(0);\n BigInteger.ONE = nbv(1);\n\n // Copyright (c) 2005-2009 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Extended JavaScript BN functions, required for RSA private ops.\n\n // Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n // Version 1.2: square() API, isProbablePrime fix\n\n // (public)\n function bnClone() { var r = nbi(); this.copyTo(r); return r; }\n\n // (public) return value as integer\n function bnIntValue() {\n if(this.s < 0) {\n if(this.t == 1) return this[0]-this.DV;\n else if(this.t == 0) return -1;\n }\n else if(this.t == 1) return this[0];\n else if(this.t == 0) return 0;\n // assumes 16 < DB < 32\n return ((this[1]&((1<<(32-this.DB))-1))<>24; }\n\n // (public) return value as short (assumes DB>=16)\n function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }\n\n // (protected) return x s.t. r^x < DV\n function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }\n\n // (public) 0 if this == 0, 1 if this > 0\n function bnSigNum() {\n if(this.s < 0) return -1;\n else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n else return 1;\n }\n\n // (protected) convert to radix string\n function bnpToRadix(b) {\n if(b == null) b = 10;\n if(this.signum() == 0 || b < 2 || b > 36) return \"0\";\n var cs = this.chunkSize(b);\n var a = Math.pow(b,cs);\n var d = nbv(a), y = nbi(), z = nbi(), r = \"\";\n this.divRemTo(d,y,z);\n while(y.signum() > 0) {\n r = (a+z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d,y,z);\n }\n return z.intValue().toString(b) + r;\n }\n\n // (protected) convert from radix string\n function bnpFromRadix(s,b) {\n this.fromInt(0);\n if(b == null) b = 10;\n var cs = this.chunkSize(b);\n var d = Math.pow(b,cs), mi = false, j = 0, w = 0;\n for(var i = 0; i < s.length; ++i) {\n var x = intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n continue;\n }\n w = b*w+x;\n if(++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w,0);\n j = 0;\n w = 0;\n }\n }\n if(j > 0) {\n this.dMultiply(Math.pow(b,j));\n this.dAddOffset(w,0);\n }\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) alternate constructor\n function bnpFromNumber(a,b,c) {\n if(\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if(a < 2) this.fromInt(1);\n else {\n this.fromNumber(a,c);\n if(!this.testBit(a-1)) // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);\n if(this.isEven()) this.dAddOffset(1,0); // force odd\n while(!this.isProbablePrime(b)) {\n this.dAddOffset(2,0);\n if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = new Array(), t = a&7;\n x.length = (a>>3)+1;\n b.nextBytes(x);\n if(t > 0) x[0] &= ((1< 0) {\n if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)\n r[k++] = d|(this.s<<(this.DB-p));\n while(i >= 0) {\n if(p < 8) {\n d = (this[i]&((1<>(p+=this.DB-8);\n }\n else {\n d = (this[i]>>(p-=8))&0xff;\n if(p <= 0) { p += this.DB; --i; }\n }\n if((d&0x80) != 0) d |= -256;\n if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;\n if(k > 0 || d != this.s) r[k++] = d;\n }\n }\n return r;\n }\n\n function bnEquals(a) { return(this.compareTo(a)==0); }\n function bnMin(a) { return(this.compareTo(a)<0)?this:a; }\n function bnMax(a) { return(this.compareTo(a)>0)?this:a; }\n\n // (protected) r = this op a (bitwise)\n function bnpBitwiseTo(a,op,r) {\n var i, f, m = Math.min(a.t,this.t);\n for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);\n if(a.t < this.t) {\n f = a.s&this.DM;\n for(i = m; i < this.t; ++i) r[i] = op(this[i],f);\n r.t = this.t;\n }\n else {\n f = this.s&this.DM;\n for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);\n r.t = a.t;\n }\n r.s = op(this.s,a.s);\n r.clamp();\n }\n\n // (public) this & a\n function op_and(x,y) { return x&y; }\n function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }\n\n // (public) this | a\n function op_or(x,y) { return x|y; }\n function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }\n\n // (public) this ^ a\n function op_xor(x,y) { return x^y; }\n function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }\n\n // (public) this & ~a\n function op_andnot(x,y) { return x&~y; }\n function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }\n\n // (public) ~this\n function bnNot() {\n var r = nbi();\n for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];\n r.t = this.t;\n r.s = ~this.s;\n return r;\n }\n\n // (public) this << n\n function bnShiftLeft(n) {\n var r = nbi();\n if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);\n return r;\n }\n\n // (public) this >> n\n function bnShiftRight(n) {\n var r = nbi();\n if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);\n return r;\n }\n\n // return index of lowest 1-bit in x, x < 2^31\n function lbit(x) {\n if(x == 0) return -1;\n var r = 0;\n if((x&0xffff) == 0) { x >>= 16; r += 16; }\n if((x&0xff) == 0) { x >>= 8; r += 8; }\n if((x&0xf) == 0) { x >>= 4; r += 4; }\n if((x&3) == 0) { x >>= 2; r += 2; }\n if((x&1) == 0) ++r;\n return r;\n }\n\n // (public) returns index of lowest 1-bit (or -1 if none)\n function bnGetLowestSetBit() {\n for(var i = 0; i < this.t; ++i)\n if(this[i] != 0) return i*this.DB+lbit(this[i]);\n if(this.s < 0) return this.t*this.DB;\n return -1;\n }\n\n // return number of 1 bits in x\n function cbit(x) {\n var r = 0;\n while(x != 0) { x &= x-1; ++r; }\n return r;\n }\n\n // (public) return number of set bits\n function bnBitCount() {\n var r = 0, x = this.s&this.DM;\n for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n return r;\n }\n\n // (public) true iff nth bit is set\n function bnTestBit(n) {\n var j = Math.floor(n/this.DB);\n if(j >= this.t) return(this.s!=0);\n return((this[j]&(1<<(n%this.DB)))!=0);\n }\n\n // (protected) this op (1<>= this.DB;\n }\n if(a.t < this.t) {\n c += a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c += a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c<0)?-1:0;\n if(c > 0) r[i++] = c;\n else if(c < -1) r[i++] = this.DV+c;\n r.t = i;\n r.clamp();\n }\n\n // (public) this + a\n function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }\n\n // (public) this - a\n function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }\n\n // (public) this * a\n function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }\n\n // (public) this^2\n function bnSquare() { var r = nbi(); this.squareTo(r); return r; }\n\n // (public) this / a\n function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }\n\n // (public) this % a\n function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }\n\n // (public) [this/a,this%a]\n function bnDivideAndRemainder(a) {\n var q = nbi(), r = nbi();\n this.divRemTo(a,q,r);\n return new Array(q,r);\n }\n\n // (protected) this *= n, this >= 0, 1 < n < DV\n function bnpDMultiply(n) {\n this[this.t] = this.am(0,n-1,this,0,0,this.t);\n ++this.t;\n this.clamp();\n }\n\n // (protected) this += n << w words, this >= 0\n function bnpDAddOffset(n,w) {\n if(n == 0) return;\n while(this.t <= w) this[this.t++] = 0;\n this[w] += n;\n while(this[w] >= this.DV) {\n this[w] -= this.DV;\n if(++w >= this.t) this[this.t++] = 0;\n ++this[w];\n }\n }\n\n // A \"null\" reducer\n function NullExp() {}\n function nNop(x) { return x; }\n function nMulTo(x,y,r) { x.multiplyTo(y,r); }\n function nSqrTo(x,r) { x.squareTo(r); }\n\n NullExp.prototype.convert = nNop;\n NullExp.prototype.revert = nNop;\n NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.sqrTo = nSqrTo;\n\n // (public) this^e\n function bnPow(e) { return this.exp(e,new NullExp()); }\n\n // (protected) r = lower n words of \"this * a\", a.t <= n\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyLowerTo(a,n,r) {\n var i = Math.min(this.t+a.t,n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while(i > 0) r[--i] = 0;\n var j;\n for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);\n for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);\n r.clamp();\n }\n\n // (protected) r = \"this * a\" without lower n words, n > 0\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyUpperTo(a,n,r) {\n --n;\n var i = r.t = this.t+a.t-n;\n r.s = 0; // assumes a,this >= 0\n while(--i >= 0) r[i] = 0;\n for(i = Math.max(n-this.t,0); i < a.t; ++i)\n r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);\n r.clamp();\n r.drShiftTo(1,r);\n }\n\n // Barrett modular reduction\n function Barrett(m) {\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2*m.t,this.r2);\n this.mu = this.r2.divide(m);\n this.m = m;\n }\n\n function barrettConvert(x) {\n if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);\n else if(x.compareTo(this.m) < 0) return x;\n else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }\n }\n\n function barrettRevert(x) { return x; }\n\n // x = x mod m (HAC 14.42)\n function barrettReduce(x) {\n x.drShiftTo(this.m.t-1,this.r2);\n if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }\n this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);\n this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);\n while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);\n x.subTo(this.r2,x);\n while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = x^2 mod m; x != r\n function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = x*y mod m; x,y != r\n function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.reduce = barrettReduce;\n Barrett.prototype.mulTo = barrettMulTo;\n Barrett.prototype.sqrTo = barrettSqrTo;\n\n // (public) this^e % m (HAC 14.85)\n function bnModPow(e,m) {\n var i = e.bitLength(), k, r = nbv(1), z;\n if(i <= 0) return r;\n else if(i < 18) k = 1;\n else if(i < 48) k = 3;\n else if(i < 144) k = 4;\n else if(i < 768) k = 5;\n else k = 6;\n if(i < 8)\n z = new Classic(m);\n else if(m.isEven())\n z = new Barrett(m);\n else\n z = new Montgomery(m);\n\n // precomputation\n var g = new Array(), n = 3, k1 = k-1, km = (1< 1) {\n var g2 = nbi();\n z.sqrTo(g[1],g2);\n while(n <= km) {\n g[n] = nbi();\n z.mulTo(g2,g[n-2],g[n]);\n n += 2;\n }\n }\n\n var j = e.t-1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j])-1;\n while(j >= 0) {\n if(i >= k1) w = (e[j]>>(i-k1))&km;\n else {\n w = (e[j]&((1<<(i+1))-1))<<(k1-i);\n if(j > 0) w |= e[j-1]>>(this.DB+i-k1);\n }\n\n n = k;\n while((w&1) == 0) { w >>= 1; --n; }\n if((i -= n) < 0) { i += this.DB; --j; }\n if(is1) { // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }\n if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }\n z.mulTo(r2,g[w],r);\n }\n\n while(j >= 0 && (e[j]&(1< 0) {\n x.rShiftTo(g,x);\n y.rShiftTo(g,y);\n }\n while(x.signum() > 0) {\n if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);\n if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);\n if(x.compareTo(y) >= 0) {\n x.subTo(y,x);\n x.rShiftTo(1,x);\n }\n else {\n y.subTo(x,y);\n y.rShiftTo(1,y);\n }\n }\n if(g > 0) y.lShiftTo(g,y);\n return y;\n }\n\n // (protected) this % n, n < 2^26\n function bnpModInt(n) {\n if(n <= 0) return 0;\n var d = this.DV%n, r = (this.s<0)?n-1:0;\n if(this.t > 0)\n if(d == 0) r = this[0]%n;\n else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;\n return r;\n }\n\n // (public) 1/this % m (HAC 14.61)\n function bnModInverse(m) {\n var ac = m.isEven();\n if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\n var u = m.clone(), v = this.clone();\n var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);\n while(u.signum() != 0) {\n while(u.isEven()) {\n u.rShiftTo(1,u);\n if(ac) {\n if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }\n a.rShiftTo(1,a);\n }\n else if(!b.isEven()) b.subTo(m,b);\n b.rShiftTo(1,b);\n }\n while(v.isEven()) {\n v.rShiftTo(1,v);\n if(ac) {\n if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }\n c.rShiftTo(1,c);\n }\n else if(!d.isEven()) d.subTo(m,d);\n d.rShiftTo(1,d);\n }\n if(u.compareTo(v) >= 0) {\n u.subTo(v,u);\n if(ac) a.subTo(c,a);\n b.subTo(d,b);\n }\n else {\n v.subTo(u,v);\n if(ac) c.subTo(a,c);\n d.subTo(b,d);\n }\n }\n if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\n if(d.compareTo(m) >= 0) return d.subtract(m);\n if(d.signum() < 0) d.addTo(m,d); else return d;\n if(d.signum() < 0) return d.add(m); else return d;\n }\n\n var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];\n var lplim = (1<<26)/lowprimes[lowprimes.length-1];\n\n // (public) test primality with certainty >= 1-.5^t\n function bnIsProbablePrime(t) {\n var i, x = this.abs();\n if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x[0] == lowprimes[i]) return true;\n return false;\n }\n if(x.isEven()) return false;\n i = 1;\n while(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n }\n return x.millerRabin(t);\n }\n\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n function bnpMillerRabin(t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if(k <= 0) return false;\n var r = n1.shiftRight(k);\n t = (t+1)>>1;\n if(t > lowprimes.length) t = lowprimes.length;\n var a = nbi();\n for(var i = 0; i < t; ++i) {\n //Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);\n var y = a.modPow(r,this);\n if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while(j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2,this);\n if(y.compareTo(BigInteger.ONE) == 0) return false;\n }\n if(y.compareTo(n1) != 0) return false;\n }\n }\n return true;\n }\n\n // protected\n BigInteger.prototype.chunkSize = bnpChunkSize;\n BigInteger.prototype.toRadix = bnpToRadix;\n BigInteger.prototype.fromRadix = bnpFromRadix;\n BigInteger.prototype.fromNumber = bnpFromNumber;\n BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n BigInteger.prototype.changeBit = bnpChangeBit;\n BigInteger.prototype.addTo = bnpAddTo;\n BigInteger.prototype.dMultiply = bnpDMultiply;\n BigInteger.prototype.dAddOffset = bnpDAddOffset;\n BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n BigInteger.prototype.modInt = bnpModInt;\n BigInteger.prototype.millerRabin = bnpMillerRabin;\n\n // public\n BigInteger.prototype.clone = bnClone;\n BigInteger.prototype.intValue = bnIntValue;\n BigInteger.prototype.byteValue = bnByteValue;\n BigInteger.prototype.shortValue = bnShortValue;\n BigInteger.prototype.signum = bnSigNum;\n BigInteger.prototype.toByteArray = bnToByteArray;\n BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.min = bnMin;\n BigInteger.prototype.max = bnMax;\n BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.or = bnOr;\n BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.not = bnNot;\n BigInteger.prototype.shiftLeft = bnShiftLeft;\n BigInteger.prototype.shiftRight = bnShiftRight;\n BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n BigInteger.prototype.bitCount = bnBitCount;\n BigInteger.prototype.testBit = bnTestBit;\n BigInteger.prototype.setBit = bnSetBit;\n BigInteger.prototype.clearBit = bnClearBit;\n BigInteger.prototype.flipBit = bnFlipBit;\n BigInteger.prototype.add = bnAdd;\n BigInteger.prototype.subtract = bnSubtract;\n BigInteger.prototype.multiply = bnMultiply;\n BigInteger.prototype.divide = bnDivide;\n BigInteger.prototype.remainder = bnRemainder;\n BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n BigInteger.prototype.modPow = bnModPow;\n BigInteger.prototype.modInverse = bnModInverse;\n BigInteger.prototype.pow = bnPow;\n BigInteger.prototype.gcd = bnGCD;\n BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\n // JSBN-specific extension\n BigInteger.prototype.square = bnSquare;\n\n // Expose the Barrett function\n BigInteger.prototype.Barrett = Barrett\n\n // BigInteger interfaces not implemented in jsbn:\n\n // BigInteger(int signum, byte[] magnitude)\n // double doubleValue()\n // float floatValue()\n // int hashCode()\n // long longValue()\n // static BigInteger valueOf(long val)\n\n // Random number generator - requires a PRNG backend, e.g. prng4.js\n\n // For best results, put code like\n // \n // in your main HTML document.\n\n var rng_state;\n var rng_pool;\n var rng_pptr;\n\n // Mix in a 32-bit integer into the pool\n function rng_seed_int(x) {\n rng_pool[rng_pptr++] ^= x & 255;\n rng_pool[rng_pptr++] ^= (x >> 8) & 255;\n rng_pool[rng_pptr++] ^= (x >> 16) & 255;\n rng_pool[rng_pptr++] ^= (x >> 24) & 255;\n if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;\n }\n\n // Mix in the current time (w/milliseconds) into the pool\n function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }\n\n // Initialize the pool with junk if needed.\n if(rng_pool == null) {\n rng_pool = new Array();\n rng_pptr = 0;\n var t;\n if(typeof window !== \"undefined\" && window.crypto) {\n if (window.crypto.getRandomValues) {\n // Use webcrypto if available\n var ua = new Uint8Array(32);\n window.crypto.getRandomValues(ua);\n for(t = 0; t < 32; ++t)\n rng_pool[rng_pptr++] = ua[t];\n }\n else if(navigator.appName == \"Netscape\" && navigator.appVersion < \"5\") {\n // Extract entropy (256 bits) from NS4 RNG if available\n var z = window.crypto.random(32);\n for(t = 0; t < z.length; ++t)\n rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;\n }\n }\n while(rng_pptr < rng_psize) { // extract some randomness from Math.random()\n t = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = t >>> 8;\n rng_pool[rng_pptr++] = t & 255;\n }\n rng_pptr = 0;\n rng_seed_time();\n //rng_seed_int(window.screenX);\n //rng_seed_int(window.screenY);\n }\n\n function rng_get_byte() {\n if(rng_state == null) {\n rng_seed_time();\n rng_state = prng_newstate();\n rng_state.init(rng_pool);\n for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)\n rng_pool[rng_pptr] = 0;\n rng_pptr = 0;\n //rng_pool = null;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n }\n\n function rng_get_bytes(ba) {\n var i;\n for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();\n }\n\n function SecureRandom() {}\n\n SecureRandom.prototype.nextBytes = rng_get_bytes;\n\n // prng4.js - uses Arcfour as a PRNG\n\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = new Array();\n }\n\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n function ARC4init(key) {\n var i, j, t;\n for(i = 0; i < 256; ++i)\n this.S[i] = i;\n j = 0;\n for(i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n }\n\n function ARC4next() {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n }\n\n Arcfour.prototype.init = ARC4init;\n Arcfour.prototype.next = ARC4next;\n\n // Plug in your RNG constructor here\n function prng_newstate() {\n return new Arcfour();\n }\n\n // Pool size must be a multiple of 4 and greater than 32.\n // An array of bytes the size of the pool will be passed to init()\n var rng_psize = 256;\n\n if (typeof exports !== 'undefined') {\n exports = module.exports = {\n default: BigInteger,\n BigInteger: BigInteger,\n SecureRandom: SecureRandom,\n };\n } else {\n this.jsbn = {\n BigInteger: BigInteger,\n SecureRandom: SecureRandom\n };\n }\n\n}).call(this);\n" + } + ], + "filteredModules": 0, + "origins": [ { - "id": 79, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/cropper.ts", - "name": "./src/lib/cropper.ts", - "index": 55, - "index2": 51, - "size": 7687, + "module": "", + "moduleIdentifier": "", + "moduleName": "", + "loc": "index", + "request": "./src/index.ts", + "reasons": [] + } + ] + }, + { + "id": 3, + "rendered": true, + "initial": true, + "entry": false, + "reason": "split chunk (cache group: vendor) (name: npm.lottie-web)", + "size": 203081, + "names": [ + "npm.lottie-web" + ], + "files": [ + "npm.lottie-web.chunk.js" + ], + "hash": "1cc3eda090aa232cba85", + "siblings": [ + 1 + ], + "parents": [], + "children": [], + "childrenByOrder": {}, + "modules": [ + { + "id": 82, + "identifier": "F:\\tweb\\node_modules\\lottie-web\\build\\player\\lottie_canvas.min.js", + "name": "./node_modules/lottie-web/build/player/lottie_canvas.min.js", + "index": 82, + "index2": 81, + "size": 203081, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ - 0 + 3 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "issuerId": 78, - "issuerName": "./src/components/pageSignUp.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\lottie.ts", + "issuerId": 81, + "issuerName": "./src/lib/lottie.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 41, - "building": 1632 - } - }, - { - "id": 40, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignIn.ts", - "name": "./src/components/pageSignIn.ts", - "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 - } - }, - { - "id": 77, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageAuthCode.ts", - "name": "./src/components/pageAuthCode.ts", - "profile": { - "factory": 392, - "building": 505, - "dependencies": 2 - } - }, - { - "id": 78, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "name": "./src/components/pageSignUp.ts", + "id": 81, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\lottie.ts", + "name": "./src/lib/lottie.ts", "profile": { - "factory": 278, - "building": 994, - "dependencies": 0 + "factory": 141, + "building": 1476 } } ], "profile": { - "factory": 1027, - "building": 121, - "dependencies": 1 + "factory": 193, + "building": 582 }, "failed": false, "errors": 0, @@ -7893,13 +7664,13 @@ "assets": [], "reasons": [ { - "moduleId": 78, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageSignUp.ts", - "module": "./src/components/pageSignUp.ts", - "moduleName": "./src/components/pageSignUp.ts", + "moduleId": 81, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\lottie.ts", + "module": "./src/lib/lottie.ts", + "moduleName": "./src/lib/lottie.ts", "type": "cjs require", - "userRequest": "../lib/cropper", - "loc": "9:34-59" + "userRequest": "lottie-web/build/player/lottie_canvas.min.js", + "loc": "7:47-102" } ], "usedExports": true, @@ -7907,51 +7678,74 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction resizeableImage(image_target, resize_canvas) {\n var cropComponent, container, crop_img, event_state = {}, ratio = 1.0, keyZoomValue = 4.0, MINWIDTH = 50\n //, MINHEIGHT = 50\n , CROPWIDTH = 200, CROPHEIGHT = 200, cropLeft = 0, cropTop = 0, cropWidth = 0, cropHeight = 0;\n if (image_target.complete) {\n init();\n }\n else {\n image_target.onload = init;\n }\n function removeHandlers() {\n container.removeEventListener('mousedown', startMoving);\n container.removeEventListener('touchstart', startMoving);\n container.removeEventListener('wheel', resizing);\n document.removeEventListener('mouseup', endMoving);\n document.removeEventListener('touchend', endMoving);\n document.removeEventListener('mousemove', moving);\n document.removeEventListener('touchmove', moving);\n document.removeEventListener('keypress', keyHandler);\n cropComponent.remove();\n container.remove();\n crop_img.remove();\n }\n function addHandlers() {\n container.addEventListener('mousedown', startMoving, false);\n container.addEventListener('touchstart', startMoving, false);\n container.addEventListener('wheel', resizing, false);\n document.addEventListener('keypress', keyHandler, false);\n //document.querySelector('.btn-crop').addEventListener('click', openCropCanvasImg);\n }\n function init() {\n var wraper, left, top;\n if (image_target.dataset.isCrop) {\n throw 'image is already crop';\n }\n image_target.dataset.isCrop = 'true';\n image_target.classList.add('crop-blur');\n image_target.draggable = false;\n crop_img = new Image();\n crop_img.crossOrigin = image_target.crossOrigin;\n crop_img.src = image_target.src;\n crop_img.draggable = false;\n if (!resize_canvas) {\n resize_canvas = document.createElement('canvas');\n }\n cropComponent = document.createElement('div');\n cropComponent.classList.add('crop-component');\n container = document.createElement('div');\n container.classList.add('overlay');\n let overlayColor = document.createElement('div');\n overlayColor.classList.add('crop-overlay-color');\n cropComponent.appendChild(container);\n wraper = image_target.parentNode;\n wraper.appendChild(cropComponent);\n cropComponent.appendChild(crop_img);\n cropComponent.appendChild(image_target);\n cropComponent.appendChild(overlayColor);\n container.appendChild(crop_img);\n crop_img.style.maxWidth = image_target.width + 'px';\n left = image_target.offsetWidth / 2 - CROPWIDTH / 2;\n top = image_target.offsetHeight / 2 - CROPHEIGHT / 2;\n updateCropImage(left, top);\n addHandlers();\n }\n function updateCropSize(width, height) {\n container.style.width = width + 'px';\n container.style.height = height + 'px';\n }\n function updateCropImage(left, top) {\n cropLeft = -left * ratio;\n cropTop = -top * ratio;\n crop_img.style.top = -top + 'px';\n crop_img.style.left = -left + 'px';\n }\n function updateContainer(left, top) {\n let _top = top + (CROPWIDTH / 2) + 'px';\n let _left = left + (CROPHEIGHT / 2) + 'px';\n container.style.top = _top;\n container.style.left = _left;\n }\n // Save the initial event details and container state\n function saveEventState(e) {\n event_state.container_width = container.offsetWidth;\n event_state.container_height = container.offsetHeight;\n event_state.container_left = container.offsetLeft;\n event_state.container_top = container.offsetTop;\n event_state.mouse_x = (e.clientX || e.pageX || e.touches && e.touches[0].clientX) + window.scrollX;\n event_state.mouse_y = (e.clientY || e.pageY || e.touches && e.touches[0].clientY) + window.scrollY;\n }\n function imgZoom(zoom) {\n zoom = zoom * Math.PI * 2;\n var newWidth = Math.floor(container.clientWidth + zoom), newHeight = Math.floor(container.clientHeight + zoom), w = crop_img.clientWidth, h = crop_img.clientHeight, left, top, right, bottom;\n if (newWidth < MINWIDTH) {\n return;\n }\n else if (newWidth > w) {\n return;\n }\n left = container.offsetLeft - (zoom / 2);\n top = container.offsetTop - (zoom / 2);\n right = left + newWidth;\n bottom = top + newHeight;\n if (left < 0) {\n left = 0;\n }\n if (top < 0) {\n top = 0;\n }\n if (right > w) {\n return;\n }\n if (bottom > h) {\n return;\n }\n ratio = CROPWIDTH / newWidth;\n updateCropSize(newWidth, newWidth);\n updateCropImage(left, top);\n updateContainer(left, top);\n //crop();\n }\n function keyHandler(e) {\n e.preventDefault();\n switch (String.fromCharCode(e.charCode)) {\n case '+':\n imgZoom(keyZoomValue);\n break;\n case '-':\n imgZoom(-keyZoomValue);\n break;\n }\n }\n function resizing(e) {\n e.preventDefault();\n imgZoom(e.deltaY > 0 ? 1 : -1);\n }\n function startMoving(e) {\n e.preventDefault();\n e.stopPropagation();\n saveEventState(e);\n document.addEventListener('mousemove', moving);\n document.addEventListener('touchmove', moving);\n document.addEventListener('mouseup', endMoving);\n document.addEventListener('touchend', endMoving);\n }\n function endMoving(e) {\n e.preventDefault();\n document.removeEventListener('mouseup', endMoving);\n document.removeEventListener('touchend', endMoving);\n document.removeEventListener('mousemove', moving);\n document.removeEventListener('touchmove', moving);\n }\n function moving(e) {\n var curuntTouch = { x: 0, y: 0 }, left, top, w, h;\n e.preventDefault();\n e.stopPropagation();\n curuntTouch.x = e.pageX || e.touches && e.touches[0].pageX;\n curuntTouch.y = e.pageY || e.touches && e.touches[0].pageY;\n left = curuntTouch.x - (event_state.mouse_x - event_state.container_left);\n top = curuntTouch.y - (event_state.mouse_y - event_state.container_top);\n w = container.offsetWidth;\n h = container.offsetHeight;\n if (left < 0) {\n left = 0;\n }\n else if (left > crop_img.offsetWidth - w) {\n left = crop_img.offsetWidth - w;\n }\n if (top < 0) {\n top = 0;\n }\n else if (top > crop_img.offsetHeight - h) {\n top = crop_img.offsetHeight - h;\n }\n updateCropImage(left, top);\n updateContainer(left, top);\n }\n function crop() {\n cropWidth = crop_img.width * ratio;\n cropHeight = crop_img.height * ratio;\n resize_canvas.width = CROPWIDTH;\n resize_canvas.height = CROPHEIGHT;\n var ctx = resize_canvas.getContext('2d');\n ctx.drawImage(crop_img, cropLeft, cropTop, cropWidth, cropHeight);\n }\n return { crop, removeHandlers };\n /* function openCropCanvasImg() {\n crop();\n \n try {\n var base64Img = resize_canvas.toDataURL('image/png', 1.0);\n window.open(base64Img);\n } catch(e) {\n alert(e);\n } finally {\n // removeHandlers();\n }\n \n } */\n}\n//resizeableImage(document.querySelector('.crop-image'));\nexports.default = resizeableImage;\n" - }, + "depth": 1, + "source": "(typeof navigator !== \"undefined\") && (function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(function() {\n return factory(root);\n });\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory(root);\n } else {\n root.lottie = factory(root);\n root.bodymovin = root.lottie;\n }\n}((window || {}), function(window) {\n\t\"use strict\";var svgNS=\"http://www.w3.org/2000/svg\",locationHref=\"\",initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,blitter=10,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=[\"abs\",\"acos\",\"acosh\",\"asin\",\"asinh\",\"atan\",\"atanh\",\"atan2\",\"ceil\",\"cbrt\",\"expm1\",\"clz32\",\"cos\",\"cosh\",\"exp\",\"floor\",\"fround\",\"hypot\",\"imul\",\"log\",\"log1p\",\"log2\",\"log10\",\"max\",\"min\",\"pow\",\"random\",\"round\",\"sign\",\"sin\",\"sinh\",\"sqrt\",\"tan\",\"tanh\",\"trunc\",\"E\",\"LN10\",\"LN2\",\"LOG10E\",\"LOG2E\",\"PI\",\"SQRT1_2\",\"SQRT2\"],r=e.length;for(t=0;t>>=1;return(t+r)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,b(x(a.S),o),(e.pass||r||function(t,e,r,i){return i&&(i.S&&P(i,a),t.state=function(){return P(a,{})}),r?(h[c]=t,e):t})(n,s,\"global\"in e?e.global:this==h,e.state)},b(h.random(),o)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,e,r,i,s){var a=s||(\"bez_\"+t+\"_\"+e+\"_\"+r+\"_\"+i).replace(/\\./g,\"p\");if(o[a])return o[a];var n=new h([t,e,r,i]);return o[a]=n}},o={};var p=11,l=1/(p-1),e=\"function\"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function m(t,e,r){return((i(e,r)*t+s(e,r))*t+a(e))*t}function f(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(p):new Array(p),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:m(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;rn?-1:1,p=!0;p;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),p=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];p=!1}return r[a]+(r[a+1]-r[a])*o}var M=createTypedArray(\"float32\",8);return{getSegmentsLength:function(t){var e,r=segments_length_pool.newElement(),i=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=r.lengths,p=0;for(e=0;er[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&void 0))}var h,r=function(){var i=[4,4,14];function s(t){var e,r,i,s=t.length;for(e=0;e=a.t-i){s.h&&(s=a),f=0;break}if(a.t-i>t){f=c;break}c=r&&r<=t||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function d(t){var e;if(\"unidimensional\"===this.propType)e=t*this.mult,1e-5=this.p.keyframes[this.p.keyframes.length-1].t?(e=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(e=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){e=[],r=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(e[0]=s.getValueAtTime((s.keyframes[0].t+.01)/i,0),e[1]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),r[0]=s.getValueAtTime(s.keyframes[0].t/i,0),r[1]=a.getValueAtTime(a.keyframes[0].t/i,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(e[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/i,0),e[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),r[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/i,0),r[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0)):(e=[s.pv,a.pv],r[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/i,s.offsetTime),r[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime))}else e=r=n;this.v.rotate(-Math.atan2(e[1]-r[1],e[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}if(this.r){if(this.r.effectsSequence.length)return;this.pre.rotate(-this.r.v),this.appliedTransformations=4}else this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,r){return new i(t,e,r)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r=this._maxLength&&this.doubleArrayLength(),r){case\"v\":a=this.v;break;case\"i\":a=this.i;break;case\"o\":a=this.o}(!a[i]||a[i]&&!s)&&(a[i]=point_pool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,\"v\",n,o),this.setXYAt(r,i,\"o\",n,o),this.setXYAt(s,a,\"i\",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y=f,g=c.length-1,v=!0;v&&(d=c[y],!((u=c[y+1]).t-this.offsetTime>t));)y=u.t-this.offsetTime)l=1;else if(ti+r);else l=o.s*s<=i?0:(o.s*s-i)/r,m=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([l,m])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;ee.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[s],f[i].v[s],r,o,y),y=!1):(p=bez.getNewSegment(f[i].v[s-1],f[i].v[s],f[i].o[s-1],f[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(p,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(f[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[0],f[i].v[0],r,o,y),y=!1):(p=bez.getNewSegment(f[i].v[s-1],f[i].v[0],f[i].o[s-1],f[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(p,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[l][0],r.v[l][1],\"i\",l),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],\"o\",r._length-1)),d>e.e)break;i=d.length&&(m=0,d=u[f+=1]?u[f].points:b.v.c?u[f=m=0].points:(p-=h.partialLength,null)),d&&(c=h,y=(h=d[m]).partialLength));O=A[s].an/2-A[s].add,T.translate(-O,0,0)}else O=A[s].an/2-A[s].add,T.translate(-O,0,0),T.translate(-x[0]*A[s].an/200,-x[1]*V/100,0);for(A[s].l/2,I=0;Ie));)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r=FontManager.getCombinedCharacterCodes(),i=[],s=0,a=t.length;sthis.minimumFontSize&&M=u(o)&&(n=c(0,d(t-o<0?d(h,1)-(o-t):h-t,1))),a(n));return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(st-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 13:return this.createCamera(t)}return this.createNull(t)},BaseRenderer.prototype.createCamera=function(){throw new Error(\"You're using a 3d camera. Try the html renderer.\")},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;tt?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;tthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;rthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger(\"enterFrame\"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!=t||!0===this.isPaused&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.trigger(\"_active\")))},AnimationItem.prototype.pause=function(t){t&&this.name!=t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger(\"_idle\"))},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.goToAndStop=function(t,e,r){r&&this.name!=r||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())},AnimationItem.prototype.goToAndPlay=function(t,e,r){this.goToAndStop(t,e,r),this.play()},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&0=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger(\"loopComplete\"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger(\"loopComplete\"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger(\"complete\"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.timeCompleted=this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger(\"segmentStart\")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-t)),this.firstFrame=t,this.timeCompleted=this.totalFrames=e-t,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),\"object\"==typeof t[0]){var r,i=t.length;for(r=0;rdata.k[e].t&&tdata.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||\"number\"==typeof data.k[0])throw new Error(\"The property has no keyframe at index \"+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=data.k[t].hasOwnProperty(\"s\")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;rp.length-1)&&(e=p.length-1),i=l-(s=p[p.length-1-e].t)),\"pingpong\"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if(\"offset\"===t){var m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),f=this.getValueAtTime(l/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;ap.length-1)&&(e=p.length-1),i=(s=p[e].t)-l),\"pingpong\"===t){if(Math.floor((l-h)/i)%2==0)return this.getValueAtTime(((l-h)%i+l)/this.comp.globalData.frameRate,0)}else{if(\"offset\"===t){var m=this.getValueAtTime(l/this.comp.globalData.frameRate,0),f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(l-h)%i+l)/this.comp.globalData.frameRate,0),d=Math.floor((l-h)/i)+1;if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;an){var l=o,m=r.c&&o===h-1?0:o+1,f=(n-p)/a[o].addedLength;i=bez.getPointInSegment(r.v[l],r.v[m],r.o[l],r.i[m],f,a[o]);break}p+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){t=1==t?this.v.c?0:.999:t;var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:\"tangent\"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,\"tangent\")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,\"normal\")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([r],t),extendPrototype([r],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shape_pool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime> shg_sum;\n if ( pa != 0 )\n {\n pa = 255 / pa;\n pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;\n pixels[yi+1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n pixels[yi+2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n } else {\n pixels[yi] = pixels[yi+1] = pixels[yi+2] = 0;\n }\n \n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n a_sum -= a_out_sum;\n \n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n a_out_sum -= stackIn.a;\n \n p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2;\n \n r_in_sum += ( stackIn.r = pixels[p]);\n g_in_sum += ( stackIn.g = pixels[p+1]);\n b_in_sum += ( stackIn.b = pixels[p+2]);\n a_in_sum += ( stackIn.a = pixels[p+3]);\n \n r_sum += r_in_sum;\n g_sum += g_in_sum;\n b_sum += b_in_sum;\n a_sum += a_in_sum;\n \n stackIn = stackIn.next;\n \n r_out_sum += ( pr = stackOut.r );\n g_out_sum += ( pg = stackOut.g );\n b_out_sum += ( pb = stackOut.b );\n a_out_sum += ( pa = stackOut.a );\n \n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n a_in_sum -= pa;\n \n stackOut = stackOut.next;\n \n yi += 4;\n }\n yw += width;\n }\n \n \n for ( x = 0; x < width; x++ )\n {\n g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;\n \n yi = x << 2;\n r_out_sum = radiusPlus1 * ( pr = pixels[yi]);\n g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]);\n b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]);\n a_out_sum = radiusPlus1 * ( pa = pixels[yi+3]);\n \n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n a_sum += sumFactor * pa;\n \n stack = stackStart;\n \n for( i = 0; i < radiusPlus1; i++ )\n {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n \n yp = width;\n \n for( i = 1; i <= radius; i++ )\n {\n yi = ( yp + x ) << 2;\n \n r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i );\n g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs;\n b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs;\n a_sum += ( stack.a = ( pa = pixels[yi+3])) * rbs;\n \n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n a_in_sum += pa;\n \n stack = stack.next;\n \n if( i < heightMinus1 )\n {\n yp += width;\n }\n }\n \n yi = x;\n stackIn = stackStart;\n stackOut = stackEnd;\n for ( y = 0; y < height; y++ )\n {\n p = yi << 2;\n pixels[p+3] = pa = (a_sum * mul_sum) >> shg_sum;\n if ( pa > 0 )\n {\n pa = 255 / pa;\n pixels[p] = ((r_sum * mul_sum) >> shg_sum ) * pa;\n pixels[p+1] = ((g_sum * mul_sum) >> shg_sum ) * pa;\n pixels[p+2] = ((b_sum * mul_sum) >> shg_sum ) * pa;\n } else {\n pixels[p] = pixels[p+1] = pixels[p+2] = 0;\n }\n \n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n a_sum -= a_out_sum;\n \n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n a_out_sum -= stackIn.a;\n \n p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2;\n \n r_sum += ( r_in_sum += ( stackIn.r = pixels[p]));\n g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1]));\n b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2]));\n a_sum += ( a_in_sum += ( stackIn.a = pixels[p+3]));\n \n stackIn = stackIn.next;\n \n r_out_sum += ( pr = stackOut.r );\n g_out_sum += ( pg = stackOut.g );\n b_out_sum += ( pb = stackOut.b );\n a_out_sum += ( pa = stackOut.a );\n \n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n a_in_sum -= pa;\n \n stackOut = stackOut.next;\n \n yi += width;\n }\n }\n \n context.putImageData( imageData, top_x, top_y );\n return imageData;\n}\n\n\nexport function stackBlurCanvasRGB(id, top_x, top_y, width, height, radius) {\n if(isNaN(radius) || radius < 1) return;\n radius |= 0;\n \n var canvas = document.getElementById(id);\n var context = canvas.getContext(\"2d\");\n var imageData;\n \n try {\n try {\n imageData = context.getImageData(top_x, top_y, width, height);\n } catch(e) {\n \n // NOTE: this part is supposedly only needed if you want to work with local files\n // so it might be okay to remove the whole try/catch block and just use\n // imageData = context.getImageData( top_x, top_y, width, height );\n try {\n //netscape.security.PrivilegeManager.enablePrivilege(\"UniversalBrowserRead\");\n imageData = context.getImageData(top_x, top_y, width, height);\n } catch(e) {\n //alert(\"Cannot access local image\");\n throw new Error(\"unable to access local image data: \" + e);\n return;\n }\n }\n } catch(e) {\n //alert(\"Cannot access image\");\n throw new Error(\"unable to access image data: \" + e);\n }\n \n var pixels = imageData.data;\n \n var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum,\n r_out_sum, g_out_sum, b_out_sum,\n r_in_sum, g_in_sum, b_in_sum,\n pr, pg, pb, rbs;\n \n var div = radius + radius + 1;\n var w4 = width << 2;\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n \n var stackStart = new BlurStack();\n var stack = stackStart;\n for(i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n if(i == radiusPlus1) var stackEnd = stack;\n }\n stack.next = stackStart;\n var stackIn = null;\n var stackOut = null;\n \n yw = yi = 0;\n \n var mul_sum = mul_table[radius];\n var shg_sum = shg_table[radius];\n \n for(y = 0; y < height; y++) {\n r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;\n \n r_out_sum = radiusPlus1 * ( pr = pixels[yi] );\n g_out_sum = radiusPlus1 * ( pg = pixels[yi+1] );\n b_out_sum = radiusPlus1 * ( pb = pixels[yi+2] );\n \n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n \n stack = stackStart;\n \n for( i = 0; i < radiusPlus1; i++ )\n {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack = stack.next;\n }\n \n for( i = 1; i < radiusPlus1; i++ )\n {\n p = yi + (( widthMinus1 < i ? widthMinus1 : i ) << 2 );\n r_sum += ( stack.r = ( pr = pixels[p])) * ( rbs = radiusPlus1 - i );\n g_sum += ( stack.g = ( pg = pixels[p+1])) * rbs;\n b_sum += ( stack.b = ( pb = pixels[p+2])) * rbs;\n \n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n \n stack = stack.next;\n }\n \n \n stackIn = stackStart;\n stackOut = stackEnd;\n for ( x = 0; x < width; x++ )\n {\n pixels[yi] = (r_sum * mul_sum) >> shg_sum;\n pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;\n pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;\n \n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n \n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n \n p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2;\n \n r_in_sum += ( stackIn.r = pixels[p]);\n g_in_sum += ( stackIn.g = pixels[p+1]);\n b_in_sum += ( stackIn.b = pixels[p+2]);\n \n r_sum += r_in_sum;\n g_sum += g_in_sum;\n b_sum += b_in_sum;\n \n stackIn = stackIn.next;\n \n r_out_sum += ( pr = stackOut.r );\n g_out_sum += ( pg = stackOut.g );\n b_out_sum += ( pb = stackOut.b );\n \n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n \n stackOut = stackOut.next;\n \n yi += 4;\n }\n yw += width;\n }\n \n \n for ( x = 0; x < width; x++ )\n {\n g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;\n \n yi = x << 2;\n r_out_sum = radiusPlus1 * ( pr = pixels[yi]);\n g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]);\n b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]);\n \n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n \n stack = stackStart;\n \n for( i = 0; i < radiusPlus1; i++ )\n {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack = stack.next;\n }\n \n yp = width;\n \n for( i = 1; i <= radius; i++ )\n {\n yi = ( yp + x ) << 2;\n \n r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i );\n g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs;\n b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs;\n \n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n \n stack = stack.next;\n \n if( i < heightMinus1 )\n {\n yp += width;\n }\n }\n \n yi = x;\n stackIn = stackStart;\n stackOut = stackEnd;\n for ( y = 0; y < height; y++ )\n {\n p = yi << 2;\n pixels[p] = (r_sum * mul_sum) >> shg_sum;\n pixels[p+1] = (g_sum * mul_sum) >> shg_sum;\n pixels[p+2] = (b_sum * mul_sum) >> shg_sum;\n \n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n \n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n \n p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2;\n \n r_sum += ( r_in_sum += ( stackIn.r = pixels[p]));\n g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1]));\n b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2]));\n \n stackIn = stackIn.next;\n \n r_out_sum += ( pr = stackOut.r );\n g_out_sum += ( pg = stackOut.g );\n b_out_sum += ( pb = stackOut.b );\n \n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n \n stackOut = stackOut.next;\n \n yi += width;\n }\n }\n \n context.putImageData(imageData, top_x, top_y);\n\n return imageData;\n}\n\nfunction BlurStack() {\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 0;\n this.next = null;\n}\n" + "depth": 1, + "source": "\nfunction Webp() {\nvar Module=typeof Module!==\"undefined\"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module[\"arguments\"]=[];Module[\"thisProgram\"]=\"./this.program\";Module[\"quit\"]=function(status,toThrow){throw toThrow};Module[\"preRun\"]=[];Module[\"postRun\"]=[];var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}else{return scriptDirectory+path}}if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}Module[\"read\"]=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){Module[\"readBinary\"]=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}Module[\"readAsync\"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module[\"setWindowTitle\"]=function(title){document.title=title}}else{}var out=Module[\"print\"]||(typeof console!==\"undefined\"?console.log.bind(console):typeof print!==\"undefined\"?print:null);var err=Module[\"printErr\"]||(typeof printErr!==\"undefined\"?printErr:typeof console!==\"undefined\"&&console.warn.bind(console)||out);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var STACK_ALIGN=16;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end<=_emscripten_get_heap_size()){HEAP32[DYNAMICTOP_PTR>>2]=end}else{var success=_emscripten_resize_heap(end);if(!success)return 0}return ret}function getNativeTypeSize(type){switch(type){case\"i1\":case\"i8\":return 1;case\"i16\":return 2;case\"i32\":return 4;case\"i64\":return 8;case\"float\":return 4;case\"double\":return 8;default:{if(type[type.length-1]===\"*\"){return 4}else if(type[0]===\"i\"){var bits=parseInt(type.substr(1));assert(bits%8===0,\"getNativeTypeSize invalid bits \"+bits+\", type \"+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var jsCallStartIndex=1;var functionPointers=new Array(0);var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module[\"dynCall_\"+sig].apply(null,[ptr].concat(args))}else{return Module[\"dynCall_\"+sig].call(null,ptr)}}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var GLOBAL_BASE=8;var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort(\"Assertion failed: \"+text)}}function getCFunc(ident){var func=Module[\"_\"+ident];assert(func,\"Cannot call unknown function \"+ident+\", make sure it is exported\");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={\"string\":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},\"array\":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType===\"string\")return UTF8ToString(ret);if(returnType===\"boolean\")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case\"i8\":HEAP8[ptr>>0]=value;break;case\"i16\":HEAP16[ptr>>1]=value;break;case\"i32\":HEAP32[ptr>>2]=value;break;case\"i64\":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case\"float\":HEAPF32[ptr>>2]=value;break;case\"double\":HEAPF64[ptr>>3]=value;break;default:abort(\"invalid type for setValue: \"+type)}}var ALLOC_NONE=3;var UTF8Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf8\"):undefined;function UTF8ArrayToString(u8Array,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(u8Array[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str=\"\";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\"}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf-16le\"):undefined;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function demangle(func){return func}function demangleAll(text){var regex=/__Z[\\w\\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+\" [\"+x+\"]\"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return\"(no stack trace available)\"}}return err.stack.toString()}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module[\"HEAP8\"]=HEAP8=new Int8Array(buffer);Module[\"HEAP16\"]=HEAP16=new Int16Array(buffer);Module[\"HEAP32\"]=HEAP32=new Int32Array(buffer);Module[\"HEAPU8\"]=HEAPU8=new Uint8Array(buffer);Module[\"HEAPU16\"]=HEAPU16=new Uint16Array(buffer);Module[\"HEAPU32\"]=HEAPU32=new Uint32Array(buffer);Module[\"HEAPF32\"]=HEAPF32=new Float32Array(buffer);Module[\"HEAPF64\"]=HEAPF64=new Float64Array(buffer)}var STACK_BASE=11056,DYNAMIC_BASE=5253936,DYNAMICTOP_PTR=10800;var TOTAL_STACK=5242880;var INITIAL_TOTAL_MEMORY=Module[\"TOTAL_MEMORY\"]||67108864;if(INITIAL_TOTAL_MEMORY>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback==\"function\"){callback();continue}var func=callback.func;if(typeof func===\"number\"){if(callback.arg===undefined){Module[\"dynCall_v\"](func)}else{Module[\"dynCall_vi\"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module[\"preRun\"]){if(typeof Module[\"preRun\"]==\"function\")Module[\"preRun\"]=[Module[\"preRun\"]];while(Module[\"preRun\"].length){addOnPreRun(Module[\"preRun\"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module[\"postRun\"]){if(typeof Module[\"postRun\"]==\"function\")Module[\"postRun\"]=[Module[\"postRun\"]];while(Module[\"postRun\"].length){addOnPostRun(Module[\"postRun\"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}if(!Math.imul||Math.imul(4294967295,5)!==-5)Math.imul=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};if(!Math.clz32)Math.clz32=function(x){var n=32;var y=x>>16;if(y){n-=16;x=y}y=x>>8;if(y){n-=8;x=y}y=x>>4;if(y){n-=4;x=y}y=x>>2;if(y){n-=2;x=y}y=x>>1;if(y)return n-2;return n-x};if(!Math.trunc)Math.trunc=function(x){return x<0?Math.ceil(x):Math.floor(x)};var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module[\"preloadedImages\"]={};Module[\"preloadedAudios\"]={};var memoryInitializer=null;var dataURIPrefix=\"data:application/octet-stream;base64,\";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}memoryInitializer=\"data:application/octet-stream;base64,AAAAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f38AAAAAAAAAAPDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AAP/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AGAcXGSgGJykWGiYqOAU3ORUbNjolK0gER0kUHDU7RkokLFhFSzQ8A1dZEx1WWiMtRExVWzM9aAJnaRIeZmoiLlRcQ01lazI+eAF3eVNdER9kbEJOdnohL3V7MT9jbVJeAHR8QU8QIGJuMHN9UV9Acn5hb1Bxf2BwAAAAAAAAAAAAAAAAAQAAAAMAAAAHAAAADwAAAB8AAAA/AAAAfwAAAP8AAAD/AQAA/wMAAP8HAAD/DwAA/x8AAP8/AAD/fwAA//8AAP//AQD//wMA//8HAP//DwD//x8A//8/AP//fwD///8AAAAAAAAAAAAAAAAAiguMC44LkguaC6oLygsKDIwMjA2MD4wTAAAAAAAAAAAREgABAgMEBRAGBwgJCgsMDQ4PAAAAAAAAAAAAAAAAADBS4Q2GGLMDy6xfd2piiBxVXDhoKLizFPj+hUpLuN1Jl/P8ZIkCVVwAAClK2sF+Dau3QFl9V5JUcsoZTmmM0zhl7gEMX3WhMlL2N1QyLLtasVeqD+cz9XPa7l9o4sxjdYMOmW7tpzBHxtnATzwVa0n6AxRPDPsaVDILmXMcy9cmBjfMb9h3uywqL3Z13cwlZGFUsyQVh30KqBQEIme/HhSDFbRW4wLlc2+xykRCTSYo+666c+3rUAr7tmodC9Q6DWg72zWDHggrlWvOd/DlgVG8O4V4lJSfADzt5ScAAAAAAAAEAAgADACAAIQAiACMAAABBAEIAQwBgAGEAYgBjAHneDBZc3F4mHCYs0B+qnYuRl+vRY9QVVJIm2c4Ogqr2r0RDZhyGhGjLMMVCq15GFDDGj4sQFWQRwomq9WQIhqqLjcTiKAhzkc/FAhyctAMCeJRKAtgtlQdECSGt1mJYmVqpZRIu2SCnW8gS1BCZqdjSj4o6oApNQmy8Y0aCGtKKxqSSaYxF51BJmmgMzQfc4BoTwwb2f9XEQdXREcscjMPuhcvKQ5utrcVEcJCLRlmxb0XEhZYWJOWKi4txM0rYbd1VSYjsz0nNchXGhUr6Ks4IjNocmYdXU0nHFWrOqVaYkAiFnTOFyIrpklrNiAaMwFRKx9EGWoWQKsk4XIiExVmhLwQTHw+Ek5fVTkyMDPBZSOf129ZLm88lB+s2+QVEm9wcU1Vs/8meHIoKgHE9dEKGW1YKx2MptUlK5o9Px6bQy1EAdFkUAgrmgEzGkeOTk4Q/4AixaspKAVm07cEAd0zMhGo0cAXGVKKHySrG6YmLOVDVzqpUnMaO7M/O1q0O6ZdSZooKBV0j9EiJ68vDxC3It8xLbcuESG3BmIPILc5LhYYgAE2ESVBIElzHIAXgM0oAwlzM8ASBt9XJQlzO01AFS9oNyzaCTY1guJAWkbNKCkXGjk2OXC4BSkmptUeIhqFmHQKIIYnEzXdGnIgSf8fCUHqAg8BdklLIAwzwP+gKzNYHyNDZlU3ulU4FRdvO80tJcA3JkZ8SWYBImJ9YipYaFV1r1JfVDVZgGRxZS1LT3svM4BRqwE5EQVHZjk1KTEmIQ15OUkaAVUpCkOKTW5aL3JzFQIKZv+mFwZlHRAKVYBlxBo5EgpmZtUiFCt1FA8ko4BEARpmPUclIjUf88BFPEcmSXcc3iVELYAiAS8L9as+ERNGklU3PkYlKyWaZKNVoAE/CVyIHEAgyVVLDwkJQP+4dxBWBhwFQP8Z+AE4CBGEif83dIA6DxRShzkaeSikMh+JmoUZI9ozZyyDg3sfBp5WKECHlOAtt4AWGhGD8JoOAdEtEBVbQN4HAcU4FSebPIoXZtVTDA02wP9ELxxVGlVVgIAgkqsSCwc/kKsEBPYjGwqSrqsMGoC+UCNjtFB+Ni1Vfi9XsDMpFCBlS4CLdpJ0gFU4KQ+w7FUlCT5HHhF3dv8REoplJjyKN0YrGo6SJBMeq/9hGxSKLT0+2wFRvEAgKRR1l44UFaNwEww9w4AwBBgAAAAAAAAAAAAAAAAAAf8C/gMEBv0F/Pv6B/kI+PcAAAAAAAAAAAAAAAAAAP///////////////////////////////////////////7D2////////////3/H8///////////5/f3////////////0/P//////////6v7+///////////9///////////////2/v//////////7/3+///////////+//7////////////4/v//////////+//+///////////////////////////9/v//////////+/7+///////////+//7////////////+/f/+////////+v/+//7////////+/////////////////////////////////////////////////////////9n/////////////4fzx/f///v/////q+vH6/f/9/v/////+////////////3/7+///////////u/f7+///////////4/v//////////+f7////////////////////////////9////////////9/7////////////////////////////9/v///////////P/////////////////////////////+/v///////////f/////////////////////////////+/f//////////+v/////////////+/////////////////////////////////////////////////////////7r7+v//////////6vv0/v/////////7+/P9/v/+///////9/v//////////7P3+///////////7/f3+/v/////////+/v///////////v7+///////////////////////////+/////////////v7////////////+/////////////////////////////v////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////j/////////////+v78/v/////////4/vn9///////////9/f//////////9v39///////////8/vv+/v/////////+/P//////////+P79///////////9//7+///////////7/v//////////9fv+///////////9/f7////////////7/f///////////P3+/////////////v/////////////8////////////+f/+//////////////7//////////////f//////////+v///////////////////////////////////////////v///////////////////////////4CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgP2I/v/k24CAgICAvYHy/+PV/9uAgIBqfuP81tH//4CAgAFi+P/s4v//gICAtYXu/t3q/5qAgIBOhsr3xrT/24CAgAG5+f/z/4CAgICAuJb3/+zggICAgIBNbtj/7OaAgICAgAFl+//x/4CAgICAqovx/OzR//+AgIAldMTz5P///4CAgAHM/v/1/4CAgICAz6D6/+6AgICAgIBmZ+f/06uAgICAgAGY/P/w/4CAgICAsYfz/+rhgICAgIBQgdP/wuCAgICAgAEB/4CAgICAgICA9gH/gICAgICAgID/gICAgICAgICAgMYj7d/Bu6KgkZs+gy3G3ayw3J383QFEL5LQlafdov/fgAGV8f/d4P//gICAuI3q/d7c/8eAgIBRY7XysL75yv//gAGB6P3WxfLE//+AY3nS+snG/8qAgIAXW6Pyqrv30v//gAHI9v/q/4CAgICAbbLx/+f1//+AgIAsgsn9zcD//4CAgAGE7/vb0f+lgICAXojh+9q+//+AgIAWZK71uqH/x4CAgAG2+f/o64CAgICAfI/x/+PqgICAgIAjTbX7wdP/zYCAgAGd9//s5///gICAeY3r/+Hj//+AgIAtY7z7w9n/4ICAgAEB+//V/4CAgICAywH4//+AgICAgICJAbH/4P+AgICAgP0J+PvP0P/AgICArw3g88G5+cb//4BJEavdobPsp//qgAFf9/3Ut///gICA71r0+tPR//+AgICbTcP4vMP//4CAgAEY7/va2//NgICAyTPb/8S6gICAgIBFLr7vydr/5ICAgAG/+///gICAgICA36X5/9X/gICAgICNfPj//4CAgICAgAEQ+P//gICAgICAviTm/+z/gICAgICVAf+AgICAgICAgAHi/4CAgICAgICA98D/gICAgICAgIDwgP+AgICAgICAgAGG/P//gICAgICA1T76//+AgICAgIA3Xf+AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMoY1eu6v9yg8K//fia26Km45K7/u4A9Lorbl7Lwqv/YgAFw5vrHv/ef//+Apm3k/NPX/66AgIAnTaLorLT1sv//gAE03PbGx/nc//+AfEq/87fB+t3//4AYR4Lbmqrztv//gAG24fnb8P/ggICAlZbi/NjN/6uAgIAcbKryt8L+3///gAFR5vzMy//AgICAe2bR97zE/+mAgIAUX5nzpK3/y4CAgAHe+P/Y1YCAgICAqK/2/OvN//+AgIAvdNf/09T//4CAgAF57P3U1v//gICAjVTV/MnK/9uAgIAqUKDworn/zYCAgAEB/4CAgICAgICA9AH/gICAgICAgIDuAf+AgICAgICAgAQFBgcICQoKCwwNDg8QERESExQUFRUWFhcXGBkZGhscHR4fICEiIyQlJSYnKCkqKywtLi4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xMTU5PUFFSU1RVVldYWVtdX2BiZGVmaGpsbnBydHZ6fH6AgoSGiIqMj5GUl5qdBAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdAB4AHwAgACEAIgAjACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA8AD4AQABCAEQARgBIAEoATABOAFAAUgBUAFYAWABaAFwAXgBgAGIAZABmAGgAagBsAG4AcAByAHQAdwB6AH0AgACDAIYAiQCMAI8AkgCVAJgAmwCeAKEApACnAKoArQCxALUAuQC9AMEAxQDJAM0A0QDVANkA3QDhAOUA6gDvAPUA+QD+AAMBCAENARIBFwEcAQABBAgFAgMGCQwNCgcLDg+pIwAArSMAALIjAAC4IwAAEQAKABEREQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAARAA8KERERAwoHAAETCQsLAAAJBgsAAAsABhEAAAAREREAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAEQAKChEREQAKAAACAAkLAAAACQALAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAADAAAAAAJDAAAAAAADAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAANAAAABA0AAAAACQ4AAAAAAA4AAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAADwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhISAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAASEhIAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAKAAAAAAoAAAAACQsAAAAAAAsAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAwMTIzNDU2Nzg5QUJDREVGDAQAAIAIAAD/CQAA/wwAALAfAAC0HwAAuB8AALwfAADAHwAAxB8AAMgfAAABAAAAAQAAAAIAAAACAAAAAwAAAAQAAADkHwAA6B8AAPAfAAAFAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAABQqAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD0KQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAExpYnJhcnkgdmVyc2lvbiBtaXNtYXRjaCEKAFVuYWJsZSB0byBzZXQgdmlkZW8gbW9kZSAoMzJicHAgJWR4JWQpIQoAVW5hYmxlIHRvIGNyZWF0ZSAlZHglZCBSR0JBIHN1cmZhY2UhCgBFcnJvciBkZWNvZGluZyBpbWFnZSAoJWQpCgACAwcDAwsDBAMEBAICBAQEAgEBCAcGBAQCAgIBAQEBAAIIQ291bGQgbm90IGRlY29kZSBhbHBoYSBkYXRhLgBGcmFtZSBzZXR1cCBmYWlsZWQAdGhyZWFkIGluaXRpYWxpemF0aW9uIGZhaWxlZC4Abm8gbWVtb3J5IGR1cmluZyBmcmFtZSBpbml0aWFsaXphdGlvbi4AUklGRgBXRUJQAFZQOFgAQUxQSABWUDggAFZQOEwAT0sAbnVsbCBWUDhJbyBwYXNzZWQgdG8gVlA4R2V0SGVhZGVycygpAFRydW5jYXRlZCBoZWFkZXIuAEluY29ycmVjdCBrZXlmcmFtZSBwYXJhbWV0ZXJzLgBGcmFtZSBub3QgZGlzcGxheWFibGUuAGNhbm5vdCBwYXJzZSBwaWN0dXJlIGhlYWRlcgBCYWQgY29kZSB3b3JkAGJhZCBwYXJ0aXRpb24gbGVuZ3RoAGNhbm5vdCBwYXJzZSBzZWdtZW50IGhlYWRlcgBjYW5ub3QgcGFyc2UgZmlsdGVyIGhlYWRlcgBjYW5ub3QgcGFyc2UgcGFydGl0aW9ucwBOb3QgYSBrZXkgZnJhbWUuAK2UjACwm4yHALSdjYaCAP7+8+bEsZmMhYKBAE5VTEwgVlA4SW8gcGFyYW1ldGVyIGluIFZQOERlY29kZSgpLgBQcmVtYXR1cmUgZW5kLW9mLXBhcnRpdGlvbjAgZW5jb3VudGVyZWQuAFByZW1hdHVyZSBlbmQtb2YtZmlsZSBlbmNvdW50ZXJlZC4AT3V0cHV0IGFib3J0ZWQuAC0rICAgMFgweAAobnVsbCkALTBYKzBYIDBYLTB4KzB4IDB4AGluZgBJTkYAbmFuAE5BTgAu\";var tempDoublePtr=11040;var PATH={splitPath:function(filename){var splitPathRe=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last===\".\"){parts.splice(i,1)}else if(last===\"..\"){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift(\"..\")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)===\"/\",trailingSlash=path.substr(-1)===\"/\";path=PATH.normalizeArray(path.split(\"/\").filter(function(p){return!!p}),!isAbsolute).join(\"/\");if(!path&&!isAbsolute){path=\".\"}if(path&&trailingSlash){path+=\"/\"}return(isAbsolute?\"/\":\"\")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return\".\"}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path===\"/\")return\"/\";var lastSlash=path.lastIndexOf(\"/\");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join(\"/\"))},join2:function(l,r){return PATH.normalize(l+\"/\"+r)},resolve:function(){var resolvedPath=\"\",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!==\"string\"){throw new TypeError(\"Arguments to path.resolve must be strings\")}else if(!path){return\"\"}resolvedPath=path+\"/\"+resolvedPath;resolvedAbsolute=path.charAt(0)===\"/\"}resolvedPath=PATH.normalizeArray(resolvedPath.split(\"/\").filter(function(p){return!!p}),!resolvedAbsolute).join(\"/\");return(resolvedAbsolute?\"/\":\"\")+resolvedPath||\".\"},relative:function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!==\"\")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split(\"/\"));var toParts=trim(to.split(\"/\"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker \"'+blocker.name+'\" took '+(Date.now()-start)+\" ms\");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}if(Browser.mainLoop.method===\"timeout\"&&Module.ctx){err(\"Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!\");Browser.mainLoop.method=\"\"}Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw\"SimulateInfiniteLoop\"}}var Browser={mainLoop:{scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module[\"setStatus\"]){var message=Module[\"statusMessage\"]||\"Please wait...\";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src=\"data:audio/x-\"+name.substr(-3)+\";base64,\"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module[\"preloadPlugins\"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document[\"pointerLockElement\"]===Module[\"canvas\"]||document[\"mozPointerLockElement\"]===Module[\"canvas\"]||document[\"webkitPointerLockElement\"]===Module[\"canvas\"]||document[\"msPointerLockElement\"]===Module[\"canvas\"]}var canvas=Module[\"canvas\"];if(canvas){canvas.requestPointerLock=canvas[\"requestPointerLock\"]||canvas[\"mozRequestPointerLock\"]||canvas[\"webkitRequestPointerLock\"]||canvas[\"msRequestPointerLock\"]||function(){};canvas.exitPointerLock=document[\"exitPointerLock\"]||document[\"mozExitPointerLock\"]||document[\"webkitExitPointerLock\"]||document[\"msExitPointerLock\"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener(\"pointerlockchange\",pointerLockChange,false);document.addEventListener(\"mozpointerlockchange\",pointerLockChange,false);document.addEventListener(\"webkitpointerlockchange\",pointerLockChange,false);document.addEventListener(\"mspointerlockchange\",pointerLockChange,false);if(Module[\"elementPointerLock\"]){canvas.addEventListener(\"click\",function(ev){if(!Browser.pointerLock&&Module[\"canvas\"].requestPointerLock){Module[\"canvas\"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!==\"undefined\"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext(\"2d\")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx===\"undefined\",\"cannot set in module if GLctx is used, but we are a non-GL context that would replace it\");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer===\"undefined\")Browser.lockPointer=true;if(typeof Browser.resizeCanvas===\"undefined\")Browser.resizeCanvas=false;if(typeof Browser.vrDevice===\"undefined\")Browser.vrDevice=null;var canvas=Module[\"canvas\"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module[\"onFullScreen\"])Module[\"onFullScreen\"](Browser.isFullscreen);if(Module[\"onFullscreen\"])Module[\"onFullscreen\"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener(\"fullscreenchange\",fullscreenChange,false);document.addEventListener(\"mozfullscreenchange\",fullscreenChange,false);document.addEventListener(\"webkitfullscreenchange\",fullscreenChange,false);document.addEventListener(\"MSFullscreenChange\",fullscreenChange,false)}var canvasContainer=document.createElement(\"div\");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer[\"requestFullscreen\"]||canvasContainer[\"mozRequestFullScreen\"]||canvasContainer[\"msRequestFullscreen\"]||(canvasContainer[\"webkitRequestFullscreen\"]?function(){canvasContainer[\"webkitRequestFullscreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null)||(canvasContainer[\"webkitRequestFullScreen\"]?function(){canvasContainer[\"webkitRequestFullScreen\"](Element[\"ALLOW_KEYBOARD_INPUT\"])}:null);if(vrDevice){canvasContainer.requestFullscreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullscreen()}},requestFullScreen:function(lockPointer,resizeCanvas,vrDevice){err(\"Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.\");Browser.requestFullScreen=function(lockPointer,resizeCanvas,vrDevice){return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document[\"exitFullscreen\"]||document[\"cancelFullScreen\"]||document[\"mozCancelFullScreen\"]||document[\"msExitFullscreen\"]||document[\"webkitCancelFullScreen\"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function requestAnimationFrame(func){if(typeof window===\"undefined\"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window[\"requestAnimationFrame\"]||window[\"mozRequestAnimationFrame\"]||window[\"webkitRequestAnimationFrame\"]||window[\"msRequestAnimationFrame\"]||window[\"oRequestAnimationFrame\"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){Module[\"noExitRuntime\"]=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){Module[\"noExitRuntime\"]=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{\"jpg\":\"image/jpeg\",\"jpeg\":\"image/jpeg\",\"png\":\"image/png\",\"bmp\":\"image/bmp\",\"ogg\":\"audio/ogg\",\"wav\":\"audio/wav\",\"mp3\":\"audio/mpeg\"}[name.substr(name.lastIndexOf(\".\")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator[\"getUserMedia\"]||navigator[\"mozGetUserMedia\"]}window.getUserMedia(func)},getMovementX:function(event){return event[\"movementX\"]||event[\"mozMovementX\"]||event[\"webkitMovementX\"]||0},getMovementY:function(event){return event[\"movementY\"]||event[\"mozMovementY\"]||event[\"webkitMovementY\"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case\"DOMMouseScroll\":delta=event.detail/3;break;case\"mousewheel\":delta=event.wheelDelta/120;break;case\"wheel\":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw\"unrecognized mouse wheel delta mode: \"+event.deltaMode}break;default:throw\"unrecognized mouse wheel event: \"+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!=\"mousemove\"&&\"mozMovementX\"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!=\"undefined\"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module[\"canvas\"].getBoundingClientRect();var cw=Module[\"canvas\"].width;var ch=Module[\"canvas\"].height;var scrollX=typeof window.scrollX!==\"undefined\"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!==\"undefined\"?window.scrollY:window.pageYOffset;if(event.type===\"touchstart\"||event.type===\"touchend\"||event.type===\"touchmove\"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type===\"touchstart\"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type===\"touchend\"||event.type===\"touchmove\"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency(\"al \"+url):\"\";Module[\"readAsync\"](url,function(arrayBuffer){assert(arrayBuffer,'Loading data file \"'+url+'\" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file \"'+url+'\" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module[\"canvas\"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module[\"canvas\"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!=\"undefined\"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module[\"canvas\"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module[\"forcedAspectRatio\"]&&Module[\"forcedAspectRatio\"]>0){if(w/h1)return 0;if(!surfData.buffer){surfData.buffer=_malloc(surfData.width*surfData.height*4);HEAP32[surf+20>>2]=surfData.buffer}HEAP32[surf+20>>2]=surfData.buffer;if(surf==SDL.screen&&Module.screenIsReadOnly&&surfData.image)return 0;if(SDL.defaults.discardOnLock){if(!surfData.image){surfData.image=surfData.ctx.createImageData(surfData.width,surfData.height)}if(!SDL.defaults.opaqueFrontBuffer)return}else{surfData.image=surfData.ctx.getImageData(0,0,surfData.width,surfData.height)}if(surf==SDL.screen&&SDL.defaults.opaqueFrontBuffer){var data=surfData.image.data;var num=data.length;for(var i=0;i>2],y:HEAP32[rect+4>>2],w:HEAP32[rect+8>>2],h:HEAP32[rect+12>>2]}},updateRect:function(rect,r){HEAP32[rect>>2]=r.x;HEAP32[rect+4>>2]=r.y;HEAP32[rect+8>>2]=r.w;HEAP32[rect+12>>2]=r.h},intersectionOfRects:function(first,second){var leftX=Math.max(first.x,second.x);var leftY=Math.max(first.y,second.y);var rightX=Math.min(first.x+first.w,second.x+second.w);var rightY=Math.min(first.y+first.h,second.y+second.h);return{x:leftX,y:leftY,w:Math.max(leftX,rightX)-leftX,h:Math.max(leftY,rightY)-leftY}},checkPixelFormat:function(fmt){},loadColorToCSSRGB:function(color){var rgba=HEAP32[color>>2];return\"rgb(\"+(rgba&255)+\",\"+(rgba>>8&255)+\",\"+(rgba>>16&255)+\")\"},loadColorToCSSRGBA:function(color){var rgba=HEAP32[color>>2];return\"rgba(\"+(rgba&255)+\",\"+(rgba>>8&255)+\",\"+(rgba>>16&255)+\",\"+(rgba>>24&255)/255+\")\"},translateColorToCSSRGBA:function(rgba){return\"rgba(\"+(rgba&255)+\",\"+(rgba>>8&255)+\",\"+(rgba>>16&255)+\",\"+(rgba>>>24)/255+\")\"},translateRGBAToCSSRGBA:function(r,g,b,a){return\"rgba(\"+(r&255)+\",\"+(g&255)+\",\"+(b&255)+\",\"+(a&255)/255+\")\"},translateRGBAToColor:function(r,g,b,a){return r|g<<8|b<<16|a<<24},makeSurface:function(width,height,flags,usePageCanvas,source,rmask,gmask,bmask,amask){flags=flags||0;var is_SDL_HWSURFACE=flags&1;var is_SDL_HWPALETTE=flags&2097152;var is_SDL_OPENGL=flags&67108864;var surf=_malloc(60);var pixelFormat=_malloc(44);var bpp=is_SDL_HWPALETTE?1:4;var buffer=0;if(!is_SDL_HWSURFACE&&!is_SDL_OPENGL){buffer=_malloc(width*height*4)}HEAP32[surf>>2]=flags;HEAP32[surf+4>>2]=pixelFormat;HEAP32[surf+8>>2]=width;HEAP32[surf+12>>2]=height;HEAP32[surf+16>>2]=width*bpp;HEAP32[surf+20>>2]=buffer;HEAP32[surf+36>>2]=0;HEAP32[surf+40>>2]=0;HEAP32[surf+44>>2]=Module[\"canvas\"].width;HEAP32[surf+48>>2]=Module[\"canvas\"].height;HEAP32[surf+56>>2]=1;HEAP32[pixelFormat>>2]=-2042224636;HEAP32[pixelFormat+4>>2]=0;HEAP8[pixelFormat+8>>0]=bpp*8;HEAP8[pixelFormat+9>>0]=bpp;HEAP32[pixelFormat+12>>2]=rmask||255;HEAP32[pixelFormat+16>>2]=gmask||65280;HEAP32[pixelFormat+20>>2]=bmask||16711680;HEAP32[pixelFormat+24>>2]=amask||4278190080;SDL.GL=SDL.GL||is_SDL_OPENGL;var canvas;if(!usePageCanvas){if(SDL.canvasPool.length>0){canvas=SDL.canvasPool.pop()}else{canvas=document.createElement(\"canvas\")}canvas.width=width;canvas.height=height}else{canvas=Module[\"canvas\"]}var webGLContextAttributes={antialias:SDL.glAttributes[13]!=0&&SDL.glAttributes[14]>1,depth:SDL.glAttributes[6]>0,stencil:SDL.glAttributes[7]>0,alpha:SDL.glAttributes[3]>0};var ctx=Browser.createContext(canvas,is_SDL_OPENGL,usePageCanvas,webGLContextAttributes);SDL.surfaces[surf]={width:width,height:height,canvas:canvas,ctx:ctx,surf:surf,buffer:buffer,pixelFormat:pixelFormat,alpha:255,flags:flags,locked:0,usePageCanvas:usePageCanvas,source:source,isFlagSet:function(flag){return flags&flag}};return surf},copyIndexedColorData:function(surfData,rX,rY,rW,rH){if(!surfData.colors){return}var fullWidth=Module[\"canvas\"].width;var fullHeight=Module[\"canvas\"].height;var startX=rX||0;var startY=rY||0;var endX=(rW||fullWidth-startX)+startX;var endY=(rH||fullHeight-startY)+startY;var buffer=surfData.buffer;if(!surfData.image.data32){surfData.image.data32=new Uint32Array(surfData.image.data.buffer)}var data32=surfData.image.data32;var colors32=surfData.colors32;for(var y=startY;y>0]]}}},freeSurface:function(surf){var refcountPointer=surf+56;var refcount=HEAP32[refcountPointer>>2];if(refcount>1){HEAP32[refcountPointer>>2]=refcount-1;return}var info=SDL.surfaces[surf];if(!info.usePageCanvas&&info.canvas)SDL.canvasPool.push(info.canvas);if(info.buffer)_free(info.buffer);_free(info.pixelFormat);_free(surf);SDL.surfaces[surf]=null;if(surf===SDL.screen){SDL.screen=null}},blitSurface:function(src,srcrect,dst,dstrect,scale){var srcData=SDL.surfaces[src];var dstData=SDL.surfaces[dst];var sr,dr;if(srcrect){sr=SDL.loadRect(srcrect)}else{sr={x:0,y:0,w:srcData.width,h:srcData.height}}if(dstrect){dr=SDL.loadRect(dstrect)}else{dr={x:0,y:0,w:srcData.width,h:srcData.height}}if(dstData.clipRect){var widthScale=!scale||sr.w===0?1:sr.w/dr.w;var heightScale=!scale||sr.h===0?1:sr.h/dr.h;dr=SDL.intersectionOfRects(dstData.clipRect,dr);sr.w=dr.w*widthScale;sr.h=dr.h*heightScale;if(dstrect){SDL.updateRect(dstrect,dr)}}var blitw,blith;if(scale){blitw=dr.w;blith=dr.h}else{blitw=sr.w;blith=sr.h}if(sr.w===0||sr.h===0||blitw===0||blith===0){return 0}var oldAlpha=dstData.ctx.globalAlpha;dstData.ctx.globalAlpha=srcData.alpha/255;dstData.ctx.drawImage(srcData.canvas,sr.x,sr.y,sr.w,sr.h,dr.x,dr.y,blitw,blith);dstData.ctx.globalAlpha=oldAlpha;if(dst!=SDL.screen){warnOnce(\"WARNING: copying canvas data to memory for compatibility\");_SDL_LockSurface(dst);dstData.locked--}return 0},downFingers:{},savedKeydown:null,receiveEvent:function(event){function unpressAllPressedKeys(){for(var code in SDL.keyboardMap){SDL.events.push({type:\"keyup\",keyCode:SDL.keyboardMap[code]})}}switch(event.type){case\"touchstart\":case\"touchmove\":{event.preventDefault();var touches=[];if(event.type===\"touchstart\"){for(var i=0;i0?Math.max(delta,1):Math.min(delta,-1);var button=delta>0?3:4;SDL.events.push({type:\"mousedown\",button:button,pageX:event.pageX,pageY:event.pageY});SDL.events.push({type:\"mouseup\",button:button,pageX:event.pageX,pageY:event.pageY});SDL.events.push({type:\"wheel\",deltaX:0,deltaY:delta});event.preventDefault();break;case\"mousemove\":if(SDL.DOMButtons[0]===1){SDL.events.push({type:\"touchmove\",touch:{identifier:0,deviceID:-1,pageX:event.pageX,pageY:event.pageY}})}if(Browser.pointerLock){if(\"mozMovementX\"in event){event[\"movementX\"]=event[\"mozMovementX\"];event[\"movementY\"]=event[\"mozMovementY\"]}if(event[\"movementX\"]==0&&event[\"movementY\"]==0){event.preventDefault();return}}case\"keydown\":case\"keyup\":case\"keypress\":case\"mousedown\":case\"mouseup\":if(event.type!==\"keydown\"||!SDL.unicode&&!SDL.textInput||(event.keyCode===8||event.keyCode===9)){event.preventDefault()}if(event.type==\"mousedown\"){SDL.DOMButtons[event.button]=1;SDL.events.push({type:\"touchstart\",touch:{identifier:0,deviceID:-1,pageX:event.pageX,pageY:event.pageY}})}else if(event.type==\"mouseup\"){if(!SDL.DOMButtons[event.button]){return}SDL.events.push({type:\"touchend\",touch:{identifier:0,deviceID:-1,pageX:event.pageX,pageY:event.pageY}});SDL.DOMButtons[event.button]=0}if(event.type===\"keydown\"||event.type===\"mousedown\"){SDL.canRequestFullscreen=true}else if(event.type===\"keyup\"||event.type===\"mouseup\"){if(SDL.isRequestingFullscreen){Module[\"requestFullscreen\"](true,true);SDL.isRequestingFullscreen=false}SDL.canRequestFullscreen=false}if(event.type===\"keypress\"&&SDL.savedKeydown){SDL.savedKeydown.keypressCharCode=event.charCode;SDL.savedKeydown=null}else if(event.type===\"keydown\"){SDL.savedKeydown=event}if(event.type!==\"keypress\"||SDL.textInput){SDL.events.push(event)}break;case\"mouseout\":for(var i=0;i<3;i++){if(SDL.DOMButtons[i]){SDL.events.push({type:\"mouseup\",button:i,pageX:event.pageX,pageY:event.pageY});SDL.DOMButtons[i]=0}}event.preventDefault();break;case\"focus\":SDL.events.push(event);event.preventDefault();break;case\"blur\":SDL.events.push(event);unpressAllPressedKeys();event.preventDefault();break;case\"visibilitychange\":SDL.events.push({type:\"visibilitychange\",visible:!document.hidden});unpressAllPressedKeys();event.preventDefault();break;case\"unload\":if(Browser.mainLoop.runner){SDL.events.push(event);Browser.mainLoop.runner()}return;case\"resize\":SDL.events.push(event);if(event.preventDefault){event.preventDefault()}break}if(SDL.events.length>=1e4){err(\"SDL event queue full, dropping events\");SDL.events=SDL.events.slice(0,1e4)}SDL.flushEventsToHandler();return},lookupKeyCodeForEvent:function(event){var code=event.keyCode;if(code>=65&&code<=90){code+=32}else{code=SDL.keyCodes[event.keyCode]||event.keyCode;if(event.location===KeyboardEvent.DOM_KEY_LOCATION_RIGHT&&code>=(224|1<<10)&&code<=(227|1<<10)){code+=4}}return code},handleEvent:function(event){if(event.handled)return;event.handled=true;switch(event.type){case\"touchstart\":case\"touchend\":case\"touchmove\":{Browser.calculateMouseEvent(event);break}case\"keydown\":case\"keyup\":{var down=event.type===\"keydown\";var code=SDL.lookupKeyCodeForEvent(event);HEAP8[SDL.keyboardState+code>>0]=down;SDL.modState=(HEAP8[SDL.keyboardState+1248>>0]?64:0)|(HEAP8[SDL.keyboardState+1249>>0]?1:0)|(HEAP8[SDL.keyboardState+1250>>0]?256:0)|(HEAP8[SDL.keyboardState+1252>>0]?128:0)|(HEAP8[SDL.keyboardState+1253>>0]?2:0)|(HEAP8[SDL.keyboardState+1254>>0]?512:0);if(down){SDL.keyboardMap[code]=event.keyCode}else{delete SDL.keyboardMap[code]}break}case\"mousedown\":case\"mouseup\":if(event.type==\"mousedown\"){SDL.buttonState|=1<0){if(SDL.makeCEvent(SDL.events.shift(),ptr)!==false)return 1}return 0}else{return SDL.events.length>0}},makeCEvent:function(event,ptr){if(typeof event===\"number\"){_memcpy(ptr,event,28);_free(event);return}SDL.handleEvent(event);switch(event.type){case\"keydown\":case\"keyup\":{var down=event.type===\"keydown\";var key=SDL.lookupKeyCodeForEvent(event);var scan;if(key>=1024){scan=key-1024}else{scan=SDL.scanCodes[key]||key}HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP8[ptr+8>>0]=down?1:0;HEAP8[ptr+9>>0]=0;HEAP32[ptr+12>>2]=scan;HEAP32[ptr+16>>2]=key;HEAP16[ptr+20>>1]=SDL.modState;HEAP32[ptr+24>>2]=event.keypressCharCode||key;break}case\"keypress\":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];var cStr=intArrayFromString(String.fromCharCode(event.charCode));for(var i=0;i>0]=cStr[i]}break}case\"mousedown\":case\"mouseup\":case\"mousemove\":{if(event.type!=\"mousemove\"){var down=event.type===\"mousedown\";HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP32[ptr+8>>2]=0;HEAP32[ptr+12>>2]=0;HEAP8[ptr+16>>0]=event.button+1;HEAP8[ptr+17>>0]=down?1:0;HEAP32[ptr+20>>2]=Browser.mouseX;HEAP32[ptr+24>>2]=Browser.mouseY}else{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP32[ptr+8>>2]=0;HEAP32[ptr+12>>2]=0;HEAP32[ptr+16>>2]=SDL.buttonState;HEAP32[ptr+20>>2]=Browser.mouseX;HEAP32[ptr+24>>2]=Browser.mouseY;HEAP32[ptr+28>>2]=Browser.mouseMovementX;HEAP32[ptr+32>>2]=Browser.mouseMovementY}break}case\"wheel\":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+16>>2]=event.deltaX;HEAP32[ptr+20>>2]=event.deltaY;break}case\"touchstart\":case\"touchend\":case\"touchmove\":{var touch=event.touch;if(!Browser.touches[touch.identifier])break;var w=Module[\"canvas\"].width;var h=Module[\"canvas\"].height;var x=Browser.touches[touch.identifier].x/w;var y=Browser.touches[touch.identifier].y/h;var lx=Browser.lastTouches[touch.identifier].x/w;var ly=Browser.lastTouches[touch.identifier].y/h;var dx=x-lx;var dy=y-ly;if(touch[\"deviceID\"]===undefined)touch.deviceID=SDL.TOUCH_DEFAULT_ID;if(dx===0&&dy===0&&event.type===\"touchmove\")return false;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=_SDL_GetTicks();tempI64=[touch.deviceID>>>0,(tempDouble=touch.deviceID,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr+8>>2]=tempI64[0],HEAP32[ptr+12>>2]=tempI64[1];tempI64=[touch.identifier>>>0,(tempDouble=touch.identifier,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr+16>>2]=tempI64[0],HEAP32[ptr+20>>2]=tempI64[1];HEAPF32[ptr+24>>2]=x;HEAPF32[ptr+28>>2]=y;HEAPF32[ptr+32>>2]=dx;HEAPF32[ptr+36>>2]=dy;if(touch.force!==undefined){HEAPF32[ptr+40>>2]=touch.force}else{HEAPF32[ptr+40>>2]=event.type==\"touchend\"?0:1}break}case\"unload\":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];break}case\"resize\":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=event.w;HEAP32[ptr+8>>2]=event.h;break}case\"joystick_button_up\":case\"joystick_button_down\":{var state=event.type===\"joystick_button_up\"?0:1;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP8[ptr+4>>0]=event.index;HEAP8[ptr+5>>0]=event.button;HEAP8[ptr+6>>0]=state;break}case\"joystick_axis_motion\":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP8[ptr+4>>0]=event.index;HEAP8[ptr+5>>0]=event.axis;HEAP32[ptr+8>>2]=SDL.joystickAxisValueConversion(event.value);break}case\"focus\":{var SDL_WINDOWEVENT_FOCUS_GAINED=12;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP8[ptr+8>>0]=SDL_WINDOWEVENT_FOCUS_GAINED;break}case\"blur\":{var SDL_WINDOWEVENT_FOCUS_LOST=13;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP8[ptr+8>>0]=SDL_WINDOWEVENT_FOCUS_LOST;break}case\"visibilitychange\":{var SDL_WINDOWEVENT_SHOWN=1;var SDL_WINDOWEVENT_HIDDEN=2;var visibilityEventID=event.visible?SDL_WINDOWEVENT_SHOWN:SDL_WINDOWEVENT_HIDDEN;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP8[ptr+8>>0]=visibilityEventID;break}default:throw\"Unhandled SDL event: \"+event.type}},makeFontString:function(height,fontName){if(fontName.charAt(0)!=\"'\"&&fontName.charAt(0)!='\"'){fontName='\"'+fontName+'\"'}return height+\"px \"+fontName+\", serif\"},estimateTextWidth:function(fontData,text){var h=fontData.size;var fontString=SDL.makeFontString(h,fontData.name);var tempCtx=SDL.ttfContext;tempCtx.save();tempCtx.font=fontString;var ret=tempCtx.measureText(text).width|0;tempCtx.restore();return ret},allocateChannels:function(num){if(SDL.numChannels&&SDL.numChannels>=num&&num!=0)return;SDL.numChannels=num;SDL.channels=[];for(var i=0;i>1]/32768}}else if(SDL.audio.format==8){for(var j=0;j>0];channelData[j]=(v>=0?v-128:v+128)/128}}else if(SDL.audio.format==33056){for(var j=0;j>2]}}else{throw\"Invalid SDL audio format \"+SDL.audio.format+\"!\"}}},debugSurface:function(surfData){console.log(\"dumping surface \"+[surfData.surf,surfData.source,surfData.width,surfData.height]);var image=surfData.ctx.getImageData(0,0,surfData.width,surfData.height);var data=image.data;var num=Math.min(surfData.width,surfData.height);for(var i=0;i0}},queryJoysticks:function(){for(var joystick in SDL.lastJoystickState){var state=SDL.getGamepad(joystick-1);var prevState=SDL.lastJoystickState[joystick];if(typeof state===\"undefined\")return;if(state===null)return;if(typeof state.timestamp!==\"number\"||state.timestamp!==prevState.timestamp||!state.timestamp){var i;for(i=0;ideviceIndex&&deviceIndex>=0){return gamepads[deviceIndex]}return null}};function _SDL_CreateRGBSurface(flags,width,height,depth,rmask,gmask,bmask,amask){return SDL.makeSurface(width,height,flags,false,\"CreateRGBSurface\",rmask,gmask,bmask,amask)}function _SDL_Flip(surf){}function _SDL_FreeSurface(surf){if(surf)SDL.freeSurface(surf)}function _SDL_Init(initFlags){SDL.startTime=Date.now();SDL.initFlags=initFlags;if(!Module[\"doNotCaptureKeyboard\"]){var keyboardListeningElement=Module[\"keyboardListeningElement\"]||document;keyboardListeningElement.addEventListener(\"keydown\",SDL.receiveEvent);keyboardListeningElement.addEventListener(\"keyup\",SDL.receiveEvent);keyboardListeningElement.addEventListener(\"keypress\",SDL.receiveEvent);window.addEventListener(\"focus\",SDL.receiveEvent);window.addEventListener(\"blur\",SDL.receiveEvent);document.addEventListener(\"visibilitychange\",SDL.receiveEvent)}window.addEventListener(\"unload\",SDL.receiveEvent);SDL.keyboardState=_malloc(65536);_memset(SDL.keyboardState,0,65536);SDL.DOMEventToSDLEvent[\"keydown\"]=768;SDL.DOMEventToSDLEvent[\"keyup\"]=769;SDL.DOMEventToSDLEvent[\"keypress\"]=771;SDL.DOMEventToSDLEvent[\"mousedown\"]=1025;SDL.DOMEventToSDLEvent[\"mouseup\"]=1026;SDL.DOMEventToSDLEvent[\"mousemove\"]=1024;SDL.DOMEventToSDLEvent[\"wheel\"]=1027;SDL.DOMEventToSDLEvent[\"touchstart\"]=1792;SDL.DOMEventToSDLEvent[\"touchend\"]=1793;SDL.DOMEventToSDLEvent[\"touchmove\"]=1794;SDL.DOMEventToSDLEvent[\"unload\"]=256;SDL.DOMEventToSDLEvent[\"resize\"]=28673;SDL.DOMEventToSDLEvent[\"visibilitychange\"]=512;SDL.DOMEventToSDLEvent[\"focus\"]=512;SDL.DOMEventToSDLEvent[\"blur\"]=512;SDL.DOMEventToSDLEvent[\"joystick_axis_motion\"]=1536;SDL.DOMEventToSDLEvent[\"joystick_button_down\"]=1539;SDL.DOMEventToSDLEvent[\"joystick_button_up\"]=1540;return 0}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){GL.miniTempBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=canvas.getContext(\"webgl\",webGLContextAttributes)||canvas.getContext(\"experimental-webgl\",webGLContextAttributes);return ctx&&GL.registerContext(ctx,webGLContextAttributes)},registerContext:function(ctx,webGLContextAttributes){var handle=_malloc(8);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};context.cannotHandleOffsetsInUniformArrayViews=function(g){function b(c,t){var s=g.createShader(t);g.shaderSource(s,c);g.compileShader(s);return s}try{var p=g.createProgram();g.attachShader(p,b(\"attribute vec4 p;void main(){gl_Position=p;}\",g.VERTEX_SHADER));g.attachShader(p,b(\"precision lowp float;uniform vec4 u;void main(){gl_FragColor=u;}\",g.FRAGMENT_SHADER));g.linkProgram(p);var h=new Float32Array(8);h[4]=1;g.useProgram(p);var l=g.getUniformLocation(p,\"u\");g.uniform4fv(l,h.subarray(4,8));return!g.getUniform(p,l)[0]}catch(e){return false}}();if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault===\"undefined\"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents===\"object\")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;_free(GL.contexts[contextHandle]);GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;if(context.version<2){var instancedArraysExt=GLctx.getExtension(\"ANGLE_instanced_arrays\");if(instancedArraysExt){GLctx[\"vertexAttribDivisor\"]=function(index,divisor){instancedArraysExt[\"vertexAttribDivisorANGLE\"](index,divisor)};GLctx[\"drawArraysInstanced\"]=function(mode,first,count,primcount){instancedArraysExt[\"drawArraysInstancedANGLE\"](mode,first,count,primcount)};GLctx[\"drawElementsInstanced\"]=function(mode,count,type,indices,primcount){instancedArraysExt[\"drawElementsInstancedANGLE\"](mode,count,type,indices,primcount)}}var vaoExt=GLctx.getExtension(\"OES_vertex_array_object\");if(vaoExt){GLctx[\"createVertexArray\"]=function(){return vaoExt[\"createVertexArrayOES\"]()};GLctx[\"deleteVertexArray\"]=function(vao){vaoExt[\"deleteVertexArrayOES\"](vao)};GLctx[\"bindVertexArray\"]=function(vao){vaoExt[\"bindVertexArrayOES\"](vao)};GLctx[\"isVertexArray\"]=function(vao){return vaoExt[\"isVertexArrayOES\"](vao)}}var drawBuffersExt=GLctx.getExtension(\"WEBGL_draw_buffers\");if(drawBuffersExt){GLctx[\"drawBuffers\"]=function(n,bufs){drawBuffersExt[\"drawBuffersWEBGL\"](n,bufs)}}}GLctx.disjointTimerQueryExt=GLctx.getExtension(\"EXT_disjoint_timer_query\");var automaticallyEnabledExtensions=[\"OES_texture_float\",\"OES_texture_half_float\",\"OES_standard_derivatives\",\"OES_vertex_array_object\",\"WEBGL_compressed_texture_s3tc\",\"WEBGL_depth_texture\",\"OES_element_index_uint\",\"EXT_texture_filter_anisotropic\",\"EXT_frag_depth\",\"WEBGL_draw_buffers\",\"ANGLE_instanced_arrays\",\"OES_texture_float_linear\",\"OES_texture_half_float_linear\",\"EXT_blend_minmax\",\"EXT_shader_texture_lod\",\"WEBGL_compressed_texture_pvrtc\",\"EXT_color_buffer_half_float\",\"WEBGL_color_buffer_float\",\"EXT_sRGB\",\"WEBGL_compressed_texture_etc1\",\"EXT_disjoint_timer_query\",\"WEBGL_compressed_texture_etc\",\"WEBGL_compressed_texture_astc\",\"EXT_color_buffer_float\",\"WEBGL_compressed_texture_s3tc_srgb\",\"EXT_disjoint_timer_query_webgl2\"];var exts=GLctx.getSupportedExtensions();if(exts&&exts.length>0){GLctx.getSupportedExtensions().forEach(function(ext){if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}})}},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i0){return}if(surfData.isFlagSet(2097152)){SDL.copyIndexedColorData(surfData)}else if(!surfData.colors){var data=surfData.image.data;var buffer=surfData.buffer;assert(buffer%4==0,\"Invalid buffer offset: \"+buffer);var src=buffer>>2;var dst=0;var isScreen=surf==SDL.screen;var num;if(typeof CanvasPixelArray!==\"undefined\"&&data instanceof CanvasPixelArray){num=data.length;while(dst>8&255;data[dst+2]=val>>16&255;data[dst+3]=isScreen?255:val>>24&255;src++;dst+=4}}else{var data32=new Uint32Array(data.buffer);if(isScreen&&SDL.defaults.opaqueFrontBuffer){num=data32.length;data32.set(HEAP32.subarray(src,src+num));var data8=new Uint8Array(data.buffer);var i=3;var j=i+4*num;if(num%8==0){while(i>0]*4;var start=base+x*4;data[start]=colors[val];data[start+1]=colors[val+1];data[start+2]=colors[val+2]}s+=width*3}}surfData.ctx.putImageData(surfData.image,0,0)}function _SDL_UpperBlit(src,srcrect,dst,dstrect){return SDL.blitSurface(src,srcrect,dst,dstrect,false)}var SYSCALLS={buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function flush_NO_FILESYSTEM(){var fflush=Module[\"_fflush\"];if(fflush)fflush(0);var buffers=SYSCALLS.buffers;if(buffers[1].length)SYSCALLS.printChar(1,10);if(buffers[2].length)SYSCALLS.printChar(2,10)}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;jLIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize>2]=value;return value}Module[\"requestFullScreen\"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){err(\"Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.\");Module[\"requestFullScreen\"]=Module[\"requestFullscreen\"];Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};Module[\"requestFullscreen\"]=function Module_requestFullscreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};Module[\"requestAnimationFrame\"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module[\"setCanvasSize\"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module[\"pauseMainLoop\"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module[\"resumeMainLoop\"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module[\"getUserMedia\"]=function Module_getUserMedia(){Browser.getUserMedia()};Module[\"createContext\"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};if(typeof dateNow!==\"undefined\"){_emscripten_get_now=dateNow}else if(typeof performance===\"object\"&&performance&&typeof performance[\"now\"]===\"function\"){_emscripten_get_now=function(){return performance[\"now\"]()}}else{_emscripten_get_now=Date.now}var GLctx;GL.init();var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i255){if(ASSERTIONS){assert(false,\"Character code \"+chr+\" (\"+String.fromCharCode(chr)+\") at offset \"+i+\" not in 0x00-0xFF.\")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join(\"\")}var decodeBase64=typeof atob===\"function\"?atob:function(input){var keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";var output=\"\";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i>2]|0,c[k>>2]|0,32,0)|0;if(!l){m=c[2043]|0;n=c[k>>2]|0;c[g>>2]=c[h>>2];c[g+4>>2]=n;Af(m,8571,g)|0;o=0;p=0;q=0;break}m=w(0,c[h>>2]|0,c[k>>2]|0,32,255,65280,16711680,-16777216)|0;if(!m){n=c[2043]|0;s=c[k>>2]|0;c[f>>2]=c[h>>2];c[f+4>>2]=s;Af(n,8612,f)|0;o=0;p=l;q=0;break}B(m|0)|0;c[i>>2]=1;c[h+44>>2]=c[m+8>>2];n=m+12|0;c[h+48>>2]=c[n>>2];c[h+56>>2]=c[m+20>>2];s=m+16|0;c[h+60>>2]=c[s>>2];k=r(c[n>>2]|0,c[s>>2]|0)|0;c[h+64>>2]=k;c[h+52>>2]=1;k=Oe(a,b,h)|0;if(k|0){s=c[2043]|0;c[e>>2]=k;Af(s,8650,e)|0;o=m;p=l;q=0;break}D(m|0);if(!(E(m|0,0,l|0,0)|0)){o=m;p=l;q=(x(l|0)|0)==0&1}else{o=m;p=l;q=0}}else{o=0;p=0;q=0}while(0);y(o|0);y(p|0);Xc(i);j=q;Y=d;return j|0}function oa(a){a=a|0;var b=0,d=0;b=a+2360|0;pa(c[b>>2]|0);c[b>>2]=0;c[a+2364>>2]=0;b=a+2344|0;a=c[b>>2]|0;if(!a){c[b>>2]=0;return}d=a+20|0;qa(c[d>>2]|0);c[d>>2]=0;pa(a);c[b>>2]=0;return}function pa(a){a=a|0;Qe(a);return}function qa(a){a=a|0;if(!a)return;ra(a);pa(a);return}function ra(a){a=a|0;var b=0,d=0,e=0;if(!a)return;pa(c[a+160>>2]|0);pa(c[a+172>>2]|0);sa(c[a+168>>2]|0);ta(a+124|0);ta(a+136|0);b=a+120|0;d=b+56|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(d|0));b=a+16|0;pa(c[b>>2]|0);c[b>>2]=0;b=a+176|0;if((c[b>>2]|0)>0){d=0;do{e=a+180+(d*20|0)+16|0;pa(c[e>>2]|0);c[e>>2]=0;d=d+1|0}while((d|0)<(c[b>>2]|0))}c[b>>2]=0;c[a+260>>2]=0;b=a+264|0;pa(c[b>>2]|0);c[b>>2]=0;c[a+12>>2]=0;return}function sa(a){a=a|0;if(!a)return;pa(a);return}function ta(a){a=a|0;if(!a)return;pa(c[a>>2]|0);c[a>>2]=0;return}function ua(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;h=c[e>>2]|0;i=e+88|0;j=c[i>>2]|0;if((f|0)<0|(g|0)<1|(g+f|0)>(j|0)){k=0;return k|0}l=b+2356|0;a:do if(!(c[l>>2]|0)){m=b+2344|0;n=c[m>>2]|0;do if(!n){o=va(1,0,144)|0;c[m>>2]=o;if(!o){k=0;return k|0}o=c[e>>2]|0;p=c[i>>2]|0;q=Cf(p|0,((p|0)<0)<<31>>31|0,o|0,((o|0)<0)<<31>>31|0)|0;o=wa(q,v()|0,1)|0;c[b+2360>>2]=o;if(((o|0?(c[b+2364>>2]=o,c[b+2368>>2]=0,q=c[m>>2]|0,p=c[b+2348>>2]|0,s=c[b+2352>>2]|0,t=p+1|0,u=s+-1|0,w=q+24|0,xa(),c[q+136>>2]=o,c[q>>2]=c[e>>2],o=e+4|0,x=q+4|0,c[x>>2]=c[o>>2],s>>>0>=2):0)?(s=a[p>>0]&3,y=q+8|0,c[y>>2]=s&255,z=d[p>>0]|0,c[q+12>>2]=(2?z>>>2:z)&3,z=d[p>>0]|0,A=(4?z>>>4:z)&3,c[q+16>>2]=A,(s&255)<=1):0)?!(A>>>0>1|(d[p>>0]|0)>63):0){ya(w,520)|0;za(0,w);c[q+64>>2]=q;c[w>>2]=c[e>>2];c[q+28>>2]=c[o>>2];c[q+96>>2]=c[e+72>>2];c[q+100>>2]=c[e+76>>2];c[q+104>>2]=c[e+80>>2];c[q+108>>2]=c[e+84>>2];c[q+112>>2]=c[i>>2];if(!(c[y>>2]|0))B=u>>>0>=(r(c[x>>2]|0,c[q>>2]|0)|0)>>>0&1;else B=Aa(q,t,u)|0;if(B|0){u=c[m>>2]|0;if((c[u+16>>2]|0)==1){C=j-f|0;D=u;E=16;break}else{c[b+2372>>2]=0;C=g;D=u;E=16;break}}}}else{C=g;D=n;E=16}while(0);do if((E|0)==16){n=c[D>>2]|0;u=c[D+112>>2]|0;if(c[D+8>>2]|0){t=C+f|0;if(!(Ba(D,t)|0))break;else F=t}else{t=b+2368|0;q=c[t>>2]|0;x=r(n,f)|0;y=(c[b+2348>>2]|0)+1+x|0;o=c[b+2364>>2]|0;w=o+x|0;x=D+12|0;p=c[x>>2]|0;A=(C|0)>0;if(!p)if(A){s=C+f+-1|0;z=y;G=0;H=w;while(1){Lf(H|0,z|0,n|0)|0;G=G+1|0;if((G|0)==(C|0))break;else{z=z+n|0;H=H+n|0}}I=o+(r(n,s)|0)|0}else I=q;else if(A){H=r(n,C+f+-1|0)|0;ga[c[9472+(p<<2)>>2]&31](q,y,w,n);if((C|0)!=1){z=y;G=w;J=1;do{z=z+n|0;K=G;G=G+n|0;ga[c[9472+(c[x>>2]<<2)>>2]&31](K,z,G,n);J=J+1|0}while((J|0)!=(C|0))}I=o+H|0}else I=q;c[t>>2]=I;F=C+f|0}if((F|0)<(u|0)){if(!(c[l>>2]|0))break a}else c[l>>2]=1;J=c[m>>2]|0;if(J|0){n=J+20|0;qa(c[n>>2]|0);c[n>>2]=0;pa(J)}c[m>>2]=0;J=c[b+2372>>2]|0;if((J|0)<=0)break a;n=c[e+84>>2]|0;G=(c[b+2364>>2]|0)+(r(n,h)|0)|0;z=c[e+76>>2]|0;if(Ca(G+z|0,(c[e+80>>2]|0)-z|0,(c[i>>2]|0)-n|0,h,J)|0)break a}while(0);J=b+2360|0;pa(c[J>>2]|0);c[J>>2]=0;c[b+2364>>2]=0;J=c[m>>2]|0;if(J|0){n=J+20|0;qa(c[n>>2]|0);c[n>>2]=0;pa(J)}c[m>>2]=0;k=0;return k|0}while(0);k=(c[b+2364>>2]|0)+(r(h,f)|0)|0;return k|0}function va(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=Cf(c|0,0,a|0,b|0)|0;e=v()|0;if(!((a|0)==0&(b|0)==0)?(f=Hf(2147418112,0,a|0,b|0)|0,b=v()|0,(d|0)!=(d|0)|(e|0)!=0|(b>>>0<0|(b|0)==0&f>>>0>>0)):0){g=0;return g|0}g=Re(a,c)|0;return g|0}function wa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=Cf(c|0,0,a|0,b|0)|0;e=v()|0;if(!((a|0)==0&(b|0)==0)?(f=Hf(2147418112,0,a|0,b|0)|0,b=v()|0,(d|0)!=(d|0)|(e|0)!=0|(b>>>0<0|(b|0)==0&f>>>0>>0)):0){g=0;return g|0}g=Pe(r(a,c)|0)|0;return g|0}function xa(){if(Te(10112)|0)return;if(c[2034]|0){c[2368]=0;c[2369]=1;c[2370]=2;c[2371]=3;c[2364]=0;c[2365]=1;c[2366]=2;c[2367]=3}c[2034]=0;Ue(10112)|0;return}function ya(a,b){a=a|0;b=b|0;var d=0;if((b&-256|0)!=512){d=0;return d|0}if(!a){d=1;return d|0}b=a;a=b+108|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(a|0));d=1;return d|0}function za(a,b){a=a|0;b=b|0;c[b+44>>2]=4;c[b+48>>2]=5;c[b+52>>2]=5;c[b+40>>2]=a;return}function Aa(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=va(1,0,272)|0;if(!f){g=0;return g|0}c[f>>2]=0;c[f+4>>2]=2;_a();h=c[b>>2]|0;i=f+100|0;c[i>>2]=h;j=b+4|0;k=c[j>>2]|0;l=f+104|0;c[l>>2]=k;m=b+24|0;c[f+8>>2]=m;c[b+64>>2]=b;c[m>>2]=h;c[b+28>>2]=k;c[f>>2]=0;$a(f+24|0,d,e);if(!(ab(c[b>>2]|0,c[j>>2]|0,1,f,0)|0)){ra(f);pa(f);g=0;return g|0}a:do if(((c[f+176>>2]|0)==1?(c[f+180>>2]|0)==3:0)?(c[f+120>>2]|0)<=0:0){j=c[f+164>>2]|0;if((j|0)>0){e=c[f+168>>2]|0;d=0;do{if(a[c[e+(d*548|0)+4>>2]>>0]|0){n=14;break a}if(a[c[e+(d*548|0)+8>>2]>>0]|0){n=14;break a}if(a[c[e+(d*548|0)+12>>2]>>0]|0){n=14;break a}d=d+1|0}while((d|0)<(j|0))}c[b+132>>2]=1;j=c[i>>2]|0;d=c[l>>2]|0;e=Cf(d|0,((d|0)<0)<<31>>31|0,j|0,((j|0)<0)<<31>>31|0)|0;j=v()|0;c[f+20>>2]=0;d=wa(e,j,1)|0;c[f+16>>2]=d;if(!d){c[f>>2]=1;n=19}else n=17}else n=14;while(0);do if((n|0)==14){c[b+132>>2]=0;d=c[b>>2]|0;j=c[i>>2]|0;e=c[l>>2]|0;k=Cf(e|0,((e|0)<0)<<31>>31|0,j|0,((j|0)<0)<<31>>31|0)|0;j=v()|0;e=d&65535;h=Jf(d|0,((d|0)<0)<<31>>31|0,4)|0;d=Df(h|0,v()|0,e|0,0)|0;h=Df(d|0,v()|0,k|0,j|0)|0;j=wa(h,v()|0,4)|0;c[f+16>>2]=j;if(!j){c[f>>2]=1;c[f+20>>2]=0;n=19;break}else{c[f+20>>2]=j+(k<<2)+(e<<2);n=17;break}}while(0);if((n|0)==17){c[b+20>>2]=f;g=1;return g|0}else if((n|0)==19){ra(f);pa(f);g=0;return g|0}return 0}function Ba(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Ha=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0;h=c[f+20>>2]|0;if((c[h+108>>2]|0)>=(g|0)){i=1;return i|0}j=f+132|0;if(!(c[j>>2]|0)){Da();f=c[h+16>>2]|0;if(!(c[j>>2]|0)){i=Ia(h,f,c[h+100>>2]|0,c[h+104>>2]|0,g,1)|0;return i|0}else k=f}else k=c[h+16>>2]|0;f=c[h+100>>2]|0;j=h+112|0;l=c[j>>2]|0;m=(l|0)/(f|0)|0;n=l-(r(m,f)|0)|0;o=h+24|0;p=r(c[h+104>>2]|0,f)|0;q=r(f,g)|0;s=c[h+148>>2]|0;a:do if((l|0)<(q|0)){t=h+152|0;u=c[t>>2]|0;if(!u)w=0;else{x=r(c[h+156>>2]|0,u?m>>u:m)|0;w=c[(c[h+160>>2]|0)+(x+(u?n>>u:n)<<2)>>2]|0}u=h+48|0;if(!(c[u>>2]|0)){x=h+168|0;y=h+44|0;z=h+160|0;A=h+156|0;B=h+40|0;C=h+36|0;D=m;E=n;F=l;G=(c[x>>2]|0)+(w*548|0)|0;while(1){if(!(E&s)){H=c[t>>2]|0;if(!H)I=0;else{J=r(c[A>>2]|0,H?D>>H:D)|0;I=c[(c[z>>2]|0)+(J+(H?E>>H:E)<<2)>>2]|0}K=(c[x>>2]|0)+(I*548|0)|0}else K=G;H=c[y>>2]|0;if((H|0)>31){Ea(o);L=c[y>>2]|0}else L=H;H=c[K>>2]|0;J=o;M=c[J>>2]|0;N=c[J+4>>2]|0;J=If(M|0,N|0,L&63|0)|0;v()|0;O=J&255;J=H+(O<<2)|0;P=a[J>>0]|0;if((P&255)>8){Q=L+8|0;c[y>>2]=Q;R=If(M|0,N|0,Q&63|0)|0;v()|0;S=J+((e[H+(O<<2)+2>>1]|0)<<2)+(((1<<(P&255)+-8)+-1&R)<<2)|0;T=S;U=a[S>>0]|0;V=Q}else{T=J;U=P;V=L}P=V+(U&255)|0;c[y>>2]=P;J=b[T+2>>1]|0;Q=J&65535;do if((J&65535)<256){a[k+F>>0]=J;S=F+1|0;R=E+1|0;if((R|0)>=(f|0)){O=D+1|0;if((D|0)<(g|0)&(O&15|0)==0){Fa(h,O);W=S;X=O;Y=0;Z=K}else{W=S;X=O;Y=0;Z=K}}else{W=S;X=D;Y=R;Z=K}}else{if((J&65535)>=280){_=F;$=0;aa=u;break a}R=Q+-258|0;S=1?R>>1:R;if((J&65535)<260){ba=Q+-256|0;ca=P;da=M;ea=N}else{R=(Ga(o,S)|0)+(((J&1|2)&65535)<>2]|0;da=c[S>>2]|0;ea=c[S+4>>2]|0}S=ba+1|0;R=c[K+16>>2]|0;O=If(da|0,ea|0,ca&63|0)|0;v()|0;H=O&255;O=R+(H<<2)|0;fa=a[O>>0]|0;if((fa&255)>8){ga=ca+8|0;c[y>>2]=ga;ha=If(da|0,ea|0,ga&63|0)|0;v()|0;ia=O+((e[R+(H<<2)+2>>1]|0)<<2)+(((1<<(fa&255)+-8)+-1&ha)<<2)|0;ja=ia;ka=a[ia>>0]|0;la=ga}else{ja=O;ka=fa;la=ca}fa=la+(ka&255)|0;c[y>>2]=fa;O=b[ja+2>>1]|0;ga=O&65535;if((fa|0)>31)Ea(o);fa=ga+-2|0;ia=1?fa>>1:fa;if((O&65535)<4)ma=ga;else ma=(Ga(o,ia)|0)+((ga&1|2)<120)na=ma+-119|0;else{ia=d[3584+ma>>0]|0;ga=(r(4?ia>>>4:ia,f)|0)+(8-(ia&15))|0;na=(ga|0)>1?ga:1}if((p-F|0)<(S|0)|(F|0)<(na|0)){_=F;$=0;aa=u;break a}ga=k+F|0;ia=ga+(0-na)|0;b:do if((S|0)>7){switch(na|0){case 1:{O=a[ia>>0]|0;oa=r(O&255,16843009)|0;pa=O;break}case 2:{O=d[ia>>0]|d[ia+1>>0]<<8;oa=(O&65535)*65537|0;pa=O&255;break}case 4:{O=d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24;oa=O;pa=O&255;break}default:{qa=54;break b}}do if(ga&3){O=ia+1|0;fa=ga+1|0;a[ga>>0]=pa;ha=oa<<24|(8?oa>>>8:oa);if(!(fa&3)){ra=ha;sa=ba;ta=fa;ua=O;va=2?ba>>>2:ba;qa=48;break}H=O;O=fa;fa=ha;ha=ba;while(1){R=H;H=H+1|0;wa=O;O=O+1|0;a[wa>>0]=a[R>>0]|0;fa=fa<<24|(8?fa>>>8:fa);xa=ha+-1|0;if(!(O&3))break;else ha=xa}if((ha|0)>4){ra=fa;sa=xa;ta=O;ua=H;va=2?xa>>2:xa;qa=48}else{ya=0;za=xa;Aa=O;Ba=H}}else{ra=oa;sa=S;ta=ga;ua=ia;va=2?S>>>2:S;qa=48}while(0);if((qa|0)==48){qa=0;R=0;do{c[ta+(R<<2)>>2]=ra;R=R+1|0}while((R|0)<(va|0));ya=R<<2;za=sa;Aa=ta;Ba=ua}if((ya|0)>=(za|0))break;wa=ya;do{a[Aa+wa>>0]=a[Ba+wa>>0]|0;wa=wa+1|0}while((wa|0)!=(za|0))}else qa=54;while(0);do if((qa|0)==54){qa=0;if((na|0)>=(S|0)){Lf(ga|0,ia|0,S|0)|0;break}if((S|0)<=0)break;wa=0;do{a[ga+wa>>0]=a[ia+wa>>0]|0;wa=wa+1|0}while((wa|0)!=(S|0))}while(0);ia=S+F|0;ga=S+E|0;if((ga|0)<(f|0)){Ca=D;Ha=ga}else{wa=D;R=ga;while(1){ga=R-f|0;Ja=wa+1|0;if((wa|0)<(g|0)&(Ja&15|0)==0)Fa(h,Ja);if((ga|0)<(f|0)){Ca=Ja;Ha=ga;break}else{wa=Ja;R=ga}}}if((ia|0)>=(q|0)|(Ha&s|0)==0){W=ia;X=Ca;Y=Ha;Z=K;break}R=c[t>>2]|0;if(!R)Ka=0;else{wa=r(c[A>>2]|0,R?Ca>>R:Ca)|0;Ka=c[(c[z>>2]|0)+(wa+(R?Ha>>R:Ha)<<2)>>2]|0}W=ia;X=Ca;Y=Ha;Z=(c[x>>2]|0)+(Ka*548|0)|0}while(0);if(c[u>>2]|0)break;if((c[B>>2]|0)==(c[C>>2]|0))La=(c[y>>2]|0)>64&1;else La=0;c[u>>2]=La;if((W|0)<(q|0)&(La|0)==0){D=X;E=Y;F=W;G=Z}else{Ma=X;Na=W;Oa=u;qa=73;break a}}c[u>>2]=1;Ma=X;Na=W;Oa=u;qa=73}else{Ma=m;Na=l;Oa=u;qa=73}}else{Ma=m;Na=l;Oa=h+48|0;qa=73}while(0);if((qa|0)==73){Fa(h,(Ma|0)>(g|0)?g:Ma);_=Na;$=1;aa=Oa}if(!(c[aa>>2]|0))if((c[h+40>>2]|0)==(c[h+36>>2]|0))Pa=(c[h+44>>2]|0)>64&1;else Pa=0;else Pa=1;c[aa>>2]=Pa;if($|0?!((p|0)>(_|0)&(Pa|0)!=0):0){c[j>>2]=_;i=1;return i|0}c[h>>2]=(Pa|0)==0?3:5;i=0;return i|0}function Ca(c,f,g,h,i){c=c|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;j=Y;Y=Y+256|0;k=j;l=(i|0)/25|0;if(i>>>0>100){m=0;Y=j;return m|0}if((c|0)==0|(f|0)<1|(g|0)<1){m=0;Y=j;return m|0}i=f+-1|0;n=(l<<1|1|0)>(f|0)?(1?i>>1:i):l;l=g+-1|0;o=(n<<1|1|0)>(g|0)?(1?l>>1:l):n;n=0-o|0;if((o|0)<=0){m=1;Y=j;return m|0}p=o<<1|1;q=f<<1;s=r(p+1|0,q)|0;t=wa(1,0,q+4094+s|0)|0;if(!t){m=0;Y=j;return m|0}u=t+((r(p,f)|0)<<1)|0;v=u+(0-f<<1)|0;Nf(v|0,0,q|0)|0;w=t+s|0;s=r(p,p)|0;Nf(k|0,0,256)|0;p=0;x=c;y=255;z=0;A=0;B=255;while(1){C=0;D=y;E=z;F=B;G=A;do{H=d[x+C>>0]|0;I=(F|0)>(H|0);D=I?H:D;F=I?H:F;I=(G|0)<(H|0);E=I?H:E;G=I?H:G;a[k+H>>0]=1;C=C+1|0}while((C|0)!=(f|0));p=p+1|0;if((p|0)==(g|0))break;else{x=x+h|0;y=D;z=E;A=G;B=F}}B=t;A=w+q|0;z=262144/(s>>>0)|0;s=-1;y=0;x=0;p=G-F|0;while(1){if(a[k+y>>0]|0){F=x+1|0;if((s|0)>-1){G=y-s|0;J=y;K=F;L=(G|0)<(p|0)?G:p}else{J=y;K=F;L=p}}else{J=s;K=x;L=p}y=y+1|0;if((y|0)==256)break;else{s=J;x=K;p=L}}p=A+2046|0;A=L<<2;x=L*12|0;L=2?x>>2:x;x=A-L|0;J=1;do{if((J|0)>(L|0))if((A|0)>(J|0))M=(r(A-J|0,L)|0)/(x|0)|0;else M=0;else M=J;s=2?M>>2:M;b[p+(J<<1)>>1]=s;b[p+(0-J<<1)>>1]=0-s;J=J+1|0}while((J|0)!=1024);b[p>>1]=0;if((K|0)>2&(n|0)<(g|0)){K=(f|0)>0;J=(o|0)<0;M=f-o|0;x=o+-1|0;L=o+1|0;A=~o;s=u+(i<<1)|0;i=q+-2-o|0;q=n;n=c;y=c;c=B;k=v;while(1){v=k;k=c;if(K){F=0;G=0;do{G=(G&65535)+(d[n+F>>0]|0)|0;C=G+(e[v+(F<<1)>>1]|0)|0;H=k+(F<<1)|0;b[u+(F<<1)>>1]=C-(e[H>>1]|0);b[H>>1]=C;F=F+1|0}while((F|0)!=(f|0))}F=k+(f<<1)|0;c=(F|0)==(u|0)?B:F;n=(q|0)>-1&(q|0)<(l|0)?n+h|0:n;if((q|0)<(o|0))N=y;else{if(J)O=0;else{F=0;do{v=r((e[u+(o-F<<1)>>1]|0)+(e[u+(x+F<<1)>>1]|0)&65535,z)|0;b[w+(F<<1)>>1]=16?v>>>16:v;F=F+1|0}while((F|0)!=(L|0));O=L}if((O|0)<(M|0)){F=O;do{v=r((e[u+(F+o<<1)>>1]|0)-(e[u+(F+A<<1)>>1]|0)&65535,z)|0;b[w+(F<<1)>>1]=16?v>>>16:v;F=F+1|0}while((F|0)!=(M|0));P=M}else P=O;if((P|0)<(f|0)){F=P;do{v=r((e[s>>1]<<1)-(e[u+(i-F<<1)>>1]|0)-(e[u+(F+A<<1)>>1]|0)&65535,z)|0;b[w+(F<<1)>>1]=16?v>>>16:v;F=F+1|0}while((F|0)!=(f|0))}if(K){F=0;do{v=y+F|0;G=d[v>>0]|0;if((E|0)>(G|0)&(D|0)<(G|0)){C=(b[p+((e[w+(F<<1)>>1]|0)-(G<<2)<<1)>>1]|0)+G|0;if(C>>>0>255)Q=((31?C>>31:C)&-255)+255|0;else Q=C&255;a[v>>0]=Q}F=F+1|0}while((F|0)!=(f|0))}N=y+h|0}q=q+1|0;if((q|0)==(g|0))break;else y=N}}pa(t);m=1;Y=j;return m|0}function Da(){if(Te(9944)|0)return;c[2028]=0;Ue(9944)|0;return}function Ea(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;b=a+16|0;e=a+20|0;f=c[e>>2]|0;a:do if((f|0)>7){g=a+8|0;h=c[a+12>>2]|0;i=f;j=c[b>>2]|0;while(1){if(j>>>0>=h>>>0){k=i;break a}l=a;m=If(c[l>>2]|0,c[l+4>>2]|0,8)|0;l=v()|0;n=a;c[n>>2]=m;c[n+4>>2]=l;n=Jf(d[(c[g>>2]|0)+j>>0]|0|0,0,56)|0;o=v()|0|l;l=a;c[l>>2]=n|m;c[l+4>>2]=o;j=j+1|0;c[b>>2]=j;o=i+-8|0;c[e>>2]=o;if((i|0)<=15){k=o;break}else i=o}}else k=f;while(0);f=a+24|0;if((c[f>>2]|0)==0?((k|0)<65?1:(c[b>>2]|0)!=(c[a+12>>2]|0)):0)return;c[f>>2]=1;c[e>>2]=0;return}function Fa(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=c[a+8>>2]|0;e=c[d+40>>2]|0;f=e+12|0;g=a+108|0;h=c[((c[f>>2]|0)>>>0<2?d+84|0:g)>>2]|0;i=c[g>>2]|0;j=(i|0)<(h|0)?h:i;if((j|0)>=(b|0)){k=a+116|0;c[k>>2]=b;c[g>>2]=b;return}i=c[d>>2]|0;d=(c[e+136>>2]|0)+(r(i,j)|0)|0;Sa(a+180|0,j,b,(c[a+16>>2]|0)+(r(c[a+100>>2]|0,j)|0)|0,d);h=c[f>>2]|0;if(!h){k=a+116|0;c[k>>2]=b;c[g>>2]=b;return}l=e+140|0;e=r(i,b+-1-j|0)|0;ga[c[9472+(h<<2)>>2]&31](c[l>>2]|0,d,d,i);h=j+1|0;if((h|0)!=(b|0)){j=d;m=h;do{h=j;j=j+i|0;ga[c[9472+(c[f>>2]<<2)>>2]&31](h,j,j,i);m=m+1|0}while((m|0)!=(b|0))}c[l>>2]=d+e;k=a+116|0;c[k>>2]=b;c[g>>2]=b;return}function Ga(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=a+24|0;if(!((b|0)<25&(c[e>>2]|0)==0)){c[e>>2]=1;c[a+20>>2]=0;f=0;return f|0}g=a;h=c[g>>2]|0;i=c[g+4>>2]|0;g=a+20|0;j=c[g>>2]|0;k=If(h|0,i|0,j&63|0)|0;v()|0;l=c[3712+(b<<2)>>2]&k;k=j+b|0;c[g>>2]=k;b=a+16|0;if((k|0)<=7){f=l;return f|0}j=a+8|0;m=c[a+12>>2]|0;n=c[b>>2]|0;o=h;h=i;i=k;while(1){if(n>>>0>=m>>>0){p=i;break}k=If(o|0,h|0,8)|0;q=v()|0;r=a;c[r>>2]=k;c[r+4>>2]=q;r=Jf(d[(c[j>>2]|0)+n>>0]|0|0,0,56)|0;o=r|k;h=v()|0|q;q=a;c[q>>2]=o;c[q+4>>2]=h;n=n+1|0;c[b>>2]=n;q=i+-8|0;c[g>>2]=q;if((i|0)<=15){p=q;break}else i=q}if((p|0)<65?1:(c[b>>2]|0)!=(c[a+12>>2]|0)){f=l;return f|0}c[e>>2]=1;c[g>>2]=0;f=l;return f|0}function Ha(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;d=a+108|0;e=c[d>>2]|0;f=b-e|0;g=a+100|0;if((f|0)<=0){h=a+116|0;c[h>>2]=b;c[d>>2]=b;return}i=c[g>>2]|0;j=a+8|0;k=a+20|0;l=a+176|0;m=f;f=(c[a+16>>2]|0)+((r(i,e)|0)<<2)|0;n=e;o=e;e=i;while(1){i=(m|0)<16?m:16;p=c[j>>2]|0;q=c[p+40>>2]|0;s=c[p>>2]|0;p=r(s,i)|0;t=(c[q+136>>2]|0)+(r(s,n)|0)|0;u=c[k>>2]|0;v=c[l>>2]|0;w=o+i|0;if((v|0)>0){x=v+-1|0;La(a+180+(x*20|0)|0,o,w,f,u);if((v|0)!=1){v=x;do{x=v;v=v+-1|0;La(a+180+(v*20|0)|0,o,w,u,u)}while((x|0)>1)}}else if((u|0)!=(f|0))Lf(u|0,f|0,r(i<<2,e)|0)|0;Za(u,t,p);w=i+n|0;v=q+12|0;x=c[v>>2]|0;if(x|0){y=q+140|0;z=c[y>>2]|0;if((m|0)>0){A=r(s,i+-1|0)|0;ga[c[9472+(x<<2)>>2]&31](z,t,t,s);x=n+1|0;if((x|0)!=(w|0)){B=t;C=x;do{x=B;B=B+s|0;ga[c[9472+(c[v>>2]<<2)>>2]&31](x,B,B,s);C=C+1|0}while((C|0)!=(w|0))}D=t+A|0}else D=z;c[y>>2]=D}C=m-i|0;s=c[g>>2]|0;if((C|0)<=0)break;B=f+((r(s,i)|0)<<2)|0;m=C;f=B;n=w;o=c[d>>2]|0;e=s}h=a+116|0;c[h>>2]=b;c[d>>2]=b;return}function Ia(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Fa=0,Ha=0,Ia=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0;l=f+112|0;m=c[l>>2]|0;n=(m|0)/(h|0)|0;o=m-(r(n,h)|0)|0;p=f+24|0;q=g+(m<<2)|0;s=g+((r(i,h)|0)<<2)|0;i=r(j,h)|0;t=g+(i<<2)|0;u=f+120|0;w=c[u>>2]|0;x=w+280|0;y=f+56|0;z=(c[y>>2]|0)==0?16777216:n;A=(w|0)>0;w=f+124|0;B=A?w:0;C=c[f+148>>2]|0;a:do if((m|0)<(i|0)){D=c[f+152>>2]|0;if(!D)E=0;else{F=r(c[f+156>>2]|0,D?n>>D:n)|0;E=c[(c[f+160>>2]|0)+(F+(D?o>>D:o)<<2)>>2]|0}D=g;F=f+64|0;G=f+96|0;H=f+152|0;I=f+136|0;J=f+168|0;K=f+160|0;L=f+156|0;M=f+44|0;N=(k|0)!=0;O=f+48|0;P=f+40|0;Q=f+36|0;R=B+4|0;S=s;T=(k|0)==0;U=n;V=o;W=q;X=q;Y=z;Z=(c[f+168>>2]|0)+(E*548|0)|0;while(1){_=X;if((U|0)<(Y|0))$=Y;else{aa=W-D|0;c[F>>2]=c[p>>2];c[F+4>>2]=c[p+4>>2];c[F+8>>2]=c[p+8>>2];c[F+12>>2]=c[p+12>>2];c[F+16>>2]=c[p+16>>2];c[F+20>>2]=c[p+20>>2];c[F+24>>2]=c[p+24>>2];c[F+28>>2]=c[p+28>>2];c[G>>2]=2?aa>>2:aa;if((c[u>>2]|0)>0)Ja(w,I);$=U+8|0}if(!(V&C)){aa=c[H>>2]|0;if(!aa)ba=0;else{ca=r(c[L>>2]|0,aa?U>>aa:U)|0;ba=c[(c[K>>2]|0)+(ca+(aa?V>>aa:V)<<2)>>2]|0}da=(c[J>>2]|0)+(ba*548|0)|0}else da=Z;do if(!(c[da+28>>2]|0)){if((c[M>>2]|0)>31)Ea(p);if(!(c[da+32>>2]|0)){aa=c[da>>2]|0;ca=p;ea=c[ca>>2]|0;ga=c[ca+4>>2]|0;ca=c[M>>2]|0;ha=If(ea|0,ga|0,ca&63|0)|0;v()|0;ia=ha&255;ha=aa+(ia<<2)|0;ja=a[ha>>0]|0;if((ja&255)>8){ka=ca+8|0;c[M>>2]=ka;la=If(ea|0,ga|0,ka&63|0)|0;v()|0;ma=ha+((e[aa+(ia<<2)+2>>1]|0)<<2)+(((1<<(ja&255)+-8)+-1&la)<<2)|0;na=ma;oa=a[ma>>0]|0;pa=ka}else{na=ha;oa=ja;pa=ca}c[M>>2]=pa+(oa&255);if(!(c[O>>2]|0)){qa=e[na+2>>1]|0;ra=ea;sa=ga}else{ta=U;ua=W;va=O;wa=1;xa=111;break a}}else{ga=p;ea=c[ga>>2]|0;ca=c[ga+4>>2]|0;ga=c[M>>2]|0;ja=If(ea|0,ca|0,ga&63|0)|0;v()|0;ha=ja&63;ja=c[da+36+(ha<<3)>>2]|0;ka=c[da+36+(ha<<3)+4>>2]|0;ha=ja+ga|0;if((ja|0)<256){c[M>>2]=ha;c[W>>2]=ka;ya=0}else{c[M>>2]=ha+-256;ya=ka}if(c[O>>2]|0){ta=U;ua=W;va=O;wa=1;xa=111;break a}if((c[P>>2]|0)==(c[Q>>2]|0)?(c[M>>2]|0)>=65:0){za=U;Aa=W;Ba=O;xa=108;break a}if(!ya){Ca=X;Da=_;xa=46;break}else{qa=ya;ra=ea;sa=ca}}if((c[P>>2]|0)==(c[Q>>2]|0)?(c[M>>2]|0)>=65:0){za=U;Aa=W;Ba=O;xa=108;break a}if((qa|0)<256){if(c[da+20>>2]|0){Fa=X;Ha=_;Ia=c[da+24>>2]|qa<<8;xa=45;break}ca=c[da+4>>2]|0;ea=c[M>>2]|0;ka=If(ra|0,sa|0,ea&63|0)|0;v()|0;ha=ka&255;ka=ca+(ha<<2)|0;ja=a[ka>>0]|0;if((ja&255)>8){ga=ea+8|0;c[M>>2]=ga;ma=If(ra|0,sa|0,ga&63|0)|0;v()|0;la=ka+((e[ca+(ha<<2)+2>>1]|0)<<2)+(((1<<(ja&255)+-8)+-1&ma)<<2)|0;Ka=la;La=a[la>>0]|0;Ma=ga}else{Ka=ka;La=ja;Ma=ea}ea=Ma+(La&255)|0;c[M>>2]=ea;ja=e[Ka+2>>1]|0;if((ea|0)>31){Ea(p);ka=p;Na=c[M>>2]|0;Oa=c[ka>>2]|0;Pa=c[ka+4>>2]|0}else{Na=ea;Oa=ra;Pa=sa}ea=c[da+8>>2]|0;ka=If(Oa|0,Pa|0,Na&63|0)|0;v()|0;ga=ka&255;ka=ea+(ga<<2)|0;la=a[ka>>0]|0;if((la&255)>8){ma=Na+8|0;c[M>>2]=ma;ha=If(Oa|0,Pa|0,ma&63|0)|0;v()|0;ca=ka+((e[ea+(ga<<2)+2>>1]|0)<<2)+(((1<<(la&255)+-8)+-1&ha)<<2)|0;Qa=ca;Ra=a[ca>>0]|0;Sa=ma}else{Qa=ka;Ra=la;Sa=Na}la=Sa+(Ra&255)|0;c[M>>2]=la;ka=e[Qa+2>>1]|0;ma=c[da+12>>2]|0;ca=If(Oa|0,Pa|0,la&63|0)|0;v()|0;ha=ca&255;ca=ma+(ha<<2)|0;ga=a[ca>>0]|0;if((ga&255)>8){ea=la+8|0;c[M>>2]=ea;ia=If(Oa|0,Pa|0,ea&63|0)|0;v()|0;aa=ca+((e[ma+(ha<<2)+2>>1]|0)<<2)+(((1<<(ga&255)+-8)+-1&ia)<<2)|0;Ta=aa;Ua=a[aa>>0]|0;Va=ea}else{Ta=ca;Ua=ga;Va=la}la=Va+(Ua&255)|0;c[M>>2]=la;if(c[O>>2]|0){ta=U;ua=W;va=O;wa=1;xa=111;break a}if(!((la|0)<65?1:(c[P>>2]|0)!=(c[Q>>2]|0))){za=U;Aa=W;Ba=O;xa=108;break a}Fa=X;Ha=_;Ia=ja<<16|qa<<8|ka|(e[Ta+2>>1]|0)<<24;xa=45;break}if((qa|0)>=280){if((qa|0)>=(x|0))break a;ka=qa+-280|0;ja=c[B>>2]|0;if(X>>>0>>0){la=W+-1+(0-_)|0;ga=2?la>>>2:la;la=X;do{ca=c[la>>2]|0;la=la+4|0;ea=c[R>>2]|0;aa=r(ca,506832829)|0;c[ja+((ea?aa>>>ea:aa)<<2)>>2]=ca}while(la>>>0>>0);la=X+4+(ga<<2)|0;Wa=la;Xa=la}else{Wa=X;Xa=_}Fa=Wa;Ha=Xa;Ia=c[ja+(ka<<2)>>2]|0;xa=45;break}la=qa+-256|0;ca=qa+-258|0;aa=1?ca>>1:ca;if((qa|0)<260){Ya=la;Za=ra;_a=sa}else{ca=(Ga(p,aa)|0)+((la&1|2)<>2]|0;_a=c[aa+4>>2]|0}aa=Ya+1|0;ca=c[da+16>>2]|0;la=c[M>>2]|0;ea=If(Za|0,_a|0,la&63|0)|0;v()|0;ia=ea&255;ea=ca+(ia<<2)|0;ha=a[ea>>0]|0;if((ha&255)>8){ma=la+8|0;c[M>>2]=ma;$a=If(Za|0,_a|0,ma&63|0)|0;v()|0;ab=ea+((e[ca+(ia<<2)+2>>1]|0)<<2)+(((1<<(ha&255)+-8)+-1&$a)<<2)|0;bb=ab;cb=a[ab>>0]|0;db=ma}else{bb=ea;cb=ha;db=la}la=db+(cb&255)|0;c[M>>2]=la;ha=b[bb+2>>1]|0;ea=ha&65535;if((la|0)>31)Ea(p);la=ea+-2|0;ma=1?la>>1:la;if((ha&65535)<4)eb=ea;else eb=(Ga(p,ma)|0)+((ea&1|2)<120)fb=eb+-119|0;else{ma=d[3584+eb>>0]|0;ea=(r(4?ma>>>4:ma,h)|0)+(8-(ma&15))|0;fb=(ea|0)>1?ea:1}if(c[O>>2]|0){ta=U;ua=W;va=O;wa=1;xa=111;break a}if((c[P>>2]|0)==(c[Q>>2]|0)?(c[M>>2]|0)>=65:0){za=U;Aa=W;Ba=O;xa=108;break a}ea=W;ma=ea-D|0;if(((2?ma>>2:ma)|0)<(fb|0))break a;ma=S-ea|0;if(((2?ma>>2:ma)|0)<(aa|0))break a;ma=W+(0-fb<<2)|0;do if((ea&3|0)==0&((aa|0)>3&(fb|0)<3)){if((fb|0)==1){ha=c[ma>>2]|0;gb=ha;hb=ha;ib=ha}else{ha=ma;la=c[ha>>2]|0;gb=la;hb=la;ib=c[ha+4>>2]|0}if(!(ea&4)){jb=aa;kb=W;lb=ma;mb=hb;nb=ib}else{c[W>>2]=gb;jb=Ya;kb=W+4|0;lb=ma+4|0;mb=ib;nb=hb}ha=1?jb>>>1:jb;la=0;do{ab=kb+(la<<3)|0;c[ab>>2]=mb;c[ab+4>>2]=nb;la=la+1|0}while(la>>>0>>0);ha=la<<1;if(!(jb&1))break;c[kb+(ha<<2)>>2]=c[lb+(ha<<2)>>2]}else{if((fb|0)>=(aa|0)){Lf(W|0,ma|0,aa<<2|0)|0;break}if((aa|0)<=0)break;ha=0;do{c[W+(ha<<2)>>2]=c[ma+(ha<<2)>>2];ha=ha+1|0}while((ha|0)!=(aa|0))}while(0);ma=W+(aa<<2)|0;ea=aa+V|0;b:do if((ea|0)<(h|0)){ob=U;pb=ea}else{if(T){ka=ea;ja=U;while(1){ga=ka-h|0;ha=ja+1|0;if((ga|0)<(h|0)){ob=ha;pb=ga;break b}else{ka=ga;ja=ha}}}ja=ea;ka=U;while(1){ha=ja-h|0;ga=ka+1|0;if((ka|0)<(j|0)&(ga&15|0)==0)fa[k&3](f,ga);if((ha|0)<(h|0)){ob=ga;pb=ha;break}else{ja=ha;ka=ga}}}while(0);if(!(pb&C))qb=da;else{ea=c[H>>2]|0;if(!ea)rb=0;else{aa=r(c[L>>2]|0,ea?ob>>ea:ob)|0;rb=c[(c[K>>2]|0)+(aa+(ea?pb>>ea:pb)<<2)>>2]|0}qb=(c[J>>2]|0)+(rb*548|0)|0}if(!(A&X>>>0>>0)){sb=ma;tb=ob;ub=pb;vb=qb;wb=X;break}ea=c[B>>2]|0;aa=W+3+((Ya<<2)-_)|0;ka=2?aa>>>2:aa;aa=X;do{ja=c[aa>>2]|0;aa=aa+4|0;ga=c[R>>2]|0;ha=r(ja,506832829)|0;c[ea+((ga?ha>>>ga:ha)<<2)>>2]=ja}while(aa>>>0>>0);sb=ma;tb=ob;ub=pb;vb=qb;wb=X+4+(ka<<2)|0}else{Fa=X;Ha=_;Ia=c[da+24>>2]|0;xa=45}while(0);if((xa|0)==45){xa=0;c[W>>2]=Ia;Ca=Fa;Da=Ha;xa=46}if((xa|0)==46){xa=0;_=W+4|0;aa=V+1|0;if((aa|0)>=(h|0)){ea=U+1|0;if(N&(U|0)<(j|0)&(ea&15|0)==0)fa[k&3](f,ea);if(A&Ca>>>0<_>>>0){ja=c[B>>2]|0;ha=(Ca>>>0>W>>>0?Ca:W)+3+(0-Da)|0;ga=2?ha>>>2:ha;ha=Ca;while(1){la=c[ha>>2]|0;ab=c[R>>2]|0;$a=r(la,506832829)|0;c[ja+((ab?$a>>>ab:$a)<<2)>>2]=la;if(ha>>>0>>0)ha=ha+4|0;else break}sb=_;tb=ea;ub=0;vb=da;wb=Ca+4+(ga<<2)|0}else{sb=_;tb=ea;ub=0;vb=da;wb=Ca}}else{sb=_;tb=U;ub=aa;vb=da;wb=Ca}}if(sb>>>0>>0){U=tb;V=ub;W=sb;X=wb;Y=$;Z=vb}else{za=tb;Aa=sb;Ba=O;xa=108;break}}}else{za=n;Aa=q;Ba=f+48|0;xa=108}while(0);if((xa|0)==108)if(!(c[Ba>>2]|0))if((c[f+40>>2]|0)==(c[f+36>>2]|0)){ta=za;ua=Aa;va=Ba;wa=(c[f+44>>2]|0)>64&1;xa=111}else{ta=za;ua=Aa;va=Ba;wa=0;xa=111}else{ta=za;ua=Aa;va=Ba;wa=1;xa=111}if((xa|0)==111){c[va>>2]=wa;va=(wa|0)==0;if(ua>>>0>>0&((va|(c[y>>2]|0)==0)^1)){c[f>>2]=5;y=f+64|0;c[p>>2]=c[y>>2];c[p+4>>2]=c[y+4>>2];c[p+8>>2]=c[y+8>>2];c[p+12>>2]=c[y+12>>2];c[p+16>>2]=c[y+16>>2];c[p+20>>2]=c[y+20>>2];c[p+24>>2]=c[y+24>>2];c[p+28>>2]=c[y+28>>2];c[l>>2]=c[f+96>>2];if((c[u>>2]|0)<=0){xb=1;return xb|0}Ja(f+136|0,w);xb=1;return xb|0}if(va){if(k|0)fa[k&3](f,(ta|0)>(j|0)?j:ta);c[f>>2]=0;ta=ua-g|0;c[l>>2]=2?ta>>2:ta;xb=1;return xb|0}}c[f>>2]=3;xb=0;return xb|0}function Ja(a,b){a=a|0;b=b|0;Lf(c[b>>2]|0,c[a>>2]|0,4<>2]|0)|0;return}function Ka(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;d=a+108|0;e=c[d>>2]|0;f=b-e|0;if((f|0)<=0){c[d>>2]=b;return}g=c[a+100>>2]|0;h=(c[a+16>>2]|0)+((r(g,e)|0)<<2)|0;i=c[a+8>>2]|0;j=c[a+20>>2]|0;k=c[i>>2]<<2;l=c[a+176>>2]|0;m=j;if((l|0)>0){n=l+-1|0;La(a+180+(n*20|0)|0,e,b,h,m);if((l|0)!=1){l=n;do{n=l;l=l+-1|0;La(a+180+(l*20|0)|0,e,b,m,m)}while((n|0)>1)}}else if((h|0)!=(m|0))Lf(j|0,h|0,r(f<<2,g)|0)|0;g=c[d>>2]|0;f=c[i+88>>2]|0;h=(f|0)<(b|0)?f:b;f=c[i+84>>2]|0;m=(f|0)>(g|0);e=m?f:g;if((h|0)<=(e|0)){c[d>>2]=b;return}l=j+(r(f-g|0,k)|0)|0;g=c[i+76>>2]|0;n=(m?l:j)+(g<<2)|0;c[i+8>>2]=e-f;f=(c[i+80>>2]|0)-g|0;c[i+12>>2]=f;g=h-e|0;c[i+16>>2]=g;e=a+12|0;h=c[e>>2]|0;j=c[h>>2]|0;if(j>>>0<=10){l=a+116|0;m=c[h+20>>2]|0;o=(c[h+16>>2]|0)+(r(m,c[l>>2]|0)|0)|0;p=(g|0)>0;if(!(c[i+92>>2]|0))if(p){q=g;s=n;t=o;while(1){Qa(s,f,j,t);if((q|0)>1){q=q+-1|0;s=s+k|0;t=t+m|0}else{u=g;break}}}else u=g;else if(p){p=a+268|0;t=0;s=0;while(1){q=n+(r(s,k)|0)|0;v=o+(r(t,m)|0)|0;w=g-s|0;x=Ma(c[p>>2]|0,w)|0;Na(q,k,c[(c[p>>2]|0)+44>>2]|0,x,0);s=(Oa(c[p>>2]|0,w,q,k)|0)+s|0;q=c[p>>2]|0;w=c[q+68>>2]|0;x=c[q+52>>2]|0;y=q+24|0;z=q+56|0;A=q+64|0;a:do if((c[A>>2]|0)<(c[z>>2]|0)){B=0;while(1){if((c[y>>2]|0)>0){C=B;break a}D=v+(r(B,m)|0)|0;Pa(q);Ta(w,x,1);Qa(w,x,j,D);D=B+1|0;if((c[A>>2]|0)<(c[z>>2]|0))B=D;else{C=D;break}}}else C=0;while(0);z=C+t|0;if((s|0)>=(g|0)){u=z;break}else t=z}}else u=0;c[l>>2]=(c[l>>2]|0)+u;c[d>>2]=b;return}u=a+116|0;l=c[u>>2]|0;t=(g|0)>0;b:do if(!(c[i+92>>2]|0))if(t){s=g;C=n;j=l;m=h;while(1){Ae(C,(c[m+16>>2]|0)+(r(c[m+32>>2]|0,j)|0)|0,f);p=1?j>>1:j;o=(c[m+20>>2]|0)+(r(c[m+36>>2]|0,p)|0)|0;Be(C,o,(c[m+24>>2]|0)+(r(c[m+40>>2]|0,p)|0)|0,f,j&1^1);p=c[m+28>>2]|0;if(p|0)Ya(C+3|0,0,f,1,p+(r(c[m+44>>2]|0,j)|0)|0,0)|0;p=j+1|0;if((s|0)<=1){E=p;break b}s=s+-1|0;C=C+k|0;j=p;m=c[e>>2]|0}}else E=l;else if(t){m=a+268|0;j=0;C=l;s=n;while(1){p=g-j|0;o=Ma(c[m>>2]|0,p)|0;Na(s,k,c[(c[m>>2]|0)+44>>2]|0,o,0);j=(Oa(c[m>>2]|0,p,s,k)|0)+j|0;s=s+(r(o,k)|0)|0;o=c[m>>2]|0;p=c[o+68>>2]|0;z=c[o+52>>2]|0;A=o+24|0;x=o+56|0;w=o+64|0;c:do if((c[w>>2]|0)<(c[x>>2]|0)){q=p+3|0;v=C;y=0;while(1){if((c[A>>2]|0)>0){F=y;break c}Pa(o);Ta(p,z,1);B=c[e>>2]|0;Ae(p,(c[B+16>>2]|0)+(r(c[B+32>>2]|0,v)|0)|0,z);D=1?v>>1:v;G=(c[B+20>>2]|0)+(r(c[B+36>>2]|0,D)|0)|0;Be(p,G,(c[B+24>>2]|0)+(r(c[B+40>>2]|0,D)|0)|0,z,v&1^1);D=c[B+28>>2]|0;if(D|0)Ya(q,0,z,1,D+(r(c[B+44>>2]|0,v)|0)|0,0)|0;B=y+1|0;if((c[w>>2]|0)<(c[x>>2]|0)){v=v+1|0;y=B}else{F=B;break}}}else F=0;while(0);x=F+C|0;if((j|0)>=(g|0)){E=x;break}else C=x}}else E=l;while(0);c[u>>2]=E;c[d>>2]=b;return}function La(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;h=Y;Y=Y+16|0;i=h;j=b+8|0;k=c[j>>2]|0;switch(c[b>>2]|0){case 2:{Ib(f,r(k,e-d|0)|0,g);Y=h;return}case 0:{if(!d){l=c[f>>2]|0;m=l+-16777216&-16711936|l&16711935;c[g>>2]=m;l=f+4|0;n=k+-1|0;o=g+4|0;if((k|0)>1){p=0;q=m;do{m=c[l+(p<<2)>>2]|0;q=(m&-16711936)+(q&-16711936)&-16711936|(m&16711935)+(q&16711935)&16711935;c[o+(p<<2)>>2]=q;p=p+1|0}while((p|0)!=(n|0))}s=1;t=f+(k<<2)|0;u=g+(k<<2)|0;v=n}else{s=d;t=f;u=g;v=k+-1|0}n=c[b+4>>2]|0;p=1<>>n:o;a:do if((s|0)<(e|0)){o=0-k|0;l=0-p|0;if((k|0)<=1){m=s;w=t;x=u;while(1){y=c[x+(o<<2)>>2]|0;z=c[w>>2]|0;c[x>>2]=(z&-16711936)+(y&-16711936)&-16711936|(z&16711935)+(y&16711935)&16711935;m=m+1|0;if((m|0)==(e|0))break a;else{w=w+(k<<2)|0;x=x+(k<<2)|0}}}x=(c[b+16>>2]|0)+((r(v,n?s>>n:s)|0)<<2)|0;w=s;m=t;y=u;while(1){z=c[y+(o<<2)>>2]|0;A=c[m>>2]|0;c[y>>2]=(A&-16711936)+(z&-16711936)&-16711936|(A&16711935)+(z&16711935)&16711935;z=1;A=x;while(1){B=c[A>>2]|0;C=(z&l)+p|0;D=z;z=(C|0)>(k|0)?k:C;E=y+(D<<2)|0;ga[c[9488+(((8?B>>>8:B)&15)<<2)>>2]&31](m+(D<<2)|0,E+(o<<2)|0,z-D|0,E);if((k|0)<=(C|0))break;else A=A+4|0}A=w+1|0;if((A|0)==(e|0))break;else{x=(A&q|0)==0?x+(v<<2)|0:x;w=A;m=m+(k<<2)|0;y=y+(k<<2)|0}}}while(0);if((c[b+12>>2]|0)==(e|0)){Y=h;return}Lf(g+(0-k<<2)|0,g+((r(k,~d+e|0)|0)<<2)|0,k<<2|0)|0;Y=h;return}case 1:{v=c[b+4>>2]|0;q=1<>>v:s;if((e|0)<=(d|0)){Y=h;return}s=(c[b+16>>2]|0)+((r(n,v?d>>v:d)|0)<<2)|0;v=i+1|0;y=i+2|0;if((u|0)<=0){m=(k|0)>0;w=g;x=s;o=d;l=f;while(1){a[i>>0]=0;a[i+1>>0]=0;a[i+2>>0]=0;if(m){A=c[x>>2]|0;a[i>>0]=A;a[v>>0]=8?A>>>8:A;a[y>>0]=16?A>>>16:A;Jb(i,l,t,w);F=l+(t<<2)|0;G=w+(t<<2)|0}else{F=l;G=w}A=o+1|0;if((A|0)==(e|0))break;else{w=G;x=(A&p|0)==0?x+(n<<2)|0:x;o=A;l=F}}Y=h;return}F=g;l=s;s=d;o=f;while(1){a[i>>0]=0;a[i+1>>0]=0;a[i+2>>0]=0;x=o+(u<<2)|0;G=l;w=o;m=F;do{A=G;G=G+4|0;z=c[A>>2]|0;a[i>>0]=z;a[v>>0]=8?z>>>8:z;a[y>>0]=16?z>>>16:z;Jb(i,w,q,m);w=w+(q<<2)|0;m=m+(q<<2)|0}while(w>>>0>>0);if(w>>>0<(o+(k<<2)|0)>>>0){x=c[G>>2]|0;a[i>>0]=x;a[v>>0]=8?x>>>8:x;a[y>>0]=16?x>>>16:x;Jb(i,w,t,m);H=w+(t<<2)|0;I=m+(t<<2)|0}else{H=w;I=m}x=s+1|0;if((x|0)==(e|0))break;else{F=I;l=(x&p|0)==0?l+(n<<2)|0:l;s=x;o=H}}Y=h;return}case 3:{H=b+4|0;o=c[H>>2]|0;if((f|0)==(g|0)&(o|0)>0){s=e-d|0;l=r(k,s)|0;n=k+-1+(1<>>o:n,s)|0;s=f+(l<<2)+(0-p<<2)|0;Mf(s|0,f|0,p<<2|0)|0;p=c[H>>2]|0;H=c[j>>2]|0;j=c[b+16>>2]|0;l=p?8>>>p:8;if((l|0)>=8){Pb(s,j,f,d,e,H);Y=h;return}n=(1<(d|0)&(H|0)>0)){Y=h;return}I=s;s=f;F=d;while(1){t=0;i=0;y=I;v=s;while(1){if(!(t&n)){q=c[y>>2]|0;J=(8?q>>>8:q)&255;K=y+4|0}else{J=i;K=y}c[v>>2]=c[j+((J&p)<<2)>>2];t=t+1|0;if((t|0)==(H|0))break;else{i=l?J>>>l:J;y=K;v=v+4|0}}F=F+1|0;if((F|0)==(e|0))break;else{I=K;s=s+(H<<2)|0}}Y=h;return}else{H=c[b+16>>2]|0;b=o?8>>>o:8;if((b|0)>=8){Pb(f,H,g,d,e,k);Y=h;return}s=(1<(d|0)&(k|0)>0)){Y=h;return}K=f;f=g;g=d;while(1){d=0;I=0;F=K;J=f;while(1){if(!(d&s)){l=c[F>>2]|0;L=(8?l>>>8:l)&255;M=F+4|0}else{L=I;M=F}c[J>>2]=c[H+((L&o)<<2)>>2];d=d+1|0;if((d|0)==(k|0))break;else{I=b?L>>>b:L;F=M;J=J+4|0}}g=g+1|0;if((g|0)==(e|0))break;else{K=M;f=f+(k<<2)|0}}Y=h;return}break}default:{Y=h;return}}}function Ma(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+32>>2]|0;e=((c[a+24>>2]|0)+-1+d|0)/(d|0)|0;return ((e|0)>(b|0)?b:e)|0}function Na(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if((d|0)<=0)return;f=0;g=a;while(1){Ta(g,c,e);f=f+1|0;if((f|0)==(d|0))break;else g=g+b|0}return}function Oa(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;f=a+24|0;if((b|0)<=0){g=0;return g|0}h=a+56|0;i=a+64|0;j=a+4|0;k=a+76|0;l=a+80|0;m=a+8|0;n=a+52|0;o=a+60|0;p=a+32|0;q=d;d=0;while(1){if((c[i>>2]|0)<(c[h>>2]|0)?(c[f>>2]|0)<=0:0){g=d;s=12;break}if(c[j>>2]|0){t=c[k>>2]|0;c[k>>2]=c[l>>2];c[l>>2]=t}Ra(a,q);if((c[j>>2]|0)==0?(r(c[n>>2]|0,c[m>>2]|0)|0)>0:0){t=c[l>>2]|0;u=c[k>>2]|0;v=0;do{w=u+(v<<2)|0;c[w>>2]=(c[w>>2]|0)+(c[t+(v<<2)>>2]|0);v=v+1|0}while((v|0)<(r(c[n>>2]|0,c[m>>2]|0)|0))}c[o>>2]=(c[o>>2]|0)+1;v=d+1|0;c[f>>2]=(c[f>>2]|0)-(c[p>>2]|0);if((v|0)<(b|0)){q=q+e|0;d=v}else{g=v;s=12;break}}if((s|0)==12)return g|0;return 0}function Pa(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=b+24|0;if((c[d>>2]|0)>=1)return;do if(!(c[b+4>>2]|0)){if(c[b+20>>2]|0){Cc(b);break}e=b+8|0;f=b+52|0;if((r(c[f>>2]|0,c[e>>2]|0)|0)>0){g=b+76|0;h=b+68|0;i=0;j=c[g>>2]|0;do{a[(c[h>>2]|0)+i>>0]=c[j+(i<<2)>>2];j=c[g>>2]|0;c[j+(i<<2)>>2]=0;i=i+1|0}while((i|0)<(r(c[f>>2]|0,c[e>>2]|0)|0))}}else Bc(b);while(0);c[d>>2]=(c[d>>2]|0)+(c[b+28>>2]|0);d=b+68|0;c[d>>2]=(c[d>>2]|0)+(c[b+72>>2]|0);d=b+64|0;c[d>>2]=(c[d>>2]|0)+1;return}function Qa(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;do switch(e|0){case 0:{Lb(b,d,f);return}case 1:{Kb(b,d,f);return}case 7:{Kb(b,d,f);Wa(f,0,d,1,0);return}case 2:{Mb(b,d,f);return}case 3:{Lf(f|0,b|0,d<<2|0)|0;return}case 8:{Lf(f|0,b|0,d<<2|0)|0;Wa(f,0,d,1,0);return}case 4:{g=b+(d<<2)|0;if((d|0)<=0)return;h=f;i=b;while(1){j=Kf(c[i>>2]|0)|0;i=i+4|0;a[h>>0]=j;a[h+1>>0]=j>>8;a[h+2>>0]=j>>16;a[h+3>>0]=j>>24;if(i>>>0>=g>>>0)break;else h=h+4|0}return}case 9:{h=b+(d<<2)|0;if((d|0)>0){g=f;i=b;while(1){j=Kf(c[i>>2]|0)|0;i=i+4|0;a[g>>0]=j;a[g+1>>0]=j>>8;a[g+2>>0]=j>>16;a[g+3>>0]=j>>24;if(i>>>0>=h>>>0)break;else g=g+4|0}}Wa(f,1,d,1,0);return}case 5:{Nb(b,d,f);return}case 10:{Nb(b,d,f);Va(f,d,1,0);return}case 6:{Ob(b,d,f);return}default:return}while(0)}function Ra(a,b){a=a|0;b=b|0;if(!(c[a>>2]|0)){Ec(a,b);return}else{Dc(a,b);return}}function Sa(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=c[b+4>>2]|0;j=i?8>>>i:8;k=c[b+8>>2]|0;l=c[b+16>>2]|0;if((j|0)>=8){Qb(g,l,h,e,f,k);return}b=(1<0))return;m=g;g=h;h=e;while(1){e=0;n=0;o=m;p=g;while(1){if(!(n&b)){q=d[o>>0]|0;r=o+1|0}else{q=e;r=o}s=c[l+((q&i)<<2)>>2]|0;a[p>>0]=8?s>>>8:s;n=n+1|0;if((n|0)==(k|0))break;else{e=j?q>>>j:q;o=r;p=p+1|0}}h=h+1|0;if((h|0)==(f|0))break;else{m=r;g=g+k|0}}return}function Ta(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((b|0)<=0)return;if(!d){d=0;do{e=a+(d<<2)|0;f=c[e>>2]|0;if(f>>>0<4278190080){if(f>>>0<16777216)g=0;else{h=(24?f>>>24:f)*65793|0;i=(r(h,f&255)|0)+8388608|0;j=(r(h,(8?f>>>8:f)&255)|0)+8388608|0;k=(r(h,(16?f>>>16:f)&255)|0)+8388608|0;g=(24?i>>>24:i)|f&-16777216|(24?j>>>24:j)<<8|(24?k>>>24:k)<<16}c[e>>2]=g}d=d+1|0}while((d|0)!=(b|0));return}else{d=0;do{g=a+(d<<2)|0;e=c[g>>2]|0;if(e>>>0<4278190080){if(e>>>0<16777216)l=0;else{k=4278190080/((24?e>>>24:e)>>>0)|0;j=(r(k,e&255)|0)+8388608|0;f=(r(k,(8?e>>>8:e)&255)|0)+8388608|0;i=(r(k,(16?e>>>16:e)&255)|0)+8388608|0;l=(24?j>>>24:j)|e&-16777216|(24?f>>>24:f)<<8|(24?i>>>24:i)<<16}c[g>>2]=l}d=d+1|0}while((d|0)!=(b|0));return}}function Ua(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((e|0)<=0)return;if(!f){f=0;do{g=a[c+f>>0]|0;switch(g<<24>>24){case -1:break;case 0:{a[b+f>>0]=0;break}default:{h=b+f|0;i=(r((g&255)*65793|0,d[h>>0]|0)|0)+8388608|0;a[h>>0]=24?i>>>24:i}}f=f+1|0}while((f|0)!=(e|0));return}else{f=0;do{i=a[c+f>>0]|0;switch(i<<24>>24){case -1:break;case 0:{a[b+f>>0]=0;break}default:{h=b+f|0;g=(r(4278190080/((i&255)>>>0)|0,d[h>>0]|0)|0)+8388608|0;a[h>>0]=24?g>>>24:g}}f=f+1|0}while((f|0)!=(e|0));return}}function Va(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if(!((c|0)>0&(e|0)>0))return;g=b;b=e;while(1){e=0;do{h=e<<1;i=g+h|0;j=g+(h|1)|0;h=a[j>>0]|0;k=h&15;l=(k&255)*4369|0;m=d[i>>0]|0;n=r(l,m&240|(4?m>>>4:m))|0;o=r(m<<4&240|m&15,l)|0;m=h&255;h=r(m&240|(4?m>>>4:m),l)|0;a[i>>0]=(20?o>>>20:o)&15|(16?n>>>16:n)&240;a[j>>0]=(16?h>>>16:h)&255&-16|k;e=e+1|0}while((e|0)!=(c|0));if((b|0)>1){g=g+f|0;b=b+-1|0}else break}return}function Wa(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((f|0)<=0)return;h=(c|0)!=0;c=h&1;i=h?0:3;if((e|0)<=0)return;h=b;b=f;while(1){f=b;b=b+-1|0;j=h+c|0;k=h+i|0;l=0;do{m=l<<2;n=a[k+m>>0]|0;if(n<<24>>24!=-1){o=(n&255)*32897|0;n=j+m|0;p=r(o,d[n>>0]|0)|0;a[n>>0]=23?p>>>23:p;p=j+(m|1)|0;n=r(o,d[p>>0]|0)|0;a[p>>0]=23?n>>>23:n;n=j+(m|2)|0;m=r(o,d[n>>0]|0)|0;a[n>>0]=23?m>>>23:m}l=l+1|0}while((l|0)!=(e|0));if((f|0)<=1)break;else h=h+g|0}return}function Xa(b,c,d,e,f,g){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;if(!((e|0)>0&(d|0)>0)){h=0;return h|0}i=0;j=255;k=f;f=b;while(1){b=0;l=j;do{m=a[f+b>>0]|0;a[k+(b<<2)>>0]=m;l=l&(m&255);b=b+1|0}while((b|0)!=(d|0));i=i+1|0;if((i|0)==(e|0))break;else{j=l;k=k+g|0;f=f+c|0}}h=(l|0)!=255&1;return h|0}function Ya(b,c,d,e,f,g){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;if(!((e|0)>0&(d|0)>0)){h=1;return h|0}i=0;j=-1;k=f;f=b;while(1){b=0;l=j;do{m=a[f+(b<<2)>>0]|0;a[k+b>>0]=m;l=m&l;b=b+1|0}while((b|0)!=(d|0));i=i+1|0;if((i|0)==(e|0))break;else{j=l;k=k+g|0;f=f+c|0}}h=l<<24>>24==-1&1;return h|0}function Za(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;if((e|0)<=0)return;f=0;do{g=c[b+(f<<2)>>2]|0;a[d+f>>0]=8?g>>>8:g;f=f+1|0}while((f|0)!=(e|0));return}function _a(){if(Te(9972)|0)return;if(c[2029]|0){c[2388]=1;c[2389]=2;c[2390]=3;c[2391]=4;c[2392]=5;c[2393]=6;c[2394]=7;c[2395]=8;c[2396]=9;c[2397]=10;c[2398]=11;c[2399]=12;c[2400]=13;c[2401]=14;c[2402]=1;c[2403]=1;c[2420]=1;c[2421]=2;c[2422]=3;c[2423]=4;c[2424]=5;c[2425]=6;c[2426]=7;c[2427]=8;c[2428]=9;c[2429]=10;c[2430]=11;c[2431]=12;c[2432]=13;c[2433]=14;c[2434]=1;c[2435]=1;c[2372]=4;c[2373]=5;c[2374]=6;c[2375]=7;c[2376]=8;c[2377]=9;c[2378]=10;c[2379]=11;c[2380]=12;c[2381]=13;c[2382]=14;c[2383]=15;c[2384]=16;c[2385]=17;c[2386]=4;c[2387]=4;c[2404]=4;c[2405]=5;c[2406]=6;c[2407]=7;c[2408]=8;c[2409]=9;c[2410]=10;c[2411]=11;c[2412]=12;c[2413]=13;c[2414]=14;c[2415]=15;c[2416]=16;c[2417]=17;c[2418]=4;c[2419]=4}c[2029]=0;Ue(9972)|0;return}function $a(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;c[a+12>>2]=e;f=a;c[f>>2]=0;c[f+4>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;f=e>>>0<8?e:8;if(!f){g=0;h=0}else{e=0;i=0;j=0;while(1){k=Jf(d[b+e>>0]|0|0,0,e<<3|0)|0;l=k|i;k=v()|0|j;e=e+1|0;if(e>>>0>=f>>>0){g=l;h=k;break}else{i=l;j=k}}}j=a;c[j>>2]=g;c[j+4>>2]=h;c[a+16>>2]=f;c[a+8>>2]=b;return}function ab(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,qa=0,ra=0,ua=0,xa=0,ya=0,za=0,Aa=0,Ba=0;k=Y;Y=Y+16|0;l=k;m=i+24|0;n=i+120|0;o=(h|0)!=0;a:do if(o){p=i+176|0;q=i+260|0;s=f;while(1){if(!(Ga(m,1)|0)){t=s;u=18;break a}w=c[p>>2]|0;x=Ga(m,2)|0;y=c[q>>2]|0;z=1<>2]=y|z;c[i+180+(w*20|0)>>2]=x;z=i+180+(w*20|0)+8|0;c[z>>2]=s;y=i+180+(w*20|0)+12|0;c[y>>2]=g;A=i+180+(w*20|0)+16|0;c[A>>2]=0;c[p>>2]=(c[p>>2]|0)+1;switch(x|0){case 1:case 0:{x=(Ga(m,3)|0)+2|0;c[i+180+(w*20|0)+4>>2]=x;B=(1<>2]|0)|0;D=B+(c[y>>2]|0)|0;E=ab(x?C>>>x:C,x?D>>>x:D,0,i,A)|0;F=s;break}case 3:{D=(Ga(m,8)|0)+1|0;if((D|0)>16)G=0;else G=(D|0)>4?1:(D|0)>2?2:3;x=(c[z>>2]|0)+-1+(1<>>G:x;x=i+180+(w*20|0)+4|0;c[x>>2]=G;if(!(ab(D,1,0,i,A)|0)){u=73;break a}w=c[x>>2]|0;x=1<<(w?8>>>w:8);w=wa(x,((x|0)<0)<<31>>31,4)|0;if(!w){u=73;break a}C=c[A>>2]|0;c[w>>2]=c[C>>2];y=D<<2;if((D|0)>1){D=4;while(1){a[w+D>>0]=(d[w+(D+-4)>>0]|0)+(d[C+D>>0]|0);B=D+1|0;if((B|0)<(y|0))D=B;else{H=B;break}}}else H=4;D=x<<2;if((D|0)>(H|0))Nf(w+H|0,0,D-H|0)|0;pa(c[A>>2]|0);c[A>>2]=w;E=1;F=z;break}default:{E=1;F=s}}if(!E){u=73;break a}else s=F}}else{t=f;u=18}while(0);do if((u|0)==18){if(Ga(m,1)|0){f=Ga(m,4)|0;if((f+-1|0)>>>0<11)I=f;else{c[i>>2]=3;J=0;break}}else I=0;c[l>>2]=0;f=e[3824+(I<<1)>>1]|0;do if((h|0)!=0?(Ga(m,1)|0)!=0:0){F=(Ga(m,3)|0)+2|0;E=(1<>>F:H;H=E+g|0;E=F?H>>>F:H;H=r(G,E)|0;if(ab(G,E,0,i,l)|0){c[i+152>>2]=F;F=(H|0)>0;if(F){E=c[l>>2]|0;G=0;s=1;while(1){p=E+(G<<2)|0;q=c[p>>2]|0;D=(8?q>>>8:q)&65535;c[p>>2]=D;p=(D|0)<(s|0)?s:D+1|0;G=G+1|0;if((G|0)==(H|0)){K=p;break}else s=p}}else K=1;if((K|0)>1e3|(K|0)>(r(t,g)|0)){s=wa(K,((K|0)<0)<<31>>31,4)|0;if(!s){c[i>>2]=1;L=0;M=0;N=1;O=0;P=0;break}Nf(s|0,-1,K<<2|0)|0;if(F){G=c[l>>2]|0;E=0;z=0;while(1){w=G+(z<<2)|0;A=s+(c[w>>2]<<2)|0;x=c[A>>2]|0;if((x|0)==-1){c[A>>2]=E;Q=E+1|0;R=E}else{Q=E;R=x}c[w>>2]=R;z=z+1|0;if((z|0)==(H|0)){S=s;T=K;U=Q;V=s;u=35;break}else E=Q}}else{S=s;T=K;U=0;V=s;u=35}}else{S=0;T=K;U=K;V=0;u=35}}else{L=0;M=0;N=1;O=0;P=0}}else{S=0;T=1;U=1;V=0;u=35}while(0);b:do if((u|0)==35)if(!(c[i+48>>2]|0)){E=(I|0)>0;H=1<-24?H+280|0:256;W=(z|0)>40?z:40;X=0}else{W=280;X=0}z=va(W,X,4)|0;G=r(U,f)|0;F=wa(G,((G|0)<0)<<31>>31,4)|0;G=bb(U)|0;if((F|0)==0|((z|0)==0|(G|0)==0)){c[i>>2]=1;L=G;M=F;N=1;O=z;P=V;break}if((T|0)>0){w=(S|0)==0;x=H+280|0;A=(H|0)>-279;p=H+280|0;H=F;D=0;while(1){do if(!w){q=c[S+(D<<2)>>2]|0;if((q|0)==-1)if(E){if(!(cb(p,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(40,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}else{Z=H;break}}else{if(!(cb(280,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(40,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}else{Z=H;break}}else{_=q;u=49}}else{_=D;u=49}while(0);do if((u|0)==49){u=0;q=G+(_*548|0)|0;c[q>>2]=H;if(E){y=cb(x,i,z,H)|0;if(!y){L=G;M=F;N=1;O=z;P=V;break b}C=d[H>>0]|0;B=H+(y<<2)|0;y=c[z>>2]|0;if(A){$=1;aa=y;while(1){ba=c[z+($<<2)>>2]|0;ca=(ba|0)>(aa|0)?ba:aa;$=$+1|0;if(($|0)==(x|0)){da=ca;break}else aa=ca}}else da=y;c[G+(_*548|0)+4>>2]=B;aa=cb(256,i,z,B)|0;if(!aa){L=G;M=F;N=1;O=z;P=V;break b}$=a[B>>0]|0;ca=C+($&255)|0;ba=B+(aa<<2)|0;aa=1;ea=c[z>>2]|0;do{fa=c[z+(aa<<2)>>2]|0;ea=(fa|0)>(ea|0)?fa:ea;aa=aa+1|0}while((aa|0)!=256);aa=ea+da|0;c[G+(_*548|0)+8>>2]=ba;B=cb(256,i,z,ba)|0;if(!B){L=G;M=F;N=1;O=z;P=V;break b}C=a[ba>>0]|0;y=$|C;fa=ca+(C&255)|0;C=ba+(B<<2)|0;B=1;ga=c[z>>2]|0;do{ha=c[z+(B<<2)>>2]|0;ga=(ha|0)>(ga|0)?ha:ga;B=B+1|0}while((B|0)!=256);B=ga+aa|0;c[G+(_*548|0)+12>>2]=C;ba=cb(256,i,z,C)|0;if(!ba){L=G;M=F;N=1;O=z;P=V;break b}ca=a[C>>0]|0;$=y|ca;ea=fa+(ca&255)|0;ca=C+(ba<<2)|0;ba=1;ha=c[z>>2]|0;do{ia=c[z+(ba<<2)>>2]|0;ha=(ia|0)>(ha|0)?ia:ha;ba=ba+1|0}while((ba|0)!=256);c[G+(_*548|0)+16>>2]=ca;ba=cb(40,i,z,ca)|0;if(!ba){L=G;M=F;N=1;O=z;P=V;break b}ja=ha+B|0;ka=$;la=ea+(d[ca>>0]|0)|0;ma=ca+(ba<<2)|0}else{ba=cb(280,i,z,H)|0;if(!ba){L=G;M=F;N=1;O=z;P=V;break b}C=d[H>>0]|0;fa=H+(ba<<2)|0;ba=1;y=c[z>>2]|0;do{aa=c[z+(ba<<2)>>2]|0;y=(aa|0)>(y|0)?aa:y;ba=ba+1|0}while(ba>>>0<280);c[G+(_*548|0)+4>>2]=fa;ba=cb(256,i,z,fa)|0;if(!ba){L=G;M=F;N=1;O=z;P=V;break b}ca=a[fa>>0]|0;ea=C+(ca&255)|0;$=fa+(ba<<2)|0;ba=1;B=c[z>>2]|0;do{ha=c[z+(ba<<2)>>2]|0;B=(ha|0)>(B|0)?ha:B;ba=ba+1|0}while(ba>>>0<256);ba=B+y|0;c[G+(_*548|0)+8>>2]=$;fa=cb(256,i,z,$)|0;if(!fa){L=G;M=F;N=1;O=z;P=V;break b}C=a[$>>0]|0;ha=ca|C;aa=ea+(C&255)|0;C=$+(fa<<2)|0;fa=1;ga=c[z>>2]|0;do{ia=c[z+(fa<<2)>>2]|0;ga=(ia|0)>(ga|0)?ia:ga;fa=fa+1|0}while(fa>>>0<256);fa=ga+ba|0;c[G+(_*548|0)+12>>2]=C;$=cb(256,i,z,C)|0;if(!$){L=G;M=F;N=1;O=z;P=V;break b}ea=a[C>>0]|0;ca=ha|ea;y=aa+(ea&255)|0;ea=C+($<<2)|0;$=1;B=c[z>>2]|0;do{ia=c[z+($<<2)>>2]|0;B=(ia|0)>(B|0)?ia:B;$=$+1|0}while($>>>0<256);c[G+(_*548|0)+16>>2]=ea;$=cb(40,i,z,ea)|0;if(!$){L=G;M=F;N=1;O=z;P=V;break b}ja=B+fa|0;ka=ca;la=y+(d[ea>>0]|0)|0;ma=ea+($<<2)|0}$=ka<<24>>24==0;c[G+(_*548|0)+20>>2]=$&1;C=G+(_*548|0)+28|0;c[C>>2]=0;if(($?($=(e[(c[G+(_*548|0)+4>>2]|0)+2>>1]|0)<<16|(e[(c[G+(_*548|0)+8>>2]|0)+2>>1]|0)|(e[(c[G+(_*548|0)+12>>2]|0)+2>>1]|0)<<24,aa=G+(_*548|0)+24|0,c[aa>>2]=$,(la|0)==0):0)?(ha=b[(c[q>>2]|0)+2>>1]|0,(ha&65535)<256):0){c[C>>2]=1;c[aa>>2]=(ha&65535)<<8|$;c[G+(_*548|0)+32>>2]=0;Z=ma;break}$=(ja|0)<6;c[G+(_*548|0)+32>>2]=$&1;if($){$=G+(_*548|0)+4|0;ha=G+(_*548|0)+8|0;aa=G+(_*548|0)+12|0;C=c[q>>2]|0;ba=0;do{ga=G+(_*548|0)+36+(ba<<3)|0;ia=C+(ba<<2)|0;na=e[ia>>1]|e[ia+2>>1]<<16;ia=16?na>>>16:na;if((ia&65535)>255){c[ga>>2]=na&255|256;c[G+(_*548|0)+36+(ba<<3)+4>>2]=ia}else{oa=G+(_*548|0)+36+(ba<<3)+4|0;qa=na&255;c[ga>>2]=qa;na=ia<<8;c[oa>>2]=na;ia=qa?ba>>>qa:ba;ra=c[$>>2]|0;ua=b[ra+(ia<<2)+2>>1]|0;xa=d[ra+(ia<<2)>>0]|0;ra=qa+xa|0;c[ga>>2]=ra;qa=(ua&65535)<<16|na;c[oa>>2]=qa;na=xa?ia>>>xa:ia;ia=c[ha>>2]|0;xa=b[ia+(na<<2)+2>>1]|0;ua=d[ia+(na<<2)>>0]|0;ia=ra+ua|0;c[ga>>2]=ia;ra=qa|xa&65535;c[oa>>2]=ra;xa=ua?na>>>ua:na;na=c[aa>>2]|0;ua=b[na+(xa<<2)+2>>1]|0;c[ga>>2]=ia+(d[na+(xa<<2)>>0]|0);c[oa>>2]=(ua&65535)<<24|ra}ba=ba+1|0}while((ba|0)!=64);Z=ma}else Z=ma}while(0);D=D+1|0;if((D|0)>=(T|0))break;else H=Z}}c[i+160>>2]=c[l>>2];c[i+164>>2]=U;c[i+168>>2]=G;c[i+172>>2]=F;L=G;M=F;N=0;O=z;P=V}else{L=0;M=0;N=1;O=0;P=V}while(0);pa(O);pa(P);if(N){pa(c[l>>2]|0);pa(M);sa(L);u=73;break}if((I|0)>0){c[n>>2]=1<>2]=1;J=0;break}}else c[n>>2]=0;f=c[i+152>>2]|0;c[i+100>>2]=t;c[i+104>>2]=g;H=(1<>2]=f?D>>>f:D;c[i+148>>2]=(f|0)==0?-1:H;if(!o){H=Cf(t|0,((t|0)<0)<<31>>31|0,g|0,((g|0)<0)<<31>>31|0)|0;f=wa(H,v()|0,4)|0;if(!f){c[i>>2]=1;J=0;break}if(!(Ia(i,f,t,g,g,0)|0)){J=f;break}if(!(c[i+48>>2]|0))ya=f;else{J=f;break}}else{c[i+4>>2]=1;ya=0}if(j|0)c[j>>2]=ya;c[i+112>>2]=0;if(o){za=1;Y=k;return za|0}pa(c[i+160>>2]|0);pa(c[i+172>>2]|0);sa(c[i+168>>2]|0);ta(i+124|0);ta(i+136|0);Aa=n;Ba=Aa+56|0;do{c[Aa>>2]=0;Aa=Aa+4|0}while((Aa|0)<(Ba|0));za=1;Y=k;return za|0}while(0);if((u|0)==73){c[i>>2]=3;J=0}pa(J);pa(c[i+160>>2]|0);pa(c[i+172>>2]|0);sa(c[i+168>>2]|0);ta(i+124|0);ta(i+136|0);Aa=n;Ba=Aa+56|0;do{c[Aa>>2]=0;Aa=Aa+4|0}while((Aa|0)<(Ba|0));za=0;Y=k;return za|0}function bb(a){a=a|0;return wa(a,((a|0)<0)<<31>>31,548)|0}function cb(a,e,f,g){a=a|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;h=Y;Y=Y+592|0;i=h+80|0;j=h;k=e+24|0;l=Ga(k,1)|0;Nf(f|0,0,a<<2|0)|0;a:do if(l){m=Ga(k,1)|0;n=(Ga(k,1)|0)==0;o=f+((Ga(k,n?1:8)|0)<<2)|0;c[o>>2]=1;if((m|0)==1){m=f+((Ga(k,8)|0)<<2)|0;c[m>>2]=1;p=26}else p=26}else{m=j;o=m+76|0;do{c[m>>2]=0;m=m+4|0}while((m|0)<(o|0));m=(Ga(k,4)|0)+4|0;if((m|0)>19){c[e>>2]=3;q=0;Y=h;return q|0}if((m|0)>0){o=0;do{n=Ga(k,3)|0;c[j+((d[3856+o>>0]|0)<<2)>>2]=n;o=o+1|0}while((o|0)!=(m|0))}b:do if(eb(i,7,j,19)|0){if(Ga(k,1)|0){m=(Ga(k,((Ga(k,3)|0)<<1)+2|0)|0)+2|0;if((m|0)>(a|0))break;else r=m}else r=a;c:do if((a|0)>0){m=e+44|0;o=0;n=8;s=r;while(1){if(!s)break c;s=s+-1|0;t=c[m>>2]|0;if((t|0)>31){Ea(k);u=c[m>>2]|0}else u=t;t=k;w=If(c[t>>2]|0,c[t+4>>2]|0,u&63|0)|0;v()|0;t=w&127;c[m>>2]=u+(d[i+(t<<2)>>0]|0);w=b[i+(t<<2)+2>>1]|0;t=w&65535;if((w&65535)>=16){x=t+-16|0;y=d[8680+x>>0]|0;z=(Ga(k,d[8677+x>>0]|0)|0)+y|0;if((z+o|0)>(a|0))break b;y=w<<16>>16==16?n:0;if((z|0)>0){x=z;z=o;while(1){A=z+1|0;c[f+(z<<2)>>2]=y;if((x|0)>1){x=x+-1|0;z=A}else{B=n;C=A;break}}}else{B=n;C=o}}else{c[f+(o<<2)>>2]=t;B=w<<16>>16==0?n:t;C=o+1|0}if((C|0)>=(a|0))break;else{o=C;n=B}}}while(0);p=26;break a}while(0);c[e>>2]=3}while(0);if(((p|0)==26?(c[e+48>>2]|0)==0:0)?(p=eb(g,8,f,a)|0,p|0):0){q=p;Y=h;return q|0}c[e>>2]=3;q=0;Y=h;return q|0}function db(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=1<>31,4)|0;c[a>>2]=e;if(!e){f=0;return f|0}c[a+4>>2]=32-b;c[a+8>>2]=b;f=1;return f|0}function eb(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=Y;Y=Y+1024|0;f=e;do if(a){if((d|0)<513){g=fb(a,b,c,d,f)|0;break}h=wa(d,((d|0)<0)<<31>>31,2)|0;if(!h)g=0;else{i=fb(a,b,c,d,h)|0;pa(h);g=i}}else g=fb(0,b,c,d,0)|0;while(0);Y=e;return g|0}function fb(d,f,g,h,i){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0;j=Y;Y=Y+128|0;k=j+64|0;l=j;m=1<>2]=0;n=n+4|0}while((n|0)<(o|0));n=(h|0)>0;do if(n){o=0;while(1){p=c[g+(o<<2)>>2]|0;if((p|0)>15){q=0;r=69;break}s=k+(p<<2)|0;c[s>>2]=(c[s>>2]|0)+1;o=o+1|0;if((o|0)>=(h|0)){r=5;break}}if((r|0)==5){t=c[k>>2]|0;break}else if((r|0)==69){Y=j;return q|0}}else t=0;while(0);if((t|0)==(h|0)){q=0;Y=j;return q|0}c[l+4>>2]=0;t=c[k+4>>2]|0;if((t|0)>2){q=0;Y=j;return q|0}c[l+8>>2]=t;o=c[k+8>>2]|0;if((o|0)>4){q=0;Y=j;return q|0}s=t+o|0;c[l+12>>2]=s;o=c[k+12>>2]|0;if((o|0)>8){q=0;Y=j;return q|0}p=s+o|0;c[l+16>>2]=p;o=c[k+16>>2]|0;if((o|0)>16){q=0;Y=j;return q|0}s=p+o|0;c[l+20>>2]=s;o=c[k+20>>2]|0;if((o|0)>32){q=0;Y=j;return q|0}p=s+o|0;c[l+24>>2]=p;o=c[k+24>>2]|0;if((o|0)>64){q=0;Y=j;return q|0}s=p+o|0;c[l+28>>2]=s;o=c[k+28>>2]|0;if((o|0)>128){q=0;Y=j;return q|0}p=s+o|0;c[l+32>>2]=p;o=c[k+32>>2]|0;if((o|0)>256){q=0;Y=j;return q|0}s=p+o|0;c[l+36>>2]=s;o=c[k+36>>2]|0;if((o|0)>512){q=0;Y=j;return q|0}p=s+o|0;c[l+40>>2]=p;o=c[k+40>>2]|0;if((o|0)>1024){q=0;Y=j;return q|0}s=p+o|0;c[l+44>>2]=s;o=c[k+44>>2]|0;if((o|0)>2048){q=0;Y=j;return q|0}p=s+o|0;c[l+48>>2]=p;o=c[k+48>>2]|0;if((o|0)>4096){q=0;Y=j;return q|0}s=p+o|0;c[l+52>>2]=s;o=c[k+52>>2]|0;if((o|0)>8192){q=0;Y=j;return q|0}p=s+o|0;c[l+56>>2]=p;o=c[k+56>>2]|0;if((o|0)>16384){q=0;Y=j;return q|0}s=p+o|0;o=l+60|0;c[o>>2]=s;if(n){if(!i){n=0;do{p=c[g+(n<<2)>>2]|0;if((p|0)>0){u=l+(p<<2)|0;c[u>>2]=(c[u>>2]|0)+1}n=n+1|0}while((n|0)!=(h|0))}else{n=0;do{u=c[g+(n<<2)>>2]|0;if((u|0)>0){p=l+(u<<2)|0;u=c[p>>2]|0;c[p>>2]=u+1;b[i+(u<<1)>>1]=n}n=n+1|0}while((n|0)!=(h|0))}v=c[o>>2]|0}else v=s;if((v|0)==1){if(!i){q=m;Y=j;return q|0}s=(e[i>>1]|0)<<16;h=m;do{n=h;h=h+-1|0;l=d+(h<<2)|0;b[l>>1]=s;b[l+2>>1]=s>>>16}while((n|0)>1);q=m;Y=j;return q|0}s=m+-1|0;if((f|0)>=1){h=2-t|0;n=(h|0)<0;a:do if(!d){if(n){q=0;Y=j;return q|0}l=1;g=h;u=3;while(1){if((l|0)>=(f|0)){w=g;x=u;y=0;z=0;break a}l=l+1|0;p=g<<1;g=p-(c[k+(l<<2)>>2]|0)|0;if((g|0)<0){q=0;break}else u=p+u|0}Y=j;return q|0}else{if(n){q=0;Y=j;return q|0}u=0;g=2;l=1;p=0;A=t;B=k+4|0;C=h;D=3;while(1){if((A|0)>0){E=l&255;F=1<>1]|0)<<16|E;L=m;do{L=L-g|0;M=J+(L<<2)|0;b[M>>1]=K;b[M+2>>1]=K>>>16}while((L|0)>0);L=F;while(1)if(!(L&G))break;else L=1?L>>>1:L;H=H+1|0;G=(L|0)==0?G:(L+-1&G)+L|0;K=I;I=I+-1|0}while((K|0)>1);c[B>>2]=I;N=G;O=H}else{N=u;O=p}F=l+1|0;if((l|0)>=(f|0)){w=C;x=D;y=N;z=O;break a}A=c[k+(F<<2)>>2]|0;E=C<<1;C=E-A|0;if((C|0)<0){q=0;break}else{u=N;g=g<<1;l=F;p=O;B=k+(F<<2)|0;D=E+D|0}}Y=j;return q|0}while(0);if((f|0)<15){P=w;Q=x;R=y;S=z;r=42}else{T=m;U=x;V=v}}else{P=1;Q=1;R=0;S=0;r=42}do if((r|0)==42){v=(d|0)!=0;x=d;z=-1;y=d;w=m;O=m;N=P;h=Q;t=2;n=f;D=R;B=S;while(1){p=n;n=n+1|0;l=N<<1;h=l+h|0;g=k+(n<<2)|0;u=c[g>>2]|0;N=l-u|0;if((N|0)<0){q=0;r=69;break}b:do if(v&(u|0)>0){l=n-f|0;C=l&255;A=1<=14){E=n&255;F=z;K=y;J=w;M=O;W=D;X=B;while(1){Z=W&s;if((Z|0)==(F|0)){_=M;$=F;aa=K;ba=J}else{ca=K+(M<<2)|0;a[d+(Z<<2)>>0]=E;da=ca-x|0;b[d+(Z<<2)+2>>1]=(2?da>>>2:da)-Z;_=A;$=Z;aa=ca;ba=A+J|0}ca=aa+((f?W>>>f:W)<<2)|0;Z=(e[i+(X<<1)>>1]|0)<<16|C;da=_;do{da=da-t|0;ea=ca+(da<<2)|0;b[ea>>1]=Z;b[ea+2>>1]=Z>>>16}while((da|0)>0);da=l;while(1)if(!(da&W))break;else da=1?da>>>1:da;Z=X+1|0;ca=(da|0)==0?W:(da+-1&W)+da|0;ea=c[g>>2]|0;c[g>>2]=ea+-1;if((ea|0)>1){F=$;K=aa;J=ba;M=_;W=ca;X=Z}else{fa=_;ga=$;ha=aa;ia=ba;ja=ca;ka=Z;break b}}}X=z;W=y;M=w;J=O;K=D;F=B;E=u;while(1){L=K&s;if((L|0)==(X|0)){la=J;ma=X;na=W;oa=M}else{Z=W+(J<<2)|0;ca=A-E|0;c:do if((ca|0)<1)pa=n;else{ea=n;qa=ca;while(1){ra=ea+1|0;if((ea|0)>=14){pa=ra;break c}qa=(qa<<1)-(c[k+(ra<<2)>>2]|0)|0;if((qa|0)<1){pa=ra;break}else ea=ra}}while(0);ca=1<>0]=pa;da=Z-x|0;b[d+(L<<2)+2>>1]=(2?da>>>2:da)-L;la=ca;ma=L;na=Z;oa=ca+M|0}ca=na+((f?K>>>f:K)<<2)|0;da=(e[i+(F<<1)>>1]|0)<<16|C;ea=la;do{ea=ea-t|0;qa=ca+(ea<<2)|0;b[qa>>1]=da;b[qa+2>>1]=da>>>16}while((ea|0)>0);ea=l;while(1)if(!(ea&K))break;else ea=1?ea>>>1:ea;da=F+1|0;ca=(ea|0)==0?K:(ea+-1&K)+ea|0;Z=c[g>>2]|0;E=Z+-1|0;c[g>>2]=E;if((Z|0)<=1){fa=la;ga=ma;ha=na;ia=oa;ja=ca;ka=da;break}else{X=ma;W=na;M=oa;J=la;K=ca;F=da}}}else{fa=O;ga=z;ha=y;ia=w;ja=D;ka=B}while(0);if((p|0)>=14){r=67;break}else{z=ga;y=ha;w=ia;O=fa;t=t<<1;D=ja;B=ka}}if((r|0)==67){T=ia;U=h;V=c[o>>2]|0;break}else if((r|0)==69){Y=j;return q|0}}while(0);q=(U|0)==((V<<1)+-1|0)?T:0;Y=j;return q|0}function gb(a,b){a=a|0;b=b|0;return -16777216}function hb(a,b){a=a|0;b=b|0;return a|0}function ib(a,b){a=a|0;b=b|0;return c[b>>2]|0}function jb(a,b){a=a|0;b=b|0;return c[b+4>>2]|0}function kb(a,b){a=a|0;b=b|0;return c[b+-4>>2]|0}function lb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=c[b>>2]|0;e=c[b+4>>2]|0;b=e^a;f=((1?b>>>1:b)&2139062143)+(e&a)|0;a=f^d;return ((1?a>>>1:a)&2139062143)+(f&d)|0}function mb(a,b){a=a|0;b=b|0;var d=0;d=c[b+-4>>2]|0;b=d^a;return ((1?b>>>1:b)&2139062143)+(d&a)|0}function nb(a,b){a=a|0;b=b|0;var d=0;d=c[b>>2]|0;b=d^a;return ((1?b>>>1:b)&2139062143)+(d&a)|0}function ob(a,b){a=a|0;b=b|0;var d=0;a=c[b+-4>>2]|0;d=c[b>>2]|0;b=d^a;return ((1?b>>>1:b)&2139062143)+(d&a)|0}function pb(a,b){a=a|0;b=b|0;var d=0;a=c[b>>2]|0;d=c[b+4>>2]|0;b=d^a;return ((1?b>>>1:b)&2139062143)+(d&a)|0}function qb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=c[b+-4>>2]|0;e=c[b>>2]|0;f=c[b+4>>2]|0;b=d^a;g=((1?b>>>1:b)&2139062143)+(d&a)|0;a=f^e;d=((1?a>>>1:a)&2139062143)+(f&e)|0;e=d^g;return ((1?e>>>1:e)&2139062143)+(d&g)|0}function rb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c[b>>2]|0;e=c[b+-4>>2]|0;b=24?e>>>24:e;f=(24?a>>>24:a)-b|0;g=(24?d>>>24:d)-b|0;b=(16?e>>>16:e)&255;h=((16?a>>>16:a)&255)-b|0;i=((16?d>>>16:d)&255)-b|0;b=(8?e>>>8:e)&255;j=((8?a>>>8:a)&255)-b|0;k=((8?d>>>8:d)&255)-b|0;b=e&255;e=(a&255)-b|0;l=(d&255)-b|0;return ((((e|0)>-1?e:0-e|0)-((l|0)>-1?l:0-l|0)-((g|0)>-1?g:0-g|0)+((f|0)>-1?f:0-f|0)-((k|0)>-1?k:0-k|0)+((j|0)>-1?j:0-j|0)-((i|0)>-1?i:0-i|0)+((h|0)>-1?h:0-h|0)|0)<1?d:a)|0}function sb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=c[b>>2]|0;e=c[b+-4>>2]|0;b=(24?d>>>24:d)+(24?a>>>24:a)-(24?e>>>24:e)|0;f=((16?d>>>16:d)&255)+((16?a>>>16:a)&255)-((16?e>>>16:e)&255)|0;g=((8?d>>>8:d)&255)+((8?a>>>8:a)&255)-((8?e>>>8:e)&255)|0;h=(d&255)+(a&255)-(e&255)|0;return (b>>>0<256?b:(24?b>>>24:b)^255)<<24|(h>>>0<256?h:(24?h>>>24:h)^255)|(f>>>0<256?f:(24?f>>>24:f)^255)<<16|(g>>>0<256?g:(24?g>>>24:g)^255)<<8|0}function tb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=c[b>>2]|0;e=c[b+-4>>2]|0;b=d^a;f=((1?b>>>1:b)&2139062143)+(d&a)|0;a=24?f>>>24:f;d=((a-(24?e>>>24:e)|0)/2|0)+a|0;a=(16?f>>>16:f)&255;b=((a-((16?e>>>16:e)&255)|0)/2|0)+a|0;a=(8?f>>>8:f)&255;g=((a-((8?e>>>8:e)&255)|0)/2|0)+a|0;a=f&255;f=((a-(e&255)|0)/2|0)+a|0;return (d>>>0<256?d:(24?d>>>24:d)^255)<<24|(f>>>0<256?f:(24?f>>>24:f)^255)|(b>>>0<256?b:(24?b>>>24:b)^255)<<16|(g>>>0<256?g:(24?g>>>24:g)^255)<<8|0}function ub(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;if((d|0)<=0)return;b=0;do{f=c[a+(b<<2)>>2]|0;c[e+(b<<2)>>2]=f+-16777216&-16711936|f&16711935;b=b+1|0}while((b|0)!=(d|0));return}function vb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;if((d|0)<=0)return;b=0;f=c[e+-4>>2]|0;do{g=c[a+(b<<2)>>2]|0;f=(g&-16711936)+(f&-16711936)&-16711936|(g&16711935)+(f&16711935)&16711935;c[e+(b<<2)>>2]=f;b=b+1|0}while((b|0)!=(d|0));return}function wb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((d|0)<=0)return;f=0;do{g=c[b+(f<<2)>>2]|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(h&-16711936)+(g&-16711936)&-16711936|(h&16711935)+(g&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function xb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((d|0)<=0)return;f=0;do{g=c[b+(f<<2)+4>>2]|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(h&-16711936)+(g&-16711936)&-16711936|(h&16711935)+(g&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function yb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((d|0)<=0)return;f=0;do{g=c[b+(f<<2)+-4>>2]|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(h&-16711936)+(g&-16711936)&-16711936|(h&16711935)+(g&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function zb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h>>2]|0;j=c[h+4>>2]|0;h=j^g;k=((1?h>>>1:h)&2139062143)+(j&g)|0;j=k^i;h=((1?j>>>1:j)&2139062143)+(k&i)|0;i=c[a+(f<<2)>>2]|0;g=(h&-16711936)+(i&-16711936)&-16711936|(h&16711935)+(i&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Ab(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=c[b+(f<<2)+-4>>2]|0;i=h^g;j=((1?i>>>1:i)&2139062143)+(h&g)|0;h=c[a+(f<<2)>>2]|0;g=(j&-16711936)+(h&-16711936)&-16711936|(j&16711935)+(h&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Bb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=c[b+(f<<2)>>2]|0;i=h^g;j=((1?i>>>1:i)&2139062143)+(h&g)|0;h=c[a+(f<<2)>>2]|0;g=(j&-16711936)+(h&-16711936)&-16711936|(j&16711935)+(h&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Cb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((d|0)<=0)return;f=0;do{g=b+(f<<2)|0;h=c[g+-4>>2]|0;i=c[g>>2]|0;g=i^h;j=((1?g>>>1:g)&2139062143)+(i&h)|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(j&-16711936)+(h&-16711936)&-16711936|(j&16711935)+(h&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function Db(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((d|0)<=0)return;f=0;do{g=b+(f<<2)|0;h=c[g>>2]|0;i=c[g+4>>2]|0;g=i^h;j=((1?g>>>1:g)&2139062143)+(i&h)|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(j&-16711936)+(h&-16711936)&-16711936|(j&16711935)+(h&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function Eb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h+-4>>2]|0;j=c[h>>2]|0;k=c[h+4>>2]|0;h=i^g;l=((1?h>>>1:h)&2139062143)+(i&g)|0;i=k^j;h=((1?i>>>1:i)&2139062143)+(k&j)|0;j=h^l;k=((1?j>>>1:j)&2139062143)+(h&l)|0;l=c[a+(f<<2)>>2]|0;g=(k&-16711936)+(l&-16711936)&-16711936|(k&16711935)+(l&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Fb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h>>2]|0;j=c[h+-4>>2]|0;h=24?j>>>24:j;k=(24?g>>>24:g)-h|0;l=(24?i>>>24:i)-h|0;h=(16?j>>>16:j)&255;m=((16?g>>>16:g)&255)-h|0;n=((16?i>>>16:i)&255)-h|0;h=(8?j>>>8:j)&255;o=((8?g>>>8:g)&255)-h|0;p=((8?i>>>8:i)&255)-h|0;h=j&255;j=(g&255)-h|0;q=(i&255)-h|0;h=(((j|0)>-1?j:0-j|0)-((q|0)>-1?q:0-q|0)-((l|0)>-1?l:0-l|0)+((k|0)>-1?k:0-k|0)-((p|0)>-1?p:0-p|0)+((o|0)>-1?o:0-o|0)-((n|0)>-1?n:0-n|0)+((m|0)>-1?m:0-m|0)|0)<1?i:g;i=c[a+(f<<2)>>2]|0;g=(h&-16711936)+(i&-16711936)&-16711936|(h&16711935)+(i&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Gb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h>>2]|0;j=c[h+-4>>2]|0;h=(24?i>>>24:i)+(24?g>>>24:g)-(24?j>>>24:j)|0;k=((16?i>>>16:i)&255)+((16?g>>>16:g)&255)-((16?j>>>16:j)&255)|0;l=((8?i>>>8:i)&255)+((8?g>>>8:g)&255)-((8?j>>>8:j)&255)|0;m=(i&255)+(g&255)-(j&255)|0;j=(h>>>0<256?h:(24?h>>>24:h)^255)<<24|(m>>>0<256?m:(24?m>>>24:m)^255)|(k>>>0<256?k:(24?k>>>24:k)^255)<<16|(l>>>0<256?l:(24?l>>>24:l)^255)<<8;l=c[a+(f<<2)>>2]|0;g=(j&-16711936)+(l&-16711936)&-16711936|(j&16711935)+(l&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Hb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h>>2]|0;j=c[h+-4>>2]|0;h=i^g;k=((1?h>>>1:h)&2139062143)+(i&g)|0;i=24?k>>>24:k;h=((i-(24?j>>>24:j)|0)/2|0)+i|0;i=(16?k>>>16:k)&255;l=((i-((16?j>>>16:j)&255)|0)/2|0)+i|0;i=(8?k>>>8:k)&255;m=((i-((8?j>>>8:j)&255)|0)/2|0)+i|0;i=k&255;k=((i-(j&255)|0)/2|0)+i|0;i=(h>>>0<256?h:(24?h>>>24:h)^255)<<24|(k>>>0<256?k:(24?k>>>24:k)^255)|(l>>>0<256?l:(24?l>>>24:l)^255)<<16|(m>>>0<256?m:(24?m>>>24:m)^255)<<8;m=c[a+(f<<2)>>2]|0;g=(i&-16711936)+(m&-16711936)&-16711936|(i&16711935)+(m&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Ib(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if((b|0)<=0)return;e=0;do{f=c[a+(e<<2)>>2]|0;g=(8?f>>>8:f)&255;c[d+(e<<2)>>2]=(g<<16|g)+(f&16711935)&16711935|f&-16711936;e=e+1|0}while((e|0)!=(b|0));return}function Jb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((e|0)<=0)return;g=a[b>>0]|0;h=a[b+1>>0]|0;i=a[b+2>>0]|0;b=0;do{j=c[d+(b<<2)>>2]|0;k=j<<16;l=24?k>>24:k;k=r(l,g)|0;m=(5?k>>5:k)+(16?j>>>16:j)|0;k=r(l,h)|0;l=m<<24;n=r(24?l>>24:l,i)|0;c[f+(b<<2)>>2]=m<<16&16711680|j&-16711936|(5?k>>>5:k)+j+(5?n>>>5:n)&255;b=b+1|0}while((b|0)!=(e|0));return}function Kb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=16?b>>>16:b;a[d+1>>0]=8?b>>>8:b;a[d+2>>0]=b;a[d+3>>0]=24?b>>>24:b;if(e>>>0>=f>>>0)break;else d=d+4|0}return}function Lb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=16?b>>>16:b;a[d+1>>0]=8?b>>>8:b;a[d+2>>0]=b;if(e>>>0>=f>>>0)break;else d=d+3|0}return}function Mb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=b;a[d+1>>0]=8?b>>>8:b;a[d+2>>0]=16?b>>>16:b;if(e>>>0>=f>>>0)break;else d=d+3|0}return}function Nb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=(16?b>>>16:b)&240|(12?b>>>12:b)&15;a[d+1>>0]=b&240|(28?b>>>28:b);if(e>>>0>=f>>>0)break;else d=d+2|0}return}function Ob(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=(16?b>>>16:b)&248|(13?b>>>13:b)&7;a[d+1>>0]=(5?b>>>5:b)&224|(3?b>>>3:b)&31;if(e>>>0>=f>>>0)break;else d=d+2|0}return}function Pb(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;if(!((e|0)<(f|0)&(g|0)>0))return;h=e;e=a;a=d;while(1){d=0;i=a;j=e;e=e+(g<<2)|0;while(1){k=c[j>>2]|0;c[i>>2]=c[b+(((8?k>>>8:k)&255)<<2)>>2];d=d+1|0;if((d|0)==(g|0))break;else{i=i+4|0;j=j+4|0}}h=h+1|0;if((h|0)==(f|0))break;else a=a+(g<<2)|0}return}function Qb(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0;if(!((g|0)<(h|0)&(i|0)>0))return;j=g;g=b;b=f;while(1){f=0;k=b;l=g;g=g+i|0;while(1){m=c[e+((d[l>>0]|0)<<2)>>2]|0;a[k>>0]=8?m>>>8:m;f=f+1|0;if((f|0)==(i|0))break;else{k=k+1|0;l=l+1|0}}j=j+1|0;if((j|0)==(h|0))break;else b=b+i|0}return}function Rb(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a+40>>2]|0;if((c[a+12>>2]|0)<1?1:(c[a+16>>2]|0)<1){d=0;return d|0}e=ba[c[b+44>>2]&31](a,b)|0;f=c[b+48>>2]|0;if(f|0)ca[f&15](a,b,e)|0;a=b+16|0;c[a>>2]=(c[a>>2]|0)+e;d=1;return d|0}function Sb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;b=c[a+40>>2]|0;d=c[c[b>>2]>>2]|0;e=d>>>0<11;f=d+-1|0;if(f>>>0<12?(g=f&65535,((g?2077>>>g:2077)&1)!=0):0)h=1;else h=(d+-7|0)>>>0<4;g=b+40|0;f=b+44|0;i=b+48|0;j=b+52|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;if(!(Ub(c[b+20>>2]|0,a,h?11:12)|0)){k=0;return k|0}if(!((d+-7|0)>>>0>3|h^1))Vb();if(!(c[a+92>>2]|0)){do if(e){cc();c[f>>2]=17;if(c[a+56>>2]|0){l=a+12|0;m=c[l>>2]|0;n=m+1|0;o=wa(1,0,(n&-2)+m|0)|0;c[g>>2]=o;if(!o){k=0;return k|0}else{c[b+4>>2]=o;m=o+(c[l>>2]|0)|0;c[b+8>>2]=m;c[b+12>>2]=m+(1?n>>1:n);c[f>>2]=18;Vb();break}}}else c[f>>2]=19;while(0);if(!h){k=1;return k|0}switch(d|0){case 5:case 10:{p=9;break}default:p=e?6:5}c[i>>2]=p;if(!e){k=1;return k|0}Da();k=1;return k|0}p=c[b>>2]|0;d=c[p>>2]|0;h=d+-1|0;n=h>>>0<12;if(!e){if(n?(e=h&65535,((e?2077>>>e:2077)&1)!=0):0)q=1;else q=(d+-7|0)>>>0<4;e=c[a+96>>2]|0;m=c[a+100>>2]|0;l=e+1|0;o=1?l>>1:l;s=m+1|0;t=1?s>>1:s;s=a+12|0;u=(c[s>>2]|0)+1|0;v=1?u>>1:u;u=a+16|0;w=(c[u>>2]|0)+1|0;x=1?w>>1:w;w=e<<1;y=l&-2;l=y<<1;z=(l+w<<2)+(q?e<<3:0)|0;A=wa(1,0,z+(q?367:283)|0)|0;c[g>>2]=A;if(!A){k=0;return k|0}B=A+z+31&-32;c[b+24>>2]=B;z=b+28|0;c[z>>2]=B+84;C=b+32|0;c[C>>2]=B+168;D=b+36|0;c[D>>2]=q?B+252|0:0;Wb(B,c[s>>2]|0,c[u>>2]|0,c[p+16>>2]|0,e,m,c[p+32>>2]|0,1,A);B=A+(w<<2)|0;Wb(c[z>>2]|0,v,x,c[p+20>>2]|0,o,t,c[p+36>>2]|0,1,B);Wb(c[C>>2]|0,v,x,c[p+24>>2]|0,o,t,c[p+40>>2]|0,1,B+(y<<2)|0);c[f>>2]=16;if(!q){k=1;return k|0}Wb(c[D>>2]|0,c[s>>2]|0,c[u>>2]|0,c[p+28>>2]|0,e,m,c[p+44>>2]|0,1,B+(l<<2)|0);c[i>>2]=4;Da();k=1;return k|0}if(n?(n=h&65535,((n?2077>>>n:2077)&1)!=0):0)E=1;else E=(d+-7|0)>>>0<4;d=c[a+96>>2]|0;n=c[a+100>>2]|0;h=a+12|0;l=(c[h>>2]|0)+1|0;B=1?l>>1:l;l=a+16|0;a=(c[l>>2]|0)+1|0;p=1?a>>1:a;a=d<<1;m=d*6|0;e=r(d,E?36:27)|0;u=wa(1,0,e+(E?367:283)|0)|0;c[g>>2]=u;if(!u){k=0;return k|0}g=u+((E?d<<3:m)<<2)|0;s=u+e+31&-32;c[b+24>>2]=s;e=b+28|0;c[e>>2]=s+84;D=b+32|0;c[D>>2]=s+168;q=b+36|0;c[q>>2]=E?s+252|0:0;Wb(s,c[h>>2]|0,c[l>>2]|0,g,d,n,0,1,u);Wb(c[e>>2]|0,B,p,g+d|0,d,n,0,1,u+(a<<2)|0);Wb(c[D>>2]|0,B,p,g+a|0,d,n,0,1,u+(d<<2<<2)|0);c[f>>2]=15;Yb();if(!E){k=1;return k|0}Wb(c[q>>2]|0,c[h>>2]|0,c[l>>2]|0,g+(d*3|0)|0,d,n,0,1,u+(m<<2)|0);c[i>>2]=3;switch(c[c[b>>2]>>2]|0){case 10:case 5:{F=7;break}default:F=8}c[j>>2]=F;Da();k=1;return k|0}function Tb(a){a=a|0;var b=0;b=(c[a+40>>2]|0)+40|0;pa(c[b>>2]|0);c[b>>2]=0;return}function Ub(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;e=Y;Y=Y+16|0;f=e+4|0;g=e;h=c[b>>2]|0;i=c[b+4>>2]|0;j=(a|0)!=0;if(j){k=(c[a+8>>2]|0)>0;c[b+72>>2]=k&1;if(k){k=c[a+20>>2]|0;l=c[a+24>>2]|0;m=c[a+12>>2]|0;n=c[a+16>>2]|0;o=d>>>0>10;d=o?m&-2:m;m=o?n&-2:n;if((m+l|0)>(i|0)|((d+k|0)>(h|0)|((l|0)<1|((k|0)<1|(m|d|0)<0)))){p=0;Y=e;return p|0}else{q=l;r=k;s=m;t=d}}else{q=i;r=h;s=0;t=0}}else{c[b+72>>2]=0;q=i;r=h;s=0;t=0}c[b+76>>2]=t;c[b+84>>2]=s;c[b+80>>2]=r+t;c[b+88>>2]=q+s;c[b+12>>2]=r;c[b+16>>2]=q;if(!j){c[b+92>>2]=0;c[b+68>>2]=0;c[b+56>>2]=1;p=1;Y=e;return p|0}j=(c[a+28>>2]|0)>0;s=b+92|0;c[s>>2]=j&1;do if(j){c[f>>2]=c[a+32>>2];c[g>>2]=c[a+36>>2];if(Mc(r,q,f,g)|0){c[b+96>>2]=c[f>>2];c[b+100>>2]=c[g>>2];u=(c[s>>2]|0)==0;break}p=0;Y=e;return p|0}else u=1;while(0);s=b+68|0;c[s>>2]=(c[a>>2]|0)!=0&1;g=b+56|0;c[g>>2]=(c[a+4>>2]|0)==0&1;if(u){p=1;Y=e;return p|0}if((c[b+96>>2]|0)<((h*3|0)/4|0|0))v=(c[b+100>>2]|0)<((i*3|0)/4|0|0)&1;else v=0;c[s>>2]=v;c[g>>2]=0;p=1;Y=e;return p|0}function Vb(){if(Te(10084)|0)return;if(c[2033]|0){c[2437]=1;c[2439]=2;c[2443]=1;c[2444]=2;c[2436]=3;c[2438]=4;c[2440]=5;c[2441]=6;c[2442]=7;c[2445]=5;c[2446]=6}c[2033]=0;Ue(10084)|0;return}function Wb(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0;k=(b|0)<(f|0);c[a>>2]=k&1;l=(d|0)<(g|0);c[a+4>>2]=l&1;c[a+44>>2]=b;c[a+48>>2]=d;c[a+52>>2]=f;c[a+56>>2]=g;c[a+60>>2]=0;c[a+64>>2]=0;c[a+68>>2]=e;c[a+72>>2]=h;c[a+8>>2]=i;h=k?f+-1|0:b;c[a+36>>2]=h;e=k?b+-1|0:f;c[a+40>>2]=e;if(!k){k=Hf(0,1,e|0,((e|0)<0)<<31>>31|0)|0;v()|0;c[a+12>>2]=k}k=l<<31>>31;e=k+d|0;c[a+28>>2]=e;d=k+g|0;c[a+32>>2]=d;k=a+24|0;if(l){c[k>>2]=d;m=h}else{c[k>>2]=e;k=r(e,h)|0;h=Hf(0,g|0,k|0,((k|0)<0)<<31>>31|0)|0;k=(h|0)==(h|0)&(v()|0)==0;c[a+20>>2]=k?h:0;m=d}d=Hf(0,1,m|0,((m|0)<0)<<31>>31|0)|0;v()|0;c[a+16>>2]=d;c[a+76>>2]=j;d=j+((r(i,f)|0)<<2)|0;c[a+80>>2]=d;Nf(j|0,0,r(f<<3,i)|0)|0;Ac();return}function Xb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=c[a+16>>2]|0;e=d+1|0;f=1?e>>1:e;if((d|0)<=0){g=0;return g|0}e=b+24|0;h=a+20|0;i=a+32|0;j=b+28|0;k=a+24|0;l=a+36|0;m=b+32|0;n=a+28|0;a=b+16|0;o=0;p=0;q=0;s=c[e>>2]|0;while(1){t=c[i>>2]|0;q=(Oa(s,d-q|0,(c[h>>2]|0)+(r(t,q)|0)|0,t)|0)+q|0;t=f-o|0;if(!(Ma(c[j>>2]|0,t)|0))u=o;else{v=c[l>>2]|0;w=Oa(c[j>>2]|0,t,(c[k>>2]|0)+(r(v,o)|0)|0,v)|0;v=c[l>>2]|0;Oa(c[m>>2]|0,t,(c[n>>2]|0)+(r(v,o)|0)|0,v)|0;u=w+o|0}w=c[b>>2]|0;v=c[9808+(c[w>>2]<<2)>>2]|0;t=w+20|0;x=c[e>>2]|0;a:do if((c[x+64>>2]|0)<(c[x+56>>2]|0)){y=(c[w+16>>2]|0)+(r(c[t>>2]|0,(c[a>>2]|0)+p|0)|0)|0;z=0;A=x;while(1){if((c[A+24>>2]|0)>0){B=z;C=A;break a}D=c[j>>2]|0;if((c[D+64>>2]|0)>=(c[D+56>>2]|0)){B=z;C=A;break a}if((c[D+24>>2]|0)>0){B=z;C=A;break a}Pa(A);Pa(c[j>>2]|0);Pa(c[m>>2]|0);D=c[e>>2]|0;ha[v&31](c[D+68>>2]|0,c[(c[j>>2]|0)+68>>2]|0,c[(c[m>>2]|0)+68>>2]|0,y,c[D+52>>2]|0);D=z+1|0;E=c[e>>2]|0;if((c[E+64>>2]|0)<(c[E+56>>2]|0)){y=y+(c[t>>2]|0)|0;z=D;A=E}else{B=D;C=E;break}}}else{B=0;C=x}while(0);x=B+p|0;if((d|0)<=(q|0)){g=x;break}else{o=u;p=x;s=C}}return g|0}function Yb(){if(Te(10028)|0)return;if(c[2031]|0){c[2453]=4;c[2455]=5;c[2452]=6;c[2454]=7;c[2456]=8;c[2457]=9;c[2458]=10;c[2459]=4;c[2460]=5;c[2461]=8;c[2462]=9}c[2031]=0;Ue(10028)|0;return}function Zb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=a+104|0;f=c[e>>2]|0;if(!f)return 0;g=c[b+36>>2]|0;h=(c[b+16>>2]|0)+d|0;if((d|0)<=0)return 0;i=g+60|0;j=a+8|0;k=a+16|0;l=b+52|0;m=d;d=f;while(1){f=c[i>>2]|0;n=c[j>>2]|0;o=c[a>>2]|0;Oa(g,n-f+(c[k>>2]|0)|0,d+(r(o,f-n|0)|0)|0,o)|0;o=m-(ca[c[l>>2]&15](b,h-m|0,m)|0)|0;if((o|0)<=0)break;m=o;d=c[e>>2]|0}return 0}function _b(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;e=c[a>>2]|0;f=e+20|0;g=c[f>>2]|0;h=(c[e+16>>2]|0)+(r(g,b)|0)|0;b=c[e>>2]|0;e=(b|0)==4|(b|0)==9;i=e&1;j=(b+-7|0)>>>0<4;b=a+36|0;a=c[b>>2]|0;k=c[a+52>>2]|0;if((c[a+64>>2]|0)>=(c[a+56>>2]|0)){l=0;return l|0}m=0;n=0;o=h+(e?0:3)|0;e=a;a=g;while(1){if(!((n|0)<(d|0)?(c[e+24>>2]|0)<1:0)){p=m;q=n;s=a;break}Pa(e);g=Xa(c[(c[b>>2]|0)+68>>2]|0,0,k,1,o,0)|0|m;t=c[f>>2]|0;u=n+1|0;e=c[b>>2]|0;if((c[e+64>>2]|0)>=(c[e+56>>2]|0)){p=g;q=u;s=t;break}else{m=g;n=u;o=o+t|0;a=t}}if(!(j&(p|0)!=0)){l=q;return l|0}Wa(h,i,k,q,s);l=q;return l|0}function $b(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;g=c[b>>2]|0;h=g+20|0;i=(c[g+16>>2]|0)+(r(c[h>>2]|0,e)|0)|0;e=b+36|0;b=c[e>>2]|0;j=c[b+52>>2]|0;k=((c[g>>2]|0)+-7|0)>>>0<4;if((c[b+64>>2]|0)>=(c[b+56>>2]|0)){l=0;return l|0}if((j|0)<=0){g=0;m=b;while(1){if(!((g|0)<(f|0)?(c[m+24>>2]|0)<1:0)){l=g;n=13;break}Pa(m);o=g+1|0;m=c[e>>2]|0;if((c[m+64>>2]|0)>=(c[m+56>>2]|0)){l=o;n=13;break}else g=o}if((n|0)==13)return l|0}n=15;g=0;m=i+1|0;o=b;while(1){if(!((g|0)<(f|0)?(c[o+24>>2]|0)<1:0)){p=n;q=g;break}Pa(o);b=0;s=n;do{t=d[(c[(c[e>>2]|0)+68>>2]|0)+b>>0]|0;u=4?t>>>4:t;t=m+(b<<1)|0;a[t>>0]=u|a[t>>0]&-16&255;s=u&s;b=b+1|0}while((b|0)!=(j|0));b=g+1|0;o=c[e>>2]|0;if((c[o+64>>2]|0)>=(c[o+56>>2]|0)){p=s;q=b;break}else{n=s;g=b;m=m+(c[h>>2]|0)|0}}if(!(k&(p|0)!=15)){l=q;return l|0}Va(i,j,q,c[h>>2]|0);l=q;return l|0}function ac(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c[a+16>>2]|0;e=d+1|0;f=1?e>>1:e;e=c[b+24>>2]|0;g=c[c[b>>2]>>2]|0;switch(g|0){case 1:case 3:case 4:case 5:case 12:{h=3;break}default:if((g+-7|0)>>>0<=3)h=3}if((h|0)==3?(h=c[a+104>>2]|0,h|0):0)sc(c[a+20>>2]|0,c[a+32>>2]|0,h,c[a>>2]|0,c[a+12>>2]|0,d,0);h=c[a+32>>2]|0;g=(d|0)>0;if(!g){i=0;return i|0}j=0;k=d;d=c[a+20>>2]|0;do{l=Oa(e,k,d,h)|0;d=d+(r(l,h)|0)|0;k=k-l|0;j=(rc(e)|0)+j|0}while((k|0)>0);k=a+36|0;e=c[k>>2]|0;h=c[b+28>>2]|0;if(!g){i=j;return i|0}g=f;d=c[a+24>>2]|0;do{l=Oa(h,g,d,e)|0;d=d+(r(l,e)|0)|0;g=g-l|0;rc(h)|0}while((g|0)>0);g=c[k>>2]|0;k=c[b+32>>2]|0;b=f;f=c[a+28>>2]|0;do{a=Oa(k,b,f,g)|0;f=f+(r(a,g)|0)|0;b=b-a|0;rc(k)|0}while((b|0)>0);i=j;return i|0}function bc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=c[b>>2]|0;f=c[e+28>>2]|0;g=c[b+16>>2]|0;h=e+44|0;i=c[h>>2]|0;j=f+(r(i,g)|0)|0;k=c[a+104>>2]|0;if(!k){if(!f)return 0;f=c[a+96>>2]|0;if((d|0)<=0)return 0;l=j;m=0;while(1){Nf(l|0,-1,f|0)|0;m=m+1|0;if((m|0)==(d|0))break;else l=l+i|0}return 0}i=c[e+16>>2]|0;l=e+32|0;e=c[l>>2]|0;d=c[a>>2]|0;m=c[a+16>>2]|0;a=b+36|0;b=c[a>>2]|0;if((m|0)<=0)return 0;f=0;n=m;m=k;do{k=Oa(b,n,m,d)|0;m=m+(r(k,d)|0)|0;n=n-k|0;f=(rc(b)|0)+f|0}while((n|0)>0);if((f|0)<=0)return 0;n=i+(r(e,g)|0)|0;sc(n,c[l>>2]|0,j,c[h>>2]|0,c[(c[a>>2]|0)+52>>2]|0,f,1);return 0}function cc(){if(Te(1e4)|0)return;if(c[2030]|0){c[2468]=11;c[2469]=12;c[2470]=13;c[2471]=14;c[2472]=15;c[2473]=16;c[2474]=17;c[2475]=12;c[2476]=14;c[2477]=15;c[2478]=16}c[2030]=0;Ue(1e4)|0;return}function dc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=c[b>>2]|0;b=c[d+20>>2]|0;e=(c[d+16>>2]|0)+(r(b,c[a+8>>2]|0)|0)|0;f=a+16|0;jc(c[a+20>>2]|0,c[a+32>>2]|0,c[a+24>>2]|0,c[a+28>>2]|0,c[a+36>>2]|0,e,b,c[a+12>>2]|0,c[f>>2]|0,c[9872+(c[d>>2]<<2)>>2]|0);return c[f>>2]|0}function ec(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;d=c[a+16>>2]|0;e=c[b>>2]|0;f=c[a+8>>2]|0;g=e+20|0;h=c[g>>2]|0;i=(c[e+16>>2]|0)+(r(h,f)|0)|0;j=c[9744+(c[e>>2]<<2)>>2]|0;e=c[a+20>>2]|0;k=c[a+24>>2]|0;l=c[a+28>>2]|0;m=b+8|0;n=b+12|0;o=f+d|0;p=c[a+12>>2]|0;q=(p+1|0)/2|0;if(!f){ia[j&7](e,0,k,l,k,l,i,0,p);s=d}else{ia[j&7](c[b+4>>2]|0,e,c[m>>2]|0,c[n>>2]|0,k,l,i+(0-h)|0,i,p);s=d+1|0}d=f+2|0;if((d|0)<(o|0)){f=a+36|0;h=a+32|0;t=i;u=e;v=l;w=k;x=d;while(1){d=c[f>>2]|0;y=w+d|0;z=v+d|0;d=c[g>>2]|0;A=t+(d<<1)|0;B=c[h>>2]|0;C=u+(B<<1)|0;ia[j&7](C+(0-B)|0,C,w,v,y,z,A+(0-d)|0,A,p);x=x+2|0;if((x|0)>=(o|0)){D=A;E=C;F=z;G=y;H=h;break}else{t=A;u=C;v=z;w=y}}}else{D=i;E=e;F=l;G=k;H=a+32|0}k=E+(c[H>>2]|0)|0;if(((c[a+84>>2]|0)+o|0)<(c[a+88>>2]|0)){Lf(c[b+4>>2]|0,k|0,p|0)|0;Lf(c[m>>2]|0,G|0,q|0)|0;Lf(c[n>>2]|0,F|0,q|0)|0;I=s+-1|0;return I|0}if(o&1|0){I=s;return I|0}ia[j&7](k,0,G,F,G,F,D+(c[g>>2]|0)|0,0,p);I=s;return I|0}function fc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;d=c[b>>2]|0;b=c[a+8>>2]|0;e=d+32|0;f=(c[d+16>>2]|0)+(r(c[e>>2]|0,b)|0)|0;g=1?b>>1:b;b=d+36|0;h=(c[d+20>>2]|0)+(r(c[b>>2]|0,g)|0)|0;i=d+40|0;j=(c[d+24>>2]|0)+(r(c[i>>2]|0,g)|0)|0;g=c[a+12>>2]|0;d=a+16|0;k=c[d>>2]|0;l=(g+1|0)/2|0;m=(k+1|0)/2|0;n=(k|0)>0;if(!n){o=c[d>>2]|0;return o|0}p=a+20|0;q=a+32|0;Lf(f|0,c[p>>2]|0,g|0)|0;if((k|0)!=1){s=1;do{t=f+(r(c[e>>2]|0,s)|0)|0;Lf(t|0,(c[p>>2]|0)+(r(c[q>>2]|0,s)|0)|0,g|0)|0;s=s+1|0}while((s|0)!=(k|0))}if(!n){o=c[d>>2]|0;return o|0}n=a+24|0;k=a+36|0;s=a+28|0;a=0;do{g=h+(r(c[b>>2]|0,a)|0)|0;Lf(g|0,(c[n>>2]|0)+(r(c[k>>2]|0,a)|0)|0,l|0)|0;g=j+(r(c[i>>2]|0,a)|0)|0;Lf(g|0,(c[s>>2]|0)+(r(c[k>>2]|0,a)|0)|0,l|0)|0;a=a+1|0}while((a|0)<(m|0));o=c[d>>2]|0;return o|0}function gc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c[a+104>>2]|0;if(!d)return 0;e=c[a+12>>2]|0;f=c[b>>2]|0;b=c[f>>2]|0;g=(b|0)==4|(b|0)==9;h=g&1;i=c[a+8>>2]|0;j=c[a+16>>2]|0;if(!(c[a+56>>2]|0)){k=j;l=i;m=d}else{if(!i){n=j+-1|0;o=0;p=d}else{n=j;o=i+-1|0;p=d+(0-(c[a>>2]|0))|0}d=c[a+84>>2]|0;q=j+i+d|0;k=(q|0)==(c[a+88>>2]|0)?q-(d+o)|0:n;l=o;m=p}p=f+20|0;o=c[p>>2]|0;n=(c[f+16>>2]|0)+(r(o,l)|0)|0;if((b+-7|0)>>>0>3|(Xa(m,c[a>>2]|0,e,k,n+(g?0:3)|0,o)|0)==0)return 0;Wa(n,h,e,k,c[p>>2]|0);return 0}function hc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;d=c[a+104>>2]|0;e=c[b>>2]|0;b=c[a+12>>2]|0;f=c[a+16>>2]|0;g=c[e+28>>2]|0;h=e+44|0;e=c[h>>2]|0;i=g+(r(e,c[a+8>>2]|0)|0)|0;if(!d){if(!((f|0)>0&(g|0)!=0))return 0;g=i;j=0;while(1){Nf(g|0,-1,b|0)|0;j=j+1|0;if((j|0)==(f|0))break;else g=g+e|0}return 0}else{if((f|0)<=0)return 0;e=i;i=d;d=0;while(1){Lf(e|0,i|0,b|0)|0;d=d+1|0;if((d|0)==(f|0))break;else{e=e+(c[h>>2]|0)|0;i=i+(c[a>>2]|0)|0}}return 0}return 0}function ic(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;f=c[b+104>>2]|0;if(!f)return 0;g=c[b+12>>2]|0;h=c[e>>2]|0;e=c[h>>2]|0;i=c[b+8>>2]|0;j=c[b+16>>2]|0;if(!(c[b+56>>2]|0)){k=i;l=j;m=f}else{if(!i){n=0;o=j+-1|0;p=f}else{n=i+-1|0;o=j;p=f+(0-(c[b>>2]|0))|0}f=c[b+84>>2]|0;q=j+i+f|0;k=n;l=(q|0)==(c[b+88>>2]|0)?q-(f+n)|0:o;m=p}p=h+20|0;o=(c[h+16>>2]|0)+(r(c[p>>2]|0,k)|0)|0;if((l|0)<=0)return 0;if((g|0)<=0)return 0;k=0;h=15;n=o+1|0;f=m;while(1){m=0;s=h;do{q=d[f+m>>0]|0;i=4?q>>>4:q;q=n+(m<<1)|0;a[q>>0]=i|a[q>>0]&-16&255;s=i&s;m=m+1|0}while((m|0)!=(g|0));t=c[p>>2]|0;k=k+1|0;if((k|0)==(l|0))break;else{h=s;n=n+t|0;f=f+(c[b>>2]|0)|0}}if((e+-7|0)>>>0>3|(s|0)==15)return 0;Va(o,g,l,t);return 0}function jc(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0;if((i|0)<=0)return;k=a;a=c;c=d;d=f;f=0;while(1){ha[j&31](k,a,c,d,h);l=(f&1|0)==0;f=f+1|0;if((f|0)==(i|0))break;else{k=k+b|0;a=l?a:a+e|0;c=l?c:c+e|0;d=d+g|0}}return}function kc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;h=g&-2;i=f+(h*3|0)|0;if(!h){j=b;k=c;l=f;m=e}else{h=c;c=f;f=e;e=b;while(1){b=d[h>>0]|0;n=d[f>>0]|0;o=(d[e>>0]|0)*19077|0;p=8?o>>>8:o;o=n*26149|0;q=p+-14234+(8?o>>>8:o)|0;if(q>>>0<16384)r=6?q>>>6:q;else r=((31?q>>31:q)&-255)+255|0;a[c>>0]=r;q=b*6419|0;o=n*13320|0;n=p+8708-(8?q>>>8:q)-(8?o>>>8:o)|0;if(n>>>0<16384)s=6?n>>>6:n;else s=((31?n>>31:n)&-255)+255|0;a[c+1>>0]=s;n=b*33050|0;b=p+-17685+(8?n>>>8:n)|0;if(b>>>0<16384)t=6?b>>>6:b;else t=((31?b>>31:b)&-255)+255|0;a[c+2>>0]=t;b=d[h>>0]|0;n=d[f>>0]|0;p=(d[e+1>>0]|0)*19077|0;o=8?p>>>8:p;p=n*26149|0;q=o+-14234+(8?p>>>8:p)|0;if(q>>>0<16384)u=6?q>>>6:q;else u=((31?q>>31:q)&-255)+255|0;a[c+3>>0]=u;q=b*6419|0;p=n*13320|0;n=o+8708-(8?q>>>8:q)-(8?p>>>8:p)|0;if(n>>>0<16384)v=6?n>>>6:n;else v=((31?n>>31:n)&-255)+255|0;a[c+4>>0]=v;n=b*33050|0;b=o+-17685+(8?n>>>8:n)|0;if(b>>>0<16384)w=6?b>>>6:b;else w=((31?b>>31:b)&-255)+255|0;a[c+5>>0]=w;b=e+2|0;n=h+1|0;o=f+1|0;c=c+6|0;if((c|0)==(i|0)){j=b;k=n;l=i;m=o;break}else{h=n;f=o;e=b}}}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=k*26149|0;e=j+-14234+(8?m>>>8:m)|0;if(e>>>0<16384)x=6?e>>>6:e;else x=((31?e>>31:e)&-255)+255|0;a[l>>0]=x;x=g*6419|0;e=k*13320|0;k=j+8708-(8?x>>>8:x)-(8?e>>>8:e)|0;if(k>>>0<16384)y=6?k>>>6:k;else y=((31?k>>31:k)&-255)+255|0;a[l+1>>0]=y;y=g*33050|0;g=j+-17685+(8?y>>>8:y)|0;if(g>>>0<16384)z=6?g>>>6:g;else z=((31?g>>31:g)&-255)+255|0;a[l+2>>0]=z;return}function lc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;h=g<<2&-8;i=f+h|0;if(!h){j=b;k=c;l=f;m=e}else{n=h+-8|0;o=(2?n>>>2:n)+2|0;p=(3?n>>>3:n)+1|0;n=c+p|0;q=c;c=f;r=e;s=b;while(1){t=d[q>>0]|0;u=d[r>>0]|0;v=(d[s>>0]|0)*19077|0;w=8?v>>>8:v;v=u*26149|0;x=w+-14234+(8?v>>>8:v)|0;if(x>>>0<16384)y=6?x>>>6:x;else y=((31?x>>31:x)&-255)+255|0;a[c>>0]=y;x=t*6419|0;v=u*13320|0;u=w+8708-(8?x>>>8:x)-(8?v>>>8:v)|0;if(u>>>0<16384)z=6?u>>>6:u;else z=((31?u>>31:u)&-255)+255|0;a[c+1>>0]=z;u=t*33050|0;t=w+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)A=6?t>>>6:t;else A=((31?t>>31:t)&-255)+255|0;a[c+2>>0]=A;a[c+3>>0]=-1;t=d[q>>0]|0;u=d[r>>0]|0;w=(d[s+1>>0]|0)*19077|0;v=8?w>>>8:w;w=u*26149|0;x=v+-14234+(8?w>>>8:w)|0;if(x>>>0<16384)B=6?x>>>6:x;else B=((31?x>>31:x)&-255)+255|0;a[c+4>>0]=B;x=t*6419|0;w=u*13320|0;u=v+8708-(8?x>>>8:x)-(8?w>>>8:w)|0;if(u>>>0<16384)C=6?u>>>6:u;else C=((31?u>>31:u)&-255)+255|0;a[c+5>>0]=C;u=t*33050|0;t=v+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)D=6?t>>>6:t;else D=((31?t>>31:t)&-255)+255|0;a[c+6>>0]=D;a[c+7>>0]=-1;c=c+8|0;if((c|0)==(i|0))break;else{q=q+1|0;r=r+1|0;s=s+2|0}}j=b+o|0;k=n;l=f+h|0;m=e+p|0}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=k*26149|0;p=j+-14234+(8?m>>>8:m)|0;if(p>>>0<16384)E=6?p>>>6:p;else E=((31?p>>31:p)&-255)+255|0;a[l>>0]=E;E=g*6419|0;p=k*13320|0;k=j+8708-(8?E>>>8:E)-(8?p>>>8:p)|0;if(k>>>0<16384)F=6?k>>>6:k;else F=((31?k>>31:k)&-255)+255|0;a[l+1>>0]=F;F=g*33050|0;g=j+-17685+(8?F>>>8:F)|0;if(g>>>0<16384)G=6?g>>>6:g;else G=((31?g>>31:g)&-255)+255|0;a[l+2>>0]=G;a[l+3>>0]=-1;return}function mc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;h=g&-2;i=f+(h*3|0)|0;if(!h){j=b;k=c;l=f;m=e}else{h=c;c=f;f=e;e=b;while(1){b=d[h>>0]|0;n=d[f>>0]|0;o=(d[e>>0]|0)*19077|0;p=8?o>>>8:o;o=b*33050|0;q=p+-17685+(8?o>>>8:o)|0;if(q>>>0<16384)r=6?q>>>6:q;else r=((31?q>>31:q)&-255)+255|0;a[c>>0]=r;q=b*6419|0;b=n*13320|0;o=p+8708-(8?q>>>8:q)-(8?b>>>8:b)|0;if(o>>>0<16384)s=6?o>>>6:o;else s=((31?o>>31:o)&-255)+255|0;a[c+1>>0]=s;o=n*26149|0;n=p+-14234+(8?o>>>8:o)|0;if(n>>>0<16384)t=6?n>>>6:n;else t=((31?n>>31:n)&-255)+255|0;a[c+2>>0]=t;n=d[h>>0]|0;o=d[f>>0]|0;p=(d[e+1>>0]|0)*19077|0;b=8?p>>>8:p;p=n*33050|0;q=b+-17685+(8?p>>>8:p)|0;if(q>>>0<16384)u=6?q>>>6:q;else u=((31?q>>31:q)&-255)+255|0;a[c+3>>0]=u;q=n*6419|0;n=o*13320|0;p=b+8708-(8?q>>>8:q)-(8?n>>>8:n)|0;if(p>>>0<16384)v=6?p>>>6:p;else v=((31?p>>31:p)&-255)+255|0;a[c+4>>0]=v;p=o*26149|0;o=b+-14234+(8?p>>>8:p)|0;if(o>>>0<16384)w=6?o>>>6:o;else w=((31?o>>31:o)&-255)+255|0;a[c+5>>0]=w;o=e+2|0;p=h+1|0;b=f+1|0;c=c+6|0;if((c|0)==(i|0)){j=o;k=p;l=i;m=b;break}else{h=p;f=b;e=o}}}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=g*33050|0;e=j+-17685+(8?m>>>8:m)|0;if(e>>>0<16384)x=6?e>>>6:e;else x=((31?e>>31:e)&-255)+255|0;a[l>>0]=x;x=g*6419|0;g=k*13320|0;e=j+8708-(8?x>>>8:x)-(8?g>>>8:g)|0;if(e>>>0<16384)y=6?e>>>6:e;else y=((31?e>>31:e)&-255)+255|0;a[l+1>>0]=y;y=k*26149|0;k=j+-14234+(8?y>>>8:y)|0;if(k>>>0<16384)z=6?k>>>6:k;else z=((31?k>>31:k)&-255)+255|0;a[l+2>>0]=z;return}function nc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;h=g<<2&-8;i=f+h|0;if(!h){j=b;k=c;l=f;m=e}else{n=h+-8|0;o=(2?n>>>2:n)+2|0;p=(3?n>>>3:n)+1|0;n=c+p|0;q=c;c=f;r=e;s=b;while(1){t=d[q>>0]|0;u=d[r>>0]|0;v=(d[s>>0]|0)*19077|0;w=8?v>>>8:v;v=t*33050|0;x=w+-17685+(8?v>>>8:v)|0;if(x>>>0<16384)y=6?x>>>6:x;else y=((31?x>>31:x)&-255)+255|0;a[c>>0]=y;x=t*6419|0;t=u*13320|0;v=w+8708-(8?x>>>8:x)-(8?t>>>8:t)|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[c+1>>0]=z;v=u*26149|0;u=w+-14234+(8?v>>>8:v)|0;if(u>>>0<16384)A=6?u>>>6:u;else A=((31?u>>31:u)&-255)+255|0;a[c+2>>0]=A;a[c+3>>0]=-1;u=d[q>>0]|0;v=d[r>>0]|0;w=(d[s+1>>0]|0)*19077|0;t=8?w>>>8:w;w=u*33050|0;x=t+-17685+(8?w>>>8:w)|0;if(x>>>0<16384)B=6?x>>>6:x;else B=((31?x>>31:x)&-255)+255|0;a[c+4>>0]=B;x=u*6419|0;u=v*13320|0;w=t+8708-(8?x>>>8:x)-(8?u>>>8:u)|0;if(w>>>0<16384)C=6?w>>>6:w;else C=((31?w>>31:w)&-255)+255|0;a[c+5>>0]=C;w=v*26149|0;v=t+-14234+(8?w>>>8:w)|0;if(v>>>0<16384)D=6?v>>>6:v;else D=((31?v>>31:v)&-255)+255|0;a[c+6>>0]=D;a[c+7>>0]=-1;c=c+8|0;if((c|0)==(i|0))break;else{q=q+1|0;r=r+1|0;s=s+2|0}}j=b+o|0;k=n;l=f+h|0;m=e+p|0}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=g*33050|0;p=j+-17685+(8?m>>>8:m)|0;if(p>>>0<16384)E=6?p>>>6:p;else E=((31?p>>31:p)&-255)+255|0;a[l>>0]=E;E=g*6419|0;g=k*13320|0;p=j+8708-(8?E>>>8:E)-(8?g>>>8:g)|0;if(p>>>0<16384)F=6?p>>>6:p;else F=((31?p>>31:p)&-255)+255|0;a[l+1>>0]=F;F=k*26149|0;k=j+-14234+(8?F>>>8:F)|0;if(k>>>0<16384)G=6?k>>>6:k;else G=((31?k>>31:k)&-255)+255|0;a[l+2>>0]=G;a[l+3>>0]=-1;return}function oc(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;g=f<<2&-8;h=e+g|0;if(!g){i=b;j=c;k=e;l=d}else{m=g+-8|0;n=(2?m>>>2:m)+2|0;o=(3?m>>>3:m)+1|0;m=c+o|0;p=c;c=e;q=d;r=b;while(1){s=a[r>>0]|0;t=a[p>>0]|0;u=a[q>>0]|0;a[c>>0]=-1;v=t&255;t=u&255;u=(s&255)*19077|0;s=8?u>>>8:u;u=t*26149|0;w=s+-14234+(8?u>>>8:u)|0;if(w>>>0<16384)x=6?w>>>6:w;else x=((31?w>>31:w)&-255)+255|0;a[c+1>>0]=x;w=v*6419|0;u=t*13320|0;t=s+8708-(8?w>>>8:w)-(8?u>>>8:u)|0;if(t>>>0<16384)y=6?t>>>6:t;else y=((31?t>>31:t)&-255)+255|0;a[c+2>>0]=y;t=v*33050|0;v=s+-17685+(8?t>>>8:t)|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[c+3>>0]=z;v=a[r+1>>0]|0;t=a[p>>0]|0;s=a[q>>0]|0;a[c+4>>0]=-1;u=t&255;t=s&255;s=(v&255)*19077|0;v=8?s>>>8:s;s=t*26149|0;w=v+-14234+(8?s>>>8:s)|0;if(w>>>0<16384)A=6?w>>>6:w;else A=((31?w>>31:w)&-255)+255|0;a[c+5>>0]=A;w=u*6419|0;s=t*13320|0;t=v+8708-(8?w>>>8:w)-(8?s>>>8:s)|0;if(t>>>0<16384)B=6?t>>>6:t;else B=((31?t>>31:t)&-255)+255|0;a[c+6>>0]=B;t=u*33050|0;u=v+-17685+(8?t>>>8:t)|0;if(u>>>0<16384)C=6?u>>>6:u;else C=((31?u>>31:u)&-255)+255|0;a[c+7>>0]=C;c=c+8|0;if((c|0)==(h|0))break;else{p=p+1|0;q=q+1|0;r=r+2|0}}i=b+n|0;j=m;k=e+g|0;l=d+o|0}if(!(f&1))return;f=a[i>>0]|0;i=a[j>>0]|0;j=a[l>>0]|0;a[k>>0]=-1;l=i&255;i=j&255;j=(f&255)*19077|0;f=8?j>>>8:j;j=i*26149|0;o=f+-14234+(8?j>>>8:j)|0;if(o>>>0<16384)D=6?o>>>6:o;else D=((31?o>>31:o)&-255)+255|0;a[k+1>>0]=D;D=l*6419|0;o=i*13320|0;i=f+8708-(8?D>>>8:D)-(8?o>>>8:o)|0;if(i>>>0<16384)E=6?i>>>6:i;else E=((31?i>>31:i)&-255)+255|0;a[k+2>>0]=E;E=l*33050|0;l=f+-17685+(8?E>>>8:E)|0;if(l>>>0<16384)F=6?l>>>6:l;else F=((31?l>>31:l)&-255)+255|0;a[k+3>>0]=F;return}function pc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;h=g<<1&-4;i=f+h|0;if(!h){j=b;k=c;l=f;m=e}else{n=h+-4|0;o=(1?n>>>1:n)+2|0;p=(2?n>>>2:n)+1|0;n=c+p|0;q=c;c=f;r=e;s=b;while(1){t=d[q>>0]|0;u=d[r>>0]|0;v=(d[s>>0]|0)*19077|0;w=8?v>>>8:v;v=u*26149|0;x=w+-14234+(8?v>>>8:v)|0;if(x>>>0<16384)y=6?x>>>6:x;else y=((31?x>>31:x)&-255)+255|0;x=t*6419|0;v=u*13320|0;u=w+8708-(8?x>>>8:x)-(8?v>>>8:v)|0;if(u>>>0<16384)z=6?u>>>6:u;else z=((31?u>>31:u)&-255)+255|0;u=t*33050|0;t=w+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)A=6?t>>>6:t;else A=((31?t>>31:t)&-255)+255|0;a[c>>0]=(4?z>>>4:z)|y&240;a[c+1>>0]=A|15;t=d[q>>0]|0;u=d[r>>0]|0;w=(d[s+1>>0]|0)*19077|0;v=8?w>>>8:w;w=u*26149|0;x=v+-14234+(8?w>>>8:w)|0;if(x>>>0<16384)B=6?x>>>6:x;else B=((31?x>>31:x)&-255)+255|0;x=t*6419|0;w=u*13320|0;u=v+8708-(8?x>>>8:x)-(8?w>>>8:w)|0;if(u>>>0<16384)C=6?u>>>6:u;else C=((31?u>>31:u)&-255)+255|0;u=t*33050|0;t=v+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)D=6?t>>>6:t;else D=((31?t>>31:t)&-255)+255|0;a[c+2>>0]=(4?C>>>4:C)|B&240;a[c+3>>0]=D|15;c=c+4|0;if((c|0)==(i|0))break;else{q=q+1|0;r=r+1|0;s=s+2|0}}j=b+o|0;k=n;l=f+h|0;m=e+p|0}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=k*26149|0;p=j+-14234+(8?m>>>8:m)|0;if(p>>>0<16384)E=6?p>>>6:p;else E=((31?p>>31:p)&-255)+255|0;p=g*6419|0;m=k*13320|0;k=j+8708-(8?p>>>8:p)-(8?m>>>8:m)|0;if(k>>>0<16384)F=6?k>>>6:k;else F=((31?k>>31:k)&-255)+255|0;k=g*33050|0;g=j+-17685+(8?k>>>8:k)|0;if(g>>>0<16384)G=6?g>>>6:g;else G=((31?g>>31:g)&-255)+255|0;a[l>>0]=(4?F>>>4:F)|E&240;a[l+1>>0]=G|15;return}function qc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;h=g<<1&-4;i=f+h|0;if(!h){j=b;k=c;l=f;m=e}else{n=h+-4|0;o=(1?n>>>1:n)+2|0;p=(2?n>>>2:n)+1|0;n=c+p|0;q=c;c=f;r=e;s=b;while(1){t=d[q>>0]|0;u=d[r>>0]|0;v=(d[s>>0]|0)*19077|0;w=8?v>>>8:v;v=u*26149|0;x=w+-14234+(8?v>>>8:v)|0;if(x>>>0<16384)y=6?x>>>6:x;else y=((31?x>>31:x)&-255)+255|0;x=t*6419|0;v=u*13320|0;u=w+8708-(8?x>>>8:x)-(8?v>>>8:v)|0;if(u>>>0<16384)z=6?u>>>6:u;else z=((31?u>>31:u)&-255)+255|0;u=t*33050|0;t=w+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)A=6?t>>>6:t;else A=((31?t>>31:t)&-255)+255|0;a[c>>0]=(5?z>>>5:z)|y&248;a[c+1>>0]=(3?A>>>3:A)|z<<3&224;t=d[q>>0]|0;u=d[r>>0]|0;w=(d[s+1>>0]|0)*19077|0;v=8?w>>>8:w;w=u*26149|0;x=v+-14234+(8?w>>>8:w)|0;if(x>>>0<16384)B=6?x>>>6:x;else B=((31?x>>31:x)&-255)+255|0;x=t*6419|0;w=u*13320|0;u=v+8708-(8?x>>>8:x)-(8?w>>>8:w)|0;if(u>>>0<16384)C=6?u>>>6:u;else C=((31?u>>31:u)&-255)+255|0;u=t*33050|0;t=v+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)D=6?t>>>6:t;else D=((31?t>>31:t)&-255)+255|0;a[c+2>>0]=(5?C>>>5:C)|B&248;a[c+3>>0]=(3?D>>>3:D)|C<<3&224;c=c+4|0;if((c|0)==(i|0))break;else{q=q+1|0;r=r+1|0;s=s+2|0}}j=b+o|0;k=n;l=f+h|0;m=e+p|0}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=k*26149|0;p=j+-14234+(8?m>>>8:m)|0;if(p>>>0<16384)E=6?p>>>6:p;else E=((31?p>>31:p)&-255)+255|0;p=g*6419|0;m=k*13320|0;k=j+8708-(8?p>>>8:p)-(8?m>>>8:m)|0;if(k>>>0<16384)F=6?k>>>6:k;else F=((31?k>>31:k)&-255)+255|0;k=g*33050|0;g=j+-17685+(8?k>>>8:k)|0;if(g>>>0<16384)G=6?g>>>6:g;else G=((31?g>>31:g)&-255)+255|0;a[l>>0]=(5?F>>>5:F)|E&248;a[l+1>>0]=(3?G>>>3:G)|F<<3&224;return}function rc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;b=a+24|0;d=a+56|0;e=a+64|0;if((c[e>>2]|0)>=(c[d>>2]|0)){f=0;return f|0}g=0;while(1){if((c[b>>2]|0)>0){f=g;h=5;break}Pa(a);i=g+1|0;if((c[e>>2]|0)<(c[d>>2]|0))g=i;else{f=i;h=5;break}}if((h|0)==5)return f|0;return 0}function sc(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;if((f|0)<=0)return;h=a;a=c;c=0;while(1){Ua(h,a,e,g);c=c+1|0;if((c|0)==(f|0))break;else{h=h+b|0;a=a+d|0}}return}function tc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=f+(h<<2)|0;j=d[c+h>>0]|0;k=d[e+h>>0]|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=k*26149|0;n=m+-14234+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;a[i>>0]=o;n=j*6419|0;l=k*13320|0;k=m+8708-(8?n>>>8:n)-(8?l>>>8:l)|0;if(k>>>0<16384)p=6?k>>>6:k;else p=((31?k>>31:k)&-255)+255|0;a[i+1>>0]=p;k=j*33050|0;j=m+-17685+(8?k>>>8:k)|0;if(j>>>0<16384)q=6?j>>>6:j;else q=((31?j>>31:j)&-255)+255|0;a[i+2>>0]=q;a[i+3>>0]=-1;h=h+1|0}while((h|0)!=(g|0));return}function uc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=f+(h<<2)|0;j=d[c+h>>0]|0;k=d[e+h>>0]|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=j*33050|0;n=m+-17685+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;a[i>>0]=o;n=j*6419|0;j=k*13320|0;l=m+8708-(8?n>>>8:n)-(8?j>>>8:j)|0;if(l>>>0<16384)p=6?l>>>6:l;else p=((31?l>>31:l)&-255)+255|0;a[i+1>>0]=p;l=k*26149|0;k=m+-14234+(8?l>>>8:l)|0;if(k>>>0<16384)q=6?k>>>6:k;else q=((31?k>>31:k)&-255)+255|0;a[i+2>>0]=q;a[i+3>>0]=-1;h=h+1|0}while((h|0)!=(g|0));return}function vc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=d[c+h>>0]|0;j=d[e+h>>0]|0;k=f+(h*3|0)|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=j*26149|0;n=m+-14234+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;a[k>>0]=o;n=i*6419|0;l=j*13320|0;j=m+8708-(8?n>>>8:n)-(8?l>>>8:l)|0;if(j>>>0<16384)p=6?j>>>6:j;else p=((31?j>>31:j)&-255)+255|0;a[k+1>>0]=p;j=i*33050|0;i=m+-17685+(8?j>>>8:j)|0;if(i>>>0<16384)q=6?i>>>6:i;else q=((31?i>>31:i)&-255)+255|0;a[k+2>>0]=q;h=h+1|0}while((h|0)!=(g|0));return}function wc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=d[c+h>>0]|0;j=d[e+h>>0]|0;k=f+(h*3|0)|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=i*33050|0;n=m+-17685+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;a[k>>0]=o;n=i*6419|0;i=j*13320|0;l=m+8708-(8?n>>>8:n)-(8?i>>>8:i)|0;if(l>>>0<16384)p=6?l>>>6:l;else p=((31?l>>31:l)&-255)+255|0;a[k+1>>0]=p;l=j*26149|0;j=m+-14234+(8?l>>>8:l)|0;if(j>>>0<16384)q=6?j>>>6:j;else q=((31?j>>31:j)&-255)+255|0;a[k+2>>0]=q;h=h+1|0}while((h|0)!=(g|0));return}function xc(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((f|0)<=0)return;g=0;do{h=a[b+g>>0]|0;i=a[c+g>>0]|0;j=a[d+g>>0]|0;k=e+(g<<2)|0;a[k>>0]=-1;l=i&255;i=j&255;j=(h&255)*19077|0;h=8?j>>>8:j;j=i*26149|0;m=h+-14234+(8?j>>>8:j)|0;if(m>>>0<16384)n=6?m>>>6:m;else n=((31?m>>31:m)&-255)+255|0;a[k+1>>0]=n;m=l*6419|0;j=i*13320|0;i=h+8708-(8?m>>>8:m)-(8?j>>>8:j)|0;if(i>>>0<16384)o=6?i>>>6:i;else o=((31?i>>31:i)&-255)+255|0;a[k+2>>0]=o;i=l*33050|0;l=h+-17685+(8?i>>>8:i)|0;if(l>>>0<16384)p=6?l>>>6:l;else p=((31?l>>31:l)&-255)+255|0;a[k+3>>0]=p;g=g+1|0}while((g|0)!=(f|0));return}function yc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=d[c+h>>0]|0;j=d[e+h>>0]|0;k=f+(h<<1)|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=j*26149|0;n=m+-14234+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;n=i*6419|0;l=j*13320|0;j=m+8708-(8?n>>>8:n)-(8?l>>>8:l)|0;if(j>>>0<16384)p=6?j>>>6:j;else p=((31?j>>31:j)&-255)+255|0;j=i*33050|0;i=m+-17685+(8?j>>>8:j)|0;if(i>>>0<16384)q=6?i>>>6:i;else q=((31?i>>31:i)&-255)+255|0;a[k>>0]=(4?p>>>4:p)|o&240;a[k+1>>0]=q|15;h=h+1|0}while((h|0)!=(g|0));return}function zc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=d[c+h>>0]|0;j=d[e+h>>0]|0;k=f+(h<<1)|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=j*26149|0;n=m+-14234+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;n=i*6419|0;l=j*13320|0;j=m+8708-(8?n>>>8:n)-(8?l>>>8:l)|0;if(j>>>0<16384)p=6?j>>>6:j;else p=((31?j>>31:j)&-255)+255|0;j=i*33050|0;i=m+-17685+(8?j>>>8:j)|0;if(i>>>0<16384)q=6?i>>>6:i;else q=((31?i>>31:i)&-255)+255|0;a[k>>0]=(5?p>>>5:p)|o&248;a[k+1>>0]=(3?q>>>3:q)|p<<3&224;h=h+1|0}while((h|0)!=(g|0));return}function Ac(){if(Te(10056)|0)return;c[2032]=0;Ue(10056)|0;return}function Bc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=c[b+68>>2]|0;e=c[b+76>>2]|0;f=r(c[b+8>>2]|0,c[b+52>>2]|0)|0;g=c[b+80>>2]|0;h=c[b+24>>2]|0;if(!h){if((f|0)<=0)return;i=b+16|0;j=0;do{k=Cf(c[i>>2]|0,0,c[g+(j<<2)>>2]|0,0)|0;Df(k|0,v()|0,-2147483648,0)|0;k=v()|0;a[d+j>>0]=(k|0)>255?-1:k&255;j=j+1|0}while((j|0)!=(f|0));return}else{j=c[b+32>>2]|0;i=Hf(0,0-h|0,j|0,((j|0)<0)<<31>>31|0)|0;v()|0;if((f|0)<=0)return;j=0-i|0;h=b+16|0;b=0;do{k=Cf(c[g+(b<<2)>>2]|0,0,j|0,0)|0;l=v()|0;m=Cf(i|0,0,c[e+(b<<2)>>2]|0,0)|0;n=v()|0;o=Df(k|0,l|0,-2147483648,0)|0;Df(o|0,v()|0,m|0,n|0)|0;n=v()|0;m=Cf(n|0,0,c[h>>2]|0,0)|0;Df(m|0,v()|0,-2147483648,0)|0;m=v()|0;a[d+b>>0]=(m|0)>255?-1:m&255;b=b+1|0}while((b|0)!=(f|0));return}}function Cc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=c[b+68>>2]|0;e=c[b+76>>2]|0;f=r(c[b+8>>2]|0,c[b+52>>2]|0)|0;g=c[b+80>>2]|0;h=r(c[b+24>>2]|0,0-(c[b+16>>2]|0)|0)|0;i=(f|0)>0;if(!h){if(!i)return;j=b+20|0;k=0;do{l=e+(k<<2)|0;m=Cf(c[j>>2]|0,0,c[l>>2]|0,0)|0;Df(m|0,v()|0,-2147483648,0)|0;m=v()|0;a[d+k>>0]=(m|0)>255?-1:m&255;c[l>>2]=0;k=k+1|0}while((k|0)!=(f|0));return}else{if(!i)return;i=b+20|0;b=0;do{Cf(c[g+(b<<2)>>2]|0,0,h|0,0)|0;k=v()|0;j=e+(b<<2)|0;l=Cf((c[j>>2]|0)-k|0,0,c[i>>2]|0,0)|0;Df(l|0,v()|0,-2147483648,0)|0;l=v()|0;a[d+b>>0]=(l|0)>255?-1:l&255;c[j>>2]=k;b=b+1|0}while((b|0)!=(f|0));return}}function Dc(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=c[a+8>>2]|0;f=r(c[a+52>>2]|0,e)|0;if((e|0)<=0)return;g=a+36|0;h=a+44|0;i=a+80|0;j=a+40|0;a=0;do{k=c[g>>2]|0;l=d[b+a>>0]|0;m=a+e|0;if((c[h>>2]|0)>1)n=d[b+m>>0]|0;else n=l;o=r(k,l)|0;p=c[i>>2]|0;c[p+(a<<2)>>2]=o;if((m|0)<(f|0)){o=l;l=k;k=m;q=n;s=m;while(1){m=l-(c[j>>2]|0)|0;t=k+e|0;if((m|0)<0){u=c[g>>2]|0;v=d[b+t>>0]|0;w=q;x=u+m|0;y=t;z=u}else{v=q;w=o;x=m;y=k;z=c[g>>2]|0}m=(r(z,v)|0)+(r(w-v|0,x)|0)|0;c[p+(s<<2)>>2]=m;s=s+e|0;if((s|0)>=(f|0))break;else{o=w;l=x;k=y;q=v}}}a=a+1|0}while((a|0)!=(e|0));return}function Ec(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0;e=c[b+8>>2]|0;f=r(c[b+52>>2]|0,e)|0;if((e|0)<=0)return;g=b+36|0;h=b+40|0;i=b+80|0;j=b+12|0;b=0;do{if((b|0)<(f|0)){k=0;l=0;m=b;n=b;while(1){o=(c[g>>2]|0)+k|0;p=c[h>>2]|0;if((o|0)>0){q=l;s=n;t=o;do{t=t-p|0;u=a[d+s>>0]|0;q=q+(u&255)|0;s=s+e|0}while((t|0)>0);w=u&255;x=t;y=q;z=s}else{w=0;x=o;y=l;z=n}A=r(w,0-x|0)|0;B=(r(p,y)|0)-A|0;c[(c[i>>2]|0)+(m<<2)>>2]=B;B=Cf(c[j>>2]|0,0,A|0,0)|0;Df(B|0,v()|0,-2147483648,0)|0;l=v()|0;m=m+e|0;if((m|0)>=(f|0))break;else{k=x;n=z}}}b=b+1|0}while((b|0)!=(e|0));return}function Fc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=(18?p>>>18:p)&255;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=r*26149|0;t=s+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i>>0]=u;u=q*6419|0;t=r*13320|0;r=s+8708-(8?u>>>8:u)-(8?t>>>8:t)|0;if(r>>>0<16384)v=6?r>>>6:r;else v=((31?r>>31:r)&-255)+255|0;a[i+1>>0]=v;v=q*33050|0;q=s+-17685+(8?v>>>8:v)|0;if(q>>>0<16384)w=6?q>>>6:q;else w=((31?q>>31:q)&-255)+255|0;a[i+2>>0]=w;a[i+3>>0]=-1;w=(c|0)!=0;if(w){q=n+131074+(o*3|0)|0;v=(2?q>>>2:q)&255;s=(18?q>>>18:q)&255;q=(d[c>>0]|0)*19077|0;r=8?q>>>8:q;q=s*26149|0;t=(8?q>>>8:q)+-14234+r|0;if(t>>>0<16384)x=6?t>>>6:t;else x=((31?t>>31:t)&-255)+255|0;a[j>>0]=x;x=v*6419|0;t=s*13320|0;s=8708-(8?x>>>8:x)-(8?t>>>8:t)+r|0;if(s>>>0<16384)y=6?s>>>6:s;else y=((31?s>>31:s)&-255)+255|0;a[j+1>>0]=y;y=v*33050|0;v=(8?y>>>8:y)+-17685+r|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[j+2>>0]=z;a[j+3>>0]=-1}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){v=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);r=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=v+n|0;s=y+524296+z+r|0;t=s+(y<<1)|0;y=3?t>>>3:t;t=s+(r+z<<1)|0;s=3?t>>>3:t;t=y+z|0;x=s+v|0;q=o<<1;u=q+-1|0;p=u<<2;C=i+p|0;D=(1?t>>>1:t)&255;E=(17?t>>>17:t)&255;t=(d[b+u>>0]|0)*19077|0;F=8?t>>>8:t;t=E*26149|0;G=F+-14234+(8?t>>>8:t)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[C>>0]=H;G=D*6419|0;t=E*13320|0;E=F+8708-(8?G>>>8:G)-(8?t>>>8:t)|0;if(E>>>0<16384)I=6?E>>>6:E;else I=((31?E>>31:E)&-255)+255|0;a[C+1>>0]=I;E=D*33050|0;D=F+-17685+(8?E>>>8:E)|0;if(D>>>0<16384)J=6?D>>>6:D;else J=((31?D>>31:D)&-255)+255|0;a[C+2>>0]=J;a[C+3>>0]=-1;C=o<<3;D=i+C|0;E=(1?x>>>1:x)&255;F=(17?x>>>17:x)&255;x=(d[b+q>>0]|0)*19077|0;t=8?x>>>8:x;x=F*26149|0;G=(8?x>>>8:x)+-14234+t|0;if(G>>>0<16384)K=6?G>>>6:G;else K=((31?G>>31:G)&-255)+255|0;a[D>>0]=K;G=E*6419|0;x=F*13320|0;F=8708-(8?G>>>8:G)-(8?x>>>8:x)+t|0;if(F>>>0<16384)L=6?F>>>6:F;else L=((31?F>>31:F)&-255)+255|0;a[D+1>>0]=L;F=E*33050|0;E=(8?F>>>8:F)+-17685+t|0;if(E>>>0<16384)M=6?E>>>6:E;else M=((31?E>>31:E)&-255)+255|0;a[D+2>>0]=M;a[D+3>>0]=-1;if(w){D=s+n|0;s=y+r|0;y=j+p|0;p=(1?D>>>1:D)&255;E=(17?D>>>17:D)&255;D=(d[c+u>>0]|0)*19077|0;u=8?D>>>8:D;D=E*26149|0;t=(8?D>>>8:D)+-14234+u|0;if(t>>>0<16384)N=6?t>>>6:t;else N=((31?t>>31:t)&-255)+255|0;a[y>>0]=N;t=p*6419|0;D=E*13320|0;E=8708-(8?t>>>8:t)-(8?D>>>8:D)+u|0;if(E>>>0<16384)O=6?E>>>6:E;else O=((31?E>>31:E)&-255)+255|0;a[y+1>>0]=O;E=p*33050|0;p=(8?E>>>8:E)+-17685+u|0;if(p>>>0<16384)P=6?p>>>6:p;else P=((31?p>>31:p)&-255)+255|0;a[y+2>>0]=P;a[y+3>>0]=-1;y=j+C|0;C=(1?s>>>1:s)&255;p=(17?s>>>17:s)&255;s=(d[c+q>>0]|0)*19077|0;q=8?s>>>8:s;s=p*26149|0;u=(8?s>>>8:s)+-14234+q|0;if(u>>>0<16384)Q=6?u>>>6:u;else Q=((31?u>>31:u)&-255)+255|0;a[y>>0]=Q;u=C*6419|0;s=p*13320|0;p=8708-(8?u>>>8:u)-(8?s>>>8:s)+q|0;if(p>>>0<16384)R=6?p>>>6:p;else R=((31?p>>31:p)&-255)+255|0;a[y+1>>0]=R;p=C*33050|0;C=(8?p>>>8:p)+-17685+q|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[y+2>>0]=S;a[y+3>>0]=-1}if((o|0)<(m|0)){z=v;n=r;o=o+1|0}else{A=v;B=r;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=l<<2;n=i+o|0;i=(2?k>>>2:k)&255;z=(18?k>>>18:k)&255;k=(d[b+l>>0]|0)*19077|0;b=8?k>>>8:k;k=z*26149|0;m=(8?k>>>8:k)+-14234+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[n>>0]=T;T=i*6419|0;m=z*13320|0;z=8708-(8?T>>>8:T)-(8?m>>>8:m)+b|0;if(z>>>0<16384)U=6?z>>>6:z;else U=((31?z>>31:z)&-255)+255|0;a[n+1>>0]=U;U=i*33050|0;i=(8?U>>>8:U)+-17685+b|0;if(i>>>0<16384)V=6?i>>>6:i;else V=((31?i>>31:i)&-255)+255|0;a[n+2>>0]=V;a[n+3>>0]=-1;if(!w)return;w=A+131074+(B*3|0)|0;B=j+o|0;o=(2?w>>>2:w)&255;j=(18?w>>>18:w)&255;w=(d[c+l>>0]|0)*19077|0;l=8?w>>>8:w;w=j*26149|0;c=(8?w>>>8:w)+-14234+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[B>>0]=W;W=o*6419|0;c=j*13320|0;j=8708-(8?W>>>8:W)-(8?c>>>8:c)+l|0;if(j>>>0<16384)X=6?j>>>6:j;else X=((31?j>>31:j)&-255)+255|0;a[B+1>>0]=X;X=o*33050|0;o=(8?X>>>8:X)+-17685+l|0;if(o>>>0<16384)Y=6?o>>>6:o;else Y=((31?o>>31:o)&-255)+255|0;a[B+2>>0]=Y;a[B+3>>0]=-1;return}function Gc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=(18?p>>>18:p)&255;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=q*33050|0;t=s+-17685+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i>>0]=u;u=q*6419|0;q=r*13320|0;t=s+8708-(8?u>>>8:u)-(8?q>>>8:q)|0;if(t>>>0<16384)v=6?t>>>6:t;else v=((31?t>>31:t)&-255)+255|0;a[i+1>>0]=v;v=r*26149|0;r=s+-14234+(8?v>>>8:v)|0;if(r>>>0<16384)w=6?r>>>6:r;else w=((31?r>>31:r)&-255)+255|0;a[i+2>>0]=w;a[i+3>>0]=-1;w=(c|0)!=0;if(w){r=n+131074+(o*3|0)|0;v=(2?r>>>2:r)&255;s=(18?r>>>18:r)&255;r=(d[c>>0]|0)*19077|0;t=8?r>>>8:r;r=v*33050|0;q=(8?r>>>8:r)+-17685+t|0;if(q>>>0<16384)x=6?q>>>6:q;else x=((31?q>>31:q)&-255)+255|0;a[j>>0]=x;x=v*6419|0;v=s*13320|0;q=8708-(8?x>>>8:x)-(8?v>>>8:v)+t|0;if(q>>>0<16384)y=6?q>>>6:q;else y=((31?q>>31:q)&-255)+255|0;a[j+1>>0]=y;y=s*26149|0;s=(8?y>>>8:y)+-14234+t|0;if(s>>>0<16384)z=6?s>>>6:s;else z=((31?s>>31:s)&-255)+255|0;a[j+2>>0]=z;a[j+3>>0]=-1}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){s=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);t=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=s+n|0;q=y+524296+z+t|0;v=q+(y<<1)|0;y=3?v>>>3:v;v=q+(t+z<<1)|0;q=3?v>>>3:v;v=y+z|0;x=q+s|0;r=o<<1;u=r+-1|0;p=u<<2;C=i+p|0;D=(1?v>>>1:v)&255;E=(17?v>>>17:v)&255;v=(d[b+u>>0]|0)*19077|0;F=8?v>>>8:v;v=D*33050|0;G=F+-17685+(8?v>>>8:v)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[C>>0]=H;G=D*6419|0;D=E*13320|0;v=F+8708-(8?G>>>8:G)-(8?D>>>8:D)|0;if(v>>>0<16384)I=6?v>>>6:v;else I=((31?v>>31:v)&-255)+255|0;a[C+1>>0]=I;v=E*26149|0;E=F+-14234+(8?v>>>8:v)|0;if(E>>>0<16384)J=6?E>>>6:E;else J=((31?E>>31:E)&-255)+255|0;a[C+2>>0]=J;a[C+3>>0]=-1;C=o<<3;E=i+C|0;v=(1?x>>>1:x)&255;F=(17?x>>>17:x)&255;x=(d[b+r>>0]|0)*19077|0;D=8?x>>>8:x;x=v*33050|0;G=(8?x>>>8:x)+-17685+D|0;if(G>>>0<16384)K=6?G>>>6:G;else K=((31?G>>31:G)&-255)+255|0;a[E>>0]=K;G=v*6419|0;v=F*13320|0;x=8708-(8?G>>>8:G)-(8?v>>>8:v)+D|0;if(x>>>0<16384)L=6?x>>>6:x;else L=((31?x>>31:x)&-255)+255|0;a[E+1>>0]=L;x=F*26149|0;F=(8?x>>>8:x)+-14234+D|0;if(F>>>0<16384)M=6?F>>>6:F;else M=((31?F>>31:F)&-255)+255|0;a[E+2>>0]=M;a[E+3>>0]=-1;if(w){E=q+n|0;q=y+t|0;y=j+p|0;p=(1?E>>>1:E)&255;F=(17?E>>>17:E)&255;E=(d[c+u>>0]|0)*19077|0;u=8?E>>>8:E;E=p*33050|0;D=(8?E>>>8:E)+-17685+u|0;if(D>>>0<16384)N=6?D>>>6:D;else N=((31?D>>31:D)&-255)+255|0;a[y>>0]=N;D=p*6419|0;p=F*13320|0;E=8708-(8?D>>>8:D)-(8?p>>>8:p)+u|0;if(E>>>0<16384)O=6?E>>>6:E;else O=((31?E>>31:E)&-255)+255|0;a[y+1>>0]=O;E=F*26149|0;F=(8?E>>>8:E)+-14234+u|0;if(F>>>0<16384)P=6?F>>>6:F;else P=((31?F>>31:F)&-255)+255|0;a[y+2>>0]=P;a[y+3>>0]=-1;y=j+C|0;C=(1?q>>>1:q)&255;F=(17?q>>>17:q)&255;q=(d[c+r>>0]|0)*19077|0;r=8?q>>>8:q;q=C*33050|0;u=(8?q>>>8:q)+-17685+r|0;if(u>>>0<16384)Q=6?u>>>6:u;else Q=((31?u>>31:u)&-255)+255|0;a[y>>0]=Q;u=C*6419|0;C=F*13320|0;q=8708-(8?u>>>8:u)-(8?C>>>8:C)+r|0;if(q>>>0<16384)R=6?q>>>6:q;else R=((31?q>>31:q)&-255)+255|0;a[y+1>>0]=R;q=F*26149|0;F=(8?q>>>8:q)+-14234+r|0;if(F>>>0<16384)S=6?F>>>6:F;else S=((31?F>>31:F)&-255)+255|0;a[y+2>>0]=S;a[y+3>>0]=-1}if((o|0)<(m|0)){z=s;n=t;o=o+1|0}else{A=s;B=t;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=l<<2;n=i+o|0;i=(2?k>>>2:k)&255;z=(18?k>>>18:k)&255;k=(d[b+l>>0]|0)*19077|0;b=8?k>>>8:k;k=i*33050|0;m=(8?k>>>8:k)+-17685+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[n>>0]=T;T=i*6419|0;i=z*13320|0;m=8708-(8?T>>>8:T)-(8?i>>>8:i)+b|0;if(m>>>0<16384)U=6?m>>>6:m;else U=((31?m>>31:m)&-255)+255|0;a[n+1>>0]=U;U=z*26149|0;z=(8?U>>>8:U)+-14234+b|0;if(z>>>0<16384)V=6?z>>>6:z;else V=((31?z>>31:z)&-255)+255|0;a[n+2>>0]=V;a[n+3>>0]=-1;if(!w)return;w=A+131074+(B*3|0)|0;B=j+o|0;o=(2?w>>>2:w)&255;j=(18?w>>>18:w)&255;w=(d[c+l>>0]|0)*19077|0;l=8?w>>>8:w;w=o*33050|0;c=(8?w>>>8:w)+-17685+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[B>>0]=W;W=o*6419|0;o=j*13320|0;c=8708-(8?W>>>8:W)-(8?o>>>8:o)+l|0;if(c>>>0<16384)X=6?c>>>6:c;else X=((31?c>>31:c)&-255)+255|0;a[B+1>>0]=X;X=j*26149|0;j=(8?X>>>8:X)+-14234+l|0;if(j>>>0<16384)Y=6?j>>>6:j;else Y=((31?j>>31:j)&-255)+255|0;a[B+2>>0]=Y;a[B+3>>0]=-1;return}function Hc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=18?p>>>18:p;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=r*26149|0;t=s+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i>>0]=u;u=q*6419|0;t=r*13320|0;r=s+8708-(8?t>>>8:t)-(8?u>>>8:u)|0;if(r>>>0<16384)v=6?r>>>6:r;else v=((31?r>>31:r)&-255)+255|0;a[i+1>>0]=v;v=q*33050|0;q=s+-17685+(8?v>>>8:v)|0;if(q>>>0<16384)w=6?q>>>6:q;else w=((31?q>>31:q)&-255)+255|0;a[i+2>>0]=w;w=(c|0)!=0;if(w){q=n+131074+(o*3|0)|0;v=(2?q>>>2:q)&255;s=18?q>>>18:q;q=(d[c>>0]|0)*19077|0;r=8?q>>>8:q;q=s*26149|0;u=(8?q>>>8:q)+-14234+r|0;if(u>>>0<16384)x=6?u>>>6:u;else x=((31?u>>31:u)&-255)+255|0;a[j>>0]=x;x=v*6419|0;u=s*13320|0;s=8708-(8?u>>>8:u)-(8?x>>>8:x)+r|0;if(s>>>0<16384)y=6?s>>>6:s;else y=((31?s>>31:s)&-255)+255|0;a[j+1>>0]=y;y=v*33050|0;v=(8?y>>>8:y)+-17685+r|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[j+2>>0]=z}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){v=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);r=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=v+n|0;s=y+524296+z+r|0;x=s+(y<<1)|0;y=3?x>>>3:x;x=s+(r+z<<1)|0;s=3?x>>>3:x;x=y+z|0;u=s+v|0;q=o<<1;t=q+-1|0;p=(1?x>>>1:x)&255;C=17?x>>>17:x;x=t*3|0;D=i+x|0;E=(d[b+t>>0]|0)*19077|0;F=8?E>>>8:E;E=C*26149|0;G=F+-14234+(8?E>>>8:E)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[D>>0]=H;G=p*6419|0;E=C*13320|0;C=F+8708-(8?E>>>8:E)-(8?G>>>8:G)|0;if(C>>>0<16384)I=6?C>>>6:C;else I=((31?C>>31:C)&-255)+255|0;a[D+1>>0]=I;C=p*33050|0;p=F+-17685+(8?C>>>8:C)|0;if(p>>>0<16384)J=6?p>>>6:p;else J=((31?p>>31:p)&-255)+255|0;a[D+2>>0]=J;D=(1?u>>>1:u)&255;p=17?u>>>17:u;u=o*6|0;C=i+u|0;F=(d[b+q>>0]|0)*19077|0;G=8?F>>>8:F;F=p*26149|0;E=(8?F>>>8:F)+-14234+G|0;if(E>>>0<16384)K=6?E>>>6:E;else K=((31?E>>31:E)&-255)+255|0;a[C>>0]=K;E=D*6419|0;F=p*13320|0;p=8708-(8?F>>>8:F)-(8?E>>>8:E)+G|0;if(p>>>0<16384)L=6?p>>>6:p;else L=((31?p>>31:p)&-255)+255|0;a[C+1>>0]=L;p=D*33050|0;D=(8?p>>>8:p)+-17685+G|0;if(D>>>0<16384)M=6?D>>>6:D;else M=((31?D>>31:D)&-255)+255|0;a[C+2>>0]=M;if(w){C=s+n|0;s=y+r|0;y=(1?C>>>1:C)&255;D=17?C>>>17:C;C=j+x|0;x=(d[c+t>>0]|0)*19077|0;t=8?x>>>8:x;x=D*26149|0;G=(8?x>>>8:x)+-14234+t|0;if(G>>>0<16384)N=6?G>>>6:G;else N=((31?G>>31:G)&-255)+255|0;a[C>>0]=N;G=y*6419|0;x=D*13320|0;D=8708-(8?x>>>8:x)-(8?G>>>8:G)+t|0;if(D>>>0<16384)O=6?D>>>6:D;else O=((31?D>>31:D)&-255)+255|0;a[C+1>>0]=O;D=y*33050|0;y=(8?D>>>8:D)+-17685+t|0;if(y>>>0<16384)P=6?y>>>6:y;else P=((31?y>>31:y)&-255)+255|0;a[C+2>>0]=P;C=(1?s>>>1:s)&255;y=17?s>>>17:s;s=j+u|0;u=(d[c+q>>0]|0)*19077|0;q=8?u>>>8:u;u=y*26149|0;t=(8?u>>>8:u)+-14234+q|0;if(t>>>0<16384)Q=6?t>>>6:t;else Q=((31?t>>31:t)&-255)+255|0;a[s>>0]=Q;t=C*6419|0;u=y*13320|0;y=8708-(8?u>>>8:u)-(8?t>>>8:t)+q|0;if(y>>>0<16384)R=6?y>>>6:y;else R=((31?y>>31:y)&-255)+255|0;a[s+1>>0]=R;y=C*33050|0;C=(8?y>>>8:y)+-17685+q|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[s+2>>0]=S}if((o|0)<(m|0)){z=v;n=r;o=o+1|0}else{A=v;B=r;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=(2?k>>>2:k)&255;n=18?k>>>18:k;k=l*3|0;z=i+k|0;i=(d[b+l>>0]|0)*19077|0;b=8?i>>>8:i;i=n*26149|0;m=(8?i>>>8:i)+-14234+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[z>>0]=T;T=o*6419|0;m=n*13320|0;n=8708-(8?m>>>8:m)-(8?T>>>8:T)+b|0;if(n>>>0<16384)U=6?n>>>6:n;else U=((31?n>>31:n)&-255)+255|0;a[z+1>>0]=U;U=o*33050|0;o=(8?U>>>8:U)+-17685+b|0;if(o>>>0<16384)V=6?o>>>6:o;else V=((31?o>>31:o)&-255)+255|0;a[z+2>>0]=V;if(!w)return;w=A+131074+(B*3|0)|0;B=(2?w>>>2:w)&255;A=18?w>>>18:w;w=j+k|0;k=(d[c+l>>0]|0)*19077|0;l=8?k>>>8:k;k=A*26149|0;c=(8?k>>>8:k)+-14234+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[w>>0]=W;W=B*6419|0;c=A*13320|0;A=8708-(8?c>>>8:c)-(8?W>>>8:W)+l|0;if(A>>>0<16384)X=6?A>>>6:A;else X=((31?A>>31:A)&-255)+255|0;a[w+1>>0]=X;X=B*33050|0;B=(8?X>>>8:X)+-17685+l|0;if(B>>>0<16384)Y=6?B>>>6:B;else Y=((31?B>>31:B)&-255)+255|0;a[w+2>>0]=Y;return}function Ic(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=18?p>>>18:p;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=q*33050|0;t=s+-17685+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i>>0]=u;u=q*6419|0;q=r*13320|0;t=s+8708-(8?q>>>8:q)-(8?u>>>8:u)|0;if(t>>>0<16384)v=6?t>>>6:t;else v=((31?t>>31:t)&-255)+255|0;a[i+1>>0]=v;v=r*26149|0;r=s+-14234+(8?v>>>8:v)|0;if(r>>>0<16384)w=6?r>>>6:r;else w=((31?r>>31:r)&-255)+255|0;a[i+2>>0]=w;w=(c|0)!=0;if(w){r=n+131074+(o*3|0)|0;v=(2?r>>>2:r)&255;s=18?r>>>18:r;r=(d[c>>0]|0)*19077|0;t=8?r>>>8:r;r=v*33050|0;u=(8?r>>>8:r)+-17685+t|0;if(u>>>0<16384)x=6?u>>>6:u;else x=((31?u>>31:u)&-255)+255|0;a[j>>0]=x;x=v*6419|0;v=s*13320|0;u=8708-(8?v>>>8:v)-(8?x>>>8:x)+t|0;if(u>>>0<16384)y=6?u>>>6:u;else y=((31?u>>31:u)&-255)+255|0;a[j+1>>0]=y;y=s*26149|0;s=(8?y>>>8:y)+-14234+t|0;if(s>>>0<16384)z=6?s>>>6:s;else z=((31?s>>31:s)&-255)+255|0;a[j+2>>0]=z}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){s=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);t=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=s+n|0;u=y+524296+z+t|0;x=u+(y<<1)|0;y=3?x>>>3:x;x=u+(t+z<<1)|0;u=3?x>>>3:x;x=y+z|0;v=u+s|0;r=o<<1;q=r+-1|0;p=(1?x>>>1:x)&255;C=17?x>>>17:x;x=q*3|0;D=i+x|0;E=(d[b+q>>0]|0)*19077|0;F=8?E>>>8:E;E=p*33050|0;G=F+-17685+(8?E>>>8:E)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[D>>0]=H;G=p*6419|0;p=C*13320|0;E=F+8708-(8?p>>>8:p)-(8?G>>>8:G)|0;if(E>>>0<16384)I=6?E>>>6:E;else I=((31?E>>31:E)&-255)+255|0;a[D+1>>0]=I;E=C*26149|0;C=F+-14234+(8?E>>>8:E)|0;if(C>>>0<16384)J=6?C>>>6:C;else J=((31?C>>31:C)&-255)+255|0;a[D+2>>0]=J;D=(1?v>>>1:v)&255;C=17?v>>>17:v;v=o*6|0;E=i+v|0;F=(d[b+r>>0]|0)*19077|0;G=8?F>>>8:F;F=D*33050|0;p=(8?F>>>8:F)+-17685+G|0;if(p>>>0<16384)K=6?p>>>6:p;else K=((31?p>>31:p)&-255)+255|0;a[E>>0]=K;p=D*6419|0;D=C*13320|0;F=8708-(8?D>>>8:D)-(8?p>>>8:p)+G|0;if(F>>>0<16384)L=6?F>>>6:F;else L=((31?F>>31:F)&-255)+255|0;a[E+1>>0]=L;F=C*26149|0;C=(8?F>>>8:F)+-14234+G|0;if(C>>>0<16384)M=6?C>>>6:C;else M=((31?C>>31:C)&-255)+255|0;a[E+2>>0]=M;if(w){E=u+n|0;u=y+t|0;y=(1?E>>>1:E)&255;C=17?E>>>17:E;E=j+x|0;x=(d[c+q>>0]|0)*19077|0;q=8?x>>>8:x;x=y*33050|0;G=(8?x>>>8:x)+-17685+q|0;if(G>>>0<16384)N=6?G>>>6:G;else N=((31?G>>31:G)&-255)+255|0;a[E>>0]=N;G=y*6419|0;y=C*13320|0;x=8708-(8?y>>>8:y)-(8?G>>>8:G)+q|0;if(x>>>0<16384)O=6?x>>>6:x;else O=((31?x>>31:x)&-255)+255|0;a[E+1>>0]=O;x=C*26149|0;C=(8?x>>>8:x)+-14234+q|0;if(C>>>0<16384)P=6?C>>>6:C;else P=((31?C>>31:C)&-255)+255|0;a[E+2>>0]=P;E=(1?u>>>1:u)&255;C=17?u>>>17:u;u=j+v|0;v=(d[c+r>>0]|0)*19077|0;r=8?v>>>8:v;v=E*33050|0;q=(8?v>>>8:v)+-17685+r|0;if(q>>>0<16384)Q=6?q>>>6:q;else Q=((31?q>>31:q)&-255)+255|0;a[u>>0]=Q;q=E*6419|0;E=C*13320|0;v=8708-(8?E>>>8:E)-(8?q>>>8:q)+r|0;if(v>>>0<16384)R=6?v>>>6:v;else R=((31?v>>31:v)&-255)+255|0;a[u+1>>0]=R;v=C*26149|0;C=(8?v>>>8:v)+-14234+r|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[u+2>>0]=S}if((o|0)<(m|0)){z=s;n=t;o=o+1|0}else{A=s;B=t;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=(2?k>>>2:k)&255;n=18?k>>>18:k;k=l*3|0;z=i+k|0;i=(d[b+l>>0]|0)*19077|0;b=8?i>>>8:i;i=o*33050|0;m=(8?i>>>8:i)+-17685+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[z>>0]=T;T=o*6419|0;o=n*13320|0;m=8708-(8?o>>>8:o)-(8?T>>>8:T)+b|0;if(m>>>0<16384)U=6?m>>>6:m;else U=((31?m>>31:m)&-255)+255|0;a[z+1>>0]=U;U=n*26149|0;n=(8?U>>>8:U)+-14234+b|0;if(n>>>0<16384)V=6?n>>>6:n;else V=((31?n>>31:n)&-255)+255|0;a[z+2>>0]=V;if(!w)return;w=A+131074+(B*3|0)|0;B=(2?w>>>2:w)&255;A=18?w>>>18:w;w=j+k|0;k=(d[c+l>>0]|0)*19077|0;l=8?k>>>8:k;k=B*33050|0;c=(8?k>>>8:k)+-17685+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[w>>0]=W;W=B*6419|0;B=A*13320|0;c=8708-(8?B>>>8:B)-(8?W>>>8:W)+l|0;if(c>>>0<16384)X=6?c>>>6:c;else X=((31?c>>31:c)&-255)+255|0;a[w+1>>0]=X;X=A*26149|0;A=(8?X>>>8:X)+-14234+l|0;if(A>>>0<16384)Y=6?A>>>6:A;else Y=((31?A>>31:A)&-255)+255|0;a[w+2>>0]=Y;return}function Jc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=a[b>>0]|0;a[i>>0]=-1;r=(2?p>>>2:p)&255;s=(18?p>>>18:p)&255;p=(q&255)*19077|0;q=8?p>>>8:p;p=s*26149|0;t=q+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i+1>>0]=u;u=r*6419|0;t=s*13320|0;s=q+8708-(8?u>>>8:u)-(8?t>>>8:t)|0;if(s>>>0<16384)v=6?s>>>6:s;else v=((31?s>>31:s)&-255)+255|0;a[i+2>>0]=v;v=r*33050|0;r=q+-17685+(8?v>>>8:v)|0;if(r>>>0<16384)w=6?r>>>6:r;else w=((31?r>>31:r)&-255)+255|0;a[i+3>>0]=w;w=(c|0)!=0;if(w){r=n+131074+(o*3|0)|0;v=a[c>>0]|0;a[j>>0]=-1;q=(2?r>>>2:r)&255;s=(18?r>>>18:r)&255;r=(v&255)*19077|0;v=8?r>>>8:r;r=s*26149|0;t=(8?r>>>8:r)+-14234+v|0;if(t>>>0<16384)x=6?t>>>6:t;else x=((31?t>>31:t)&-255)+255|0;a[j+1>>0]=x;x=q*6419|0;t=s*13320|0;s=8708-(8?x>>>8:x)-(8?t>>>8:t)+v|0;if(s>>>0<16384)y=6?s>>>6:s;else y=((31?s>>31:s)&-255)+255|0;a[j+2>>0]=y;y=q*33050|0;q=(8?y>>>8:y)+-17685+v|0;if(q>>>0<16384)z=6?q>>>6:q;else z=((31?q>>31:q)&-255)+255|0;a[j+3>>0]=z}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){q=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);v=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=q+n|0;s=y+524296+z+v|0;t=s+(y<<1)|0;y=3?t>>>3:t;t=s+(v+z<<1)|0;s=3?t>>>3:t;t=y+z|0;x=s+q|0;r=o<<1;u=r+-1|0;p=a[b+u>>0]|0;C=u<<2;D=i+C|0;a[D>>0]=-1;E=(1?t>>>1:t)&255;F=(17?t>>>17:t)&255;t=(p&255)*19077|0;p=8?t>>>8:t;t=F*26149|0;G=p+-14234+(8?t>>>8:t)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[D+1>>0]=H;G=E*6419|0;t=F*13320|0;F=p+8708-(8?G>>>8:G)-(8?t>>>8:t)|0;if(F>>>0<16384)I=6?F>>>6:F;else I=((31?F>>31:F)&-255)+255|0;a[D+2>>0]=I;F=E*33050|0;E=p+-17685+(8?F>>>8:F)|0;if(E>>>0<16384)J=6?E>>>6:E;else J=((31?E>>31:E)&-255)+255|0;a[D+3>>0]=J;D=a[b+r>>0]|0;E=o<<3;F=i+E|0;a[F>>0]=-1;p=(1?x>>>1:x)&255;t=(17?x>>>17:x)&255;x=(D&255)*19077|0;D=8?x>>>8:x;x=t*26149|0;G=(8?x>>>8:x)+-14234+D|0;if(G>>>0<16384)K=6?G>>>6:G;else K=((31?G>>31:G)&-255)+255|0;a[F+1>>0]=K;G=p*6419|0;x=t*13320|0;t=8708-(8?G>>>8:G)-(8?x>>>8:x)+D|0;if(t>>>0<16384)L=6?t>>>6:t;else L=((31?t>>31:t)&-255)+255|0;a[F+2>>0]=L;t=p*33050|0;p=(8?t>>>8:t)+-17685+D|0;if(p>>>0<16384)M=6?p>>>6:p;else M=((31?p>>31:p)&-255)+255|0;a[F+3>>0]=M;if(w){F=s+n|0;s=y+v|0;y=a[c+u>>0]|0;u=j+C|0;a[u>>0]=-1;C=(1?F>>>1:F)&255;p=(17?F>>>17:F)&255;F=(y&255)*19077|0;y=8?F>>>8:F;F=p*26149|0;D=(8?F>>>8:F)+-14234+y|0;if(D>>>0<16384)N=6?D>>>6:D;else N=((31?D>>31:D)&-255)+255|0;a[u+1>>0]=N;D=C*6419|0;F=p*13320|0;p=8708-(8?D>>>8:D)-(8?F>>>8:F)+y|0;if(p>>>0<16384)O=6?p>>>6:p;else O=((31?p>>31:p)&-255)+255|0;a[u+2>>0]=O;p=C*33050|0;C=(8?p>>>8:p)+-17685+y|0;if(C>>>0<16384)P=6?C>>>6:C;else P=((31?C>>31:C)&-255)+255|0;a[u+3>>0]=P;u=a[c+r>>0]|0;r=j+E|0;a[r>>0]=-1;E=(1?s>>>1:s)&255;C=(17?s>>>17:s)&255;s=(u&255)*19077|0;u=8?s>>>8:s;s=C*26149|0;y=(8?s>>>8:s)+-14234+u|0;if(y>>>0<16384)Q=6?y>>>6:y;else Q=((31?y>>31:y)&-255)+255|0;a[r+1>>0]=Q;y=E*6419|0;s=C*13320|0;C=8708-(8?y>>>8:y)-(8?s>>>8:s)+u|0;if(C>>>0<16384)R=6?C>>>6:C;else R=((31?C>>31:C)&-255)+255|0;a[r+2>>0]=R;C=E*33050|0;E=(8?C>>>8:C)+-17685+u|0;if(E>>>0<16384)S=6?E>>>6:E;else S=((31?E>>31:E)&-255)+255|0;a[r+3>>0]=S}if((o|0)<(m|0)){z=q;n=v;o=o+1|0}else{A=q;B=v;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=a[b+l>>0]|0;b=l<<2;n=i+b|0;a[n>>0]=-1;i=(2?k>>>2:k)&255;z=(18?k>>>18:k)&255;k=(o&255)*19077|0;o=8?k>>>8:k;k=z*26149|0;m=(8?k>>>8:k)+-14234+o|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[n+1>>0]=T;T=i*6419|0;m=z*13320|0;z=8708-(8?T>>>8:T)-(8?m>>>8:m)+o|0;if(z>>>0<16384)U=6?z>>>6:z;else U=((31?z>>31:z)&-255)+255|0;a[n+2>>0]=U;U=i*33050|0;i=(8?U>>>8:U)+-17685+o|0;if(i>>>0<16384)V=6?i>>>6:i;else V=((31?i>>31:i)&-255)+255|0;a[n+3>>0]=V;if(!w)return;w=A+131074+(B*3|0)|0;B=a[c+l>>0]|0;l=j+b|0;a[l>>0]=-1;b=(2?w>>>2:w)&255;j=(18?w>>>18:w)&255;w=(B&255)*19077|0;B=8?w>>>8:w;w=j*26149|0;c=(8?w>>>8:w)+-14234+B|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[l+1>>0]=W;W=b*6419|0;c=j*13320|0;j=8708-(8?W>>>8:W)-(8?c>>>8:c)+B|0;if(j>>>0<16384)X=6?j>>>6:j;else X=((31?j>>31:j)&-255)+255|0;a[l+2>>0]=X;X=b*33050|0;b=(8?X>>>8:X)+-17685+B|0;if(b>>>0<16384)Y=6?b>>>6:b;else Y=((31?b>>31:b)&-255)+255|0;a[l+3>>0]=Y;return}function Kc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=18?p>>>18:p;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=r*26149|0;t=s+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;t=q*6419|0;p=r*13320|0;r=s+8708-(8?p>>>8:p)-(8?t>>>8:t)|0;if(r>>>0<16384)v=6?r>>>6:r;else v=((31?r>>31:r)&-255)+255|0;r=q*33050|0;q=s+-17685+(8?r>>>8:r)|0;if(q>>>0<16384)w=6?q>>>6:q;else w=((31?q>>31:q)&-255)+255|0;a[i>>0]=(4?v>>>4:v)|u&240;a[i+1>>0]=w|15;w=(c|0)!=0;if(w){u=n+131074+(o*3|0)|0;v=(2?u>>>2:u)&255;q=18?u>>>18:u;u=(d[c>>0]|0)*19077|0;r=8?u>>>8:u;u=q*26149|0;s=(8?u>>>8:u)+-14234+r|0;if(s>>>0<16384)x=6?s>>>6:s;else x=((31?s>>31:s)&-255)+255|0;s=v*6419|0;u=q*13320|0;q=8708-(8?u>>>8:u)-(8?s>>>8:s)+r|0;if(q>>>0<16384)y=6?q>>>6:q;else y=((31?q>>31:q)&-255)+255|0;q=v*33050|0;v=(8?q>>>8:q)+-17685+r|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[j>>0]=(4?y>>>4:y)|x&240;a[j+1>>0]=z|15}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){x=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);y=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);v=x+n|0;r=v+524296+z+y|0;q=r+(v<<1)|0;v=3?q>>>3:q;q=r+(y+z<<1)|0;r=3?q>>>3:q;q=v+z|0;s=r+x|0;u=o<<1;t=u+-1|0;p=(1?q>>>1:q)&255;C=17?q>>>17:q;q=t<<1;D=i+q|0;E=(d[b+t>>0]|0)*19077|0;F=8?E>>>8:E;E=C*26149|0;G=F+-14234+(8?E>>>8:E)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;G=p*6419|0;E=C*13320|0;C=F+8708-(8?E>>>8:E)-(8?G>>>8:G)|0;if(C>>>0<16384)I=6?C>>>6:C;else I=((31?C>>31:C)&-255)+255|0;C=p*33050|0;p=F+-17685+(8?C>>>8:C)|0;if(p>>>0<16384)J=6?p>>>6:p;else J=((31?p>>31:p)&-255)+255|0;a[D>>0]=(4?I>>>4:I)|H&240;a[D+1>>0]=J|15;D=(1?s>>>1:s)&255;p=17?s>>>17:s;s=o<<2;C=i+s|0;F=(d[b+u>>0]|0)*19077|0;G=8?F>>>8:F;F=p*26149|0;E=(8?F>>>8:F)+-14234+G|0;if(E>>>0<16384)K=6?E>>>6:E;else K=((31?E>>31:E)&-255)+255|0;E=D*6419|0;F=p*13320|0;p=8708-(8?F>>>8:F)-(8?E>>>8:E)+G|0;if(p>>>0<16384)L=6?p>>>6:p;else L=((31?p>>31:p)&-255)+255|0;p=D*33050|0;D=(8?p>>>8:p)+-17685+G|0;if(D>>>0<16384)M=6?D>>>6:D;else M=((31?D>>31:D)&-255)+255|0;a[C>>0]=(4?L>>>4:L)|K&240;a[C+1>>0]=M|15;if(w){C=r+n|0;r=v+y|0;v=(1?C>>>1:C)&255;D=17?C>>>17:C;C=j+q|0;q=(d[c+t>>0]|0)*19077|0;t=8?q>>>8:q;q=D*26149|0;G=(8?q>>>8:q)+-14234+t|0;if(G>>>0<16384)N=6?G>>>6:G;else N=((31?G>>31:G)&-255)+255|0;G=v*6419|0;q=D*13320|0;D=8708-(8?q>>>8:q)-(8?G>>>8:G)+t|0;if(D>>>0<16384)O=6?D>>>6:D;else O=((31?D>>31:D)&-255)+255|0;D=v*33050|0;v=(8?D>>>8:D)+-17685+t|0;if(v>>>0<16384)P=6?v>>>6:v;else P=((31?v>>31:v)&-255)+255|0;a[C>>0]=(4?O>>>4:O)|N&240;a[C+1>>0]=P|15;C=(1?r>>>1:r)&255;v=17?r>>>17:r;r=j+s|0;s=(d[c+u>>0]|0)*19077|0;u=8?s>>>8:s;s=v*26149|0;t=(8?s>>>8:s)+-14234+u|0;if(t>>>0<16384)Q=6?t>>>6:t;else Q=((31?t>>31:t)&-255)+255|0;t=C*6419|0;s=v*13320|0;v=8708-(8?s>>>8:s)-(8?t>>>8:t)+u|0;if(v>>>0<16384)R=6?v>>>6:v;else R=((31?v>>31:v)&-255)+255|0;v=C*33050|0;C=(8?v>>>8:v)+-17685+u|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[r>>0]=(4?R>>>4:R)|Q&240;a[r+1>>0]=S|15}if((o|0)<(m|0)){z=x;n=y;o=o+1|0}else{A=x;B=y;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=(2?k>>>2:k)&255;n=18?k>>>18:k;k=l<<1;z=i+k|0;i=(d[b+l>>0]|0)*19077|0;b=8?i>>>8:i;i=n*26149|0;m=(8?i>>>8:i)+-14234+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;m=o*6419|0;i=n*13320|0;n=8708-(8?i>>>8:i)-(8?m>>>8:m)+b|0;if(n>>>0<16384)U=6?n>>>6:n;else U=((31?n>>31:n)&-255)+255|0;n=o*33050|0;o=(8?n>>>8:n)+-17685+b|0;if(o>>>0<16384)V=6?o>>>6:o;else V=((31?o>>31:o)&-255)+255|0;a[z>>0]=(4?U>>>4:U)|T&240;a[z+1>>0]=V|15;if(!w)return;w=A+131074+(B*3|0)|0;B=(2?w>>>2:w)&255;A=18?w>>>18:w;w=j+k|0;k=(d[c+l>>0]|0)*19077|0;l=8?k>>>8:k;k=A*26149|0;c=(8?k>>>8:k)+-14234+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;c=B*6419|0;k=A*13320|0;A=8708-(8?k>>>8:k)-(8?c>>>8:c)+l|0;if(A>>>0<16384)X=6?A>>>6:A;else X=((31?A>>31:A)&-255)+255|0;A=B*33050|0;B=(8?A>>>8:A)+-17685+l|0;if(B>>>0<16384)Y=6?B>>>6:B;else Y=((31?B>>31:B)&-255)+255|0;a[w>>0]=(4?X>>>4:X)|W&240;a[w+1>>0]=Y|15;return}\nfunction Lc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=18?p>>>18:p;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=r*26149|0;t=s+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;t=q*6419|0;p=r*13320|0;r=s+8708-(8?p>>>8:p)-(8?t>>>8:t)|0;if(r>>>0<16384)v=6?r>>>6:r;else v=((31?r>>31:r)&-255)+255|0;r=q*33050|0;q=s+-17685+(8?r>>>8:r)|0;if(q>>>0<16384)w=6?q>>>6:q;else w=((31?q>>31:q)&-255)+255|0;a[i>>0]=(5?v>>>5:v)|u&248;a[i+1>>0]=(3?w>>>3:w)|v<<3&224;v=(c|0)!=0;if(v){w=n+131074+(o*3|0)|0;u=(2?w>>>2:w)&255;q=18?w>>>18:w;w=(d[c>>0]|0)*19077|0;r=8?w>>>8:w;w=q*26149|0;s=(8?w>>>8:w)+-14234+r|0;if(s>>>0<16384)x=6?s>>>6:s;else x=((31?s>>31:s)&-255)+255|0;s=u*6419|0;w=q*13320|0;q=8708-(8?w>>>8:w)-(8?s>>>8:s)+r|0;if(q>>>0<16384)y=6?q>>>6:q;else y=((31?q>>31:q)&-255)+255|0;q=u*33050|0;u=(8?q>>>8:q)+-17685+r|0;if(u>>>0<16384)z=6?u>>>6:u;else z=((31?u>>31:u)&-255)+255|0;a[j>>0]=(5?y>>>5:y)|x&248;a[j+1>>0]=(3?z>>>3:z)|y<<3&224}if((k|0)<3){A=n;B=o}else{y=n;n=o;o=1;while(1){z=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);x=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);u=z+n|0;r=u+524296+y+x|0;q=r+(u<<1)|0;u=3?q>>>3:q;q=r+(x+y<<1)|0;r=3?q>>>3:q;q=u+y|0;s=r+z|0;w=o<<1;t=w+-1|0;p=(1?q>>>1:q)&255;C=17?q>>>17:q;q=t<<1;D=i+q|0;E=(d[b+t>>0]|0)*19077|0;F=8?E>>>8:E;E=C*26149|0;G=F+-14234+(8?E>>>8:E)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;G=p*6419|0;E=C*13320|0;C=F+8708-(8?E>>>8:E)-(8?G>>>8:G)|0;if(C>>>0<16384)I=6?C>>>6:C;else I=((31?C>>31:C)&-255)+255|0;C=p*33050|0;p=F+-17685+(8?C>>>8:C)|0;if(p>>>0<16384)J=6?p>>>6:p;else J=((31?p>>31:p)&-255)+255|0;a[D>>0]=(5?I>>>5:I)|H&248;a[D+1>>0]=(3?J>>>3:J)|I<<3&224;D=(1?s>>>1:s)&255;p=17?s>>>17:s;s=o<<2;C=i+s|0;F=(d[b+w>>0]|0)*19077|0;G=8?F>>>8:F;F=p*26149|0;E=(8?F>>>8:F)+-14234+G|0;if(E>>>0<16384)K=6?E>>>6:E;else K=((31?E>>31:E)&-255)+255|0;E=D*6419|0;F=p*13320|0;p=8708-(8?F>>>8:F)-(8?E>>>8:E)+G|0;if(p>>>0<16384)L=6?p>>>6:p;else L=((31?p>>31:p)&-255)+255|0;p=D*33050|0;D=(8?p>>>8:p)+-17685+G|0;if(D>>>0<16384)M=6?D>>>6:D;else M=((31?D>>31:D)&-255)+255|0;a[C>>0]=(5?L>>>5:L)|K&248;a[C+1>>0]=(3?M>>>3:M)|L<<3&224;if(v){C=r+n|0;r=u+x|0;u=(1?C>>>1:C)&255;D=17?C>>>17:C;C=j+q|0;q=(d[c+t>>0]|0)*19077|0;t=8?q>>>8:q;q=D*26149|0;G=(8?q>>>8:q)+-14234+t|0;if(G>>>0<16384)N=6?G>>>6:G;else N=((31?G>>31:G)&-255)+255|0;G=u*6419|0;q=D*13320|0;D=8708-(8?q>>>8:q)-(8?G>>>8:G)+t|0;if(D>>>0<16384)O=6?D>>>6:D;else O=((31?D>>31:D)&-255)+255|0;D=u*33050|0;u=(8?D>>>8:D)+-17685+t|0;if(u>>>0<16384)P=6?u>>>6:u;else P=((31?u>>31:u)&-255)+255|0;a[C>>0]=(5?O>>>5:O)|N&248;a[C+1>>0]=(3?P>>>3:P)|O<<3&224;C=(1?r>>>1:r)&255;u=17?r>>>17:r;r=j+s|0;s=(d[c+w>>0]|0)*19077|0;w=8?s>>>8:s;s=u*26149|0;t=(8?s>>>8:s)+-14234+w|0;if(t>>>0<16384)Q=6?t>>>6:t;else Q=((31?t>>31:t)&-255)+255|0;t=C*6419|0;s=u*13320|0;u=8708-(8?s>>>8:s)-(8?t>>>8:t)+w|0;if(u>>>0<16384)R=6?u>>>6:u;else R=((31?u>>31:u)&-255)+255|0;u=C*33050|0;C=(8?u>>>8:u)+-17685+w|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[r>>0]=(5?R>>>5:R)|Q&248;a[r+1>>0]=(3?S>>>3:S)|R<<3&224}if((o|0)<(m|0)){y=z;n=x;o=o+1|0}else{A=z;B=x;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=(2?k>>>2:k)&255;n=18?k>>>18:k;k=l<<1;y=i+k|0;i=(d[b+l>>0]|0)*19077|0;b=8?i>>>8:i;i=n*26149|0;m=(8?i>>>8:i)+-14234+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;m=o*6419|0;i=n*13320|0;n=8708-(8?i>>>8:i)-(8?m>>>8:m)+b|0;if(n>>>0<16384)U=6?n>>>6:n;else U=((31?n>>31:n)&-255)+255|0;n=o*33050|0;o=(8?n>>>8:n)+-17685+b|0;if(o>>>0<16384)V=6?o>>>6:o;else V=((31?o>>31:o)&-255)+255|0;a[y>>0]=(5?U>>>5:U)|T&248;a[y+1>>0]=(3?V>>>3:V)|U<<3&224;if(!v)return;v=A+131074+(B*3|0)|0;B=(2?v>>>2:v)&255;A=18?v>>>18:v;v=j+k|0;k=(d[c+l>>0]|0)*19077|0;l=8?k>>>8:k;k=A*26149|0;c=(8?k>>>8:k)+-14234+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;c=B*6419|0;k=A*13320|0;A=8708-(8?k>>>8:k)-(8?c>>>8:c)+l|0;if(A>>>0<16384)X=6?A>>>6:A;else X=((31?A>>31:A)&-255)+255|0;A=B*33050|0;B=(8?A>>>8:A)+-17685+l|0;if(B>>>0<16384)Y=6?B>>>6:B;else Y=((31?B>>31:B)&-255)+255|0;a[v>>0]=(5?X>>>5:X)|W&248;a[v+1>>0]=(3?Y>>>3:Y)|X<<3&224;return}function Mc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=c[d>>2]|0;g=c[e>>2]|0;h=((b|0)<0)<<31>>31;i=((a|0)<0)<<31>>31;if((b|0)>0&(f|0)==0){j=Cf(g|0,((g|0)<0)<<31>>31|0,a|0,i|0)|0;k=v()|0;l=Df(b|0,h|0,-1,-1)|0;m=Df(l|0,v()|0,j|0,k|0)|0;k=Hf(m|0,v()|0,b|0,h|0)|0;v()|0;n=k}else n=f;if((a|0)>0&(g|0)==0){f=Cf(n|0,((n|0)<0)<<31>>31|0,b|0,h|0)|0;h=v()|0;b=Df(a|0,i|0,-1,-1)|0;k=Df(b|0,v()|0,f|0,h|0)|0;h=Hf(k|0,v()|0,a|0,i|0)|0;v()|0;o=h}else o=g;if((n|0)<1|(o|0)<1){p=0;return p|0}c[d>>2]=n;c[e>>2]=o;p=1;return p|0}function Nc(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0;if(!b)g=0;else g=a[b>>0]|0;if((f|0)<=0)return;b=g;g=0;do{b=(d[c+g>>0]|0)+(b&255)&255;a[e+g>>0]=b;g=g+1|0}while((g|0)!=(f|0));return}function Oc(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=(f|0)>0;if(!b){if(!g)return;h=0;i=0;do{h=(h&255)+(d[c+i>>0]|0)|0;a[e+i>>0]=h;i=i+1|0}while((i|0)!=(f|0));return}else{if(!g)return;g=0;do{a[e+g>>0]=(d[c+g>>0]|0)+(d[b+g>>0]|0);g=g+1|0}while((g|0)!=(f|0));return}}function Pc(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if(!b){if((f|0)<=0)return;g=0;h=0;do{g=(g&255)+(d[c+h>>0]|0)|0;a[e+h>>0]=g;h=h+1|0}while((h|0)!=(f|0));return}h=a[b>>0]|0;if((f|0)<=0)return;g=(h&255)-(h&255)+(h&255)|0;i=(g>>>0<256?g:(31?g>>>31:g)+255|0)+(d[c>>0]|0)|0;a[e>>0]=i;if((f|0)==1)return;g=1;j=i;i=h;do{h=i;i=a[b+g>>0]|0;k=(j&255)-(h&255)+(i&255)|0;j=(k>>>0<256?k:(31?k>>>31:k)+255|0)+(d[c+g>>0]|0)|0;a[e+g>>0]=j;g=g+1|0}while((g|0)!=(f|0));return}function Qc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;a[g>>0]=a[b>>0]|0;h=b+1|0;i=g+1|0;j=c+-1|0;k=(c|0)>1;if(k){c=0;do{a[i+c>>0]=(d[h+c>>0]|0)-(d[b+c>>0]|0);c=c+1|0}while((c|0)!=(j|0))}c=b+f|0;h=g+f|0;if((e|0)<=1)return;if(!k){k=1;g=c;i=h;l=b;while(1){a[i>>0]=(d[g>>0]|0)-(d[l>>0]|0);k=k+1|0;if((k|0)==(e|0))break;else{m=g;g=g+f|0;i=i+f|0;l=m}}return}l=1;i=c;c=h;h=b;while(1){a[c>>0]=(d[i>>0]|0)-(d[h>>0]|0);b=i+1|0;g=c+1|0;k=0;do{a[g+k>>0]=(d[b+k>>0]|0)-(d[i+k>>0]|0);k=k+1|0}while((k|0)!=(j|0));l=l+1|0;if((l|0)==(e|0))break;else{k=i;i=i+f|0;c=c+f|0;h=k}}return}function Rc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;a[g>>0]=a[b>>0]|0;h=b+1|0;i=g+1|0;j=c+-1|0;if((c|0)>1){k=0;do{a[i+k>>0]=(d[h+k>>0]|0)-(d[b+k>>0]|0);k=k+1|0}while((k|0)!=(j|0))}if(!((c|0)>0&(e|0)>1))return;j=1;k=g;g=b;do{b=g;g=g+f|0;k=k+f|0;h=0;do{a[k+h>>0]=(d[g+h>>0]|0)-(d[b+h>>0]|0);h=h+1|0}while((h|0)!=(c|0));j=j+1|0}while((j|0)!=(e|0));return}function Sc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;a[g>>0]=a[b>>0]|0;h=b+1|0;i=g+1|0;j=c+-1|0;k=(c|0)>1;if(k){l=0;do{a[i+l>>0]=(d[h+l>>0]|0)-(d[b+l>>0]|0);l=l+1|0}while((l|0)!=(j|0))}j=g+f|0;g=b+f|0;if((e|0)<=1)return;l=~f;if(!k){k=1;h=j;i=g;m=b;while(1){a[h>>0]=(d[i>>0]|0)-(d[m>>0]|0);k=k+1|0;if((k|0)==(e|0))break;else{n=i;h=h+f|0;i=i+f|0;m=n}}return}m=1;i=j;j=g;g=b;while(1){a[i>>0]=(d[j>>0]|0)-(d[g>>0]|0);b=1;do{h=(d[g+b>>0]|0)+(d[j+(b+-1)>>0]|0)-(d[j+(b+l)>>0]|0)|0;a[i+b>>0]=(d[j+b>>0]|0)-(h>>>0<256?h:(31?h>>>31:h)+255|0);b=b+1|0}while((b|0)!=(c|0));m=m+1|0;if((m|0)==(e|0))break;else{b=j;i=i+f|0;j=j+f|0;g=b}}return}function Tc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;if(!a){b=2;return b|0}d=(c[a+8>>2]|0)+-1|0;if((c[a>>2]|0)>>>0<=10){e=a+20|0;f=c[e>>2]|0;g=r(f,d)|0;h=a+16|0;c[h>>2]=(c[h>>2]|0)+g;c[e>>2]=0-f;b=0;return b|0}f=a+32|0;e=c[f>>2]|0;g=r(e,d)|0;h=a+16|0;c[h>>2]=(c[h>>2]|0)+g;c[f>>2]=0-e;e=1?d>>1:d;f=a+36|0;g=c[f>>2]|0;h=r(g,e)|0;i=a+20|0;c[i>>2]=(c[i>>2]|0)+h;c[f>>2]=0-g;g=a+40|0;f=c[g>>2]|0;h=r(f,e)|0;e=a+24|0;c[e>>2]=(c[e>>2]|0)+h;c[g>>2]=0-f;f=a+28|0;g=c[f>>2]|0;if(!g){b=0;return b|0}h=a+44|0;a=c[h>>2]|0;e=g+(r(a,d)|0)|0;c[f>>2]=e;c[h>>2]=0-a;b=0;return b|0}function Uc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=Y;Y=Y+16|0;h=g+4|0;i=g;if((d|0)<1|((b|0)<1|(f|0)==0)){j=2;Y=g;return j|0}k=(e|0)!=0;if(k){if(c[e+8>>2]|0){l=c[e+20>>2]|0;m=c[e+24>>2]|0;n=c[e+12>>2]|0;o=c[e+16>>2]|0;if((m|0)<1|((l|0)<1|(o|n|0)<0)){j=2;Y=g;return j|0}if(((n&-2)+l|0)>(b|0)|((o&-2)+m|0)>(d|0)){j=2;Y=g;return j|0}else{p=l;q=m}}else{p=b;q=d}if(c[e+28>>2]|0){c[h>>2]=c[e+32>>2];c[i>>2]=c[e+36>>2];m=(Mc(p,q,h,i)|0)==0;if(m){j=2;Y=g;return j|0}else{s=c[h>>2]|0;t=c[i>>2]|0}}else{s=p;t=q}}else{s=b;t=d}c[f+4>>2]=s;d=f+8|0;c[d>>2]=t;b=c[f>>2]|0;if((t|0)<1|(s|0)<1|b>>>0>12){j=2;Y=g;return j|0}do if((c[f+12>>2]|0)<1?(q=f+80|0,(c[q>>2]|0)==0):0){p=((s|0)<0)<<31>>31;i=a[8683+b>>0]|0;h=Cf(i&255|0,0,s|0,p|0)|0;m=v()|0;if(m>>>0>0|(m|0)==0&h>>>0>4294967295){j=2;Y=g;return j|0}h=r(s,i&255)|0;i=((t|0)<0)<<31>>31;m=Cf(h|0,((h|0)<0)<<31>>31|0,t|0,i|0)|0;l=v()|0;o=b>>>0>10;if(o){n=(s+1|0)/2|0;u=(t+1|0)/2|0;w=Cf(n|0,((n|0)<0)<<31>>31|0,u|0,((u|0)<0)<<31>>31|0)|0;u=v()|0;x=(b|0)==12;y=Cf(s|0,p|0,t|0,i|0)|0;i=v()|0;z=n;A=x?s:0;B=w;C=u;D=x?y:0;E=x?i:0}else{z=0;A=0;B=0;C=0;D=0;E=0}i=Jf(B|0,C|0,1)|0;x=v()|0;y=Df(D|0,E|0,m|0,l|0)|0;l=Df(y|0,v()|0,i|0,x|0)|0;x=wa(l,v()|0,1)|0;if(!x){j=1;Y=g;return j|0}c[q>>2]=x;c[f+16>>2]=x;if(!o){c[f+20>>2]=h;c[f+24>>2]=m;break}c[f+32>>2]=h;c[f+48>>2]=m;h=x+m|0;c[f+20>>2]=h;c[f+36>>2]=z;c[f+52>>2]=B;c[f+24>>2]=h+B;c[f+40>>2]=z;c[f+56>>2]=B;if((b|0)==12)c[f+28>>2]=h+i;c[f+60>>2]=D;c[f+44>>2]=A}while(0);A=Vc(f)|0;if((A|0)!=0|k^1){j=A;Y=g;return j|0}if(!(c[e+48>>2]|0)){j=0;Y=g;return j|0}e=(c[d>>2]|0)+-1|0;if((c[f>>2]|0)>>>0<=10){d=f+20|0;A=c[d>>2]|0;k=r(A,e)|0;D=f+16|0;c[D>>2]=(c[D>>2]|0)+k;c[d>>2]=0-A;j=0;Y=g;return j|0}A=f+32|0;d=c[A>>2]|0;k=r(d,e)|0;D=f+16|0;c[D>>2]=(c[D>>2]|0)+k;c[A>>2]=0-d;d=1?e>>1:e;A=f+36|0;k=c[A>>2]|0;D=r(k,d)|0;b=f+20|0;c[b>>2]=(c[b>>2]|0)+D;c[A>>2]=0-k;k=f+40|0;A=c[k>>2]|0;D=r(A,d)|0;d=f+24|0;c[d>>2]=(c[d>>2]|0)+D;c[k>>2]=0-A;A=f+28|0;k=c[A>>2]|0;if(!k){j=0;Y=g;return j|0}D=f+44|0;f=c[D>>2]|0;d=k+(r(f,e)|0)|0;c[A>>2]=d;c[D>>2]=0-f;j=0;Y=g;return j|0}function Vc(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0;b=c[a>>2]|0;e=c[a+4>>2]|0;f=c[a+8>>2]|0;if(b>>>0>12){g=2;return g|0}do if(b>>>0>10){h=(e+1|0)/2|0;i=c[a+32>>2]|0;j=(i|0)>-1?i:0-i|0;i=c[a+36>>2]|0;k=(i|0)>-1?i:0-i|0;i=c[a+40>>2]|0;l=(i|0)>-1?i:0-i|0;i=c[a+44>>2]|0;m=(i|0)>-1?i:0-i|0;i=f+-1|0;n=((i|0)<0)<<31>>31;o=Cf(j|0,((j|0)<0)<<31>>31|0,i|0,n|0)|0;p=((e|0)<0)<<31>>31;q=Df(o|0,v()|0,e|0,p|0)|0;o=v()|0;s=((f+1|0)/2|0)+-1|0;t=((s|0)<0)<<31>>31;u=Cf(k|0,((k|0)<0)<<31>>31|0,s|0,t|0)|0;w=((h|0)<0)<<31>>31;x=Df(u|0,v()|0,h|0,w|0)|0;u=v()|0;y=Cf(l|0,((l|0)<0)<<31>>31|0,s|0,t|0)|0;t=Df(y|0,v()|0,h|0,w|0)|0;w=v()|0;y=(c[a+24>>2]|0)!=0&((c[a+20>>2]|0)!=0&((c[a+16>>2]|0)!=0&((l|0)>=(h|0)&((k|0)>=(h|0)&((j|0)>=(e|0)&((o>>>0<0|((o|0)==0?q>>>0<=(c[a+48>>2]|0)>>>0:0))&(u>>>0<0|((u|0)==0?x>>>0<=(c[a+52>>2]|0)>>>0:0))&(w>>>0<0|((w|0)==0?t>>>0<=(c[a+56>>2]|0)>>>0:0))))))));if((b|0)==12){t=Cf(m|0,((m|0)<0)<<31>>31|0,i|0,n|0)|0;n=Df(t|0,v()|0,e|0,p|0)|0;p=v()|0;if((c[a+28>>2]|0)!=0&((m|0)>=(e|0)&y&(p>>>0<0|((p|0)==0?n>>>0<=(c[a+60>>2]|0)>>>0:0))))break;else g=2;return g|0}else{if(y)break;else g=2;return g|0}}else{y=c[a+20>>2]|0;n=(y|0)>-1?y:0-y|0;y=f+-1|0;p=Cf(n|0,((n|0)<0)<<31>>31|0,y|0,((y|0)<0)<<31>>31|0)|0;y=v()|0;m=r(e,d[8683+b>>0]|0)|0;t=Df(p|0,y|0,m|0,((m|0)<0)<<31>>31|0)|0;y=v()|0;if(!((c[a+16>>2]|0)!=0&((n|0)>=(m|0)&(y>>>0<0|((y|0)==0?t>>>0<=(c[a+24>>2]|0)>>>0:0))))){g=2;return g|0}}while(0);g=0;return g|0}function Wc(a,b){a=a|0;b=b|0;var d=0;if((a|0)==0|(b&-256|0)!=512){d=0;return d|0}b=a;a=b+84|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(a|0));d=1;return d|0}function Xc(a){a=a|0;var b=0;if(!a)return;b=a+80|0;if((c[a+12>>2]|0)<1)pa(c[b>>2]|0);c[b>>2]=0;return}function Yc(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=a+4|0;c[b+4>>2]=c[e>>2];f=a+8|0;c[b+8>>2]=c[f>>2];if(Vc(b)|0){g=2;return g|0}h=c[a>>2]|0;i=c[a+16>>2]|0;if(h>>>0<=10){j=r(c[e>>2]|0,d[8683+h>>0]|0)|0;Zc(i,c[a+20>>2]|0,c[b+16>>2]|0,c[b+20>>2]|0,j,c[f>>2]|0);g=0;return g|0}Zc(i,c[a+32>>2]|0,c[b+16>>2]|0,c[b+32>>2]|0,c[e>>2]|0,c[f>>2]|0);Zc(c[a+20>>2]|0,c[a+36>>2]|0,c[b+20>>2]|0,c[b+36>>2]|0,((c[e>>2]|0)+1|0)/2|0,((c[f>>2]|0)+1|0)/2|0);Zc(c[a+24>>2]|0,c[a+40>>2]|0,c[b+24>>2]|0,c[b+40>>2]|0,((c[e>>2]|0)+1|0)/2|0,((c[f>>2]|0)+1|0)/2|0);i=c[a>>2]|0;switch(i|0){case 1:case 3:case 4:case 5:case 12:break;default:if((i+-7|0)>>>0>3){g=0;return g|0}}Zc(c[a+28>>2]|0,c[a+44>>2]|0,c[b+28>>2]|0,c[b+44>>2]|0,c[e>>2]|0,c[f>>2]|0);g=0;return g|0}function Zc(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;if((f|0)<=0)return;g=f;f=a;a=c;while(1){Lf(a|0,f|0,e|0)|0;if((g|0)>1){g=g+-1|0;f=f+b|0;a=a+d|0}else break}return}function _c(a,b){a=a|0;b=b|0;var d=0;if((c[a+12>>2]|0)<=1){d=0;return d|0}if(!(b|0?((c[a>>2]|0)+-7|0)>>>0<4:0)){d=0;return d|0}d=(c[b+8>>2]|0)!=0&1;return d|0}function $c(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if(!a)return;e=c[a+44>>2]|0;do if((e|0)>=0){if((e|0)<=100){f=e*255|0;if((f|0)>99)g=(f|0)/100|0;else break}else g=255;f=c[b+800>>2]|0;if((f|0)<12){h=r(g,d[8696+((f|0)>0?f:0)>>0]|0)|0;f=3?h>>3:h;c[b+804>>2]=f;i=f}else i=c[b+804>>2]|0;f=c[b+832>>2]|0;if((f|0)<12){h=r(g,d[8696+((f|0)>0?f:0)>>0]|0)|0;f=3?h>>3:h;c[b+836>>2]=f;j=f}else j=c[b+836>>2]|0;f=c[b+864>>2]|0;if((f|0)<12){h=r(g,d[8696+((f|0)>0?f:0)>>0]|0)|0;f=3?h>>3:h;c[b+868>>2]=f;k=f}else k=c[b+868>>2]|0;f=c[b+896>>2]|0;if((f|0)<12){h=r(g,d[8696+((f|0)>0?f:0)>>0]|0)|0;f=3?h>>3:h;c[b+900>>2]=f;l=f}else l=c[b+900>>2]|0;if(l|(k|(j|i))|0){ad(b+544|0,1.0);c[b+540>>2]=1}}while(0);i=c[a+52>>2]|0;a=b+2372|0;c[a>>2]=i;if((i|0)>100){c[a>>2]=100;return}if((i|0)>=0)return;c[a>>2]=0;return}function ad(a,b){a=a|0;b=+b;var d=0;Lf(a+8|0,3888,220)|0;c[a>>2]=0;c[a+4>>2]=31;if(!(b<0.0))if(b>1.0)d=256;else d=~~(b*256.0)>>>0;else d=0;c[a+228>>2]=d;return}function bd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=a+160|0;if((c[a+2308>>2]|0)>0?(e=c[a+2300>>2]|0,(e|0)>=(c[a+300>>2]|0)):0)f=(e|0)<=(c[a+308>>2]|0);else f=0;e=f&1;g=a+148|0;if(!(c[g>>2]|0)){c[a+164>>2]=c[a+2300>>2];c[a+168>>2]=e;cd(a,d);h=dd(a,b)|0;return h|0}i=a+124|0;j=(ed()|0)+8|0;if(!((aa[c[j>>2]&7](i)|0)&1)){h=0;return h|0}h=a+180|0;j=b;b=h+108|0;do{c[h>>2]=c[j>>2];h=h+4|0;j=j+4|0}while((h|0)<(b|0));j=a+152|0;c[d>>2]=c[j>>2];c[a+164>>2]=c[a+2300>>2];c[a+168>>2]=e;if((c[g>>2]|0)==2){g=a+176|0;e=c[g>>2]|0;h=a+2304|0;c[g>>2]=c[h>>2];c[h>>2]=e}else cd(a,d);if(!f){k=ed()|0;l=k+12|0;m=c[l>>2]|0;ea[m&31](i);n=c[j>>2]|0;o=n+1|0;p=a+156|0;q=c[p>>2]|0;r=(o|0)==(q|0);s=r?0:o;c[j>>2]=s;return 1}f=a+172|0;d=c[f>>2]|0;e=a+2260|0;c[f>>2]=c[e>>2];c[e>>2]=d;k=ed()|0;l=k+12|0;m=c[l>>2]|0;ea[m&31](i);n=c[j>>2]|0;o=n+1|0;p=a+156|0;q=c[p>>2]|0;r=(o|0)==(q|0);s=r?0:o;c[j>>2]=s;return 1}function cd(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0;g=c[f+4>>2]|0;h=c[f>>2]|0;i=c[b+2264>>2]|0;j=i+40|0;k=i+584|0;a[i+39>>0]=-127;a[i+71>>0]=-127;a[i+103>>0]=-127;a[i+135>>0]=-127;a[i+167>>0]=-127;a[i+199>>0]=-127;a[i+231>>0]=-127;a[i+263>>0]=-127;a[i+295>>0]=-127;a[i+327>>0]=-127;a[i+359>>0]=-127;a[i+391>>0]=-127;a[i+423>>0]=-127;a[i+455>>0]=-127;a[i+487>>0]=-127;a[i+519>>0]=-127;l=i+600|0;a[i+583>>0]=-127;a[i+599>>0]=-127;a[i+615>>0]=-127;a[i+631>>0]=-127;a[i+647>>0]=-127;a[i+663>>0]=-127;a[i+679>>0]=-127;a[i+695>>0]=-127;a[i+711>>0]=-127;a[i+727>>0]=-127;a[i+743>>0]=-127;a[i+759>>0]=-127;a[i+775>>0]=-127;a[i+791>>0]=-127;a[i+807>>0]=-127;a[i+823>>0]=-127;m=(g|0)>0;if(m){a[i+567>>0]=-127;a[i+551>>0]=-127;a[i+7>>0]=-127}else{n=i+7|0;o=n+21|0;do{a[n>>0]=127;n=n+1|0}while((n|0)<(o|0));n=i+551|0;o=n+9|0;do{a[n>>0]=127;n=n+1|0}while((n|0)<(o|0));n=i+567|0;o=n+9|0;do{a[n>>0]=127;n=n+1|0}while((n|0)<(o|0))}p=b+288|0;if((c[p>>2]|0)<=0)return;q=f+16|0;f=b+2252|0;s=i+8|0;t=i+552|0;u=i+568|0;v=i+24|0;w=(g|0)==0;x=i+408|0;y=i+280|0;z=i+152|0;A=w?6:5;B=w?4:0;w=b+292|0;C=i+520|0;D=i+808|0;E=i+824|0;F=h<<4;G=b+2280|0;H=h<<3;h=b+2284|0;I=b+2268|0;J=b+2272|0;K=b+2276|0;b=i+4|0;L=i+20|0;M=i+36|0;N=i+52|0;O=i+68|0;P=i+84|0;Q=i+100|0;R=i+116|0;S=i+132|0;T=i+148|0;U=i+164|0;V=i+180|0;W=i+196|0;X=i+212|0;Y=i+228|0;Z=i+244|0;_=i+260|0;$=i+276|0;aa=i+292|0;ba=i+308|0;ca=i+324|0;da=i+340|0;fa=i+356|0;ga=i+372|0;ha=i+388|0;ia=i+404|0;ja=i+420|0;ka=i+436|0;la=i+452|0;ma=i+468|0;na=i+484|0;oa=i+500|0;pa=i+516|0;qa=i+532|0;ra=i+548|0;sa=i+556|0;ta=i+564|0;ua=i+572|0;va=i+580|0;wa=i+588|0;xa=i+596|0;ya=i+604|0;za=i+612|0;Aa=i+620|0;Ba=i+628|0;Ca=i+636|0;Da=i+644|0;Ea=i+652|0;Fa=i+660|0;Ga=i+668|0;Ha=i+676|0;Ia=i+684|0;Ja=i+692|0;Ka=i+700|0;La=i+708|0;Ma=i+716|0;Na=i+724|0;Oa=i+732|0;Pa=i+740|0;Qa=i+748|0;Ra=i+756|0;Sa=i+764|0;Ta=i+772|0;Ua=i+780|0;Va=i+788|0;Wa=i+796|0;Xa=i+804|0;Ya=i+812|0;Za=i+820|0;_a=i+828|0;$a=i+72|0;ab=i+104|0;bb=i+136|0;cb=i+168|0;db=i+200|0;eb=i+232|0;fb=i+264|0;gb=i+296|0;hb=i+328|0;ib=i+360|0;jb=i+392|0;kb=i+424|0;lb=i+456|0;mb=i+488|0;nb=i+520|0;ob=i+616|0;pb=i+632|0;qb=i+648|0;rb=i+664|0;sb=i+680|0;tb=i+696|0;ub=i+712|0;vb=i+728|0;wb=i+744|0;xb=i+760|0;yb=i+776|0;zb=i+792|0;Ab=i+808|0;Bb=i+824|0;i=0;do{Cb=c[q>>2]|0;Db=(i|0)==0;if(!Db){Eb=d[L>>0]|d[L+1>>0]<<8|d[L+2>>0]<<16|d[L+3>>0]<<24;a[b>>0]=Eb;a[b+1>>0]=Eb>>8;a[b+2>>0]=Eb>>16;a[b+3>>0]=Eb>>24;Eb=d[N>>0]|d[N+1>>0]<<8|d[N+2>>0]<<16|d[N+3>>0]<<24;a[M>>0]=Eb;a[M+1>>0]=Eb>>8;a[M+2>>0]=Eb>>16;a[M+3>>0]=Eb>>24;Eb=d[P>>0]|d[P+1>>0]<<8|d[P+2>>0]<<16|d[P+3>>0]<<24;a[O>>0]=Eb;a[O+1>>0]=Eb>>8;a[O+2>>0]=Eb>>16;a[O+3>>0]=Eb>>24;Eb=d[R>>0]|d[R+1>>0]<<8|d[R+2>>0]<<16|d[R+3>>0]<<24;a[Q>>0]=Eb;a[Q+1>>0]=Eb>>8;a[Q+2>>0]=Eb>>16;a[Q+3>>0]=Eb>>24;Eb=d[T>>0]|d[T+1>>0]<<8|d[T+2>>0]<<16|d[T+3>>0]<<24;a[S>>0]=Eb;a[S+1>>0]=Eb>>8;a[S+2>>0]=Eb>>16;a[S+3>>0]=Eb>>24;Eb=d[V>>0]|d[V+1>>0]<<8|d[V+2>>0]<<16|d[V+3>>0]<<24;a[U>>0]=Eb;a[U+1>>0]=Eb>>8;a[U+2>>0]=Eb>>16;a[U+3>>0]=Eb>>24;Eb=d[X>>0]|d[X+1>>0]<<8|d[X+2>>0]<<16|d[X+3>>0]<<24;a[W>>0]=Eb;a[W+1>>0]=Eb>>8;a[W+2>>0]=Eb>>16;a[W+3>>0]=Eb>>24;Eb=d[Z>>0]|d[Z+1>>0]<<8|d[Z+2>>0]<<16|d[Z+3>>0]<<24;a[Y>>0]=Eb;a[Y+1>>0]=Eb>>8;a[Y+2>>0]=Eb>>16;a[Y+3>>0]=Eb>>24;Eb=d[$>>0]|d[$+1>>0]<<8|d[$+2>>0]<<16|d[$+3>>0]<<24;a[_>>0]=Eb;a[_+1>>0]=Eb>>8;a[_+2>>0]=Eb>>16;a[_+3>>0]=Eb>>24;Eb=d[ba>>0]|d[ba+1>>0]<<8|d[ba+2>>0]<<16|d[ba+3>>0]<<24;a[aa>>0]=Eb;a[aa+1>>0]=Eb>>8;a[aa+2>>0]=Eb>>16;a[aa+3>>0]=Eb>>24;Eb=d[da>>0]|d[da+1>>0]<<8|d[da+2>>0]<<16|d[da+3>>0]<<24;a[ca>>0]=Eb;a[ca+1>>0]=Eb>>8;a[ca+2>>0]=Eb>>16;a[ca+3>>0]=Eb>>24;Eb=d[ga>>0]|d[ga+1>>0]<<8|d[ga+2>>0]<<16|d[ga+3>>0]<<24;a[fa>>0]=Eb;a[fa+1>>0]=Eb>>8;a[fa+2>>0]=Eb>>16;a[fa+3>>0]=Eb>>24;Eb=d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24;a[ha>>0]=Eb;a[ha+1>>0]=Eb>>8;a[ha+2>>0]=Eb>>16;a[ha+3>>0]=Eb>>24;Eb=d[ka>>0]|d[ka+1>>0]<<8|d[ka+2>>0]<<16|d[ka+3>>0]<<24;a[ja>>0]=Eb;a[ja+1>>0]=Eb>>8;a[ja+2>>0]=Eb>>16;a[ja+3>>0]=Eb>>24;Eb=d[ma>>0]|d[ma+1>>0]<<8|d[ma+2>>0]<<16|d[ma+3>>0]<<24;a[la>>0]=Eb;a[la+1>>0]=Eb>>8;a[la+2>>0]=Eb>>16;a[la+3>>0]=Eb>>24;Eb=d[oa>>0]|d[oa+1>>0]<<8|d[oa+2>>0]<<16|d[oa+3>>0]<<24;a[na>>0]=Eb;a[na+1>>0]=Eb>>8;a[na+2>>0]=Eb>>16;a[na+3>>0]=Eb>>24;Eb=d[qa>>0]|d[qa+1>>0]<<8|d[qa+2>>0]<<16|d[qa+3>>0]<<24;a[pa>>0]=Eb;a[pa+1>>0]=Eb>>8;a[pa+2>>0]=Eb>>16;a[pa+3>>0]=Eb>>24;Eb=d[sa>>0]|d[sa+1>>0]<<8|d[sa+2>>0]<<16|d[sa+3>>0]<<24;a[ra>>0]=Eb;a[ra+1>>0]=Eb>>8;a[ra+2>>0]=Eb>>16;a[ra+3>>0]=Eb>>24;Eb=d[ua>>0]|d[ua+1>>0]<<8|d[ua+2>>0]<<16|d[ua+3>>0]<<24;a[ta>>0]=Eb;a[ta+1>>0]=Eb>>8;a[ta+2>>0]=Eb>>16;a[ta+3>>0]=Eb>>24;Eb=d[wa>>0]|d[wa+1>>0]<<8|d[wa+2>>0]<<16|d[wa+3>>0]<<24;a[va>>0]=Eb;a[va+1>>0]=Eb>>8;a[va+2>>0]=Eb>>16;a[va+3>>0]=Eb>>24;Eb=d[ya>>0]|d[ya+1>>0]<<8|d[ya+2>>0]<<16|d[ya+3>>0]<<24;a[xa>>0]=Eb;a[xa+1>>0]=Eb>>8;a[xa+2>>0]=Eb>>16;a[xa+3>>0]=Eb>>24;Eb=d[Aa>>0]|d[Aa+1>>0]<<8|d[Aa+2>>0]<<16|d[Aa+3>>0]<<24;a[za>>0]=Eb;a[za+1>>0]=Eb>>8;a[za+2>>0]=Eb>>16;a[za+3>>0]=Eb>>24;Eb=d[Ca>>0]|d[Ca+1>>0]<<8|d[Ca+2>>0]<<16|d[Ca+3>>0]<<24;a[Ba>>0]=Eb;a[Ba+1>>0]=Eb>>8;a[Ba+2>>0]=Eb>>16;a[Ba+3>>0]=Eb>>24;Eb=d[Ea>>0]|d[Ea+1>>0]<<8|d[Ea+2>>0]<<16|d[Ea+3>>0]<<24;a[Da>>0]=Eb;a[Da+1>>0]=Eb>>8;a[Da+2>>0]=Eb>>16;a[Da+3>>0]=Eb>>24;Eb=d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24;a[Fa>>0]=Eb;a[Fa+1>>0]=Eb>>8;a[Fa+2>>0]=Eb>>16;a[Fa+3>>0]=Eb>>24;Eb=d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24;a[Ha>>0]=Eb;a[Ha+1>>0]=Eb>>8;a[Ha+2>>0]=Eb>>16;a[Ha+3>>0]=Eb>>24;Eb=d[Ka>>0]|d[Ka+1>>0]<<8|d[Ka+2>>0]<<16|d[Ka+3>>0]<<24;a[Ja>>0]=Eb;a[Ja+1>>0]=Eb>>8;a[Ja+2>>0]=Eb>>16;a[Ja+3>>0]=Eb>>24;Eb=d[Ma>>0]|d[Ma+1>>0]<<8|d[Ma+2>>0]<<16|d[Ma+3>>0]<<24;a[La>>0]=Eb;a[La+1>>0]=Eb>>8;a[La+2>>0]=Eb>>16;a[La+3>>0]=Eb>>24;Eb=d[Oa>>0]|d[Oa+1>>0]<<8|d[Oa+2>>0]<<16|d[Oa+3>>0]<<24;a[Na>>0]=Eb;a[Na+1>>0]=Eb>>8;a[Na+2>>0]=Eb>>16;a[Na+3>>0]=Eb>>24;Eb=d[Qa>>0]|d[Qa+1>>0]<<8|d[Qa+2>>0]<<16|d[Qa+3>>0]<<24;a[Pa>>0]=Eb;a[Pa+1>>0]=Eb>>8;a[Pa+2>>0]=Eb>>16;a[Pa+3>>0]=Eb>>24;Eb=d[Sa>>0]|d[Sa+1>>0]<<8|d[Sa+2>>0]<<16|d[Sa+3>>0]<<24;a[Ra>>0]=Eb;a[Ra+1>>0]=Eb>>8;a[Ra+2>>0]=Eb>>16;a[Ra+3>>0]=Eb>>24;Eb=d[Ua>>0]|d[Ua+1>>0]<<8|d[Ua+2>>0]<<16|d[Ua+3>>0]<<24;a[Ta>>0]=Eb;a[Ta+1>>0]=Eb>>8;a[Ta+2>>0]=Eb>>16;a[Ta+3>>0]=Eb>>24;Eb=d[Wa>>0]|d[Wa+1>>0]<<8|d[Wa+2>>0]<<16|d[Wa+3>>0]<<24;a[Va>>0]=Eb;a[Va+1>>0]=Eb>>8;a[Va+2>>0]=Eb>>16;a[Va+3>>0]=Eb>>24;Eb=d[Ya>>0]|d[Ya+1>>0]<<8|d[Ya+2>>0]<<16|d[Ya+3>>0]<<24;a[Xa>>0]=Eb;a[Xa+1>>0]=Eb>>8;a[Xa+2>>0]=Eb>>16;a[Xa+3>>0]=Eb>>24;Eb=d[_a>>0]|d[_a+1>>0]<<8|d[_a+2>>0]<<16|d[_a+3>>0]<<24;a[Za>>0]=Eb;a[Za+1>>0]=Eb>>8;a[Za+2>>0]=Eb>>16;a[Za+3>>0]=Eb>>24}Eb=c[f>>2]|0;Fb=Eb+(i<<5)|0;Gb=c[Cb+(i*800|0)+788>>2]|0;if(m){n=s;Hb=Fb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));Ib=Eb+(i<<5)+16|0;Jb=Ib;Kb=d[Jb>>0]|d[Jb+1>>0]<<8|d[Jb+2>>0]<<16|d[Jb+3>>0]<<24;Jb=Ib+4|0;Ib=d[Jb>>0]|d[Jb+1>>0]<<8|d[Jb+2>>0]<<16|d[Jb+3>>0]<<24;Jb=t;Lb=Jb;a[Lb>>0]=Kb;a[Lb+1>>0]=Kb>>8;a[Lb+2>>0]=Kb>>16;a[Lb+3>>0]=Kb>>24;Kb=Jb+4|0;a[Kb>>0]=Ib;a[Kb+1>>0]=Ib>>8;a[Kb+2>>0]=Ib>>16;a[Kb+3>>0]=Ib>>24;Ib=Eb+(i<<5)+24|0;Kb=Ib;Jb=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Ib+4|0;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=u;Lb=Kb;a[Lb>>0]=Jb;a[Lb+1>>0]=Jb>>8;a[Lb+2>>0]=Jb>>16;a[Lb+3>>0]=Jb>>24;Jb=Kb+4|0;a[Jb>>0]=Ib;a[Jb+1>>0]=Ib>>8;a[Jb+2>>0]=Ib>>16;a[Jb+3>>0]=Ib>>24}a:do if(!(a[Cb+(i*800|0)+768>>0]|0)){Ib=a[Cb+(i*800|0)+769>>0]|0;Jb=Db?A:B;ea[c[9344+((Ib<<24>>24==0?Jb:Ib&255)<<2)>>2]&31](j);if(!Gb)Mb=Jb;else{Ib=Gb;Kb=0;while(1){Lb=Cb+(i*800|0)+(Kb<<4<<1)|0;Nb=j+(e[4112+(Kb<<1)>>1]|0)|0;switch((30?Ib>>>30:Ib)&3){case 3:{vd(Lb,Nb,0);break}case 2:{xd(Lb,Nb);break}case 1:{wd(Lb,Nb);break}default:{}}Kb=Kb+1|0;if((Kb|0)==16){Mb=Jb;break a}else Ib=Ib<<2}}}else{do if(m)if((i|0)<((c[p>>2]|0)+-1|0)){Ib=Fb+32|0;Jb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;a[v>>0]=Jb;a[v+1>>0]=Jb>>8;a[v+2>>0]=Jb>>16;a[v+3>>0]=Jb>>24;Ob=Jb;break}else{Jb=a[Eb+(i<<5)+15>>0]|0;Nf(v|0,Jb|0,4)|0;Ib=Jb&255;Jb=Ib<<8|Ib;Ob=Jb|Jb<<16;break}else Ob=c[v>>2]|0;while(0);c[x>>2]=Ob;c[y>>2]=Ob;c[z>>2]=Ob;Jb=Gb;Ib=0;while(1){Kb=j+(e[4112+(Ib<<1)>>1]|0)|0;ea[c[9376+((a[Cb+(i*800|0)+769+Ib>>0]&255)<<2)>>2]&31](Kb);Nb=Cb+(i*800|0)+(Ib<<4<<1)|0;switch((30?Jb>>>30:Jb)&3){case 3:{vd(Nb,Kb,0);break}case 2:{xd(Nb,Kb);break}case 1:{wd(Nb,Kb);break}default:{}}Ib=Ib+1|0;if((Ib|0)==16)break;else Jb=Jb<<2}Mb=Db?A:B}while(0);Db=c[Cb+(i*800|0)+792>>2]|0;Gb=a[Cb+(i*800|0)+785>>0]|0;Jb=9424+((Gb<<24>>24==0?Mb:Gb&255)<<2)|0;ea[c[Jb>>2]&31](k);ea[c[Jb>>2]&31](l);Jb=Cb+(i*800|0)+512|0;do if(Db&255|0)if(!(Db&170)){zd(Jb,k);break}else{yd(Jb,k);break}while(0);Jb=Cb+(i*800|0)+640|0;do if(Db&65280|0)if(!(Db&43520)){zd(Jb,l);break}else{yd(Jb,l);break}while(0);if((g|0)<((c[w>>2]|0)+-1|0)){n=Fb;Hb=C;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));Fb=D;Jb=Fb;Db=d[Jb>>0]|d[Jb+1>>0]<<8|d[Jb+2>>0]<<16|d[Jb+3>>0]<<24;Jb=Fb+4|0;Fb=d[Jb>>0]|d[Jb+1>>0]<<8|d[Jb+2>>0]<<16|d[Jb+3>>0]<<24;Jb=Eb+(i<<5)+16|0;Cb=Jb;a[Cb>>0]=Db;a[Cb+1>>0]=Db>>8;a[Cb+2>>0]=Db>>16;a[Cb+3>>0]=Db>>24;Db=Jb+4|0;a[Db>>0]=Fb;a[Db+1>>0]=Fb>>8;a[Db+2>>0]=Fb>>16;a[Db+3>>0]=Fb>>24;Fb=E;Db=Fb;Jb=d[Db>>0]|d[Db+1>>0]<<8|d[Db+2>>0]<<16|d[Db+3>>0]<<24;Db=Fb+4|0;Fb=d[Db>>0]|d[Db+1>>0]<<8|d[Db+2>>0]<<16|d[Db+3>>0]<<24;Db=Eb+(i<<5)+24|0;Cb=Db;a[Cb>>0]=Jb;a[Cb+1>>0]=Jb>>8;a[Cb+2>>0]=Jb>>16;a[Cb+3>>0]=Jb>>24;Jb=Db+4|0;a[Jb>>0]=Fb;a[Jb+1>>0]=Fb>>8;a[Jb+2>>0]=Fb>>16;a[Jb+3>>0]=Fb>>24}Fb=r(F,c[G>>2]|0)|0;Jb=c[h>>2]|0;Db=(c[I>>2]|0)+(i<<4)+Fb|0;Fb=i<<3;Cb=(c[J>>2]|0)+Fb|0;Gb=(c[K>>2]|0)+Fb|0;n=Db;Hb=j;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+(c[G>>2]|0)|0;Hb=$a;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+(c[G>>2]<<1)|0;Hb=ab;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*3|0)|0;Hb=bb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+(c[G>>2]<<2)|0;Hb=cb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*5|0)|0;Hb=db;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*6|0)|0;Hb=eb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*7|0)|0;Hb=fb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+(c[G>>2]<<3)|0;Hb=gb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*9|0)|0;Hb=hb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*10|0)|0;Hb=ib;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*11|0)|0;Hb=jb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*12|0)|0;Hb=kb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*13|0)|0;Hb=lb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*14|0)|0;Hb=mb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));n=Db+((c[G>>2]|0)*15|0)|0;Hb=nb;o=n+16|0;do{a[n>>0]=a[Hb>>0]|0;n=n+1|0;Hb=Hb+1|0}while((n|0)<(o|0));Db=r(Jb,H)|0;Eb=Cb+Db|0;Fb=Gb+Db|0;Db=k;Ib=Db;Kb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Db+4|0;Db=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Eb;Nb=Ib;a[Nb>>0]=Kb;a[Nb+1>>0]=Kb>>8;a[Nb+2>>0]=Kb>>16;a[Nb+3>>0]=Kb>>24;Kb=Ib+4|0;a[Kb>>0]=Db;a[Kb+1>>0]=Db>>8;a[Kb+2>>0]=Db>>16;a[Kb+3>>0]=Db>>24;Db=l;Kb=Db;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Db+4|0;Db=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Fb;Nb=Kb;a[Nb>>0]=Ib;a[Nb+1>>0]=Ib>>8;a[Nb+2>>0]=Ib>>16;a[Nb+3>>0]=Ib>>24;Ib=Kb+4|0;a[Ib>>0]=Db;a[Ib+1>>0]=Db>>8;a[Ib+2>>0]=Db>>16;a[Ib+3>>0]=Db>>24;Db=ob;Ib=Db;Kb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Db+4|0;Db=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Eb+(c[h>>2]|0)|0;Nb=Ib;a[Nb>>0]=Kb;a[Nb+1>>0]=Kb>>8;a[Nb+2>>0]=Kb>>16;a[Nb+3>>0]=Kb>>24;Kb=Ib+4|0;a[Kb>>0]=Db;a[Kb+1>>0]=Db>>8;a[Kb+2>>0]=Db>>16;a[Kb+3>>0]=Db>>24;Db=pb;Kb=Db;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Db+4|0;Db=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Fb+(c[h>>2]|0)|0;Nb=Kb;a[Nb>>0]=Ib;a[Nb+1>>0]=Ib>>8;a[Nb+2>>0]=Ib>>16;a[Nb+3>>0]=Ib>>24;Ib=Kb+4|0;a[Ib>>0]=Db;a[Ib+1>>0]=Db>>8;a[Ib+2>>0]=Db>>16;a[Ib+3>>0]=Db>>24;Db=qb;Ib=Db;Kb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Db+4|0;Db=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Eb+(c[h>>2]<<1)|0;Nb=Ib;a[Nb>>0]=Kb;a[Nb+1>>0]=Kb>>8;a[Nb+2>>0]=Kb>>16;a[Nb+3>>0]=Kb>>24;Kb=Ib+4|0;a[Kb>>0]=Db;a[Kb+1>>0]=Db>>8;a[Kb+2>>0]=Db>>16;a[Kb+3>>0]=Db>>24;Db=rb;Kb=Db;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Db+4|0;Db=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Fb+(c[h>>2]<<1)|0;Nb=Kb;a[Nb>>0]=Ib;a[Nb+1>>0]=Ib>>8;a[Nb+2>>0]=Ib>>16;a[Nb+3>>0]=Ib>>24;Ib=Kb+4|0;a[Ib>>0]=Db;a[Ib+1>>0]=Db>>8;a[Ib+2>>0]=Db>>16;a[Ib+3>>0]=Db>>24;Db=sb;Ib=Db;Kb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Db+4|0;Db=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Eb+((c[h>>2]|0)*3|0)|0;Nb=Ib;a[Nb>>0]=Kb;a[Nb+1>>0]=Kb>>8;a[Nb+2>>0]=Kb>>16;a[Nb+3>>0]=Kb>>24;Kb=Ib+4|0;a[Kb>>0]=Db;a[Kb+1>>0]=Db>>8;a[Kb+2>>0]=Db>>16;a[Kb+3>>0]=Db>>24;Db=tb;Kb=Db;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Db+4|0;Db=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Fb+((c[h>>2]|0)*3|0)|0;Nb=Kb;a[Nb>>0]=Ib;a[Nb+1>>0]=Ib>>8;a[Nb+2>>0]=Ib>>16;a[Nb+3>>0]=Ib>>24;Ib=Kb+4|0;a[Ib>>0]=Db;a[Ib+1>>0]=Db>>8;a[Ib+2>>0]=Db>>16;a[Ib+3>>0]=Db>>24;Db=ub;Ib=Db;Kb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Db+4|0;Db=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Eb+(c[h>>2]<<2)|0;Nb=Ib;a[Nb>>0]=Kb;a[Nb+1>>0]=Kb>>8;a[Nb+2>>0]=Kb>>16;a[Nb+3>>0]=Kb>>24;Kb=Ib+4|0;a[Kb>>0]=Db;a[Kb+1>>0]=Db>>8;a[Kb+2>>0]=Db>>16;a[Kb+3>>0]=Db>>24;Db=vb;Kb=Db;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Db+4|0;Db=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Fb+(c[h>>2]<<2)|0;Nb=Kb;a[Nb>>0]=Ib;a[Nb+1>>0]=Ib>>8;a[Nb+2>>0]=Ib>>16;a[Nb+3>>0]=Ib>>24;Ib=Kb+4|0;a[Ib>>0]=Db;a[Ib+1>>0]=Db>>8;a[Ib+2>>0]=Db>>16;a[Ib+3>>0]=Db>>24;Db=wb;Ib=Db;Kb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Db+4|0;Db=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Eb+((c[h>>2]|0)*5|0)|0;Nb=Ib;a[Nb>>0]=Kb;a[Nb+1>>0]=Kb>>8;a[Nb+2>>0]=Kb>>16;a[Nb+3>>0]=Kb>>24;Kb=Ib+4|0;a[Kb>>0]=Db;a[Kb+1>>0]=Db>>8;a[Kb+2>>0]=Db>>16;a[Kb+3>>0]=Db>>24;Db=xb;Kb=Db;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Db+4|0;Db=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Fb+((c[h>>2]|0)*5|0)|0;Nb=Kb;a[Nb>>0]=Ib;a[Nb+1>>0]=Ib>>8;a[Nb+2>>0]=Ib>>16;a[Nb+3>>0]=Ib>>24;Ib=Kb+4|0;a[Ib>>0]=Db;a[Ib+1>>0]=Db>>8;a[Ib+2>>0]=Db>>16;a[Ib+3>>0]=Db>>24;Db=yb;Ib=Db;Kb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Db+4|0;Db=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Eb+((c[h>>2]|0)*6|0)|0;Nb=Ib;a[Nb>>0]=Kb;a[Nb+1>>0]=Kb>>8;a[Nb+2>>0]=Kb>>16;a[Nb+3>>0]=Kb>>24;Kb=Ib+4|0;a[Kb>>0]=Db;a[Kb+1>>0]=Db>>8;a[Kb+2>>0]=Db>>16;a[Kb+3>>0]=Db>>24;Db=zb;Kb=Db;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Db+4|0;Db=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Fb+((c[h>>2]|0)*6|0)|0;Nb=Kb;a[Nb>>0]=Ib;a[Nb+1>>0]=Ib>>8;a[Nb+2>>0]=Ib>>16;a[Nb+3>>0]=Ib>>24;Ib=Kb+4|0;a[Ib>>0]=Db;a[Ib+1>>0]=Db>>8;a[Ib+2>>0]=Db>>16;a[Ib+3>>0]=Db>>24;Db=Ab;Ib=Db;Kb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Db+4|0;Db=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;Ib=Eb+((c[h>>2]|0)*7|0)|0;Eb=Ib;a[Eb>>0]=Kb;a[Eb+1>>0]=Kb>>8;a[Eb+2>>0]=Kb>>16;a[Eb+3>>0]=Kb>>24;Kb=Ib+4|0;a[Kb>>0]=Db;a[Kb+1>>0]=Db>>8;a[Kb+2>>0]=Db>>16;a[Kb+3>>0]=Db>>24;Db=Bb;Kb=Db;Ib=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Db+4|0;Db=d[Kb>>0]|d[Kb+1>>0]<<8|d[Kb+2>>0]<<16|d[Kb+3>>0]<<24;Kb=Fb+((c[h>>2]|0)*7|0)|0;Fb=Kb;a[Fb>>0]=Ib;a[Fb+1>>0]=Ib>>8;a[Fb+2>>0]=Ib>>16;a[Fb+3>>0]=Ib>>24;Ib=Kb+4|0;a[Ib>>0]=Db;a[Ib+1>>0]=Db>>8;a[Ib+2>>0]=Db>>16;a[Ib+3>>0]=Db>>24;i=i+1|0}while((i|0)<(c[p>>2]|0));return}function dd(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,ba=0;f=Y;Y=Y+64|0;g=f;h=b+160|0;i=c[h>>2]|0;j=b+2308|0;k=d[8708+(c[j>>2]|0)>>0]|0;l=b+2280|0;m=c[l>>2]|0;n=r(m,k)|0;o=b+2284|0;p=c[o>>2]|0;q=r(1?k>>>1:k,p)|0;s=r(m,i<<4)|0;m=r(p,i<<3)|0;p=b+2268|0;t=0-n|0;u=(c[p>>2]|0)+t+s|0;v=b+2272|0;w=0-q|0;x=(c[v>>2]|0)+w+m|0;y=b+2276|0;z=(c[y>>2]|0)+w+m|0;A=b+164|0;B=c[A>>2]|0;C=(B|0)==0;D=(B|0)>=((c[b+308>>2]|0)+-1|0);if((c[b+148>>2]|0)==2)cd(b,h);if(c[b+168>>2]|0?(E=c[b+296>>2]|0,F=b+304|0,(E|0)<(c[F>>2]|0)):0){G=b+172|0;H=(c[A>>2]|0)>0;A=E;do{E=c[h>>2]|0;I=c[l>>2]|0;J=c[G>>2]|0;K=(c[p>>2]|0)+(r(E<<4,I)|0)+(A<<4)|0;L=d[J+(A<<2)+1>>0]|0;M=a[J+(A<<2)>>0]|0;N=M&255;do if(M<<24>>24)if((c[j>>2]|0)==1){if((A|0)>0)Gd(K,I,N+4|0);O=J+(A<<2)+2|0;if(a[O>>0]|0)Id(K,I,N);if(H)Fd(K,I,N+4|0);if(!(a[O>>0]|0))break;Hd(K,I,N);break}else{O=c[o>>2]|0;P=r(O,E<<3)|0;Q=A<<3;R=(c[v>>2]|0)+P+Q|0;S=(c[y>>2]|0)+P+Q|0;Q=d[J+(A<<2)+3>>0]|0;P=N+4|0;if((A|0)>0){Cd(K,I,P,L,Q);Kd(R,S,O,P,L,Q)}T=J+(A<<2)+2|0;if(a[T>>0]|0){Jd(K,I,N,L,Q);Ld(R,S,O,N,L,Q)}if(H){Ad(K,I,P,L,Q);Dd(R,S,O,P,L,Q)}if(!(a[T>>0]|0))break;Bd(K,I,N,L,Q);Ed(R,S,O,N,L,Q);break}while(0);A=A+1|0}while((A|0)<(c[F>>2]|0))}if(c[b+540>>2]|0?(F=c[b+296>>2]|0,A=b+304|0,H=c[A>>2]|0,(F|0)<(H|0)):0){j=b+176|0;G=b+544|0;L=b+548|0;N=F;F=H;while(1){H=c[o>>2]|0;I=(c[j>>2]|0)+(N*800|0)+796|0;K=a[I>>0]|0;if((K&255)>3){J=K&255;K=c[v>>2]|0;E=r(c[h>>2]<<3,H)|0;M=c[y>>2]|0;Q=0;O=c[G>>2]|0;S=c[L>>2]|0;do{R=b+552+(O<<2)|0;T=(c[R>>2]|0)-(c[b+552+(S<<2)>>2]|0)|0;c[R>>2]=T&2147483647;R=(c[G>>2]|0)+1|0;O=(R|0)==55?0:R;c[G>>2]=O;R=(c[L>>2]|0)+1|0;S=(R|0)==55?0:R;c[L>>2]=S;R=T<<1;T=r(24?R>>24:R,J)|0;a[g+Q>>0]=(8?T>>>8:T)+128;Q=Q+1|0}while((Q|0)!=64);Q=N<<3;ie(g,K+E+Q|0,H);J=d[I>>0]|0;S=0;O=c[G>>2]|0;T=c[L>>2]|0;do{R=b+552+(O<<2)|0;P=(c[R>>2]|0)-(c[b+552+(T<<2)>>2]|0)|0;c[R>>2]=P&2147483647;R=(c[G>>2]|0)+1|0;O=(R|0)==55?0:R;c[G>>2]=O;R=(c[L>>2]|0)+1|0;T=(R|0)==55?0:R;c[L>>2]=T;R=P<<1;P=r(24?R>>24:R,J)|0;a[g+S>>0]=(8?P>>>8:P)+128;S=S+1|0}while((S|0)!=64);ie(g,M+E+Q|0,H);U=c[A>>2]|0}else U=F;N=N+1|0;if((N|0)>=(U|0))break;else F=U}}U=e+44|0;if(c[U>>2]|0){F=B<<4;if(C){c[e+20>>2]=(c[p>>2]|0)+s;c[e+24>>2]=(c[v>>2]|0)+m;V=0;W=(c[y>>2]|0)+m|0}else{c[e+20>>2]=u;c[e+24>>2]=x;V=F-k|0;W=z}c[e+28>>2]=W;W=F+16+(D?0:0-k|0)|0;k=c[e+88>>2]|0;F=(W|0)>(k|0)?k:W;W=e+104|0;c[W>>2]=0;if((c[b+2348>>2]|0)!=0&(F|0)>(V|0)){k=ua(b,e,V,F-V|0)|0;c[W>>2]=k;if(!k){X=md(b,3,8711)|0;Y=f;return X|0}else Z=k}else Z=0;k=c[e+84>>2]|0;if((k|0)>(V|0)){m=k-V|0;s=r(c[l>>2]|0,m)|0;C=e+20|0;c[C>>2]=(c[C>>2]|0)+s;s=r(c[o>>2]|0,1?m>>1:m)|0;C=e+24|0;c[C>>2]=(c[C>>2]|0)+s;C=e+28|0;c[C>>2]=(c[C>>2]|0)+s;if(!Z){_=k;$=0}else{s=Z+(r(c[e>>2]|0,m)|0)|0;c[W>>2]=s;_=k;$=s}}else{_=V;$=Z}if((F|0)>(_|0)){Z=c[e+76>>2]|0;V=e+20|0;c[V>>2]=(c[V>>2]|0)+Z;V=1?Z>>1:Z;s=e+24|0;c[s>>2]=(c[s>>2]|0)+V;s=e+28|0;c[s>>2]=(c[s>>2]|0)+V;if($|0)c[W>>2]=$+Z;c[e+8>>2]=_-k;c[e+12>>2]=(c[e+80>>2]|0)-Z;c[e+16>>2]=F-_;ba=aa[c[U>>2]&7](e)|0}else ba=1}else ba=1;if(D|(i+1|0)!=(c[b+156>>2]|0)){X=ba;Y=f;return X|0}Lf((c[p>>2]|0)+t|0,u+(c[l>>2]<<4)|0,n|0)|0;Lf((c[v>>2]|0)+w|0,x+(c[o>>2]<<3)|0,q|0)|0;Lf((c[y>>2]|0)+w|0,z+(c[o>>2]<<3)|0,q|0)|0;X=ba;Y=f;return X|0}function ed(){return 8140}function fd(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;return}function gd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=a+20|0;c[b>>2]=0;d=a+4|0;e=c[d>>2]|0;switch(e|0){case 0:{f=va(1,0,80)|0;c[a>>2]=f;if(!f){g=0;return g|0}do if(!(Se(f,0)|0)){h=f+28|0;if(Q(h|0,0)|0){Ve(f)|0;break}Te(f)|0;if(T(f+76|0,0,6,a|0)|0){Ue(f)|0;Ve(f)|0;P(h|0)|0;break}c[d>>2]=1;Ue(f)|0;g=1;return g|0}while(0);pa(f);c[a>>2]=0;g=0;return g|0}case 1:{g=e;return g|0}default:{e=c[a>>2]|0;if(!e){g=1;return g|0}Te(e)|0;if((c[d>>2]|0)>>>0>=2){a=e+28|0;do S(a|0,e|0)|0;while((c[d>>2]|0)!=1)}Ue(e)|0;g=(c[b>>2]|0)==0&1;return g|0}}return 0}function hd(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){Te(b)|0;d=a+4|0;if((c[d>>2]|0)>>>0>=2){e=b+28|0;do S(e|0,b|0)|0;while((c[d>>2]|0)!=1)}Ue(b)|0}return (c[a+20>>2]|0)==0|0}function id(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a>>2]|0;if(!b)return;Te(b)|0;d=a+4|0;switch(c[d>>2]|0){case 0:break;case 1:{e=b+28|0;f=6;break}default:{a=b+28|0;do S(a|0,b|0)|0;while((c[d>>2]|0)!=1);e=a;f=6}}if((f|0)==6){c[d>>2]=2;R(e|0)|0}Ue(b)|0;return}function jd(a){a=a|0;var b=0,d=0;b=c[a+8>>2]|0;if(!b)return;d=(ba[b&31](c[a+12>>2]|0,c[a+16>>2]|0)|0)==0&1;b=a+20|0;c[b>>2]=c[b>>2]|d;return}function kd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=c[a>>2]|0;if(!b)return;Te(b)|0;d=a+4|0;switch(c[d>>2]|0){case 0:break;case 1:{e=b+28|0;f=6;break}default:{g=b+28|0;do S(g|0,b|0)|0;while((c[d>>2]|0)!=1);e=g;f=6}}if((f|0)==6){c[d>>2]=0;R(e|0)|0}Ue(b)|0;U(c[b+76>>2]|0,0)|0;Ve(b)|0;P(b+28|0)|0;pa(b);c[a>>2]=0;return}function ld(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a>>2]|0;d=a+4|0;e=b+28|0;a:while(1){Te(b)|0;b:while(1){switch(c[d>>2]|0){case 0:{break a;break}case 2:{f=5;break b;break}case 1:break;default:{f=7;break b}}S(e|0,b|0)|0}if((f|0)==5){f=0;ea[c[8156>>2]&31](a);c[d>>2]=1;R(e|0)|0;Ue(b)|0}else if((f|0)==7){f=0;R(e|0)|0;Ue(b)|0}}R(e|0)|0;Ue(b)|0;return 0}function md(a,b,d){a=a|0;b=b|0;d=d|0;if(c[a>>2]|0)return 0;c[a>>2]=b;c[a+8>>2]=d;c[a+4>>2]=0;return 0}function nd(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;f=c[e+48>>2]|0;if(f|0?(aa[f&7](e)|0)==0:0){md(b,6,8740)|0;g=c[b>>2]|0;return g|0}f=b+2308|0;if(!(c[e+68>>2]|0)){h=c[f>>2]|0;i=d[8708+h>>0]|0;if((h|0)==2){c[b+296>>2]=0;j=i;k=2;l=b+300|0;m=11}else{n=h;o=i;m=8}}else{c[f>>2]=0;n=0;o=0;m=8}if((m|0)==8){f=(c[e+76>>2]|0)-o|0;i=b+296|0;c[i>>2]=4?f>>4:f;h=(c[e+84>>2]|0)-o|0;p=b+300|0;c[p>>2]=4?h>>4:h;if((f|0)<0)c[i>>2]=0;if((h|0)<0){j=o;k=n;l=p;m=11}else{q=o;r=n}}if((m|0)==11){c[l>>2]=0;q=j;r=k}k=q+15|0;q=k+(c[e+88>>2]|0)|0;j=4?q>>4:q;q=b+308|0;c[q>>2]=j;l=k+(c[e+80>>2]|0)|0;e=4?l>>4:l;l=c[b+288>>2]|0;c[b+304>>2]=(e|0)>(l|0)?l:e;e=c[b+292>>2]|0;if((j|0)>(e|0))c[q>>2]=e;if((r|0)<=0){g=0;return g|0}r=b+60|0;e=b+68|0;q=b+72|0;j=b+64|0;l=b+88|0;k=b+112|0;m=(c[b+104>>2]|0)==0;n=0;do{if(!m){o=a[b+120+n>>0]|0;if(!(c[k>>2]|0))s=(c[r>>2]|0)+o|0;else s=o}else s=c[r>>2]|0;if(c[e>>2]|0){o=(c[q>>2]|0)+s|0;p=(o|0)<63?o:63;h=(p|0)>0?p:0;if((o|0)>0){p=c[j>>2]|0;i=(p|0)>4?2:1;f=i?h>>>i:h;i=9-p|0;t=(p|0)>0?((f|0)>(i|0)?i:f):h;f=(t|0)>1?t:1;a[b+2312+(n<<3)+1>>0]=f;a[b+2312+(n<<3)+3>>0]=(h|0)>39?2:(h|0)>14&1;u=f+(h<<1)&255}else u=0;a[b+2312+(n<<3)>>0]=u;a[b+2312+(n<<3)+2>>0]=0;h=(c[l>>2]|0)+o|0;o=(h|0)<63?h:63;f=(o|0)>0?o:0;if((h|0)>0){h=c[j>>2]|0;o=(h|0)>4?2:1;t=o?f>>>o:f;o=9-h|0;i=(h|0)>0?((t|0)>(o|0)?o:t):f;t=(i|0)>1?i:1;a[b+2312+(n<<3)+5>>0]=t;a[b+2312+(n<<3)+7>>0]=(f|0)>39?2:(f|0)>14&1;v=t+(f<<1)&255}else v=0}else{f=(s|0)<63?s:63;t=(f|0)>0?f:0;if((s|0)>0){f=c[j>>2]|0;i=(f|0)>4?2:1;o=i?t>>>i:t;i=9-f|0;h=(f|0)>0?((o|0)>(i|0)?i:o):t;o=(h|0)>1?h:1;h=o&255;a[b+2312+(n<<3)+1>>0]=h;i=(t|0)>39?2:(t|0)>14&1;a[b+2312+(n<<3)+3>>0]=i;a[b+2312+(n<<3)+5>>0]=h;a[b+2312+(n<<3)+7>>0]=i;w=o+(t<<1)&255}else w=0;a[b+2312+(n<<3)>>0]=w;a[b+2312+(n<<3)+2>>0]=0;v=w}a[b+2312+(n<<3)+4>>0]=v;a[b+2312+(n<<3)+6>>0]=1;n=n+1|0}while((n|0)!=4);g=0;return g|0}function od(a,b){a=a|0;b=b|0;var d=0,e=0;if((c[a+148>>2]|0)>0){d=(ed()|0)+8|0;e=aa[c[d>>2]&7](a+124|0)|0}else e=1;a=c[b+52>>2]|0;if(!a)return e|0;ea[a&31](b);return e|0}function pd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;if(!a)return 0;else return ((c[a+40>>2]|0)==0?0:(d|0)>511?2:0)|0;return 0}function qd(a,b){a=a|0;b=b|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;f=a+152|0;c[f>>2]=0;g=a+148|0;do if((c[g>>2]|0)>0){h=(ed()|0)+4|0;if(aa[c[h>>2]&7](a+124|0)|0){c[a+136>>2]=a;c[a+140>>2]=a+180;c[a+132>>2]=20;h=(c[a+2308>>2]|0)>0?3:2;c[a+156>>2]=h;i=h;break}if(!(md(a,1,8759)|0)){j=0;return j|0}else{i=c[a+156>>2]|0;break}}else{c[a+156>>2]=1;i=1}while(0);h=c[a+288>>2]|0;k=h<<2;l=h<<5;m=(h<<1)+2|0;n=a+2308|0;o=c[n>>2]|0;p=c[g>>2]|0;q=r((p|0)>0?2:1,k)|0;s=(o|0)>0?q:0;q=r(h*800|0,(p|0)==2?2:1)|0;t=i<<4;u=r(((t+(d[8708+o>>0]|0)|0)*3|0)/2|0,l)|0;if(!(c[a+2348>>2]|0)){w=0;x=0}else{o=Cf(e[a+50>>1]|0|0,0,e[a+48>>1]|0|0,0)|0;w=o;x=v()|0}o=Df(l|0,0,863,0)|0;y=Df(o|0,v()|0,k|0,0)|0;o=Df(y|0,v()|0,m|0,0)|0;y=Df(o|0,v()|0,q|0,0)|0;o=Df(y|0,v()|0,s|0,0)|0;y=Df(o|0,v()|0,u|0,0)|0;o=Df(y|0,v()|0,w|0,x|0)|0;y=v()|0;if(!((o|0)==(o|0)&(y|0)==0)){j=0;return j|0}z=a+2292|0;A=a+2288|0;B=c[A>>2]|0;do if(y>>>0>0|((y|0)==0?o>>>0>(c[z>>2]|0)>>>0:0)){pa(B);c[z>>2]=0;C=wa(o,y,1)|0;c[A>>2]=C;if(C|0){c[z>>2]=o;D=c[g>>2]|0;E=C;F=13;break}if(!(md(a,1,8789)|0)){j=0;return j|0}else{G=a+2276|0;H=a+2280|0;I=a+2284|0;J=a+2268|0;K=a+2272|0;break}}else{D=p;E=B;F=13}while(0);if((F|0)==13){F=a+2244|0;c[F>>2]=E;B=E+k|0;c[a+2252>>2]=B;E=B+l|0;l=E+2|0;c[a+2256>>2]=l;B=E+m|0;E=(s|0)==0?0:B;c[a+2260>>2]=E;c[a+160>>2]=0;c[a+172>>2]=(D|0)>0?E+(h<<2)|0:E;E=B+s+31&-32;c[a+2264>>2]=E;s=E+832|0;c[a+2304>>2]=s;E=a+176|0;c[E>>2]=s;if((D|0)==2)c[E>>2]=s+(h*800|0);E=s+q|0;q=h<<4;s=a+2280|0;c[s>>2]=q;D=h<<3;h=a+2284|0;c[h>>2]=D;B=d[8708+(c[n>>2]|0)>>0]|0;n=r(q,B)|0;p=r(1?B>>>1:B,D)|0;B=E+n|0;n=a+2268|0;c[n>>2]=B;g=B+(r(q,t)|0)+p|0;t=a+2272|0;c[t>>2]=g;q=g+(r(i<<3,D)|0)+p|0;p=a+2276|0;c[p>>2]=q;c[f>>2]=0;c[a+2364>>2]=(w|0)==0&(x|0)==0?0:E+u|0;Nf(l+-2|0,0,m|0)|0;rd(a);Nf(c[F>>2]|0,0,k|0)|0;G=p;H=s;I=h;J=n;K=t}c[b+8>>2]=0;c[b+20>>2]=c[J>>2];c[b+24>>2]=c[K>>2];c[b+28>>2]=c[G>>2];c[b+32>>2]=c[H>>2];c[b+36>>2]=c[I>>2];c[b+104>>2]=0;sd();j=1;return j|0}function rd(b){b=b|0;var d=0;d=c[b+2256>>2]|0;a[d+-2>>0]=0;a[d+-1>>0]=0;c[b+2248>>2]=0;c[b+2296>>2]=0;return}function sd(){var a=0;if(Te(10140)|0)return;if(!(c[2041]|0))a=0;else{c[2344]=6;c[2345]=7;c[2346]=8;c[2348]=9;c[2350]=10;c[2347]=11;c[2349]=12;c[2351]=13;c[2352]=14;c[2353]=15;c[2336]=16;c[2337]=17;c[2338]=18;c[2339]=19;c[2340]=20;c[2341]=21;c[2342]=22;c[2356]=23;c[2357]=24;c[2358]=25;c[2359]=26;c[2360]=27;c[2361]=28;c[2362]=29;a=c[2485]|0}c[2041]=a;Ue(10140)|0;return}function td(){return}function ud(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;e=Y;Y=Y+64|0;f=e;g=b[a>>1]|0;h=b[a+24>>1]|0;i=h+g|0;j=b[a+8>>1]|0;k=b[a+16>>1]|0;l=k+j|0;m=j-k|0;k=g-h|0;h=l+i|0;c[f>>2]=h;g=f+32|0;c[g>>2]=i-l;l=f+16|0;c[l>>2]=m+k;i=f+48|0;c[i>>2]=k-m;m=b[a+2>>1]|0;k=b[a+26>>1]|0;j=k+m|0;n=b[a+10>>1]|0;o=b[a+18>>1]|0;p=o+n|0;q=n-o|0;o=m-k|0;k=p+j|0;c[f+4>>2]=k;m=f+36|0;c[m>>2]=j-p;p=q+o|0;c[f+20>>2]=p;j=f+52|0;c[j>>2]=o-q;q=b[a+4>>1]|0;o=b[a+28>>1]|0;n=o+q|0;r=b[a+12>>1]|0;s=b[a+20>>1]|0;t=s+r|0;u=r-s|0;s=q-o|0;o=t+n|0;c[f+8>>2]=o;q=n-t|0;c[f+40>>2]=q;t=u+s|0;c[f+24>>2]=t;n=f+56|0;c[n>>2]=s-u;u=b[a+6>>1]|0;s=b[a+30>>1]|0;r=s+u|0;v=b[a+14>>1]|0;w=b[a+22>>1]|0;a=w+v|0;x=v-w|0;w=u-s|0;s=a+r|0;c[f+12>>2]=s;u=r-a|0;c[f+44>>2]=u;a=x+w|0;c[f+28>>2]=a;r=w-x|0;c[f+60>>2]=r;f=h+3|0;h=f+s|0;x=o+k|0;w=k-o|0;o=f-s|0;s=x+h|0;b[d>>1]=3?s>>>3:s;s=w+o|0;b[d+32>>1]=3?s>>>3:s;s=h-x|0;b[d+64>>1]=3?s>>>3:s;s=o-w|0;b[d+96>>1]=3?s>>>3:s;s=(c[l>>2]|0)+3|0;l=s+a|0;w=t+p|0;o=p-t|0;t=s-a|0;a=w+l|0;b[d+128>>1]=3?a>>>3:a;a=o+t|0;b[d+160>>1]=3?a>>>3:a;a=l-w|0;b[d+192>>1]=3?a>>>3:a;a=t-o|0;b[d+224>>1]=3?a>>>3:a;a=(c[g>>2]|0)+3|0;g=a+u|0;o=c[m>>2]|0;m=q+o|0;t=o-q|0;q=a-u|0;u=m+g|0;b[d+256>>1]=3?u>>>3:u;u=t+q|0;b[d+288>>1]=3?u>>>3:u;u=g-m|0;b[d+320>>1]=3?u>>>3:u;u=q-t|0;b[d+352>>1]=3?u>>>3:u;u=(c[i>>2]|0)+3|0;i=u+r|0;t=c[j>>2]|0;j=c[n>>2]|0;n=j+t|0;q=t-j|0;j=u-r|0;r=n+i|0;b[d+384>>1]=3?r>>>3:r;r=q+j|0;b[d+416>>1]=3?r>>>3:r;r=i-n|0;b[d+448>>1]=3?r>>>3:r;r=j-q|0;b[d+480>>1]=3?r>>>3:r;Y=e;return}function vd(a,b,c){a=a|0;b=b|0;c=c|0;le(a,b);if(!c)return;le(a+32|0,b+4|0);return}function wd(c,e){c=c|0;e=e|0;var f=0,g=0;f=(b[c>>1]|0)+4|0;c=3?f>>3:f;f=c+(d[e>>0]|0)|0;a[e>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+1|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+2|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+3|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+32|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+33|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+34|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+35|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+64|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+65|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+66|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+67|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+96|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+97|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+98|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+99|0;e=c+(d[f>>0]|0)|0;a[f>>0]=e>>>0>255?(31?e>>>31:e)+255|0:e;return}function xd(c,e){c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=(b[c>>1]|0)+4|0;g=b[c+8>>1]|0;h=g*35468|0;i=16?h>>16:h;h=g*20091|0;j=(16?h>>16:h)+g|0;g=b[c+2>>1]|0;c=g*35468|0;h=16?c>>16:c;c=g*20091|0;k=(16?c>>16:c)+g|0;g=j+f|0;c=g+k|0;l=(3?c>>3:c)+(d[e>>0]|0)|0;a[e>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=e+1|0;c=g+h|0;m=(3?c>>3:c)+(d[l>>0]|0)|0;a[l>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=e+2|0;l=g-h|0;c=(3?l>>3:l)+(d[m>>0]|0)|0;a[m>>0]=c>>>0>255?(31?c>>>31:c)+255|0:c;c=e+3|0;m=g-k|0;g=(3?m>>3:m)+(d[c>>0]|0)|0;a[c>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=i+f|0;c=e+32|0;m=k+g|0;l=(3?m>>3:m)+(d[c>>0]|0)|0;a[c>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=e+33|0;c=g+h|0;m=(3?c>>3:c)+(d[l>>0]|0)|0;a[l>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=e+34|0;l=g-h|0;c=(3?l>>3:l)+(d[m>>0]|0)|0;a[m>>0]=c>>>0>255?(31?c>>>31:c)+255|0:c;c=e+35|0;m=g-k|0;g=(3?m>>3:m)+(d[c>>0]|0)|0;a[c>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=f-i|0;i=e+64|0;c=k+g|0;m=(3?c>>3:c)+(d[i>>0]|0)|0;a[i>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=e+65|0;i=g+h|0;c=(3?i>>3:i)+(d[m>>0]|0)|0;a[m>>0]=c>>>0>255?(31?c>>>31:c)+255|0:c;c=e+66|0;m=g-h|0;i=(3?m>>3:m)+(d[c>>0]|0)|0;a[c>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=e+67|0;c=g-k|0;g=(3?c>>3:c)+(d[i>>0]|0)|0;a[i>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=f-j|0;j=e+96|0;f=g+k|0;i=(3?f>>3:f)+(d[j>>0]|0)|0;a[j>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=e+97|0;j=g+h|0;f=(3?j>>3:j)+(d[i>>0]|0)|0;a[i>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+98|0;i=g-h|0;h=(3?i>>3:i)+(d[f>>0]|0)|0;a[f>>0]=h>>>0>255?(31?h>>>31:h)+255|0:h;h=e+99|0;e=g-k|0;k=(3?e>>3:e)+(d[h>>0]|0)|0;a[h>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;return}function yd(a,b){a=a|0;b=b|0;vd(a,b,1);vd(a+64|0,b+128|0,1);return}function zd(a,c){a=a|0;c=c|0;var d=0;if(b[a>>1]|0)wd(a,c);d=a+32|0;if(b[d>>1]|0)wd(d,c+4|0);d=a+64|0;if(b[d>>1]|0)wd(d,c+128|0);d=a+96|0;if(!(b[d>>1]|0))return;wd(d,c+132|0);return}function Ad(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ke(a,b,1,16,c,d,e);return}function Bd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;f=b<<2;g=a+f|0;je(g,b,1,16,c,d,e);a=g+f|0;je(a,b,1,16,c,d,e);je(a+f|0,b,1,16,c,d,e);return}function Cd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ke(a,1,b,16,c,d,e);return}function Dd(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ke(a,c,1,8,d,e,f);ke(b,c,1,8,d,e,f);return}function Ed(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;g=c<<2;je(a+g|0,c,1,8,d,e,f);je(b+g|0,c,1,8,d,e,f);return}function Fd(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;g=f<<1|1;f=r(e,-2)|0;h=0-e|0;i=c[2027]|0;j=c[2024]|0;k=c[2025]|0;l=c[2026]|0;m=0;do{n=b+m|0;o=n+h|0;p=d[o>>0]|0;q=d[n>>0]|0;s=(d[n+f>>0]|0)-(d[n+e>>0]|0)|0;if(((d[i+(p-q)>>0]<<2)+(d[i+s>>0]|0)|0)<=(g|0)){t=((q-p|0)*3|0)+(a[j+s>>0]|0)|0;s=t+4|0;u=a[k+(3?s>>3:s)>>0]|0;s=t+3|0;a[o>>0]=a[l+((a[k+(3?s>>3:s)>>0]|0)+p)>>0]|0;a[n>>0]=a[l+(q-u)>>0]|0}m=m+1|0}while((m|0)!=16);return}function Gd(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;g=f<<1|1;f=c[2027]|0;h=c[2024]|0;i=c[2025]|0;j=c[2026]|0;k=0;do{l=b+(r(k,e)|0)|0;m=l+-1|0;n=d[m>>0]|0;o=d[l>>0]|0;p=(d[l+-2>>0]|0)-(d[l+1>>0]|0)|0;if(((d[f+(n-o)>>0]<<2)+(d[f+p>>0]|0)|0)<=(g|0)){q=((o-n|0)*3|0)+(a[h+p>>0]|0)|0;p=q+4|0;s=a[i+(3?p>>3:p)>>0]|0;p=q+3|0;a[m>>0]=a[j+((a[i+(3?p>>3:p)>>0]|0)+n)>>0]|0;a[l>>0]=a[j+(o-s)>>0]|0}k=k+1|0}while((k|0)!=16);return}function Hd(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;g=e<<2;h=f<<1|1;f=r(e,-2)|0;i=0-e|0;j=c[2027]|0;k=c[2024]|0;l=c[2025]|0;m=c[2026]|0;n=b+g|0;b=0;do{o=n+b|0;p=o+i|0;q=d[p>>0]|0;s=d[o>>0]|0;t=(d[o+f>>0]|0)-(d[o+e>>0]|0)|0;if(((d[j+(q-s)>>0]<<2)+(d[j+t>>0]|0)|0)<=(h|0)){u=((s-q|0)*3|0)+(a[k+t>>0]|0)|0;t=u+4|0;v=a[l+(3?t>>3:t)>>0]|0;t=u+3|0;a[p>>0]=a[m+((a[l+(3?t>>3:t)>>0]|0)+q)>>0]|0;a[o>>0]=a[m+(s-v)>>0]|0}b=b+1|0}while((b|0)!=16);b=n+g|0;n=0;do{v=b+n|0;s=v+i|0;o=d[s>>0]|0;q=d[v>>0]|0;t=(d[v+f>>0]|0)-(d[v+e>>0]|0)|0;if(((d[j+(o-q)>>0]<<2)+(d[j+t>>0]|0)|0)<=(h|0)){p=((q-o|0)*3|0)+(a[k+t>>0]|0)|0;t=p+4|0;u=a[l+(3?t>>3:t)>>0]|0;t=p+3|0;a[s>>0]=a[m+((a[l+(3?t>>3:t)>>0]|0)+o)>>0]|0;a[v>>0]=a[m+(q-u)>>0]|0}n=n+1|0}while((n|0)!=16);n=b+g|0;g=0;do{b=n+g|0;u=b+i|0;q=d[u>>0]|0;v=d[b>>0]|0;o=(d[b+f>>0]|0)-(d[b+e>>0]|0)|0;if(((d[j+(q-v)>>0]<<2)+(d[j+o>>0]|0)|0)<=(h|0)){t=((v-q|0)*3|0)+(a[k+o>>0]|0)|0;o=t+4|0;s=a[l+(3?o>>3:o)>>0]|0;o=t+3|0;a[u>>0]=a[m+((a[l+(3?o>>3:o)>>0]|0)+q)>>0]|0;a[b>>0]=a[m+(v-s)>>0]|0}g=g+1|0}while((g|0)!=16);return}function Id(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;g=f<<1|1;f=c[2027]|0;h=c[2024]|0;i=c[2025]|0;j=c[2026]|0;k=b+4|0;l=0;do{m=k+(r(l,e)|0)|0;n=m+-1|0;o=d[n>>0]|0;p=d[m>>0]|0;q=(d[m+-2>>0]|0)-(d[m+1>>0]|0)|0;if(((d[f+(o-p)>>0]<<2)+(d[f+q>>0]|0)|0)<=(g|0)){s=((p-o|0)*3|0)+(a[h+q>>0]|0)|0;q=s+4|0;t=a[i+(3?q>>3:q)>>0]|0;q=s+3|0;a[n>>0]=a[j+((a[i+(3?q>>3:q)>>0]|0)+o)>>0]|0;a[m>>0]=a[j+(p-t)>>0]|0}l=l+1|0}while((l|0)!=16);l=b+8|0;k=0;do{t=l+(r(k,e)|0)|0;p=t+-1|0;m=d[p>>0]|0;o=d[t>>0]|0;q=(d[t+-2>>0]|0)-(d[t+1>>0]|0)|0;if(((d[f+(m-o)>>0]<<2)+(d[f+q>>0]|0)|0)<=(g|0)){n=((o-m|0)*3|0)+(a[h+q>>0]|0)|0;q=n+4|0;s=a[i+(3?q>>3:q)>>0]|0;q=n+3|0;a[p>>0]=a[j+((a[i+(3?q>>3:q)>>0]|0)+m)>>0]|0;a[t>>0]=a[j+(o-s)>>0]|0}k=k+1|0}while((k|0)!=16);k=b+12|0;b=0;do{l=k+(r(b,e)|0)|0;s=l+-1|0;o=d[s>>0]|0;t=d[l>>0]|0;m=(d[l+-2>>0]|0)-(d[l+1>>0]|0)|0;if(((d[f+(o-t)>>0]<<2)+(d[f+m>>0]|0)|0)<=(g|0)){q=((t-o|0)*3|0)+(a[h+m>>0]|0)|0;m=q+4|0;p=a[i+(3?m>>3:m)>>0]|0;m=q+3|0;a[s>>0]=a[j+((a[i+(3?m>>3:m)>>0]|0)+o)>>0]|0;a[l>>0]=a[j+(t-p)>>0]|0}b=b+1|0}while((b|0)!=16);return}function Jd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;je(a+4|0,1,b,16,c,d,e);je(a+8|0,1,b,16,c,d,e);je(a+12|0,1,b,16,c,d,e);return}function Kd(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ke(a,1,c,8,d,e,f);ke(b,1,c,8,d,e,f);return}function Ld(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;je(a+4|0,1,c,8,d,e,f);je(b+4|0,1,c,8,d,e,f);return}function Md(a){a=a|0;var b=0,c=0;b=(d[a+-32>>0]|0)+4+(d[a+-1>>0]|0)+(d[a+-31>>0]|0)+(d[a+31>>0]|0)+(d[a+-30>>0]|0)+(d[a+63>>0]|0)+(d[a+-29>>0]|0)+(d[a+95>>0]|0)|0;c=(3?b>>>3:b)&255;Nf(a|0,c|0,4)|0;Nf(a+32|0,c|0,4)|0;Nf(a+64|0,c|0,4)|0;Nf(a+96|0,c|0,4)|0;return}function Nd(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=(c[2026]|0)+(0-(d[b+-33>>0]|0))|0;f=e+(d[b+-1>>0]|0)|0;g=d[b+-32>>0]|0;a[b>>0]=a[f+g>>0]|0;h=d[b+-31>>0]|0;a[b+1>>0]=a[f+h>>0]|0;i=d[b+-30>>0]|0;a[b+2>>0]=a[f+i>>0]|0;j=d[b+-29>>0]|0;a[b+3>>0]=a[f+j>>0]|0;f=e+(d[b+31>>0]|0)|0;a[b+32>>0]=a[f+g>>0]|0;a[b+33>>0]=a[f+h>>0]|0;a[b+34>>0]=a[f+i>>0]|0;a[b+35>>0]=a[f+j>>0]|0;f=e+(d[b+63>>0]|0)|0;a[b+64>>0]=a[f+g>>0]|0;a[b+65>>0]=a[f+h>>0]|0;a[b+66>>0]=a[f+i>>0]|0;a[b+67>>0]=a[f+j>>0]|0;f=e+(d[b+95>>0]|0)|0;a[b+96>>0]=a[f+g>>0]|0;a[b+97>>0]=a[f+h>>0]|0;a[b+98>>0]=a[f+i>>0]|0;a[b+99>>0]=a[f+j>>0]|0;return}function Od(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0;c=d[b+-32>>0]|0;e=d[b+-31>>0]|0;f=e+2|0;g=f+(d[b+-33>>0]|0)+(c<<1)|0;h=(2?g>>>2:g)&255;g=d[b+-30>>0]|0;i=g+2|0;j=i+c+(e<<1)|0;e=(2?j>>>2:j)&255;j=d[b+-29>>0]|0;c=f+(g<<1)+j|0;g=(2?c>>>2:c)&255;c=i+(j<<1)+(d[b+-28>>0]|0)|0;j=(2?c>>>2:c)&255;a[b>>0]=h;a[b+1>>0]=e;a[b+2>>0]=g;a[b+3>>0]=j;a[b+32>>0]=h;a[b+33>>0]=e;a[b+34>>0]=g;a[b+35>>0]=j;a[b+64>>0]=h;a[b+65>>0]=e;a[b+66>>0]=g;a[b+67>>0]=j;a[b+96>>0]=h;a[b+97>>0]=e;a[b+98>>0]=g;a[b+99>>0]=j;return}function Pd(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=d[b+-1>>0]|0;e=d[b+31>>0]|0;f=d[b+63>>0]|0;g=d[b+-33>>0]|0;h=d[b+-32>>0]|0;i=d[b+-31>>0]|0;j=d[b+-30>>0]|0;k=d[b+-29>>0]|0;l=e+2|0;m=l+(f<<1)+(d[b+95>>0]|0)|0;a[b+96>>0]=2?m>>>2:m;m=c+2|0;n=m+(e<<1)+f|0;f=(2?n>>>2:n)&255;a[b+64>>0]=f;a[b+97>>0]=f;f=l+(c<<1)+g|0;c=(2?f>>>2:f)&255;a[b+32>>0]=c;a[b+65>>0]=c;a[b+98>>0]=c;c=m+h+(g<<1)|0;m=(2?c>>>2:c)&255;a[b>>0]=m;a[b+33>>0]=m;a[b+66>>0]=m;a[b+99>>0]=m;m=g+2+i+(h<<1)|0;g=(2?m>>>2:m)&255;a[b+1>>0]=g;a[b+34>>0]=g;a[b+67>>0]=g;g=h+2+j+(i<<1)|0;h=(2?g>>>2:g)&255;a[b+2>>0]=h;a[b+35>>0]=h;h=i+2+k+(j<<1)|0;a[b+3>>0]=2?h>>>2:h;return}function Qd(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=d[b+-31>>0]|0;e=d[b+-30>>0]|0;f=d[b+-29>>0]|0;g=d[b+-28>>0]|0;h=d[b+-27>>0]|0;i=d[b+-26>>0]|0;j=d[b+-25>>0]|0;k=e+2|0;l=k+(d[b+-32>>0]|0)+(c<<1)|0;a[b>>0]=2?l>>>2:l;l=f+2|0;m=l+c+(e<<1)|0;e=(2?m>>>2:m)&255;a[b+32>>0]=e;a[b+1>>0]=e;e=k+(f<<1)+g|0;f=(2?e>>>2:e)&255;a[b+64>>0]=f;a[b+33>>0]=f;a[b+2>>0]=f;f=l+(g<<1)+h|0;l=(2?f>>>2:f)&255;a[b+96>>0]=l;a[b+65>>0]=l;a[b+34>>0]=l;a[b+3>>0]=l;l=g+2+(h<<1)+i|0;g=(2?l>>>2:l)&255;a[b+97>>0]=g;a[b+66>>0]=g;a[b+35>>0]=g;g=h+2+(i<<1)+j|0;h=(2?g>>>2:g)&255;a[b+98>>0]=h;a[b+67>>0]=h;h=i+2+j+(j<<1)|0;a[b+99>>0]=2?h>>>2:h;return}function Rd(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=d[b+-1>>0]|0;e=d[b+31>>0]|0;f=d[b+63>>0]|0;g=d[b+95>>0]|0;h=e+2|0;i=h+(d[b+-33>>0]|0)+(c<<1)|0;j=r((2?i>>>2:i)&255,16843009)|0;a[b>>0]=j;a[b+1>>0]=j>>8;a[b+2>>0]=j>>16;a[b+3>>0]=j>>24;j=b+32|0;i=f+2|0;k=i+c+(e<<1)|0;e=r((2?k>>>2:k)&255,16843009)|0;a[j>>0]=e;a[j+1>>0]=e>>8;a[j+2>>0]=e>>16;a[j+3>>0]=e>>24;e=b+64|0;j=h+(f<<1)+g|0;f=r((2?j>>>2:j)&255,16843009)|0;a[e>>0]=f;a[e+1>>0]=f>>8;a[e+2>>0]=f>>16;a[e+3>>0]=f>>24;f=b+96|0;b=i+g+(g<<1)|0;g=r((2?b>>>2:b)&255,16843009)|0;a[f>>0]=g;a[f+1>>0]=g>>8;a[f+2>>0]=g>>16;a[f+3>>0]=g>>24;return}function Sd(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=d[b+-1>>0]|0;e=d[b+31>>0]|0;f=d[b+63>>0]|0;g=d[b+-33>>0]|0;h=d[b+-32>>0]|0;i=d[b+-31>>0]|0;j=d[b+-30>>0]|0;k=d[b+-29>>0]|0;l=h+1|0;m=l+g|0;n=(1?m>>>1:m)&255;a[b+65>>0]=n;a[b>>0]=n;n=l+i|0;l=(1?n>>>1:n)&255;a[b+66>>0]=l;a[b+1>>0]=l;l=i+1+j|0;n=(1?l>>>1:l)&255;a[b+67>>0]=n;a[b+2>>0]=n;n=j+1+k|0;a[b+3>>0]=1?n>>>1:n;n=c+2|0;l=n+f+(e<<1)|0;a[b+96>>0]=2?l>>>2:l;l=g+2|0;f=l+e+(c<<1)|0;a[b+64>>0]=2?f>>>2:f;f=n+(g<<1)+h|0;g=(2?f>>>2:f)&255;a[b+97>>0]=g;a[b+32>>0]=g;g=l+(h<<1)+i|0;l=(2?g>>>2:g)&255;a[b+98>>0]=l;a[b+33>>0]=l;l=h+2+(i<<1)+j|0;h=(2?l>>>2:l)&255;a[b+99>>0]=h;a[b+34>>0]=h;h=i+2+(j<<1)+k|0;a[b+35>>0]=2?h>>>2:h;return}function Td(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=d[b+-32>>0]|0;e=d[b+-31>>0]|0;f=d[b+-30>>0]|0;g=d[b+-29>>0]|0;h=d[b+-28>>0]|0;i=d[b+-27>>0]|0;j=d[b+-26>>0]|0;k=d[b+-25>>0]|0;l=e+1|0;m=l+c|0;a[b>>0]=1?m>>>1:m;m=l+f|0;l=(1?m>>>1:m)&255;a[b+64>>0]=l;a[b+1>>0]=l;l=f+1+g|0;m=(1?l>>>1:l)&255;a[b+65>>0]=m;a[b+2>>0]=m;m=g+1+h|0;l=(1?m>>>1:m)&255;a[b+66>>0]=l;a[b+3>>0]=l;l=f+2|0;m=l+c+(e<<1)|0;a[b+32>>0]=2?m>>>2:m;m=g+2|0;c=m+e+(f<<1)|0;f=(2?c>>>2:c)&255;a[b+96>>0]=f;a[b+33>>0]=f;f=l+(g<<1)+h|0;g=(2?f>>>2:f)&255;a[b+97>>0]=g;a[b+34>>0]=g;g=m+(h<<1)+i|0;m=(2?g>>>2:g)&255;a[b+98>>0]=m;a[b+35>>0]=m;m=h+2+(i<<1)+j|0;a[b+67>>0]=2?m>>>2:m;m=i+2+(j<<1)+k|0;a[b+99>>0]=2?m>>>2:m;return}function Ud(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=d[b+-1>>0]|0;e=d[b+31>>0]|0;f=d[b+63>>0]|0;g=d[b+95>>0]|0;h=d[b+-33>>0]|0;i=d[b+-32>>0]|0;j=d[b+-31>>0]|0;k=d[b+-30>>0]|0;l=c+1|0;m=l+h|0;n=(1?m>>>1:m)&255;a[b+34>>0]=n;a[b>>0]=n;n=l+e|0;l=(1?n>>>1:n)&255;a[b+66>>0]=l;a[b+32>>0]=l;l=e+1+f|0;n=(1?l>>>1:l)&255;a[b+98>>0]=n;a[b+64>>0]=n;n=f+1+g|0;a[b+96>>0]=1?n>>>1:n;n=i+2+(j<<1)+k|0;a[b+3>>0]=2?n>>>2:n;n=h+2+(i<<1)+j|0;a[b+2>>0]=2?n>>>2:n;n=c+2|0;j=n+(h<<1)+i|0;i=(2?j>>>2:j)&255;a[b+35>>0]=i;a[b+1>>0]=i;i=e+2|0;j=i+(c<<1)+h|0;h=(2?j>>>2:j)&255;a[b+67>>0]=h;a[b+33>>0]=h;h=n+f+(e<<1)|0;e=(2?h>>>2:h)&255;a[b+99>>0]=e;a[b+65>>0]=e;e=i+g+(f<<1)|0;a[b+97>>0]=2?e>>>2:e;return}function Vd(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0;c=d[b+-1>>0]|0;e=d[b+31>>0]|0;f=d[b+63>>0]|0;g=a[b+95>>0]|0;h=g&255;i=e+1|0;j=i+c|0;a[b>>0]=1?j>>>1:j;j=i+f|0;i=(1?j>>>1:j)&255;a[b+32>>0]=i;a[b+2>>0]=i;i=f+1+h|0;j=(1?i>>>1:i)&255;a[b+64>>0]=j;a[b+34>>0]=j;j=f+2|0;i=j+c+(e<<1)|0;a[b+1>>0]=2?i>>>2:i;i=h+2+e+(f<<1)|0;f=(2?i>>>2:i)&255;a[b+33>>0]=f;a[b+3>>0]=f;f=j+h+(h<<1)|0;h=(2?f>>>2:f)&255;a[b+65>>0]=h;a[b+35>>0]=h;a[b+66>>0]=g;a[b+67>>0]=g;Nf(b+96|0,g|0,4)|0;return}function Wd(a){a=a|0;var b=0,c=0;b=(d[a+-1>>0]|0)+16+(d[a+-32>>0]|0)+(d[a+31>>0]|0)+(d[a+-31>>0]|0)+(d[a+63>>0]|0)+(d[a+-30>>0]|0)+(d[a+95>>0]|0)+(d[a+-29>>0]|0)+(d[a+127>>0]|0)+(d[a+-28>>0]|0)+(d[a+159>>0]|0)+(d[a+-27>>0]|0)+(d[a+191>>0]|0)+(d[a+-26>>0]|0)+(d[a+223>>0]|0)+(d[a+-25>>0]|0)+(d[a+255>>0]|0)+(d[a+-24>>0]|0)+(d[a+287>>0]|0)+(d[a+-23>>0]|0)+(d[a+319>>0]|0)+(d[a+-22>>0]|0)+(d[a+351>>0]|0)+(d[a+-21>>0]|0)+(d[a+383>>0]|0)+(d[a+-20>>0]|0)+(d[a+415>>0]|0)+(d[a+-19>>0]|0)+(d[a+447>>0]|0)+(d[a+-18>>0]|0)+(d[a+479>>0]|0)+(d[a+-17>>0]|0)|0;c=(5?b>>>5:b)&255;Nf(a|0,c|0,16)|0;Nf(a+32|0,c|0,16)|0;Nf(a+64|0,c|0,16)|0;Nf(a+96|0,c|0,16)|0;Nf(a+128|0,c|0,16)|0;Nf(a+160|0,c|0,16)|0;Nf(a+192|0,c|0,16)|0;Nf(a+224|0,c|0,16)|0;Nf(a+256|0,c|0,16)|0;Nf(a+288|0,c|0,16)|0;Nf(a+320|0,c|0,16)|0;Nf(a+352|0,c|0,16)|0;Nf(a+384|0,c|0,16)|0;Nf(a+416|0,c|0,16)|0;Nf(a+448|0,c|0,16)|0;Nf(a+480|0,c|0,16)|0;return}function Xd(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=b+-32|0;f=(c[2026]|0)+(0-(d[b+-33>>0]|0))|0;g=b+-31|0;h=b+-30|0;i=b+-29|0;j=b+-28|0;k=b+-27|0;l=b+-26|0;m=b+-25|0;n=b+-24|0;o=b+-23|0;p=b+-22|0;q=b+-21|0;r=b+-20|0;s=b+-19|0;t=b+-18|0;u=b+-17|0;v=b;b=0;while(1){w=f+(d[v+-1>>0]|0)|0;a[v>>0]=a[w+(d[e>>0]|0)>>0]|0;a[v+1>>0]=a[w+(d[g>>0]|0)>>0]|0;a[v+2>>0]=a[w+(d[h>>0]|0)>>0]|0;a[v+3>>0]=a[w+(d[i>>0]|0)>>0]|0;a[v+4>>0]=a[w+(d[j>>0]|0)>>0]|0;a[v+5>>0]=a[w+(d[k>>0]|0)>>0]|0;a[v+6>>0]=a[w+(d[l>>0]|0)>>0]|0;a[v+7>>0]=a[w+(d[m>>0]|0)>>0]|0;a[v+8>>0]=a[w+(d[n>>0]|0)>>0]|0;a[v+9>>0]=a[w+(d[o>>0]|0)>>0]|0;a[v+10>>0]=a[w+(d[p>>0]|0)>>0]|0;a[v+11>>0]=a[w+(d[q>>0]|0)>>0]|0;a[v+12>>0]=a[w+(d[r>>0]|0)>>0]|0;a[v+13>>0]=a[w+(d[s>>0]|0)>>0]|0;a[v+14>>0]=a[w+(d[t>>0]|0)>>0]|0;a[v+15>>0]=a[w+(d[u>>0]|0)>>0]|0;b=b+1|0;if((b|0)==16)break;else v=v+32|0}return}function Yd(b){b=b|0;var c=0,d=0,e=0,f=0;c=b+-32|0;d=b;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+32|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+64|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+96|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+128|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+160|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+192|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+224|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+256|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+288|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+320|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+352|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+384|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+416|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+448|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+480|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));return}function Zd(b){b=b|0;Nf(b|0,a[b+-1>>0]|0,16)|0;Nf(b+32|0,a[b+31>>0]|0,16)|0;Nf(b+64|0,a[b+63>>0]|0,16)|0;Nf(b+96|0,a[b+95>>0]|0,16)|0;Nf(b+128|0,a[b+127>>0]|0,16)|0;Nf(b+160|0,a[b+159>>0]|0,16)|0;Nf(b+192|0,a[b+191>>0]|0,16)|0;Nf(b+224|0,a[b+223>>0]|0,16)|0;Nf(b+256|0,a[b+255>>0]|0,16)|0;Nf(b+288|0,a[b+287>>0]|0,16)|0;Nf(b+320|0,a[b+319>>0]|0,16)|0;Nf(b+352|0,a[b+351>>0]|0,16)|0;Nf(b+384|0,a[b+383>>0]|0,16)|0;Nf(b+416|0,a[b+415>>0]|0,16)|0;Nf(b+448|0,a[b+447>>0]|0,16)|0;Nf(b+480|0,a[b+479>>0]|0,16)|0;return}function _d(a){a=a|0;var b=0,c=0;b=(d[a+-1>>0]|0)+8+(d[a+31>>0]|0)+(d[a+63>>0]|0)+(d[a+95>>0]|0)+(d[a+127>>0]|0)+(d[a+159>>0]|0)+(d[a+191>>0]|0)+(d[a+223>>0]|0)+(d[a+255>>0]|0)+(d[a+287>>0]|0)+(d[a+319>>0]|0)+(d[a+351>>0]|0)+(d[a+383>>0]|0)+(d[a+415>>0]|0)+(d[a+447>>0]|0)+(d[a+479>>0]|0)|0;c=(4?b>>>4:b)&255;Nf(a|0,c|0,16)|0;Nf(a+32|0,c|0,16)|0;Nf(a+64|0,c|0,16)|0;Nf(a+96|0,c|0,16)|0;Nf(a+128|0,c|0,16)|0;Nf(a+160|0,c|0,16)|0;Nf(a+192|0,c|0,16)|0;Nf(a+224|0,c|0,16)|0;Nf(a+256|0,c|0,16)|0;Nf(a+288|0,c|0,16)|0;Nf(a+320|0,c|0,16)|0;Nf(a+352|0,c|0,16)|0;Nf(a+384|0,c|0,16)|0;Nf(a+416|0,c|0,16)|0;Nf(a+448|0,c|0,16)|0;Nf(a+480|0,c|0,16)|0;return}function $d(a){a=a|0;var b=0,c=0;b=(d[a+-32>>0]|0)+8+(d[a+-31>>0]|0)+(d[a+-30>>0]|0)+(d[a+-29>>0]|0)+(d[a+-28>>0]|0)+(d[a+-27>>0]|0)+(d[a+-26>>0]|0)+(d[a+-25>>0]|0)+(d[a+-24>>0]|0)+(d[a+-23>>0]|0)+(d[a+-22>>0]|0)+(d[a+-21>>0]|0)+(d[a+-20>>0]|0)+(d[a+-19>>0]|0)+(d[a+-18>>0]|0)+(d[a+-17>>0]|0)|0;c=(4?b>>>4:b)&255;Nf(a|0,c|0,16)|0;Nf(a+32|0,c|0,16)|0;Nf(a+64|0,c|0,16)|0;Nf(a+96|0,c|0,16)|0;Nf(a+128|0,c|0,16)|0;Nf(a+160|0,c|0,16)|0;Nf(a+192|0,c|0,16)|0;Nf(a+224|0,c|0,16)|0;Nf(a+256|0,c|0,16)|0;Nf(a+288|0,c|0,16)|0;Nf(a+320|0,c|0,16)|0;Nf(a+352|0,c|0,16)|0;Nf(a+384|0,c|0,16)|0;Nf(a+416|0,c|0,16)|0;Nf(a+448|0,c|0,16)|0;Nf(a+480|0,c|0,16)|0;return}function ae(b){b=b|0;var c=0,d=0;c=b;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+32|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+64|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+96|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+128|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+160|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+192|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+224|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+256|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+288|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+320|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+352|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+384|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+416|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+448|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+480|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));return}function be(a){a=a|0;var b=0,c=0;b=(d[a+-32>>0]|0)+8+(d[a+-1>>0]|0)+(d[a+-31>>0]|0)+(d[a+31>>0]|0)+(d[a+-30>>0]|0)+(d[a+63>>0]|0)+(d[a+-29>>0]|0)+(d[a+95>>0]|0)+(d[a+-28>>0]|0)+(d[a+127>>0]|0)+(d[a+-27>>0]|0)+(d[a+159>>0]|0)+(d[a+-26>>0]|0)+(d[a+191>>0]|0)+(d[a+-25>>0]|0)+(d[a+223>>0]|0)|0;c=(4?b>>>4:b)&255;Nf(a|0,c|0,8)|0;Nf(a+32|0,c|0,8)|0;Nf(a+64|0,c|0,8)|0;Nf(a+96|0,c|0,8)|0;Nf(a+128|0,c|0,8)|0;Nf(a+160|0,c|0,8)|0;Nf(a+192|0,c|0,8)|0;Nf(a+224|0,c|0,8)|0;return}function ce(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;e=b+-32|0;f=(c[2026]|0)+(0-(d[b+-33>>0]|0))|0;g=f+(d[b+-1>>0]|0)|0;h=d[e>>0]|0;a[b>>0]=a[g+h>>0]|0;i=b+-31|0;j=d[i>>0]|0;a[b+1>>0]=a[g+j>>0]|0;k=b+-30|0;l=d[k>>0]|0;a[b+2>>0]=a[g+l>>0]|0;m=b+-29|0;n=d[m>>0]|0;a[b+3>>0]=a[g+n>>0]|0;o=b+-28|0;p=d[o>>0]|0;a[b+4>>0]=a[g+p>>0]|0;q=b+-27|0;r=d[q>>0]|0;a[b+5>>0]=a[g+r>>0]|0;s=b+-26|0;t=d[s>>0]|0;a[b+6>>0]=a[g+t>>0]|0;u=b+-25|0;v=d[u>>0]|0;a[b+7>>0]=a[g+v>>0]|0;g=f+(d[b+31>>0]|0)|0;a[b+32>>0]=a[g+h>>0]|0;a[b+33>>0]=a[g+j>>0]|0;a[b+34>>0]=a[g+l>>0]|0;a[b+35>>0]=a[g+n>>0]|0;a[b+36>>0]=a[g+p>>0]|0;a[b+37>>0]=a[g+r>>0]|0;a[b+38>>0]=a[g+t>>0]|0;a[b+39>>0]=a[g+v>>0]|0;g=f+(d[b+63>>0]|0)|0;a[b+64>>0]=a[g+h>>0]|0;a[b+65>>0]=a[g+j>>0]|0;a[b+66>>0]=a[g+l>>0]|0;a[b+67>>0]=a[g+n>>0]|0;a[b+68>>0]=a[g+p>>0]|0;a[b+69>>0]=a[g+r>>0]|0;a[b+70>>0]=a[g+t>>0]|0;a[b+71>>0]=a[g+v>>0]|0;v=f+(d[b+95>>0]|0)|0;g=d[e>>0]|0;a[b+96>>0]=a[v+g>>0]|0;t=d[i>>0]|0;a[b+97>>0]=a[v+t>>0]|0;r=d[k>>0]|0;a[b+98>>0]=a[v+r>>0]|0;p=d[m>>0]|0;a[b+99>>0]=a[v+p>>0]|0;n=d[o>>0]|0;a[b+100>>0]=a[v+n>>0]|0;l=d[q>>0]|0;a[b+101>>0]=a[v+l>>0]|0;j=d[s>>0]|0;a[b+102>>0]=a[v+j>>0]|0;h=d[u>>0]|0;a[b+103>>0]=a[v+h>>0]|0;v=f+(d[b+127>>0]|0)|0;a[b+128>>0]=a[v+g>>0]|0;a[b+129>>0]=a[v+t>>0]|0;a[b+130>>0]=a[v+r>>0]|0;a[b+131>>0]=a[v+p>>0]|0;a[b+132>>0]=a[v+n>>0]|0;a[b+133>>0]=a[v+l>>0]|0;a[b+134>>0]=a[v+j>>0]|0;a[b+135>>0]=a[v+h>>0]|0;h=f+(d[b+159>>0]|0)|0;a[b+160>>0]=a[h+g>>0]|0;a[b+161>>0]=a[h+t>>0]|0;a[b+162>>0]=a[h+(d[k>>0]|0)>>0]|0;a[b+163>>0]=a[h+(d[m>>0]|0)>>0]|0;a[b+164>>0]=a[h+(d[o>>0]|0)>>0]|0;a[b+165>>0]=a[h+(d[q>>0]|0)>>0]|0;a[b+166>>0]=a[h+(d[s>>0]|0)>>0]|0;a[b+167>>0]=a[h+(d[u>>0]|0)>>0]|0;h=f+(d[b+191>>0]|0)|0;a[b+192>>0]=a[h+(d[e>>0]|0)>>0]|0;a[b+193>>0]=a[h+(d[i>>0]|0)>>0]|0;a[b+194>>0]=a[h+(d[k>>0]|0)>>0]|0;a[b+195>>0]=a[h+(d[m>>0]|0)>>0]|0;a[b+196>>0]=a[h+(d[o>>0]|0)>>0]|0;a[b+197>>0]=a[h+(d[q>>0]|0)>>0]|0;a[b+198>>0]=a[h+(d[s>>0]|0)>>0]|0;a[b+199>>0]=a[h+(d[u>>0]|0)>>0]|0;h=f+(d[b+223>>0]|0)|0;a[b+224>>0]=a[h+(d[e>>0]|0)>>0]|0;a[b+225>>0]=a[h+(d[i>>0]|0)>>0]|0;a[b+226>>0]=a[h+(d[k>>0]|0)>>0]|0;a[b+227>>0]=a[h+(d[m>>0]|0)>>0]|0;a[b+228>>0]=a[h+(d[o>>0]|0)>>0]|0;a[b+229>>0]=a[h+(d[q>>0]|0)>>0]|0;a[b+230>>0]=a[h+(d[s>>0]|0)>>0]|0;a[b+231>>0]=a[h+(d[u>>0]|0)>>0]|0;return}function de(b){b=b|0;var c=0,e=0,f=0,g=0;c=b+-32|0;e=c;f=d[e>>0]|d[e+1>>0]<<8|d[e+2>>0]<<16|d[e+3>>0]<<24;e=c+4|0;c=d[e>>0]|d[e+1>>0]<<8|d[e+2>>0]<<16|d[e+3>>0]<<24;e=b;g=e;a[g>>0]=f;a[g+1>>0]=f>>8;a[g+2>>0]=f>>16;a[g+3>>0]=f>>24;g=e+4|0;a[g>>0]=c;a[g+1>>0]=c>>8;a[g+2>>0]=c>>16;a[g+3>>0]=c>>24;g=b+32|0;e=g;a[e>>0]=f;a[e+1>>0]=f>>8;a[e+2>>0]=f>>16;a[e+3>>0]=f>>24;e=g+4|0;a[e>>0]=c;a[e+1>>0]=c>>8;a[e+2>>0]=c>>16;a[e+3>>0]=c>>24;e=b+64|0;g=e;a[g>>0]=f;a[g+1>>0]=f>>8;a[g+2>>0]=f>>16;a[g+3>>0]=f>>24;g=e+4|0;a[g>>0]=c;a[g+1>>0]=c>>8;a[g+2>>0]=c>>16;a[g+3>>0]=c>>24;g=b+96|0;e=g;a[e>>0]=f;a[e+1>>0]=f>>8;a[e+2>>0]=f>>16;a[e+3>>0]=f>>24;e=g+4|0;a[e>>0]=c;a[e+1>>0]=c>>8;a[e+2>>0]=c>>16;a[e+3>>0]=c>>24;e=b+128|0;g=e;a[g>>0]=f;a[g+1>>0]=f>>8;a[g+2>>0]=f>>16;a[g+3>>0]=f>>24;g=e+4|0;a[g>>0]=c;a[g+1>>0]=c>>8;a[g+2>>0]=c>>16;a[g+3>>0]=c>>24;g=b+160|0;e=g;a[e>>0]=f;a[e+1>>0]=f>>8;a[e+2>>0]=f>>16;a[e+3>>0]=f>>24;e=g+4|0;a[e>>0]=c;a[e+1>>0]=c>>8;a[e+2>>0]=c>>16;a[e+3>>0]=c>>24;e=b+192|0;g=e;a[g>>0]=f;a[g+1>>0]=f>>8;a[g+2>>0]=f>>16;a[g+3>>0]=f>>24;g=e+4|0;a[g>>0]=c;a[g+1>>0]=c>>8;a[g+2>>0]=c>>16;a[g+3>>0]=c>>24;g=b+224|0;b=g;a[b>>0]=f;a[b+1>>0]=f>>8;a[b+2>>0]=f>>16;a[b+3>>0]=f>>24;f=g+4|0;a[f>>0]=c;a[f+1>>0]=c>>8;a[f+2>>0]=c>>16;a[f+3>>0]=c>>24;return}function ee(b){b=b|0;Nf(b|0,a[b+-1>>0]|0,8)|0;Nf(b+32|0,a[b+31>>0]|0,8)|0;Nf(b+64|0,a[b+63>>0]|0,8)|0;Nf(b+96|0,a[b+95>>0]|0,8)|0;Nf(b+128|0,a[b+127>>0]|0,8)|0;Nf(b+160|0,a[b+159>>0]|0,8)|0;Nf(b+192|0,a[b+191>>0]|0,8)|0;Nf(b+224|0,a[b+223>>0]|0,8)|0;return}function fe(a){a=a|0;var b=0,c=0;b=(d[a+-1>>0]|0)+4+(d[a+31>>0]|0)+(d[a+63>>0]|0)+(d[a+95>>0]|0)+(d[a+127>>0]|0)+(d[a+159>>0]|0)+(d[a+191>>0]|0)+(d[a+223>>0]|0)|0;c=(3?b>>>3:b)&255;Nf(a|0,c|0,8)|0;Nf(a+32|0,c|0,8)|0;Nf(a+64|0,c|0,8)|0;Nf(a+96|0,c|0,8)|0;Nf(a+128|0,c|0,8)|0;Nf(a+160|0,c|0,8)|0;Nf(a+192|0,c|0,8)|0;Nf(a+224|0,c|0,8)|0;return}function ge(a){a=a|0;var b=0,c=0;b=(d[a+-32>>0]|0)+4+(d[a+-31>>0]|0)+(d[a+-30>>0]|0)+(d[a+-29>>0]|0)+(d[a+-28>>0]|0)+(d[a+-27>>0]|0)+(d[a+-26>>0]|0)+(d[a+-25>>0]|0)|0;c=(3?b>>>3:b)&255;Nf(a|0,c|0,8)|0;Nf(a+32|0,c|0,8)|0;Nf(a+64|0,c|0,8)|0;Nf(a+96|0,c|0,8)|0;Nf(a+128|0,c|0,8)|0;Nf(a+160|0,c|0,8)|0;Nf(a+192|0,c|0,8)|0;Nf(a+224|0,c|0,8)|0;return}function he(b){b=b|0;var c=0,d=0;c=b;d=c;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=c+4|0;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=b+32|0;c=d;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=d+4|0;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=b+64|0;d=c;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=c+4|0;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=b+96|0;c=d;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=d+4|0;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=b+128|0;d=c;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=c+4|0;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=b+160|0;c=d;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=d+4|0;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=b+192|0;d=c;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=c+4|0;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=b+224|0;b=d;a[b>>0]=-2139062144;a[b+1>>0]=-2139062144>>8;a[b+2>>0]=-2139062144>>16;a[b+3>>0]=-2139062144>>24;b=d+4|0;a[b>>0]=-2139062144;a[b+1>>0]=-2139062144>>8;a[b+2>>0]=-2139062144>>16;a[b+3>>0]=-2139062144>>24;return}function ie(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((e|0)==1){f=c;g=0;h=b;i=a[c+6>>0]|0;while(1){j=(d[h>>0]|0)+-120|0;k=(4?j>>4:j)+(d[f>>0]|0)|0;a[f>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;k=(d[h+1>>0]|0)+-120|0;j=f+1|0;l=(4?k>>4:k)+(d[j>>0]|0)|0;a[j>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=(d[h+2>>0]|0)+-120|0;j=f+2|0;k=(4?l>>4:l)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;k=(d[h+3>>0]|0)+-120|0;j=f+3|0;l=(4?k>>4:k)+(d[j>>0]|0)|0;a[j>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=(d[h+4>>0]|0)+-120|0;j=f+4|0;k=(4?l>>4:l)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;k=(d[h+5>>0]|0)+-120|0;j=f+5|0;l=(4?k>>4:k)+(d[j>>0]|0)|0;a[j>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=(d[h+6>>0]|0)+-120|0;j=(4?l>>4:l)+(i&255)|0;a[f+6>>0]=j>>>0>255?(31?j>>>31:j)+255|0:j;j=(d[h+7>>0]|0)+-120|0;l=f+7|0;k=(4?j>>4:j)+(d[l>>0]|0)|0;i=(k>>>0>255?(31?k>>>31:k)+255|0:k)&255;a[l>>0]=i;g=g+1|0;if((g|0)==8)break;else{f=f+e|0;h=h+8|0}}return}else{h=c;c=0;f=b;while(1){b=(d[f>>0]|0)+-120|0;g=(4?b>>4:b)+(d[h>>0]|0)|0;a[h>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=(d[f+1>>0]|0)+-120|0;b=h+1|0;i=(4?g>>4:g)+(d[b>>0]|0)|0;a[b>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=(d[f+2>>0]|0)+-120|0;b=h+2|0;g=(4?i>>4:i)+(d[b>>0]|0)|0;a[b>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=(d[f+3>>0]|0)+-120|0;b=h+3|0;i=(4?g>>4:g)+(d[b>>0]|0)|0;a[b>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=(d[f+4>>0]|0)+-120|0;b=h+4|0;g=(4?i>>4:i)+(d[b>>0]|0)|0;a[b>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=(d[f+5>>0]|0)+-120|0;b=h+5|0;i=(4?g>>4:g)+(d[b>>0]|0)|0;a[b>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=(d[f+6>>0]|0)+-120|0;b=h+6|0;g=(4?i>>4:i)+(d[b>>0]|0)|0;a[b>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=(d[f+7>>0]|0)+-120|0;b=h+7|0;i=(4?g>>4:g)+(d[b>>0]|0)|0;a[b>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;c=c+1|0;if((c|0)==8)break;else{h=h+e|0;f=f+8|0}}return}}function je(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;k=h<<1|1;if((g|0)<=0)return;h=r(e,-3)|0;l=r(e,-2)|0;m=0-e|0;n=e<<1;o=e*3|0;p=c[2027]|0;q=r(e,-4)|0;s=c[2024]|0;t=c[2025]|0;u=c[2026]|0;v=b;b=g;while(1){g=b;b=b+-1|0;w=d[v+h>>0]|0;x=v+l|0;y=d[x>>0]|0;z=v+m|0;A=d[z>>0]|0;B=d[v>>0]|0;C=v+e|0;D=d[C>>0]|0;E=d[v+n>>0]|0;F=d[v+o>>0]|0;G=y-D|0;do if((((((((d[p+(A-B)>>0]<<2)+(d[p+G>>0]|0)|0)<=(k|0)?(d[p+((d[v+q>>0]|0)-w)>>0]|0)<=(i|0):0)?(d[p+(w-y)>>0]|0)<=(i|0):0)?(H=d[p+(y-A)>>0]|0,(H|0)<=(i|0)):0)?(d[p+(F-E)>>0]|0)<=(i|0):0)?(d[p+(E-D)>>0]|0)<=(i|0):0)?(I=d[p+(D-B)>>0]|0,(I|0)<=(i|0)):0){J=(B-A|0)*3|0;if((H|0)>(j|0)|(I|0)>(j|0)){I=J+(a[s+G>>0]|0)|0;H=I+4|0;K=a[t+(3?H>>3:H)>>0]|0;H=I+3|0;a[z>>0]=a[u+((a[t+(3?H>>3:H)>>0]|0)+A)>>0]|0;a[v>>0]=a[u+(B-K)>>0]|0;break}else{K=J+4|0;H=a[t+(3?K>>3:K)>>0]|0;K=J+3|0;J=a[t+(3?K>>3:K)>>0]|0;K=H+1|0;I=1?K>>1:K;a[x>>0]=a[u+(I+y)>>0]|0;a[z>>0]=a[u+(J+A)>>0]|0;a[v>>0]=a[u+(B-H)>>0]|0;a[C>>0]=a[u+(D-I)>>0]|0;break}}while(0);if((g|0)<=1)break;else v=v+f|0}return}function ke(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;k=h<<1|1;if((g|0)<=0)return;h=r(e,-3)|0;l=r(e,-2)|0;m=0-e|0;n=e<<1;o=e*3|0;p=c[2027]|0;q=r(e,-4)|0;s=c[2024]|0;t=c[2025]|0;u=c[2026]|0;v=b;b=g;while(1){g=b;b=b+-1|0;w=v+h|0;x=d[w>>0]|0;y=v+l|0;z=d[y>>0]|0;A=v+m|0;B=d[A>>0]|0;C=d[v>>0]|0;D=v+e|0;E=d[D>>0]|0;F=v+n|0;G=d[F>>0]|0;H=d[v+o>>0]|0;I=z-E|0;do if((((((((d[p+(B-C)>>0]<<2)+(d[p+I>>0]|0)|0)<=(k|0)?(d[p+((d[v+q>>0]|0)-x)>>0]|0)<=(i|0):0)?(d[p+(x-z)>>0]|0)<=(i|0):0)?(J=d[p+(z-B)>>0]|0,(J|0)<=(i|0)):0)?(d[p+(H-G)>>0]|0)<=(i|0):0)?(d[p+(G-E)>>0]|0)<=(i|0):0)?(K=d[p+(E-C)>>0]|0,(K|0)<=(i|0)):0){L=((C-B|0)*3|0)+(a[s+I>>0]|0)|0;if((J|0)>(j|0)|(K|0)>(j|0)){K=L+4|0;J=a[t+(3?K>>3:K)>>0]|0;K=L+3|0;a[A>>0]=a[u+((a[t+(3?K>>3:K)>>0]|0)+B)>>0]|0;a[v>>0]=a[u+(C-J)>>0]|0;break}else{J=a[s+L>>0]|0;L=(J*27|0)+63|0;K=7?L>>7:L;L=(J*18|0)+63|0;M=7?L>>7:L;L=(J*9|0)+63|0;J=7?L>>7:L;a[w>>0]=a[u+(J+x)>>0]|0;a[y>>0]=a[u+(M+z)>>0]|0;a[A>>0]=a[u+(K+B)>>0]|0;a[v>>0]=a[u+(C-K)>>0]|0;a[D>>0]=a[u+(E-M)>>0]|0;a[F>>0]=a[u+(G-J)>>0]|0;break}}while(0);if((g|0)<=1)break;else v=v+f|0}return}function le(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=Y;Y=Y+64|0;h=g;i=b[e>>1]|0;j=b[e+16>>1]|0;k=j+i|0;l=i-j|0;j=b[e+8>>1]|0;i=j*35468|0;m=b[e+24>>1]|0;n=m*20091|0;o=(16?i>>16:i)-m-(16?n>>16:n)|0;n=j*20091|0;i=m*35468|0;m=(16?n>>16:n)+j+(16?i>>16:i)|0;c[h>>2]=m+k;i=h+4|0;c[i>>2]=o+l;c[h+8>>2]=l-o;c[h+12>>2]=k-m;m=b[e+2>>1]|0;k=b[e+18>>1]|0;o=k+m|0;l=m-k|0;k=b[e+10>>1]|0;m=k*35468|0;j=b[e+26>>1]|0;n=j*20091|0;p=(16?m>>16:m)-j-(16?n>>16:n)|0;n=k*20091|0;m=j*35468|0;j=(16?n>>16:n)+k+(16?m>>16:m)|0;m=j+o|0;c[h+16>>2]=m;c[h+20>>2]=p+l;c[h+24>>2]=l-p;c[h+28>>2]=o-j;j=b[e+4>>1]|0;o=b[e+20>>1]|0;p=o+j|0;l=j-o|0;o=b[e+12>>1]|0;j=o*35468|0;k=b[e+28>>1]|0;n=k*20091|0;q=(16?j>>16:j)-k-(16?n>>16:n)|0;n=o*20091|0;j=k*35468|0;k=(16?n>>16:n)+o+(16?j>>16:j)|0;j=k+p|0;c[h+32>>2]=j;c[h+36>>2]=q+l;c[h+40>>2]=l-q;c[h+44>>2]=p-k;k=b[e+6>>1]|0;p=b[e+22>>1]|0;q=p+k|0;l=k-p|0;p=b[e+14>>1]|0;k=p*35468|0;o=b[e+30>>1]|0;e=o*20091|0;n=(16?k>>16:k)-o-(16?e>>16:e)|0;e=p*20091|0;k=o*35468|0;o=(16?e>>16:e)+p+(16?k>>16:k)|0;k=o+q|0;c[h+48>>2]=k;p=n+l|0;c[h+52>>2]=p;c[h+56>>2]=l-n;c[h+60>>2]=q-o;o=(c[h>>2]|0)+4|0;q=o+j|0;n=o-j|0;j=m*35468|0;o=k*20091|0;l=(16?j>>16:j)-k-(16?o>>16:o)|0;o=m*20091|0;j=k*35468|0;k=(16?o>>16:o)+m+(16?j>>16:j)|0;j=k+q|0;m=(3?j>>3:j)+(d[f>>0]|0)|0;a[f>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=f+1|0;j=l+n|0;o=(3?j>>3:j)+(d[m>>0]|0)|0;a[m>>0]=o>>>0>255?(31?o>>>31:o)+255|0:o;o=f+2|0;m=n-l|0;l=(3?m>>3:m)+(d[o>>0]|0)|0;a[o>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=f+3|0;o=q-k|0;k=(3?o>>3:o)+(d[l>>0]|0)|0;a[l>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;k=f+32|0;l=(c[i>>2]|0)+4|0;i=c[h+36>>2]|0;o=l+i|0;q=l-i|0;i=c[h+20>>2]|0;l=i*35468|0;m=p*20091|0;n=(16?l>>16:l)-p-(16?m>>16:m)|0;m=i*20091|0;l=p*35468|0;p=(16?m>>16:m)+i+(16?l>>16:l)|0;l=p+o|0;i=(3?l>>3:l)+(d[k>>0]|0)|0;a[k>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=f+33|0;k=n+q|0;l=(3?k>>3:k)+(d[i>>0]|0)|0;a[i>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=f+34|0;i=q-n|0;n=(3?i>>3:i)+(d[l>>0]|0)|0;a[l>>0]=n>>>0>255?(31?n>>>31:n)+255|0:n;n=f+35|0;l=o-p|0;p=(3?l>>3:l)+(d[n>>0]|0)|0;a[n>>0]=p>>>0>255?(31?p>>>31:p)+255|0:p;p=f+64|0;n=(c[h+8>>2]|0)+4|0;l=c[h+40>>2]|0;o=n+l|0;i=n-l|0;l=c[h+24>>2]|0;n=l*35468|0;q=c[h+56>>2]|0;k=q*20091|0;m=(16?n>>16:n)-q-(16?k>>16:k)|0;k=l*20091|0;n=q*35468|0;q=(16?k>>16:k)+l+(16?n>>16:n)|0;n=q+o|0;l=(3?n>>3:n)+(d[p>>0]|0)|0;a[p>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=f+65|0;p=m+i|0;n=(3?p>>3:p)+(d[l>>0]|0)|0;a[l>>0]=n>>>0>255?(31?n>>>31:n)+255|0:n;n=f+66|0;l=i-m|0;m=(3?l>>3:l)+(d[n>>0]|0)|0;a[n>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=f+67|0;n=o-q|0;q=(3?n>>3:n)+(d[m>>0]|0)|0;a[m>>0]=q>>>0>255?(31?q>>>31:q)+255|0:q;q=f+96|0;m=(c[h+12>>2]|0)+4|0;n=c[h+44>>2]|0;o=m+n|0;l=m-n|0;n=c[h+28>>2]|0;m=n*35468|0;i=c[h+60>>2]|0;h=i*20091|0;p=(16?m>>16:m)-i-(16?h>>16:h)|0;h=n*20091|0;m=i*35468|0;i=(16?h>>16:h)+n+(16?m>>16:m)|0;m=i+o|0;n=(3?m>>3:m)+(d[q>>0]|0)|0;a[q>>0]=n>>>0>255?(31?n>>>31:n)+255|0:n;n=f+97|0;q=p+l|0;m=(3?q>>3:q)+(d[n>>0]|0)|0;a[n>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=f+98|0;n=l-p|0;p=(3?n>>3:n)+(d[m>>0]|0)|0;a[m>>0]=p>>>0>255?(31?p>>>31:p)+255|0:p;p=f+99|0;f=o-i|0;i=(3?f>>3:f)+(d[p>>0]|0)|0;a[p>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;Y=g;return}function me(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;if((a|0)==0|(d|0)==0|(e&-256|0)!=512){f=2;return f|0}e=d;g=e+40|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f=ne(a,b,d,d+4|0,d+8|0,d+12|0,d+16|0,0)|0;return f|0}function ne(a,b,e,f,g,h,i,j){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,aa=0;k=Y;Y=Y+16|0;l=k+4|0;m=k;n=a;c[l>>2]=0;c[m>>2]=0;o=(j|0)!=0;if(o)p=c[j+8>>2]|0;else p=0;if((a|0)==0|b>>>0<12){q=7;Y=k;return q|0}if(!(af(a,8828,4)|0)){if(af(a+8|0,8833,4)|0){q=3;Y=k;return q|0}s=(d[a+5>>0]|0)<<8|(d[a+4>>0]|0)|((d[a+7>>0]|0)<<8|(d[a+6>>0]|0))<<16;if((s+-12|0)>>>0>4294967274){q=3;Y=k;return q|0}t=b+-12|0;if(t>>>0<8|(p|0)!=0&s>>>0>(b+-8|0)>>>0){q=7;Y=k;return q|0}else{u=t;v=a+12|0;w=s;x=1}}else{u=b;v=n;w=0;x=0}s=v;if(!(af(s,8838,4)|0)){if(((d[s+5>>0]|0)<<8|(d[s+4>>0]|0)|((d[s+7>>0]|0)<<8|(d[s+6>>0]|0))<<16|0)!=10){q=3;Y=k;return q|0}if(u>>>0<18){q=7;Y=k;return q|0}a=d[s+8>>0]|0;t=((d[s+13>>0]|0)<<8|(d[s+12>>0]|0)|(d[s+14>>0]|0)<<16)+1|0;y=((d[s+16>>0]|0)<<8|(d[s+15>>0]|0)|(d[s+17>>0]|0)<<16)+1|0;z=r(t,y)|0;A=(y|0)==0;if(A?0:((z>>>0)/((A?1:y)>>>0)|0|0)!=(t|0)){q=3;Y=k;return q|0}A=a&2;if(x){B=a;C=1;D=y;E=t;F=u+-18|0;G=1?A>>>1:A;H=s+18|0;I=(A|0)!=0;J=1}else{q=3;Y=k;return q|0}}else{B=0;C=0;D=0;E=0;F=u;G=0;H=v;I=0;J=0}v=(g|0)==0;if(!v)c[g>>2]=(4?B>>>4:B)&1;if(h|0)c[h>>2]=G;h=(i|0)==0;if(!h)c[i>>2]=0;c[l>>2]=E;c[m>>2]=D;B=(j|0)==0;a:do if(!(B&(J&I))){b:do if(F>>>0>=4){if(!(x&(C|0)!=0))if((C|w|0)==0?(u=H,(af(u,8843,4)|0)==0):0){K=u;L=25}else{M=F;N=H;O=0;P=0}else{K=H;L=25}c:do if((L|0)==25){if(F>>>0<8){Q=0;break b}if(!w){u=K;A=F;s=H;t=0;y=0;while(1){a=(d[u+5>>0]|0)<<8|(d[u+4>>0]|0)|((d[u+7>>0]|0)<<8|(d[u+6>>0]|0))<<16;if(a>>>0>4294967286){q=3;break}z=a+9&-2;if(!(af(u,8848,4)|0)){M=A;N=s;O=t;P=y;break c}if(!(af(u,8853,4)|0)){M=A;N=s;O=t;P=y;break c}if(A>>>0>>0){Q=y;break b}R=(af(u,8843,4)|0)==0;S=R?u+8|0:y;T=u+z|0;U=A-z|0;if(U>>>0<8){Q=S;break b}else{u=T;A=U;s=T;t=R?a:t;y=S}}Y=k;return q|0}y=K;t=22;s=F;A=H;u=0;S=0;while(1){a=(d[y+5>>0]|0)<<8|(d[y+4>>0]|0)|((d[y+7>>0]|0)<<8|(d[y+6>>0]|0))<<16;if(a>>>0>4294967286){q=3;L=65;break}R=a+9&-2;T=R+t|0;if(T>>>0>w>>>0){q=3;L=65;break}if(!(af(y,8848,4)|0)){M=s;N=A;O=u;P=S;break c}if(!(af(y,8853,4)|0)){M=s;N=A;O=u;P=S;break c}if(s>>>0>>0){Q=S;break b}U=(af(y,8843,4)|0)==0;z=U?y+8|0:S;V=y+R|0;W=s-R|0;if(W>>>0<8){Q=z;break b}else{y=V;t=T;s=W;A=V;u=U?a:u;S=z}}if((L|0)==65){Y=k;return q|0}}while(0);S=N;u=(af(S,8853,4)|0)==0;A=u&1;if(M>>>0<8)Q=P;else{if(u|(af(S,8848,4)|0)==0){u=(d[S+5>>0]|0)<<8|(d[S+4>>0]|0)|((d[S+7>>0]|0)<<8|(d[S+6>>0]|0))<<16;if(w>>>0>11&u>>>0>(w+-12|0)>>>0){q=3;Y=k;return q|0}s=M+-8|0;if((p|0)!=0&u>>>0>s>>>0){Q=P;break}X=s;Z=S+8|0;_=u;$=A}else{X=M;Z=N;_=M;$=oe(S,M)|0}if(_>>>0>4294967286){q=3;Y=k;return q|0}if(!(h|(G|0)!=0))c[i>>2]=($|0)==0?1:2;if(!$){if(X>>>0<10){Q=P;break}if(!(pe(Z,X,_,l,m)|0)){q=3;Y=k;return q|0}}else{if(X>>>0<5){Q=P;break}if(!(qe(Z,X,l,m,g)|0)){q=3;Y=k;return q|0}}if(C|0?!((E|0)==(c[l>>2]|0)?(D|0)==(c[m>>2]|0):0):0){q=3;Y=k;return q|0}if(!o){aa=P;break a}c[j>>2]=n;c[j+4>>2]=b;S=j+8|0;c[S>>2]=0;c[S+4>>2]=0;c[j+16>>2]=P;c[j+20>>2]=O;c[j+24>>2]=_;c[j+28>>2]=w;c[j+32>>2]=$;c[j+12>>2]=Z-n;aa=P;break a}}else Q=0;while(0);if(B&(C|0)!=0)aa=Q;else{q=7;Y=k;return q|0}}else aa=0;while(0);if(!v)c[g>>2]=c[g>>2]|(aa|0)!=0;if(e|0)c[e>>2]=c[l>>2];if(!f){q=0;Y=k;return q|0}c[f>>2]=c[m>>2];q=0;Y=k;return q|0}function oe(b,c){b=b|0;c=c|0;var e=0;if(c>>>0<=4){e=0;return e|0}if((a[b>>0]|0)!=47){e=0;return e|0}e=(d[b+4>>0]|0)<32&1;return e|0}function pe(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0;if((b|0)==0|e>>>0<10){i=0;return i|0}if((a[b+3>>0]|0)!=-99){i=0;return i|0}if((a[b+4>>0]|0)!=1){i=0;return i|0}if((a[b+5>>0]|0)!=42){i=0;return i|0}e=d[b>>0]|0;j=d[b+1>>0]<<8|e|d[b+2>>0]<<16;k=d[b+7>>0]<<8&16128|d[b+6>>0];l=d[b+9>>0]<<8&16128|d[b+8>>0];if(!((e&25|0)==16&(5?j>>>5:j)>>>0>>0)){i=0;return i|0}if((k|0)==0|(l|0)==0){i=0;return i|0}if(g|0)c[g>>2]=k;if(!h){i=1;return i|0}c[h>>2]=l;i=1;return i|0}function qe(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0;i=Y;Y=Y+32|0;j=i;if((b|0)==0|e>>>0<5){k=0;Y=i;return k|0}if((a[b>>0]|0)!=47){k=0;Y=i;return k|0}if((d[b+4>>0]|0)>31){k=0;Y=i;return k|0}$a(j,b,e);if(((Ga(j,8)|0)==47?(e=(Ga(j,14)|0)+1|0,b=(Ga(j,14)|0)+1|0,l=Ga(j,1)|0,(Ga(j,3)|0)==0):0)?(c[j+24>>2]|0)==0:0){if(f|0)c[f>>2]=e;if(g|0)c[g>>2]=b;if(!h)m=1;else{c[h>>2]=l;m=1}}else m=0;k=m;Y=i;return k|0}function re(a){a=a|0;var b=0;if(!a)return;b=(ed()|0)+20|0;ea[c[b>>2]&31](a+124|0);oa(a);b=a+2288|0;pa(c[b>>2]|0);c[b>>2]=0;c[a+2292>>2]=0;b=a+12|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;c[a+4>>2]=0;pa(a);return}function se(){var a=0,b=0;a=va(1,0,2376)|0;if(!a)return a|0;c[a>>2]=0;c[a+8>>2]=8858;b=ed()|0;ea[c[b>>2]&31](a+124|0);c[a+4>>2]=0;c[a+312>>2]=0;if(c[2549]|0)return a|0;c[2549]=1;return a|0}function te(){var a=0,b=0;a=va(1,0,272)|0;if(!a){b=0;return b|0}c[a>>2]=0;c[a+4>>2]=2;_a();b=a;return b|0}function ue(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;if(!e){g=0;return g|0}c[e>>2]=0;h=e+8|0;c[h>>2]=8858;if(!f){c[e>>2]=2;c[h>>2]=8861;c[e+4>>2]=0;g=0;return g|0}i=c[f+64>>2]|0;j=c[f+60>>2]|0;if(j>>>0<4){c[e>>2]=7;c[h>>2]=8898;c[e+4>>2]=0;g=0;return g|0}k=d[i>>0]|0;l=d[i+1>>0]<<8|k|d[i+2>>0]<<16;m=(k&1^1)&255;n=e+40|0;a[n>>0]=m;o=(1?k>>>1:k)&7;a[e+41>>0]=o;p=(4?k>>>4:k)&1;a[e+42>>0]=p;k=5?l>>>5:l;l=e+44|0;c[l>>2]=k;if((o&255)>3){c[e>>2]=3;c[h>>2]=8916;c[e+4>>2]=0;g=0;return g|0}if(!(p<<24>>24)){c[e>>2]=4;c[h>>2]=8947;c[e+4>>2]=0;g=0;return g|0}p=i+3|0;o=j+-3|0;do if(!(m<<24>>24)){q=p;r=o;s=k}else{if(o>>>0<7){c[e>>2]=7;c[h>>2]=8970;c[e+4>>2]=0;g=0;return g|0}if(((a[p>>0]|0)==-99?(a[i+4>>0]|0)==1:0)?(a[i+5>>0]|0)==42:0){t=i+7|0;u=d[t>>0]<<8&16128|d[i+6>>0];b[e+48>>1]=u;v=a[t>>0]|0;a[e+52>>0]=6?(v&255)>>>6:v&255;v=i+9|0;t=d[v>>0]<<8&16128|d[i+8>>0];b[e+50>>1]=t;w=a[v>>0]|0;a[e+53>>0]=6?(w&255)>>>6:w&255;w=u+15|0;c[e+288>>2]=4?w>>>4:w;w=t+15|0;c[e+292>>2]=4?w>>>4:w;c[f>>2]=u;c[f+4>>2]=t;c[f+72>>2]=0;c[f+84>>2]=0;c[f+76>>2]=0;c[f+80>>2]=u;c[f+88>>2]=t;c[f+92>>2]=0;c[f+96>>2]=u;c[f+100>>2]=t;c[f+12>>2]=u;c[f+16>>2]=t;De(e+904|0);c[e+104>>2]=0;c[e+108>>2]=0;c[e+112>>2]=1;c[e+116>>2]=0;c[e+120>>2]=0;q=i+10|0;r=j+-10|0;s=c[l>>2]|0;break}c[e>>2]=3;c[h>>2]=8998;c[e+4>>2]=0;g=0;return g|0}while(0);if(s>>>0>r>>>0){if(c[e>>2]|0){g=0;return g|0}c[e>>2]=7;c[h>>2]=9012;c[e+4>>2]=0;g=0;return g|0}j=e+12|0;Ee(j,q,s);s=c[l>>2]|0;l=q+s|0;i=r-s|0;if(a[n>>0]|0){s=(Fe(j,1)|0)&255;a[e+54>>0]=s;s=(Fe(j,1)|0)&255;a[e+55>>0]=s}s=Fe(j,1)|0;c[e+104>>2]=s;if(s){s=Fe(j,1)|0;f=e+108|0;c[f>>2]=s;if(Fe(j,1)|0){s=Fe(j,1)|0;c[e+112>>2]=s;if(!(Fe(j,1)|0))x=0;else x=(Ge(j,7)|0)&255;a[e+116>>0]=x;if(!(Fe(j,1)|0))y=0;else y=(Ge(j,7)|0)&255;a[e+117>>0]=y;if(!(Fe(j,1)|0))z=0;else z=(Ge(j,7)|0)&255;a[e+118>>0]=z;if(!(Fe(j,1)|0))A=0;else A=(Ge(j,7)|0)&255;a[e+119>>0]=A;if(!(Fe(j,1)|0))B=0;else B=(Ge(j,6)|0)&255;a[e+120>>0]=B;if(!(Fe(j,1)|0))C=0;else C=(Ge(j,6)|0)&255;a[e+121>>0]=C;if(!(Fe(j,1)|0))D=0;else D=(Ge(j,6)|0)&255;a[e+122>>0]=D;if(!(Fe(j,1)|0))E=0;else E=(Ge(j,6)|0)&255;a[e+123>>0]=E}if(c[f>>2]|0){if(!(Fe(j,1)|0))F=-1;else F=(Fe(j,8)|0)&255;a[e+904>>0]=F;if(!(Fe(j,1)|0))G=-1;else G=(Fe(j,8)|0)&255;a[e+905>>0]=G;if(!(Fe(j,1)|0))H=-1;else H=(Fe(j,8)|0)&255;a[e+906>>0]=H}}else c[e+108>>2]=0;H=e+36|0;if(c[H>>2]|0){if(c[e>>2]|0){g=0;return g|0}c[e>>2]=3;c[h>>2]=9033;c[e+4>>2]=0;g=0;return g|0}G=Fe(j,1)|0;F=e+56|0;c[F>>2]=G;G=Fe(j,6)|0;f=e+60|0;c[f>>2]=G;G=Fe(j,3)|0;c[e+64>>2]=G;G=Fe(j,1)|0;c[e+68>>2]=G;do if(G|0?Fe(j,1)|0:0){if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+72>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+76>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+80>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+84>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+88>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+92>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+96>>2]=E}if(!(Fe(j,1)|0))break;E=Ge(j,6)|0;c[e+100>>2]=E}while(0);if(!(c[f>>2]|0))I=0;else I=(c[F>>2]|0)==0?2:1;c[e+2308>>2]=I;if(c[H>>2]|0){if(c[e>>2]|0){g=0;return g|0}c[e>>2]=3;c[h>>2]=9061;c[e+4>>2]=0;g=0;return g|0}H=q+r|0;r=(1<<(Fe(j,2)|0))+-1|0;c[e+312>>2]=r;q=r*3|0;if(i>>>0>=q>>>0){I=l+q|0;F=i-q|0;if(!r){J=F;K=I}else{q=0;i=F;F=I;I=l;while(1){l=d[I+1>>0]<<8|d[I>>0]|d[I+2>>0]<<16;f=l>>>0>i>>>0?i:l;Ee(e+316+(q*28|0)|0,F,f);l=F+f|0;G=i-f|0;q=q+1|0;if((q|0)==(r|0)){J=G;K=l;break}else{i=G;F=l;I=I+3|0}}}Ee(e+316+(r*28|0)|0,K,J);if(K>>>0>>0){He(e);if(a[n>>0]|0){Fe(j,1)|0;Ie(j,e);c[e+4>>2]=1;g=1;return g|0}if(c[e>>2]|0){g=0;return g|0}c[e>>2]=4;c[h>>2]=9112;c[e+4>>2]=0;g=0;return g|0}else L=5}else L=7;if(c[e>>2]|0){g=0;return g|0}c[e>>2]=L;c[h>>2]=9088;c[e+4>>2]=0;g=0;return g|0}function ve(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0;f=e+288|0;if((c[f>>2]|0)<=0){g=e+36|0;h=c[g>>2]|0;i=(h|0)==0;j=i&1;return j|0}k=e+2244|0;l=e+2248|0;m=e+2304|0;n=e+108|0;o=e+2236|0;p=e+904|0;q=b+4|0;t=b+8|0;u=e+2240|0;v=b+12|0;w=b+20|0;x=e+906|0;y=e+905|0;z=0;do{A=(c[k>>2]|0)+(z<<2)|0;B=c[m>>2]|0;if(!(c[n>>2]|0))C=0;else{D=d[p>>0]|0;E=c[q>>2]|0;F=c[t>>2]|0;do if((F|0)<0){G=c[v>>2]|0;if(G>>>0<(c[w>>2]|0)>>>0){H=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;c[v>>2]=G+3;G=Kf(H|0)|0;c[b>>2]=c[b>>2]<<24|(8?G>>>8:G);G=F+24|0;c[t>>2]=G;I=G;break}else{Ce(b);I=c[t>>2]|0;break}}else I=F;while(0);F=r(E,D)|0;G=8?F>>>8:F;F=c[b>>2]|0;H=(I?F>>>I:F)>>>0>G>>>0;if(H){J=F-(G+1<>2]=J;K=E-G|0;L=J}else{K=G+1|0;L=F}F=(s(K|0)|0)^24;G=I-F|0;c[t>>2]=G;J=(K<>2]=J;if(H){H=d[x>>0]|0;do if((G|0)<0){F=c[v>>2]|0;if(F>>>0<(c[w>>2]|0)>>>0){M=d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24;c[v>>2]=F+3;F=Kf(M|0)|0;M=(8?F>>>8:F)|L<<24;c[b>>2]=M;F=G+24|0;c[t>>2]=F;N=M;O=F;break}else{Ce(b);N=c[b>>2]|0;O=c[t>>2]|0;break}}else{N=L;O=G}while(0);E=r(J,H)|0;D=8?E>>>8:E;E=(O?N>>>O:N)>>>0>D>>>0;if(E){c[b>>2]=N-(D+1<>2]=O-D;c[q>>2]=(P<>0]|0;do if((G|0)<0){D=c[v>>2]|0;if(D>>>0<(c[w>>2]|0)>>>0){F=d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24;c[v>>2]=D+3;D=Kf(F|0)|0;F=(8?D>>>8:D)|L<<24;c[b>>2]=F;D=G+24|0;c[t>>2]=D;R=F;S=D;break}else{Ce(b);R=c[b>>2]|0;S=c[t>>2]|0;break}}else{R=L;S=G}while(0);G=r(J,E)|0;H=8?G>>>8:G;G=(S?R>>>S:R)>>>0>H>>>0;if(G){c[b>>2]=R-(H+1<>2]=S-H;c[q>>2]=(T<>0]=C;if(!(c[o>>2]|0)){U=c[t>>2]|0;V=c[q>>2]|0}else{G=d[u>>0]|0;H=c[q>>2]|0;D=c[t>>2]|0;do if((D|0)<0){F=c[v>>2]|0;if(F>>>0<(c[w>>2]|0)>>>0){M=d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24;c[v>>2]=F+3;F=Kf(M|0)|0;c[b>>2]=c[b>>2]<<24|(8?F>>>8:F);F=D+24|0;c[t>>2]=F;W=F;break}else{Ce(b);W=c[t>>2]|0;break}}else W=D;while(0);D=r(H,G)|0;J=8?D>>>8:D;D=c[b>>2]|0;E=(W?D>>>W:D)>>>0>J>>>0;if(E){c[b>>2]=D-(J+1<>2]=D;F=(X<>2]=F;a[B+(z*800|0)+797>>0]=E&1;U=D;V=F}do if((U|0)<0){F=c[v>>2]|0;if(F>>>0<(c[w>>2]|0)>>>0){D=d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24;c[v>>2]=F+3;F=Kf(D|0)|0;c[b>>2]=c[b>>2]<<24|(8?F>>>8:F);F=U+24|0;c[t>>2]=F;Y=F;break}else{Ce(b);Y=c[t>>2]|0;break}}else Y=U;while(0);H=V*145|0;G=8?H>>>8:H;H=c[b>>2]|0;F=(Y?H>>>Y:H)>>>0>G>>>0;if(F){D=H-(G+1<>2]=D;Z=V-G|0;_=D}else{Z=G+1|0;_=H}H=(s(Z|0)|0)^24;G=Y-H|0;c[t>>2]=G;D=(Z<>2]=D;a[B+(z*800|0)+768>>0]=(F^1)&1;if(F){do if((G|0)<0){F=c[v>>2]|0;if(F>>>0<(c[w>>2]|0)>>>0){H=d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24;c[v>>2]=F+3;F=Kf(H|0)|0;H=(8?F>>>8:F)|_<<24;c[b>>2]=H;F=G+24|0;c[t>>2]=F;$=H;aa=F;break}else{Ce(b);$=c[b>>2]|0;aa=c[t>>2]|0;break}}else{$=_;aa=G}while(0);G=D*156|0;F=8?G>>>8:G;G=(aa?$>>>aa:$)>>>0>F>>>0;if(G){H=$-(F+1<>2]=H;ba=D-F|0;ca=H}else{ba=F+1|0;ca=$}F=(s(ba|0)|0)^24;H=aa-F|0;c[t>>2]=H;E=(ba<>2]=E;F=(H|0)<0;if(G){do if(F){G=c[v>>2]|0;if(G>>>0<(c[w>>2]|0)>>>0){J=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;c[v>>2]=G+3;G=Kf(J|0)|0;J=(8?G>>>8:G)|ca<<24;c[b>>2]=J;G=H+24|0;c[t>>2]=G;da=J;ea=G;break}else{Ce(b);da=c[b>>2]|0;ea=c[t>>2]|0;break}}else{da=ca;ea=H}while(0);D=(1?E>>>1:E)&16777215;G=(ea?da>>>ea:da)>>>0>D>>>0;if(G){c[b>>2]=da-(D+1<>2]=ea-D;c[q>>2]=(fa<>2]|0;if(G>>>0<(c[w>>2]|0)>>>0){D=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;c[v>>2]=G+3;G=Kf(D|0)|0;D=(8?G>>>8:G)|ca<<24;c[b>>2]=D;G=H+24|0;c[t>>2]=G;ha=D;ia=G;break}else{Ce(b);ha=c[b>>2]|0;ia=c[t>>2]|0;break}}else{ha=ca;ia=H}while(0);H=E*163|0;F=8?H>>>8:H;H=(ia?ha>>>ia:ha)>>>0>F>>>0;if(H){c[b>>2]=ha-(F+1<>2]=ia-F;c[q>>2]=(ja<>0]=H;Nf(A|0,H|0,4)|0;Nf(l|0,H|0,4)|0}else{H=B+(z*800|0)+769|0;F=0;while(1){G=e+2248+F|0;D=0;J=d[G>>0]|0;do{M=A+D|0;ka=d[M>>0]|0;la=d[4144+(ka*90|0)+(J*9|0)>>0]|0;ma=c[q>>2]|0;na=c[t>>2]|0;do if((na|0)<0){oa=c[v>>2]|0;if(oa>>>0<(c[w>>2]|0)>>>0){pa=d[oa>>0]|d[oa+1>>0]<<8|d[oa+2>>0]<<16|d[oa+3>>0]<<24;c[v>>2]=oa+3;oa=Kf(pa|0)|0;c[b>>2]=c[b>>2]<<24|(8?oa>>>8:oa);oa=na+24|0;c[t>>2]=oa;qa=oa;break}else{Ce(b);qa=c[t>>2]|0;break}}else qa=na;while(0);na=r(ma,la)|0;oa=8?na>>>8:na;na=c[b>>2]|0;pa=(qa?na>>>qa:na)>>>0>oa>>>0;ra=pa&1;if(pa){pa=na-(oa+1<>2]=pa;sa=ma-oa|0;ta=pa}else{sa=oa+1|0;ta=na}na=(s(sa|0)|0)^24;oa=qa-na|0;c[t>>2]=oa;pa=(sa<>2]=pa;na=a[5056+ra>>0]|0;if(!((ra?41706>>>ra:41706)&1))ua=na;else{ra=na;na=oa;oa=ta;va=pa;while(1){pa=ra<<1;wa=d[4144+(ka*90|0)+(J*9|0)+ra>>0]|0;do if((na|0)<0){xa=c[v>>2]|0;if(xa>>>0<(c[w>>2]|0)>>>0){ya=d[xa>>0]|d[xa+1>>0]<<8|d[xa+2>>0]<<16|d[xa+3>>0]<<24;c[v>>2]=xa+3;xa=Kf(ya|0)|0;ya=(8?xa>>>8:xa)|oa<<24;c[b>>2]=ya;xa=na+24|0;c[t>>2]=xa;za=ya;Aa=xa;break}else{Ce(b);za=c[b>>2]|0;Aa=c[t>>2]|0;break}}else{za=oa;Aa=na}while(0);xa=r(va,wa)|0;ya=8?xa>>>8:xa;xa=(Aa?za>>>Aa:za)>>>0>ya>>>0;if(xa){Ba=za-(ya+1<>2]=Ba;Ca=va-ya|0;Da=Ba}else{Ca=ya+1|0;Da=za}ya=(s(Ca|0)|0)^24;na=Aa-ya|0;c[t>>2]=na;va=(Ca<>2]=va;ya=pa|xa&1;Ea=a[5056+ya>>0]|0;if(!((ya?41706>>>ya:41706)&1))break;else{ra=Ea<<24>>24;oa=Da}}ua=Ea<<24>>24}J=0-ua|0;Fa=J&255;a[M>>0]=Fa;D=D+1|0}while((D|0)!=4);D=d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24;a[H>>0]=D;a[H+1>>0]=D>>8;a[H+2>>0]=D>>16;a[H+3>>0]=D>>24;a[G>>0]=Fa;F=F+1|0;if((F|0)==4)break;else H=H+4|0}}H=c[q>>2]|0;F=c[t>>2]|0;do if((F|0)<0){A=c[v>>2]|0;if(A>>>0<(c[w>>2]|0)>>>0){E=d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24;c[v>>2]=A+3;A=Kf(E|0)|0;c[b>>2]=c[b>>2]<<24|(8?A>>>8:A);A=F+24|0;c[t>>2]=A;Ga=A;break}else{Ce(b);Ga=c[t>>2]|0;break}}else Ga=F;while(0);F=H*142|0;A=8?F>>>8:F;F=c[b>>2]|0;E=(Ga?F>>>Ga:F)>>>0>A>>>0;if(E){D=F-(A+1<>2]=D;Ha=H-A|0;Ia=D}else{Ha=A+1|0;Ia=F}F=(s(Ha|0)|0)^24;A=Ga-F|0;c[t>>2]=A;D=(Ha<>2]=D;if(E){do if((A|0)<0){E=c[v>>2]|0;if(E>>>0<(c[w>>2]|0)>>>0){F=d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24;c[v>>2]=E+3;E=Kf(F|0)|0;F=(8?E>>>8:E)|Ia<<24;c[b>>2]=F;E=A+24|0;c[t>>2]=E;Ja=F;Ka=E;break}else{Ce(b);Ja=c[b>>2]|0;Ka=c[t>>2]|0;break}}else{Ja=Ia;Ka=A}while(0);A=D*114|0;H=8?A>>>8:A;A=(Ka?Ja>>>Ka:Ja)>>>0>H>>>0;if(A){E=Ja-(H+1<>2]=E;La=D-H|0;Ma=E}else{La=H+1|0;Ma=Ja}H=(s(La|0)|0)^24;E=Ka-H|0;c[t>>2]=E;F=(La<>2]=F;if(A){do if((E|0)<0){A=c[v>>2]|0;if(A>>>0<(c[w>>2]|0)>>>0){H=d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24;c[v>>2]=A+3;A=Kf(H|0)|0;H=(8?A>>>8:A)|Ma<<24;c[b>>2]=H;A=E+24|0;c[t>>2]=A;Na=H;Oa=A;break}else{Ce(b);Na=c[b>>2]|0;Oa=c[t>>2]|0;break}}else{Na=Ma;Oa=E}while(0);E=F*183|0;D=8?E>>>8:E;E=(Oa?Na>>>Oa:Na)>>>0>D>>>0;if(E){c[b>>2]=Na-(D+1<>2]=Oa-D;c[q>>2]=(Pa<>0]=Qa;z=z+1|0}while((z|0)<(c[f>>2]|0));g=e+36|0;h=c[g>>2]|0;i=(h|0)==0;j=i&1;return j|0}function we(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;g=Y;Y=Y+32|0;h=g;i=c[e+2256>>2]|0;j=e+2296|0;k=c[j>>2]|0;l=i+(k<<1)|0;m=c[e+2304>>2]|0;if((c[e+2236>>2]|0)!=0?(n=a[m+(k*800|0)+797>>0]|0,o=n&255,n<<24>>24!=0):0){a[l>>0]=0;a[i+-2>>0]=0;if(!(a[m+(k*800|0)+768>>0]|0)){a[i+(k<<1)+1>>0]=0;a[i+-1>>0]=0}c[m+(k*800|0)+788>>2]=0;c[m+(k*800|0)+792>>2]=0;a[m+(k*800|0)+796>>0]=0;p=o}else{o=m+(k*800|0)|0;n=d[m+(k*800|0)+798>>0]|0;Nf(o|0,0,768)|0;if(!(a[m+(k*800|0)+768>>0]|0)){c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;c[h+16>>2]=0;c[h+20>>2]=0;c[h+24>>2]=0;c[h+28>>2]=0;q=i+(k<<1)+1|0;r=i+-1|0;s=da[c[2549]&1](f,e+2032|0,(d[r>>0]|0)+(d[q>>0]|0)|0,e+776+(n<<5)+8|0,0,h)|0;t=(s|0)>0&1;a[r>>0]=t;a[q>>0]=t;if((s|0)>1)ud(h,o);else{s=(b[h>>1]|0)+3|0;h=(3?s>>3:s)&65535;b[m+(k*800|0)>>1]=h;b[m+(k*800|0)+32>>1]=h;b[m+(k*800|0)+64>>1]=h;b[m+(k*800|0)+96>>1]=h;b[m+(k*800|0)+128>>1]=h;b[m+(k*800|0)+160>>1]=h;b[m+(k*800|0)+192>>1]=h;b[m+(k*800|0)+224>>1]=h;b[m+(k*800|0)+256>>1]=h;b[m+(k*800|0)+288>>1]=h;b[m+(k*800|0)+320>>1]=h;b[m+(k*800|0)+352>>1]=h;b[m+(k*800|0)+384>>1]=h;b[m+(k*800|0)+416>>1]=h;b[m+(k*800|0)+448>>1]=h;b[m+(k*800|0)+480>>1]=h}u=1;v=0}else{u=0;v=3}h=e+1964+(v*68|0)|0;v=i+-2|0;i=e+776+(n<<5)|0;s=o;o=a[l>>0]&15;t=a[v>>0]&15;q=0;r=0;while(1){w=t&255;x=o&255;y=da[c[2549]&1](f,h,(w&1)+(x&1)|0,i,u,s)|0;z=(y|0)>(u|0)&1;A=1?x>>>1:x;x=z<<7|A;B=(b[s>>1]|0)!=0&1;C=s+32|0;D=da[c[2549]&1](f,h,(A&1)+z|0,i,u,C)|0;z=(D|0)>(u|0)&1;A=1?x>>>1:x;x=z<<7|A;E=((D|0)>3?3:(D|0)>1?2:(b[C>>1]|0)!=0&1)|((y|0)>3?12:(y|0)>1?8:B<<2);B=s+64|0;y=da[c[2549]&1](f,h,(A&1)+z|0,i,u,B)|0;z=(y|0)>(u|0)&1;A=1?x>>>1:x;x=((y|0)>3?3:(y|0)>1?2:(b[B>>1]|0)!=0&1)|E<<2;E=s+96|0;B=z<<7|A&224;y=da[c[2549]&1](f,h,(A&1)+z|0,i,u,E)|0;z=((y|0)>(u|0)&1)<<7;A=(z|(1?B>>>1:B))&255;o=4?(A&255)>>>4:A&255;F=z|(1?w>>>1:w);q=x<<2|q<<8|((y|0)>3?3:(y|0)>1?2:(b[E>>1]|0)!=0&1);r=r+1|0;if((r|0)==4)break;else{s=s+128|0;t=F&255}}t=m+(k*800|0)+512|0;s=e+2100|0;r=e+776+(n<<5)+16|0;u=d[l>>0]|0;i=d[v>>0]|0;h=da[c[2549]&1](f,s,((4?i>>>4:i)&1)+((4?u>>>4:u)&1)|0,r,0,t)|0;E=(h|0)>0&1;y=(b[t>>1]|0)!=0&1;t=m+(k*800|0)+544|0;x=da[c[2549]&1](f,s,((5?u>>>5:u)&1)+E|0,r,0,t)|0;u=(x|0)>0&1;w=((x|0)>3?3:(x|0)>1?2:(b[t>>1]|0)!=0&1)|((h|0)>3?12:(h|0)>1?8:y<<2);y=m+(k*800|0)+576|0;h=da[c[2549]&1](f,s,((5?i>>>5:i)&1)+E|0,r,0,y)|0;E=(h|0)>0&1;i=((h|0)>3?3:(h|0)>1?2:(b[y>>1]|0)!=0&1)|w<<2;w=m+(k*800|0)+608|0;y=da[c[2549]&1](f,s,E+u|0,r,0,w)|0;h=(y|0)>0&1;t=((y|0)>3?3:(y|0)>1?2:(b[w>>1]|0)!=0&1)|i<<2;i=m+(k*800|0)+640|0;w=d[l>>0]|0;y=d[v>>0]|0;x=da[c[2549]&1](f,s,((6?y>>>6:y)&1)+((6?w>>>6:w)&1)|0,r,0,i)|0;z=(x|0)>0&1;A=(b[i>>1]|0)!=0&1;i=m+(k*800|0)+672|0;B=da[c[2549]&1](f,s,(7?w>>>7:w)+z|0,r,0,i)|0;w=(B|0)>0&1;C=((B|0)>3?3:(B|0)>1?2:(b[i>>1]|0)!=0&1)|((x|0)>3?12:(x|0)>1?8:A<<2);A=m+(k*800|0)+704|0;x=da[c[2549]&1](f,s,(7?y>>>7:y)+z|0,r,0,A)|0;z=(x|0)>0&1;y=((x|0)>3?3:(x|0)>1?2:(b[A>>1]|0)!=0&1)|C<<2;C=m+(k*800|0)+736|0;A=da[c[2549]&1](f,s,z+w|0,r,0,C)|0;r=(A|0)>0&1;s=t|(((A|0)>3?3:(A|0)>1?2:(b[C>>1]|0)!=0&1)|y<<2)<<8;a[l>>0]=(h<<1|E)<<4|o&255|(r<<1|z)<<6;a[v>>0]=u<<4|(4?F>>>4:F)|h<<5|w<<6|r<<7;c[m+(k*800|0)+788>>2]=q;c[m+(k*800|0)+792>>2]=s;if(!(s&43690))G=c[e+776+(n<<5)+28>>2]&255;else G=0;a[m+(k*800|0)+796>>0]=G;p=(s|q|0)==0&1}if((c[e+2308>>2]|0)<=0){H=f+24|0;I=c[H>>2]|0;J=(I|0)==0;K=J&1;Y=g;return K|0}q=c[e+2260>>2]|0;s=c[j>>2]|0;j=q+(s<<2)|0;G=e+2312+(d[m+(k*800|0)+798>>0]<<3)+(d[m+(k*800|0)+768>>0]<<2)|0;k=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;a[j>>0]=k;a[j+1>>0]=k>>8;a[j+2>>0]=k>>16;a[j+3>>0]=k>>24;k=q+(s<<2)+2|0;a[k>>0]=d[k>>0]|(p|0)==0;H=f+24|0;I=c[H>>2]|0;J=(I|0)==0;K=J&1;Y=g;return K|0}function xe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if(!a){d=0;return d|0}if(!b){c[a>>2]=2;d=0;return d|0}c[a+8>>2]=b;c[a>>2]=0;e=a+24|0;$a(e,c[b+64>>2]|0,c[b+60>>2]|0);if(((Ga(e,8)|0)==47?(f=(Ga(e,14)|0)+1|0,g=(Ga(e,14)|0)+1|0,Ga(e,1)|0,(Ga(e,3)|0)==0):0)?(c[a+48>>2]|0)==0:0){c[a+4>>2]=2;c[b>>2]=f;c[b+4>>2]=g;if(ab(f,g,1,a,0)|0){d=1;return d|0}ra(a);d=0;return d|0}c[a>>2]=3;ra(a);d=0;return d|0}function ye(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0;if(!a){b=0;return b|0}d=c[a+8>>2]|0;e=c[d+40>>2]|0;f=a+4|0;a:do if(!(c[f>>2]|0)){g=a+16|0;h=a+100|0;i=a+104|0;j=23}else{k=a+12|0;c[k>>2]=c[e>>2];if(!(Ub(c[e+20>>2]|0,d,3)|0)){c[a>>2]=2;break}l=c[d>>2]|0;m=a+100|0;n=c[m>>2]|0;o=a+104|0;p=c[o>>2]|0;q=Cf(p|0,((p|0)<0)<<31>>31|0,n|0,((n|0)<0)<<31>>31|0)|0;n=v()|0;p=l&65535;r=Jf(l|0,((l|0)<0)<<31>>31|0,4)|0;l=Df(r|0,v()|0,p|0,0)|0;r=Df(l|0,v()|0,q|0,n|0)|0;n=wa(r,v()|0,4)|0;r=a+16|0;c[r>>2]=n;if(!n){c[a>>2]=1;c[a+20>>2]=0;break}c[a+20>>2]=n+(q<<2)+(p<<2);p=d+92|0;do if(c[p>>2]|0){q=c[d+12>>2]|0;n=c[d+96>>2]|0;l=c[d+16>>2]|0;s=c[d+100>>2]|0;t=((n|0)<0)<<31>>31;u=Jf(n|0,t|0,5)|0;w=Df(u|0,v()|0,84,0)|0;x=v()|0;y=Jf(n|0,t|0,2)|0;t=Df(w|0,x|0,y|0,v()|0)|0;y=wa(t,v()|0,1)|0;if(y){c[a+264>>2]=y;c[a+268>>2]=y;t=y+84|0;Wb(y,q,l,t+u|0,n,s,0,4,t);if(!(c[p>>2]|0)){j=12;break}else{j=13;break}}else{c[a>>2]=1;break a}}else j=12;while(0);if((j|0)==12){p=c[c[k>>2]>>2]|0;if((p+-7|0)>>>0>3)z=p;else j=13}if((j|0)==13){Da();z=c[c[k>>2]>>2]|0}if(z>>>0>10?(ze(),c[(c[k>>2]|0)+28>>2]|0):0)Da();if(((c[a+56>>2]|0?(c[a+120>>2]|0)>0:0)?(p=a+136|0,(c[p>>2]|0)==0):0)?(db(p,c[a+132>>2]|0)|0)==0:0){c[a>>2]=1;break}c[f>>2]=0;g=r;h=m;i=o;j=23}while(0);if((j|0)==23?Ia(a,c[g>>2]|0,c[h>>2]|0,c[i>>2]|0,c[d+88>>2]|0,2)|0:0){c[e+16>>2]=c[a+116>>2];b=1;return b|0}ra(a);b=0;return b|0}function ze(){if(Te(10168)|0)return;c[2042]=0;Ue(10168)|0;return}function Ae(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)<=0)return;f=0;do{g=c[b+(f<<2)>>2]|0;h=((g&255)*6420|0)+1081344+(((16?g>>>16:g)&255)*16839|0)+(((8?g>>>8:g)&255)*33059|0)|0;a[d+f>>0]=16?h>>>16:h;f=f+1|0}while((f|0)!=(e|0));return}function Be(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;i=1?g>>1:g;if((g|0)>1)if(!h){j=0;while(1){k=j<<1;l=c[b+(k<<2)>>2]|0;m=c[b+((k|1)<<2)>>2]|0;k=((15?m>>>15:m)&510)+((15?l>>>15:l)&510)|0;n=((7?m>>>7:m)&510)+((7?l>>>7:l)&510)|0;o=(m<<1&510)+(l<<1&510)|0;l=(r(n,-19081)|0)+(r(k,-9719)|0)+(o*28800|0)|0;m=l+33685504|0;p=18?m>>18:m;m=(r(n,-24116)|0)+(k*28800|0)+(r(o,-4684)|0)|0;o=m+33685504|0;k=18?o>>18:o;o=e+j|0;n=(p>>>0<256?p:(l|0)<-33685504?0:255)+1+(d[o>>0]|0)|0;a[o>>0]=1?n>>>1:n;n=f+j|0;o=(k>>>0<256?k:(m|0)<-33685504?0:255)+1+(d[n>>0]|0)|0;a[n>>0]=1?o>>>1:o;o=j+1|0;if((o|0)<(i|0))j=o;else{q=o;break}}}else{j=0;while(1){o=j<<1;n=c[b+(o<<2)>>2]|0;m=c[b+((o|1)<<2)>>2]|0;o=((15?m>>>15:m)&510)+((15?n>>>15:n)&510)|0;k=((7?m>>>7:m)&510)+((7?n>>>7:n)&510)|0;l=(m<<1&510)+(n<<1&510)|0;n=(r(k,-19081)|0)+(r(o,-9719)|0)+(l*28800|0)|0;m=n+33685504|0;p=18?m>>18:m;m=(r(k,-24116)|0)+(o*28800|0)+(r(l,-4684)|0)|0;l=m+33685504|0;o=18?l>>18:l;a[e+j>>0]=p>>>0<256?p:(n|0)<-33685504?0:255;a[f+j>>0]=o>>>0<256?o:(m|0)<-33685504?0:255;m=j+1|0;if((m|0)<(i|0))j=m;else{q=m;break}}}else q=0;if(!(g&1))return;g=c[b+(q<<1<<2)>>2]|0;b=(14?g>>>14:g)&1020;j=(6?g>>>6:g)&1020;i=g<<2&1020;g=(r(j,-19081)|0)+(r(b,-9719)|0)+(i*28800|0)|0;m=g+33685504|0;o=18?m>>18:m;m=o>>>0<256?o:(g|0)<-33685504?0:255;g=(r(j,-24116)|0)+(b*28800|0)+(r(i,-4684)|0)|0;i=g+33685504|0;b=18?i>>18:i;i=b>>>0<256?b:(g|0)<-33685504?0:255;if(!h){h=e+q|0;g=m+1+(d[h>>0]|0)|0;a[h>>0]=1?g>>>1:g;g=f+q|0;h=i+1+(d[g>>0]|0)|0;a[g>>0]=1?h>>>1:h;return}else{a[e+q>>0]=m;a[f+q>>0]=i;return}}function Ce(a){a=a|0;var b=0,e=0,f=0;b=a+12|0;e=c[b>>2]|0;if(e>>>0<(c[a+16>>2]|0)>>>0){f=a+8|0;c[f>>2]=(c[f>>2]|0)+8;c[b>>2]=e+1;c[a>>2]=c[a>>2]<<8|(d[e>>0]|0);return}e=a+24|0;if(!(c[e>>2]|0)){c[a>>2]=c[a>>2]<<8;b=a+8|0;c[b>>2]=(c[b>>2]|0)+8;c[e>>2]=1;return}else{c[a+8>>2]=0;return}}function De(c){c=c|0;b[c>>1]=65535;a[c+2>>0]=255;return}function Ee(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;c[a+4>>2]=254;c[a>>2]=0;f=a+8|0;c[f>>2]=-8;g=a+24|0;c[g>>2]=0;h=a+12|0;c[h>>2]=b;i=b+e|0;c[a+16>>2]=i;j=e>>>0>3?i+-4+1|0:b;c[a+20>>2]=j;if(j>>>0>b>>>0){j=d[b>>0]|d[b+1>>0]<<8|d[b+2>>0]<<16|d[b+3>>0]<<24;c[h>>2]=b+3;i=Kf(j|0)|0;c[a>>2]=8?i>>>8:i;c[f>>2]=16;return}if((e|0)>0){c[f>>2]=0;c[h>>2]=b+1;c[a>>2]=d[b>>0];return}else{c[a>>2]=0;c[f>>2]=0;c[g>>2]=1;return}}function Fe(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0,u=0;if((b|0)<=0){e=0;return e|0}f=a+4|0;g=a+8|0;h=a+12|0;i=a+20|0;j=a+16|0;k=a+24|0;l=0;m=b;b=c[g>>2]|0;n=c[f>>2]|0;while(1){o=m;m=m+-1|0;do if((b|0)<0){p=c[h>>2]|0;if(p>>>0<(c[i>>2]|0)>>>0){q=d[p>>0]|d[p+1>>0]<<8|d[p+2>>0]<<16|d[p+3>>0]<<24;c[h>>2]=p+3;r=Kf(q|0)|0;c[a>>2]=c[a>>2]<<24|(8?r>>>8:r);r=b+24|0;c[g>>2]=r;t=r;break}if(p>>>0<(c[j>>2]|0)>>>0){r=b+8|0;c[g>>2]=r;c[h>>2]=p+1;c[a>>2]=c[a>>2]<<8|(d[p>>0]|0);t=r;break}if(!(c[k>>2]|0)){c[a>>2]=c[a>>2]<<8;r=b+8|0;c[g>>2]=r;c[k>>2]=1;t=r;break}else{c[g>>2]=0;t=0;break}}else t=b;while(0);r=(1?n>>>1:n)&16777215;p=c[a>>2]|0;q=(t?p>>>t:p)>>>0>r>>>0;if(q){c[a>>2]=p-(r+1<>2]=b;n=(u<>2]=n;r=(q&1)<>2]|0)==0;o=0;do{if(n)if(!o){p=g;q=16}else{r=b+776+(o<<5)|0;c[r>>2]=c[m>>2];c[r+4>>2]=c[m+4>>2];c[r+8>>2]=c[m+8>>2];c[r+12>>2]=c[m+12>>2];c[r+16>>2]=c[m+16>>2];c[r+20>>2]=c[m+20>>2];c[r+24>>2]=c[m+24>>2];c[r+28>>2]=c[m+28>>2]}else{p=((c[f>>2]|0)==0?g:0)+(a[b+116+o>>0]|0)|0;q=16}if((q|0)==16){q=0;r=p+h|0;s=(r|0)<127?r:127;c[b+776+(o<<5)>>2]=d[7200+((s|0)>0?s:0)>>0];s=(p|0)<127?p:127;c[b+776+(o<<5)+4>>2]=e[7328+(((s|0)>0?s:0)<<1)>>1];s=p+i|0;r=(s|0)<127?s:127;c[b+776+(o<<5)+8>>2]=d[7200+((r|0)>0?r:0)>>0]<<1;r=p+j|0;s=(r|0)<127?r:127;r=(e[7328+(((s|0)>0?s:0)<<1)>>1]|0)*101581|0;c[b+776+(o<<5)+12>>2]=r>>>0<524288?8:16?r>>>16:r;r=p+k|0;s=(r|0)<117?r:117;c[b+776+(o<<5)+16>>2]=d[7200+((s|0)>0?s:0)>>0];s=p+l|0;r=(s|0)<127?s:127;c[b+776+(o<<5)+20>>2]=e[7328+(((r|0)>0?r:0)<<1)>>1];c[b+776+(o<<5)+24>>2]=s}o=o+1|0}while((o|0)!=4);return}function Ie(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=b+4|0;g=b+8|0;h=b+12|0;i=b+20|0;j=0;do{k=0;do{l=0;do{m=d[5088+(j*264|0)+(k*33|0)+l>>0]|0;n=c[f>>2]|0;o=c[g>>2]|0;do if((o|0)<0){p=c[h>>2]|0;if(p>>>0<(c[i>>2]|0)>>>0){q=d[p>>0]|d[p+1>>0]<<8|d[p+2>>0]<<16|d[p+3>>0]<<24;c[h>>2]=p+3;p=Kf(q|0)|0;c[b>>2]=c[b>>2]<<24|(8?p>>>8:p);p=o+24|0;c[g>>2]=p;t=p;break}else{Ce(b);t=c[g>>2]|0;break}}else t=o;while(0);o=r(n,m)|0;p=8?o>>>8:o;o=c[b>>2]|0;q=(t?o>>>t:o)>>>0>p>>>0;if(q){c[b>>2]=o-(p+1<>2]=t-p;c[f>>2]=(u<>0]|0;a[e+907+(j*264|0)+(k*33|0)+l>>0]=v;l=l+1|0}while((l|0)!=11);l=0;do{q=d[5088+(j*264|0)+(k*33|0)+11+l>>0]|0;p=c[f>>2]|0;o=c[g>>2]|0;do if((o|0)<0){w=c[h>>2]|0;if(w>>>0<(c[i>>2]|0)>>>0){x=d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24;c[h>>2]=w+3;w=Kf(x|0)|0;c[b>>2]=c[b>>2]<<24|(8?w>>>8:w);w=o+24|0;c[g>>2]=w;y=w;break}else{Ce(b);y=c[g>>2]|0;break}}else y=o;while(0);o=r(p,q)|0;n=8?o>>>8:o;o=c[b>>2]|0;m=(y?o>>>y:o)>>>0>n>>>0;if(m){c[b>>2]=o-(n+1<>2]=y-n;c[f>>2]=(z<>0]|0;a[e+907+(j*264|0)+(k*33|0)+11+l>>0]=A;l=l+1|0}while((l|0)!=11);l=0;do{m=d[5088+(j*264|0)+(k*33|0)+22+l>>0]|0;n=c[f>>2]|0;o=c[g>>2]|0;do if((o|0)<0){w=c[h>>2]|0;if(w>>>0<(c[i>>2]|0)>>>0){x=d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24;c[h>>2]=w+3;w=Kf(x|0)|0;c[b>>2]=c[b>>2]<<24|(8?w>>>8:w);w=o+24|0;c[g>>2]=w;B=w;break}else{Ce(b);B=c[g>>2]|0;break}}else B=o;while(0);o=r(n,m)|0;p=8?o>>>8:o;o=c[b>>2]|0;q=(B?o>>>B:o)>>>0>p>>>0;if(q){c[b>>2]=o-(p+1<>2]=B-p;c[f>>2]=(C<>0]|0;a[e+907+(j*264|0)+(k*33|0)+22+l>>0]=D;l=l+1|0}while((l|0)!=11);k=k+1|0}while((k|0)!=8);k=e+907+(j*264|0)|0;c[e+1964+(j*68|0)>>2]=k;c[e+1964+(j*68|0)+4>>2]=e+907+(j*264|0)+33;c[e+1964+(j*68|0)+8>>2]=e+907+(j*264|0)+66;c[e+1964+(j*68|0)+12>>2]=e+907+(j*264|0)+99;l=e+907+(j*264|0)+198|0;c[e+1964+(j*68|0)+16>>2]=l;c[e+1964+(j*68|0)+20>>2]=e+907+(j*264|0)+132;c[e+1964+(j*68|0)+24>>2]=e+907+(j*264|0)+165;c[e+1964+(j*68|0)+28>>2]=l;c[e+1964+(j*68|0)+32>>2]=l;c[e+1964+(j*68|0)+36>>2]=l;c[e+1964+(j*68|0)+40>>2]=l;c[e+1964+(j*68|0)+44>>2]=l;c[e+1964+(j*68|0)+48>>2]=l;c[e+1964+(j*68|0)+52>>2]=l;c[e+1964+(j*68|0)+56>>2]=l;c[e+1964+(j*68|0)+60>>2]=e+907+(j*264|0)+231;c[e+1964+(j*68|0)+64>>2]=k;j=j+1|0}while((j|0)!=4);j=Fe(b,1)|0;c[e+2236>>2]=j;if(!j)return;j=(Fe(b,8)|0)&255;a[e+2240>>0]=j;return}function Je(a,e,f,g,h,i){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;if((h|0)>=16){j=16;return j|0}k=a+4|0;l=a+8|0;m=a+12|0;n=a+20|0;o=(c[e+(h<<2)>>2]|0)+(f*11|0)|0;f=h;h=c[l>>2]|0;p=c[k>>2]|0;a:while(1){q=d[o>>0]|0;do if((h|0)<0){t=c[m>>2]|0;if(t>>>0<(c[n>>2]|0)>>>0){u=d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24;c[m>>2]=t+3;t=Kf(u|0)|0;c[a>>2]=c[a>>2]<<24|(8?t>>>8:t);t=h+24|0;c[l>>2]=t;v=t;break}else{Ce(a);v=c[l>>2]|0;break}}else v=h;while(0);t=r(p,q)|0;u=8?t>>>8:t;t=c[a>>2]|0;w=(v?t>>>v:t)>>>0>u>>>0;if(w){x=t-(u+1<>2]=x;y=p-u|0;z=x}else{y=u+1|0;z=t}t=(s(y|0)|0)^24;u=v-t|0;c[l>>2]=u;x=(y<>2]=x;if(!w){j=f;A=37;break}w=o;t=f;B=u;u=z;C=x;while(1){x=d[w+1>>0]|0;do if((B|0)<0){D=c[m>>2]|0;if(D>>>0<(c[n>>2]|0)>>>0){E=d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24;c[m>>2]=D+3;D=Kf(E|0)|0;E=u<<24|(8?D>>>8:D);c[a>>2]=E;D=B+24|0;c[l>>2]=D;F=E;G=D;break}else{Ce(a);F=c[a>>2]|0;G=c[l>>2]|0;break}}else{F=u;G=B}while(0);D=r(C,x)|0;E=8?D>>>8:D;D=(G?F>>>G:F)>>>0>E>>>0;if(D){H=F-(E+1<>2]=H;I=C-E|0;J=H}else{I=E+1|0;J=F}E=(s(I|0)|0)^24;K=G-E|0;c[l>>2]=K;L=(I<>2]=L;M=t+1|0;if(D)break;if((M|0)==16){j=16;A=37;break a}w=c[e+(M<<2)>>2]|0;t=M;B=K;u=J;C=L}C=c[e+(M<<2)>>2]|0;u=d[w+2>>0]|0;do if((K|0)<0){B=c[m>>2]|0;if(B>>>0<(c[n>>2]|0)>>>0){q=d[B>>0]|d[B+1>>0]<<8|d[B+2>>0]<<16|d[B+3>>0]<<24;c[m>>2]=B+3;B=Kf(q|0)|0;q=J<<24|(8?B>>>8:B);c[a>>2]=q;B=K+24|0;c[l>>2]=B;N=q;O=B;break}else{Ce(a);N=c[a>>2]|0;O=c[l>>2]|0;break}}else{N=J;O=K}while(0);B=r(L,u)|0;q=8?B>>>8:B;B=(O?N>>>O:N)>>>0>q>>>0;if(B){c[a>>2]=N-(q+1<>2]=D;c[k>>2]=(P<>2]|0}else{Q=1;R=C+11|0;S=D}do if((S|0)<0){D=c[m>>2]|0;if(D>>>0<(c[n>>2]|0)>>>0){B=d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24;c[m>>2]=D+3;D=Kf(B|0)|0;c[a>>2]=c[a>>2]<<24|(8?D>>>8:D);D=S+24|0;c[l>>2]=D;T=D;break}else{Ce(a);T=c[l>>2]|0;break}}else T=S;while(0);C=c[k>>2]|0;w=1?C>>>1:C;u=c[a>>2]|0;D=w-(T?u>>>T:u)|0;B=31?D>>31:D;D=T+-1|0;c[l>>2]=D;q=B+C|1;c[k>>2]=q;c[a>>2]=u-((B&w+1)<0&1)<<2)>>2]|0)|0)&65535;b[i+((d[7584+t>>0]|0)<<1)>>1]=w;if((t|0)<15){o=R;f=M;h=D;p=q}else{j=16;A=37;break}}if((A|0)==37)return j|0;return 0}function Ke(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;f=d[e+3>>0]|0;g=b+4|0;h=c[g>>2]|0;i=b+8|0;j=c[i>>2]|0;do if((j|0)<0){k=b+12|0;l=c[k>>2]|0;if(l>>>0<(c[b+20>>2]|0)>>>0){m=d[l>>0]|d[l+1>>0]<<8|d[l+2>>0]<<16|d[l+3>>0]<<24;c[k>>2]=l+3;l=Kf(m|0)|0;c[b>>2]=c[b>>2]<<24|(8?l>>>8:l);l=j+24|0;c[i>>2]=l;n=l;break}else{Ce(b);n=c[i>>2]|0;break}}else n=j;while(0);j=r(h,f)|0;f=8?j>>>8:j;j=c[b>>2]|0;l=(n?j>>>n:j)>>>0>f>>>0;if(l){m=j-(f+1<>2]=m;o=h-f|0;p=m}else{o=f+1|0;p=j}j=(s(o|0)|0)^24;f=n-j|0;c[i>>2]=f;n=(o<>2]=n;if(!l){l=d[e+4>>0]|0;do if((f|0)<0){j=b+12|0;o=c[j>>2]|0;if(o>>>0<(c[b+20>>2]|0)>>>0){m=d[o>>0]|d[o+1>>0]<<8|d[o+2>>0]<<16|d[o+3>>0]<<24;c[j>>2]=o+3;o=Kf(m|0)|0;m=p<<24|(8?o>>>8:o);c[b>>2]=m;o=f+24|0;c[i>>2]=o;q=m;t=o;break}else{Ce(b);q=c[b>>2]|0;t=c[i>>2]|0;break}}else{q=p;t=f}while(0);o=r(n,l)|0;l=8?o>>>8:o;o=(t?q>>>t:q)>>>0>l>>>0;if(o){m=q-(l+1<>2]=m;u=n-l|0;v=m}else{u=l+1|0;v=q}q=(s(u|0)|0)^24;l=t-q|0;c[i>>2]=l;t=(u<>2]=t;if(!o){w=2;return w|0}o=d[e+5>>0]|0;do if((l|0)<0){q=b+12|0;u=c[q>>2]|0;if(u>>>0<(c[b+20>>2]|0)>>>0){m=d[u>>0]|d[u+1>>0]<<8|d[u+2>>0]<<16|d[u+3>>0]<<24;c[q>>2]=u+3;u=Kf(m|0)|0;m=v<<24|(8?u>>>8:u);c[b>>2]=m;u=l+24|0;c[i>>2]=u;x=m;y=u;break}else{Ce(b);x=c[b>>2]|0;y=c[i>>2]|0;break}}else{x=v;y=l}while(0);l=r(t,o)|0;o=8?l>>>8:l;l=(y?x>>>y:x)>>>0>o>>>0;if(l){c[b>>2]=x-(o+1<>2]=y-o;c[g>>2]=(z<>0]|0;do if((f|0)<0){o=b+12|0;z=c[o>>2]|0;if(z>>>0<(c[b+20>>2]|0)>>>0){y=d[z>>0]|d[z+1>>0]<<8|d[z+2>>0]<<16|d[z+3>>0]<<24;c[o>>2]=z+3;z=Kf(y|0)|0;y=p<<24|(8?z>>>8:z);c[b>>2]=y;z=f+24|0;c[i>>2]=z;A=y;B=z;break}else{Ce(b);A=c[b>>2]|0;B=c[i>>2]|0;break}}else{A=p;B=f}while(0);f=r(n,l)|0;l=8?f>>>8:f;f=(B?A>>>B:A)>>>0>l>>>0;if(f){p=A-(l+1<>2]=p;C=n-l|0;D=p}else{C=l+1|0;D=A}A=(s(C|0)|0)^24;l=B-A|0;c[i>>2]=l;B=(C<>2]=B;if(f){f=d[e+8>>0]|0;do if((l|0)<0){A=b+12|0;C=c[A>>2]|0;if(C>>>0<(c[b+20>>2]|0)>>>0){p=d[C>>0]|d[C+1>>0]<<8|d[C+2>>0]<<16|d[C+3>>0]<<24;c[A>>2]=C+3;C=Kf(p|0)|0;p=D<<24|(8?C>>>8:C);c[b>>2]=p;C=l+24|0;c[i>>2]=C;E=p;F=C;break}else{Ce(b);E=c[b>>2]|0;F=c[i>>2]|0;break}}else{E=D;F=l}while(0);C=r(B,f)|0;f=8?C>>>8:C;C=(F?E>>>F:E)>>>0>f>>>0;p=C&1;if(C){A=E-(f+1<>2]=A;G=B-f|0;H=A}else{G=f+1|0;H=E}E=(s(G|0)|0)^24;f=F-E|0;c[i>>2]=f;F=(G<>2]=F;E=d[e+(C?10:9)>>0]|0;do if((f|0)<0){C=b+12|0;G=c[C>>2]|0;if(G>>>0<(c[b+20>>2]|0)>>>0){A=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;c[C>>2]=G+3;G=Kf(A|0)|0;A=H<<24|(8?G>>>8:G);c[b>>2]=A;G=f+24|0;c[i>>2]=G;I=A;J=G;break}else{Ce(b);I=c[b>>2]|0;J=c[i>>2]|0;break}}else{I=H;J=f}while(0);f=r(F,E)|0;E=8?f>>>8:f;f=(J?I>>>J:I)>>>0>E>>>0;if(f){H=I-(E+1<>2]=H;K=F-E|0;L=H}else{K=E+1|0;L=I}I=(s(K|0)|0)^24;E=J-I|0;c[i>>2]=E;J=(K<>2]=J;I=p<<1|f&1;f=c[7600+(I<<2)>>2]|0;p=a[f>>0]|0;if(!(p<<24>>24))M=0;else{K=b+12|0;H=b+20|0;F=f;f=0;G=p;p=E;E=L;L=J;while(1){J=G&255;do if((p|0)<0){A=c[K>>2]|0;if(A>>>0<(c[H>>2]|0)>>>0){C=d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24;c[K>>2]=A+3;A=Kf(C|0)|0;C=E<<24|(8?A>>>8:A);c[b>>2]=C;A=p+24|0;c[i>>2]=A;N=C;O=A;break}else{Ce(b);N=c[b>>2]|0;O=c[i>>2]|0;break}}else{N=E;O=p}while(0);A=r(L,J)|0;C=8?A>>>8:A;A=(O?N>>>O:N)>>>0>C>>>0;if(A){n=N-(C+1<>2]=n;P=L-C|0;Q=n}else{P=C+1|0;Q=N}C=(s(P|0)|0)^24;p=O-C|0;c[i>>2]=p;L=(P<>2]=L;C=f<<1|A&1;F=F+1|0;G=a[F>>0]|0;if(!(G<<24>>24)){M=C;break}else{f=C;E=Q}}}w=M+(8<>0]|0;do if((l|0)<0){e=b+12|0;M=c[e>>2]|0;if(M>>>0<(c[b+20>>2]|0)>>>0){Q=d[M>>0]|d[M+1>>0]<<8|d[M+2>>0]<<16|d[M+3>>0]<<24;c[e>>2]=M+3;M=Kf(Q|0)|0;Q=D<<24|(8?M>>>8:M);c[b>>2]=Q;M=l+24|0;c[i>>2]=M;R=Q;S=M;break}else{Ce(b);R=c[b>>2]|0;S=c[i>>2]|0;break}}else{R=D;S=l}while(0);l=r(B,I)|0;I=8?l>>>8:l;l=(S?R>>>S:R)>>>0>I>>>0;if(l){D=R-(I+1<>2]=D;T=B-I|0;U=D}else{T=I+1|0;U=R}R=(s(T|0)|0)^24;I=S-R|0;c[i>>2]=I;S=(T<>2]=S;R=(I|0)<0;if(!l){do if(R){l=b+12|0;T=c[l>>2]|0;if(T>>>0<(c[b+20>>2]|0)>>>0){D=d[T>>0]|d[T+1>>0]<<8|d[T+2>>0]<<16|d[T+3>>0]<<24;c[l>>2]=T+3;T=Kf(D|0)|0;D=U<<24|(8?T>>>8:T);c[b>>2]=D;T=I+24|0;c[i>>2]=T;V=D;W=T;break}else{Ce(b);V=c[b>>2]|0;W=c[i>>2]|0;break}}else{V=U;W=I}while(0);T=S*159|0;D=8?T>>>8:T;T=(W?V>>>W:V)>>>0>D>>>0;if(T){c[b>>2]=V-(D+1<>2]=W-D;c[g>>2]=(X<>2]|0;if(D>>>0<(c[b+20>>2]|0)>>>0){X=d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24;c[T>>2]=D+3;D=Kf(X|0)|0;X=U<<24|(8?D>>>8:D);c[b>>2]=X;D=I+24|0;c[i>>2]=D;Y=X;Z=D;break}else{Ce(b);Y=c[b>>2]|0;Z=c[i>>2]|0;break}}else{Y=U;Z=I}while(0);I=S*165|0;U=8?I>>>8:I;I=(Z?Y>>>Z:Y)>>>0>U>>>0;if(I){R=Y-(U+1<>2]=R;_=S-U|0;$=R}else{_=U+1|0;$=Y}Y=(s(_|0)|0)^24;U=Z-Y|0;c[i>>2]=U;Z=(_<>2]=Z;Y=((I&1)<<1)+7|0;do if((U|0)<0){I=b+12|0;_=c[I>>2]|0;if(_>>>0<(c[b+20>>2]|0)>>>0){R=d[_>>0]|d[_+1>>0]<<8|d[_+2>>0]<<16|d[_+3>>0]<<24;c[I>>2]=_+3;_=Kf(R|0)|0;R=$<<24|(8?_>>>8:_);c[b>>2]=R;_=U+24|0;c[i>>2]=_;aa=R;ba=_;break}else{Ce(b);aa=c[b>>2]|0;ba=c[i>>2]|0;break}}else{aa=$;ba=U}while(0);U=Z*145|0;$=8?U>>>8:U;U=(ba?aa>>>ba:aa)>>>0>$>>>0;if(U){c[b>>2]=aa-($+1<>2]=ba-$;c[g>>2]=(ca<<$)+-1;w=Y+(U&1)|0;return w|0}function Le(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if(!b){e=0;return e|0}if(!d){if(c[b>>2]|0){e=0;return e|0}c[b>>2]=2;c[b+8>>2]=9156;c[b+4>>2]=0;e=0;return e|0}f=b+4|0;if((c[f>>2]|0)==0?(ue(b,d)|0)==0:0){e=0;return e|0}if(!(nd(b,d)|0)){a:do if(!(qd(b,d)|0))g=0;else{h=b+2300|0;c[h>>2]=0;i=b+308|0;b:do if((c[i>>2]|0)>0){j=b+312|0;k=b+12|0;l=b+2296|0;m=b+288|0;n=b+2256|0;o=b+2248|0;p=0;c:while(1){q=b+316+((c[j>>2]&p)*28|0)|0;if(!(ve(k,b)|0)){r=12;break}if((c[l>>2]|0)<(c[m>>2]|0))do{if(!(we(b,q)|0)){r=17;break c}s=(c[l>>2]|0)+1|0;c[l>>2]=s}while((s|0)<(c[m>>2]|0));q=c[n>>2]|0;a[q+-2>>0]=0;a[q+-1>>0]=0;c[o>>2]=0;c[l>>2]=0;if(!(bd(b,d)|0)){r=21;break}p=(c[h>>2]|0)+1|0;c[h>>2]=p;if((p|0)>=(c[i>>2]|0))break b}if((r|0)==12){if(c[b>>2]|0){g=0;break a}c[b>>2]=7;c[b+8>>2]=9193;c[f>>2]=0;g=0;break a}else if((r|0)==17){if(c[b>>2]|0){g=0;break a}c[b>>2]=7;c[b+8>>2]=9234;c[f>>2]=0;g=0;break a}else if((r|0)==21){if(c[b>>2]|0){g=0;break a}c[b>>2]=6;c[b+8>>2]=9269;c[f>>2]=0;g=0;break a}}while(0);if((c[b+148>>2]|0)>0?(i=(ed()|0)+8|0,(aa[c[i>>2]&7](b+124|0)|0)==0):0){g=0;break}g=1}while(0);r=(od(b,d)|0)&g;if(r|0){c[f>>2]=0;e=r;return e|0}}r=(ed()|0)+20|0;ea[c[r>>2]&31](b+124|0);oa(b);r=b+2288|0;pa(c[r>>2]|0);c[r>>2]=0;c[b+2292>>2]=0;r=b+12|0;c[r>>2]=0;c[r+4>>2]=0;c[r+8>>2]=0;c[r+12>>2]=0;c[r+16>>2]=0;c[r+20>>2]=0;c[r+24>>2]=0;c[f>>2]=0;e=0;return e|0}function Me(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=Y;Y=Y+160|0;f=e+148|0;g=e+144|0;h=e+36|0;i=e;c[i>>2]=a;j=i+4|0;c[j>>2]=b;c[i+8>>2]=1;c[g>>2]=0;k=ne(a,b,0,0,0,g,0,i)|0;c[f>>2]=k;if(!(c[f>>2]|0)){if(c[g>>2]|0)l=4}else if((c[f>>2]|0)==7&(c[g>>2]|0)!=0)l=4;if((l|0)==4)c[f>>2]=4;l=c[f>>2]|0;if(l|0){m=l;Y=e;return m|0}ya(h,520)|0;l=c[i+12>>2]|0;c[h+64>>2]=(c[i>>2]|0)+l;c[h+60>>2]=(c[j>>2]|0)-l;za(d,h);if(!(c[i+32>>2]|0)){l=se()|0;if(!l){m=1;Y=e;return m|0}c[l+2348>>2]=c[i+16>>2];c[l+2352>>2]=c[i+20>>2];if(ue(l,h)|0){j=h+4|0;f=d+20|0;g=Uc(c[h>>2]|0,c[j>>2]|0,c[f>>2]|0,c[d>>2]|0)|0;if(!g){k=pd(c[f>>2]|0,i,c[h>>2]|0,c[j>>2]|0)|0;c[l+148>>2]=k;$c(c[f>>2]|0,l);if(!(Le(l,h)|0))n=c[l>>2]|0;else n=0}else n=g}else n=c[l>>2]|0;re(l);o=n}else{n=te()|0;if(!n){m=1;Y=e;return m|0}if(xe(n,h)|0){l=Uc(c[h>>2]|0,c[h+4>>2]|0,c[d+20>>2]|0,c[d>>2]|0)|0;if(!l)if(!(ye(n)|0))p=c[n>>2]|0;else p=0;else p=l}else p=c[n>>2]|0;qa(n);o=p}if(o|0){Xc(c[d>>2]|0);m=o;Y=e;return m|0}o=c[d+20>>2]|0;if(!o){m=0;Y=e;return m|0}if(!(c[o+48>>2]|0)){m=0;Y=e;return m|0}m=Tc(c[d>>2]|0)|0;Y=e;return m|0}function Ne(a,b){a=a|0;b=b|0;var c=0;if((a|0)==0|(b&-256|0)!=512){c=0;return c|0}Nf(a|0,0,200)|0;Wc(a+40|0,520)|0;c=1;return c|0}function Oe(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=Y;Y=Y+144|0;f=e+88|0;g=e;if(!d){h=2;Y=e;return h|0}a:do if(!a)i=2;else{j=d;k=j+40|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(k|0));l=d+4|0;m=ne(a,b,d,l,d+8|0,d+12|0,d+16|0,0)|0;switch(m|0){case 0:break;case 7:{h=3;Y=e;return h|0}default:{i=m;break a}}j=f+4|0;k=j+52|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(k|0));c[f+20>>2]=d+124;j=d+40|0;c[f>>2]=j;if(!(_c(j,d)|0)){h=Me(a,b,f)|0;Y=e;return h|0}Wc(g,520)|0;c[g>>2]=c[j>>2];c[g+4>>2]=c[d>>2];c[g+8>>2]=c[l>>2];c[f>>2]=g;k=Me(a,b,f)|0;if(!k)n=Yc(g,j)|0;else n=k;Xc(g);h=n;Y=e;return h|0}while(0);h=i;Y=e;return h|0}\nfunction Pe(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0;b=Y;Y=Y+16|0;d=b;do if(a>>>0<245){e=a>>>0<11?16:a+11&-8;f=3?e>>>3:e;g=c[2550]|0;h=f?g>>>f:g;if(h&3|0){i=(h&1^1)+f|0;j=10240+(i<<1<<2)|0;k=j+8|0;l=c[k>>2]|0;m=l+8|0;n=c[m>>2]|0;if((n|0)==(j|0))c[2550]=g&~(1<>2]=j;c[k>>2]=n}n=i<<3;c[l+4>>2]=n|3;i=l+n+4|0;c[i>>2]=c[i>>2]|1;o=m;Y=b;return o|0}m=c[2552]|0;if(e>>>0>m>>>0){if(h|0){i=2<>>12:i)&16;f=n?i>>>n:i;i=(5?f>>>5:f)&8;h=i?f>>>i:f;f=(2?h>>>2:h)&4;l=f?h>>>f:h;h=(1?l>>>1:l)&2;k=h?l>>>h:l;l=(1?k>>>1:k)&1;j=(i|n|f|h|l)+(l?k>>>l:k)|0;k=10240+(j<<1<<2)|0;l=k+8|0;h=c[l>>2]|0;f=h+8|0;n=c[f>>2]|0;if((n|0)==(k|0)){i=g&~(1<>2]=k;c[l>>2]=n;p=g}n=j<<3;j=n-e|0;c[h+4>>2]=e|3;l=h+e|0;c[l+4>>2]=j|1;c[h+n>>2]=j;if(m|0){n=c[2555]|0;h=3?m>>>3:m;k=10240+(h<<1<<2)|0;i=1<>2]|0;r=i}c[r>>2]=n;c[q+12>>2]=n;c[n+8>>2]=q;c[n+12>>2]=k}c[2552]=j;c[2555]=l;o=f;Y=b;return o|0}f=c[2551]|0;if(f){l=(f&0-f)+-1|0;j=(12?l>>>12:l)&16;k=j?l>>>j:l;l=(5?k>>>5:k)&8;n=l?k>>>l:k;k=(2?n>>>2:n)&4;i=k?n>>>k:n;n=(1?i>>>1:i)&2;h=n?i>>>n:i;i=(1?h>>>1:h)&1;s=c[10504+((l|j|k|n|i)+(i?h>>>i:h)<<2)>>2]|0;h=s;i=s;n=(c[s+4>>2]&-8)-e|0;while(1){s=c[h+16>>2]|0;if(!s){k=c[h+20>>2]|0;if(!k)break;else t=k}else t=s;s=(c[t+4>>2]&-8)-e|0;k=s>>>0>>0;h=t;i=k?t:i;n=k?s:n}h=i+e|0;if(h>>>0>i>>>0){s=c[i+24>>2]|0;k=c[i+12>>2]|0;do if((k|0)==(i|0)){j=i+20|0;l=c[j>>2]|0;if(!l){u=i+16|0;v=c[u>>2]|0;if(!v){w=0;break}else{x=v;y=u}}else{x=l;y=j}j=x;l=y;while(1){u=j+20|0;v=c[u>>2]|0;if(!v){z=j+16|0;A=c[z>>2]|0;if(!A)break;else{B=A;C=z}}else{B=v;C=u}j=B;l=C}c[l>>2]=0;w=j}else{u=c[i+8>>2]|0;c[u+12>>2]=k;c[k+8>>2]=u;w=k}while(0);do if(s|0){k=c[i+28>>2]|0;u=10504+(k<<2)|0;if((i|0)==(c[u>>2]|0)){c[u>>2]=w;if(!w){c[2551]=f&~(1<>2]|0)==(i|0)?k:s+20|0)>>2]=w;if(!w)break}c[w+24>>2]=s;k=c[i+16>>2]|0;if(k|0){c[w+16>>2]=k;c[k+24>>2]=w}k=c[i+20>>2]|0;if(k|0){c[w+20>>2]=k;c[k+24>>2]=w}}while(0);if(n>>>0<16){s=n+e|0;c[i+4>>2]=s|3;f=i+s+4|0;c[f>>2]=c[f>>2]|1}else{c[i+4>>2]=e|3;c[h+4>>2]=n|1;c[h+n>>2]=n;if(m|0){f=c[2555]|0;s=3?m>>>3:m;k=10240+(s<<1<<2)|0;u=1<>2]|0;E=u}c[E>>2]=f;c[D+12>>2]=f;c[f+8>>2]=D;c[f+12>>2]=k}c[2552]=n;c[2555]=h}o=i+8|0;Y=b;return o|0}else F=e}else F=e}else F=e}else if(a>>>0<=4294967231){k=a+11|0;f=k&-8;u=c[2551]|0;if(u){s=0-f|0;v=8?k>>>8:k;if(v)if(f>>>0>16777215)G=31;else{k=v+1048320|0;z=(16?k>>>16:k)&8;k=v<>>16:v)&4;v=k<>>16:k)&2;k=v<>>15:k)|0;k=v+7|0;G=(k?f>>>k:f)&1|v<<1}else G=0;v=c[10504+(G<<2)>>2]|0;a:do if(!v){I=0;J=0;K=s;L=61}else{k=0;H=s;z=v;A=f<<((G|0)==31?0:25-(1?G>>>1:G)|0);M=0;while(1){N=(c[z+4>>2]&-8)-f|0;if(N>>>0>>0)if(!N){O=z;P=0;Q=z;L=65;break a}else{R=z;S=N}else{R=k;S=H}N=c[z+20>>2]|0;z=c[z+16+((31?A>>>31:A)<<2)>>2]|0;T=(N|0)==0|(N|0)==(z|0)?M:N;if(!z){I=T;J=R;K=S;L=61;break}else{k=R;H=S;A=A<<1;M=T}}}while(0);if((L|0)==61){if((I|0)==0&(J|0)==0){v=2<>>12:v)&16;e=s?v>>>s:v;v=(5?e>>>5:e)&8;i=v?e>>>v:e;e=(2?i>>>2:i)&4;h=e?i>>>e:i;i=(1?h>>>1:h)&2;n=i?h>>>i:h;h=(1?n>>>1:n)&1;U=0;V=c[10504+((v|s|e|i|h)+(h?n>>>h:n)<<2)>>2]|0}else{U=J;V=I}if(!V){W=U;X=K}else{O=U;P=K;Q=V;L=65}}if((L|0)==65){n=O;h=P;i=Q;while(1){e=(c[i+4>>2]&-8)-f|0;s=e>>>0>>0;v=s?e:h;e=s?i:n;s=c[i+16>>2]|0;if(!s)Z=c[i+20>>2]|0;else Z=s;if(!Z){W=e;X=v;break}else{n=e;h=v;i=Z}}}if(((W|0)!=0?X>>>0<((c[2552]|0)-f|0)>>>0:0)?(i=W+f|0,i>>>0>W>>>0):0){h=c[W+24>>2]|0;n=c[W+12>>2]|0;do if((n|0)==(W|0)){v=W+20|0;e=c[v>>2]|0;if(!e){s=W+16|0;g=c[s>>2]|0;if(!g){_=0;break}else{$=g;aa=s}}else{$=e;aa=v}v=$;e=aa;while(1){s=v+20|0;g=c[s>>2]|0;if(!g){m=v+16|0;M=c[m>>2]|0;if(!M)break;else{ba=M;ca=m}}else{ba=g;ca=s}v=ba;e=ca}c[e>>2]=0;_=v}else{s=c[W+8>>2]|0;c[s+12>>2]=n;c[n+8>>2]=s;_=n}while(0);do if(h){n=c[W+28>>2]|0;s=10504+(n<<2)|0;if((W|0)==(c[s>>2]|0)){c[s>>2]=_;if(!_){s=u&~(1<>2]|0)==(W|0)?s:h+20|0)>>2]=_;if(!_){da=u;break}}c[_+24>>2]=h;s=c[W+16>>2]|0;if(s|0){c[_+16>>2]=s;c[s+24>>2]=_}s=c[W+20>>2]|0;if(s){c[_+20>>2]=s;c[s+24>>2]=_;da=u}else da=u}else da=u;while(0);b:do if(X>>>0<16){u=X+f|0;c[W+4>>2]=u|3;h=W+u+4|0;c[h>>2]=c[h>>2]|1}else{c[W+4>>2]=f|3;c[i+4>>2]=X|1;c[i+X>>2]=X;h=3?X>>>3:X;if(X>>>0<256){u=10240+(h<<1<<2)|0;s=c[2550]|0;n=1<>2]|0;fa=n}c[fa>>2]=i;c[ea+12>>2]=i;c[i+8>>2]=ea;c[i+12>>2]=u;break}u=8?X>>>8:X;if(u)if(X>>>0>16777215)ga=31;else{n=u+1048320|0;s=(16?n>>>16:n)&8;n=u<>>16:u)&4;u=n<>>16:n)&2;n=u<>>15:n)|0;n=u+7|0;ga=(n?X>>>n:X)&1|u<<1}else ga=0;u=10504+(ga<<2)|0;c[i+28>>2]=ga;n=i+16|0;c[n+4>>2]=0;c[n>>2]=0;n=1<>2]=i;c[i+24>>2]=u;c[i+12>>2]=i;c[i+8>>2]=i;break}n=c[u>>2]|0;c:do if((c[n+4>>2]&-8|0)==(X|0))ha=n;else{u=X<<((ga|0)==31?0:25-(1?ga>>>1:ga)|0);g=n;while(1){ia=g+16+((31?u>>>31:u)<<2)|0;s=c[ia>>2]|0;if(!s)break;if((c[s+4>>2]&-8|0)==(X|0)){ha=s;break c}else{u=u<<1;g=s}}c[ia>>2]=i;c[i+24>>2]=g;c[i+12>>2]=i;c[i+8>>2]=i;break b}while(0);n=ha+8|0;v=c[n>>2]|0;c[v+12>>2]=i;c[n>>2]=i;c[i+8>>2]=v;c[i+12>>2]=ha;c[i+24>>2]=0}while(0);o=W+8|0;Y=b;return o|0}else F=f}else F=f}else F=-1;while(0);W=c[2552]|0;if(W>>>0>=F>>>0){ha=W-F|0;ia=c[2555]|0;if(ha>>>0>15){X=ia+F|0;c[2555]=X;c[2552]=ha;c[X+4>>2]=ha|1;c[ia+W>>2]=ha;c[ia+4>>2]=F|3}else{c[2552]=0;c[2555]=0;c[ia+4>>2]=W|3;ha=ia+W+4|0;c[ha>>2]=c[ha>>2]|1}o=ia+8|0;Y=b;return o|0}ia=c[2553]|0;if(ia>>>0>F>>>0){ha=ia-F|0;c[2553]=ha;W=c[2556]|0;X=W+F|0;c[2556]=X;c[X+4>>2]=ha|1;c[W+4>>2]=F|3;o=W+8|0;Y=b;return o|0}if(!(c[2668]|0)){c[2670]=4096;c[2669]=4096;c[2671]=-1;c[2672]=-1;c[2673]=0;c[2661]=0;c[2668]=d&-16^1431655768;ja=4096}else ja=c[2670]|0;d=F+48|0;W=F+47|0;ha=ja+W|0;X=0-ja|0;ja=ha&X;if(ja>>>0<=F>>>0){o=0;Y=b;return o|0}ga=c[2660]|0;if(ga|0?(da=c[2658]|0,ea=da+ja|0,ea>>>0<=da>>>0|ea>>>0>ga>>>0):0){o=0;Y=b;return o|0}d:do if(!(c[2661]&4)){ga=c[2556]|0;e:do if(ga){ea=10648;while(1){da=c[ea>>2]|0;if(da>>>0<=ga>>>0?(da+(c[ea+4>>2]|0)|0)>>>0>ga>>>0:0)break;da=c[ea+8>>2]|0;if(!da){L=128;break e}else ea=da}da=ha-ia&X;if(da>>>0<2147483647){fa=Of(da|0)|0;if((fa|0)==((c[ea>>2]|0)+(c[ea+4>>2]|0)|0))if((fa|0)==(-1|0))ka=da;else{la=da;ma=fa;L=145;break d}else{na=fa;oa=da;L=136}}else ka=0}else L=128;while(0);do if((L|0)==128){ga=Of(0)|0;if((ga|0)!=(-1|0)?(f=ga,da=c[2669]|0,fa=da+-1|0,_=((fa&f|0)==0?0:(fa+f&0-da)-f|0)+ja|0,f=c[2658]|0,da=_+f|0,_>>>0>F>>>0&_>>>0<2147483647):0){fa=c[2660]|0;if(fa|0?da>>>0<=f>>>0|da>>>0>fa>>>0:0){ka=0;break}fa=Of(_|0)|0;if((fa|0)==(ga|0)){la=_;ma=ga;L=145;break d}else{na=fa;oa=_;L=136}}else ka=0}while(0);do if((L|0)==136){_=0-oa|0;if(!(d>>>0>oa>>>0&(oa>>>0<2147483647&(na|0)!=(-1|0))))if((na|0)==(-1|0)){ka=0;break}else{la=oa;ma=na;L=145;break d}fa=c[2670]|0;ga=W-oa+fa&0-fa;if(ga>>>0>=2147483647){la=oa;ma=na;L=145;break d}if((Of(ga|0)|0)==(-1|0)){Of(_|0)|0;ka=0;break}else{la=ga+oa|0;ma=na;L=145;break d}}while(0);c[2661]=c[2661]|4;pa=ka;L=143}else{pa=0;L=143}while(0);if(((L|0)==143?ja>>>0<2147483647:0)?(ka=Of(ja|0)|0,ja=Of(0)|0,na=ja-ka|0,oa=na>>>0>(F+40|0)>>>0,!((ka|0)==(-1|0)|oa^1|ka>>>0>>0&((ka|0)!=(-1|0)&(ja|0)!=(-1|0))^1)):0){la=oa?na:pa;ma=ka;L=145}if((L|0)==145){ka=(c[2658]|0)+la|0;c[2658]=ka;if(ka>>>0>(c[2659]|0)>>>0)c[2659]=ka;ka=c[2556]|0;f:do if(ka){pa=10648;while(1){qa=c[pa>>2]|0;ra=c[pa+4>>2]|0;if((ma|0)==(qa+ra|0)){L=154;break}na=c[pa+8>>2]|0;if(!na)break;else pa=na}if(((L|0)==154?(na=pa+4|0,(c[pa+12>>2]&8|0)==0):0)?ma>>>0>ka>>>0&qa>>>0<=ka>>>0:0){c[na>>2]=ra+la;na=(c[2553]|0)+la|0;oa=ka+8|0;ja=(oa&7|0)==0?0:0-oa&7;oa=ka+ja|0;W=na-ja|0;c[2556]=oa;c[2553]=W;c[oa+4>>2]=W|1;c[ka+na+4>>2]=40;c[2557]=c[2672];break}if(ma>>>0<(c[2554]|0)>>>0)c[2554]=ma;na=ma+la|0;W=10648;while(1){if((c[W>>2]|0)==(na|0)){L=162;break}oa=c[W+8>>2]|0;if(!oa)break;else W=oa}if((L|0)==162?(c[W+12>>2]&8|0)==0:0){c[W>>2]=ma;pa=W+4|0;c[pa>>2]=(c[pa>>2]|0)+la;pa=ma+8|0;oa=ma+((pa&7|0)==0?0:0-pa&7)|0;pa=na+8|0;ja=na+((pa&7|0)==0?0:0-pa&7)|0;pa=oa+F|0;d=ja-oa-F|0;c[oa+4>>2]=F|3;g:do if((ka|0)==(ja|0)){X=(c[2553]|0)+d|0;c[2553]=X;c[2556]=pa;c[pa+4>>2]=X|1}else{if((c[2555]|0)==(ja|0)){X=(c[2552]|0)+d|0;c[2552]=X;c[2555]=pa;c[pa+4>>2]=X|1;c[pa+X>>2]=X;break}X=c[ja+4>>2]|0;if((X&3|0)==1){ia=X&-8;ha=3?X>>>3:X;h:do if(X>>>0<256){ga=c[ja+8>>2]|0;_=c[ja+12>>2]|0;if((_|0)==(ga|0)){c[2550]=c[2550]&~(1<>2]=_;c[_+8>>2]=ga;break}}else{ga=c[ja+24>>2]|0;_=c[ja+12>>2]|0;do if((_|0)==(ja|0)){fa=ja+16|0;da=fa+4|0;f=c[da>>2]|0;if(!f){ca=c[fa>>2]|0;if(!ca){sa=0;break}else{ta=ca;ua=fa}}else{ta=f;ua=da}da=ta;f=ua;while(1){fa=da+20|0;ca=c[fa>>2]|0;if(!ca){ba=da+16|0;aa=c[ba>>2]|0;if(!aa)break;else{va=aa;wa=ba}}else{va=ca;wa=fa}da=va;f=wa}c[f>>2]=0;sa=da}else{fa=c[ja+8>>2]|0;c[fa+12>>2]=_;c[_+8>>2]=fa;sa=_}while(0);if(!ga)break;_=c[ja+28>>2]|0;g=10504+(_<<2)|0;do if((c[g>>2]|0)!=(ja|0)){fa=ga+16|0;c[((c[fa>>2]|0)==(ja|0)?fa:ga+20|0)>>2]=sa;if(!sa)break h}else{c[g>>2]=sa;if(sa|0)break;c[2551]=c[2551]&~(1<<_);break h}while(0);c[sa+24>>2]=ga;_=ja+16|0;g=c[_>>2]|0;if(g|0){c[sa+16>>2]=g;c[g+24>>2]=sa}g=c[_+4>>2]|0;if(!g)break;c[sa+20>>2]=g;c[g+24>>2]=sa}while(0);xa=ja+ia|0;ya=ia+d|0}else{xa=ja;ya=d}ha=xa+4|0;c[ha>>2]=c[ha>>2]&-2;c[pa+4>>2]=ya|1;c[pa+ya>>2]=ya;ha=3?ya>>>3:ya;if(ya>>>0<256){X=10240+(ha<<1<<2)|0;ea=c[2550]|0;g=1<>2]|0;Aa=g}c[Aa>>2]=pa;c[za+12>>2]=pa;c[pa+8>>2]=za;c[pa+12>>2]=X;break}X=8?ya>>>8:ya;do if(!X)Ba=0;else{if(ya>>>0>16777215){Ba=31;break}g=X+1048320|0;ea=(16?g>>>16:g)&8;g=X<>>16:ha)&4;ha=g<<_;g=ha+245760|0;fa=(16?g>>>16:g)&2;g=ha<>>15:g)|0;g=ha+7|0;Ba=(g?ya>>>g:ya)&1|ha<<1}while(0);X=10504+(Ba<<2)|0;c[pa+28>>2]=Ba;ia=pa+16|0;c[ia+4>>2]=0;c[ia>>2]=0;ia=c[2551]|0;ha=1<>2]=pa;c[pa+24>>2]=X;c[pa+12>>2]=pa;c[pa+8>>2]=pa;break}ha=c[X>>2]|0;i:do if((c[ha+4>>2]&-8|0)==(ya|0))Ca=ha;else{X=ya<<((Ba|0)==31?0:25-(1?Ba>>>1:Ba)|0);ia=ha;while(1){Da=ia+16+((31?X>>>31:X)<<2)|0;g=c[Da>>2]|0;if(!g)break;if((c[g+4>>2]&-8|0)==(ya|0)){Ca=g;break i}else{X=X<<1;ia=g}}c[Da>>2]=pa;c[pa+24>>2]=ia;c[pa+12>>2]=pa;c[pa+8>>2]=pa;break g}while(0);ha=Ca+8|0;X=c[ha>>2]|0;c[X+12>>2]=pa;c[ha>>2]=pa;c[pa+8>>2]=X;c[pa+12>>2]=Ca;c[pa+24>>2]=0}while(0);o=oa+8|0;Y=b;return o|0}pa=10648;while(1){d=c[pa>>2]|0;if(d>>>0<=ka>>>0?(Ea=d+(c[pa+4>>2]|0)|0,Ea>>>0>ka>>>0):0)break;pa=c[pa+8>>2]|0}pa=Ea+-47|0;oa=pa+8|0;d=pa+((oa&7|0)==0?0:0-oa&7)|0;oa=ka+16|0;pa=d>>>0>>0?ka:d;d=pa+8|0;ja=la+-40|0;na=ma+8|0;W=(na&7|0)==0?0:0-na&7;na=ma+W|0;X=ja-W|0;c[2556]=na;c[2553]=X;c[na+4>>2]=X|1;c[ma+ja+4>>2]=40;c[2557]=c[2672];ja=pa+4|0;c[ja>>2]=27;c[d>>2]=c[2662];c[d+4>>2]=c[2663];c[d+8>>2]=c[2664];c[d+12>>2]=c[2665];c[2662]=ma;c[2663]=la;c[2665]=0;c[2664]=d;d=pa+24|0;do{X=d;d=d+4|0;c[d>>2]=7}while((X+8|0)>>>0>>0);if((pa|0)!=(ka|0)){d=pa-ka|0;c[ja>>2]=c[ja>>2]&-2;c[ka+4>>2]=d|1;c[pa>>2]=d;X=3?d>>>3:d;if(d>>>0<256){na=10240+(X<<1<<2)|0;W=c[2550]|0;ha=1<>2]|0;Ga=ha}c[Ga>>2]=ka;c[Fa+12>>2]=ka;c[ka+8>>2]=Fa;c[ka+12>>2]=na;break}na=8?d>>>8:d;if(na)if(d>>>0>16777215)Ha=31;else{ha=na+1048320|0;W=(16?ha>>>16:ha)&8;ha=na<>>16:na)&4;na=ha<>>16:ha)&2;ha=na<>>15:ha)|0;ha=na+7|0;Ha=(ha?d>>>ha:d)&1|na<<1}else Ha=0;na=10504+(Ha<<2)|0;c[ka+28>>2]=Ha;c[ka+20>>2]=0;c[oa>>2]=0;ha=c[2551]|0;ga=1<>2]=ka;c[ka+24>>2]=na;c[ka+12>>2]=ka;c[ka+8>>2]=ka;break}ga=c[na>>2]|0;j:do if((c[ga+4>>2]&-8|0)==(d|0))Ia=ga;else{na=d<<((Ha|0)==31?0:25-(1?Ha>>>1:Ha)|0);ha=ga;while(1){Ja=ha+16+((31?na>>>31:na)<<2)|0;W=c[Ja>>2]|0;if(!W)break;if((c[W+4>>2]&-8|0)==(d|0)){Ia=W;break j}else{na=na<<1;ha=W}}c[Ja>>2]=ka;c[ka+24>>2]=ha;c[ka+12>>2]=ka;c[ka+8>>2]=ka;break f}while(0);d=Ia+8|0;ga=c[d>>2]|0;c[ga+12>>2]=ka;c[d>>2]=ka;c[ka+8>>2]=ga;c[ka+12>>2]=Ia;c[ka+24>>2]=0}}else{ga=c[2554]|0;if((ga|0)==0|ma>>>0>>0)c[2554]=ma;c[2662]=ma;c[2663]=la;c[2665]=0;c[2559]=c[2668];c[2558]=-1;c[2563]=10240;c[2562]=10240;c[2565]=10248;c[2564]=10248;c[2567]=10256;c[2566]=10256;c[2569]=10264;c[2568]=10264;c[2571]=10272;c[2570]=10272;c[2573]=10280;c[2572]=10280;c[2575]=10288;c[2574]=10288;c[2577]=10296;c[2576]=10296;c[2579]=10304;c[2578]=10304;c[2581]=10312;c[2580]=10312;c[2583]=10320;c[2582]=10320;c[2585]=10328;c[2584]=10328;c[2587]=10336;c[2586]=10336;c[2589]=10344;c[2588]=10344;c[2591]=10352;c[2590]=10352;c[2593]=10360;c[2592]=10360;c[2595]=10368;c[2594]=10368;c[2597]=10376;c[2596]=10376;c[2599]=10384;c[2598]=10384;c[2601]=10392;c[2600]=10392;c[2603]=10400;c[2602]=10400;c[2605]=10408;c[2604]=10408;c[2607]=10416;c[2606]=10416;c[2609]=10424;c[2608]=10424;c[2611]=10432;c[2610]=10432;c[2613]=10440;c[2612]=10440;c[2615]=10448;c[2614]=10448;c[2617]=10456;c[2616]=10456;c[2619]=10464;c[2618]=10464;c[2621]=10472;c[2620]=10472;c[2623]=10480;c[2622]=10480;c[2625]=10488;c[2624]=10488;ga=la+-40|0;d=ma+8|0;oa=(d&7|0)==0?0:0-d&7;d=ma+oa|0;pa=ga-oa|0;c[2556]=d;c[2553]=pa;c[d+4>>2]=pa|1;c[ma+ga+4>>2]=40;c[2557]=c[2672]}while(0);ma=c[2553]|0;if(ma>>>0>F>>>0){la=ma-F|0;c[2553]=la;ma=c[2556]|0;ka=ma+F|0;c[2556]=ka;c[ka+4>>2]=la|1;c[ma+4>>2]=F|3;o=ma+8|0;Y=b;return o|0}}ma=_e()|0;c[ma>>2]=12;o=0;Y=b;return o|0}function Qe(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;if(!a)return;b=a+-8|0;d=c[2554]|0;e=c[a+-4>>2]|0;a=e&-8;f=b+a|0;do if(!(e&1)){g=c[b>>2]|0;if(!(e&3))return;h=b+(0-g)|0;i=g+a|0;if(h>>>0>>0)return;if((c[2555]|0)==(h|0)){j=f+4|0;k=c[j>>2]|0;if((k&3|0)!=3){l=h;m=i;n=h;break}c[2552]=i;c[j>>2]=k&-2;c[h+4>>2]=i|1;c[h+i>>2]=i;return}k=3?g>>>3:g;if(g>>>0<256){g=c[h+8>>2]|0;j=c[h+12>>2]|0;if((j|0)==(g|0)){c[2550]=c[2550]&~(1<>2]=j;c[j+8>>2]=g;l=h;m=i;n=h;break}}g=c[h+24>>2]|0;j=c[h+12>>2]|0;do if((j|0)==(h|0)){k=h+16|0;o=k+4|0;p=c[o>>2]|0;if(!p){q=c[k>>2]|0;if(!q){r=0;break}else{s=q;t=k}}else{s=p;t=o}o=s;p=t;while(1){k=o+20|0;q=c[k>>2]|0;if(!q){u=o+16|0;v=c[u>>2]|0;if(!v)break;else{w=v;x=u}}else{w=q;x=k}o=w;p=x}c[p>>2]=0;r=o}else{k=c[h+8>>2]|0;c[k+12>>2]=j;c[j+8>>2]=k;r=j}while(0);if(g){j=c[h+28>>2]|0;k=10504+(j<<2)|0;if((c[k>>2]|0)==(h|0)){c[k>>2]=r;if(!r){c[2551]=c[2551]&~(1<>2]|0)==(h|0)?j:g+20|0)>>2]=r;if(!r){l=h;m=i;n=h;break}}c[r+24>>2]=g;j=h+16|0;k=c[j>>2]|0;if(k|0){c[r+16>>2]=k;c[k+24>>2]=r}k=c[j+4>>2]|0;if(k){c[r+20>>2]=k;c[k+24>>2]=r;l=h;m=i;n=h}else{l=h;m=i;n=h}}else{l=h;m=i;n=h}}else{l=b;m=a;n=b}while(0);if(n>>>0>=f>>>0)return;b=f+4|0;a=c[b>>2]|0;if(!(a&1))return;if(!(a&2)){if((c[2556]|0)==(f|0)){r=(c[2553]|0)+m|0;c[2553]=r;c[2556]=l;c[l+4>>2]=r|1;if((l|0)!=(c[2555]|0))return;c[2555]=0;c[2552]=0;return}if((c[2555]|0)==(f|0)){r=(c[2552]|0)+m|0;c[2552]=r;c[2555]=n;c[l+4>>2]=r|1;c[n+r>>2]=r;return}r=(a&-8)+m|0;x=3?a>>>3:a;do if(a>>>0<256){w=c[f+8>>2]|0;t=c[f+12>>2]|0;if((t|0)==(w|0)){c[2550]=c[2550]&~(1<>2]=t;c[t+8>>2]=w;break}}else{w=c[f+24>>2]|0;t=c[f+12>>2]|0;do if((t|0)==(f|0)){s=f+16|0;d=s+4|0;e=c[d>>2]|0;if(!e){k=c[s>>2]|0;if(!k){y=0;break}else{z=k;A=s}}else{z=e;A=d}d=z;e=A;while(1){s=d+20|0;k=c[s>>2]|0;if(!k){j=d+16|0;q=c[j>>2]|0;if(!q)break;else{B=q;C=j}}else{B=k;C=s}d=B;e=C}c[e>>2]=0;y=d}else{o=c[f+8>>2]|0;c[o+12>>2]=t;c[t+8>>2]=o;y=t}while(0);if(w|0){t=c[f+28>>2]|0;h=10504+(t<<2)|0;if((c[h>>2]|0)==(f|0)){c[h>>2]=y;if(!y){c[2551]=c[2551]&~(1<>2]|0)==(f|0)?t:w+20|0)>>2]=y;if(!y)break}c[y+24>>2]=w;t=f+16|0;h=c[t>>2]|0;if(h|0){c[y+16>>2]=h;c[h+24>>2]=y}h=c[t+4>>2]|0;if(h|0){c[y+20>>2]=h;c[h+24>>2]=y}}}while(0);c[l+4>>2]=r|1;c[n+r>>2]=r;if((l|0)==(c[2555]|0)){c[2552]=r;return}else D=r}else{c[b>>2]=a&-2;c[l+4>>2]=m|1;c[n+m>>2]=m;D=m}m=3?D>>>3:D;if(D>>>0<256){n=10240+(m<<1<<2)|0;a=c[2550]|0;b=1<>2]|0;F=b}c[F>>2]=l;c[E+12>>2]=l;c[l+8>>2]=E;c[l+12>>2]=n;return}n=8?D>>>8:D;if(n)if(D>>>0>16777215)G=31;else{E=n+1048320|0;F=(16?E>>>16:E)&8;E=n<>>16:n)&4;n=E<>>16:E)&2;E=n<>>15:E)|0;E=n+7|0;G=(E?D>>>E:D)&1|n<<1}else G=0;n=10504+(G<<2)|0;c[l+28>>2]=G;c[l+20>>2]=0;c[l+16>>2]=0;E=c[2551]|0;a=1<>2]=l;c[l+24>>2]=n;c[l+12>>2]=l;c[l+8>>2]=l}else{F=c[n>>2]|0;b:do if((c[F+4>>2]&-8|0)==(D|0))H=F;else{b=D<<((G|0)==31?0:25-(1?G>>>1:G)|0);m=F;while(1){I=m+16+((31?b>>>31:b)<<2)|0;r=c[I>>2]|0;if(!r)break;if((c[r+4>>2]&-8|0)==(D|0)){H=r;break b}else{b=b<<1;m=r}}c[I>>2]=l;c[l+24>>2]=m;c[l+12>>2]=l;c[l+8>>2]=l;break a}while(0);F=H+8|0;w=c[F>>2]|0;c[w+12>>2]=l;c[F>>2]=l;c[l+8>>2]=w;c[l+12>>2]=H;c[l+24>>2]=0}while(0);l=(c[2558]|0)+-1|0;c[2558]=l;if(l|0)return;l=10656;while(1){H=c[l>>2]|0;if(!H)break;else l=H+8|0}c[2558]=-1;return}function Re(a,b){a=a|0;b=b|0;var d=0,e=0;if(a){d=r(b,a)|0;if((b|a)>>>0>65535)e=((d>>>0)/(a>>>0)|0|0)==(b|0)?d:-1;else e=d}else e=0;d=Pe(e)|0;if(!d)return d|0;if(!(c[d+-4>>2]&3))return d|0;Nf(d|0,0,e|0)|0;return d|0}function Se(a,b){a=a|0;b=b|0;return 0}function Te(a){a=a|0;return 0}function Ue(a){a=a|0;return 0}function Ve(a){a=a|0;return 0}function We(a){a=a|0;var b=0,d=0,e=0;b=Y;Y=Y+16|0;d=b;e=$e(c[a+60>>2]|0)|0;c[d>>2]=e;e=Ze(I(6,d|0)|0)|0;Y=b;return e|0}function Xe(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;e=Y;Y=Y+48|0;f=e+32|0;g=e+16|0;h=e;i=a+28|0;j=c[i>>2]|0;c[h>>2]=j;k=a+20|0;l=(c[k>>2]|0)-j|0;c[h+4>>2]=l;c[h+8>>2]=b;c[h+12>>2]=d;b=l+d|0;l=a+60|0;c[g>>2]=c[l>>2];c[g+4>>2]=h;c[g+8>>2]=2;j=Ze(H(146,g|0)|0)|0;a:do if((b|0)!=(j|0)){g=2;m=b;n=h;o=j;while(1){if((o|0)<0)break;m=m-o|0;p=c[n+4>>2]|0;q=o>>>0>p>>>0;r=q?n+8|0:n;s=g+(q<<31>>31)|0;t=o-(q?p:0)|0;c[r>>2]=(c[r>>2]|0)+t;p=r+4|0;c[p>>2]=(c[p>>2]|0)-t;c[f>>2]=c[l>>2];c[f+4>>2]=r;c[f+8>>2]=s;o=Ze(H(146,f|0)|0)|0;if((m|0)==(o|0)){u=3;break a}else{g=s;n=r}}c[a+16>>2]=0;c[i>>2]=0;c[k>>2]=0;c[a>>2]=c[a>>2]|32;if((g|0)==2)v=0;else v=d-(c[n+4>>2]|0)|0}else u=3;while(0);if((u|0)==3){u=c[a+44>>2]|0;c[a+16>>2]=u+(c[a+48>>2]|0);a=u;c[i>>2]=a;c[k>>2]=a;v=d}Y=e;return v|0}function Ye(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=Y;Y=Y+32|0;f=e;g=e+20|0;c[f>>2]=c[a+60>>2];c[f+4>>2]=0;c[f+8>>2]=b;c[f+12>>2]=g;c[f+16>>2]=d;if((Ze(G(140,f|0)|0)|0)<0){c[g>>2]=-1;h=-1}else h=c[g>>2]|0;Y=e;return h|0}function Ze(a){a=a|0;var b=0,d=0;if(a>>>0>4294963200){b=_e()|0;c[b>>2]=0-a;d=-1}else d=a;return d|0}function _e(){return 10696}function $e(a){a=a|0;return a|0}function af(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:do if(!d)e=0;else{f=b;g=d;h=c;while(1){i=a[f>>0]|0;j=a[h>>0]|0;if(i<<24>>24!=j<<24>>24)break;g=g+-1|0;if(!g){e=0;break a}else{f=f+1|0;h=h+1|0}}e=(i&255)-(j&255)|0}while(0);return e|0}function bf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;f=d&255;g=(e|0)!=0;a:do if(g&(b&3|0)!=0){h=d&255;i=b;j=e;while(1){if((a[i>>0]|0)==h<<24>>24){k=i;l=j;m=6;break a}n=i+1|0;o=j+-1|0;p=(o|0)!=0;if(p&(n&3|0)!=0){i=n;j=o}else{q=n;s=o;t=p;m=5;break}}}else{q=b;s=e;t=g;m=5}while(0);if((m|0)==5)if(t){k=q;l=s;m=6}else m=16;b:do if((m|0)==6){s=d&255;if((a[k>>0]|0)==s<<24>>24)if(!l){m=16;break}else{u=k;break}q=r(f,16843009)|0;c:do if(l>>>0>3){t=k;g=l;while(1){e=c[t>>2]^q;if((e&-2139062144^-2139062144)&e+-16843009|0){v=g;w=t;break c}e=t+4|0;b=g+-4|0;if(b>>>0>3){t=e;g=b}else{x=e;y=b;m=11;break}}}else{x=k;y=l;m=11}while(0);if((m|0)==11)if(!y){m=16;break}else{v=y;w=x}q=w;g=v;while(1){if((a[q>>0]|0)==s<<24>>24){u=q;break b}g=g+-1|0;if(!g){m=16;break}else q=q+1|0}}while(0);if((m|0)==16)u=0;return u|0}function cf(){return 8300}function df(a){a=a|0;return (a+-48|0)>>>0<10|0}function ef(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=Y;Y=Y+224|0;g=f+208|0;h=f+160|0;i=f+80|0;j=f;k=h;l=k+40|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0));c[g>>2]=c[e>>2];if((ff(0,d,g,i,h)|0)<0)m=-1;else{if((c[b+76>>2]|0)>-1)n=gf(b)|0;else n=0;e=c[b>>2]|0;k=e&32;if((a[b+74>>0]|0)<1)c[b>>2]=e&-33;e=b+48|0;if(!(c[e>>2]|0)){l=b+44|0;o=c[l>>2]|0;c[l>>2]=j;p=b+28|0;c[p>>2]=j;q=b+20|0;c[q>>2]=j;c[e>>2]=80;r=b+16|0;c[r>>2]=j+80;j=ff(b,d,g,i,h)|0;if(!o)s=j;else{ca[c[b+36>>2]&15](b,0,0)|0;t=(c[q>>2]|0)==0?-1:j;c[l>>2]=o;c[e>>2]=0;c[r>>2]=0;c[p>>2]=0;c[q>>2]=0;s=t}}else s=ff(b,d,g,i,h)|0;h=c[b>>2]|0;c[b>>2]=h|k;if(n|0)hf(b);m=(h&32|0)==0?s:-1}Y=f;return m|0}function ff(d,e,f,h,i){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0;j=Y;Y=Y+64|0;k=j+56|0;l=j+40|0;m=j;n=j+48|0;o=j+60|0;c[k>>2]=e;e=(d|0)!=0;p=m+40|0;q=p;r=m+39|0;m=n+4|0;s=0;t=0;u=0;a:while(1){w=s;x=t;while(1){do if((x|0)>-1)if((w|0)>(2147483647-x|0)){y=_e()|0;c[y>>2]=75;z=-1;break}else{z=w+x|0;break}else z=x;while(0);A=c[k>>2]|0;y=a[A>>0]|0;if(!(y<<24>>24)){B=92;break a}C=y;y=A;b:while(1){switch(C<<24>>24){case 37:{B=10;break b;break}case 0:{D=y;break b;break}default:{}}E=y+1|0;c[k>>2]=E;C=a[E>>0]|0;y=E}c:do if((B|0)==10){B=0;C=y;E=y;while(1){if((a[E+1>>0]|0)!=37){D=C;break c}F=C+1|0;E=E+2|0;c[k>>2]=E;if((a[E>>0]|0)!=37){D=F;break}else C=F}}while(0);w=D-A|0;if(e)jf(d,A,w);if(!w)break;else x=z}x=(df(a[(c[k>>2]|0)+1>>0]|0)|0)==0;w=c[k>>2]|0;if(!x?(a[w+2>>0]|0)==36:0){G=(a[w+1>>0]|0)+-48|0;H=1;I=3}else{G=-1;H=u;I=1}x=w+I|0;c[k>>2]=x;w=a[x>>0]|0;y=(w<<24>>24)+-32|0;if(y>>>0>31|(1<>2]=E;F=a[E>>0]|0;C=(F<<24>>24)+-32|0;if(C>>>0>31|(1<>24==42){if((df(a[L+1>>0]|0)|0)!=0?(y=c[k>>2]|0,(a[y+2>>0]|0)==36):0){w=y+1|0;c[i+((a[w>>0]|0)+-48<<2)>>2]=10;M=c[h+((a[w>>0]|0)+-48<<3)>>2]|0;N=1;O=y+3|0}else{if(H|0){P=-1;break}if(e){y=(c[f>>2]|0)+(4-1)&~(4-1);w=c[y>>2]|0;c[f>>2]=y+4;Q=w}else Q=0;M=Q;N=0;O=(c[k>>2]|0)+1|0}c[k>>2]=O;w=(M|0)<0;R=w?0-M|0:M;S=w?J|8192:J;T=N;U=O}else{w=kf(k)|0;if((w|0)<0){P=-1;break}R=w;S=J;T=H;U=c[k>>2]|0}do if((a[U>>0]|0)==46){w=U+1|0;if((a[w>>0]|0)!=42){c[k>>2]=w;w=kf(k)|0;V=w;W=c[k>>2]|0;break}if(df(a[U+2>>0]|0)|0?(w=c[k>>2]|0,(a[w+3>>0]|0)==36):0){y=w+2|0;c[i+((a[y>>0]|0)+-48<<2)>>2]=10;C=c[h+((a[y>>0]|0)+-48<<3)>>2]|0;y=w+4|0;c[k>>2]=y;V=C;W=y;break}if(T|0){P=-1;break a}if(e){y=(c[f>>2]|0)+(4-1)&~(4-1);C=c[y>>2]|0;c[f>>2]=y+4;X=C}else X=0;C=(c[k>>2]|0)+2|0;c[k>>2]=C;V=X;W=C}else{V=-1;W=U}while(0);C=0;y=W;while(1){if(((a[y>>0]|0)+-65|0)>>>0>57){P=-1;break a}w=y;y=y+1|0;c[k>>2]=y;Z=a[(a[w>>0]|0)+-65+(7616+(C*58|0))>>0]|0;_=Z&255;if((_+-1|0)>>>0>=8)break;else C=_}if(!(Z<<24>>24)){P=-1;break}w=(G|0)>-1;do if(Z<<24>>24==19)if(w){P=-1;break a}else B=54;else{if(w){c[i+(G<<2)>>2]=_;E=h+(G<<3)|0;x=c[E+4>>2]|0;F=l;c[F>>2]=c[E>>2];c[F+4>>2]=x;B=54;break}if(!e){P=0;break a}lf(l,_,f);$=c[k>>2]|0;B=55}while(0);if((B|0)==54){B=0;if(e){$=y;B=55}else aa=0}d:do if((B|0)==55){B=0;w=a[$+-1>>0]|0;x=(C|0)!=0&(w&15|0)==3?w&-33:w;w=S&-65537;F=(S&8192|0)==0?S:w;e:do switch(x|0){case 110:{switch((C&255)<<24>>24){case 0:{c[c[l>>2]>>2]=z;aa=0;break d;break}case 1:{c[c[l>>2]>>2]=z;aa=0;break d;break}case 2:{E=c[l>>2]|0;c[E>>2]=z;c[E+4>>2]=((z|0)<0)<<31>>31;aa=0;break d;break}case 3:{b[c[l>>2]>>1]=z;aa=0;break d;break}case 4:{a[c[l>>2]>>0]=z;aa=0;break d;break}case 6:{c[c[l>>2]>>2]=z;aa=0;break d;break}case 7:{E=c[l>>2]|0;c[E>>2]=z;c[E+4>>2]=((z|0)<0)<<31>>31;aa=0;break d;break}default:{aa=0;break d}}break}case 112:{ba=120;ca=V>>>0>8?V:8;da=F|8;B=67;break}case 88:case 120:{ba=x;ca=V;da=F;B=67;break}case 111:{E=l;ea=c[E>>2]|0;fa=c[E+4>>2]|0;E=nf(ea,fa,p)|0;ga=q-E|0;ha=E;ia=0;ja=9285;ka=(F&8|0)==0|(V|0)>(ga|0)?V:ga+1|0;la=F;ma=ea;na=fa;B=73;break}case 105:case 100:{fa=l;ea=c[fa>>2]|0;ga=c[fa+4>>2]|0;if((ga|0)<0){fa=Ef(0,0,ea|0,ga|0)|0;E=v()|0;oa=l;c[oa>>2]=fa;c[oa+4>>2]=E;pa=1;qa=9285;ra=fa;sa=E;B=72;break e}else{pa=(F&2049|0)!=0&1;qa=(F&2048|0)==0?((F&1|0)==0?9285:9287):9286;ra=ea;sa=ga;B=72;break e}break}case 117:{ga=l;pa=0;qa=9285;ra=c[ga>>2]|0;sa=c[ga+4>>2]|0;B=72;break}case 99:{a[r>>0]=c[l>>2];ta=r;ua=0;va=9285;wa=1;xa=w;ya=q;break}case 115:{ga=c[l>>2]|0;ea=(ga|0)==0?9295:ga;ga=bf(ea,0,V)|0;E=(ga|0)==0;ta=ea;ua=0;va=9285;wa=E?V:ga-ea|0;xa=w;ya=E?ea+V|0:ga;break}case 67:{c[n>>2]=c[l>>2];c[m>>2]=0;c[l>>2]=n;za=-1;B=79;break}case 83:{if(!V){pf(d,32,R,0,F);Aa=0;B=89}else{za=V;B=79}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{aa=rf(d,+g[l>>3],R,V,F,x)|0;break d;break}default:{ta=A;ua=0;va=9285;wa=V;xa=F;ya=q}}while(0);f:do if((B|0)==67){B=0;x=l;w=c[x>>2]|0;ga=c[x+4>>2]|0;x=mf(w,ga,p,ba&32)|0;ea=(da&8|0)==0|(w|0)==0&(ga|0)==0;ha=x;ia=ea?0:2;ja=ea?9285:9285+(4?ba>>>4:ba)|0;ka=ca;la=da;ma=w;na=ga;B=73}else if((B|0)==72){B=0;ha=of(ra,sa,p)|0;ia=pa;ja=qa;ka=V;la=F;ma=ra;na=sa;B=73}else if((B|0)==79){B=0;ga=c[l>>2]|0;w=0;while(1){ea=c[ga>>2]|0;if(!ea){Ba=w;break}x=qf(o,ea)|0;Ca=(x|0)<0;if(Ca|x>>>0>(za-w|0)>>>0){B=83;break}ea=x+w|0;if(za>>>0>ea>>>0){ga=ga+4|0;w=ea}else{Ba=ea;break}}if((B|0)==83){B=0;if(Ca){P=-1;break a}else Ba=w}pf(d,32,R,Ba,F);if(!Ba){Aa=0;B=89}else{ga=c[l>>2]|0;ea=0;while(1){x=c[ga>>2]|0;if(!x){Aa=Ba;B=89;break f}E=qf(o,x)|0;ea=E+ea|0;if((ea|0)>(Ba|0)){Aa=Ba;B=89;break f}jf(d,o,E);if(ea>>>0>=Ba>>>0){Aa=Ba;B=89;break}else ga=ga+4|0}}}while(0);if((B|0)==73){B=0;ga=(ma|0)!=0|(na|0)!=0;ea=(ka|0)!=0|ga;w=q-ha+((ga^1)&1)|0;ta=ea?ha:p;ua=ia;va=ja;wa=ea?((ka|0)>(w|0)?ka:w):0;xa=(ka|0)>-1?la&-65537:la;ya=q}else if((B|0)==89){B=0;pf(d,32,R,Aa,F^8192);aa=(R|0)>(Aa|0)?R:Aa;break}w=ya-ta|0;ea=(wa|0)<(w|0)?w:wa;ga=ea+ua|0;E=(R|0)<(ga|0)?ga:R;pf(d,32,E,ga,xa);jf(d,va,ua);pf(d,48,E,ga,xa^65536);pf(d,48,ea,w,0);jf(d,ta,w);pf(d,32,E,ga,xa^8192);aa=E}while(0);s=aa;t=z;u=T}g:do if((B|0)==92)if(!d)if(!u)P=0;else{T=1;while(1){t=c[i+(T<<2)>>2]|0;if(!t)break;lf(h+(T<<3)|0,t,f);t=T+1|0;if(t>>>0<10)T=t;else{P=1;break g}}t=T;while(1){if(c[i+(t<<2)>>2]|0){P=-1;break g}t=t+1|0;if(t>>>0>=10){P=1;break}}}else P=z;while(0);Y=j;return P|0}function gf(a){a=a|0;return 1}function hf(a){a=a|0;return}function jf(a,b,d){a=a|0;b=b|0;d=d|0;if(!(c[a>>2]&32))xf(b,d,a)|0;return}function kf(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;if(!(df(a[c[b>>2]>>0]|0)|0))d=0;else{e=0;while(1){f=c[b>>2]|0;g=(e*10|0)+-48+(a[f>>0]|0)|0;h=f+1|0;c[b>>2]=h;if(!(df(a[h>>0]|0)|0)){d=g;break}else e=g}}return d|0}function lf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=f;break a;break}case 10:{f=(c[d>>2]|0)+(4-1)&~(4-1);e=c[f>>2]|0;c[d>>2]=f+4;f=a;c[f>>2]=e;c[f+4>>2]=((e|0)<0)<<31>>31;break a;break}case 11:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;e=a;c[e>>2]=f;c[e+4>>2]=0;break a;break}case 12:{e=(c[d>>2]|0)+(8-1)&~(8-1);f=e;h=c[f>>2]|0;i=c[f+4>>2]|0;c[d>>2]=e+8;e=a;c[e>>2]=h;c[e+4>>2]=i;break a;break}case 13:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=(e&65535)<<16>>16;e=a;c[e>>2]=i;c[e+4>>2]=((i|0)<0)<<31>>31;break a;break}case 14:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=a;c[i>>2]=e&65535;c[i+4>>2]=0;break a;break}case 15:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=(e&255)<<24>>24;e=a;c[e>>2]=i;c[e+4>>2]=((i|0)<0)<<31>>31;break a;break}case 16:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=a;c[i>>2]=e&255;c[i+4>>2]=0;break a;break}case 17:{i=(c[d>>2]|0)+(8-1)&~(8-1);j=+g[i>>3];c[d>>2]=i+8;g[a>>3]=j;break a;break}case 18:{i=(c[d>>2]|0)+(8-1)&~(8-1);j=+g[i>>3];c[d>>2]=i+8;g[a>>3]=j;break a;break}default:break a}while(0);while(0);return}function mf(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0;if((b|0)==0&(c|0)==0)g=e;else{h=e;e=c;c=b;while(1){b=h+-1|0;a[b>>0]=d[8080+(c&15)>>0]|0|f;c=If(c|0,e|0,4)|0;e=v()|0;if((c|0)==0&(e|0)==0){g=b;break}else h=b}}return g|0}function nf(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;if((b|0)==0&(c|0)==0)e=d;else{f=d;d=c;c=b;while(1){b=f+-1|0;a[b>>0]=c&7|48;c=If(c|0,d|0,3)|0;d=v()|0;if((c|0)==0&(d|0)==0){e=b;break}else f=b}}return e|0}function of(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if(c>>>0>0|(c|0)==0&b>>>0>4294967295){e=d;f=b;g=c;do{c=f;f=Hf(f|0,g|0,10,0)|0;h=g;g=v()|0;i=Cf(f|0,g|0,10,0)|0;j=Ef(c|0,h|0,i|0,v()|0)|0;v()|0;e=e+-1|0;a[e>>0]=j&255|48}while(h>>>0>9|(h|0)==9&c>>>0>4294967295);k=f;l=e}else{k=b;l=d}if(!k)m=l;else{d=k;k=l;while(1){l=d;d=(d>>>0)/10|0;b=k+-1|0;a[b>>0]=l-(d*10|0)|48;if(l>>>0<10){m=b;break}else k=b}}return m|0}function pf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=Y;Y=Y+256|0;g=f;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;Nf(g|0,b<<24>>24|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;d=e;do{jf(a,g,256);d=d+-256|0}while(d>>>0>255);h=b&255}else h=e;jf(a,g,h)}Y=f;return}function qf(a,b){a=a|0;b=b|0;var c=0;if(!a)c=0;else c=vf(a,b,0)|0;return c|0}function rf(b,e,f,g,h,i){b=b|0;e=+e;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0.0,u=0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0,H=0,I=0,J=0.0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0.0,ja=0.0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;j=Y;Y=Y+560|0;k=j+32|0;l=j+536|0;m=j;n=m;o=j+540|0;c[l>>2]=0;p=o+12|0;q=sf(e)|0;s=v()|0;if((s|0)<0){t=-e;u=sf(t)|0;w=t;x=1;y=9302;z=v()|0;A=u}else{w=e;x=(h&2049|0)!=0&1;y=(h&2048|0)==0?((h&1|0)==0?9303:9308):9305;z=s;A=q}do if(0==0&(z&2146435072|0)==2146435072){q=(i&32|0)!=0;A=x+3|0;pf(b,32,f,A,h&-65537);jf(b,y,x);jf(b,w!=w|0.0!=0.0?(q?9329:9333):q?9321:9325,3);pf(b,32,f,A,h^8192);B=A}else{e=+tf(w,l)*2.0;A=e!=0.0;if(A)c[l>>2]=(c[l>>2]|0)+-1;q=i|32;if((q|0)==97){s=i&32;u=(s|0)==0?y:y+9|0;C=x|2;D=12-g|0;do if(!(g>>>0>11|(D|0)==0)){t=8.0;E=D;do{E=E+-1|0;t=t*16.0}while((E|0)!=0);if((a[u>>0]|0)==45){F=-(t+(-e-t));break}else{F=e+t-t;break}}else F=e;while(0);D=c[l>>2]|0;E=(D|0)<0?0-D|0:D;G=of(E,((E|0)<0)<<31>>31,p)|0;if((G|0)==(p|0)){E=o+11|0;a[E>>0]=48;H=E}else H=G;a[H+-1>>0]=((31?D>>31:D)&2)+43;D=H+-2|0;a[D>>0]=i+15;G=(g|0)<1;E=(h&8|0)==0;I=m;J=F;while(1){K=~~J;L=I+1|0;a[I>>0]=s|d[8080+K>>0];J=(J-+(K|0))*16.0;if((L-n|0)==1?!(E&(G&J==0.0)):0){a[L>>0]=46;M=I+2|0}else M=L;if(!(J!=0.0))break;else I=M}I=M;if((g|0)!=0?(-2-n+I|0)<(g|0):0){G=p;E=D;N=g+2+G-E|0;O=G;P=E}else{E=p;G=D;N=E-n-G+I|0;O=E;P=G}G=N+C|0;pf(b,32,f,G,h);jf(b,u,C);pf(b,48,f,G,h^65536);E=I-n|0;jf(b,m,E);I=O-P|0;pf(b,48,N-(E+I)|0,0,0);jf(b,D,I);pf(b,32,f,G,h^8192);B=G;break}G=(g|0)<0?6:g;if(A){I=(c[l>>2]|0)+-28|0;c[l>>2]=I;Q=e*268435456.0;R=I}else{Q=e;R=c[l>>2]|0}I=(R|0)<0?k:k+288|0;E=I;J=Q;do{s=~~J>>>0;c[E>>2]=s;E=E+4|0;J=(J-+(s>>>0))*1.0e9}while(J!=0.0);A=I;if((R|0)>0){D=I;C=E;u=R;while(1){s=(u|0)<29?u:29;L=C+-4|0;if(L>>>0>=D>>>0){K=L;L=0;do{S=Jf(c[K>>2]|0,0,s|0)|0;T=Df(S|0,v()|0,L|0,0)|0;S=v()|0;L=Hf(T|0,S|0,1e9,0)|0;U=Cf(L|0,v()|0,1e9,0)|0;V=Ef(T|0,S|0,U|0,v()|0)|0;v()|0;c[K>>2]=V;K=K+-4|0}while(K>>>0>=D>>>0);if(L){K=D+-4|0;c[K>>2]=L;W=K}else W=D}else W=D;a:do if(C>>>0>W>>>0){K=C;while(1){V=K+-4|0;if(c[V>>2]|0){X=K;break a}if(V>>>0>W>>>0)K=V;else{X=V;break}}}else X=C;while(0);L=(c[l>>2]|0)-s|0;c[l>>2]=L;if((L|0)>0){D=W;C=X;u=L}else{Z=W;_=X;$=L;break}}}else{Z=I;_=E;$=R}if(($|0)<0){u=((G+25|0)/9|0)+1|0;C=(q|0)==102;D=Z;L=_;K=$;while(1){V=0-K|0;U=(V|0)<9?V:9;if(D>>>0>>0){V=(1<>>U:1e9;T=0;aa=D;do{ba=c[aa>>2]|0;c[aa>>2]=(U?ba>>>U:ba)+T;T=r(ba&V,S)|0;aa=aa+4|0}while(aa>>>0>>0);aa=(c[D>>2]|0)==0?D+4|0:D;if(!T){ca=L;da=aa}else{c[L>>2]=T;ca=L+4|0;da=aa}}else{ca=L;da=(c[D>>2]|0)==0?D+4|0:D}aa=C?I:da;S=ca-aa|0;V=((2?S>>2:S)|0)>(u|0)?aa+(u<<2)|0:ca;K=(c[l>>2]|0)+U|0;c[l>>2]=K;if((K|0)>=0){ea=da;fa=V;break}else{D=da;L=V}}}else{ea=Z;fa=_}if(ea>>>0>>0){L=A-ea|0;D=(2?L>>2:L)*9|0;L=c[ea>>2]|0;if(L>>>0<10)ga=D;else{K=D;D=10;while(1){D=D*10|0;u=K+1|0;if(L>>>0>>0){ga=u;break}else K=u}}}else ga=0;K=(q|0)==103;D=(G|0)!=0;L=G-((q|0)==102?0:ga)+((D&K)<<31>>31)|0;u=fa-A|0;if((L|0)<(((2?u>>2:u)*9|0)+-9|0)){u=L+9216|0;L=(u|0)/9|0;C=I+4+(L+-1024<<2)|0;E=u-(L*9|0)|0;if((E|0)<8){L=E;E=10;while(1){u=E*10|0;if((L|0)<7){L=L+1|0;E=u}else{ha=u;break}}}else ha=10;E=c[C>>2]|0;L=(E>>>0)/(ha>>>0)|0;q=E-(r(L,ha)|0)|0;u=(C+4|0)==(fa|0);if(!(u&(q|0)==0)){t=(L&1|0)==0?9007199254740992.0:9007199254740994.0;L=1?ha>>>1:ha;J=q>>>0>>0?.5:u&(q|0)==(L|0)?1.0:1.5;if(!x){ia=J;ja=t}else{L=(a[y>>0]|0)==45;ia=L?-J:J;ja=L?-t:t}L=E-q|0;c[C>>2]=L;if(ja+ia!=ja){q=L+ha|0;c[C>>2]=q;if(q>>>0>999999999){q=C;L=ea;while(1){E=q+-4|0;c[q>>2]=0;if(E>>>0>>0){u=L+-4|0;c[u>>2]=0;ka=u}else ka=L;u=(c[E>>2]|0)+1|0;c[E>>2]=u;if(u>>>0>999999999){q=E;L=ka}else{la=E;ma=ka;break}}}else{la=C;ma=ea}L=A-ma|0;q=(2?L>>2:L)*9|0;L=c[ma>>2]|0;if(L>>>0<10){na=la;oa=q;pa=ma}else{E=q;q=10;while(1){q=q*10|0;u=E+1|0;if(L>>>0>>0){na=la;oa=u;pa=ma;break}else E=u}}}else{na=C;oa=ga;pa=ea}}else{na=C;oa=ga;pa=ea}E=na+4|0;qa=oa;ra=fa>>>0>E>>>0?E:fa;sa=pa}else{qa=ga;ra=fa;sa=ea}E=0-qa|0;b:do if(ra>>>0>sa>>>0){q=ra;while(1){L=q+-4|0;if(c[L>>2]|0){ta=q;ua=1;break b}if(L>>>0>sa>>>0)q=L;else{ta=L;ua=0;break}}}else{ta=ra;ua=0}while(0);do if(K){C=G+((D^1)&1)|0;if((C|0)>(qa|0)&(qa|0)>-5){va=i+-1|0;wa=C+-1-qa|0}else{va=i+-2|0;wa=C+-1|0}if(!(h&8)){if(ua?(C=c[ta+-4>>2]|0,(C|0)!=0):0)if(!((C>>>0)%10|0)){q=0;U=10;while(1){U=U*10|0;T=q+1|0;if((C>>>0)%(U>>>0)|0|0){xa=T;break}else q=T}}else xa=0;else xa=9;q=ta-A|0;U=((2?q>>2:q)*9|0)+-9|0;if((va|32|0)==102){q=U-xa|0;C=(q|0)>0?q:0;ya=va;za=(wa|0)<(C|0)?wa:C;break}else{C=U+qa-xa|0;U=(C|0)>0?C:0;ya=va;za=(wa|0)<(U|0)?wa:U;break}}else{ya=va;za=wa}}else{ya=i;za=G}while(0);G=(za|0)!=0;A=G?1:(3?h>>>3:h)&1;D=(ya|32|0)==102;if(D){Aa=0;Ba=(qa|0)>0?qa:0}else{K=(qa|0)<0?E:qa;U=of(K,((K|0)<0)<<31>>31,p)|0;K=p;if((K-U|0)<2){C=U;while(1){q=C+-1|0;a[q>>0]=48;if((K-q|0)<2)C=q;else{Ca=q;break}}}else Ca=U;a[Ca+-1>>0]=((31?qa>>31:qa)&2)+43;C=Ca+-2|0;a[C>>0]=ya;Aa=C;Ba=K-C|0}C=x+1+za+A+Ba|0;pf(b,32,f,C,h);jf(b,y,x);pf(b,48,f,C,h^65536);if(D){E=sa>>>0>I>>>0?I:sa;q=m+9|0;T=q;L=m+8|0;u=E;do{V=of(c[u>>2]|0,0,q)|0;if((u|0)==(E|0))if((V|0)==(q|0)){a[L>>0]=48;Da=L}else Da=V;else if(V>>>0>m>>>0){Nf(m|0,48,V-n|0)|0;aa=V;while(1){S=aa+-1|0;if(S>>>0>m>>>0)aa=S;else{Da=S;break}}}else Da=V;jf(b,Da,T-Da|0);u=u+4|0}while(u>>>0<=I>>>0);if(!((h&8|0)==0&(G^1)))jf(b,9337,1);if(u>>>0>>0&(za|0)>0){I=za;T=u;while(1){L=of(c[T>>2]|0,0,q)|0;if(L>>>0>m>>>0){Nf(m|0,48,L-n|0)|0;E=L;while(1){D=E+-1|0;if(D>>>0>m>>>0)E=D;else{Ea=D;break}}}else Ea=L;jf(b,Ea,(I|0)<9?I:9);T=T+4|0;E=I+-9|0;if(!(T>>>0>>0&(I|0)>9)){Fa=E;break}else I=E}}else Fa=za;pf(b,48,Fa+9|0,9,0)}else{I=ua?ta:sa+4|0;if(sa>>>0>>0&(za|0)>-1){T=m+9|0;q=(h&8|0)==0;u=T;G=0-n|0;E=m+8|0;V=za;D=sa;while(1){A=of(c[D>>2]|0,0,T)|0;if((A|0)==(T|0)){a[E>>0]=48;Ga=E}else Ga=A;do if((D|0)==(sa|0)){A=Ga+1|0;jf(b,Ga,1);if(q&(V|0)<1){Ha=A;break}jf(b,9337,1);Ha=A}else{if(Ga>>>0<=m>>>0){Ha=Ga;break}Nf(m|0,48,Ga+G|0)|0;A=Ga;while(1){K=A+-1|0;if(K>>>0>m>>>0)A=K;else{Ha=K;break}}}while(0);L=u-Ha|0;jf(b,Ha,(V|0)>(L|0)?L:V);A=V-L|0;D=D+4|0;if(!(D>>>0>>0&(A|0)>-1)){Ia=A;break}else V=A}}else Ia=za;pf(b,48,Ia+18|0,18,0);jf(b,Aa,p-Aa|0)}pf(b,32,f,C,h^8192);B=C}while(0);Y=j;return ((B|0)<(f|0)?f:B)|0}function sf(a){a=+a;var b=0;g[h>>3]=a;b=c[h>>2]|0;u(c[h+4>>2]|0);return b|0}function tf(a,b){a=+a;b=b|0;return +(+uf(a,b))}function uf(a,b){a=+a;b=b|0;var d=0,e=0,f=0,i=0.0,j=0.0,k=0,l=0.0;g[h>>3]=a;d=c[h>>2]|0;e=c[h+4>>2]|0;f=If(d|0,e|0,52)|0;v()|0;switch(f&2047){case 0:{if(a!=0.0){i=+uf(a*18446744073709551616.0,b);j=i;k=(c[b>>2]|0)+-64|0}else{j=a;k=0}c[b>>2]=k;l=j;break}case 2047:{l=a;break}default:{c[b>>2]=(f&2047)+-1022;c[h>>2]=d;c[h+4>>2]=e&-2146435073|1071644672;l=+g[h>>3]}}return +l}function vf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;do if(b){if(d>>>0<128){a[b>>0]=d;f=1;break}e=(wf()|0)+188|0;if(!(c[c[e>>2]>>2]|0))if((d&-128|0)==57216){a[b>>0]=d;f=1;break}else{e=_e()|0;c[e>>2]=84;f=-1;break}if(d>>>0<2048){a[b>>0]=(6?d>>>6:d)|192;a[b+1>>0]=d&63|128;f=2;break}if(d>>>0<55296|(d&-8192|0)==57344){a[b>>0]=(12?d>>>12:d)|224;a[b+1>>0]=(6?d>>>6:d)&63|128;a[b+2>>0]=d&63|128;f=3;break}if((d+-65536|0)>>>0<1048576){a[b>>0]=(18?d>>>18:d)|240;a[b+1>>0]=(12?d>>>12:d)&63|128;a[b+2>>0]=(6?d>>>6:d)&63|128;a[b+3>>0]=d&63|128;f=4;break}else{e=_e()|0;c[e>>2]=84;f=-1;break}}else f=1;while(0);return f|0}function wf(){return cf()|0}function xf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=e+16|0;g=c[f>>2]|0;if(!g)if(!(yf(e)|0)){h=c[f>>2]|0;i=5}else j=0;else{h=g;i=5}a:do if((i|0)==5){g=e+20|0;f=c[g>>2]|0;k=f;if((h-f|0)>>>0>>0){j=ca[c[e+36>>2]&15](e,b,d)|0;break}b:do if((a[e+75>>0]|0)<0|(d|0)==0){l=0;m=b;n=d;o=k}else{f=d;while(1){p=f+-1|0;if((a[b+p>>0]|0)==10)break;if(!p){l=0;m=b;n=d;o=k;break b}else f=p}p=ca[c[e+36>>2]&15](e,b,f)|0;if(p>>>0>>0){j=p;break a}l=f;m=b+f|0;n=d-f|0;o=c[g>>2]|0}while(0);Lf(o|0,m|0,n|0)|0;c[g>>2]=(c[g>>2]|0)+n;j=l+n|0}while(0);return j|0}function yf(b){b=b|0;var d=0,e=0,f=0;d=b+74|0;e=a[d>>0]|0;a[d>>0]=e+255|e;e=c[b>>2]|0;if(!(e&8)){c[b+8>>2]=0;c[b+4>>2]=0;d=c[b+44>>2]|0;c[b+28>>2]=d;c[b+20>>2]=d;c[b+16>>2]=d+(c[b+48>>2]|0);f=0}else{c[b>>2]=e|32;f=-1}return f|0}function zf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=r(d,b)|0;g=(b|0)==0?0:d;if((c[e+76>>2]|0)>-1){d=(gf(e)|0)==0;h=xf(a,f,e)|0;if(d)i=h;else{hf(e);i=h}}else i=xf(a,f,e)|0;if((i|0)==(f|0))j=g;else j=(i>>>0)/(b>>>0)|0;return j|0}function Af(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=Y;Y=Y+16|0;f=e;c[f>>2]=d;d=ef(a,b,f)|0;Y=e;return d|0}function Bf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=r(d,c)|0;f=a>>>16;a=(e>>>16)+(r(d,f)|0)|0;d=b>>>16;b=r(d,c)|0;return (u((a>>>16)+(r(d,f)|0)+(((a&65535)+b|0)>>>16)|0),a+b<<16|e&65535|0)|0}function Cf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=Bf(e,a)|0;f=v()|0;return (u((r(b,a)|0)+(r(d,e)|0)+f|f&0|0),c|0|0)|0}function Df(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return (u(b+d+(e>>>0>>0|0)>>>0|0),e|0)|0}function Ef(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return (u(e|0),a-c>>>0|0)|0}function Ff(a){a=a|0;return (a?31-(s(a^a-1)|0)|0:32)|0}function Gf(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;g=a;h=b;i=h;j=d;k=e;l=k;if(!i){m=(f|0)!=0;if(!l){if(m){c[f>>2]=(g>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return (u(n|0),o)|0}else{if(!m){n=0;o=0;return (u(n|0),o)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;o=0;return (u(n|0),o)|0}}m=(l|0)==0;do if(j){if(!m){p=(s(l|0)|0)-(s(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;t=p-31>>31;w=q;x=g>>>(q>>>0)&t|i<>>(q>>>0)&t;z=0;A=g<>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return (u(n|0),o)|0}r=j-1|0;if(r&j|0){t=(s(j|0)|0)+33-(s(i|0)|0)|0;q=64-t|0;p=32-t|0;B=p>>31;C=t-32|0;D=C>>31;w=t;x=p-1>>31&i>>>(C>>>0)|(i<>>(t>>>0))&D;y=D&i>>>(t>>>0);z=g<>>(C>>>0))&B|g<>31;break}if(f|0){c[f>>2]=r&g;c[f+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return (u(n|0),o)|0}else{r=Ff(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return (u(n|0),o)|0}}else{if(m){if(f|0){c[f>>2]=(i>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return (u(n|0),o)|0}if(!g){if(f|0){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return (u(n|0),o)|0}r=l-1|0;if(!(r&l)){if(f|0){c[f>>2]=a|0;c[f+4>>2]=r&i|b&0}n=0;o=i>>>((Ff(l|0)|0)>>>0);return (u(n|0),o)|0}r=(s(l|0)|0)-(s(i|0)|0)|0;if(r>>>0<=30){t=r+1|0;p=31-r|0;w=t;x=i<>>(t>>>0);y=i>>>(t>>>0);z=0;A=g<>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return (u(n|0),o)|0}while(0);if(!w){E=A;F=z;G=y;H=x;I=0;J=0}else{b=d|0|0;d=k|e&0;e=Df(b|0,d|0,-1,-1)|0;k=v()|0;h=A;A=z;z=y;y=x;x=w;w=0;do{a=h;h=A>>>31|h<<1;A=w|A<<1;g=y<<1|a>>>31|0;a=y>>>31|z<<1|0;Ef(e|0,k|0,g|0,a|0)|0;i=v()|0;l=i>>31|((i|0)<0?-1:0)<<1;w=l&1;y=Ef(g|0,a|0,l&b|0,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&d|0)|0;z=v()|0;x=x-1|0}while((x|0)!=0);E=h;F=A;G=z;H=y;I=0;J=w}w=F;F=0;if(f|0){c[f>>2]=H;c[f+4>>2]=G}n=(w|0)>>>31|(E|F)<<1|(F<<1|w>>>31)&0|I;o=(w<<1|0>>>31)&-2|J;return (u(n|0),o)|0}function Hf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Gf(a,b,c,d,0)|0}function If(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){u(b>>>c|0);return a>>>c|(b&(1<>>c-32|0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){u(b<>>32-c|0);return a<>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Lf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192){L(b|0,d|0,e|0)|0;return b|0}f=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}h=g&-4|0;e=h-64|0;while((b|0)<=(e|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(h|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{h=g-4|0;while((b|0)<(h|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return f|0}function Mf(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else Lf(b,c,d)|0;return b|0}function Nf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}g=f&-4|0;h=d|d<<8|d<<16|d<<24;i=g-64|0;while((b|0)<=(i|0)){c[b>>2]=h;c[b+4>>2]=h;c[b+8>>2]=h;c[b+12>>2]=h;c[b+16>>2]=h;c[b+20>>2]=h;c[b+24>>2]=h;c[b+28>>2]=h;c[b+32>>2]=h;c[b+36>>2]=h;c[b+40>>2]=h;c[b+44>>2]=h;c[b+48>>2]=h;c[b+52>>2]=h;c[b+56>>2]=h;c[b+60>>2]=h;b=b+64|0}while((b|0)<(g|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return f-e|0}function Of(a){a=a|0;var b=0,d=0;b=c[i>>2]|0;d=b+a|0;if((a|0)>0&(d|0)<(b|0)|(d|0)<0){V(d|0)|0;F(12);return -1}if((d|0)>(J()|0)?(M(d|0)|0)==0:0){F(12);return -1}c[i>>2]=d;return b|0}function Pf(a,b){a=a|0;b=b|0;return aa[a&7](b|0)|0}function Qf(a,b,c){a=a|0;b=b|0;c=c|0;return ba[a&31](b|0,c|0)|0}function Rf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ca[a&15](b|0,c|0,d|0)|0}function Sf(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return da[a&1](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Tf(a,b){a=a|0;b=b|0;ea[a&31](b|0)}function Uf(a,b,c){a=a|0;b=b|0;c=c|0;fa[a&3](b|0,c|0)}function Vf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ga[a&31](b|0,c|0,d|0,e|0)}function Wf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ha[a&31](b|0,c|0,d|0,e|0,f|0)}function Xf(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;ia[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Yf(a){a=a|0;t(0);return 0}function Zf(a,b){a=a|0;b=b|0;t(1);return 0}function _f(a,b,c){a=a|0;b=b|0;c=c|0;t(2);return 0}function $f(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;t(3);return 0}function ag(a){a=a|0;t(4)}function bg(a,b){a=a|0;b=b|0;t(5)}function cg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;t(6)}function dg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;t(7)}function eg(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;t(8)}\n\n// EMSCRIPTEN_END_FUNCS\nvar aa=[Yf,gd,hd,We,Rb,Sb,ld,Yf];var ba=[Zf,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,Xb,ac,dc,ec,fc,dd,Zf,Zf,Zf,Zf,Zf,Zf,Zf,Zf,Zf,Zf,Zf];var ca=[_f,Xe,Ye,Zb,bc,hc,gc,$b,_b,ic,_f,_f,_f,_f,_f,_f];var da=[$f,Je];var ea=[ag,fd,id,jd,kd,Tb,Md,Nd,Od,Pd,Qd,Rd,Sd,Td,Ud,Vd,Wd,Xd,Yd,Zd,_d,$d,ae,be,ce,de,ee,fe,ge,he,ag,ag];var fa=[bg,Ha,Ka,bg];var ga=[cg,Nc,Oc,Pc,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg];var ha=[dg,Qc,Rc,Sc,tc,uc,vc,wc,xc,yc,zc,kc,lc,mc,nc,oc,pc,qc,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg];var ia=[eg,Fc,Gc,Hc,Ic,Jc,Kc,Lc];return{_WebpToSDL:na,___errno_location:_e,___muldi3:Cf,___udivdi3:Hf,_bitshift64Lshr:If,_bitshift64Shl:Jf,_emscripten_replace_memory:$,_free:Qe,_i64Add:Df,_i64Subtract:Ef,_llvm_bswap_i32:Kf,_malloc:Pe,_memcpy:Lf,_memmove:Mf,_memset:Nf,_sbrk:Of,dynCall_ii:Pf,dynCall_iii:Qf,dynCall_iiii:Rf,dynCall_iiiiiii:Sf,dynCall_vi:Tf,dynCall_vii:Uf,dynCall_viiii:Vf,dynCall_viiiii:Wf,dynCall_viiiiiiiii:Xf,establishStackSpace:ma,stackAlloc:ja,stackRestore:la,stackSave:ka}})\n\n\n// EMSCRIPTEN_END_ASM\n(asmGlobalArg,asmLibraryArg,buffer);var _WebpToSDL=Module[\"_WebpToSDL\"]=asm[\"_WebpToSDL\"];var ___errno_location=Module[\"___errno_location\"]=asm[\"___errno_location\"];var ___muldi3=Module[\"___muldi3\"]=asm[\"___muldi3\"];var ___udivdi3=Module[\"___udivdi3\"]=asm[\"___udivdi3\"];var _bitshift64Lshr=Module[\"_bitshift64Lshr\"]=asm[\"_bitshift64Lshr\"];var _bitshift64Shl=Module[\"_bitshift64Shl\"]=asm[\"_bitshift64Shl\"];var _emscripten_replace_memory=Module[\"_emscripten_replace_memory\"]=asm[\"_emscripten_replace_memory\"];var _free=Module[\"_free\"]=asm[\"_free\"];var _i64Add=Module[\"_i64Add\"]=asm[\"_i64Add\"];var _i64Subtract=Module[\"_i64Subtract\"]=asm[\"_i64Subtract\"];var _llvm_bswap_i32=Module[\"_llvm_bswap_i32\"]=asm[\"_llvm_bswap_i32\"];var _malloc=Module[\"_malloc\"]=asm[\"_malloc\"];var _memcpy=Module[\"_memcpy\"]=asm[\"_memcpy\"];var _memmove=Module[\"_memmove\"]=asm[\"_memmove\"];var _memset=Module[\"_memset\"]=asm[\"_memset\"];var _sbrk=Module[\"_sbrk\"]=asm[\"_sbrk\"];var establishStackSpace=Module[\"establishStackSpace\"]=asm[\"establishStackSpace\"];var stackAlloc=Module[\"stackAlloc\"]=asm[\"stackAlloc\"];var stackRestore=Module[\"stackRestore\"]=asm[\"stackRestore\"];var stackSave=Module[\"stackSave\"]=asm[\"stackSave\"];var dynCall_ii=Module[\"dynCall_ii\"]=asm[\"dynCall_ii\"];var dynCall_iii=Module[\"dynCall_iii\"]=asm[\"dynCall_iii\"];var dynCall_iiii=Module[\"dynCall_iiii\"]=asm[\"dynCall_iiii\"];var dynCall_iiiiiii=Module[\"dynCall_iiiiiii\"]=asm[\"dynCall_iiiiiii\"];var dynCall_vi=Module[\"dynCall_vi\"]=asm[\"dynCall_vi\"];var dynCall_vii=Module[\"dynCall_vii\"]=asm[\"dynCall_vii\"];var dynCall_viiii=Module[\"dynCall_viiii\"]=asm[\"dynCall_viiii\"];var dynCall_viiiii=Module[\"dynCall_viiiii\"]=asm[\"dynCall_viiiii\"];var dynCall_viiiiiiiii=Module[\"dynCall_viiiiiiiii\"]=asm[\"dynCall_viiiiiiiii\"];Module[\"asm\"]=asm;Module[\"cwrap\"]=cwrap;if(memoryInitializer){if(!isDataURI(memoryInitializer)){memoryInitializer=locateFile(memoryInitializer)}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module[\"readBinary\"](memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency(\"memory initializer\");var applyMemoryInitializer=function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,GLOBAL_BASE);if(Module[\"memoryInitializerRequest\"])delete Module[\"memoryInitializerRequest\"].response;removeRunDependency(\"memory initializer\")};var doBrowserLoad=function(){Module[\"readAsync\"](memoryInitializer,applyMemoryInitializer,function(){throw\"could not load memory initializer \"+memoryInitializer})};var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module[\"memoryInitializerRequest\"]){var useRequest=function(){var request=Module[\"memoryInitializerRequest\"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module[\"memoryInitializerRequestURL\"]);if(data){response=data.buffer}else{console.warn(\"a problem seems to have happened with Module.memoryInitializerRequest, status: \"+request.status+\", retrying \"+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)};if(Module[\"memoryInitializerRequest\"].response){setTimeout(useRequest,0)}else{Module[\"memoryInitializerRequest\"].addEventListener(\"load\",useRequest)}}else{doBrowserLoad()}}}function ExitStatus(status){this.name=\"ExitStatus\";this.message=\"Program terminated with exit(\"+status+\")\";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;dependenciesFulfilled=function runCaller(){if(!Module[\"calledRun\"])run();if(!Module[\"calledRun\"])dependenciesFulfilled=runCaller};function run(args){args=args||Module[\"arguments\"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module[\"calledRun\"])return;function doRun(){if(Module[\"calledRun\"])return;Module[\"calledRun\"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}}Module[\"run\"]=run;function abort(what){if(Module[\"onAbort\"]){Module[\"onAbort\"](what)}if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=\"\"}ABORT=true;EXITSTATUS=1;throw\"abort(\"+what+\"). Build with -s ASSERTIONS=1 for more info.\"}Module[\"abort\"]=abort;if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}Module[\"noExitRuntime\"]=true;run();\n\n\n\tthis.Module = Module\n\tthis.webpToSdl = Module.cwrap(\"WebpToSDL\", \"number\", [\"array\", \"number\"])\n\tthis.setCanvas = function(canvas) { Module.canvas = canvas }\n}\n\nexport {Webp}\n" }, { - "id": 82, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/src/lib/ckin.js", - "name": "./src/lib/ckin.js", - "index": 78, - "index2": 67, - "size": 11282, + "id": 80, + "identifier": "F:\\tweb\\node_modules\\webp-hero\\dist\\detect-webp-support.js", + "name": "./node_modules/webp-hero/dist/detect-webp-support.js", + "index": 80, + "index2": 79, + "size": 729, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ - 0 + 4 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "issuerId": 30, - "issuerName": "./src/components/wrappers.ts", + "issuer": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\webp.ts", + "issuerId": 75, + "issuerName": "./src/lib/webp.ts", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", - "name": "./src/index.ts", - "profile": { - "factory": 41, - "building": 1632 - } - }, - { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", - "profile": { - "factory": 633, - "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 - } - }, - { - "id": 19, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 - } - }, - { - "id": 30, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "name": "./src/components/wrappers.ts", + "id": 75, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\webp.ts", + "name": "./src/lib/webp.ts", "profile": { - "factory": 208, - "building": 300, - "dependencies": 449 + "factory": 141, + "building": 1440 } } ], "profile": { - "factory": 451, - "building": 74 + "factory": 184, + "building": 561 }, "failed": false, "errors": 0, @@ -8058,87 +7810,102 @@ "assets": [], "reasons": [ { - "moduleId": 30, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/wrappers.ts", - "module": "./src/components/wrappers.ts", - "moduleName": "./src/components/wrappers.ts", + "moduleId": 75, + "moduleIdentifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\lib\\webp.ts", + "module": "./src/lib/webp.ts", + "moduleName": "./src/lib/webp.ts", "type": "cjs require", - "userRequest": "../lib/ckin", - "loc": "24:15-37" + "userRequest": "webp-hero/dist/detect-webp-support.js", + "loc": "13:33-81" } ], "usedExports": true, "providedExports": [ - "wrapPlayer" + "detectWebpSupport" ], "optimizationBailout": [ - "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/components/wrappers.ts (referenced with cjs require)" + "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/webp.ts (referenced with cjs require)" ], - "depth": 5, - "source": "(function () {\n\tif (typeof NodeList.prototype.forEach === \"function\") return false;\n\tNodeList.prototype.forEach = Array.prototype.forEach;\n})();\n\nString.prototype.toHHMMSS = function(leadZero) {\n let sec_num = parseInt(this, 10);\n let hours = Math.floor(sec_num / 3600);\n let minutes = Math.floor((sec_num - (hours * 3600)) / 60);\n let seconds = sec_num - (hours * 3600) - (minutes * 60);\n \n if(hours < 10) hours = \"0\" + hours;\n if(minutes < 10) minutes = leadZero ? \"0\" + minutes : minutes;\n if(seconds < 10) seconds = \"0\" + seconds;\n return minutes + ':' + seconds;\n}\n\nfunction stylePlayer(player, video) {\n\tlet skin = attachSkin(video.dataset.ckin);\n\tplayer.classList.add(skin);\n\n\tlet html = buildControls(skin);\n\tplayer.insertAdjacentHTML('beforeend', html);\n\tlet updateInterval = 0;\n\tlet elapsed = 0;\n\tlet prevTime = 0;\n\n\tif (skin === 'default') {\n\t\tvar progress = player.querySelector('.progress');;\n\t\tvar progressBar = player.querySelector('.progress__filled');\n\t\tvar toggle = player.querySelectorAll('.toggle');\n\t\tvar fullScreenButton = player.querySelector('.fullscreen');\n\t\tvar seek = player.querySelector('#seek');\n\t\tvar timeElapsed = player.querySelector('#time-elapsed');\n\t\tvar timeDuration = player.querySelector('#time-duration');\n\t\ttimeDuration.innerHTML = String(video.duration | 0).toHHMMSS();\n\n\t\ttoggle.forEach((button) => {\n\t\t\treturn button.addEventListener('click', () => {\n\t\t\t\ttogglePlay(video, player);\n\t\t\t});\n\t\t});\n\n\t\tvideo.addEventListener('click', function () {\n\t\t\ttogglePlay(this, player);\n\t\t});\n\n\t\tvideo.addEventListener('play', function () {\n\t\t\tupdateButton(this, toggle);\n\t\t\tupdateInterval = setInterval(function () {\n\t\t\t\tif (video.paused) return; //chtob ne prigal seek pri peremotke\n\t\t\t\t//elapsed += 0.02; // Increase with timer interval\n\t\t\t\tif (video.currentTime != prevTime) {\n\t\t\t\t\telapsed = video.currentTime; // Update if getCurrentTime was changed\n\t\t\t\t\tprevTime = video.currentTime;\n\t\t\t\t}\n\t\t\t\tlet scaleX = (elapsed / video.duration);\n\t\t\t\tprogressBar.style.transform = 'scaleX(' + scaleX + ')';\n\t\t\t\tif (video.paused) clearInterval(updateInterval);\n\t\t\t\tseek.value = video.currentTime * 1000;\n\t\t\t}, 20);\n\t\t});\n\n\t\tvideo.addEventListener('ended', function () {\n\t\t\tprogressBar.style.transform = 'scaleX(1)';\n\t\t\tseek.value = video.currentTime * 1000;\n\t\t});\n\n\t\tvideo.addEventListener('pause', function () {\n\t\t\tupdateButton(this, toggle);\n\t\t\tclearInterval(updateInterval);\n\t\t});\n\n\t\tvideo.addEventListener('dblclick', function () {\n\t\t\treturn toggleFullScreen(player, fullScreenButton);\n\t\t})\n\n\t\tlet mousedown = false;\n\t\tlet stopAndScrubTimeout = 0;\n\t\tprogress.addEventListener('mousemove', (e) => {\n\t\t\treturn mousedown && scrub(e, video, progress, progressBar);\n\t\t});\n\t\tprogress.addEventListener('mousedown', (e) => {\n\t\t\tscrub(e, video, progress, progressBar, updateInterval);\n\t\t\t//Таймер для того, чтобы стопать видео, если зажал мышку и не отпустил клик\n\t\t\tstopAndScrubTimeout = setTimeout(function () {\n\t\t\t\ttogglePlay(video, player, 1);\n\t\t\t}, 150);\n\n\t\t\treturn mousedown = true;\n\t\t});\n\t\tprogress.addEventListener('mouseup', () => {\n\t\t\tif (typeof stopAndScrubTimeout !== 'undefined') {\n\t\t\t\tclearTimeout(stopAndScrubTimeout);\n\t\t\t}\n\t\t\ttogglePlay(video, player, 0);\n\t\t\treturn mousedown = false;\n\t\t});\n\t\tfullScreenButton.addEventListener('click', (e) => {\n\t\t\treturn toggleFullScreen(player, fullScreenButton);\n\t\t});\n\t\taddListenerMulti(player, 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', (e) => {\n\t\t\treturn onFullScreen(e, player);\n\t\t});\n\t}\n\n\tif (skin === 'circle') {\n\t\tlet wrapper = document.createElement('div');\n\t\twrapper.classList.add('circle-time-left');\n\t\tvideo.parentNode.insertBefore(wrapper, video);\n\t\twrapper.innerHTML = '
';\n\n\t\tvar circle = player.querySelector('.progress-ring__circle');\n\t\tvar radius = circle.r.baseVal.value;\n\t\tvar circumference = 2 * Math.PI * radius;\n\t\tvar timeDuration = player.querySelector('.circle-time');\n\t\tvar iconVolume = player.querySelector('.iconVolume');\n\t\tcircle.style.strokeDasharray = circumference + ' ' + circumference;\n\t\tcircle.style.strokeDashoffset = circumference;\n\t\tcircle.addEventListener('click', () => {\n\t\t\ttogglePlay(video, player);\n\t\t});\n\n\t\tvideo.addEventListener('play', () => {\n\t\t\ticonVolume.style.display = 'none';\n\t\t\tupdateInterval = setInterval(function () {\n\t\t\t\t//elapsed += 0.02; // Increase with timer interval\n\t\t\t\tif (video.currentTime != prevTime) {\n\t\t\t\t\telapsed = video.currentTime; // Update if getCurrentTime was changed\n\t\t\t\t\tprevTime = video.currentTime;\n\t\t\t\t}\n\t\t\t\tlet offset = circumference - elapsed / video.duration * circumference;\n\t\t\t\tcircle.style.strokeDashoffset = offset;\n\t\t\t\tif (video.paused) clearInterval(updateInterval);\n\t\t\t}, 20);\n\t\t});\n\n\t\tvideo.addEventListener('pause', () => {\n\t\t\ticonVolume.style.display = '';\n\t\t});\n\t}\n\n\t//Для хрома\n\ttimeDuration.innerHTML = String(Math.round(video.duration)).toHHMMSS();\n\tif (skin === 'default') seek.setAttribute('max', video.duration * 1000);\n\t//Для Opera / Safari / IE\n\tvideo.addEventListener('loadeddata', function () {\n\t\ttimeDuration.innerHTML = String(Math.round(video.duration)).toHHMMSS();\n\t\tif (skin === 'default') seek.setAttribute('max', video.duration * 1000);\n\t})\n\n\tvideo.addEventListener('timeupdate', function () {\n\t\tupdateInterval = handleProgress(this, skin, timeDuration, circumference, circle, progressBar, seek, timeElapsed, updateInterval);\n\t});\n}\n\nfunction showControls(video) {\n\tvideo.setAttribute(\"controls\", \"controls\");\n}\n\nfunction togglePlay(video, player, stop) {\n\tif (stop == 1) {\n\t\tvideo['pause']();\n\t\tplayer.classList.remove('is-playing');\n\t\treturn;\n\t} else if (stop == 0) {\n\t\tvideo['play']();\n\t\tplayer.classList.add('is-playing');\n\t\treturn;\n\t}\n\n\tlet method = video.paused ? 'play' : 'pause';\n\tvideo[method]();\n\tvideo.paused ? player.classList.remove('is-playing') : player.classList.add('is-playing');\n}\n\nfunction updateButton(video, toggle) {\n\tlet icon = video.paused ? 'tgico-play' : 'tgico-pause';\n\ttoggle.forEach((button) => {\n\t\tbutton.classList.remove('tgico-play', 'tgico-pause');\n\t\tbutton.classList.add(icon);\n\t});\n}\n\nfunction handleProgress(video, skin, timeDuration, circumference, circle, progressBar, seek, timeElapsed, updateInterval, mousemove) {\n\tclearInterval(updateInterval);\n\tlet elapsed = 0;\n\tlet prevTime = 0;\n\tif (skin === 'default') {\n\t\tupdateInterval = setInterval(function () {\n\t\t\tif (video.paused) return;\n\t\t\tif (video.currentTime != prevTime) {\n\t\t\t\telapsed = video.currentTime; // Update if getCurrentTime was changed\n\t\t\t\tprevTime = video.currentTime;\n\t\t\t}\n\t\t\tlet scaleX = (elapsed / video.duration);\n\t\t\tprogressBar.style.transform = 'scaleX(' + scaleX + ')';\n\t\t\tif (video.paused) clearInterval(updateInterval);\n\t\t\tseek.value = video.currentTime * 1000;\n\t\t}, 20);\n\t\ttimeElapsed.innerHTML = String(video.currentTime | 0).toHHMMSS();\n\t\treturn updateInterval;\n\t} else if (skin === 'circle') {\n\t\tupdateInterval = setInterval(function () {\n\t\t\tif (video.currentTime != prevTime) {\n\t\t\t\telapsed = video.currentTime; // Update if getCurrentTime was changed\n\t\t\t\tprevTime = video.currentTime;\n\t\t\t}\n\t\t\tlet offset = circumference - elapsed / video.duration * circumference;\n\t\t\tcircle.style.strokeDashoffset = offset;\n\t\t\tif (video.paused) clearInterval(updateInterval);\n\t\t}, 20);\n\t\tlet timeLeft = String((video.duration - video.currentTime) | 0).toHHMMSS();\n\t\tif (timeLeft != 0 | 0) timeDuration.innerHTML = timeLeft;\n\t}\n}\n\nfunction scrub(e, video, progress, progressBar) {\n\tlet scrubTime = e.offsetX / progress.offsetWidth * video.duration;\n\tvideo.currentTime = scrubTime;\n\tlet scaleX = scrubTime / video.duration;\n\n\tif (scaleX > 1) scaleX = 1;\n\tif (scaleX < 0) scaleX = 0;\n\n\tprogressBar.style.transform = 'scaleX(' + scaleX + ')';\n}\n\nexport function wrapPlayer(video) {\n\tlet wrapper = document.createElement('div');\n\twrapper.classList.add('ckin__player');\n\n\tvideo.parentNode.insertBefore(wrapper, video);\n\twrapper.appendChild(video);\n\n\tstylePlayer(wrapper, video);\n\n\treturn wrapper;\n}\n\nfunction buildControls(skin) {\n\tlet html = [];\n\tif (skin === 'default') {\n\t\thtml.push('');\n\t\thtml.push('
');\n\t\thtml.push('
');\n\t\thtml.push('
',\n\t\t\t'
',\n\t\t\t'
',\n\t\t\t'
',\n\t\t\t'
',\n\t\t\t'
',\n\t\t\t'',\n\t\t\t' / ',\n\t\t\t'',\n\t\t\t'
',\n\t\t\t'
',\n\t\t\t'
');\n\t\thtml.push('
');\n\t} else if (skin === 'circle') {\n\t\thtml.push('',\n\t\t\t'',\n\t\t\t'');\n\t}\n\n\treturn html.join('');\n}\n\nfunction attachSkin(skin) {\n\t//console.log(\"skin: \" + skin);\n\tif (typeof skin != 'undefined' && skin != '') {\n\t\treturn skin;\n\t} else {\n\t\treturn 'default';\n\t}\n}\n\nfunction toggleFullScreen(player, fullScreenButton) {\n\t// alternative standard method\n\tif (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {\n\t\tplayer.classList.add('ckin__fullscreen');\n\n\t\tif (player.requestFullscreen) {\n\t\t\tplayer.requestFullscreen();\n\t\t} else if (player.mozRequestFullScreen) {\n\t\t\tplayer.mozRequestFullScreen(); // Firefox\n\t\t} else if (player.webkitRequestFullscreen) {\n\t\t\tplayer.webkitRequestFullscreen(); // Chrome and Safari\n\t\t} else if (player.msRequestFullscreen) {\n\t\t\tplayer.msRequestFullscreen();\n\t\t}\n\n\t\tfullScreenButton.classList.remove('tgico-fullscreen');\n\t\tfullScreenButton.classList.add('tgico-smallscreen');\n\t\tfullScreenButton.setAttribute('title', 'Exit Full Screen');\n\t} else {\n\t\tplayer.classList.remove('ckin__fullscreen');\n\n\t\tif (document.cancelFullScreen) {\n\t\t\tdocument.cancelFullScreen();\n\t\t} else if (document.mozCancelFullScreen) {\n\t\t\tdocument.mozCancelFullScreen();\n\t\t} else if (document.webkitCancelFullScreen) {\n\t\t\tdocument.webkitCancelFullScreen();\n\t\t} else if (document.msExitFullscreen) {\n\t\t\tdocument.msExitFullscreen();\n\t\t}\n\n\t\tfullScreenButton.classList.remove('tgico-smallscreen');\n\t\tfullScreenButton.classList.add('tgico-fullscreen');\n\t\tfullScreenButton.setAttribute('title', 'Full Screen');\n\t}\n}\n\nfunction onFullScreen(e, player) {\n\tlet isFullscreenNow = document.webkitFullscreenElement !== null;\n\tif (!isFullscreenNow) {\n\t\tplayer.classList.remove('ckin__fullscreen');\n\t} else {\n\t}\n}\n\nfunction addListenerMulti(element, eventNames, listener) {\n\tlet events = eventNames.split(' ');\n\tfor (let i = 0, iLen = events.length; i < iLen; i++) {\n\t\telement.addEventListener(events[i], listener, false);\n\t}\n}\n" - }, + "depth": 1, + "source": "export async function detectWebpSupport() {\n const testImageSources = [\n \"data:image/webp;base64,UklGRjIAAABXRUJQVlA4ICYAAACyAgCdASoCAAEALmk0mk0iIiIiIgBoSygABc6zbAAA/v56QAAAAA==\",\n \"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\"\n ];\n const testImage = (src) => {\n return new Promise((resolve, reject) => {\n var img = document.createElement(\"img\");\n img.onerror = error => resolve(false);\n img.onload = () => resolve(true);\n img.src = src;\n });\n };\n const results = await Promise.all(testImageSources.map(testImage));\n return results.every(result => !!result);\n}\n//# sourceMappingURL=detect-webp-support.js.map" + } + ], + "filteredModules": 0, + "origins": [ { - "id": 83, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/emoticonsDropdown.ts", - "name": "./src/components/emoticonsDropdown.ts", - "index": 80, - "index2": 72, - "size": 14859, + "module": "", + "moduleIdentifier": "", + "moduleName": "", + "loc": "webp", + "request": "./src/lib/webp.ts", + "reasons": [] + } + ] + }, + { + "id": 5, + "rendered": true, + "initial": true, + "entry": false, + "reason": "split chunk (cache group: vendors) (name: vendors~index)", + "size": 35818, + "names": [ + "vendors~index" + ], + "files": [ + "vendors~index.chunk.js" + ], + "hash": "c9c6e71d3e8a3eb7ede1", + "siblings": [ + 0, + 2 + ], + "parents": [], + "children": [], + "childrenByOrder": {}, + "modules": [ + { + "id": 28, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\runtime\\injectStylesIntoStyleTag.js", + "name": "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js", + "index": 2, + "index2": 0, + "size": 6804, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ - 0 + 5 ], - "issuer": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "issuerId": 19, - "issuerName": "./src/lib/appManagers/appImManager.ts", + "issuer": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\materialize.scss", + "issuerId": 45, + "issuerName": "./src/materialize.scss", "issuerPath": [ { - "id": 52, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/index.ts", + "id": 44, + "identifier": "F:\\tweb\\node_modules\\ts-loader\\index.js!F:\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--6-1!F:\\tweb\\src\\index.ts", "name": "./src/index.ts", "profile": { - "factory": 41, - "building": 1632 + "factory": 44, + "building": 1570 } }, { - "id": 25, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/components/pageIm.ts", - "name": "./src/components/pageIm.ts", + "id": 45, + "identifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\materialize.scss", + "name": "./src/materialize.scss", "profile": { - "factory": 633, + "factory": 842, "building": 0, - "dependencies": 536 - } - }, - { - "id": 50, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/services.ts", - "name": "./src/lib/services.ts", - "profile": { - "factory": 323, - "building": 561, - "dependencies": 110 - } - }, - { - "id": 19, - "identifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "name": "./src/lib/appManagers/appImManager.ts", - "profile": { - "factory": 270, - "building": 981, - "dependencies": 860 + "dependencies": 1062 } } ], "profile": { - "factory": 208, - "building": 300, - "dependencies": 449 + "factory": 1066, + "building": 2527, + "dependencies": 967 }, "failed": false, "errors": 0, @@ -8146,13 +7913,31 @@ "assets": [], "reasons": [ { - "moduleId": 19, - "moduleIdentifier": "/Users/kuzmenko/Documents/projects/tweb/node_modules/ts-loader/index.js!/Users/kuzmenko/Documents/projects/tweb/src/lib/appManagers/appImManager.ts", - "module": "./src/lib/appManagers/appImManager.ts", - "moduleName": "./src/lib/appManagers/appImManager.ts", + "moduleId": 45, + "moduleIdentifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\materialize.scss", + "module": "./src/materialize.scss", + "moduleName": "./src/materialize.scss", + "type": "cjs require", + "userRequest": "!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js", + "loc": "1:10-91" + }, + { + "moduleId": 47, + "moduleIdentifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\style.scss", + "module": "./src/scss/style.scss", + "moduleName": "./src/scss/style.scss", + "type": "cjs require", + "userRequest": "!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js", + "loc": "1:10-94" + }, + { + "moduleId": 53, + "moduleIdentifier": "F:\\tweb\\node_modules\\style-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\css-loader\\dist\\cjs.js!F:\\tweb\\node_modules\\resolve-url-loader\\index.js!F:\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-3!F:\\tweb\\src\\scss\\tgico.scss", + "module": "./src/scss/tgico.scss", + "moduleName": "./src/scss/tgico.scss", "type": "cjs require", - "userRequest": "../../components/emoticonsDropdown", - "loc": "41:41-86" + "userRequest": "!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js", + "loc": "1:10-94" } ], "usedExports": true, @@ -8160,61 +7945,59 @@ "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], - "depth": 4, - "source": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst misc_1 = require(\"./misc\");\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\nconst scrollable_1 = __importDefault(require(\"./scrollable\"));\nconst utils_1 = require(\"../lib/utils\");\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\nconst appStickersManager_1 = __importDefault(require(\"../lib/appManagers/appStickersManager\"));\nconst apiManager_1 = __importDefault(require(\"../lib/mtproto/apiManager\"));\nconst cryptoworker_1 = __importDefault(require(\"../lib/crypto/cryptoworker\"));\nconst lazyLoadQueue_1 = __importDefault(require(\"./lazyLoadQueue\"));\nconst wrappers_1 = require(\"./wrappers\");\nconst appWebpManager_1 = __importDefault(require(\"../lib/appManagers/appWebpManager\"));\nexports.EMOTICONSSTICKERGROUP = 'emoticons-dropdown';\nconst initEmoticonsDropdown = (pageEl, appImManager, appMessagesManager, messageInput, toggleEl, btnSend) => {\n let dropdown = pageEl.querySelector('.emoji-dropdown');\n dropdown.classList.add('active'); // need\n let lazyLoadQueue = new lazyLoadQueue_1.default(5);\n let container = pageEl.querySelector('.emoji-container .tabs-container');\n let tabs = pageEl.querySelector('.emoji-dropdown .emoji-tabs');\n misc_1.horizontalMenu(tabs, container, (id) => {\n lottieLoader_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\n if (id == 1 && stickersInit) {\n stickersInit();\n }\n }, () => {\n lottieLoader_1.default.checkAnimations(false, exports.EMOTICONSSTICKERGROUP);\n lazyLoadQueue.check(); // for stickers\n });\n tabs.children[0].click(); // set media\n let emoticonsMenuOnClick = (menu, heights, scroll, menuScroll) => {\n menu.addEventListener('click', function (e) {\n let target = e.target;\n target = utils_1.findUpTag(target, 'LI');\n let index = utils_1.whichChild(target);\n let y = heights[index - 1 /* 2 */] || 0; // 10 == padding .scrollable\n /* if(menuScroll) {\n menuScroll.container.scrollLeft = target.scrollWidth * index;\n }\n console.log('emoticonsMenuOnClick', menu.getBoundingClientRect(), target.getBoundingClientRect());\n */\n scroll.onAddedBottom = () => {\n scroll.container.scrollTop = y;\n scroll.onAddedBottom = () => { };\n };\n scroll.container.scrollTop = y;\n });\n };\n let emoticonsContentOnScroll = (menu, heights, prevCategoryIndex, scroll, menuScroll) => {\n let y = scroll.scrollTop;\n //console.log(heights, y);\n for (let i = 0; i < heights.length; ++i) {\n let height = heights[i];\n if (y < height) {\n menu.children[prevCategoryIndex].classList.remove('active');\n prevCategoryIndex = i /* + 1 */;\n menu.children[prevCategoryIndex].classList.add('active');\n if (menuScroll) {\n if (i < heights.length - 4) {\n menuScroll.container.scrollLeft = (i - 3) * 50;\n }\n else {\n menuScroll.container.scrollLeft = i * 50;\n }\n }\n break;\n }\n }\n return prevCategoryIndex;\n };\n {\n let categories = [\"Smileys & Emotion\", \"Animals & Nature\", \"Food & Drink\", \"Travel & Places\", \"Activities\", \"Objects\", \"Symbols\", \"Flags\", \"Skin Tones\"];\n let divs = {};\n let keyCategory = Config.Emoji.keyCategory;\n let sorted = {};\n for (let unified in Config.Emoji.emoji) {\n // @ts-ignore\n let details = Config.Emoji.emoji[unified];\n let category = details[keyCategory];\n details.unified = unified;\n if (!sorted[category])\n sorted[category] = [];\n sorted[category][details.sort_order] = details;\n }\n Object.keys(sorted).forEach(c => sorted[c].sort());\n categories.pop();\n delete sorted[\"Skin Tones\"];\n //console.time('emojiParse');\n for (let category in sorted) {\n let div = document.createElement('div');\n div.classList.add('emoji-category');\n let emojis = sorted[category];\n emojis.forEach(details => {\n let emoji = details.unified;\n //let emoji = (details.unified as string).split('-')\n //.reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), '');\n let spanEmoji = document.createElement('span');\n let kek = richtextprocessor_1.RichTextProcessor.wrapRichText(emoji);\n if (!kek.includes('emoji')) {\n console.log(details, emoji, kek, spanEmoji, emoji.length, new TextEncoder().encode(emoji));\n return;\n }\n //console.log(kek);\n spanEmoji.innerHTML = kek;\n //spanEmoji = spanEmoji.firstElementChild as HTMLSpanElement;\n //spanEmoji.setAttribute('emoji', emoji);\n div.appendChild(spanEmoji);\n });\n divs[category] = div;\n }\n //console.timeEnd('emojiParse');\n let heights = [0];\n let contentEmojiDiv = document.getElementById('content-emoji');\n categories.forEach(category => {\n let div = divs[category];\n if (!div) {\n console.error('no div by category:', category);\n }\n contentEmojiDiv.append(div);\n heights.push((heights[heights.length - 1] || 0) + div.scrollHeight);\n //console.log(div, div.scrollHeight);\n });\n contentEmojiDiv.addEventListener('click', function (e) {\n let target = e.target;\n //if(target.tagName != 'SPAN') return;\n if (target.tagName == 'SPAN' && !target.classList.contains('emoji')) {\n target = target.firstElementChild;\n }\n else if (target.tagName == 'DIV')\n return;\n //console.log('contentEmoji div', target);\n /* if(!target.classList.contains('emoji')) {\n target = target.parentElement as HTMLSpanElement;\n \n if(!target.classList.contains('emoji')) {\n return;\n }\n } */\n //messageInput.innerHTML += target.innerHTML;\n messageInput.innerHTML += target.outerHTML;\n btnSend.classList.add('tgico-send');\n btnSend.classList.remove('tgico-microphone2');\n });\n let prevCategoryIndex = 1;\n let menu = contentEmojiDiv.nextElementSibling;\n let emojiScroll = new scrollable_1.default(contentEmojiDiv);\n emojiScroll.container.addEventListener('scroll', (e) => {\n prevCategoryIndex = emoticonsContentOnScroll(menu, heights, prevCategoryIndex, emojiScroll.container);\n });\n //emojiScroll.setVirtualContainer(emojiScroll.container);\n emoticonsMenuOnClick(menu, heights, emojiScroll);\n }\n let stickersInit = () => {\n let contentStickersDiv = document.getElementById('content-stickers');\n //let stickersDiv = contentStickersDiv.querySelector('.os-content') as HTMLDivElement;\n let menuWrapper = contentStickersDiv.nextElementSibling;\n let menu = menuWrapper.firstElementChild;\n let menuScroll = new scrollable_1.default(menuWrapper, true, false);\n let stickersDiv = document.createElement('div');\n stickersDiv.classList.add('stickers-categories');\n contentStickersDiv.append(stickersDiv);\n stickersDiv.addEventListener('mouseover', (e) => {\n let target = e.target;\n if (target.tagName == 'CANVAS') { // turn on sticker\n let animation = lottieLoader_1.default.getAnimation(target.parentElement, exports.EMOTICONSSTICKERGROUP);\n if (animation) {\n // @ts-ignore\n if (animation.currentFrame == animation.totalFrames - 1) {\n animation.goToAndPlay(0, true);\n }\n else {\n animation.play();\n }\n }\n }\n });\n stickersDiv.addEventListener('click', (e) => {\n let target = e.target;\n target = utils_1.findUpTag(target, 'DIV');\n let fileID = target.getAttribute('file-id');\n let document = appStickersManager_1.default.getSticker(fileID);\n if (document) {\n appMessagesManager.sendFile(appImManager.peerID, document, { isMedia: true });\n appImManager.scroll.scrollTop = appImManager.scroll.scrollHeight;\n dropdown.classList.remove('active');\n toggleEl.classList.remove('active');\n }\n else {\n console.warn('got no sticker by id:', fileID);\n }\n });\n let heights = [];\n let categoryPush = (categoryDiv, docs, prepend) => {\n //if((docs.length % 5) != 0) categoryDiv.classList.add('not-full');\n docs.forEach(doc => {\n let div = document.createElement('div');\n wrappers_1.wrapSticker(doc, div, undefined, lazyLoadQueue, exports.EMOTICONSSTICKERGROUP, true);\n categoryDiv.append(div);\n });\n /* if(prepend) {\n stickersDiv.prepend(categoryDiv);\n } else {\n stickersDiv.append(categoryDiv);\n } */\n setTimeout(() => lazyLoadQueue.check(), 0);\n /* let scrollHeight = categoryDiv.scrollHeight;\n let prevHeight = heights[heights.length - 1] || 0;\n //console.log('scrollHeight', scrollHeight, categoryDiv, stickersDiv.childElementCount);\n if(prepend && heights.length) {// all stickers loaded faster than recent\n heights.forEach((h, i) => heights[i] += scrollHeight);\n \n return heights.unshift(scrollHeight) - 1;\n } */\n heights.length = 0;\n Array.from(stickersDiv.children).forEach((div, i) => {\n heights[i] = (heights[i - 1] || 0) + div.scrollHeight;\n });\n //stickersScroll.onScroll();\n //return heights.push(prevHeight + scrollHeight) - 1;\n };\n apiManager_1.default.invokeApi('messages.getRecentStickers', { flags: 0, hash: 0 }).then((res) => {\n let stickers = res;\n let categoryDiv = document.createElement('div');\n categoryDiv.classList.add('sticker-category');\n stickersDiv.prepend(categoryDiv);\n categoryPush(categoryDiv, stickers.stickers, true);\n });\n apiManager_1.default.invokeApi('messages.getAllStickers', { hash: 0 }).then((res) => {\n let stickers = res;\n stickers.sets /* .slice(0, 10) */.forEach((set) => __awaiter(void 0, void 0, void 0, function* () {\n let categoryDiv = document.createElement('div');\n categoryDiv.classList.add('sticker-category');\n let li = document.createElement('li');\n li.classList.add('btn-icon');\n menu.append(li);\n stickersDiv.append(categoryDiv);\n let stickerSet = yield appStickersManager_1.default.getStickerSet(set);\n if (stickerSet.set.thumb) {\n let thumb = stickerSet.set.thumb;\n appStickersManager_1.default.getStickerSetThumb(stickerSet.set).then((blob) => __awaiter(void 0, void 0, void 0, function* () {\n if (thumb.w == 1 && thumb.h == 1) { // means animated\n const reader = new FileReader();\n reader.addEventListener('loadend', (e) => __awaiter(void 0, void 0, void 0, function* () {\n // @ts-ignore\n const text = e.srcElement.result;\n let json = yield cryptoworker_1.default.gzipUncompress(text, true);\n let animation = yield lottieLoader_1.default.loadAnimation({\n container: li,\n loop: true,\n autoplay: false,\n animationData: JSON.parse(json)\n }, exports.EMOTICONSSTICKERGROUP);\n }));\n reader.readAsArrayBuffer(blob);\n }\n else {\n let image = new Image();\n //image.src = URL.createObjectURL(blob);\n appWebpManager_1.default.polyfillImage(image, blob);\n li.append(image);\n }\n }));\n }\n else { // as thumb will be used first sticker\n wrappers_1.wrapSticker(stickerSet.documents[0], li, undefined, undefined, exports.EMOTICONSSTICKERGROUP); // kostil\n }\n categoryPush(categoryDiv, stickerSet.documents);\n }));\n });\n let prevCategoryIndex = 0;\n let stickersScroll = new scrollable_1.default(contentStickersDiv);\n stickersScroll.container.addEventListener('scroll', (e) => {\n lazyLoadQueue.check();\n lottieLoader_1.default.checkAnimations();\n prevCategoryIndex = emoticonsContentOnScroll(menu, heights, prevCategoryIndex, stickersScroll.container, menuScroll);\n });\n stickersScroll.setVirtualContainer(stickersDiv);\n emoticonsMenuOnClick(menu, heights, stickersScroll, menuScroll);\n stickersInit = null;\n };\n return { dropdown, lazyLoadQueue };\n};\nexports.default = initEmoticonsDropdown;\n" + "depth": 2, + "source": "\"use strict\";\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && btoa) {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of \\r\\n \\r\\n\\r\\n\\r\\n\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n

Sign in to Telegram

\\r\\n

Please confirm your country and
enter your phone number.

\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

\\r\\n \\r\\n
\\r\\n

\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

Enter a password

\\r\\n

Your account is protected with
an additional password

\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n

Your Name

\\r\\n

Enter your name and add
a profile picture

\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
Drag to Reposition
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
Do you want to delete this message?
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
Send Photo
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
New Group
\\r\\n
Contacts
\\r\\n
Archived
\\r\\n
Saved
\\r\\n
Settings
\\r\\n
Help
\\r\\n
Log Out
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      Pinned Message
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      Mute
      \\r\\n
      Delete and Leave
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n \\r\\n
      \\r\\n
      Reply
      \\r\\n
      Edit
      \\r\\n
      Copy
      \\r\\n
      Pin
      \\r\\n
      Forward
      \\r\\n
      Delete
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      Info
      \\r\\n \\r\\n \\r\\n \\r\\n
      \\r\\n \\r\\n \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      \\r\\n

      \\r\\n

      Bio

      \\r\\n
      \\r\\n
      \\r\\n

      \\r\\n

      Username

      \\r\\n
      \\r\\n
      \\r\\n

      \\r\\n

      Phone

      \\r\\n
      \\r\\n
      \\r\\n \\r\\n

      Enabled

      \\r\\n
      \\r\\n\\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n \\r\\n
      \\r\\n
      \\r\\n
      \\r\\n\\r\\n';\nreturn __p\n})();}}" + }, + { + "id": 1, + "identifier": "F:\\tweb\\node_modules\\lodash\\lodash.js", + "name": "./node_modules/lodash/lodash.js", + "index": 1, + "index2": 2, + "size": 540512, + "cacheable": true, + "built": true, + "optional": false, + "prefetched": false, + "chunks": [ + 0 + ], + "issuer": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\public\\index_template.html", + "issuerId": 0, + "issuerName": "./node_modules/html-webpack-plugin/lib/loader.js!./public/index_template.html", + "issuerPath": [ + { + "id": 0, + "identifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\public\\index_template.html", + "name": "./node_modules/html-webpack-plugin/lib/loader.js!./public/index_template.html", + "profile": { + "factory": 28, + "building": 19 + } + } + ], + "profile": { + "factory": 2, + "building": 1718 + }, + "failed": false, + "errors": 0, + "warnings": 0, + "assets": [], + "reasons": [ + { + "moduleId": 0, + "moduleIdentifier": "F:\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!F:\\tweb\\public\\index_template.html", + "module": "./node_modules/html-webpack-plugin/lib/loader.js!./public/index_template.html", + "moduleName": "./node_modules/html-webpack-plugin/lib/loader.js!./public/index_template.html", + "type": "cjs require", + "userRequest": "!!../node_modules/lodash/lodash.js", + "loc": "1:8-53" + } + ], + "usedExports": true, + "providedExports": null, + "optimizationBailout": [ + "ModuleConcatenation bailout: Module is not an ECMAScript module" + ], + "depth": 1, + "source": "/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.15';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading and trailing whitespace. */\n var reTrim = /^\\s+|\\s+$/g,\n reTrimStart = /^\\s+/,\n reTrimEnd = /\\s+$/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n var index = -1;\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n value = iteratee(value);\n\n var low = 0,\n high = array == null ? 0 : array.length,\n valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

      ' + func(text) + '

      ';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

      fred, barney, & pebbles

      '\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '