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

28292 lines
6.0 MiB

{
"errors": [],
"warnings": [
"asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).\nThis can impact web performance.\nAssets: \n c37a1e067975b1b72c39.worker.js (339 KiB)\n index.bundle.js (499 KiB)\n npm.webp-hero.chunk.js (309 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 (614 KiB)\n npm.jsbn.chunk.js\n index.css\n index.bundle.js\n webp (316 KiB)\n npm.webp-hero.chunk.js\n webp.bundle.js\n"
],
"version": "4.43.0",
"hash": "5b2da7544259591136b6",
"time": 16730,
"builtAt": 1591281466949,
"publicPath": "",
"outputPath": "E:\\projects\\TWEB\\tweb\\public",
"assetsByChunkName": {
"index": [
"index.css",
"index.bundle.js"
],
"npm.jsbn": "npm.jsbn.chunk.js",
"npm.webp-hero": "npm.webp-hero.chunk.js",
"webp": "webp.bundle.js",
"style-desktop": "style-desktop.css",
"style-mobile": "style-mobile.css"
},
"assets": [
{
"name": "c37a1e067975b1b72c39.worker.js",
"size": 346961,
"chunks": [],
"chunkNames": [],
"info": {
"immutable": true
},
"emitted": true,
"isOverSizeLimit": true
},
{
"name": "c37a1e067975b1b72c39.worker.js.LICENSE.txt",
"size": 221,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "c37a1e067975b1b72c39.worker.js.gz",
"size": 80887,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "index.bundle.js",
"size": 511452,
"chunks": [
0
],
"chunkNames": [
"index"
],
"info": {},
"emitted": true,
"isOverSizeLimit": true
},
{
"name": "index.bundle.js.LICENSE.txt",
"size": 221,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "index.bundle.js.gz",
"size": 143403,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "index.css",
"size": 98239,
"chunks": [
0
],
"chunkNames": [
"index"
],
"info": {},
"emitted": true
},
{
"name": "index.css.gz",
"size": 19482,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "index.html",
"size": 31495,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "index.html.gz",
"size": 6273,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "npm.jsbn.chunk.js",
"size": 19042,
"chunks": [
1
],
"chunkNames": [
"npm.jsbn"
],
"info": {},
"emitted": true
},
{
"name": "npm.jsbn.chunk.js.gz",
"size": 6584,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "npm.webp-hero.chunk.js",
"size": 316779,
"chunks": [
2
],
"chunkNames": [
"npm.webp-hero"
],
"info": {},
"emitted": true,
"isOverSizeLimit": true
},
{
"name": "npm.webp-hero.chunk.js.gz",
"size": 96369,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
},
{
"name": "style-desktop.css",
"size": 1000,
"chunks": [
"style-desktop"
],
"chunkNames": [
"style-desktop"
],
"info": {},
"emitted": true
},
{
"name": "style-mobile.css",
"size": 742,
"chunks": [
"style-mobile"
],
"chunkNames": [
"style-mobile"
],
"info": {},
"emitted": true
},
{
"name": "webp.bundle.js",
"size": 6907,
"chunks": [
3
],
"chunkNames": [
"webp"
],
"info": {},
"emitted": true
}
],
"filteredAssets": 0,
"entrypoints": {
"index": {
"chunks": [
1,
0
],
"assets": [
"npm.jsbn.chunk.js",
"index.css",
"index.bundle.js"
],
"children": {},
"childAssets": {},
"isOverSizeLimit": true
},
"webp": {
"chunks": [
2,
3
],
"assets": [
"npm.webp-hero.chunk.js",
"webp.bundle.js"
],
"children": {},
"childAssets": {},
"isOverSizeLimit": true
}
},
"namedChunkGroups": {
"index": {
"chunks": [
1,
0
],
"assets": [
"npm.jsbn.chunk.js",
"index.css",
"index.bundle.js"
],
"children": {},
"childAssets": {},
"isOverSizeLimit": true
},
"webp": {
"chunks": [
2,
3
],
"assets": [
"npm.webp-hero.chunk.js",
"webp.bundle.js"
],
"children": {},
"childAssets": {},
"isOverSizeLimit": true
}
},
"chunks": [
{
"id": 0,
"rendered": true,
"initial": true,
"entry": true,
"size": 1198590,
"names": [
"index"
],
"files": [
"index.css",
"index.bundle.js"
],
"hash": "fdb343825ab14dbd61a9",
"siblings": [
1
],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\utils.js",
"name": "./src/lib/utils.js",
"index": 11,
"index2": 8,
"size": 13733,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"module": "./src/lib/mtproto/mtprotoworker.ts",
"moduleName": "./src/lib/mtproto/mtprotoworker.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "25:16-35"
},
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\misc.ts",
"module": "./src/components/misc.ts",
"moduleName": "./src/components/misc.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "16:16-39"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony side effect evaluation",
"userRequest": "./utils",
"loc": "1:0-59"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "93:9-21"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "302:32-36"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "324:11-25"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "354:8-22"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "382:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "395:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "413:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "424:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "426:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "439:18-32"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "446:12-26"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "458:57-71"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "459:68-82"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "479:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "481:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "518:20-34"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "524:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "530:20-34"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "535:65-79"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "536:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "546:12-26"
},
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "7:16-35"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "16:16-35"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "16:16-35"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPeersManager.ts",
"module": "./src/lib/appManagers/appPeersManager.ts",
"moduleName": "./src/lib/appManagers/appPeersManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:16-35"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:16-35"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "19:16-35"
},
{
"moduleId": 14,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\lottieLoader.ts",
"module": "./src/lib/lottieLoader.ts",
"moduleName": "./src/lib/lottieLoader.ts",
"type": "cjs require",
"userRequest": "./utils",
"loc": "13:16-34"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "9:16-35"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "16:16-35"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "10:16-35"
},
{
"moduleId": 24,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "16:16-35"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts",
"module": "./src/lib/mtproto/serverTimeManager.ts",
"moduleName": "./src/lib/mtproto/serverTimeManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:16-35"
},
{
"moduleId": 29,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\avatar.ts",
"module": "./src/components/avatar.ts",
"moduleName": "./src/components/avatar.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "7:16-39"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "40:16-39"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "10:16-39"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "37:16-35"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "22:16-35"
},
{
"moduleId": 41,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"module": "./src/lib/appManagers/appWebPagesManager.ts",
"moduleName": "./src/lib/appManagers/appWebPagesManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "6:16-35"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "11:16-35"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "18:16-39"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "27:16-35"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "13:16-39"
},
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./lib/utils",
"loc": "108:64-86"
},
{
"moduleId": 59,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": 65,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\poll.ts",
"module": "./src/components/poll.ts",
"moduleName": "./src/components/poll.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "8:16-39"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "32:16-39"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "20:16-39"
},
{
"moduleId": 69,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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,
"providedExports": [
"dT",
"isInDOM",
"checkDragEvent",
"cancelEvent",
"getRichValue",
"placeCaretAtEnd",
"getRichElementValue",
"$rootScope",
"generatePathData",
"langPack",
"_",
"isObject",
"tsNow",
"safeReplaceObject",
"numberWithCommas",
"findUpClassName",
"findUpTag",
"whichChild",
"copy",
"formatBytes",
"formatNumber",
"deepEqual",
"listMergeSorted",
"escapeRegExp",
"encodeEntities",
"fillPropertyValue",
"calcImageInBox",
"emojiUnicode",
"getEmojiToneIndex"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/components/appSearch.ts (referenced with cjs require), ./src/components/appSelectPeers.ts (referenced with cjs require), ./src/components/avatar.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/misc.ts (referenced with cjs require), ./src/components/poll.ts (referenced with cjs require), ./src/components/preloader.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/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/appPhotosManager.ts (referenced with cjs require), ./src/lib/appManagers/appPollsManager.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/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 <igor.beatle@gmail.com>\r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nvar _logTimer = Date.now();\r\nexport function dT () {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\n\r\nexport function isInDOM(element, parentNode) {\r\n if(!element) {\r\n return false;\r\n }\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 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 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\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 if(name != 'user_update') {\r\n console.log(dT(), 'Broadcasting ' + name + ' event, with args:', detail);\r\n }\r\n\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 the group\",\r\n\t\"messageActionChatDeleteUser\": \"removed user\",\r\n\t\"messageActionChatJoinedByLink\": \"joined the group\",\r\n \"messageActionPinMessage\": \"pinned message\",\r\n \"messageActionContactSignUp\": \"joined Telegram\",\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 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\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\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, '&amp;').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, '&lt;').replace(/>/g, '&gt;')\r\n}\r\n\r\nexport function fillPropertyValue(str) {\r\n let splitted = str.split(' ');\r\n if(splitted.length != 4) {\r\n if(!splitted[0]) splitted[0] = '0px';\r\n for(let i = splitted.length; i < 4; ++i) {\r\n splitted[i] = splitted[i % 2] || splitted[0] || '0px';\r\n }\r\n }\r\n\r\n return splitted;\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\nexport function emojiUnicode(input) {\r\n let pairs = emojiUnicode.raw(input).split(' ').map(val => parseInt(val).toString(16)).filter(p => p != 'fe0f');\r\n if(pairs.length && pairs[0].length == 2) pairs[0] = '00' + pairs[0];\r\n return pairs.join('-');\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\nemojiUnicode.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\nexport function getEmojiToneIndex(input) {\r\n let match = input.match(/[\\uDFFB-\\uDFFF]/);\r\n return match ? 5 - (57343 - match[0].charCodeAt(0)) : 0;\r\n}\r\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"name": "./src/lib/mtproto/mtprotoworker.ts",
"index": 26,
"index2": 22,
"size": 5358,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "11:40-75"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "34:40-75"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "19:40-75"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "13:40-75"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "8:40-75"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "26:40-75"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "8:40-75"
},
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "./mtprotoworker",
"loc": "20:40-66"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "37:40-79"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "14:40-79"
},
{
"moduleId": 37,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appStickersManager.ts",
"module": "./src/lib/appManagers/appStickersManager.ts",
"moduleName": "./src/lib/appManagers/appStickersManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "17:40-75"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "9:40-75"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "30:40-75"
},
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"module": "./src/pages/pagePassword.ts",
"moduleName": "./src/pages/pagePassword.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "12:40-79"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "13:40-79"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "9:40-79"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "29:40-79"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "24:40-79"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "8:40-75"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "35:40-79"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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 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 = false;\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 === undefined ? deferred.reject(error) : deferred.resolve(result);\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 console.log('will invokeApi:', method, params, options);\r\n return this.performTaskWorker('invokeApi', method, params, options);\r\n }\r\n setBaseDcID(dcID) {\r\n return this.performTaskWorker('setBaseDcID', dcID);\r\n }\r\n setUserAuth(userAuth) {\r\n utils_1.$rootScope.$broadcast('user_auth', 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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\misc.ts",
"name": "./src/components/misc.ts",
"index": 10,
"index2": 10,
"size": 15444,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../../components/misc",
"loc": "13:15-47"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "26:15-47"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "28:15-47"
},
{
"moduleId": 22,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"module": "./src/pages/pageIm.ts",
"moduleName": "./src/pages/pageIm.ts",
"type": "cjs require",
"userRequest": "../components/misc",
"loc": "25:15-44"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "22:15-47"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "44:15-32"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../components/misc",
"loc": "6:15-44"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "34:15-47"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../../components/misc",
"loc": "25:15-47"
},
{
"moduleId": 35,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"module": "./src/components/appForward.ts",
"moduleName": "./src/components/appForward.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "8:15-32"
},
{
"moduleId": 43,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popup.ts",
"module": "./src/components/popup.ts",
"moduleName": "./src/components/popup.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "8:15-32"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/misc",
"loc": "32:15-47"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "14:15-32"
},
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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"
},
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./components/misc",
"loc": "117:66-94"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "../components/misc",
"loc": "6:15-44"
},
{
"moduleId": 59,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "16:15-32"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "../../components/misc",
"loc": "11:15-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"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\nexports.positionMenu = exports.openBtnMenu = exports.parseMenuButtonsTo = exports.formatPhoneNumber = exports.horizontalMenu = exports.putPreloader = exports.renderImageFromUrl = exports.toast = exports.ripple = void 0;\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 return;\r\n if (elem.querySelector('.c-ripple'))\r\n return;\r\n let r = document.createElement('div');\r\n r.classList.add('c-ripple');\r\n elem.append(r);\r\n let handler;\r\n let drawRipple = (clientX, clientY) => {\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 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 handler = null;\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 = clientX - rect.left;\r\n let clickY = 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 };\r\n let touchEnd = () => {\r\n handler && handler();\r\n };\r\n let touchStartFired = false;\r\n elem.addEventListener('touchstart', (e) => {\r\n if (e.touches.length > 1) {\r\n return;\r\n }\r\n console.log('touchstart', e);\r\n touchStartFired = true;\r\n let { clientX, clientY } = e.touches[0];\r\n drawRipple(clientX, clientY);\r\n window.addEventListener('touchend', touchEnd, { once: true });\r\n window.addEventListener('touchmove', (e) => {\r\n e.cancelBubble = true;\r\n e.stopPropagation();\r\n handler && handler();\r\n window.removeEventListener('touchend', touchEnd);\r\n }, { once: true });\r\n });\r\n elem.addEventListener('mousedown', (e) => {\r\n if (elem.dataset.ripple == '0') {\r\n return false;\r\n }\r\n else if (touchStartFired) {\r\n touchStartFired = false;\r\n return false;\r\n }\r\n let { clientX, clientY } = e;\r\n drawRipple(clientX, clientY);\r\n window.addEventListener('mouseup', handler, { once: true });\r\n });\r\n}\r\nexports.ripple = ripple;\r\nconst toastEl = document.createElement('div');\r\ntoastEl.classList.add('toast');\r\nfunction toast(html) {\r\n toastEl.innerHTML = html;\r\n document.body.append(toastEl);\r\n if (toastEl.dataset.timeout)\r\n clearTimeout(+toastEl.dataset.timeout);\r\n toastEl.dataset.timeout = '' + setTimeout(() => {\r\n toastEl.remove();\r\n delete toastEl.dataset.timeout;\r\n }, 3000);\r\n}\r\nexports.toast = toast;\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 set(elem, url);\r\n return Promise.resolve(true);\r\n }\r\n if (elem instanceof HTMLSourceElement) {\r\n elem.src = url;\r\n return Promise.resolve(false);\r\n }\r\n else {\r\n return new Promise((resolve, reject) => {\r\n let loader = new Image();\r\n loader.src = url;\r\n //let perf = performance.now();\r\n loader.addEventListener('load', () => {\r\n set(elem, url);\r\n loadedURLs[url] = true;\r\n //console.log('onload:', url, performance.now() - perf);\r\n resolve(false);\r\n });\r\n loader.addEventListener('error', reject);\r\n });\r\n }\r\n}\r\nexports.renderImageFromUrl = renderImageFromUrl;\r\nfunction putPreloader(elem, returnDiv = false) {\r\n const html = `\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"preloader-circular\" viewBox=\"25 25 50 50\">\r\n <circle class=\"preloader-path\" cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" stroke-miterlimit=\"10\"/>\r\n </svg>`;\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 slideNavigation(tabContent, prevTabContent, toRight) {\r\n if (toRight) {\r\n prevTabContent.style.filter = `brightness(80%)`;\r\n prevTabContent.style.transform = `translateX(-25%)`;\r\n tabContent.style.transform = `translateX(100%)`;\r\n }\r\n else {\r\n tabContent.style.filter = `brightness(80%)`;\r\n tabContent.style.transform = `translateX(-25%)`;\r\n prevTabContent.style.transform = `translateX(100%)`;\r\n }\r\n tabContent.classList.add('active');\r\n void tabContent.offsetWidth; // reflow\r\n tabContent.style.transform = '';\r\n tabContent.style.filter = '';\r\n}\r\nfunction slideTabs(tabContent, prevTabContent, toRight) {\r\n if (toRight) {\r\n tabContent.style.transform = `translateX(100%)`;\r\n prevTabContent.style.transform = `translateX(-100%)`;\r\n }\r\n else {\r\n tabContent.style.transform = `translateX(-100%)`;\r\n prevTabContent.style.transform = `translateX(100%)`;\r\n }\r\n tabContent.classList.add('active');\r\n void tabContent.offsetWidth; // reflow\r\n tabContent.style.transform = '';\r\n}\r\nfunction horizontalMenu(tabs, content, onClick, onTransitionEnd, transitionTime = 300) {\r\n const hideTimeouts = {};\r\n let prevTabContent = null;\r\n let prevId = -1;\r\n const selectTab = (id) => __awaiter(this, void 0, void 0, function* () {\r\n if (id == prevId)\r\n return false;\r\n const p = prevTabContent;\r\n const tabContent = content.children[id];\r\n const toRight = prevId < id;\r\n if (prevId != -1) {\r\n if (tabs) {\r\n slideTabs(tabContent, prevTabContent, toRight);\r\n }\r\n else {\r\n slideNavigation(tabContent, prevTabContent, toRight);\r\n }\r\n }\r\n else {\r\n tabContent.classList.add('active');\r\n }\r\n const _prevId = prevId;\r\n if (hideTimeouts.hasOwnProperty(id))\r\n clearTimeout(hideTimeouts[id]);\r\n if (p /* && false */) {\r\n hideTimeouts[_prevId] = setTimeout(() => {\r\n p.style.transform = '';\r\n p.style.filter = '';\r\n p.classList.remove('active');\r\n delete hideTimeouts[_prevId];\r\n if (onTransitionEnd)\r\n onTransitionEnd();\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 (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\nfunction parseMenuButtonsTo(to, elements) {\r\n Array.from(elements).forEach(el => {\r\n let name = el.className.match(/(?:^|\\s)menu-(.+?)(?:$|\\s)/)[1];\r\n to[name] = el;\r\n });\r\n}\r\nexports.parseMenuButtonsTo = parseMenuButtonsTo;\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 closeBtnMenu();\r\n //openedMenu.parentElement.click();\r\n }\r\n //console.log('mousemove', diffX, diffY);\r\n};\r\nlet onClick = ( /* e: MouseEvent | TouchEvent */) => {\r\n //e.preventDefault();\r\n closeBtnMenu();\r\n};\r\nlet closeBtnMenu = () => {\r\n if (openedMenu) {\r\n openedMenu.classList.remove('active');\r\n openedMenu.parentElement.classList.remove('menu-open');\r\n openedMenu = null;\r\n }\r\n if (openedMenuOnClose) {\r\n openedMenuOnClose();\r\n openedMenuOnClose = null;\r\n }\r\n //document.body.classList.remove('disable-hover');\r\n window.removeEventListener('mousemove', onMouseMove);\r\n window.removeEventListener('touchmove', onClick);\r\n window.removeEventListener('click', onClick);\r\n window.removeEventListener('contextmenu', onClick);\r\n};\r\nlet openedMenu = null, openedMenuOnClose = null;\r\nfunction openBtnMenu(menuElement, onClose) {\r\n closeBtnMenu();\r\n openedMenu = menuElement;\r\n openedMenu.classList.add('active');\r\n openedMenu.parentElement.classList.add('menu-open');\r\n //document.body.classList.add('disable-hover');\r\n openedMenuOnClose = onClose;\r\n window.addEventListener('mousemove', onMouseMove);\r\n window.addEventListener('touchmove', onClick, { once: true });\r\n window.addEventListener('click', onClick, { once: true });\r\n window.addEventListener('contextmenu', onClick, { once: true });\r\n}\r\nexports.openBtnMenu = openBtnMenu;\r\nfunction positionMenu(e, elem, side) {\r\n let { clientX, clientY } = e;\r\n let { scrollWidth, scrollHeight } = elem;\r\n let { innerWidth, innerHeight } = window;\r\n if (side === undefined) {\r\n if ((clientX + scrollWidth) > innerWidth) {\r\n if ((clientX - scrollWidth) < 0) {\r\n elem.style.left = (innerWidth - scrollWidth) + 'px';\r\n }\r\n else {\r\n side = 'right';\r\n }\r\n }\r\n }\r\n if (!side) {\r\n side = 'left';\r\n }\r\n elem.classList.remove('bottom-left', 'bottom-right');\r\n if (side !== undefined) {\r\n elem.style.left = (side == 'right' ? clientX - scrollWidth : clientX) + 'px';\r\n elem.classList.add(side == 'left' ? 'bottom-right' : 'bottom-left');\r\n }\r\n if ((clientY + scrollHeight) > innerHeight) {\r\n elem.style.top = (innerHeight - scrollHeight) + 'px';\r\n }\r\n else {\r\n elem.style.top = clientY + 'px';\r\n }\r\n}\r\nexports.positionMenu = positionMenu;\r\n"
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"name": "./src/lib/richtextprocessor.js",
"index": 18,
"index2": 16,
"size": 33714,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "8:28-59"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "20:28-59"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "17:28-59"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "17:28-59"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "15:28-59"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "21:28-59"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "21:28-59"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "43:28-63"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "8:28-63"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "43:28-59"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "19:28-59"
},
{
"moduleId": 41,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"module": "./src/lib/appManagers/appWebPagesManager.ts",
"moduleName": "./src/lib/appManagers/appWebPagesManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "9:28-59"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "6:28-59"
},
{
"moduleId": 65,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\poll.ts",
"module": "./src/components/poll.ts",
"moduleName": "./src/components/poll.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "7:28-63"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "27:28-63"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "21:28-63"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "12:28-59"
}
],
"usedExports": true,
"providedExports": [
"RichTextProcessor"
],
"optimizationBailout": [
"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/poll.ts (referenced with cjs require), ./src/components/wrappers.ts (referenced with cjs require), ./src/lib/appManagers/AppInlineBotsManager.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/appPollsManager.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": 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 emojiSupported = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1/* && false */,\r\n emojiCode;\r\n\r\n// added * to (?:[©®\\\\u2122\\\\u265f]\\\\ufe0f) and removed \\\\ufe0f from end\r\n// there are no 2640 and 2642 (signs)\r\nvar emojiRegExp = '(?:\\\\ud83d\\\\udc68\\\\ud83c\\\\udffb\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffc-\\\\udfff]|\\\\ud83d\\\\udc68\\\\ud83c\\\\udffc\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb\\\\udffd-\\\\udfff]|\\\\ud83d\\\\udc68\\\\ud83c\\\\udffd\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb\\\\udffc\\\\udffe\\\\udfff]|\\\\ud83d\\\\udc68\\\\ud83c\\\\udffe\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb-\\\\udffd\\\\udfff]|\\\\ud83d\\\\udc68\\\\ud83c\\\\udfff\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb-\\\\udffe]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffb\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffc-\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffb\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffc-\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffc\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb\\\\udffd-\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffc\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffb\\\\udffd-\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffd\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb\\\\udffc\\\\udffe\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffd\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffb\\\\udffc\\\\udffe\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffe\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb-\\\\udffd\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffe\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffb-\\\\udffd\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udfff\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb-\\\\udffe]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udfff\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffb-\\\\udffe]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udffb\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udffc\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udffd\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udffe\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udfff\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1|\\\\ud83d\\\\udc6b\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83d\\\\udc6c\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83d\\\\udc6d\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83d[\\\\udc6b-\\\\udc6d])|(?:\\\\ud83d[\\\\udc68\\\\udc69]|\\\\ud83e\\\\uddd1)(?:\\\\ud83c[\\\\udffb-\\\\udfff])?\\\\u200d(?:\\\\u2695\\\\ufe0f|\\\\u2696\\\\ufe0f|\\\\u2708\\\\ufe0f|\\\\ud83c[\\\\udf3e\\\\udf73\\\\udf7c\\\\udf84\\\\udf93\\\\udfa4\\\\udfa8\\\\udfeb\\\\udfed]|\\\\ud83d[\\\\udcbb\\\\udcbc\\\\udd27\\\\udd2c\\\\ude80\\\\ude92]|\\\\ud83e[\\\\uddaf-\\\\uddb3\\\\uddbc\\\\uddbd])|(?:\\\\ud83c[\\\\udfcb\\\\udfcc]|\\\\ud83d[\\\\udd74\\\\udd75]|\\\\u26f9)((?:\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ufe0f)\\\\u200d[\\\\u2640\\\\u2642]\\\\ufe0f)|(?:\\\\ud83c[\\\\udfc3\\\\udfc4\\\\udfca]|\\\\ud83d[\\\\udc6e\\\\udc70\\\\udc71\\\\udc73\\\\udc77\\\\udc81\\\\udc82\\\\udc86\\\\udc87\\\\ude45-\\\\ude47\\\\ude4b\\\\ude4d\\\\ude4e\\\\udea3\\\\udeb4-\\\\udeb6]|\\\\ud83e[\\\\udd26\\\\udd35\\\\udd37-\\\\udd39\\\\udd3d\\\\udd3e\\\\uddb8\\\\uddb9\\\\uddcd-\\\\uddcf\\\\uddd6-\\\\udddd])(?:\\\\ud83c[\\\\udffb-\\\\udfff])?\\\\u200d[\\\\u2640\\\\u2642]\\\\ufe0f|(?:\\\\ud83d\\\\udc68\\\\u200d\\\\u2764\\\\ufe0f\\\\u200d\\\\ud83d\\\\udc8b\\\\u200d\\\\ud83d\\\\udc68|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc69\\\\u200d\\\\u2764\\\\ufe0f\\\\u200d\\\\ud83d\\\\udc8b\\\\u200d\\\\ud83d[\\\\udc68\\\\udc69]|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc68\\\\u200d\\\\u2764\\\\ufe0f\\\\u200d\\\\ud83d\\\\udc68|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc69\\\\u200d\\\\u2764\\\\ufe0f\\\\u200d\\\\ud83d[\\\\udc68\\\\udc69]|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83c\\\\udff3\\\\ufe0f\\\\u200d\\\\u26a7\\\\ufe0f|\\\\ud83c\\\\udff3\\\\ufe0f\\\\u200d\\\\ud83c\\\\udf08|\\\\ud83c\\\\udff4\\\\u200d\\\\u2620\\\\ufe0f|\\\\ud83d\\\\udc15\\\\u200d\\\\ud83e\\\\uddba|\\\\ud83d\\\\udc3b\\\\u200d\\\\u2744\\\\ufe0f|\\\\ud83d\\\\udc41\\\\u200d\\\\ud83d\\\\udde8|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc6f\\\\u200d\\\\u2640\\\\ufe0f|\\\\ud83d\\\\udc6f\\\\u200d\\\\u2642\\\\ufe0f|\\\\ud83e\\\\udd3c\\\\u200d\\\\u2640\\\\ufe0f|\\\\ud83e\\\\udd3c\\\\u200d\\\\u2642\\\\ufe0f|\\\\ud83e\\\\uddde\\\\u200d\\\\u2640\\\\ufe0f|\\\\ud83e\\\\uddde\\\\u200d\\\\u2642\\\\ufe0f|\\\\ud83e\\\\udddf\\\\u200d\\\\u2640\\\\ufe0f|\\\\ud83e\\\\udddf\\\\u200d\\\\u2642\\\\ufe0f|\\\\ud83d\\\\udc08\\\\u200d\\\\u2b1b)|[#*0-9]\\\\ufe0f?\\\\u20e3|(?:[©®\\\\u2122\\\\u265f]\\\\ufe0f*)|(?:\\\\ud83c[\\\\udc04\\\\udd70\\\\udd71\\\\udd7e\\\\udd7f\\\\ude02\\\\ude1a\\\\ude2f\\\\ude37\\\\udf21\\\\udf24-\\\\udf2c\\\\udf36\\\\udf7d\\\\udf96\\\\udf97\\\\udf99-\\\\udf9b\\\\udf9e\\\\udf9f\\\\udfcd\\\\udfce\\\\udfd4-\\\\udfdf\\\\udff3\\\\udff5\\\\udff7]|\\\\ud83d[\\\\udc3f\\\\udc41\\\\udcfd\\\\udd49\\\\udd4a\\\\udd6f\\\\udd70\\\\udd73\\\\udd76-\\\\udd79\\\\udd87\\\\udd8a-\\\\udd8d\\\\udda5\\\\udda8\\\\uddb1\\\\uddb2\\\\uddbc\\\\uddc2-\\\\uddc4\\\\uddd1-\\\\uddd3\\\\udddc-\\\\uddde\\\\udde1\\\\udde3\\\\udde8\\\\uddef\\\\uddf3\\\\uddfa\\\\udecb\\\\udecd-\\\\udecf\\\\udee0-\\\\udee5\\\\udee9\\\\udef0\\\\udef3]|[\\\\u203c\\\\u2049\\\\u2139\\\\u2194-\\\\u2199\\\\u21a9\\\\u21aa\\\\u231a\\\\u231b\\\\u2328\\\\u23cf\\\\u23ed-\\\\u23ef\\\\u23f1\\\\u23f2\\\\u23f8-\\\\u23fa\\\\u24c2\\\\u25aa\\\\u25ab\\\\u25b6\\\\u25c0\\\\u25fb-\\\\u25fe\\\\u2600-\\\\u2604\\\\u260e\\\\u2611\\\\u2614\\\\u2615\\\\u2618\\\\u2620\\\\u2622\\\\u2623\\\\u2626\\\\u262a\\\\u262e\\\\u262f\\\\u2638-\\\\u263a\\\\u2640\\\\u2642\\\\u2648-\\\\u2653\\\\u2660\\\\u2663\\\\u2665\\\\u2666\\\\u2668\\\\u267b\\\\u267f\\\\u2692-\\\\u2697\\\\u2699\\\\u269b\\\\u269c\\\\u26a0\\\\u26a1\\\\u26a7\\\\u26aa\\\\u26ab\\\\u26b0\\\\u26b1\\\\u26bd\\\\u26be\\\\u26c4\\\\u26c5\\\\u26c8\\\\u26cf\\\\u26d1\\\\u26d3\\\\u26d4\\\\u26e9\\\\u26ea\\\\u26f0-\\\\u26f5\\\\u26f8\\\\u26fa\\\\u26fd\\\\u2702\\\\u2708\\\\u2709\\\\u270f\\\\u2712\\\\u2714\\\\u2716\\\\u271d\\\\u2721\\\\u2733\\\\u2734\\\\u2744\\\\u2747\\\\u2757\\\\u2763\\\\u2764\\\\u27a1\\\\u2934\\\\u2935\\\\u2b05-\\\\u2b07\\\\u2b1b\\\\u2b1c\\\\u2b50\\\\u2b55\\\\u3030\\\\u303d\\\\u3297\\\\u3299])(?:\\\\ufe0f|(?!\\\\ufe0e))|(?:(?:\\\\ud83c[\\\\udfcb\\\\udfcc]|\\\\ud83d[\\\\udd74\\\\udd75\\\\udd90]|[\\\\u261d\\\\u26f7\\\\u26f9\\\\u270c\\\\u270d])(?:\\\\ufe0f|(?!\\\\ufe0e))|(?:\\\\ud83c[\\\\udf85\\\\udfc2-\\\\udfc4\\\\udfc7\\\\udfca]|\\\\ud83d[\\\\udc42\\\\udc43\\\\udc46-\\\\udc50\\\\udc66-\\\\udc69\\\\udc6e\\\\udc70-\\\\udc78\\\\udc7c\\\\udc81-\\\\udc83\\\\udc85-\\\\udc87\\\\udcaa\\\\udd7a\\\\udd95\\\\udd96\\\\ude45-\\\\ude47\\\\ude4b-\\\\ude4f\\\\udea3\\\\udeb4-\\\\udeb6\\\\udec0\\\\udecc]|\\\\ud83e[\\\\udd0c\\\\udd0f\\\\udd18-\\\\udd1c\\\\udd1e\\\\udd1f\\\\udd26\\\\udd30-\\\\udd39\\\\udd3d\\\\udd3e\\\\udd77\\\\uddb5\\\\uddb6\\\\uddb8\\\\uddb9\\\\uddbb\\\\uddcd-\\\\uddcf\\\\uddd1-\\\\udddd]|[\\\\u270a\\\\u270b]))(?:\\\\ud83c[\\\\udffb-\\\\udfff])?|(?:\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40\\\\udc65\\\\udb40\\\\udc6e\\\\udb40\\\\udc67\\\\udb40\\\\udc7f|\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40\\\\udc73\\\\udb40\\\\udc63\\\\udb40\\\\udc74\\\\udb40\\\\udc7f|\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40\\\\udc77\\\\udb40\\\\udc6c\\\\udb40\\\\udc73\\\\udb40\\\\udc7f|\\\\ud83c\\\\udde6\\\\ud83c[\\\\udde8-\\\\uddec\\\\uddee\\\\uddf1\\\\uddf2\\\\uddf4\\\\uddf6-\\\\uddfa\\\\uddfc\\\\uddfd\\\\uddff]|\\\\ud83c\\\\udde7\\\\ud83c[\\\\udde6\\\\udde7\\\\udde9-\\\\uddef\\\\uddf1-\\\\uddf4\\\\uddf6-\\\\uddf9\\\\uddfb\\\\uddfc\\\\uddfe\\\\uddff]|\\\\ud83c\\\\udde8\\\\ud83c[\\\\udde6\\\\udde8\\\\udde9\\\\uddeb-\\\\uddee\\\\uddf0-\\\\uddf5\\\\uddf7\\\\uddfa-\\\\uddff]|\\\\ud83c\\\\udde9\\\\ud83c[\\\\uddea\\\\uddec\\\\uddef\\\\uddf0\\\\uddf2\\\\uddf4\\\\uddff]|\\\\ud83c\\\\uddea\\\\ud83c[\\\\udde6\\\\udde8\\\\uddea\\\\uddec\\\\udded\\\\uddf7-\\\\uddfa]|\\\\ud83c\\\\uddeb\\\\ud83c[\\\\uddee-\\\\uddf0\\\\uddf2\\\\uddf4\\\\uddf7]|\\\\ud83c\\\\uddec\\\\ud83c[\\\\udde6\\\\udde7\\\\udde9-\\\\uddee\\\\uddf1-\\\\uddf3\\\\uddf5-\\\\uddfa\\\\uddfc\\\\uddfe]|\\\\ud83c\\\\udded\\\\ud83c[\\\\uddf0\\\\uddf2\\\\uddf3\\\\uddf7\\\\uddf9\\\\uddfa]|\\\\ud83c\\\\uddee\\\\ud83c[\\\\udde8-\\\\uddea\\\\uddf1-\\\\uddf4\\\\uddf6-\\\\uddf9]|\\\\ud83c\\\\uddef\\\\ud83c[\\\\uddea\\\\uddf2\\\\uddf4\\\\uddf5]|\\\\ud83c\\\\uddf0\\\\ud83c[\\\\uddea\\\\uddec-\\\\uddee\\\\uddf2\\\\uddf3\\\\uddf5\\\\uddf7\\\\uddfc\\\\uddfe\\\\uddff]|\\\\ud83c\\\\uddf1\\\\ud83c[\\\\udde6-\\\\udde8\\\\uddee\\\\uddf0\\\\uddf7-\\\\uddfb\\\\uddfe]|\\\\ud83c\\\\uddf2\\\\ud83c[\\\\udde6\\\\udde8-\\\\udded\\\\uddf0-\\\\uddff]|\\\\ud83c\\\\uddf3\\\\ud83c[\\\\udde6\\\\udde8\\\\uddea-\\\\uddec\\\\uddee\\\\uddf1\\\\uddf4\\\\uddf5\\\\uddf7\\\\uddfa\\\\uddff]|\\\\ud83c\\\\uddf4\\\\ud83c\\\\uddf2|\\\\ud83c\\\\uddf5\\\\ud83c[\\\\udde6\\\\uddea-\\\\udded\\\\uddf0-\\\\uddf3\\\\uddf7-\\\\uddf9\\\\uddfc\\\\uddfe]|\\\\ud83c\\\\uddf6\\\\ud83c\\\\udde6|\\\\ud83c\\\\uddf7\\\\ud83c[\\\\uddea\\\\uddf4\\\\uddf8\\\\uddfa\\\\uddfc]|\\\\ud83c\\\\uddf8\\\\ud83c[\\\\udde6-\\\\uddea\\\\uddec-\\\\uddf4\\\\uddf7-\\\\uddf9\\\\uddfb\\\\uddfd-\\\\uddff]|\\\\ud83c\\\\uddf9\\\\ud83c[\\\\udde6\\\\udde8\\\\udde9\\\\uddeb-\\\\udded\\\\uddef-\\\\uddf4\\\\uddf7\\\\uddf9\\\\uddfb\\\\uddfc\\\\uddff]|\\\\ud83c\\\\uddfa\\\\ud83c[\\\\udde6\\\\uddec\\\\uddf2\\\\uddf3\\\\uddf8\\\\uddfe\\\\uddff]|\\\\ud83c\\\\uddfb\\\\ud83c[\\\\udde6\\\\udde8\\\\uddea\\\\uddec\\\\uddee\\\\uddf3\\\\uddfa]|\\\\ud83c\\\\uddfc\\\\ud83c[\\\\uddeb\\\\uddf8]|\\\\ud83c\\\\uddfd\\\\ud83c\\\\uddf0|\\\\ud83c\\\\uddfe\\\\ud83c[\\\\uddea\\\\uddf9]|\\\\ud83c\\\\uddff\\\\ud83c[\\\\udde6\\\\uddf2\\\\uddfc]|\\\\ud83c[\\\\udccf\\\\udd8e\\\\udd91-\\\\udd9a\\\\udde6-\\\\uddff\\\\ude01\\\\ude32-\\\\ude36\\\\ude38-\\\\ude3a\\\\ude50\\\\ude51\\\\udf00-\\\\udf20\\\\udf2d-\\\\udf35\\\\udf37-\\\\udf7c\\\\udf7e-\\\\udf84\\\\udf86-\\\\udf93\\\\udfa0-\\\\udfc1\\\\udfc5\\\\udfc6\\\\udfc8\\\\udfc9\\\\udfcf-\\\\udfd3\\\\udfe0-\\\\udff0\\\\udff4\\\\udff8-\\\\udfff]|\\\\ud83d[\\\\udc00-\\\\udc3e\\\\udc40\\\\udc44\\\\udc45\\\\udc51-\\\\udc65\\\\udc6a\\\\udc6f\\\\udc79-\\\\udc7b\\\\udc7d-\\\\udc80\\\\udc84\\\\udc88-\\\\udca9\\\\udcab-\\\\udcfc\\\\udcff-\\\\udd3d\\\\udd4b-\\\\udd4e\\\\udd50-\\\\udd67\\\\udda4\\\\uddfb-\\\\ude44\\\\ude48-\\\\ude4a\\\\ude80-\\\\udea2\\\\udea4-\\\\udeb3\\\\udeb7-\\\\udebf\\\\udec1-\\\\udec5\\\\uded0-\\\\uded2\\\\uded5-\\\\uded7\\\\udeeb\\\\udeec\\\\udef4-\\\\udefc\\\\udfe0-\\\\udfeb]|\\\\ud83e[\\\\udd0d\\\\udd0e\\\\udd10-\\\\udd17\\\\udd1d\\\\udd20-\\\\udd25\\\\udd27-\\\\udd2f\\\\udd3a\\\\udd3c\\\\udd3f-\\\\udd45\\\\udd47-\\\\udd76\\\\udd78\\\\udd7a-\\\\uddb4\\\\uddb7\\\\uddba\\\\uddbc-\\\\uddcb\\\\uddd0\\\\uddde-\\\\uddff\\\\ude70-\\\\ude74\\\\ude78-\\\\ude7a\\\\ude80-\\\\ude86\\\\ude90-\\\\udea8\\\\udeb0-\\\\udeb6\\\\udec0-\\\\udec2\\\\uded0-\\\\uded6]|[\\\\u23e9-\\\\u23ec\\\\u23f0\\\\u23f3\\\\u267e\\\\u26ce\\\\u2705\\\\u2728\\\\u274c\\\\u274e\\\\u2753-\\\\u2755\\\\u2795-\\\\u2797\\\\u27b0\\\\u27bf\\\\ue50a])';\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 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 let emojiInfo = emojiData[emojiCode.replace(/\\ufe0f/g, '')];\r\n if(emojiInfo === undefined) {\r\n //console.error('no emoji by code:', emojiCode, emojiCode && emojiCode.length, new TextEncoder().encode(emojiCode), emojiUnicode(emojiCode));\r\n return null;\r\n }\r\n\r\n return emojiUnicode(emojiCode);\r\n}\r\nfunction parseEntities(text, options = {}) {\r\n var match;\r\n var raw = text, url;\r\n var entities = [], 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 //console.log('parseEntities match:', match);\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]) { // Emoji\r\n //console.log('hit', match[8]);\r\n let emojiCoords = getEmojiSpritesheetCoords(match[8]);\r\n if(emojiCoords) {\r\n entities.push({\r\n _: 'messageEntityEmoji',\r\n offset: matchIndex,\r\n length: match[8].length,\r\n unicode: emojiCoords\r\n });\r\n }\r\n } else if(match[10]) { // Hashtag\r\n entities.push({\r\n _: 'messageEntityHashtag',\r\n offset: matchIndex + (match[9] ? match[9].length : 0),\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] ? match[11].length : 0),\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 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 '<a ',\r\n attr,\r\n contextExternal ? ' target=\"_blank\" rel=\"noopener noreferrer\" ' : '',\r\n ' href=\"',\r\n contextUrl.replace('{1}', encodeURIComponent(username)),\r\n '\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<a href=\"#/im?p=u',\r\n encodeURIComponent(entity.user_id),\r\n '\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<a ',\r\n contextExternal ? ' target=\"_blank\" rel=\"noopener noreferrer\" ' : '',\r\n 'href=\"',\r\n contextUrl.replace('{1}', encodeURIComponent(hashtag))\r\n ,\r\n '\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<a href=\"',\r\n encodeEntities('mailto:' + entityText),\r\n '\" target=\"_blank\" rel=\"noopener noreferrer\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<a href=\"',\r\n encodeEntities(url),\r\n '\" target=\"_blank\" rel=\"noopener noreferrer\">',\r\n inner,\r\n '</a>'\r\n )\r\n }\r\n break\r\n case 'messageEntityLinebreak':\r\n html.push(options.noLinebreaks ? ' ' : '<br/>')\r\n break\r\n case 'messageEntityEmoji':\r\n html.push(emojiSupported ? \r\n `<span class=\"emoji\" contenteditable=\"false\">${encodeEntities(entityText)}</span>` : \r\n `<img src=\"assets/img/emoji/${entity.unicode}.png\" alt=\"${encodeEntities(entityText)}\" class=\"emoji\">`);\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 '<a href=\"',\r\n encodeEntities('tg://bot_command?command=' + encodeURIComponent(command) + (bot ? '&bot=' + encodeURIComponent(bot) : '')),\r\n '\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<strong>',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n '</strong>'\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 '<em>',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n '</em>'\r\n )\r\n break\r\n case 'messageEntityHighlight':\r\n html.push(\r\n '<i>',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n '</i>'\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 '<code>',\r\n encodeEntities(entityText),\r\n '</code>'\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 '<pre><code', (entity.language ? ' class=\"language-' + encodeEntities(entity.language) + '\"' : ''), '>',\r\n encodeEntities(entityText),\r\n '</code></pre>'\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|&#65039;|&#65533;|&#8205;/g, '', text)\r\n var emojiSizeClass = curEmojiSize == 18 ? '' : (' emoji-w' + curEmojiSize)\r\n text = text.replace(/<span((?: [^>]*)?) class=\"emoji emoji-(\\d)-(\\d+)-(\\d+)\"(.+?)<\\/span>/g,\r\n '<span$1 class=\"emoji ' + emojiSizeClass + ' emoji-spritesheet-$2\" style=\"background-position: -$3px -$4px;\" $5</span>')\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": 4,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"name": "./src/lib/appManagers/appUsersManager.ts",
"index": 29,
"index2": 35,
"size": 18969,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "19:42-70"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "18:42-70"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPeersManager.ts",
"module": "./src/lib/appManagers/appPeersManager.ts",
"moduleName": "./src/lib/appManagers/appPeersManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "6:42-70"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "7:42-70"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "10:42-70"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "20:42-70"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "12:42-70"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "20:42-70"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "41:42-70"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appUsersManager",
"loc": "8:42-82"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appUsersManager",
"loc": "21:42-87"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "33:42-70"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appUsersManager",
"loc": "10:42-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppUsersManager = void 0;\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\nconst misc_1 = require(\"../../components/misc\");\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\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 = searchIndexManager_1.default.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 utils_1.$rootScope.$broadcast('avatar_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 fillContacts() {\r\n if (this.contactsFillPromise) {\r\n return this.contactsFillPromise;\r\n }\r\n return this.contactsFillPromise = mtprotoworker_1.default.invokeApi('contacts.getContacts', {\r\n hash: 0\r\n }).then((result) => {\r\n let userID;\r\n this.contactsList = [];\r\n this.saveApiUsers(result.users);\r\n result.contacts.forEach((contact) => {\r\n userID = contact.user_id;\r\n this.contactsList.push(userID);\r\n searchIndexManager_1.default.indexObject(userID, this.getUserSearchText(userID), this.contactsIndex);\r\n });\r\n return this.contactsList;\r\n });\r\n }\r\n getUserSearchText(id) {\r\n const user = this.users[id];\r\n if (!user) {\r\n return '';\r\n }\r\n const serviceText = user.pFlags.self ? 'user_name_saved_msgs_raw' : '';\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 getContacts(query) {\r\n return this.fillContacts().then(contactsList => {\r\n if (query) {\r\n const results = searchIndexManager_1.default.search(query, this.contactsIndex);\r\n const filteredContactsList = contactsList.filter(id => !!results[id]);\r\n contactsList = filteredContactsList;\r\n }\r\n contactsList.sort((userID1, userID2) => {\r\n const sortName1 = (this.users[userID1] || {}).sortName || '';\r\n const sortName2 = (this.users[userID2] || {}).sortName || '';\r\n return sortName1.localeCompare(sortName2);\r\n });\r\n /* contactsList.sort((userID1: number, userID2: number) => {\r\n const sortName1 = (this.users[userID1] || {}).sortName || '';\r\n const sortName2 = (this.users[userID2] || {}).sortName || '';\r\n if(sortName1 == sortName2) {\r\n return 0;\r\n }\r\n \r\n return sortName1 > sortName2 ? 1 : -1;\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 = '+' + misc_1.formatPhoneNumber(apiUser.phone).formatted;\r\n }\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 = searchIndexManager_1.default.cleanUsername(apiUser.username);\r\n this.usernames[searchUsername] = userID;\r\n }\r\n apiUser.sortName = apiUser.pFlags.deleted ? '' : searchIndexManager_1.default.cleanSearchText(apiUser.first_name + ' ' + (apiUser.last_name || ''), false);\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) : '');\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, pFlags: { deleted: true }, access_hash: this.userAccess[id] };\r\n }\r\n getSelf() {\r\n return this.getUser(this.myID);\r\n }\r\n getUserStatusString(userID) {\r\n if (this.isBot(userID)) {\r\n return 'bot';\r\n }\r\n let user = this.getUser(userID);\r\n if (!user || !user.status) {\r\n return '';\r\n }\r\n let str = '';\r\n switch (user.status._) {\r\n case 'userStatusRecently': {\r\n str = 'last seen recently';\r\n break;\r\n }\r\n case 'userStatusLastWeek': {\r\n str = 'last seen last week';\r\n break;\r\n }\r\n case 'userStatusLastMonth': {\r\n str = 'last seen last month';\r\n break;\r\n }\r\n case 'userStatusOffline': {\r\n str = '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 str += ' just now';\r\n }\r\n else if ((now - date) < 3600) {\r\n let c = (now - date) / 60 | 0;\r\n str += c + ' ' + (c == 1 ? 'minute' : 'minutes') + ' ago';\r\n }\r\n else if (now - date < 86400) {\r\n let c = (now - date) / 3600 | 0;\r\n str += c + ' ' + (c == 1 ? 'hour' : 'hours') + ' ago';\r\n }\r\n else {\r\n let d = new Date(date * 1000);\r\n str += ('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 str = 'online';\r\n break;\r\n }\r\n }\r\n return str;\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 /* 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: 30,\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 searchIndexManager_1.default.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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"index": 42,
"index2": 42,
"size": 149617,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "11:45-76"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "19:45-76"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "45:45-93"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "38:45-76"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "18:45-76"
},
{
"moduleId": 35,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"module": "./src/components/appForward.ts",
"moduleName": "./src/components/appForward.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "7:45-93"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appMessagesManager",
"loc": "14:45-88"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "7:45-76"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "17:45-93"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "12:45-93"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "34:45-93"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "7:45-76"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppMessagesManager = void 0;\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\nconst appPollsManager_1 = __importDefault(require(\"./appPollsManager\"));\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\r\nconst APITIMEOUT = 0;\r\nclass AppMessagesManager {\r\n constructor() {\r\n this.messagesStorage = {};\r\n this.groupedMessagesStorage = {}; // will be used for albums\r\n this.historiesStorage = {};\r\n this.dialogsStorage = {};\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.lastSearchFilter = {};\r\n this.lastSearchResults = [];\r\n this.needSingleMessages = [];\r\n this.fetchSingleMessagesTimeout = 0;\r\n this.fetchSingleMessagesPromise = null;\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 this.newUpdatesAfterReloadToHandle = {};\r\n this.loaded = null;\r\n this.dialogsIndex = searchIndexManager_1.default.createIndex();\r\n this.cachedResults = {\r\n query: '',\r\n count: 0,\r\n dialogs: []\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 this.loaded = new Promise((resolve, reject) => {\r\n storage_1.default.get('state').then(({ dialogs, allDialogsLoaded, peers, messages, maxSeenMsgID, updates }) => {\r\n console.log('state res', dialogs, messages);\r\n if (maxSeenMsgID && !appMessagesIDsManager_1.default.getMessageIDInfo(maxSeenMsgID)[1]) {\r\n this.maxSeenID = maxSeenMsgID;\r\n }\r\n //return resolve();\r\n if (peers) {\r\n for (let peerID in peers) {\r\n let peer = peers[peerID];\r\n if (+peerID < 0)\r\n appChatsManager_1.default.saveApiChat(peer);\r\n else\r\n appUsersManager_1.default.saveApiUser(peer);\r\n }\r\n }\r\n if (messages) {\r\n /* let tempID = this.tempID;\r\n \r\n for(let message of messages) {\r\n if(message.id < tempID) {\r\n tempID = message.id;\r\n }\r\n }\r\n \r\n if(tempID != this.tempID) {\r\n console.log('Set tempID to:', tempID);\r\n this.tempID = tempID;\r\n } */\r\n this.saveMessages(messages);\r\n }\r\n if (allDialogsLoaded) {\r\n this.allDialogsLoaded = allDialogsLoaded;\r\n }\r\n if (dialogs) {\r\n dialogs.forEachReverse(dialog => {\r\n this.saveConversation(dialog);\r\n });\r\n }\r\n apiUpdatesManager_1.default.attach(updates !== null && updates !== void 0 ? updates : null);\r\n resolve();\r\n }).catch(resolve);\r\n });\r\n setInterval(() => this.saveState(), 10000);\r\n }\r\n saveState() {\r\n var _a, _b;\r\n let messages = [];\r\n let dialogs = [];\r\n let peers = {};\r\n for (let folderID in this.dialogsStorage) {\r\n for (let dialog of this.dialogsStorage[folderID]) {\r\n let historyStorage = this.historiesStorage[dialog.peerID];\r\n let history = [].concat((_a = historyStorage === null || historyStorage === void 0 ? void 0 : historyStorage.pending) !== null && _a !== void 0 ? _a : [], (_b = historyStorage === null || historyStorage === void 0 ? void 0 : historyStorage.history) !== null && _b !== void 0 ? _b : []);\r\n dialog = utils_1.copy(dialog);\r\n let removeUnread = 0;\r\n for (let mid of history) {\r\n let message = this.getMessage(mid);\r\n if ( /* message._ != 'messageEmpty' && */message.id > 0) {\r\n messages.push(message);\r\n if (message.fromID != dialog.peerID) {\r\n peers[message.fromID] = appPeersManager_1.default.getPeer(message.fromID);\r\n }\r\n dialog.top_message = message.mid;\r\n break;\r\n }\r\n else if (message.pFlags && message.pFlags.unread) {\r\n ++removeUnread;\r\n }\r\n }\r\n if (removeUnread && dialog.unread_count)\r\n dialog.unread_count -= removeUnread;\r\n dialogs.push(dialog);\r\n peers[dialog.peerID] = appPeersManager_1.default.getPeer(dialog.peerID);\r\n }\r\n }\r\n let us = apiUpdatesManager_1.default.updatesState;\r\n let updates = {\r\n seq: us.seq,\r\n pts: us.pts,\r\n date: us.date\r\n };\r\n storage_1.default.set({\r\n state: {\r\n dialogs,\r\n messages,\r\n allDialogsLoaded: this.allDialogsLoaded,\r\n peers,\r\n updates,\r\n maxSeenMsgID: this.maxSeenID\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 var _a;\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 = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = { count: null, history: [], pending: [] });\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 console.log('sendFile', file, fileType);\r\n if (caption) {\r\n let entities = options.entities || [];\r\n caption = richtextprocessor_1.RichTextProcessor.parseMarkdown(caption, entities);\r\n }\r\n let attributes = [];\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.indexOf('audio/') === 0 || ['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 let flags = 0;\r\n if (options.isVoiceMessage) {\r\n flags |= 1 << 10;\r\n flags |= 1 << 2;\r\n attachType = 'voice';\r\n }\r\n let attribute = {\r\n _: 'documentAttributeAudio',\r\n flags: flags,\r\n pFlags: {\r\n voice: options.isVoiceMessage\r\n },\r\n waveform: options.waveform,\r\n voice: options.isVoiceMessage,\r\n duration: options.duration || 0\r\n };\r\n attributes.push(attribute);\r\n }\r\n else if (fileType.indexOf('video/') === 0) {\r\n attachType = 'video';\r\n apiFileName = 'video.mp4';\r\n actionName = 'sendMessageUploadVideoAction';\r\n let flags = 1;\r\n if (options.isRoundMessage)\r\n flags |= 2;\r\n let videoAttribute = {\r\n _: 'documentAttributeVideo',\r\n flags: flags,\r\n pFlags: {\r\n supports_streaming: true,\r\n round_message: options.isRoundMessage\r\n },\r\n round_message: options.isRoundMessage,\r\n supports_streaming: true,\r\n duration: options.duration,\r\n w: options.width,\r\n h: options.height\r\n };\r\n attributes.push(videoAttribute);\r\n }\r\n else {\r\n attachType = 'document';\r\n apiFileName = 'document.' + fileType.split('/')[1];\r\n actionName = 'sendMessageUploadDocumentAction';\r\n }\r\n attributes.push({ _: 'documentAttributeFilename', file_name: fileName || apiFileName });\r\n if (['document', 'video', 'audio', 'voice'].indexOf(attachType) !== -1) {\r\n let doc = {\r\n _: 'document',\r\n id: '' + messageID,\r\n duration: options.duration,\r\n attributes: attributes,\r\n w: options.width,\r\n h: options.height,\r\n downloaded: file.size,\r\n thumbs: [],\r\n mime_type: fileType,\r\n url: options.objectURL || '',\r\n size: file.size\r\n };\r\n appDocsManager_1.default.saveDoc(doc);\r\n }\r\n console.log('AMM: sendFile', attachType, apiFileName, file.type, options);\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 background: options.background,\r\n clear_draft: true,\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 (options.background) {\r\n flags |= 64;\r\n }\r\n flags |= 128; // clear_draft\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 default:\r\n inputMedia = {\r\n _: 'inputMediaUploadedDocument',\r\n file: inputFile,\r\n mime_type: fileType,\r\n attributes: attributes\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 sendAlbum(peerID, files, options = {}) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\r\n let groupID;\r\n let historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = { count: null, history: [], pending: [] });\r\n let flags = 0;\r\n let pFlags = {};\r\n let replyToMsgID = options.replyToMsgID;\r\n let isChannel = appPeersManager_1.default.isChannel(peerID);\r\n let isMegagroup = isChannel && appPeersManager_1.default.isMegagroup(peerID);\r\n let asChannel = isChannel && !isMegagroup ? true : false;\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 console.log('AMM: sendAlbum', files, options);\r\n let fromID = appUsersManager_1.default.getSelf().id;\r\n if (peerID != fromID) {\r\n pFlags.out = true;\r\n if (!isChannel && !appUsersManager_1.default.isBot(peerID)) {\r\n pFlags.unread = true;\r\n }\r\n }\r\n if (replyToMsgID) {\r\n flags |= 1;\r\n }\r\n if (asChannel) {\r\n fromID = 0;\r\n pFlags.post = true;\r\n }\r\n else {\r\n flags |= 128; // clear_draft\r\n }\r\n let ids = files.map(() => this.tempID--).reverse();\r\n groupID = ids[ids.length - 1];\r\n let messages = files.map((file, idx) => {\r\n //let messageID = this.tempID--;\r\n //if(!groupID) groupID = messageID;\r\n let messageID = ids[idx];\r\n let randomID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n let randomIDS = bin_utils_1.bigint(randomID[0]).shiftLeft(32).add(bin_utils_1.bigint(randomID[1])).toString();\r\n let preloader = new preloader_1.default(null, true);\r\n let details = options.sendFileDetails[idx];\r\n let media = {\r\n _: 'messageMediaPending',\r\n type: 'album',\r\n preloader: preloader,\r\n progress: {\r\n percent: 1,\r\n total: file.size,\r\n done: 0,\r\n cancel: () => { }\r\n },\r\n document: undefined,\r\n photo: undefined\r\n };\r\n if (file.type.indexOf('video/') === 0) {\r\n let flags = 1;\r\n let videoAttribute = {\r\n _: 'documentAttributeVideo',\r\n flags: flags,\r\n pFlags: {\r\n supports_streaming: true,\r\n round_message: false\r\n },\r\n round_message: false,\r\n supports_streaming: true,\r\n duration: details.duration,\r\n w: details.width,\r\n h: details.height\r\n };\r\n let doc = {\r\n _: 'document',\r\n id: '' + messageID,\r\n attributes: [videoAttribute],\r\n downloaded: file.size,\r\n thumbs: [],\r\n mime_type: file.type,\r\n url: details.objectURL || '',\r\n size: file.size\r\n };\r\n appDocsManager_1.default.saveDoc(doc);\r\n media.document = doc;\r\n }\r\n else {\r\n let photo = {\r\n _: 'photo',\r\n id: '' + messageID,\r\n sizes: [{\r\n _: 'photoSize',\r\n w: details.width,\r\n h: details.height,\r\n type: 'm',\r\n size: file.size\r\n }],\r\n w: details.width,\r\n h: details.height,\r\n downloaded: file.size,\r\n url: details.objectURL || ''\r\n };\r\n appPhotosManager_1.default.savePhoto(photo);\r\n media.photo = photo;\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 let message = {\r\n _: 'message',\r\n id: messageID,\r\n from_id: fromID,\r\n grouped_id: groupID,\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: media,\r\n random_id: randomIDS,\r\n randomID: randomID,\r\n reply_to_msg_id: replyToMsgID,\r\n views: asChannel && 1,\r\n pending: true,\r\n error: false\r\n };\r\n this.saveMessages([message]);\r\n historyStorage.pending.unshift(messageID);\r\n //$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});\r\n this.pendingByRandomID[randomIDS] = [peerID, messageID];\r\n return message;\r\n });\r\n utils_1.$rootScope.$broadcast('history_append', { peerID: peerID, messageID: messages[messages.length - 1].id, my: true });\r\n let toggleError = (message, 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 let uploaded = false, uploadPromise = null;\r\n let inputPeer = appPeersManager_1.default.getInputPeerByID(peerID);\r\n let invoke = (multiMedia) => {\r\n appImManager_1.default.setTyping('sendMessageCancelAction');\r\n return mtprotoworker_1.default.invokeApi('messages.sendMultiMedia', {\r\n flags: flags,\r\n peer: inputPeer,\r\n multi_media: multiMedia,\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 messages.forEach(message => toggleError(message, true));\r\n });\r\n };\r\n let inputs = [];\r\n for (let i = 0, length = files.length; i < length; ++i) {\r\n let file = files[i];\r\n let message = messages[i];\r\n let media = message.media;\r\n let preloader = media.preloader;\r\n let actionName = file.type.indexOf('video/') === 0 ? 'sendMessageUploadVideoAction' : 'sendMessageUploadPhotoAction';\r\n let deferred = polyfill_1.deferredPromise();\r\n yield this.sendFilePromise;\r\n this.sendFilePromise = deferred;\r\n if (!uploaded || message.error) {\r\n uploaded = false;\r\n uploadPromise = apiFileManager_1.default.uploadFile(file);\r\n }\r\n uploadPromise.notify = (progress) => {\r\n console.log('upload progress', progress);\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 yield uploadPromise.then((inputFile) => {\r\n console.log('appMessagesManager: sendAlbum file uploaded:', inputFile);\r\n let inputMedia;\r\n let details = options.sendFileDetails[i];\r\n if (details.duration) {\r\n inputMedia = {\r\n _: 'inputMediaUploadedDocument',\r\n flags: 0,\r\n file: inputFile,\r\n mime_type: file.type,\r\n attributes: [{\r\n _: 'documentAttributeVideo',\r\n flags: 2,\r\n supports_streaming: true,\r\n duration: details.duration,\r\n w: details.width,\r\n h: details.height\r\n }]\r\n };\r\n }\r\n else {\r\n inputMedia = {\r\n _: 'inputMediaUploadedPhoto',\r\n flags: 0,\r\n file: inputFile\r\n };\r\n }\r\n return mtprotoworker_1.default.invokeApi('messages.uploadMedia', {\r\n peer: inputPeer,\r\n media: inputMedia\r\n }).then(messageMedia => {\r\n let inputMedia;\r\n if (messageMedia.photo) {\r\n let photo = messageMedia.photo;\r\n appPhotosManager_1.default.savePhoto(photo);\r\n inputMedia = appPhotosManager_1.default.getInputByID(photo.id);\r\n }\r\n else {\r\n let doc = messageMedia.document;\r\n appDocsManager_1.default.saveDoc(doc);\r\n inputMedia = appDocsManager_1.default.getMediaInputByID(doc.id);\r\n }\r\n inputs.push({\r\n _: 'inputSingleMedia',\r\n flags: 0,\r\n media: inputMedia,\r\n random_id: message.randomID,\r\n message: caption,\r\n entities: []\r\n });\r\n caption = ''; // only 1 caption for all inputs\r\n }, () => {\r\n toggleError(message, true);\r\n });\r\n }, () => {\r\n toggleError(message, true);\r\n });\r\n console.log('appMessagesManager: sendAlbum uploadPromise.finally!');\r\n deferred.resolve();\r\n preloader.detach();\r\n }\r\n uploaded = true;\r\n invoke(inputs);\r\n });\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 getConversations(query = '', offsetIndex, limit = 20, folderID = 0) {\r\n var _a;\r\n let curDialogStorage = (_a = this.dialogsStorage[folderID]) !== null && _a !== void 0 ? _a : (this.dialogsStorage[folderID] = []);\r\n if (query) {\r\n if (!limit || this.cachedResults.query !== query) {\r\n this.cachedResults.query = query;\r\n const results = searchIndexManager_1.default.search(query, this.dialogsIndex);\r\n this.cachedResults.dialogs = [];\r\n for (const folderID in this.dialogsStorage) {\r\n const dialogs = this.dialogsStorage[folderID];\r\n dialogs.forEach(dialog => {\r\n if (results[dialog.peerID]) {\r\n this.cachedResults.dialogs.push(dialog);\r\n }\r\n });\r\n }\r\n this.cachedResults.count = this.cachedResults.dialogs.length;\r\n }\r\n curDialogStorage = this.cachedResults.dialogs;\r\n }\r\n else {\r\n this.cachedResults.query = '';\r\n }\r\n let 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 (query || 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(totalCount => {\r\n //const curDialogStorage = this.dialogsStorage[folderID];\r\n 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 //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: totalCount\r\n };\r\n });\r\n }\r\n getTopMessages(limit, folderID) {\r\n const dialogs = this.dialogsStorage[folderID];\r\n let offsetID = 0;\r\n let offsetDate = 0;\r\n let offsetPeerID = 0;\r\n let offsetIndex = 0;\r\n let flags = 0;\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; // means pinned already loaded\r\n }\r\n //if(folderID > 0) {\r\n //flags |= 1;\r\n flags |= 2;\r\n //}\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: 0\r\n }, {\r\n timeout: APITIMEOUT\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 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 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 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) {\r\n this.scheduleHandleNewDialogs();\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 forwardMessages(peerID, mids, options = {}) {\r\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\r\n mids = mids.sort((a, b) => a - b);\r\n var flags = 0;\r\n if (options.withMyScore) {\r\n flags |= 256;\r\n }\r\n let splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(mids);\r\n let promises = [];\r\n for (let channelID in splitted.msgIDs) {\r\n let msgIDs = splitted.msgIDs[channelID];\r\n let len = msgIDs.length;\r\n let randomIDs = [];\r\n for (let i = 0; i < len; i++) {\r\n randomIDs.push([bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)]);\r\n }\r\n let sentRequestOptions = {};\r\n if (this.pendingAfterMsgs[peerID]) {\r\n sentRequestOptions.afterMessageID = this.pendingAfterMsgs[peerID].messageID;\r\n }\r\n let promise = mtprotoworker_1.default.invokeApi('messages.forwardMessages', {\r\n flags: flags,\r\n from_peer: appPeersManager_1.default.getInputPeerByID(-channelID),\r\n id: msgIDs,\r\n random_id: randomIDs,\r\n to_peer: appPeersManager_1.default.getInputPeerByID(peerID)\r\n }, sentRequestOptions).then((updates) => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n }, () => { }).then(() => {\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 promises.push(promise);\r\n }\r\n return Promise.all(promises);\r\n }\r\n /*\r\n var date = Date.now() / 1000 | 0;\r\n var m = date * 0x10000;\r\n \r\n var k = (date + 1) * 0x10000;\r\n k - m;\r\n 65536\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 generateIndexForDialog(dialog) {\r\n const channelID = appPeersManager_1.default.isChannel(dialog.peerID) ? -dialog.peerID : 0;\r\n const mid = appMessagesIDsManager_1.default.getFullMessageID(dialog.top_message, channelID);\r\n const message = this.getMessage(mid);\r\n let topDate = message.date;\r\n if (channelID) {\r\n const 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 const 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 && dialog.folder_id == 0) {\r\n topDate = this.generateDialogPinnedDate(dialog);\r\n //console.log('topDate', peerID, topDate);\r\n }\r\n dialog.index = this.generateDialogIndex(topDate);\r\n }\r\n pushDialogToStorage(dialog, offsetDate) {\r\n var _a;\r\n let dialogs = (_a = this.dialogsStorage[dialog.folder_id]) !== null && _a !== void 0 ? _a : (this.dialogsStorage[dialog.folder_id] = []);\r\n let pos = dialogs.findIndex(d => d.peerID == dialog.peerID);\r\n if (pos !== -1) {\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 !== -1) {\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 let index = dialog.index;\r\n let 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 (let 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 dialogs = this.dialogsStorage;\r\n for (let folderID in dialogs) {\r\n let index = dialogs[folderID].findIndex(dialog => dialog.peerID == peerID);\r\n if (index !== -1) {\r\n return [dialogs[folderID][index], index];\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 doFlushHistory(inputPeer, justClear) {\r\n let flags = 0;\r\n if (justClear) {\r\n flags |= 1;\r\n }\r\n return mtprotoworker_1.default.invokeApi('messages.deleteHistory', {\r\n flags: flags,\r\n peer: inputPeer,\r\n max_id: 0\r\n }).then((affectedHistory) => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updatePts',\r\n pts: affectedHistory.pts,\r\n pts_count: affectedHistory.pts_count\r\n }\r\n });\r\n if (!affectedHistory.offset) {\r\n return true;\r\n }\r\n return this.doFlushHistory(inputPeer, justClear);\r\n });\r\n }\r\n flushHistory(peerID, justClear) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (appPeersManager_1.default.isChannel(peerID)) {\r\n let promise = this.getHistory(peerID, 0, 1);\r\n let historyResult = promise instanceof Promise ? yield promise : promise;\r\n let channelID = -peerID;\r\n let maxID = appMessagesIDsManager_1.default.getMessageLocalID(historyResult.history[0] || 0);\r\n return mtprotoworker_1.default.invokeApi('channels.deleteHistory', {\r\n channel: appChatsManager_1.default.getChannelInput(channelID),\r\n max_id: maxID\r\n }).then(() => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateChannelAvailableMessages',\r\n channel_id: channelID,\r\n available_min_id: maxID\r\n }\r\n });\r\n return true;\r\n });\r\n }\r\n return this.doFlushHistory(appPeersManager_1.default.getInputPeerByID(peerID), justClear).then(() => {\r\n delete this.historiesStorage[peerID];\r\n for (let mid in this.messagesStorage) {\r\n let message = this.messagesStorage[mid];\r\n if (message.peerID == peerID) {\r\n delete this.messagesStorage[mid];\r\n }\r\n }\r\n if (justClear) {\r\n utils_1.$rootScope.$broadcast('dialog_flush', { peerID: peerID });\r\n }\r\n else {\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog[0]) {\r\n this.dialogsStorage[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n }\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID });\r\n }\r\n });\r\n });\r\n }\r\n saveMessages(apiMessages, options = {}) {\r\n apiMessages.forEach((apiMessage) => {\r\n var _a;\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 const peerID = this.getMessagePeer(apiMessage);\r\n const isChannel = apiMessage.to_id._ == 'peerChannel';\r\n const channelID = isChannel ? -peerID : 0;\r\n const isBroadcast = isChannel && appChatsManager_1.default.isBroadcast(channelID);\r\n const mid = appMessagesIDsManager_1.default.getFullMessageID(apiMessage.id, channelID);\r\n apiMessage.mid = mid;\r\n if (apiMessage.grouped_id) {\r\n const storage = (_a = this.groupedMessagesStorage[apiMessage.grouped_id]) !== null && _a !== void 0 ? _a : (this.groupedMessagesStorage[apiMessage.grouped_id] = {});\r\n storage[mid] = apiMessage;\r\n }\r\n const dialog = this.getDialogByPeerID(peerID)[0];\r\n if (dialog && mid > 0) {\r\n apiMessage.pFlags.unread = mid > dialog[apiMessage.pFlags.out\r\n ? 'read_outbox_max_id'\r\n : 'read_inbox_max_id'];\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 const 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 const savedFromPeerID = appPeersManager_1.default.getPeerID(fwdHeader.saved_from_peer);\r\n const 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 const 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 'messageMediaPoll':\r\n apiMessage.media.poll = appPollsManager_1.default.savePoll(apiMessage.media.poll, apiMessage.media.results);\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 let migrateFrom;\r\n let 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 apiMessage.rReply = this.getRichReplyText(apiMessage);\r\n if (apiMessage.message && apiMessage.message.length) {\r\n const myEntities = richtextprocessor_1.RichTextProcessor.parseEntities(apiMessage.message);\r\n const 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 getRichReplyText(message, text = message.message) {\r\n let messageText = '';\r\n if (message.media) {\r\n if (message.grouped_id) {\r\n messageText += '<i>Album' + (message.message ? ', ' : '') + '</i>';\r\n }\r\n else\r\n switch (message.media._) {\r\n case 'messageMediaPhoto':\r\n messageText += '<i>Photo' + (message.message ? ', ' : '') + '</i>';\r\n break;\r\n case 'messageMediaGeo':\r\n messageText += '<i>Geolocation</i>';\r\n break;\r\n case 'messageMediaPoll':\r\n messageText += '<i>' + message.media.poll.rReply + '</i>';\r\n break;\r\n case 'messageMediaContact':\r\n messageText += '<i>Contact</i>';\r\n break;\r\n case 'messageMediaDocument':\r\n let document = message.media.document;\r\n if (document.type == 'video') {\r\n messageText = '<i>Video' + (message.message ? ', ' : '') + '</i>';\r\n }\r\n else if (document.type == 'voice') {\r\n messageText = '<i>Voice message</i>';\r\n }\r\n else if (document.type == 'gif') {\r\n messageText = '<i>GIF' + (message.message ? ', ' : '') + '</i>';\r\n }\r\n else if (document.type == 'round') {\r\n messageText = '<i>Video message' + (message.message ? ', ' : '') + '</i>';\r\n }\r\n else if (document.type == 'sticker') {\r\n messageText = (document.stickerEmoji || '') + '<i>Sticker</i>';\r\n }\r\n else {\r\n messageText = '<i>' + document.file_name + '</i>';\r\n }\r\n break;\r\n default:\r\n ///////console.warn('Got unknown message.media type!', message);\r\n break;\r\n }\r\n }\r\n if (message.action) {\r\n let action = message.action;\r\n let str = '';\r\n if (action.message) {\r\n str = richtextprocessor_1.RichTextProcessor.wrapRichText(action.message, { noLinebreaks: true });\r\n }\r\n else {\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) d.push((duration / 3600 | 0) + ' h');\r\n suffix = ' (' + d.reverse().join(' ') + ')';\r\n }\r\n }\r\n // @ts-ignore\r\n str = utils_1.langPack[_] + suffix;\r\n }\r\n console.log('message action:', action);\r\n messageText = '<i>' + str + '</i>';\r\n }\r\n let messageWrapped = '';\r\n if (text) {\r\n let entities = richtextprocessor_1.RichTextProcessor.parseEntities(text.replace(/\\n/g, ' '), { noLinebreakers: true });\r\n messageWrapped = richtextprocessor_1.RichTextProcessor.wrapRichText(text, {\r\n noLinebreakers: true,\r\n entities: entities,\r\n noTextFormat: true\r\n });\r\n }\r\n return messageText + messageWrapped;\r\n }\r\n editPeerFolders(peerIDs, folderID) {\r\n mtprotoworker_1.default.invokeApi('folders.editPeerFolders', {\r\n folder_peers: peerIDs.map(peerID => {\r\n return {\r\n _: 'inputFolderPeer',\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n folder_id: folderID\r\n };\r\n })\r\n }).then(updates => {\r\n console.log('editPeerFolders updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates); // WARNING! возможно тут нужно добавлять channelID, и вызывать апдейт для каждого канала отдельно\r\n });\r\n }\r\n toggleDialogPin(peerID) {\r\n var _a;\r\n let dialog = this.getDialogByPeerID(peerID)[0];\r\n if (!dialog)\r\n return Promise.reject();\r\n let peer = {\r\n _: 'inputDialogPeer',\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID)\r\n };\r\n let flags = ((_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.pinned) ? 0 : 1;\r\n return mtprotoworker_1.default.invokeApi('messages.toggleDialogPin', {\r\n flags,\r\n peer\r\n }).then(bool => {\r\n this.handleUpdate({\r\n _: 'updateDialogPinned',\r\n peer: peer,\r\n pFlags: {\r\n pinned: flags\r\n }\r\n });\r\n });\r\n }\r\n markDialogUnread(peerID) {\r\n var _a;\r\n let dialog = this.getDialogByPeerID(peerID)[0];\r\n if (!dialog)\r\n return Promise.reject();\r\n let peer = {\r\n _: 'inputDialogPeer',\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID)\r\n };\r\n let flags = ((_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.unread_mark) ? 0 : 1;\r\n return mtprotoworker_1.default.invokeApi('messages.markDialogUnread', {\r\n flags,\r\n peer\r\n }).then(bool => {\r\n this.handleUpdate({\r\n _: 'updateDialogUnreadMark',\r\n peer: peer,\r\n pFlags: {\r\n unread: flags\r\n }\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[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: migrateFrom, dialog: foundDialog[0] });\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 const message = this.messagesStorage[messageID];\r\n if (!message || !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 || !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 const updatedDialogs = {};\r\n let hasUpdated = false;\r\n dialogsResult.dialogs.forEach((dialog) => {\r\n const peerID = appPeersManager_1.default.getPeerID(dialog.peer);\r\n let topMessage = dialog.top_message;\r\n const 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 const 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 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 const foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog.length) {\r\n this.dialogsStorage[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID, dialog: foundDialog[0] });\r\n }\r\n }\r\n if (this.newUpdatesAfterReloadToHandle[peerID] !== undefined) {\r\n for (const i in this.newUpdatesAfterReloadToHandle[peerID]) {\r\n const 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 saveConversation(dialog) {\r\n const peerID = appPeersManager_1.default.getPeerID(dialog.peer);\r\n if (!peerID) {\r\n return false;\r\n }\r\n const channelID = appPeersManager_1.default.isChannel(peerID) ? -peerID : 0;\r\n const peerText = appPeersManager_1.default.getPeerSearchText(peerID);\r\n searchIndexManager_1.default.indexObject(peerID, peerText, this.dialogsIndex);\r\n let mid, message;\r\n if (dialog.top_message) {\r\n mid = appMessagesIDsManager_1.default.getFullMessageID(dialog.top_message, channelID);\r\n message = this.getMessage(mid);\r\n }\r\n else {\r\n mid = this.tempID--;\r\n 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 if (!channelID && peerID < 0) {\r\n const chat = appChatsManager_1.default.getChat(-peerID);\r\n if (chat && chat.migrated_to && chat.pFlags.deactivated) {\r\n const 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 if (!dialog.hasOwnProperty('folder_id'))\r\n dialog.folder_id = 0;\r\n dialog.peerID = peerID;\r\n this.generateIndexForDialog(dialog);\r\n this.pushDialogToStorage(dialog, message.date);\r\n // Because we saved message without dialog present\r\n if (message.mid > 0) {\r\n if (message.mid > dialog[message.pFlags.out ? 'read_outbox_max_id' : 'read_inbox_max_id'])\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 */) { // warning\r\n const 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 if (channelID && dialog.pts) {\r\n apiUpdatesManager_1.default.addChannelState(channelID, dialog.pts);\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 && utils_1.deepEqual(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: APITIMEOUT,\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: APITIMEOUT,\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.hasOwnProperty('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 if (pinnedIndex > this.pinnedIndex) {\r\n this.pinnedIndex = 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 let newMaxSeenID = 0;\r\n for (let peerID in this.newDialogsToHandle) {\r\n let dialog = this.newDialogsToHandle[peerID];\r\n if ('reload' in dialog) {\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 //console.log('after order:', this.dialogsStorage[0].map(d => d.peerID));\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 scheduleHandleNewDialogs() {\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n }\r\n deleteMessages(messageIDs, revoke) {\r\n const splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(messageIDs);\r\n const promises = [];\r\n for (const channelIDStr in splitted.msgIDs) {\r\n const channelID = +channelIDStr;\r\n let msgIDs = splitted.msgIDs[channelID];\r\n let promise;\r\n if (channelID > 0) {\r\n const channel = appChatsManager_1.default.getChat(channelID);\r\n if (!channel.pFlags.creator && !(channel.pFlags.editor && channel.pFlags.megagroup)) {\r\n const goodMsgIDs = [];\r\n if (channel.pFlags.editor || channel.pFlags.megagroup) {\r\n msgIDs.forEach((msgID, i) => {\r\n const message = this.getMessage(splitted.mids[channelID][i]);\r\n if (message.pFlags.out) {\r\n goodMsgIDs.push(msgID);\r\n }\r\n });\r\n }\r\n if (!goodMsgIDs.length) {\r\n return;\r\n }\r\n msgIDs = goodMsgIDs;\r\n }\r\n promise = mtprotoworker_1.default.invokeApi('channels.deleteMessages', {\r\n channel: appChatsManager_1.default.getChannelInput(channelID),\r\n id: msgIDs\r\n }).then((affectedMessages) => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateDeleteChannelMessages',\r\n channel_id: channelID,\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 else {\r\n let flags = 0;\r\n if (revoke) {\r\n flags |= 1;\r\n }\r\n promise = mtprotoworker_1.default.invokeApi('messages.deleteMessages', {\r\n flags: flags,\r\n id: msgIDs\r\n }).then((affectedMessages) => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateDeleteMessages',\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 promises.push(promise);\r\n }\r\n return Promise.all(promises);\r\n }\r\n readHistory(peerID, maxID = 0, readLength = 0) {\r\n // console.trace('start read')\r\n const isChannel = appPeersManager_1.default.isChannel(peerID);\r\n const historyStorage = this.historiesStorage[peerID];\r\n const 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 foundUnread = !!historyStorage.history.find(messageID => {\r\n const message = this.messagesStorage[messageID];\r\n return message && !message.pFlags.out && message.pFlags.unread;\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 let 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 let index = -1;\r\n if (maxID != 0 && historyStorage.history.length) {\r\n index = historyStorage.history.indexOf(maxID);\r\n }\r\n let readedLength = 1;\r\n if (historyStorage.history.length && maxID) {\r\n for (let i = index == -1 ? 0 : index, length = historyStorage.history.length; i < length; i++) {\r\n const messageID = historyStorage.history[i];\r\n if (messageID > maxID)\r\n continue;\r\n const message = this.messagesStorage[messageID];\r\n if (message && !message.pFlags.out) {\r\n message.pFlags.unread = false;\r\n readedLength++;\r\n //NotificationsManager.cancel('msg' + messageID); // warning\r\n }\r\n }\r\n }\r\n if (foundDialog) {\r\n // console.log('done read history', peerID)\r\n if (historyStorage.history.length) {\r\n ////////console.warn('readPromise:', index, historyStorage.history[index != -1 ? index : 0]);\r\n foundDialog.read_inbox_max_id = maxID;\r\n }\r\n if (foundDialog.read_inbox_max_id == foundDialog.top_message || foundDialog.read_inbox_max_id == foundDialog.read_outbox_max_id) {\r\n foundDialog.unread_count = 0;\r\n }\r\n else {\r\n foundDialog.unread_count = Math.max(foundDialog.unread_count - (readLength || readedLength), 0);\r\n }\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 return true;\r\n }\r\n return false;\r\n }).finally(() => {\r\n delete historyStorage.readPromise;\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 //console.log('AMM updateMessageID:', update, pendingData);\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 this.scheduleHandleNewDialogs();\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 this.scheduleHandleNewDialogs();\r\n break;\r\n }\r\n case 'updateDialogUnreadMark': {\r\n console.log('updateDialogUnreadMark', update);\r\n let peerID = appPeersManager_1.default.getPeerID(update.peer.peer);\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n this.scheduleHandleNewDialogs();\r\n }\r\n else {\r\n let dialog = foundDialog[0];\r\n if (!update.pFlags.unread) {\r\n delete dialog.pFlags.unread_mark;\r\n }\r\n else {\r\n dialog.pFlags.unread_mark = true;\r\n }\r\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', { peerID: dialog });\r\n }\r\n break;\r\n }\r\n case 'updateFolderPeers': {\r\n console.log('updateFolderPeers', update);\r\n let peers = update.folder_peers;\r\n this.scheduleHandleNewDialogs();\r\n peers.forEach((folderPeer) => {\r\n let { folder_id, peer } = folderPeer;\r\n let peerID = appPeersManager_1.default.getPeerID(peer);\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n }\r\n else {\r\n let dialog = foundDialog[0];\r\n this.newDialogsToHandle[peerID] = dialog;\r\n this.dialogsStorage[dialog.folder_id].splice(foundDialog[1], 1);\r\n dialog.folder_id = folder_id;\r\n this.generateIndexForDialog(dialog);\r\n this.pushDialogToStorage(dialog); // need for simultaneously updatePinnedDialogs\r\n }\r\n });\r\n break;\r\n }\r\n case 'updateDialogPinned': {\r\n console.log('updateDialogPinned', update);\r\n let peerID = appPeersManager_1.default.getPeerID(update.peer.peer);\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n this.scheduleHandleNewDialogs();\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n break;\r\n }\r\n else {\r\n let dialog = foundDialog[0];\r\n this.newDialogsToHandle[peerID] = dialog;\r\n if (!update.pFlags.pinned) {\r\n delete dialog.pFlags.pinned;\r\n delete dialog.pinnedIndex;\r\n }\r\n else { // means set\r\n dialog.pFlags.pinned = true;\r\n }\r\n this.generateIndexForDialog(dialog);\r\n }\r\n break;\r\n }\r\n case 'updatePinnedDialogs': {\r\n console.log('updatePinnedDialogs', update);\r\n let 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[0].forEach((dialog) => {\r\n let peerID = dialog.peerID;\r\n if (dialog.pFlags.pinned && !newPinned[peerID]) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n this.scheduleHandleNewDialogs();\r\n }\r\n });\r\n });\r\n break;\r\n }\r\n //console.log('before order:', this.dialogsStorage[0].map(d => d.peerID));\r\n this.pinnedIndex = 0;\r\n let willHandle = false;\r\n update.order.reverse(); // index must be higher\r\n update.order.forEach((peer) => {\r\n let peerID = appPeersManager_1.default.getPeerID(peer.peer);\r\n newPinned[peerID] = true;\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n willHandle = true;\r\n return;\r\n }\r\n let dialog = foundDialog[0];\r\n delete dialog.pinnedIndex;\r\n dialog.pFlags.pinned = true;\r\n this.generateIndexForDialog(dialog);\r\n this.newDialogsToHandle[peerID] = dialog;\r\n willHandle = true;\r\n });\r\n this.dialogsStorage[0].forEach(dialog => {\r\n let peerID = dialog.peerID;\r\n if (dialog.pFlags.pinned && !newPinned[peerID]) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n willHandle = true;\r\n }\r\n });\r\n if (willHandle) {\r\n this.scheduleHandleNewDialogs();\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) {\r\n continue;\r\n }\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 (!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 foundDialog[0][isOut ? 'read_outbox_max_id' : 'read_inbox_max_id'] = 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 let historiesUpdated = {};\r\n let channelID = update.channel_id;\r\n for (let i = 0; i < update.messages.length; i++) {\r\n let messageID = appMessagesIDsManager_1.default.getFullMessageID(update.messages[i], channelID);\r\n let message = this.messagesStorage[messageID];\r\n if (message) {\r\n let peerID = this.getMessagePeer(message);\r\n let 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 }\r\n history.count++;\r\n history.msgs[messageID] = true;\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 let peerMessagesToHandle = this.newMessagesToHandle[peerID];\r\n if (peerMessagesToHandle && peerMessagesToHandle.length) {\r\n let 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 let historyStorage = this.historiesStorage[peerID];\r\n if (historyStorage !== undefined) {\r\n let newHistory = [];\r\n let newPending = [];\r\n for (let 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 (let 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 let 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[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID, dialog: foundDialog[0] });\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n case 'updateChannelReload': {\r\n let channelID = update.channel_id;\r\n let peerID = -channelID;\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog[0]) {\r\n this.dialogsStorage[foundDialog[0].folder_id].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 let views = update.views;\r\n let mid = appMessagesIDsManager_1.default.getFullMessageID(update.id, update.channel_id);\r\n let 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 console.log('updateServiceNotification', update);\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 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, backLimit) {\r\n var _a;\r\n if (this.migratedFromTo[peerID]) {\r\n peerID = this.migratedFromTo[peerID];\r\n }\r\n const historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = { count: null, history: [], pending: [] });\r\n const unreadOffset = 0;\r\n const unreadSkip = false;\r\n let offset = 0;\r\n let offsetNotFound = false;\r\n let isMigrated = false;\r\n let 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 (maxID > 0) {\r\n offsetNotFound = true;\r\n for (; 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)) {\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;\r\n }\r\n let 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({\r\n count: historyStorage.count,\r\n history: history,\r\n unreadOffset: unreadOffset,\r\n unreadSkip: unreadSkip\r\n });\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 let 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({\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({\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 const 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 if (!maxID && historyResult.messages.length) {\r\n maxID = historyResult.messages[0].mid + 1;\r\n }\r\n let offset = 0;\r\n if (maxID > 0) {\r\n for (; offset < historyStorage.history.length; offset++) {\r\n if (maxID > historyStorage.history[offset]) {\r\n break;\r\n }\r\n }\r\n }\r\n const 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 const totalCount = historyStorage.history.length;\r\n fullLimit -= (totalCount - wasTotalCount);\r\n const migratedNextPeer = this.migratedFromTo[peerID];\r\n const migratedPrevPeer = this.migratedToFrom[peerID];\r\n const 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(result) {\r\n if (result.unreadOffset) {\r\n for (let i = result.history.length - 1; i >= 0; i--) {\r\n const 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 }\r\n requestHistory(peerID, maxID, limit, offset = 0) {\r\n const 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: APITIMEOUT,\r\n noErrorBox: true\r\n }).then((historyResult) => {\r\n console.log('requestHistory result:', historyResult, maxID, limit, offset);\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 let 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 // will load more history if last message is album grouped (because it can be not last item)\r\n const historyStorage = this.historiesStorage[peerID];\r\n // historyResult.messages: desc sorted\r\n if (length && historyResult.messages[length - 1].grouped_id && (historyStorage.history.length + historyResult.messages.length) < historyResult.count) {\r\n return this.requestHistory(peerID, historyResult.messages[length - 1].mid, 10, 0).then((_historyResult) => {\r\n return historyResult;\r\n });\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 let 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 throw error;\r\n });\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 utils_1.$rootScope.$broadcast('messages_downloaded', [msgID]);\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), 10);\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": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"name": "./src/lib/appManagers/appChatsManager.ts",
"index": 30,
"index2": 33,
"size": 15461,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "9:42-70"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "18:42-70"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPeersManager.ts",
"module": "./src/lib/appManagers/appPeersManager.ts",
"moduleName": "./src/lib/appManagers/appPeersManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "7:42-70"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "22:42-70"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "18:42-70"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "13:42-70"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "26:42-70"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appChatsManager",
"loc": "9:42-82"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appChatsManager",
"loc": "20:42-87"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "38:42-70"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appChatsManager",
"loc": "15:42-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppChatsManager = void 0;\r\nconst utils_1 = require(\"../utils\");\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\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 this.megagroupOnlines = {};\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 let oldChat = this.chats[apiChat.id];\r\n let titleWords = searchIndexManager_1.default.cleanSearchText(apiChat.title || '', false).split(' ');\r\n let firstWord = titleWords.shift();\r\n let lastWord = titleWords.pop();\r\n apiChat.initials = firstWord.charAt(0) + (lastWord ? lastWord.charAt(0) : '');\r\n if (apiChat.pFlags === undefined) {\r\n apiChat.pFlags = {};\r\n }\r\n if (apiChat.pFlags.min) {\r\n if (oldChat !== undefined) {\r\n return;\r\n }\r\n }\r\n if (apiChat._ == 'channel' &&\r\n apiChat.participants_count === undefined &&\r\n oldChat !== undefined &&\r\n oldChat.participants_count) {\r\n apiChat.participants_count = oldChat.participants_count;\r\n }\r\n if (apiChat.username) {\r\n let searchUsername = searchIndexManager_1.default.cleanUsername(apiChat.username);\r\n this.usernames[searchUsername] = apiChat.id;\r\n }\r\n let changedPhoto = false;\r\n if (oldChat === undefined) {\r\n oldChat = this.chats[apiChat.id] = apiChat;\r\n }\r\n else {\r\n let oldPhoto = oldChat.photo && oldChat.photo.photo_small;\r\n let newPhoto = apiChat.photo && apiChat.photo.photo_small;\r\n if (JSON.stringify(oldPhoto) !== JSON.stringify(newPhoto)) {\r\n changedPhoto = true;\r\n }\r\n utils_1.safeReplaceObject(oldChat, 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 if (changedPhoto) {\r\n utils_1.$rootScope.$broadcast('avatar_update', -apiChat.id);\r\n }\r\n }\r\n getChat(id) {\r\n if (id < 0)\r\n id = -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 var _a, _b;\r\n const chat = this.getChat(id);\r\n if (!chat)\r\n return false;\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 let myFlags = (_b = (_a = (chat.admin_rights || chat.banned_rights || chat.default_banned_rights)) === null || _a === void 0 ? void 0 : _a.pFlags) !== null && _b !== void 0 ? _b : {};\r\n switch (action) {\r\n // good\r\n case 'send': {\r\n if (chat._ == 'channel' &&\r\n !chat.pFlags.megagroup &&\r\n !myFlags.post_messages) {\r\n return false;\r\n }\r\n break;\r\n }\r\n // good\r\n case 'deleteRevoke': {\r\n if (chat._ == 'channel') {\r\n return !!myFlags.delete_messages;\r\n }\r\n else if (!chat.pFlags.admin) {\r\n return false;\r\n }\r\n break;\r\n }\r\n // good\r\n case 'pin': {\r\n if (chat._ == 'channel') {\r\n return chat.admin_rights ? !!myFlags.pin_messages || !!myFlags.post_messages : !myFlags.pin_messages;\r\n }\r\n else {\r\n if (myFlags.pin_messages && !chat.pFlags.admin) {\r\n return false;\r\n }\r\n }\r\n break;\r\n }\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 (!(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 }\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 let chat = this.chats[id];\r\n if (chat && (chat._ == 'channel' || chat._ == 'channelForbidden') || 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 let 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 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 getChatInputPeer(id) {\r\n return {\r\n _: 'inputPeerChat',\r\n chat_id: id\r\n };\r\n }\r\n getChannelInputPeer(id) {\r\n if (!id) {\r\n return { _: 'inputPeerEmpty' };\r\n }\r\n return {\r\n _: 'inputPeerChannel',\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 let chat = this.chats[id];\r\n return utils_1.isObject(chat) && (allowMin || !chat.pFlags.min);\r\n }\r\n getChatPhoto(id) {\r\n let 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 let 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 getChatMembersString(id) {\r\n var _a;\r\n const chat = this.getChat(id);\r\n const isChannel = this.isBroadcast(id);\r\n const participants_count = chat.participants_count || ((_a = chat.participants) === null || _a === void 0 ? void 0 : _a.participants.length) || 0;\r\n return utils_1.numberWithCommas(participants_count) + ' ' + (isChannel ? 'subscribers' : 'members');\r\n }\r\n wrapForFull(id, fullChat) {\r\n let chatFull = utils_1.copy(fullChat);\r\n let 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 let chat = this.getChat(id);\r\n let myID = appUsersManager_1.default.getSelf().id;\r\n if (this.isChannel(id)) {\r\n let isAdmin = chat.pFlags.creator;\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 let 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 createChannel(title, about) {\r\n return mtprotoworker_1.default.invokeApi('channels.createChannel', {\r\n flags: 1,\r\n broadcast: true,\r\n title: title,\r\n about: about\r\n }).then((updates) => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n return updates.chats[0].id;\r\n });\r\n }\r\n inviteToChannel(id, userIDs) {\r\n let input = this.getChannelInput(id);\r\n let usersInputs = userIDs.map(u => appUsersManager_1.default.getUserInput(u));\r\n return mtprotoworker_1.default.invokeApi('channels.inviteToChannel', {\r\n channel: input,\r\n users: usersInputs\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n createChat(title, userIDs) {\r\n return mtprotoworker_1.default.invokeApi('messages.createChat', {\r\n users: userIDs.map(u => appUsersManager_1.default.getUserInput(u)),\r\n title: title\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n return updates.chats[0].id;\r\n });\r\n }\r\n editPhoto(id, inputFile) {\r\n let isChannel = this.isChannel(id);\r\n let inputChatPhoto = {\r\n _: 'inputChatUploadedPhoto',\r\n file: inputFile\r\n };\r\n if (isChannel) {\r\n return mtprotoworker_1.default.invokeApi('channels.editPhoto', {\r\n channel: this.getChannelInputPeer(id),\r\n photo: inputChatPhoto\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n else {\r\n return mtprotoworker_1.default.invokeApi('messages.editChatPhoto', {\r\n chat_id: id,\r\n photo: inputChatPhoto\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n }\r\n getOnlines(id) {\r\n var _a, _b;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.isMegagroup(id)) {\r\n let timestamp = Date.now() / 1000 | 0;\r\n let cached = (_a = this.megagroupOnlines[id]) !== null && _a !== void 0 ? _a : (this.megagroupOnlines[id] = { timestamp: 0, onlines: 1 });\r\n if ((timestamp - cached.timestamp) < 60) {\r\n return cached.onlines;\r\n }\r\n let res = yield mtprotoworker_1.default.invokeApi('messages.getOnlines', {\r\n peer: this.getChannelInputPeer(id)\r\n });\r\n let onlines = (_b = res.onlines) !== null && _b !== void 0 ? _b : 1;\r\n cached.timestamp = timestamp;\r\n cached.onlines = onlines;\r\n return onlines;\r\n }\r\n else if (this.isBroadcast(id)) {\r\n return 1;\r\n }\r\n let chatInfo = appProfileManager_1.default.getChatFull(id);\r\n if (chatInfo._ == 'chatFull' && chatInfo.participants && chatInfo.participants.participants) {\r\n let participants = chatInfo.participants.participants;\r\n return participants.reduce((acc, participant) => {\r\n let user = appUsersManager_1.default.getUser(participant.user_id);\r\n if (user && user.status && user.status._ == 'userStatusOnline') {\r\n return acc + 1;\r\n }\r\n return acc;\r\n }, 0);\r\n }\r\n else {\r\n return 1;\r\n }\r\n });\r\n }\r\n}\r\nexports.AppChatsManager = AppChatsManager;\r\nexports.default = new AppChatsManager();\r\n"
},
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPeersManager.ts",
"name": "./src/lib/appManagers/appPeersManager.ts",
"index": 32,
"index2": 23,
"size": 6887,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "26:42-70"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "12:42-70"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "22:42-70"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "11:42-70"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "18:42-70"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "40:42-70"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "16:42-70"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appPeersManager",
"loc": "17:42-82"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "8:42-70"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appPeersManager",
"loc": "11:42-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 let 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, onlyFirstName = 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 if (onlyFirstName) {\r\n title = title.split(' ')[0];\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 let 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 else if (!peerString)\r\n return 0;\r\n let isUser = peerString.charAt(0) == 'u';\r\n let 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 getInputPeer: (peerString) => {\r\n var firstChar = peerString.charAt(0);\r\n var peerParams = peerString.substr(1).split('_');\r\n let id = +peerParams[0];\r\n if (firstChar == 'u') {\r\n appUsersManager_1.default.saveUserAccess(id, peerParams[1]);\r\n return {\r\n _: 'inputPeerUser',\r\n user_id: id,\r\n access_hash: peerParams[1]\r\n };\r\n }\r\n else if (firstChar == 'c' || firstChar == 's') {\r\n appChatsManager_1.default.saveChannelAccess(id, peerParams[1]);\r\n if (firstChar == 's') {\r\n appChatsManager_1.default.saveIsMegagroup(id);\r\n }\r\n return {\r\n _: 'inputPeerChannel',\r\n channel_id: id,\r\n access_hash: peerParams[1] || 0\r\n };\r\n }\r\n else {\r\n return {\r\n _: 'inputPeerChat',\r\n chat_id: id\r\n };\r\n }\r\n },\r\n getInputPeerByID: (peerID) => {\r\n if (!peerID) {\r\n return { _: 'inputPeerEmpty' };\r\n }\r\n if (peerID < 0) {\r\n let chatID = -peerID;\r\n if (!appChatsManager_1.default.isChannel(chatID)) {\r\n return appChatsManager_1.default.getChatInputPeer(chatID);\r\n }\r\n else {\r\n return appChatsManager_1.default.getChannelInputPeer(chatID);\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 let 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 let 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": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"name": "./src/lib/appManagers/appPhotosManager.ts",
"index": 35,
"index2": 30,
"size": 16352,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "24:43-72"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "16:43-72"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "19:43-72"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appPhotosManager",
"loc": "35:43-89"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "39:43-72"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "17:43-72"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appPhotosManager",
"loc": "12:43-84"
},
{
"moduleId": 41,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"module": "./src/lib/appManagers/appWebPagesManager.ts",
"moduleName": "./src/lib/appManagers/appWebPagesManager.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "7:43-72"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appPhotosManager",
"loc": "23:43-89"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "35:43-72"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppPhotosManager = void 0;\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\nlet AppPhotosManager = /** @class */ (() => {\r\n class AppPhotosManager {\r\n constructor() {\r\n this.photos = {};\r\n this.documentThumbsCache = {};\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 sizes = (photo.sizes || photo.thumbs);\r\n if (sizes) {\r\n for (let photoSize of sizes) {\r\n if (!photoSize.w || !photoSize.h)\r\n continue;\r\n bestPhotoSize = photoSize;\r\n let { w, h } = utils_1.calcImageInBox(photoSize.w, photoSize.h, width, height);\r\n if (w == width || h == height) {\r\n break;\r\n }\r\n }\r\n }\r\n /* let bestPhotoSize: MTPhotoSize = {_: 'photoSizeEmpty'};\r\n let bestDiff = 0xFFFFFF;\r\n \r\n //console.log('choosePhotoSize', photo);\r\n \r\n let sizes = photo.sizes || photo.thumbs;\r\n if(!sizes) return bestPhotoSize;\r\n \r\n sizes.forEach((photoSize: typeof bestPhotoSize) => {\r\n if(!photoSize.w || !photoSize.h) return;\r\n \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 \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 getPreviewURLFromBytes(bytes, isSticker = 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 instanceof Uint8Array ? bytes : new Uint8Array(bytes);\r\n }\r\n //console.log('getPreviewURLFromBytes', bytes, arr, div, isSticker);\r\n /* let reader = new FileReader();\r\n reader.onloadend = () => {\r\n let src = reader.result;\r\n };\r\n reader.readAsDataURL(blob); */\r\n let blob = new Blob([arr], { type: \"image/jpeg\" });\r\n return URL.createObjectURL(blob);\r\n }\r\n getPreviewURLFromThumb(thumb, isSticker = false) {\r\n var _a;\r\n return (_a = thumb.url) !== null && _a !== void 0 ? _a : (thumb.url = this.getPreviewURLFromBytes(thumb.bytes, isSticker));\r\n }\r\n setAttachmentPreview(bytes, element, isSticker = false, background = false) {\r\n let url = this.getPreviewURLFromBytes(bytes, isSticker);\r\n if (background) {\r\n let img = new Image();\r\n img.src = url;\r\n img.addEventListener('load', () => {\r\n element.style.backgroundImage = 'url(' + url + ')';\r\n });\r\n return element;\r\n }\r\n else {\r\n if (element instanceof HTMLImageElement) {\r\n element.src = url;\r\n return element;\r\n }\r\n else {\r\n let img = new Image();\r\n /* img.style.width = '100%';\r\n img.style.height = '100%'; */\r\n img.src = url;\r\n element.append(img);\r\n return img;\r\n }\r\n }\r\n }\r\n setAttachmentSize(photoID, element, boxWidth = 480, boxHeight = 480, 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 && 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 SVGForeignObjectElement) {\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 }\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 var _a;\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 let isDocument = photo._ == 'document';\r\n let cacheContext = isDocument ? ((_a = this.documentThumbsCache[photo.id]) !== null && _a !== void 0 ? _a : (this.documentThumbsCache[photo.id] = { downloaded: -1, url: '' })) : photo;\r\n if (cacheContext.downloaded >= photoSize.size && cacheContext.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 _: isDocument ? '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 promise.then(blob => {\r\n if (!cacheContext.downloaded || cacheContext.downloaded < blob.size) {\r\n cacheContext.downloaded = blob.size;\r\n cacheContext.url = URL.createObjectURL(blob);\r\n //console.log('wrote photo:', photo, photoSize, cacheContext, blob);\r\n }\r\n });\r\n return promise;\r\n }\r\n getDocumentCachedThumb(docID) {\r\n return this.documentThumbsCache[docID];\r\n }\r\n getPhoto(photoID) {\r\n return utils_1.isObject(photoID) ? photoID : this.photos[photoID];\r\n }\r\n getInputByID(photoID) {\r\n let photo = this.getPhoto(photoID);\r\n return {\r\n _: 'inputMediaPhoto',\r\n flags: 0,\r\n id: {\r\n _: 'inputPhoto',\r\n id: photo.id,\r\n access_hash: photo.access_hash,\r\n file_reference: photo.file_reference\r\n },\r\n ttl_seconds: 0\r\n };\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\n AppPhotosManager.jf = new Uint8Array(bin_utils_1.bytesFromHex('ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e19282321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2d2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc00011080000000003012200021101031101ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b5100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090a0bffc400b51100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00'));\r\n AppPhotosManager.Df = bin_utils_1.bytesFromHex('ffd9');\r\n return AppPhotosManager;\r\n})();\r\nexports.AppPhotosManager = AppPhotosManager;\r\nexports.default = new AppPhotosManager();\r\n"
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"name": "./src/components/scrollable_new.ts",
"index": 13,
"index2": 15,
"size": 15823,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/scrollable_new",
"loc": "29:41-83"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../../components/scrollable_new",
"loc": "24:41-83"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../components/scrollable_new",
"loc": "7:41-80"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../../components/scrollable_new",
"loc": "36:41-83"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "./scrollable_new",
"loc": "16:41-68"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/scrollable_new",
"loc": "34:41-83"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "./scrollable_new",
"loc": "8:41-68"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "./scrollable_new",
"loc": "26:41-68"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./scrollable_new",
"loc": "19:41-68"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 polyfill_1 = require(\"../lib/polyfill\");\r\nconst smoothscroll_1 = __importDefault(require(\"../lib/smoothscroll\"));\r\nwindow.__forceSmoothScrollPolyfill__ = true;\r\nsmoothscroll_1.default.polyfill();\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\n/*\r\nArray.from($0.querySelectorAll('.bubble__container')).forEach(_el => {\r\n //_el.style.display = '';\r\n //return;\r\n\r\n let el = _el.parentElement;\r\n let height = el.scrollHeight;\r\n let width = el.scrollWidth;\r\n el.style.width = width + 'px';\r\n el.style.height = height + 'px';\r\n _el.style.display = 'none';\r\n});\r\n*/\r\n/* const scrollables: Map<HTMLElement, Scrollable> = new Map();\r\nconst scrollsIntersector = new IntersectionObserver(entries => {\r\n for(let entry of entries) {\r\n const scrollable = scrollables.get(entry.target as HTMLElement);\r\n\r\n if(entry.isIntersecting) {\r\n scrollable.isVisible = true;\r\n } else {\r\n scrollable.isVisible = false;\r\n\r\n if(!isInDOM(entry.target)) {\r\n scrollsIntersector.unobserve(scrollable.container);\r\n scrollables.delete(scrollable.container);\r\n }\r\n }\r\n }\r\n}); */\r\nclass Scrollable {\r\n constructor(el, axis = 'y', logPrefix = '', appendTo = el, onScrollOffset = 300, splitCount = 15) {\r\n this.el = el;\r\n this.appendTo = appendTo;\r\n this.onScrollOffset = onScrollOffset;\r\n this.splitCount = splitCount;\r\n this.onScrolledTop = null;\r\n this.onScrolledBottom = null;\r\n this.onScrollMeasure = null;\r\n this.lastScrollTop = 0;\r\n this.disableHoverTimeout = 0;\r\n this.debug = false;\r\n this.virtualTempIDTop = 0;\r\n this.virtualTempIDBottom = 0;\r\n this.lastTopID = 0;\r\n this.lastBottomID = 0;\r\n this.lastScrollDirection = 0; // true = bottom\r\n this.onScrolledTopFired = false;\r\n this.onScrolledBottomFired = false;\r\n this.scrollLocked = 0;\r\n this.isVisible = false;\r\n this.container = document.createElement('div');\r\n this.container.classList.add('scrollable');\r\n this.visible = new Set();\r\n this.observer = new IntersectionObserver(entries => {\r\n let filtered = entries.filter(entry => entry.isIntersecting);\r\n //return;\r\n //this.log('entries:', entries);\r\n entries.forEach(entry => {\r\n let target = entry.target;\r\n if (entry.isIntersecting) {\r\n this.setVisible(target);\r\n this.debug && this.log('intersection entry:', entry, this.lastTopID, this.lastBottomID);\r\n }\r\n else {\r\n let id = +target.dataset.virtual;\r\n let isTop = entry.boundingClientRect.top < 0;\r\n if (isTop) {\r\n this.lastTopID = id + 1;\r\n }\r\n else {\r\n this.lastBottomID = id - 1;\r\n }\r\n //this.setHidden(target);\r\n //this.log('intersection entry setHidden:', entry);\r\n }\r\n //this.debug && this.log('intersection entry:', entry, isTop, isBottom, this.lastTopID, this.lastBottomID);\r\n });\r\n if (!filtered.length || this.lastScrollDirection === 0) {\r\n return;\r\n }\r\n if (this.lastScrollDirection === 1) { // bottom\r\n let target = filtered[filtered.length - 1].target;\r\n this.lastBottomID = +target.dataset.virtual;\r\n for (let i = 0; i < this.splitCount; ++i) {\r\n target = target.nextElementSibling;\r\n if (!target)\r\n break;\r\n this.setVisible(target);\r\n }\r\n }\r\n else {\r\n let target = filtered[0].target;\r\n this.lastTopID = +target.dataset.virtual;\r\n for (let i = 0; i < this.splitCount; ++i) {\r\n target = target.previousElementSibling;\r\n if (!target)\r\n break;\r\n this.setVisible(target);\r\n }\r\n }\r\n this.debug && this.log('entries:', entries, filtered, this.lastScrollDirection, this.lastTopID, this.lastBottomID);\r\n let minVisibleID = this.lastTopID - this.splitCount;\r\n let maxVisibleID = this.lastBottomID + this.splitCount;\r\n for (let target of this.visible) {\r\n let id = +target.dataset.virtual;\r\n if (id < minVisibleID || id > maxVisibleID) {\r\n this.setHidden(target);\r\n }\r\n }\r\n });\r\n if (!appendTo) {\r\n this.appendTo = this.container;\r\n }\r\n this.log = polyfill_1.logger('SCROLL' + (logPrefix ? '-' + logPrefix : ''));\r\n if (axis == 'x') {\r\n this.container.classList.add('scrollable-x');\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 }\r\n else {\r\n throw new Error('no side for scroll');\r\n }\r\n const binded = this.onScroll.bind(this);\r\n window.addEventListener('resize', () => {\r\n this.overflowContainer = window.innerWidth <= 720 && false ? document.documentElement : this.container;\r\n this.onScroll();\r\n });\r\n this.container.addEventListener('scroll', binded, { passive: true, capture: true });\r\n //document.documentElement.addEventListener('scroll', binded, {passive: true, capture: true});\r\n //window.addEventListener('scroll', binded, {passive: true, capture: true});\r\n Array.from(el.children).forEach(c => this.container.append(c));\r\n el.append(this.container);\r\n //this.onScroll();\r\n this.overflowContainer = window.innerWidth <= 720 && false ? document.documentElement : this.container;\r\n /* scrollables.set(this.container, this);\r\n scrollsIntersector.observe(this.container); */\r\n }\r\n setVisible(element) {\r\n if (this.visible.has(element))\r\n return;\r\n this.debug && this.log('setVisible id:', element.dataset.virtual);\r\n element.firstElementChild.style.display = '';\r\n this.visible.add(element);\r\n }\r\n setHidden(element) {\r\n if (!this.visible.has(element))\r\n return;\r\n this.debug && this.log('setHidden id:', element.dataset.virtual);\r\n element.firstElementChild.style.display = 'none';\r\n this.visible.delete(element);\r\n }\r\n // public attachSentinels(container = this.container, offset = this.onScrollOffset) {\r\n // if(!this.sentinelsObserver) {\r\n // this.topSentinel = document.createElement('div');\r\n // this.topSentinel.classList.add('scrollable-sentinel');\r\n // this.topSentinel.style.top = offset + 'px';\r\n // this.bottomSentinel = document.createElement('div');\r\n // this.bottomSentinel.classList.add('scrollable-sentinel');\r\n // this.bottomSentinel.style.bottom = offset + 'px';\r\n // this.container.append(this.topSentinel, this.bottomSentinel);\r\n // //let fire: () => void;\r\n // this.sentinelsObserver = new IntersectionObserver(entries => {\r\n // for(let entry of entries) {\r\n // let top = entry.target == this.topSentinel;\r\n // if(top) {\r\n // this.onScrolledTopFired = entry.isIntersecting;\r\n // } else {\r\n // this.onScrolledBottomFired = entry.isIntersecting;\r\n // }\r\n // }\r\n // /* this.debug && */this.log('Set onScrolledFires:', this.onScrolledTopFired, this.onScrolledBottomFired);\r\n // /* if((this.onScrolledTopFired || this.onScrolledBottomFired) && !fire) {\r\n // fire = () => window.requestAnimationFrame(() => {\r\n // if(!this.scrollLocked) {\r\n // if(this.onScrolledTopFired && this.onScrolledTop) this.onScrolledTop();\r\n // if(this.onScrolledBottomFired && this.onScrolledBottom) this.onScrolledBottom(); \r\n // }\r\n // if(!this.onScrolledTopFired && !this.onScrolledBottomFired) {\r\n // fire = undefined;\r\n // } else {\r\n // fire();\r\n // }\r\n // });\r\n // fire();\r\n // } */\r\n // });\r\n // this.sentinelsObserver.observe(this.topSentinel);\r\n // this.sentinelsObserver.observe(this.bottomSentinel);\r\n // }\r\n // container.prepend(this.topSentinel);\r\n // container.append(this.bottomSentinel);\r\n // }\r\n setVirtualContainer(el) {\r\n this.splitUp = el;\r\n this.lastScrollTop = 0;\r\n this.log('setVirtualContainer:', el, this);\r\n }\r\n onScroll() {\r\n /* let scrollTop = this.scrollTop;\r\n this.lastScrollDirection = this.lastScrollTop < scrollTop;\r\n this.lastScrollTop = scrollTop;\r\n return; */\r\n //if(!this.isVisible) 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 this.lastScrollDirection = 0;\r\n }, 100);\r\n if (this.onScrollMeasure)\r\n return;\r\n this.onScrollMeasure = window.requestAnimationFrame(() => {\r\n //if(!this.isVisible) return;\r\n this.checkForTriggers(this.overflowContainer);\r\n this.onScrollMeasure = 0;\r\n if (!this.splitUp)\r\n return;\r\n let scrollTop = this.overflowContainer.scrollTop;\r\n if (this.lastScrollTop != scrollTop) {\r\n this.lastScrollDirection = this.lastScrollTop < scrollTop ? 1 : -1;\r\n this.lastScrollTop = scrollTop;\r\n }\r\n else {\r\n this.lastScrollDirection = 0;\r\n }\r\n });\r\n }\r\n checkForTriggers(container) {\r\n if (this.scrollLocked || (!this.onScrolledTop && !this.onScrolledBottom))\r\n return;\r\n let scrollTop = container.scrollTop;\r\n let maxScrollTop = container.scrollHeight - container.clientHeight;\r\n //this.log('checkForTriggers:', scrollTop, maxScrollTop);\r\n if (this.onScrolledTop && scrollTop <= this.onScrollOffset) {\r\n this.onScrolledTop();\r\n }\r\n if (this.onScrolledBottom && (maxScrollTop - scrollTop) <= this.onScrollOffset) {\r\n this.onScrolledBottom();\r\n }\r\n }\r\n reorder() {\r\n Array.from(this.splitUp.children).forEach((el, idx) => {\r\n el.dataset.virtual = '' + idx;\r\n });\r\n }\r\n updateElement(element) {\r\n element.style.minHeight = '';\r\n window.requestAnimationFrame(() => {\r\n let height = element.scrollHeight;\r\n window.requestAnimationFrame(() => {\r\n element.style.minHeight = height + 'px';\r\n });\r\n });\r\n }\r\n prepareElement(element, append = true) {\r\n element.dataset.virtual = '' + (append ? this.virtualTempIDBottom++ : this.virtualTempIDTop--);\r\n this.debug && this.log('prepareElement: prepared');\r\n window.requestAnimationFrame(() => {\r\n let { scrollHeight /* , scrollWidth */ } = element;\r\n this.debug && this.log('prepareElement: first rAF');\r\n window.requestAnimationFrame(() => {\r\n //element.style.height = scrollHeight + 'px';\r\n element.style.minHeight = scrollHeight + 'px'; // height doesn't work for safari\r\n //element.style.width = scrollWidth + 'px';\r\n //(element.firstElementChild as HTMLElement).style.display = 'none';\r\n });\r\n this.visible.add(element);\r\n this.observer.observe(element);\r\n });\r\n }\r\n prepend(element, splitable = true) {\r\n if (splitable)\r\n this.prepareElement(element, false);\r\n if (this.splitUp)\r\n this.splitUp.prepend(element);\r\n else\r\n this.appendTo.prepend(element);\r\n }\r\n append(element, splitable = true) {\r\n if (splitable)\r\n this.prepareElement(element);\r\n if (this.splitUp)\r\n this.splitUp.append(element);\r\n else\r\n this.appendTo.append(element);\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;\r\n }\r\n scrollIntoView(element, smooth = true) {\r\n if (element.parentElement && !this.scrollLocked) {\r\n let isFirstUnread = element.classList.contains('is-first-unread');\r\n let offsetTop = element.getBoundingClientRect().top - this.container.getBoundingClientRect().top;\r\n offsetTop = this.container.scrollTop + offsetTop;\r\n if (!smooth && isFirstUnread) {\r\n this.scrollTo(offsetTop, false);\r\n return;\r\n }\r\n let clientHeight = this.container.clientHeight;\r\n let height = element.scrollHeight;\r\n let d = (clientHeight - height) / 2;\r\n offsetTop -= d;\r\n this.scrollTo(offsetTop, smooth);\r\n }\r\n }\r\n scrollTo(top, smooth = true, important = false) {\r\n if (this.scrollLocked && !important)\r\n return;\r\n let scrollTop = this.scrollTop;\r\n if (scrollTop == Math.floor(top)) {\r\n return;\r\n }\r\n if (this.scrollLocked)\r\n clearTimeout(this.scrollLocked);\r\n this.scrollLocked = setTimeout(() => {\r\n this.scrollLocked = 0;\r\n this.onScroll();\r\n }, 468);\r\n this.container.scrollTo({ behavior: smooth ? 'smooth' : 'auto', top });\r\n }\r\n removeElement(element) {\r\n element.remove();\r\n }\r\n set scrollTop(y) {\r\n this.container.scrollTop = y;\r\n }\r\n get scrollTop() {\r\n //this.log.trace('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 length() {\r\n return this.appendTo.childElementCount;\r\n }\r\n}\r\nexports.default = Scrollable;\r\n"
},
{
"id": 10,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"name": "./src/lib/polyfill.ts",
"index": 14,
"index2": 13,
"size": 3188,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"issuerId": 9,
"issuerName": "./src/components/scrollable_new.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"name": "./src/components/scrollable_new.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1195,
"building": 1822,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "36:19-41"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"module": "./src/components/scrollable_new.ts",
"moduleName": "./src/components/scrollable_new.ts",
"type": "cjs require",
"userRequest": "../lib/polyfill",
"loc": "6:19-45"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "18:19-41"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "18:19-41"
},
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "21:19-41"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "25:19-41"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "44:19-41"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "20:19-41"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.deferredPromise = exports.logger = exports.secureRandom = void 0;\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\nUint8Array.prototype.toJSON = function () {\r\n return [...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": 11,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"name": "./src/lib/bin_utils.ts",
"index": 15,
"index2": 12,
"size": 12166,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"issuerId": 72,
"issuerName": "./src/pages/pageSignQR.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2979,
"building": 103,
"dependencies": 2951
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "21:20-43"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "10:20-43"
},
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"module": "./src/lib/polyfill.ts",
"moduleName": "./src/lib/polyfill.ts",
"type": "cjs require",
"userRequest": "./bin_utils",
"loc": "4:20-42"
},
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "16:20-43"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\filemanager.ts",
"module": "./src/lib/filemanager.ts",
"moduleName": "./src/lib/filemanager.ts",
"type": "cjs require",
"userRequest": "./bin_utils",
"loc": "12:20-42"
},
{
"moduleId": 60,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../bin_utils",
"loc": "3:20-43"
},
{
"moduleId": 62,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\idb.ts",
"module": "./src/lib/idb.ts",
"moduleName": "./src/lib/idb.ts",
"type": "cjs require",
"userRequest": "./bin_utils",
"loc": "6:20-42"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "../lib/bin_utils",
"loc": "41:20-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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 <igor.beatle@gmail.com>\r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.nextRandomInt = exports.addPadding = exports.longFromInts = exports.longToBytes = exports.bytesToWordss = exports.bytesFromWordss = exports.bytesFromWords = exports.longToInts = exports.bufferConcats = exports.bufferConcat = exports.bytesFromArrayBuffer = exports.convertToByteArray = exports.convertToUint8Array = exports.convertToArrayBuffer = exports.bytesToArrayBuffer = exports.bytesFromBigInt = exports.bytesXor = exports.bytesCmp = exports.blobSafeMimeType = exports.blobConstruct = exports.dataUrlToBlob = exports.base64ToBlob = exports.uint6ToBase64 = exports.bytesToBase64 = exports.bytesFromHex = exports.bytesToHex = exports.bigStringInt = exports.bigint = exports.isObject = exports.dT = void 0;\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\n///////////////////////\r\n/////////////\r\n/////////////////////////////////////////////////\r\n///////////////////////////////////////////////////////////////////////////\r\n/////////////////////////////////////////////////////////////////////////////////\r\n/////////////////////////////////////////////////////////////////////////////////////////////\r\n///////////////////////////////////////////////\r\n//////////////////////////////////////////////////////////////////////////\r\n//////////////////////////////////////////////////////////////\r\n////////////////\r\n//////////\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nexports.dT = dT;\r\nfunction isObject(object) {\r\n return typeof (object) === 'object' && object !== null;\r\n}\r\nexports.isObject = isObject;\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 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 nextRandomInt(maxValue) {\r\n return Math.floor(Math.random() * maxValue);\r\n}\r\nexports.nextRandomInt = nextRandomInt;\r\n"
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"name": "./src/lib/appManagers/appDocsManager.ts",
"index": 44,
"index2": 38,
"size": 12353,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "29:41-68"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "32:41-68"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appDocsManager",
"loc": "39:41-85"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "23:41-68"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appDocsManager",
"loc": "19:41-80"
},
{
"moduleId": 37,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appStickersManager.ts",
"module": "./src/lib/appManagers/appStickersManager.ts",
"moduleName": "./src/lib/appManagers/appStickersManager.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "19:41-68"
},
{
"moduleId": 41,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"module": "./src/lib/appManagers/appWebPagesManager.ts",
"moduleName": "./src/lib/appManagers/appWebPagesManager.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "8:41-68"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appDocsManager",
"loc": "28:41-85"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\r\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst utils_1 = require(\"../utils\");\r\nconst opusDecodeController_1 = __importDefault(require(\"../opusDecodeController\"));\r\nclass AppDocsManager {\r\n constructor() {\r\n this.docs = {};\r\n this.thumbs = {};\r\n }\r\n saveDoc(apiDoc, 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 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 apiDoc.sticker = 1;\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.mime_type == 'application/x-tgsticker' && apiDoc.file_name == \"AnimatedSticker.tgs\") {\r\n apiDoc.type = 'sticker';\r\n apiDoc.animated = true;\r\n apiDoc.sticker = 2;\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 utils_1.isObject(docID) ? docID : this.docs[docID];\r\n }\r\n getMediaInputByID(docID) {\r\n let doc = this.getDoc(docID);\r\n return {\r\n _: 'inputMediaDocument',\r\n flags: 0,\r\n id: {\r\n _: 'inputDocument',\r\n id: doc.id,\r\n access_hash: doc.access_hash,\r\n file_reference: doc.file_reference\r\n },\r\n ttl_seconds: 0\r\n };\r\n }\r\n getInputByID(docID, thumbSize) {\r\n let doc = this.getDoc(docID);\r\n return {\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: thumbSize\r\n };\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 downloadDoc(docID, toFileEntry) {\r\n let doc = this.getDoc(docID);\r\n let inputFileLocation = this.getInputByID(doc);\r\n if (doc._ == 'documentEmpty') {\r\n return Promise.reject();\r\n }\r\n if (doc.downloaded && !toFileEntry) {\r\n if (doc.url)\r\n return Promise.resolve(null);\r\n let 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 let deferred = polyfill_1.deferredPromise();\r\n deferred.cancel = () => {\r\n downloadPromise.cancel();\r\n };\r\n // нет смысла делать объект с выполняющимися промисами, нижняя строка и так вернёт загружающийся\r\n let 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 stickerType: doc.sticker\r\n });\r\n downloadPromise.then((blob) => {\r\n if (blob) {\r\n doc.downloaded = true;\r\n if (doc.type == 'voice' /* && false */) {\r\n let reader = new FileReader();\r\n reader.onloadend = (e) => {\r\n let uint8 = new Uint8Array(e.target.result);\r\n //console.log('sending uint8 to decoder:', uint8);\r\n opusDecodeController_1.default.decode(uint8).then(result => {\r\n doc.url = result.url;\r\n deferred.resolve(blob);\r\n }, deferred.reject);\r\n };\r\n reader.readAsArrayBuffer(blob);\r\n return;\r\n }\r\n else if (doc.type && doc.sticker != 2) {\r\n doc.url = URL.createObjectURL(blob);\r\n }\r\n }\r\n deferred.resolve(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 deferred;\r\n }\r\n downloadDocThumb(docID, thumbSize) {\r\n let doc = this.getDoc(docID);\r\n let key = doc.id + '-' + thumbSize;\r\n if (this.thumbs[key]) {\r\n return this.thumbs[key];\r\n }\r\n let input = this.getInputByID(doc, thumbSize);\r\n if (doc._ == 'documentEmpty') {\r\n return Promise.reject();\r\n }\r\n let mimeType = doc.sticker ? 'image/webp' : doc.mime_type;\r\n let promise = apiFileManager_1.default.downloadSmallFile(input, {\r\n dcID: doc.dc_id,\r\n stickerType: doc.sticker ? 1 : undefined,\r\n mimeType: mimeType\r\n });\r\n return this.thumbs[key] = promise.then((blob) => {\r\n return URL.createObjectURL(blob);\r\n });\r\n }\r\n hasDownloadedThumb(docID, thumbSize) {\r\n return !!this.thumbs[docID + '-' + thumbSize];\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": 13,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"name": "./src/lib/storage.ts",
"index": 7,
"index2": 7,
"size": 6346,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"module": "./src/lib/mtproto/mtprotoworker.ts",
"moduleName": "./src/lib/mtproto/mtprotoworker.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "26:34-55"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "25:34-55"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "24:34-55"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts",
"module": "./src/lib/mtproto/serverTimeManager.ts",
"moduleName": "./src/lib/mtproto/serverTimeManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "7:34-55"
},
{
"moduleId": 37,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./lib/storage",
"loc": "60:70-94"
},
{
"moduleId": 63,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"module": "./src/lib/mtproto/mtproto.ts",
"moduleName": "./src/lib/mtproto/mtproto.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "7:34-55"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 = JSON.stringify(value, (key, value) => {\r\n if (key == 'downloaded' || (key == 'url' && value.indexOf('blob:') === 0))\r\n return undefined;\r\n return value;\r\n });\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<Cache>;\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": 14,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\lottieLoader.ts",
"name": "./src/lib/lottieLoader.ts",
"index": 24,
"index2": 17,
"size": 16963,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"issuerId": 57,
"issuerName": "./src/pages/pageAuthCode.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1040,
"building": 297,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../lottieLoader",
"loc": "19:39-65"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "38:39-69"
},
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"module": "./src/pages/pagePassword.ts",
"moduleName": "./src/pages/pagePassword.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "10:39-69"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "10:39-69"
},
{
"moduleId": 59,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagesManager.ts",
"module": "./src/pages/pagesManager.ts",
"moduleName": "./src/pages/pagesManager.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "8:39-69"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "36:39-69"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "17:39-69"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.RLottiePlayer = void 0;\r\nconst utils_1 = require(\"./utils\");\r\nlet convert = (value) => {\r\n return Math.round(Math.min(Math.max(value, 0), 1) * 255);\r\n};\r\nlet RLottiePlayer = /** @class */ (() => {\r\n class RLottiePlayer {\r\n constructor({ el, width, height, worker }) {\r\n this.reqId = 0;\r\n this.listeners = {};\r\n this.listenerResults = {};\r\n this.paused = true;\r\n this.direction = 1;\r\n this.speed = 1;\r\n this.autoplay = true;\r\n this.loop = true;\r\n this.playedTimes = 0;\r\n this.reqId = ++RLottiePlayer['reqId'];\r\n this.el = el;\r\n this.width = width;\r\n this.height = height;\r\n this.worker = worker;\r\n this.canvas = document.createElement('canvas');\r\n this.canvas.width = this.width;\r\n this.canvas.height = this.height;\r\n this.context = this.canvas.getContext('2d');\r\n }\r\n addListener(name, callback) {\r\n if (this.listenerResults.hasOwnProperty(name))\r\n return Promise.resolve(this.listenerResults[name]);\r\n this.listeners[name] = callback;\r\n }\r\n setListenerResult(name, value) {\r\n this.listenerResults[name] = value;\r\n if (this.listeners[name]) {\r\n this.listeners[name](value);\r\n }\r\n }\r\n sendQuery(methodName, ...args) {\r\n this.worker.sendQuery(methodName, this.reqId, ...args);\r\n }\r\n loadFromData(json) {\r\n this.sendQuery('loadFromData', json, this.width, this.height, {\r\n paused: this.paused,\r\n direction: this.direction,\r\n speed: this.speed\r\n });\r\n }\r\n play() {\r\n if (!this.paused)\r\n return;\r\n this.paused = false;\r\n this.setMainLoop();\r\n }\r\n pause() {\r\n if (this.paused)\r\n return;\r\n this.paused = true;\r\n window.cancelAnimationFrame(this.rafId);\r\n }\r\n stop() {\r\n this.pause();\r\n this.curFrame = this.direction == 1 ? 0 : this.frameCount;\r\n this.sendQuery('renderFrame', this.curFrame);\r\n }\r\n restart() {\r\n this.stop();\r\n this.play();\r\n }\r\n setSpeed(speed) {\r\n this.speed = speed;\r\n if (!this.paused) {\r\n this.setMainLoop();\r\n }\r\n }\r\n setDirection(direction) {\r\n this.direction = direction;\r\n if (!this.paused) {\r\n this.setMainLoop();\r\n }\r\n }\r\n destroy() {\r\n lottieLoader.onDestroy(this.reqId);\r\n this.pause();\r\n this.sendQuery('destroy');\r\n }\r\n renderFrame(frame, frameNo) {\r\n this.context.putImageData(new ImageData(frame, this.width, this.height), 0, 0);\r\n this.setListenerResult('enterFrame', frameNo);\r\n }\r\n mainLoop(method) {\r\n let r = () => {\r\n if (this.paused) {\r\n return;\r\n }\r\n const now = Date.now(), delta = now - this.frThen;\r\n if (delta > this.frInterval) {\r\n this.frThen = now - (delta % this.frInterval);\r\n const canContinue = method();\r\n if (!canContinue && !this.loop && this.autoplay) {\r\n this.autoplay = false;\r\n }\r\n }\r\n this.rafId = window.requestAnimationFrame(r);\r\n };\r\n //this.rafId = window.requestAnimationFrame(r);\r\n r();\r\n }\r\n mainLoopForwards() {\r\n this.sendQuery('renderFrame', this.curFrame++);\r\n if (this.curFrame >= this.frameCount) {\r\n this.playedTimes++;\r\n if (!this.loop)\r\n return false;\r\n this.curFrame = 0;\r\n }\r\n return true;\r\n }\r\n ;\r\n mainLoopBackwards() {\r\n this.sendQuery('renderFrame', this.curFrame--);\r\n if (this.curFrame < 0) {\r\n this.playedTimes++;\r\n if (!this.loop)\r\n return false;\r\n this.curFrame = this.frameCount - 1;\r\n }\r\n return true;\r\n }\r\n ;\r\n setMainLoop() {\r\n window.cancelAnimationFrame(this.rafId);\r\n this.frInterval = 1000 / this.fps / this.speed;\r\n this.frThen = Date.now();\r\n //console.trace('setMainLoop', this.frInterval, this.direction, this);\r\n const method = (this.direction == 1 ? this.mainLoopForwards : this.mainLoopBackwards).bind(this);\r\n this.mainLoop(method);\r\n }\r\n ;\r\n }\r\n RLottiePlayer.reqId = 0;\r\n return RLottiePlayer;\r\n})();\r\nexports.RLottiePlayer = RLottiePlayer;\r\nclass QueryableWorker {\r\n constructor(url, defaultListener = () => { }, onError) {\r\n this.defaultListener = defaultListener;\r\n this.listeners = {};\r\n this.worker = new Worker(url);\r\n if (onError) {\r\n this.worker.onerror = onError;\r\n }\r\n this.worker.onmessage = (event) => {\r\n if (event.data instanceof Object &&\r\n event.data.hasOwnProperty('queryMethodListener') &&\r\n event.data.hasOwnProperty('queryMethodArguments')) {\r\n this.listeners[event.data.queryMethodListener].apply(this, event.data.queryMethodArguments);\r\n }\r\n else {\r\n this.defaultListener.call(this, event.data);\r\n }\r\n };\r\n }\r\n postMessage(message) {\r\n this.worker.postMessage(message);\r\n }\r\n terminate() {\r\n this.worker.terminate();\r\n }\r\n addListener(name, listener) {\r\n this.listeners[name] = listener;\r\n }\r\n removeListener(name) {\r\n delete this.listeners[name];\r\n }\r\n sendQuery(queryMethod, ...args) {\r\n this.worker.postMessage({\r\n 'queryMethod': queryMethod,\r\n 'queryMethodArguments': args\r\n });\r\n }\r\n}\r\nlet LottieLoader = /** @class */ (() => {\r\n class LottieLoader {\r\n constructor() {\r\n this.loaded = false;\r\n this.workersLimit = 4;\r\n this.players = {};\r\n this.byGroups = {};\r\n this.workers = [];\r\n this.curWorkerNum = 0;\r\n this.visible = new Set();\r\n this.debug = true;\r\n this.observer = new IntersectionObserver((entries) => {\r\n for (const entry of entries) {\r\n const target = entry.target;\r\n for (const group in this.byGroups) {\r\n const player = this.byGroups[group].find(p => p.el == target);\r\n if (player) {\r\n if (entry.isIntersecting) {\r\n this.visible.add(player);\r\n this.checkAnimation(player, false);\r\n }\r\n else {\r\n this.visible.delete(player);\r\n this.checkAnimation(player, true);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n loadLottieWorkers() {\r\n if (this.loadPromise)\r\n return this.loadPromise;\r\n const onFrame = this.onFrame.bind(this);\r\n const onPlayerLoaded = this.onPlayerLoaded.bind(this);\r\n return this.loadPromise = new Promise((resolve, reject) => {\r\n let remain = this.workersLimit;\r\n for (let i = 0; i < this.workersLimit; ++i) {\r\n const worker = this.workers[i] = new QueryableWorker('rlottie.worker.js');\r\n worker.addListener('ready', () => {\r\n console.log('worker #' + i + ' ready');\r\n worker.addListener('frame', onFrame);\r\n worker.addListener('loaded', onPlayerLoaded);\r\n --remain;\r\n if (!remain) {\r\n console.log('workers ready');\r\n resolve();\r\n this.loaded = true;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n applyReplacements(object, toneIndex) {\r\n const replacements = LottieLoader.COLORREPLACEMENTS[toneIndex - 2];\r\n const iterateIt = (it) => {\r\n for (let smth of it) {\r\n switch (smth.ty) {\r\n case 'st':\r\n case 'fl':\r\n let k = smth.c.k;\r\n let color = convert(k[2]) | (convert(k[1]) << 8) | (convert(k[0]) << 16);\r\n let foundReplacement = replacements.find(p => p[0] == color);\r\n if (foundReplacement) {\r\n k[0] = ((foundReplacement[1] >> 16) & 255) / 255;\r\n k[1] = ((foundReplacement[1] >> 8) & 255) / 255;\r\n k[2] = (foundReplacement[1] & 255) / 255;\r\n }\r\n //console.log('foundReplacement!', foundReplacement, color.toString(16), k);\r\n break;\r\n }\r\n if (smth.hasOwnProperty('it')) {\r\n iterateIt(smth.it);\r\n }\r\n }\r\n };\r\n for (let layer of object.layers) {\r\n if (!layer.shapes)\r\n continue;\r\n for (let shape of layer.shapes) {\r\n iterateIt(shape.it);\r\n }\r\n }\r\n }\r\n loadAnimationWorker(params, group = '', toneIndex = -1) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n params.autoplay = true;\r\n if (toneIndex >= 1 && toneIndex <= 5) {\r\n this.applyReplacements(params.animationData, toneIndex);\r\n }\r\n if (!this.loaded) {\r\n yield this.loadLottieWorkers();\r\n }\r\n const width = params.width || parseInt(params.container.style.width);\r\n const height = params.height || parseInt(params.container.style.height);\r\n const player = this.initPlayer(params.container, params.animationData, width, height);\r\n for (let i in params) {\r\n // @ts-ignore\r\n if (player.hasOwnProperty(i)) {\r\n // @ts-ignore\r\n player[i] = params[i];\r\n }\r\n }\r\n ((_a = this.byGroups[group]) !== null && _a !== void 0 ? _a : (this.byGroups[group] = [])).push(player);\r\n return player;\r\n });\r\n }\r\n checkAnimations(blurred, group, destroy = false) {\r\n const groups = group && false ? [group] : Object.keys(this.byGroups);\r\n if (group && !this.byGroups[group]) {\r\n console.warn('no animation group:', group);\r\n this.byGroups[group] = [];\r\n //return;\r\n }\r\n for (const group of groups) {\r\n const animations = this.byGroups[group];\r\n animations.forEach(player => {\r\n this.checkAnimation(player, blurred, destroy);\r\n //if(!autoplay) continue;\r\n /* if(blurred || !isElementInViewport(container)) {\r\n if(!paused) {\r\n this.debug && console.log('pause animation', isElementInViewport(container), container);\r\n animation.pause();\r\n animations[i].paused = true;\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 checkAnimation(player, blurred = false, destroy = false) {\r\n if (destroy || (!utils_1.isInDOM(player.el) && player.listenerResults.hasOwnProperty('ready'))) {\r\n //console.log('destroy animation');\r\n player.destroy();\r\n return;\r\n }\r\n if (blurred) {\r\n if (!player.paused) {\r\n this.debug && console.log('pause animation', player);\r\n player.pause();\r\n }\r\n }\r\n else if (player.paused && this.visible.has(player) && player.autoplay) {\r\n this.debug && console.log('play animation', player);\r\n player.play();\r\n }\r\n }\r\n onPlayerLoaded(reqId, frameCount, fps) {\r\n const rlPlayer = this.players[reqId];\r\n if (!rlPlayer) {\r\n this.debug && console.warn('onPlayerLoaded on destroyed player:', reqId, frameCount);\r\n return;\r\n }\r\n rlPlayer.el.appendChild(rlPlayer.canvas);\r\n rlPlayer.curFrame = rlPlayer.direction == 1 ? 0 : frameCount - 1;\r\n rlPlayer.frameCount = frameCount;\r\n rlPlayer.fps = fps;\r\n rlPlayer.sendQuery('renderFrame', 0);\r\n rlPlayer.setListenerResult('ready');\r\n this.observer.observe(rlPlayer.el);\r\n }\r\n onFrame(reqId, frameNo, frame) {\r\n const rlPlayer = this.players[reqId];\r\n if (!rlPlayer) {\r\n this.debug && console.warn('onFrame on destroyed player:', reqId, frameNo);\r\n return;\r\n }\r\n rlPlayer.renderFrame(frame, frameNo);\r\n }\r\n onDestroy(reqId) {\r\n let player = this.players[reqId];\r\n for (let group in this.byGroups) {\r\n this.byGroups[group].findAndSplice(p => p == player);\r\n }\r\n delete this.players[player.reqId];\r\n this.observer.unobserve(player.el);\r\n this.visible.delete(player);\r\n }\r\n destroyWorkers() {\r\n this.workers.forEach((worker, idx) => {\r\n worker.terminate();\r\n console.log('worker #' + idx + ' terminated');\r\n });\r\n console.log('workers destroyed');\r\n this.workers.length = 0;\r\n }\r\n initPlayer(el, json, width, height) {\r\n const rlPlayer = new RLottiePlayer({\r\n el,\r\n width,\r\n height,\r\n worker: this.workers[this.curWorkerNum++]\r\n });\r\n this.players[rlPlayer.reqId] = rlPlayer;\r\n if (this.curWorkerNum >= this.workers.length) {\r\n this.curWorkerNum = 0;\r\n }\r\n rlPlayer.loadFromData(json);\r\n return rlPlayer;\r\n }\r\n }\r\n LottieLoader.COLORREPLACEMENTS = [\r\n [\r\n [0xf77e41, 0xca907a],\r\n [0xffb139, 0xedc5a5],\r\n [0xffd140, 0xf7e3c3],\r\n [0xffdf79, 0xfbefd6],\r\n ],\r\n [\r\n [0xf77e41, 0xaa7c60],\r\n [0xffb139, 0xc8a987],\r\n [0xffd140, 0xddc89f],\r\n [0xffdf79, 0xe6d6b2],\r\n ],\r\n [\r\n [0xf77e41, 0x8c6148],\r\n [0xffb139, 0xad8562],\r\n [0xffd140, 0xc49e76],\r\n [0xffdf79, 0xd4b188],\r\n ],\r\n [\r\n [0xf77e41, 0x6e3c2c],\r\n [0xffb139, 0x925a34],\r\n [0xffd140, 0xa16e46],\r\n [0xffdf79, 0xac7a52],\r\n ]\r\n ];\r\n return LottieLoader;\r\n})();\r\nconst lottieLoader = new LottieLoader();\r\nwindow.LottieLoader = lottieLoader;\r\nexports.default = lottieLoader;\r\n"
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"index": 25,
"index2": 67,
"size": 105261,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"issuerId": 22,
"issuerName": "./src/pages/pageIm.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appImManager",
"loc": "30:39-64"
},
{
"moduleId": 22,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"module": "./src/pages/pageIm.ts",
"moduleName": "./src/pages/pageIm.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appImManager",
"loc": "30:60-102"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appImManager",
"loc": "17:39-64"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appImManager",
"loc": "45:39-64"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appImManager",
"loc": "16:39-76"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appImManager",
"loc": "28:39-64"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appImManager",
"loc": "31:39-81"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppImManager = void 0;\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 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\n//import Scrollable from '../../components/scrollable';\r\nconst scrollable_new_1 = __importDefault(require(\"../../components/scrollable_new\"));\r\nconst bubbleGroups_1 = __importDefault(require(\"../../components/bubbleGroups\"));\r\nconst lazyLoadQueue_1 = __importDefault(require(\"../../components/lazyLoadQueue\"));\r\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nconst appForward_1 = __importDefault(require(\"../../components/appForward\"));\r\nconst appStickersManager_1 = __importDefault(require(\"./appStickersManager\"));\r\nconst avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst AppInlineBotsManager_1 = __importDefault(require(\"./AppInlineBotsManager\"));\r\nconst stickyIntersector_1 = __importDefault(require(\"../../components/stickyIntersector\"));\r\nconst popup_1 = require(\"../../components/popup\");\r\nconsole.log('appImManager included!');\r\nappSidebarLeft_1.default; // just to include\r\nlet testScroll = false;\r\nconst IGNOREACTIONS = ['messageActionChannelMigrateFrom'];\r\nclass ChatContextMenu {\r\n constructor(attachTo) {\r\n this.attachTo = attachTo;\r\n this.element = document.getElementById('bubble-contextmenu');\r\n this.buttons = {};\r\n misc_1.parseMenuButtonsTo(this.buttons, this.element.children);\r\n attachTo.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 return;\r\n e.preventDefault();\r\n if (this.element.classList.contains('active')) {\r\n return false;\r\n }\r\n e.cancelBubble = true;\r\n bubble = bubble.parentElement; // bc container\r\n let msgID = +bubble.dataset.mid;\r\n if (!msgID)\r\n return;\r\n let peerID = utils_1.$rootScope.selectedPeerID;\r\n this.msgID = msgID;\r\n const message = appMessagesManager_1.default.getMessage(msgID);\r\n this.buttons.copy.style.display = message.message ? '' : 'none';\r\n if (utils_1.$rootScope.myID == peerID || (peerID < 0 && appChatsManager_1.default.hasRights(-peerID, 'pin'))) {\r\n this.buttons.pin.style.display = '';\r\n }\r\n else {\r\n this.buttons.pin.style.display = 'none';\r\n }\r\n this.buttons.edit.style.display = appMessagesManager_1.default.canEditMessage(msgID) ? '' : 'none';\r\n let side = bubble.classList.contains('is-in') ? 'left' : 'right';\r\n misc_1.positionMenu(e, this.element, side);\r\n misc_1.openBtnMenu(this.element);\r\n /////this.log('contextmenu', e, bubble, msgID, side);\r\n });\r\n this.buttons.copy.addEventListener('click', () => {\r\n let message = appMessagesManager_1.default.getMessage(this.msgID);\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.buttons.delete.addEventListener('click', () => {\r\n let peerID = utils_1.$rootScope.selectedPeerID;\r\n let firstName = appPeersManager_1.default.getPeerTitle(peerID, false, true);\r\n let callback = (revoke) => {\r\n appMessagesManager_1.default.deleteMessages([this.msgID], revoke);\r\n };\r\n let title, description, buttons;\r\n title = 'Delete Message?';\r\n description = `Are you sure you want to delete this message?`;\r\n if (peerID == utils_1.$rootScope.myID) {\r\n buttons = [{\r\n text: 'DELETE',\r\n isDanger: true,\r\n callback: () => callback(false)\r\n }];\r\n }\r\n else {\r\n buttons = [{\r\n text: 'DELETE JUST FOR ME',\r\n isDanger: true,\r\n callback: () => callback(false)\r\n }];\r\n if (peerID > 0) {\r\n buttons.push({\r\n text: 'DELETE FOR ME AND ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(true)\r\n });\r\n }\r\n else if (appChatsManager_1.default.hasRights(-peerID, 'deleteRevoke')) {\r\n buttons.push({\r\n text: 'DELETE FOR ALL',\r\n isDanger: true,\r\n callback: () => callback(true)\r\n });\r\n }\r\n }\r\n buttons.push({\r\n text: 'CANCEL',\r\n isCancel: true\r\n });\r\n let popup = new popup_1.PopupPeer('popup-delete-chat', {\r\n peerID: peerID,\r\n title: title,\r\n description: description,\r\n buttons: buttons\r\n });\r\n popup.show();\r\n });\r\n this.buttons.reply.addEventListener('click', () => {\r\n const message = appMessagesManager_1.default.getMessage(this.msgID);\r\n const chatInputC = appImManager.chatInputC;\r\n chatInputC.setTopInfo(appPeersManager_1.default.getPeerTitle(message.fromID, true), message.message, undefined, message);\r\n chatInputC.replyToMsgID = this.msgID;\r\n chatInputC.editMsgID = 0;\r\n });\r\n this.buttons.forward.addEventListener('click', () => {\r\n appForward_1.default.init([this.msgID]);\r\n });\r\n this.buttons.edit.addEventListener('click', () => {\r\n const message = appMessagesManager_1.default.getMessage(this.msgID);\r\n const chatInputC = appImManager.chatInputC;\r\n chatInputC.setTopInfo('Editing', message.message, message.message, message);\r\n chatInputC.replyToMsgID = 0;\r\n chatInputC.editMsgID = this.msgID;\r\n });\r\n this.buttons.pin.addEventListener('click', () => {\r\n mtprotoworker_1.default.invokeApi('messages.updatePinnedMessage', {\r\n flags: 0,\r\n peer: appPeersManager_1.default.getInputPeerByID(utils_1.$rootScope.selectedPeerID),\r\n id: this.msgID\r\n }).then(updates => {\r\n /////this.log('pinned updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n });\r\n }\r\n}\r\nclass AppImManager {\r\n constructor() {\r\n /* if(!lottieLoader.loaded) {\r\n lottieLoader.loadLottie();\r\n } */\r\n this.pageEl = document.getElementById('page-chats');\r\n this.btnMute = this.pageEl.querySelector('.chat-mute-button');\r\n this.btnMenuMute = this.pageEl.querySelector('.chat-more-button .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.bubbles = {};\r\n this.dateMessages = {};\r\n this.unreadOut = new Set();\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.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 = document.getElementById('topbar');\r\n this.chatInput = document.getElementById('chat-input');\r\n this.contextMenu = new ChatContextMenu(this.bubblesContainer);\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.unreadedObserver = null;\r\n this.unreaded = [];\r\n this.loadedTopTimes = 0;\r\n this.loadedBottomTimes = 0;\r\n this.messagesQueuePromise = null;\r\n this.messagesQueue = [];\r\n this.messagesQueueOnRender = null;\r\n this.firstUnreadBubble = null;\r\n this.stickyIntersector = null;\r\n this.cleanupID = 0;\r\n this.selectTab = misc_1.horizontalMenu(null, document.getElementById('main-columns'));\r\n this.closeBtn = this.topbar.querySelector('.sidebar-close-button');\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.selectTab(0);\r\n mtprotoworker_1.default.getUserID().then((id) => {\r\n this.myID = utils_1.$rootScope.myID = id;\r\n });\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 if (!this.scrolledAllDown) {\r\n this.setPeer(this.peerID, 0);\r\n }\r\n else {\r\n this.renderNewMessagesByIDs([details.messageID], true);\r\n }\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 utils_1.$rootScope.$on('dialog_flush', (e) => {\r\n let peerID = e.detail.peerID;\r\n if (this.peerID == peerID) {\r\n this.deleteMessagesByIDs(Object.keys(this.bubbles).map(m => +m));\r\n }\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 // set cached url to media\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n if (message.media) {\r\n if (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 else if (message.media.document) {\r\n let doc = appDocsManager_1.default.getDoc(tempID);\r\n if (doc && doc.type && doc.type != 'sticker') {\r\n let newDoc = message.media.document;\r\n newDoc.downloaded = doc.downloaded;\r\n newDoc.url = doc.url;\r\n }\r\n }\r\n }\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 new mids to album items for mediaViewer\r\n if (message.grouped_id) {\r\n let items = bubble.querySelectorAll('.album-item');\r\n let groupIDs = Object.keys(appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id]).map(i => +i).sort((a, b) => a - b);\r\n Array.from(items).forEach((item, idx) => {\r\n item.dataset.mid = '' + groupIDs[idx];\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 if (this.unreadOut.has(tempID)) {\r\n this.unreadOut.delete(tempID);\r\n this.unreadOut.add(mid);\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 message = appMessagesManager_1.default.getMessage(mid);\r\n let bubble = this.bubbles[mid];\r\n if (!bubble && message.grouped_id) {\r\n let a = this.getAlbumBubble(message.grouped_id);\r\n bubble = a.bubble;\r\n message = a.message;\r\n }\r\n if (!bubble)\r\n return;\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.topbar.classList.add('is-pinned-shown');\r\n this.pinnedMessageContent.innerHTML = message.rReply;\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.bubblesContainer.addEventListener('click', (e) => {\r\n var _a;\r\n let target = e.target;\r\n let bubble = null;\r\n try {\r\n bubble = utils_1.findUpClassName(target, 'bubble');\r\n }\r\n catch (err) { }\r\n if (!bubble)\r\n return;\r\n let contactDiv = utils_1.findUpClassName(target, 'contact');\r\n if (contactDiv) {\r\n this.setPeer(+contactDiv.dataset.peerID);\r\n return;\r\n }\r\n //this.log('chatInner click:', target);\r\n if (target.tagName == 'SPAN') {\r\n let video = target.parentElement.querySelector('video');\r\n if (video) {\r\n video.click(); // hot-fix for time and play button\r\n }\r\n return;\r\n }\r\n if ((target.tagName == 'IMG' && !target.classList.contains('emoji') && target.parentElement.tagName != \"AVATAR-ELEMENT\")\r\n || target.tagName == 'image'\r\n || target.classList.contains('album-item')\r\n || (target.tagName == 'VIDEO' && !bubble.classList.contains('round'))) {\r\n let messageID = +((_a = utils_1.findUpClassName(target, 'album-item')) === null || _a === void 0 ? void 0 : _a.dataset.mid) || +bubble.dataset.mid;\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 targets = [];\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((a, b) => a - b);\r\n ids.forEach(id => {\r\n let elements = this.bubbles[id].querySelectorAll('.album-item img, .album-item video, .preview img, .preview video, .bubble__media-container');\r\n Array.from(elements).forEach((element) => {\r\n let albumItem = utils_1.findUpClassName(element, 'album-item');\r\n targets.push({\r\n element,\r\n mid: +(albumItem === null || albumItem === void 0 ? void 0 : albumItem.dataset.mid) || id\r\n });\r\n });\r\n });\r\n let idx = targets.findIndex(t => t.mid == messageID);\r\n this.log('open mediaViewer single with ids:', ids, idx, targets);\r\n appMediaViewer_1.default.openMedia(message, targets[idx].element, true, this.scroll.parentElement, targets.slice(0, idx), targets.slice(idx + 1) /* , !message.grouped_id */);\r\n //appMediaViewer.openMedia(message, target as HTMLImageElement);\r\n }\r\n if (['IMG', 'DIV'].indexOf(target.tagName) === -1)\r\n target = utils_1.findUpTag(target, 'DIV');\r\n if (target.tagName == 'DIV' || target.tagName == \"AVATAR-ELEMENT\") {\r\n if (target.classList.contains('goto-original')) {\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);\r\n return;\r\n }\r\n else if (target.tagName == \"AVATAR-ELEMENT\" || 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 (target.tagName == 'IMG' && target.parentElement.tagName == \"AVATAR-ELEMENT\") {\r\n let peerID = +target.parentElement.dataset.peerID;\r\n if (!isNaN(peerID)) {\r\n this.setPeer(peerID);\r\n }\r\n }\r\n //console.log('chatInner click', e);\r\n });\r\n this.closeBtn.addEventListener('click', () => {\r\n this.setPeer(0);\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(this.peerID));\r\n this.btnMute.addEventListener('click', () => this.mutePeer(this.peerID));\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 == 'Escape') {\r\n if (appMediaViewer_1.default.wholeDiv.classList.contains('active')) {\r\n appMediaViewer_1.default.buttons.close.click();\r\n }\r\n else if (appForward_1.default.container.classList.contains('active')) {\r\n appForward_1.default.close();\r\n }\r\n else if (this.chatInputC.replyElements.container.classList.contains('active')) {\r\n this.chatInputC.replyElements.cancelBtn.click();\r\n }\r\n else if (this.peerID != 0) { // hide current dialog\r\n this.setPeer(0);\r\n }\r\n }\r\n else 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.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.attach();\r\n this.stickyIntersector = new stickyIntersector_1.default(this.scrollable.container, (stuck, target) => {\r\n for (let timestamp in this.dateMessages) {\r\n let dateMessage = this.dateMessages[timestamp];\r\n if (dateMessage.container == target) {\r\n dateMessage.div.classList.toggle('is-sticky', stuck);\r\n break;\r\n }\r\n }\r\n });\r\n this.unreadedObserver = new IntersectionObserver((entries) => {\r\n let readed = [];\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n let target = entry.target;\r\n let mid = +target.dataset.mid;\r\n readed.push(mid);\r\n this.unreadedObserver.unobserve(target);\r\n this.unreaded.findAndSplice(id => id == mid);\r\n }\r\n });\r\n if (readed.length) {\r\n let max = Math.max(...readed);\r\n let length = readed.length;\r\n for (let i = this.unreaded.length - 1; i >= 0; --i) {\r\n let mid = this.unreaded[i];\r\n if (mid < max) {\r\n length++;\r\n this.unreaded.splice(i, 1);\r\n }\r\n }\r\n this.log('will readHistory by ids:', max, length);\r\n /* if(this.peerID < 0) {\r\n max = appMessagesIDsManager.getMessageIDInfo(max)[0];\r\n } */\r\n //appMessagesManager.readMessages(readed);\r\n /* false && */ appMessagesManager_1.default.readHistory(this.peerID, max, length).catch((err) => {\r\n this.log.error('readHistory err:', err);\r\n appMessagesManager_1.default.readHistory(this.peerID, max, length);\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 getAlbumBubble(groupID) {\r\n let group = appMessagesManager_1.default.groupedMessagesStorage[groupID];\r\n for (let i in group) {\r\n let mid = +i;\r\n if (this.bubbles[mid])\r\n return {\r\n bubble: this.bubbles[mid],\r\n message: appMessagesManager_1.default.getMessage(mid)\r\n };\r\n }\r\n return null;\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 // warning, если иды только отрицательные то вниз не попадёт (хотя мб и так не попадёт)\r\n let history = Object.keys(this.bubbles).map(id => +id).filter(id => id > 0).sort((a, b) => a - b);\r\n if (!history.length)\r\n return;\r\n if (top && !this.scrolledAll) {\r\n this.log('Will load more (up) history by id:', history[0], 'maxID:', history[history.length - 1], history);\r\n /* if(history.length == 75) {\r\n this.log('load more', this.scrollable.scrollHeight, this.scrollable.scrollTop, this.scrollable);\r\n return;\r\n } */\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 scroll down after search\r\n if (!top && (!dialog || history.indexOf(dialog.top_message) === -1)) {\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 //if(this.scrollable.scrollLocked) return;\r\n this.onScrollRAF = window.requestAnimationFrame(() => {\r\n lottieLoader_1.default.checkAnimations(false, 'chat');\r\n if (this.isScrollingTimeout) {\r\n clearTimeout(this.isScrollingTimeout);\r\n }\r\n else if (!this.chatInner.classList.contains('is-scrolling')) {\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 - Math.round(this.scroll.scrollTop + this.scroll.offsetHeight) <= 1 /* <= 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_new_1.default(this.bubblesContainer, 'y', 'IM', this.chatInner, 300);\r\n this.scroll = this.scrollable.container;\r\n this.bubblesContainer.append(this.goDownBtn);\r\n this.scrollable.onScrolledTop = () => this.loadMoreHistory(true);\r\n this.scrollable.onScrolledBottom = () => this.loadMoreHistory(false);\r\n //this.scrollable.attachSentinels(undefined, 300);\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 appProfileManager_1.default.getChatFull(chat.id).then((chatInfo) => {\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 && chatInfo.participants.participants && chatInfo.participants.participants.length);\r\n if (participants_count) {\r\n let subtitle = utils_1.numberWithCommas(participants_count) + ' ' + (isChannel ? 'subscribers' : 'members');\r\n this.subtitleEl.innerText = appSidebarRight_1.default.profileElements.subtitle.innerText = subtitle;\r\n if (participants_count < 2)\r\n return;\r\n appChatsManager_1.default.getOnlines(chat.id).then(onlines => {\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 });\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 = appUsersManager_1.default.getUserStatusString(user.id);\r\n if (subtitle == 'online') {\r\n this.subtitleEl.classList.add('online');\r\n appSidebarRight_1.default.profileElements.subtitle.classList.add('online');\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 else {\r\n this.subtitleEl.innerText = 'bot';\r\n appSidebarRight_1.default.profileElements.subtitle.innerText = 'bot';\r\n }\r\n }\r\n cleanup(bubblesToo = false) {\r\n ////console.time('appImManager cleanup');\r\n this.scrolledAll = false;\r\n this.scrolledAllDown = false;\r\n this.bubbles = {};\r\n this.dateMessages = {};\r\n this.bubbleGroups.cleanup();\r\n this.unreadOut.clear();\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 if (bubblesToo) {\r\n this.scrollable.container.innerHTML = '';\r\n }\r\n this.peerChanged = false;\r\n this.firstUnreadBubble = null;\r\n this.attachedUnreadBubble = false;\r\n this.messagesQueue.length = 0;\r\n this.messagesQueuePromise = null;\r\n lottieLoader_1.default.checkAnimations(false, 'chat', true);\r\n this.getHistoryTopPromise = this.getHistoryBottomPromise = undefined;\r\n this.stickyIntersector.disconnect();\r\n this.unreadedObserver.disconnect();\r\n this.unreaded.length = 0;\r\n this.loadedTopTimes = this.loadedBottomTimes = 0;\r\n this.cleanupID++;\r\n ////console.timeEnd('appImManager cleanup');\r\n }\r\n setPeer(peerID, lastMsgID) {\r\n var _a;\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(true);\r\n this.peerID = utils_1.$rootScope.selectedPeerID = 0;\r\n utils_1.$rootScope.$broadcast('peer_changed', this.peerID);\r\n if (window.innerWidth <= 720) {\r\n this.selectTab(0);\r\n }\r\n return false;\r\n }\r\n const samePeer = this.peerID == peerID;\r\n if (this.setPeerPromise && samePeer)\r\n return this.setPeerPromise;\r\n const dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0] || null;\r\n const topMessage = lastMsgID <= 0 ? lastMsgID : (_a = dialog === null || dialog === void 0 ? void 0 : dialog.top_message) !== null && _a !== void 0 ? _a : 0;\r\n const isTarget = lastMsgID !== undefined;\r\n if (!isTarget && dialog) {\r\n if (dialog.unread_count && !samePeer) {\r\n lastMsgID = dialog.read_inbox_max_id;\r\n }\r\n else {\r\n lastMsgID = dialog.top_message;\r\n }\r\n }\r\n if (samePeer) {\r\n if (this.bubbles[lastMsgID]) {\r\n if (dialog && lastMsgID == topMessage) {\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 if (isTarget) {\r\n this.scrollable.scrollIntoView(this.bubbles[lastMsgID]);\r\n this.highlightBubble(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 // set new\r\n this.peerID = utils_1.$rootScope.selectedPeerID = peerID;\r\n this.log('setPeer peerID:', this.peerID, dialog, lastMsgID, topMessage);\r\n if (window.innerWidth <= 720) {\r\n this.selectTab(1);\r\n }\r\n const isJump = lastMsgID != topMessage;\r\n // add last message, bc in getHistory will load < max_id\r\n const additionMsgID = isJump ? 0 : topMessage;\r\n /* this.setPeerPromise = null;\r\n this.preloader.detach();\r\n return true; */\r\n //////appSidebarRight.toggleSidebar(true);\r\n const maxBubbleID = samePeer && Math.max(...Object.keys(this.bubbles).map(mid => +mid));\r\n const oldChatInner = this.chatInner;\r\n this.cleanup();\r\n this.chatInner = document.createElement('div');\r\n this.chatInner.id = 'bubbles-inner';\r\n this.scrollable.appendTo = this.chatInner;\r\n this.chatInner.className = oldChatInner.className;\r\n this.chatInner.classList.add('disable-hover', 'is-scrolling');\r\n this.lazyLoadQueue.lock();\r\n const { promise, cached } = this.getHistory(lastMsgID, true, isJump, additionMsgID);\r\n if (!samePeer) {\r\n appSidebarRight_1.default.setPeer(this.peerID);\r\n }\r\n else {\r\n this.peerChanged = true;\r\n }\r\n // clear \r\n if (!cached) {\r\n this.scrollable.container.innerHTML = '';\r\n //oldChatInner.remove();\r\n !samePeer && this.finishPeerChange();\r\n this.preloader.attach(this.bubblesContainer);\r\n }\r\n //console.timeEnd('appImManager setPeer pre promise');\r\n this.setPeerPromise = Promise.all([\r\n promise.then(() => {\r\n ////this.log('setPeer removing preloader');\r\n if (cached) {\r\n this.scrollable.container.innerHTML = '';\r\n //oldChatInner.remove();\r\n !samePeer && this.finishPeerChange();\r\n }\r\n else {\r\n this.preloader.detach();\r\n }\r\n this.scrollable.container.append(this.chatInner);\r\n //this.scrollable.attachSentinels();\r\n //this.scrollable.container.insertBefore(this.chatInner, this.scrollable.container.lastElementChild);\r\n this.lazyLoadQueue.unlock();\r\n if (dialog && lastMsgID && lastMsgID != topMessage && (this.bubbles[lastMsgID] || this.firstUnreadBubble)) {\r\n if (this.scrollable.scrollLocked) {\r\n clearTimeout(this.scrollable.scrollLocked);\r\n this.scrollable.scrollLocked = 0;\r\n }\r\n const fromUp = maxBubbleID > 0 && (maxBubbleID < lastMsgID || lastMsgID < 0);\r\n const forwardingUnread = dialog.read_inbox_max_id == lastMsgID;\r\n if (!fromUp && (samePeer || forwardingUnread)) {\r\n this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n }\r\n const bubble = forwardingUnread ? (this.firstUnreadBubble || this.bubbles[lastMsgID]) : this.bubbles[lastMsgID];\r\n this.scrollable.scrollIntoView(bubble, samePeer /* , fromUp */);\r\n if (!forwardingUnread) {\r\n this.highlightBubble(bubble);\r\n }\r\n }\r\n else {\r\n this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n }\r\n // warning\r\n if (!lastMsgID || this.bubbles[topMessage] || lastMsgID == topMessage) {\r\n this.scrolledAllDown = true;\r\n }\r\n this.log('scrolledAllDown:', this.scrolledAllDown);\r\n //if(!this.unreaded.length && dialog) { // lol\r\n if (this.scrolledAllDown && dialog) { // lol\r\n appMessagesManager_1.default.readHistory(peerID, dialog.top_message);\r\n }\r\n this.chatInner.classList.remove('disable-hover', 'is-scrolling'); // warning, performance!\r\n //console.timeEnd('appImManager setPeer');\r\n return true;\r\n }).catch(err => {\r\n this.log.error('getHistory promise error:', err);\r\n throw err;\r\n })\r\n ]).catch(err => {\r\n this.log.error('setPeer promises error:', err);\r\n this.preloader.detach();\r\n //oldChatInner.remove();\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 //if(this.messagesQueuePromise) {\r\n //appSidebarRight.setLoadMutex(this.setPeerPromise);\r\n //}\r\n appSidebarRight_1.default.setLoadMutex(this.setPeerPromise);\r\n appSidebarRight_1.default.loadSidebarMedia(true);\r\n return this.setPeerPromise;\r\n }\r\n finishPeerChange() {\r\n if (this.peerChanged)\r\n return;\r\n let peerID = this.peerID;\r\n this.peerChanged = true;\r\n this.avatarEl.setAttribute('peer', '' + this.peerID);\r\n const isChannel = appPeersManager_1.default.isChannel(peerID);\r\n const hasRights = isChannel && appChatsManager_1.default.hasRights(-peerID, 'send');\r\n this.chatInner.classList.toggle('has-rights', hasRights);\r\n this.chatInput.style.display = !isChannel || hasRights ? '' : 'none';\r\n this.topbar.classList.remove('is-pinned-shown');\r\n this.topbar.style.display = '';\r\n this.chatInner.classList.toggle('is-chat', appPeersManager_1.default.isAnyGroup(peerID) || peerID == this.myID);\r\n this.chatInner.classList.toggle('is-channel', isChannel);\r\n this.btnMute.style.display = appPeersManager_1.default.isBroadcast(peerID) ? '' : 'none';\r\n window.requestAnimationFrame(() => {\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_1.default.profileElements.name.innerHTML = title;\r\n this.goDownBtn.style.display = '';\r\n this.setPeerStatus(true);\r\n });\r\n appSidebarRight_1.default.fillProfileElements();\r\n utils_1.$rootScope.$broadcast('peer_changed', this.peerID);\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 for (let msgID of this.unreadOut) {\r\n if (msgID > 0 && msgID <= maxID) {\r\n let bubble = this.bubbles[msgID];\r\n if (bubble) {\r\n bubble.classList.remove('is-sent');\r\n bubble.classList.add('is-read');\r\n }\r\n this.unreadOut.delete(msgID);\r\n }\r\n }\r\n }\r\n deleteMessagesByIDs(msgIDs) {\r\n msgIDs.forEach(id => {\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 if (this.firstUnreadBubble == bubble) {\r\n this.firstUnreadBubble = null;\r\n }\r\n this.bubbleGroups.removeBubble(bubble, id);\r\n this.unreadedObserver.unobserve(bubble);\r\n //this.unreaded.findAndSplice(mid => mid == id);\r\n this.scrollable.removeElement(bubble);\r\n //bubble.remove();\r\n });\r\n lottieLoader_1.default.checkAnimations();\r\n this.deleteEmptyDateGroups();\r\n }\r\n renderNewMessagesByIDs(msgIDs, scrolledDown = this.scrolledDown) {\r\n if (!this.scrolledAllDown) { // seems search active or sliced\r\n this.log('seems search is active, skipping render:', msgIDs);\r\n return;\r\n }\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) this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n if (this.messagesQueuePromise && scrolledDown) {\r\n this.scrollable.scrollTo(this.scrollable.scrollHeight - 1, false, true);\r\n this.messagesQueuePromise.then(() => {\r\n this.log('messagesQueuePromise after:', this.chatInner.childElementCount, this.scrollable.scrollHeight);\r\n this.scrollable.scrollTo(this.scrollable.scrollHeight, true, true);\r\n setTimeout(() => {\r\n this.log('messagesQueuePromise afterafter:', this.chatInner.childElementCount, this.scrollable.scrollHeight);\r\n }, 10);\r\n });\r\n }\r\n }\r\n highlightBubble(element) {\r\n if (element.dataset.timeout) {\r\n clearTimeout(+element.dataset.timeout);\r\n element.classList.remove('is-selected');\r\n void element.offsetWidth; // reflow\r\n }\r\n element.classList.add('is-selected');\r\n element.dataset.timeout = '' + setTimeout(() => {\r\n element.classList.remove('is-selected');\r\n delete element.dataset.timeout;\r\n }, 2000);\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 = `<div class=\"bubble__container\"><div class=\"service-msg\">${str}</div></div>`;\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 //this.scrollable.prepareElement(div, false);\r\n if (reverse) {\r\n //let scrollTopPrevious = this.scrollable.scrollTop;\r\n this.scrollable.prepend(container, false);\r\n /* if(!scrollTopPrevious) {\r\n this.scrollable.scrollTop += container.scrollHeight;\r\n } */\r\n }\r\n else {\r\n this.scrollable.append(container, false);\r\n }\r\n this.stickyIntersector.observeStickyHeaderChanges(container);\r\n }\r\n return this.dateMessages[dateTimestamp];\r\n }\r\n renderMessagesQueue(message, bubble, reverse) {\r\n let promises = [];\r\n Array.from(bubble.querySelectorAll('img, video')).forEach(el => {\r\n if (el instanceof HTMLVideoElement) {\r\n let source = el.firstElementChild;\r\n if (!source || !source.src) {\r\n this.log.warn('no source', el, source, 'src', source.src);\r\n return;\r\n }\r\n else if (el.readyState >= 4)\r\n return;\r\n }\r\n else if (el.complete || !el.src)\r\n return;\r\n let src = el.src;\r\n let promise = new Promise((resolve, reject) => {\r\n let r;\r\n let onLoad = () => {\r\n clearTimeout(timeout);\r\n resolve();\r\n };\r\n if (el instanceof HTMLVideoElement) {\r\n el.addEventListener('loadeddata', onLoad);\r\n r = () => el.readyState >= 4;\r\n }\r\n else {\r\n el.addEventListener('load', onLoad);\r\n r = () => el.complete;\r\n }\r\n // for safari\r\n let c = () => r() ? onLoad() : window.requestAnimationFrame(c);\r\n window.requestAnimationFrame(c);\r\n let timeout = setTimeout(() => {\r\n console.log('did not called', el, el.parentElement, el.complete, src);\r\n reject();\r\n }, 1500);\r\n });\r\n promises.push(promise);\r\n });\r\n this.messagesQueue.push({ message, bubble, reverse, promises });\r\n if (!this.messagesQueuePromise) {\r\n this.messagesQueuePromise = new Promise((resolve, reject) => {\r\n setTimeout(() => {\r\n let chatInner = this.chatInner;\r\n let queue = this.messagesQueue.slice();\r\n this.messagesQueue.length = 0;\r\n let promises = queue.reduce((acc, { promises }) => acc.concat(promises), []);\r\n //console.log('promises to call', promises, queue);\r\n Promise.all(promises).then(() => {\r\n if (this.chatInner != chatInner) {\r\n this.log.warn('chatInner changed!', this.chatInner, chatInner);\r\n return reject('chatInner changed!');\r\n }\r\n if (this.messagesQueueOnRender) {\r\n this.messagesQueueOnRender();\r\n }\r\n queue.forEach(({ message, bubble, reverse }) => {\r\n let dateMessage = this.getDateContainerByMessage(message, reverse);\r\n if (reverse) {\r\n dateMessage.container.insertBefore(bubble, dateMessage.div.nextSibling);\r\n //this.scrollable.prepareElement(bubble, false);\r\n }\r\n else {\r\n dateMessage.container.append(bubble);\r\n //this.scrollable.prepareElement(bubble, true);\r\n }\r\n });\r\n resolve();\r\n this.messagesQueuePromise = null;\r\n }, reject);\r\n }, 0);\r\n });\r\n }\r\n }\r\n getMiddleware() {\r\n let cleanupID = this.cleanupID;\r\n return () => {\r\n return this.cleanupID == cleanupID;\r\n };\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 //return;\r\n if (message.deleted)\r\n return;\r\n else if (message.grouped_id) { // will render only last album's message\r\n let storage = appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id];\r\n let maxID = Math.max(...Object.keys(storage).map(i => +i));\r\n if (message.mid < maxID) {\r\n return;\r\n }\r\n }\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 if (bubble == this.firstUnreadBubble) {\r\n bubble.classList.add('is-first-unread');\r\n }\r\n //bubble.innerHTML = '';\r\n }\r\n bubble.dataset.mid = message.mid;\r\n if (message._ == 'messageService') {\r\n let action = message.action;\r\n let _ = action._;\r\n if (IGNOREACTIONS.indexOf(_) !== -1) {\r\n return bubble;\r\n }\r\n bubble.className = 'bubble service';\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 str = '';\r\n if (action.message) {\r\n str = richtextprocessor_1.RichTextProcessor.wrapRichText(action.message, { noLinebreaks: true });\r\n }\r\n else {\r\n if (_ == \"messageActionPhoneCall\") {\r\n _ += '.' + action.type;\r\n }\r\n // @ts-ignore\r\n let l = utils_1.langPack[_];\r\n if (!l) {\r\n l = '[' + _ + ']';\r\n }\r\n str = l[0].toUpperCase() == l[0] ? l : (name.innerText ? name.outerHTML + ' ' : '') + l;\r\n }\r\n bubbleContainer.innerHTML = `<div class=\"service-msg\">${str}</div>`;\r\n if (updatePosition) {\r\n this.renderMessagesQueue(message, bubble, reverse);\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) + ' <i class=\"tgico-channelviews\"></i> ' + time;\r\n }\r\n if (message.edit_date) {\r\n bubble.classList.add('is-edited');\r\n time = '<i class=\"edited\">edited</i> ' + 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 messageMessage, totalEntities;\r\n if (message.grouped_id) {\r\n let group = appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id];\r\n let foundMessages = 0;\r\n for (let i in group) {\r\n let m = group[i];\r\n if (m.message) {\r\n if (++foundMessages > 1)\r\n break;\r\n messageMessage = m.message;\r\n totalEntities = m.totalEntities;\r\n }\r\n }\r\n if (foundMessages > 1) {\r\n messageMessage = undefined;\r\n totalEntities = undefined;\r\n }\r\n }\r\n if (!messageMessage && !totalEntities) {\r\n messageMessage = message.message;\r\n totalEntities = message.totalEntities;\r\n }\r\n let richText = richtextprocessor_1.RichTextProcessor.wrapRichText(messageMessage, {\r\n entities: totalEntities\r\n });\r\n let messageMedia = message.media;\r\n if (totalEntities) {\r\n let emojiEntities = totalEntities.filter((e) => e._ == 'messageEntityEmoji');\r\n let strLength = messageMessage.length;\r\n let emojiStrLength = emojiEntities.reduce((acc, curr) => acc + curr.length, 0);\r\n if (emojiStrLength == strLength && emojiEntities.length <= 3) {\r\n let sticker = appStickersManager_1.default.getAnimatedEmojiSticker(messageMessage);\r\n if (emojiEntities.length == 1 && !messageMedia && sticker) {\r\n messageMedia = {\r\n _: 'messageMediaDocument',\r\n document: sticker\r\n };\r\n }\r\n else {\r\n let attachmentDiv = document.createElement('div');\r\n attachmentDiv.classList.add('attachment');\r\n attachmentDiv.innerHTML = richText;\r\n bubble.classList.add('emoji-' + emojiEntities.length + 'x');\r\n bubbleContainer.append(attachmentDiv);\r\n }\r\n bubble.classList.add('is-message-empty', 'emoji-big');\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 (message.reply_markup && message.reply_markup._ == 'replyInlineMarkup' && message.reply_markup.rows && message.reply_markup.rows.length) {\r\n let rows = message.reply_markup.rows;\r\n let containerDiv = document.createElement('div');\r\n containerDiv.classList.add('reply-markup');\r\n rows.forEach((row) => {\r\n let buttons = row.buttons;\r\n if (!buttons || !buttons.length)\r\n return;\r\n let rowDiv = document.createElement('div');\r\n rowDiv.classList.add('reply-markup-row');\r\n buttons.forEach((button) => {\r\n let text = richtextprocessor_1.RichTextProcessor.wrapRichText(button.text, { noLinks: true, noLinebreaks: true });\r\n let buttonEl;\r\n switch (button._) {\r\n case 'keyboardButtonUrl': {\r\n let from = appUsersManager_1.default.getUser(message.fromID);\r\n let unsafe = !(from && from.pFlags && from.pFlags.verified);\r\n let url = richtextprocessor_1.RichTextProcessor.wrapUrl(button.url, unsafe);\r\n buttonEl = document.createElement('a');\r\n buttonEl.href = url;\r\n buttonEl.rel = 'noopener noreferrer';\r\n buttonEl.target = '_blank';\r\n buttonEl.classList.add('is-link', 'tgico');\r\n break;\r\n }\r\n default: {\r\n buttonEl = document.createElement('button');\r\n break;\r\n }\r\n }\r\n buttonEl.classList.add('reply-markup-button', 'rp');\r\n buttonEl.innerHTML = text;\r\n misc_1.ripple(buttonEl);\r\n rowDiv.append(buttonEl);\r\n });\r\n containerDiv.append(rowDiv);\r\n });\r\n containerDiv.addEventListener('click', (e) => {\r\n let target = e.target;\r\n if (!target.classList.contains('reply-markup-button'))\r\n target = utils_1.findUpClassName(target, 'reply-markup-button');\r\n if (!target)\r\n return;\r\n let column = utils_1.whichChild(target);\r\n let row = rows[utils_1.whichChild(target.parentElement)];\r\n if (!row.buttons || !row.buttons[column]) {\r\n this.log.warn('no such button', row, column, message);\r\n return;\r\n }\r\n let button = row.buttons[column];\r\n AppInlineBotsManager_1.default.callbackButtonClick(message.mid, button);\r\n });\r\n let offset = rows.length * 45 + 'px';\r\n bubbleContainer.style.marginBottom = offset;\r\n containerDiv.style.bottom = '-' + offset;\r\n bubbleContainer.prepend(containerDiv);\r\n }\r\n if (our) {\r\n if (message.pFlags.unread || message.mid < 0)\r\n this.unreadOut.add(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.unreadedObserver.observe(bubble);\r\n if (!this.unreaded.indexOf(message.mid)) {\r\n this.unreaded.push(message.mid);\r\n }\r\n }\r\n }\r\n const isOut = our && (!message.fwd_from || this.peerID != this.myID);\r\n // media\r\n if (messageMedia /* && messageMedia._ == 'messageMediaPhoto' */) {\r\n let attachmentDiv = document.createElement('div');\r\n attachmentDiv.classList.add('attachment');\r\n if (!messageMessage) {\r\n bubble.classList.add('is-message-empty');\r\n }\r\n let processingWebPage = false;\r\n switch (messageMedia._) {\r\n case 'messageMediaPending': {\r\n let pending = messageMedia;\r\n let preloader = pending.preloader;\r\n switch (pending.type) {\r\n case 'album': {\r\n this.log('will wrap pending album');\r\n bubble.classList.add('hide-name', 'photo', 'is-album');\r\n wrappers_1.wrapAlbum({\r\n groupID: '' + message.id,\r\n attachmentDiv,\r\n uploading: true,\r\n isOut: true\r\n });\r\n break;\r\n }\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 bubble.classList.add('hide-name', 'photo');\r\n //}\r\n break;\r\n }\r\n case 'video': {\r\n //if(pending.size < 5e6) {\r\n let doc = appDocsManager_1.default.getDoc(message.id);\r\n this.log('will wrap pending video:', pending, message, doc);\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n boxWidth: 480,\r\n boxHeight: 480,\r\n withTail: doc.type != 'round',\r\n isOut: isOut,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: null\r\n });\r\n preloader.attach(attachmentDiv, false);\r\n bubble.classList.add('hide-name', 'video');\r\n //}\r\n break;\r\n }\r\n case 'audio':\r\n case 'voice':\r\n case 'document': {\r\n let doc = appDocsManager_1.default.getDoc(message.id);\r\n this.log('will wrap pending doc:', doc);\r\n let docDiv = wrappers_1.wrapDocument(doc, false, true);\r\n let icoDiv = docDiv.querySelector('.audio-download, .document-ico');\r\n preloader.attach(icoDiv, false);\r\n if (pending.type == 'voice') {\r\n bubble.classList.add('bubble-audio');\r\n }\r\n bubble.classList.remove('is-message-empty');\r\n messageDiv.classList.add((pending.type || 'document') + '-message');\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 = messageMedia.photo;\r\n ////////this.log('messageMediaPhoto', photo);\r\n bubble.classList.add('hide-name', 'photo');\r\n if (message.grouped_id) {\r\n bubble.classList.add('is-album');\r\n wrappers_1.wrapAlbum({\r\n groupID: message.grouped_id,\r\n attachmentDiv,\r\n middleware: this.getMiddleware(),\r\n isOut: our,\r\n lazyLoadQueue: this.lazyLoadQueue\r\n });\r\n }\r\n else {\r\n wrappers_1.wrapPhoto(photo.id, message, attachmentDiv, undefined, undefined, true, isOut, this.lazyLoadQueue, this.getMiddleware());\r\n }\r\n break;\r\n }\r\n case 'messageMediaWebPage': {\r\n processingWebPage = true;\r\n let webpage = messageMedia.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 previewResizer, preview;\r\n if (webpage.photo || webpage.document) {\r\n previewResizer = document.createElement('div');\r\n previewResizer.classList.add('preview-resizer');\r\n preview = document.createElement('div');\r\n preview.classList.add('preview');\r\n previewResizer.append(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 boxWidth: 480,\r\n boxHeight: 400,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: this.getMiddleware(),\r\n isOut\r\n });\r\n //}\r\n }\r\n else {\r\n doc = null;\r\n }\r\n }\r\n if (previewResizer) {\r\n quote.append(previewResizer);\r\n }\r\n let quoteTextDiv = document.createElement('div');\r\n quoteTextDiv.classList.add('quote-text');\r\n if (webpage.site_name) {\r\n let nameEl = document.createElement('a');\r\n nameEl.classList.add('name');\r\n nameEl.setAttribute('target', '_blank');\r\n nameEl.href = webpage.url || '#';\r\n nameEl.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(webpage.site_name);\r\n quoteTextDiv.append(nameEl);\r\n }\r\n if (webpage.title) {\r\n let titleDiv = document.createElement('div');\r\n titleDiv.classList.add('title');\r\n titleDiv.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.title);\r\n quoteTextDiv.append(titleDiv);\r\n }\r\n if (webpage.description) {\r\n let textDiv = document.createElement('div');\r\n textDiv.classList.add('text');\r\n textDiv.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.description);\r\n quoteTextDiv.append(textDiv);\r\n }\r\n quote.append(quoteTextDiv);\r\n if (webpage.photo && !doc) {\r\n bubble.classList.add('photo');\r\n const size = webpage.photo.sizes[webpage.photo.sizes.length - 1];\r\n if (size.w == size.h && quoteTextDiv.childElementCount) {\r\n bubble.classList.add('is-square-photo');\r\n }\r\n else if (size.h > size.w) {\r\n bubble.classList.add('is-vertical-photo');\r\n }\r\n wrappers_1.wrapPhoto(webpage.photo.id, message, preview, 480, 400, false, null, this.lazyLoadQueue, this.getMiddleware());\r\n }\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 = messageMedia.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 let size = bubble.classList.contains('emoji-big') ? 140 : 200;\r\n appPhotosManager_1.default.setAttachmentSize(doc, attachmentDiv, size, size, 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({\r\n doc,\r\n div: attachmentDiv,\r\n middleware: this.getMiddleware(),\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n group: 'chat',\r\n play: !!message.pending || !multipleRender,\r\n emoji: bubble.classList.contains('emoji-big') ? messageMessage : undefined\r\n });\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 if (message.grouped_id) {\r\n bubble.classList.add('is-album');\r\n wrappers_1.wrapAlbum({\r\n groupID: message.grouped_id,\r\n attachmentDiv,\r\n middleware: this.getMiddleware(),\r\n isOut: our,\r\n lazyLoadQueue: this.lazyLoadQueue\r\n });\r\n }\r\n else {\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n boxWidth: 480,\r\n boxHeight: 480,\r\n withTail: doc.type != 'round',\r\n isOut: isOut,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: this.getMiddleware()\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 messageDiv.classList.add((doc.type || 'document') + '-message');\r\n processingWebPage = true;\r\n break;\r\n }\r\n break;\r\n }\r\n case 'messageMediaContact': {\r\n //this.log('wrapping contact', message);\r\n let contactDiv = document.createElement('div');\r\n contactDiv.classList.add('contact');\r\n contactDiv.dataset.peerID = '' + messageMedia.user_id;\r\n messageDiv.classList.add('contact-message');\r\n processingWebPage = true;\r\n let texts = [];\r\n if (message.media.first_name)\r\n texts.push(richtextprocessor_1.RichTextProcessor.wrapEmojiText(message.media.first_name));\r\n if (message.media.last_name)\r\n texts.push(richtextprocessor_1.RichTextProcessor.wrapEmojiText(message.media.last_name));\r\n contactDiv.innerHTML = `\r\n <div class=\"contact-details\">\r\n <div class=\"contact-name\">${texts.join(' ')}</div>\r\n <div class=\"contact-number\">${message.media.phone_number ? '+' + misc_1.formatPhoneNumber(message.media.phone_number).formatted : 'Unknown phone number'}</div>\r\n </div>`;\r\n let avatarElem = new avatar_1.default();\r\n avatarElem.setAttribute('peer', '' + message.media.user_id);\r\n avatarElem.classList.add('contact-avatar');\r\n contactDiv.prepend(avatarElem);\r\n bubble.classList.remove('is-message-empty');\r\n messageDiv.append(contactDiv);\r\n break;\r\n }\r\n case 'messageMediaPoll': {\r\n bubble.classList.remove('is-message-empty');\r\n let pollElement = wrappers_1.wrapPoll(message.media.poll.id, message.mid);\r\n messageDiv.prepend(pollElement);\r\n break;\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 = richtextprocessor_1.RichTextProcessor.wrapEmojiText(message.fwd_from.from_name);\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 if (this.peerID != this.myID) {\r\n bubble.classList.add('forwarded');\r\n }\r\n if (message.savedFrom) {\r\n let goto = document.createElement('div');\r\n goto.classList.add('goto-original', 'tgico-next');\r\n /* fwd.innerHTML = `\r\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 24 24\">\r\n <defs>\r\n <path d=\"M13.55 3.24L13.64 3.25L13.73 3.27L13.81 3.29L13.9 3.32L13.98 3.35L14.06 3.39L14.14 3.43L14.22 3.48L14.29 3.53L14.36 3.59L14.43 3.64L22.23 10.85L22.36 10.99L22.48 11.15L22.57 11.31L22.64 11.48L22.69 11.66L22.72 11.85L22.73 12.04L22.71 12.22L22.67 12.41L22.61 12.59L22.53 12.76L22.42 12.93L22.29 13.09L22.23 13.15L14.43 20.36L14.28 20.48L14.12 20.58L13.95 20.66L13.77 20.72L13.58 20.76L13.4 20.77L13.22 20.76L13.03 20.73L12.85 20.68L12.68 20.61L12.52 20.52L12.36 20.4L12.22 20.27L12.16 20.2L12.1 20.13L12.05 20.05L12.01 19.98L11.96 19.9L11.93 19.82L11.89 19.73L11.87 19.65L11.84 19.56L11.83 19.47L11.81 19.39L11.81 19.3L11.8 19.2L11.8 16.42L11 16.49L10.23 16.58L9.51 16.71L8.82 16.88L8.18 17.09L7.57 17.33L7.01 17.6L6.48 17.91L5.99 18.26L5.55 18.64L5.14 19.05L4.77 19.51L4.43 19.99L4.29 20.23L4.21 20.35L4.11 20.47L4 20.57L3.88 20.65L3.75 20.72L3.62 20.78L3.48 20.82L3.33 20.84L3.19 20.84L3.04 20.83L2.9 20.79L2.75 20.74L2.62 20.68L2.53 20.62L2.45 20.56L2.38 20.5L2.31 20.43L2.25 20.36L2.2 20.28L2.15 20.19L2.11 20.11L2.07 20.02L2.04 19.92L2.02 19.83L2.01 19.73L2 19.63L2.04 17.99L2.19 16.46L2.46 15.05L2.85 13.75L3.35 12.58L3.97 11.53L4.7 10.6L5.55 9.8L6.51 9.12L7.59 8.56L8.77 8.13L10.07 7.83L11.48 7.65L11.8 7.63L11.8 4.8L11.91 4.56L12.02 4.35L12.14 4.16L12.25 3.98L12.37 3.82L12.48 3.68L12.61 3.56L12.73 3.46L12.85 3.38L12.98 3.31L13.11 3.27L13.24 3.24L13.37 3.23L13.46 3.23L13.55 3.24Z\" id=\"b13RmHDQtl\"></path>\r\n </defs>\r\n <use xlink:href=\"#b13RmHDQtl\" opacity=\"1\" fill=\"#fff\" fill-opacity=\"1\"></use>\r\n </svg>`; */\r\n bubbleContainer.append(goto);\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.dataset.peerID = message.fwdFromID;\r\n if (this.peerID == this.myID) {\r\n nameDiv.style.color = appPeersManager_1.default.getPeerColorByID(message.fwdFromID, false);\r\n nameDiv.innerHTML = title;\r\n }\r\n else {\r\n nameDiv.innerHTML = 'Forwarded from ' + title;\r\n }\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));\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 || (this.peerID == this.myID && !message.reply_to_mid)) {\r\n let avatarElem = new avatar_1.default();\r\n avatarElem.classList.add('user-avatar');\r\n if (!message.fromID && message.fwd_from && message.fwd_from.from_name) {\r\n avatarElem.setAttribute('peer-title', message.fwd_from.from_name);\r\n }\r\n avatarElem.setAttribute('peer', '' + ((message.fwd_from && this.peerID == this.myID ? message.fwdFromID : message.fromID) || 0));\r\n this.log('exec loadDialogPhoto', message);\r\n bubbleContainer.append(avatarElem);\r\n }\r\n }\r\n else {\r\n bubble.classList.add('hide-name');\r\n }\r\n bubble.classList.add(isOut ? 'is-out' : 'is-in');\r\n if (updatePosition) {\r\n this.bubbleGroups.addBubble(bubble, message, reverse);\r\n this.renderMessagesQueue(message, bubble, reverse);\r\n }\r\n else {\r\n this.bubbleGroups.updateGroupByMessageID(message.mid);\r\n }\r\n return bubble;\r\n }\r\n performHistoryResult(history, reverse, isBackLimit, additionMsgID) {\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 /* if(testScroll && additionMsgID) {\r\n for(let i = 0; i < 3; ++i) {\r\n let _history = history.slice();\r\n setTimeout(() => {\r\n this.performHistoryResult(_history, reverse, isBackLimit, 0, resetPromises);\r\n }, 0);\r\n }\r\n } */\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\r\n if (dialog && dialog.top_message) {\r\n for (let mid of history) {\r\n if (mid == dialog.top_message) {\r\n this.scrolledAllDown = true;\r\n break;\r\n }\r\n }\r\n }\r\n console.time('appImManager render history');\r\n return new Promise((resolve, reject) => {\r\n let method = (reverse ? history.shift : history.pop).bind(history);\r\n let realLength = this.scrollable.length;\r\n let previousScrollHeightMinusTop;\r\n if (realLength > 0 && reverse) { // for safari need set when scrolling bottom too\r\n this.messagesQueueOnRender = () => {\r\n let scrollTop = this.scrollable.scrollTop;\r\n previousScrollHeightMinusTop = this.scrollable.scrollHeight - scrollTop;\r\n /* if(reverse) {\r\n previousScrollHeightMinusTop = this.scrollable.scrollHeight - scrollTop;\r\n } else {\r\n previousScrollHeightMinusTop = scrollTop;\r\n } */\r\n this.log('performHistoryResult: messagesQueueOnRender, scrollTop:', scrollTop, previousScrollHeightMinusTop);\r\n this.messagesQueueOnRender = undefined;\r\n };\r\n }\r\n while (history.length) {\r\n let message = appMessagesManager_1.default.getMessage(method());\r\n this.renderMessage(message, reverse, true);\r\n }\r\n (this.messagesQueuePromise || Promise.resolve()).then(() => {\r\n if (previousScrollHeightMinusTop !== undefined) {\r\n const newScrollTop = reverse ? this.scrollable.scrollHeight - previousScrollHeightMinusTop : previousScrollHeightMinusTop;\r\n this.log('performHistoryResult: will set scrollTop', this.scrollable.scrollHeight, newScrollTop, this.scrollable.container.clientHeight);\r\n this.scrollable.scrollTop = newScrollTop;\r\n }\r\n resolve(true);\r\n }, reject);\r\n }).then(() => {\r\n console.timeEnd('appImManager render history');\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 pageCount = appPhotosManager_1.default.windowH / 38 /* * 1.25 */ | 0;\r\n //let loadCount = Object.keys(this.bubbles).length > 0 ? 50 : pageCount;\r\n let realLoadCount = Object.keys(this.bubbles).length > 0 ? Math.max(40, pageCount) : pageCount; //let realLoadCount = 50;\r\n let loadCount = realLoadCount;\r\n if (testScroll) {\r\n //loadCount = 1;\r\n if (Object.keys(this.bubbles).length > 0)\r\n return { cached: false, promise: 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 if (!reverse) { // if not jump\r\n loadCount = 0;\r\n maxID += 1;\r\n }\r\n }\r\n let result = appMessagesManager_1.default.getHistory(this.peerID, maxID, loadCount, backLimit);\r\n let promise, cached;\r\n if (result instanceof Promise) {\r\n cached = false;\r\n promise = result.then((result) => {\r\n this.log('getHistory not cached result by maxID:', maxID, reverse, isBackLimit, result, peerID);\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);\r\n }, (err) => {\r\n this.log.error('getHistory error:', err);\r\n (reverse ? this.getHistoryTopPromise = undefined : this.getHistoryBottomPromise = undefined);\r\n return false;\r\n });\r\n }\r\n else {\r\n cached = true;\r\n this.log('getHistory cached result by maxID:', maxID, reverse, isBackLimit, result, peerID);\r\n promise = this.performHistoryResult(result.history || [], reverse, isBackLimit, additionMsgID);\r\n //return (reverse ? this.getHistoryTopPromise = promise : this.getHistoryBottomPromise = promise);\r\n //return this.performHistoryResult(result.history || [], reverse, isBackLimit, additionMsgID, true);\r\n }\r\n (reverse ? this.getHistoryTopPromise = promise : this.getHistoryBottomPromise = promise);\r\n /* false && */ promise.then(() => {\r\n if (reverse) {\r\n this.loadedTopTimes++;\r\n this.loadedBottomTimes = Math.max(0, --this.loadedBottomTimes);\r\n }\r\n else {\r\n this.loadedBottomTimes++;\r\n this.loadedTopTimes = Math.max(0, --this.loadedTopTimes);\r\n }\r\n let ids;\r\n if ((reverse && this.loadedTopTimes > 2) || (!reverse && this.loadedBottomTimes > 2)) {\r\n ids = Object.keys(this.bubbles).map(i => +i).sort((a, b) => a - b);\r\n }\r\n //let removeCount = loadCount / 2;\r\n let safeCount = realLoadCount * 2; // cause i've been runningrunningrunning all day\r\n this.log('getHistory: slice loadedTimes:', reverse, pageCount, this.loadedTopTimes, this.loadedBottomTimes, ids && ids.length, safeCount);\r\n if (ids && ids.length > safeCount) {\r\n if (reverse) {\r\n //ids = ids.slice(-removeCount);\r\n //ids = ids.slice(removeCount * 2);\r\n ids = ids.slice(safeCount);\r\n this.scrolledAllDown = false;\r\n }\r\n else {\r\n //ids = ids.slice(0, removeCount);\r\n //ids = ids.slice(0, ids.length - (removeCount * 2));\r\n ids = ids.slice(0, ids.length - safeCount);\r\n this.scrolledAll = false;\r\n this.log('getHistory: slice bottom: to:', ids.length, loadCount);\r\n }\r\n this.log('getHistory: will slice ids:', ids, reverse);\r\n this.deleteMessagesByIDs(ids);\r\n }\r\n (reverse ? this.getHistoryTopPromise = undefined : this.getHistoryBottomPromise = undefined);\r\n this.setUnreadDelimiter(); // не нашёл места лучше\r\n });\r\n return { cached, promise };\r\n }\r\n setUnreadDelimiter() {\r\n if (this.attachedUnreadBubble) {\r\n return;\r\n }\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\r\n if (!(dialog === null || dialog === void 0 ? void 0 : dialog.unread_count))\r\n return;\r\n let maxID = dialog.read_inbox_max_id;\r\n maxID = Object.keys(this.bubbles).filter(mid => !this.bubbles[mid].classList.contains('is-out')).map(i => +i).sort((a, b) => a - b).find(i => i > maxID);\r\n if (maxID && this.bubbles[maxID]) {\r\n let bubble = this.bubbles[maxID];\r\n if (this.firstUnreadBubble && this.firstUnreadBubble != bubble) {\r\n this.firstUnreadBubble.classList.remove('is-first-unread');\r\n this.firstUnreadBubble = null;\r\n }\r\n if (maxID != dialog.top_message) {\r\n bubble.classList.add('is-first-unread');\r\n }\r\n this.firstUnreadBubble = bubble;\r\n this.attachedUnreadBubble = true;\r\n }\r\n }\r\n deleteEmptyDateGroups() {\r\n for (let i in this.dateMessages) {\r\n let dateMessage = this.dateMessages[i];\r\n if (dateMessage.container.childElementCount == 2) { // only date div + sentinel div\r\n dateMessage.container.remove();\r\n this.stickyIntersector.unobserve(dateMessage.container, dateMessage.div);\r\n delete this.dateMessages[i];\r\n }\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 if (appPeersManager_1.default.isBroadcast(this.peerID)) { // not human\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 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 rp && this.btnMenuMute.appendChild(rp);\r\n }\r\n mutePeer(peerID) {\r\n let inputPeer = appPeersManager_1.default.getInputPeerByID(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 let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n let muted = true;\r\n if (dialog && dialog.notify_settings) {\r\n muted = dialog.notify_settings.mute_until > (Date.now() / 1000 | 0);\r\n }\r\n if (!muted) {\r\n settings.flags |= 1 << 2;\r\n settings.mute_until = 2147483647;\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(bool => {\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 }\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\nwindow.appImManager = appImManager;\r\nexports.default = appImManager;\r\n"
},
{
"id": 16,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"name": "./src/lib/appManagers/appProfileManager.ts",
"index": 33,
"index2": 32,
"size": 24638,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "./appProfileManager",
"loc": "21:44-74"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appProfileManager",
"loc": "13:44-74"
},
{
"moduleId": 29,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\avatar.ts",
"module": "./src/components/avatar.ts",
"moduleName": "./src/components/avatar.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appProfileManager",
"loc": "6:44-91"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appProfileManager",
"loc": "42:44-74"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appProfileManager",
"loc": "15:44-86"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appProfileManager",
"loc": "41:44-74"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appProfileManager",
"loc": "12:44-91"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppProfileManager = void 0;\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\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\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 let fullChat = this.chatsFull[chatID];\r\n let chat = appChatsManager_1.default.getChat(chatID);\r\n if (!chat.photo || !fullChat) {\r\n return;\r\n }\r\n let 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 let smallUserpic = chat.photo.photo_small;\r\n let 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 let botID = botInfo && botInfo.user_id;\r\n if (!botID) {\r\n return false;\r\n }\r\n let 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: 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 let 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: 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 let promiseKey = [id, filter._, offset, limit].join('_');\r\n let promiseData = this.chatParticipantsPromises[promiseKey];\r\n if (filter._ == 'channelParticipantsRecent') {\r\n let 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 let fetchParticipants = (cachedParticipants) => {\r\n let hash = 0;\r\n if (cachedParticipants) {\r\n let userIDs = [];\r\n cachedParticipants.forEach((participant) => {\r\n userIDs.push(participant.user_id);\r\n });\r\n userIDs.sort((a, b) => a - b);\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 let maybeAddSelf = (participants) => {\r\n let chat = appChatsManager_1.default.getChat(id);\r\n let 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 let myID = appUsersManager_1.default.getSelf().id;\r\n let myIndex = participants.findIndex(p => p.user_id == myID);\r\n let myParticipant;\r\n if (myIndex !== -1) {\r\n myParticipant = participants[myIndex];\r\n participants.splice(myIndex, 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 let timeNow = utils_1.tsNow();\r\n if (promiseData !== undefined) {\r\n let 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 let 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 let 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 let 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 let 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 let 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 updateProfile(first_name, last_name, about) {\r\n /* let flags = 0;\r\n if(first_name) flags |= 1;\r\n if(last_name) flags |= 2;\r\n if(about) flags |= 4; */\r\n let flags = (1 << 0) | (1 << 1) | (1 << 2);\r\n return mtprotoworker_1.default.invokeApi('account.updateProfile', {\r\n flags,\r\n first_name,\r\n last_name,\r\n about\r\n }).then(user => {\r\n appUsersManager_1.default.saveApiUser(user);\r\n });\r\n }\r\n uploadProfilePhoto(inputFile) {\r\n return mtprotoworker_1.default.invokeApi('photos.uploadProfilePhoto', {\r\n file: inputFile\r\n }).then((updateResult) => {\r\n appUsersManager_1.default.saveApiUsers(updateResult.users);\r\n mtprotoworker_1.default.getUserID().then((id) => {\r\n appPhotosManager_1.default.savePhoto(updateResult.photo, {\r\n user_id: id\r\n });\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateUserPhoto',\r\n user_id: id,\r\n date: utils_1.tsNow(true),\r\n photo: appUsersManager_1.default.getUser(id).photo,\r\n previous: true\r\n }\r\n });\r\n });\r\n });\r\n }\r\n updateUsername(username) {\r\n return mtprotoworker_1.default.invokeApi('account.updateUsername', {\r\n username: username\r\n }).then((user) => {\r\n appUsersManager_1.default.saveApiUser(user);\r\n });\r\n }\r\n removeFromAvatarsCache(peerID) {\r\n if (this.savedAvatarURLs[peerID]) {\r\n delete this.savedAvatarURLs[peerID];\r\n }\r\n }\r\n // peerID == peerID || title\r\n putPhoto(div, peerID, isDialog = false, title = '') {\r\n var _a;\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) {\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 > 0) {\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 abbr;\r\n if (!title) {\r\n abbr = (_a = appPeersManager_1.default.getPeer(peerID).initials) !== null && _a !== void 0 ? _a : '';\r\n }\r\n else {\r\n const name = searchIndexManager_1.default.cleanSearchText(title, false);\r\n const nameWords = name.split(' ');\r\n const firstWord = nameWords.shift();\r\n const lastWord = nameWords.pop();\r\n abbr = firstWord.charAt(0) + (lastWord ? lastWord.charAt(0) : '');\r\n }\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 //console.warn('will invoke downloadSmallFile:', 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 let cached = yield misc_1.renderImageFromUrl(img, this.savedAvatarURLs[peerID]);\r\n if (cached) {\r\n div.innerHTML = '';\r\n div.append(img);\r\n }\r\n else {\r\n img.classList.add('fade-in');\r\n img.addEventListener('load', () => {\r\n div.innerHTML = '';\r\n div.append(img);\r\n });\r\n }\r\n return true;\r\n });\r\n }\r\n}\r\nexports.AppProfileManager = AppProfileManager;\r\nexports.default = new AppProfileManager();\r\n"
},
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\config.ts",
"name": "./src/lib/config.ts",
"index": 12,
"index2": 9,
"size": 98954,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\misc.ts",
"module": "./src/components/misc.ts",
"moduleName": "./src/components/misc.ts",
"type": "cjs require",
"userRequest": "../lib/config",
"loc": "17:33-57"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\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": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\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": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./config",
"loc": "125:58-64"
},
{
"moduleId": 27,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\searchIndexManager.ts",
"module": "./src/lib/searchIndexManager.ts",
"moduleName": "./src/lib/searchIndexManager.ts",
"type": "cjs require",
"userRequest": "./config",
"loc": "6:33-52"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/config",
"loc": "9:33-57"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/config",
"loc": "30:33-57"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 <igor.beatle@gmail.com>\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\nconst Emoji = { \"#\": 6365, \"*\": 6366, \"0\": 6367, \"1\": 6368, \"2\": 6369, \"3\": 6370, \"4\": 6371, \"5\": 6372, \"6\": 6373, \"7\": 6374, \"8\": 6375, \"9\": 6376, \"©\": 6362, \"®\": 6363, \"🀄\": 573, \"🃏\": 572, \"🅰\": 6383, \"🅱\": 6385, \"🅾\": 6394, \"🅿\": 6396, \"🆎\": 6384, \"🆑\": 6386, \"🆒\": 6387, \"🆓\": 6388, \"🆔\": 6390, \"🆕\": 6392, \"🆖\": 6393, \"🆗\": 6395, \"🆘\": 6397, \"🆙\": 6398, \"🆚\": 6399, \"🇦🇨\": 78, \"🇦🇩\": 79, \"🇦🇪\": 710, \"🇦🇫\": 711, \"🇦🇬\": 712, \"🇦🇮\": 713, \"🇦🇱\": 714, \"🇦🇲\": 715, \"🇦🇴\": 716, \"🇦🇶\": 717, \"🇦🇷\": 718, \"🇦🇸\": 719, \"🇦🇹\": 720, \"🇦🇺\": 721, \"🇦🇼\": 722, \"🇦🇽\": 723, \"🇦🇿\": 724, \"🇧🇦\": 725, \"🇧🇧\": 726, \"🇧🇩\": 727, \"🇧🇪\": 728, \"🇧🇫\": 729, \"🇧🇬\": 730, \"🇧🇭\": 731, \"🇧🇮\": 732, \"🇧🇯\": 733, \"🇧🇱\": 734, \"🇧🇲\": 735, \"🇧🇳\": 736, \"🇧🇴\": 737, \"🇧🇶\": 738, \"🇧🇷\": 739, \"🇧🇸\": 740, \"🇧🇹\": 741, \"🇧🇻\": 742, \"🇧🇼\": 743, \"🇧🇾\": 744, \"🇧🇿\": 745, \"🇨🇦\": 746, \"🇨🇨\": 747, \"🇨🇩\": 748, \"🇨🇫\": 749, \"🇨🇬\": 750, \"🇨🇭\": 751, \"🇨🇮\": 752, \"🇨🇰\": 753, \"🇨🇱\": 754, \"🇨🇲\": 755, \"🇨🇳\": 756, \"🇨🇴\": 757, \"🇨🇵\": 758, \"🇨🇷\": 759, \"🇨🇺\": 760, \"🇨🇻\": 761, \"🇨🇼\": 762, \"🇨🇽\": 763, \"🇨🇾\": 764, \"🇨🇿\": 765, \"🇩🇪\": 766, \"🇩🇬\": 767, \"🇩🇯\": 768, \"🇩🇰\": 769, \"🇩🇲\": 770, \"🇩🇴\": 771, \"🇩🇿\": 772, \"🇪🇦\": 773, \"🇪🇨\": 774, \"🇪🇪\": 775, \"🇪🇬\": 776, \"🇪🇭\": 777, \"🇪🇷\": 778, \"🇪🇸\": 779, \"🇪🇹\": 780, \"🇪🇺\": 781, \"🇫🇮\": 782, \"🇫🇯\": 783, \"🇫🇰\": 784, \"🇫🇲\": 785, \"🇫🇴\": 786, \"🇫🇷\": 787, \"🇬🇦\": 788, \"🇬🇧\": 789, \"🇬🇩\": 790, \"🇬🇪\": 791, \"🇬🇫\": 792, \"🇬🇬\": 793, \"🇬🇭\": 794, \"🇬🇮\": 795, \"🇬🇱\": 796, \"🇬🇲\": 797, \"🇬🇳\": 798, \"🇬🇵\": 799, \"🇬🇶\": 7100, \"🇬🇷\": 7101, \"🇬🇸\": 7102, \"🇬🇹\": 7103, \"🇬🇺\": 7104, \"🇬🇼\": 7105, \"🇬🇾\": 7106, \"🇭🇰\": 7107, \"🇭🇲\": 7108, \"🇭🇳\": 7109, \"🇭🇷\": 7110, \"🇭🇹\": 7111, \"🇭🇺\": 7112, \"🇮🇨\": 7113, \"🇮🇩\": 7114, \"🇮🇪\": 7115, \"🇮🇱\": 7116, \"🇮🇲\": 7117, \"🇮🇳\": 7118, \"🇮🇴\": 7119, \"🇮🇶\": 7120, \"🇮🇷\": 7121, \"🇮🇸\": 7122, \"🇮🇹\": 7123, \"🇯🇪\": 7124, \"🇯🇲\": 7125, \"🇯🇴\": 7126, \"🇯🇵\": 7127, \"🇰🇪\": 7128, \"🇰🇬\": 7129, \"🇰🇭\": 7130, \"🇰🇮\": 7131, \"🇰🇲\": 7132, \"🇰🇳\": 7133, \"🇰🇵\": 7134, \"🇰🇷\": 7135, \"🇰🇼\": 7136, \"🇰🇾\": 7137, \"🇰🇿\": 7138, \"🇱🇦\": 7139, \"🇱🇧\": 7140, \"🇱🇨\": 7141, \"🇱🇮\": 7142, \"🇱🇰\": 7143, \"🇱🇷\": 7144, \"🇱🇸\": 7145, \"🇱🇹\": 7146, \"🇱🇺\": 7147, \"🇱🇻\": 7148, \"🇱🇾\": 7149, \"🇲🇦\": 7150, \"🇲🇨\": 7151, \"🇲🇩\": 7152, \"🇲🇪\": 7153, \"🇲🇫\": 7154, \"🇲🇬\": 7155, \"🇲🇭\": 7156, \"🇲🇰\": 7157, \"🇲🇱\": 7158, \"🇲🇲\": 7159, \"🇲🇳\": 7160, \"🇲🇴\": 7161, \"🇲🇵\": 7162, \"🇲🇶\": 7163, \"🇲🇷\": 7164, \"🇲🇸\": 7165, \"🇲🇹\": 7166, \"🇲🇺\": 7167, \"🇲🇻\": 7168, \"🇲🇼\": 7169, \"🇲🇽\": 7170, \"🇲🇾\": 7171, \"🇲🇿\": 7172, \"🇳🇦\": 7173, \"🇳🇨\": 7174, \"🇳🇪\": 7175, \"🇳🇫\": 7176, \"🇳🇬\": 7177, \"🇳🇮\": 7178, \"🇳🇱\": 7179, \"🇳🇴\": 7180, \"🇳🇵\": 7181, \"🇳🇷\": 7182, \"🇳🇺\": 7183, \"🇳🇿\": 7184, \"🇴🇲\": 7185, \"🇵🇦\": 7186, \"🇵🇪\": 7187, \"🇵🇫\": 7188, \"🇵🇬\": 7189, \"🇵🇭\": 7190, \"🇵🇰\": 7191, \"🇵🇱\": 7192, \"🇵🇲\": 7193, \"🇵🇳\": 7194, \"🇵🇷\": 7195, \"🇵🇸\": 7196, \"🇵🇹\": 7197, \"🇵🇼\": 7198, \"🇵🇾\": 7199, \"🇶🇦\": 7200, \"🇷🇪\": 7201, \"🇷🇴\": 7202, \"🇷🇸\": 7203, \"🇷🇺\": 7204, \"🇷🇼\": 7205, \"🇸🇦\": 7206, \"🇸🇧\": 7207, \"🇸🇨\": 7208, \"🇸🇩\": 7209, \"🇸🇪\": 7210, \"🇸🇬\": 7211, \"🇸🇭\": 7212, \"🇸🇮\": 7213, \"🇸🇯\": 7214, \"🇸🇰\": 7215, \"🇸🇱\": 7216, \"🇸🇲\": 7217, \"🇸🇳\": 7218, \"🇸🇴\": 7219, \"🇸🇷\": 7220, \"🇸🇸\": 7221, \"🇸🇹\": 7222, \"🇸🇻\": 7223, \"🇸🇽\": 7224, \"🇸🇾\": 7225, \"🇸🇿\": 7226, \"🇹🇦\": 7227, \"🇹🇨\": 7228, \"🇹🇩\": 7229, \"🇹🇫\": 7230, \"🇹🇬\": 7231, \"🇹🇭\": 7232, \"🇹🇯\": 7233, \"🇹🇰\": 7234, \"🇹🇱\": 7235, \"🇹🇲\": 7236, \"🇹🇳\": 7237, \"🇹🇴\": 7238, \"🇹🇷\": 7239, \"🇹🇹\": 7240, \"🇹🇻\": 7241, \"🇹🇼\": 7242, \"🇹🇿\": 7243, \"🇺🇦\": 7244, \"🇺🇬\": 7245, \"🇺🇲\": 7246, \"🇺🇳\": 7247, \"🇺🇸\": 7248, \"🇺🇾\": 7249, \"🇺🇿\": 7250, \"🇻🇦\": 7251, \"🇻🇨\": 7252, \"🇻🇪\": 7253, \"🇻🇬\": 7254, \"🇻🇮\": 7255, \"🇻🇳\": 7256, \"🇻🇺\": 7257, \"🇼🇫\": 7258, \"🇼🇸\": 7259, \"🇽🇰\": 7260, \"🇾🇪\": 7261, \"🇾🇹\": 7262, \"🇿🇦\": 7263, \"🇿🇲\": 7264, \"🇿🇼\": 7265, \"🈁\": 6400, \"🈂\": 6401, \"🈚\": 6407, \"🈯\": 6404, \"🈲\": 6408, \"🈳\": 6412, \"🈴\": 6411, \"🈵\": 6416, \"🈶\": 6403, \"🈷\": 6402, \"🈸\": 6410, \"🈹\": 6406, \"🈺\": 6415, \"🉐\": 6405, \"🉑\": 6409, \"🌀\": 4197, \"🌁\": 449, \"🌂\": 4199, \"🌃\": 450, \"🌄\": 452, \"🌅\": 453, \"🌆\": 454, \"🌇\": 455, \"🌈\": 4198, \"🌉\": 456, \"🌊\": 4210, \"🌋\": 410, \"🌌\": 4184, \"🌍\": 41, \"🌎\": 42, \"🌏\": 43, \"🌐\": 44, \"🌑\": 4164, \"🌒\": 4165, \"🌓\": 4166, \"🌔\": 4167, \"🌕\": 4168, \"🌖\": 4169, \"🌗\": 4170, \"🌘\": 4171, \"🌙\": 4172, \"🌚\": 4173, \"🌛\": 4174, \"🌜\": 4175, \"🌝\": 4178, \"🌞\": 4179, \"🌟\": 4182, \"🌠\": 4183, \"🌡\": 4176, \"🌤\": 4188, \"🌥\": 4189, \"🌦\": 4190, \"🌧\": 4191, \"🌨\": 4192, \"🌩\": 4193, \"🌪\": 4194, \"🌫\": 4195, \"🌬\": 4196, \"🌭\": 347, \"🌮\": 349, \"🌯\": 350, \"🌰\": 331, \"🌱\": 2116, \"🌲\": 2117, \"🌳\": 2118, \"🌴\": 2119, \"🌵\": 2120, \"🌶\": 323, \"🌷\": 2115, \"🌸\": 2107, \"🌹\": 2110, \"🌺\": 2112, \"🌻\": 2113, \"🌼\": 2114, \"🌽\": 322, \"🌾\": 2121, \"🌿\": 2122, \"🍀\": 2124, \"🍁\": 2125, \"🍂\": 2126, \"🍃\": 2127, \"🍄\": 329, \"🍅\": 316, \"🍆\": 319, \"🍇\": 31, \"🍈\": 32, \"🍉\": 33, \"🍊\": 34, \"🍋\": 35, \"🍌\": 36, \"🍍\": 37, \"🍎\": 39, \"🍏\": 310, \"🍐\": 311, \"🍑\": 312, \"🍒\": 313, \"🍓\": 314, \"🍔\": 344, \"🍕\": 346, \"🍖\": 340, \"🍗\": 341, \"🍘\": 364, \"🍙\": 365, \"🍚\": 366, \"🍛\": 367, \"🍜\": 368, \"🍝\": 369, \"🍞\": 332, \"🍟\": 345, \"🍠\": 370, \"🍡\": 376, \"🍢\": 371, \"🍣\": 372, \"🍤\": 373, \"🍥\": 374, \"🍦\": 385, \"🍧\": 386, \"🍨\": 387, \"🍩\": 388, \"🍪\": 389, \"🍫\": 394, \"🍬\": 395, \"🍭\": 396, \"🍮\": 397, \"🍯\": 398, \"🍰\": 391, \"🍱\": 363, \"🍲\": 356, \"🍳\": 354, \"🍴\": 3118, \"🍵\": 3102, \"🍶\": 3103, \"🍷\": 3105, \"🍸\": 3106, \"🍹\": 3107, \"🍺\": 3108, \"🍻\": 3109, \"🍼\": 399, \"🍽\": 3117, \"🍾\": 3104, \"🍿\": 359, \"🎀\": 517, \"🎁\": 518, \"🎂\": 390, \"🎃\": 51, \"🎄\": 52, \"🎅\": 1326, \"🎆\": 53, \"🎇\": 54, \"🎈\": 57, \"🎉\": 58, \"🎊\": 59, \"🎋\": 510, \"🎌\": 73, \"🎍\": 511, \"🎎\": 512, \"🎏\": 513, \"🎐\": 514, \"🎑\": 515, \"🎒\": 625, \"🎓\": 637, \"🎖\": 522, \"🎗\": 519, \"🎙\": 656, \"🎚\": 657, \"🎛\": 658, \"🎞\": 689, \"🎟\": 520, \"🎠\": 458, \"🎡\": 459, \"🎢\": 460, \"🎣\": 549, \"🎤\": 659, \"🎥\": 688, \"🎦\": 6324, \"🎧\": 660, \"🎨\": 577, \"🎩\": 636, \"🎪\": 462, \"🎫\": 521, \"🎬\": 691, \"🎭\": 575, \"🎮\": 561, \"🎯\": 555, \"🎰\": 563, \"🎱\": 558, \"🎲\": 564, \"🎳\": 537, \"🎴\": 574, \"🎵\": 654, \"🎶\": 655, \"🎷\": 662, \"🎸\": 663, \"🎹\": 664, \"🎺\": 665, \"🎻\": 666, \"🎼\": 653, \"🎽\": 551, \"🎾\": 535, \"🎿\": 552, \"🏀\": 531, \"🏁\": 71, \"🏂\": 1397, \"🏃♀\": 1381, \"🏃♂\": 1380, \"🏃\": 1379, \"🏄♀\": 1403, \"🏄♂\": 1402, \"🏄\": 1401, \"🏅\": 524, \"🏆\": 523, \"🏇\": 1395, \"🏈\": 533, \"🏉\": 534, \"🏊♀\": 1409, \"🏊♂\": 1408, \"🏊\": 1407, \"🏋♀\": 1415, \"🏋♂\": 1414, \"🏋\": 1413, \"🏌♀\": 1400, \"🏌♂\": 1399, \"🏌\": 1398, \"🏍\": 492, \"🏎\": 491, \"🏏\": 538, \"🏐\": 532, \"🏑\": 539, \"🏒\": 540, \"🏓\": 542, \"🏔\": 48, \"🏕\": 412, \"🏖\": 413, \"🏗\": 419, \"🏘\": 421, \"🏙\": 451, \"🏚\": 422, \"🏛\": 418, \"🏜\": 414, \"🏝\": 415, \"🏞\": 416, \"🏟\": 417, \"🏠\": 423, \"🏡\": 424, \"🏢\": 425, \"🏣\": 426, \"🏤\": 427, \"🏥\": 428, \"🏦\": 429, \"🏧\": 6234, \"🏨\": 430, \"🏩\": 431, \"🏪\": 432, \"🏫\": 433, \"🏬\": 434, \"🏭\": 435, \"🏮\": 6102, \"🏯\": 436, \"🏰\": 437, \"🏳🌈\": 76, \"🏳\": 75, \"🏴☠\": 77, \"🏴󠁧󠁢󠁥󠁮󠁧󠁿\": 7266, \"🏴󠁧󠁢󠁳󠁣󠁴󠁿\": 7267, \"🏴󠁧󠁢󠁷󠁬󠁳󠁿\": 7268, \"🏴\": 74, \"🏵\": 2109, \"🏷\": 6120, \"🏸\": 543, \"🏹\": 6189, \"🏺\": 3121, \"🏻\": 81, \"🏼\": 82, \"🏽\": 83, \"🏾\": 84, \"🏿\": 85, \"🐀\": 244, \"🐁\": 243, \"🐂\": 225, \"🐃\": 226, \"🐄\": 227, \"🐅\": 217, \"🐆\": 218, \"🐇\": 247, \"🐈\": 214, \"🐉\": 282, \"🐊\": 277, \"🐋\": 286, \"🐌\": 294, \"🐍\": 280, \"🐎\": 220, \"🐏\": 232, \"🐐\": 234, \"🐑\": 233, \"🐒\": 22, \"🐓\": 262, \"🐔\": 261, \"🐕🦺\": 28, \"🐕\": 26, \"🐖\": 229, \"🐗\": 230, \"🐘\": 239, \"🐙\": 292, \"🐚\": 293, \"🐛\": 296, \"🐜\": 297, \"🐝\": 298, \"🐞\": 299, \"🐟\": 288, \"🐠\": 289, \"🐡\": 290, \"🐢\": 278, \"🐣\": 263, \"🐤\": 264, \"🐥\": 265, \"🐦\": 266, \"🐧\": 267, \"🐨\": 252, \"🐩\": 29, \"🐪\": 235, \"🐫\": 236, \"🐬\": 287, \"🐭\": 242, \"🐮\": 224, \"🐯\": 216, \"🐰\": 246, \"🐱\": 213, \"🐲\": 281, \"🐳\": 285, \"🐴\": 219, \"🐵\": 21, \"🐶\": 25, \"🐷\": 228, \"🐸\": 276, \"🐹\": 245, \"🐺\": 210, \"🐻\": 251, \"🐼\": 253, \"🐽\": 231, \"🐾\": 259, \"🐿\": 248, \"👀\": 1194, \"👁🗨\": 1145, \"👁\": 1195, \"👂\": 1188, \"👃\": 1190, \"👄\": 1197, \"👅\": 1196, \"👆\": 1164, \"👇\": 1166, \"👈\": 1162, \"👉\": 1163, \"👊\": 1171, \"👋\": 1150, \"👌\": 1155, \"👍\": 1168, \"👎\": 1169, \"👏\": 1174, \"👐\": 1176, \"👑\": 634, \"👒\": 635, \"👓\": 61, \"👔\": 66, \"👕\": 67, \"👖\": 68, \"👗\": 613, \"👘\": 614, \"👙\": 619, \"👚\": 620, \"👛\": 621, \"👜\": 622, \"👝\": 623, \"👞\": 626, \"👟\": 627, \"👠\": 630, \"👡\": 631, \"👢\": 633, \"👣\": 1483, \"👤\": 1481, \"👥\": 1482, \"👦\": 1200, \"👧\": 1201, \"👨🌾\": 1267, \"👨🍳\": 1270, \"👨🎓\": 1258, \"👨🎤\": 1288, \"👨🎨\": 1291, \"👨🏫\": 1261, \"👨🏭\": 1276, \"👨👦👦\": 1471, \"👨👦\": 1470, \"👨👧👦\": 1473, \"👨👧👧\": 1474, \"👨👧\": 1472, \"👨👨👦\": 1460, \"👨👨👦👦\": 1463, \"👨👨👧\": 1461, \"👨👨👧👦\": 1462, \"👨👨👧👧\": 1464, \"👨👩👦\": 1455, \"👨👩👦👦\": 1458, \"👨👩👧\": 1456, \"👨👩👧👦\": 1457, \"👨👩👧👧\": 1459, \"👨💻\": 1285, \"👨💼\": 1279, \"👨🔧\": 1273, \"👨🔬\": 1282, \"👨🚀\": 1297, \"👨🚒\": 1300, \"👨🦯\": 1371, \"👨🦰\": 1206, \"👨🦱\": 1207, \"👨🦲\": 1209, \"👨🦳\": 1208, \"👨🦼\": 1374, \"👨🦽\": 1377, \"👨⚕\": 1255, \"👨⚖\": 1264, \"👨✈\": 1294, \"👨👨\": 1452, \"👨💋👨\": 1448, \"👨\": 1204, \"👩🌾\": 1268, \"👩🍳\": 1271, \"👩🎓\": 1259, \"👩🎤\": 1289, \"👩🎨\": 1292, \"👩🏫\": 1262, \"👩🏭\": 1277, \"👩👦👦\": 1476, \"👩👦\": 1475, \"👩👧👦\": 1478, \"👩👧👧\": 1479, \"👩👧\": 1477, \"👩👩👦\": 1465, \"👩👩👦👦\": 1468, \"👩👩👧\": 1466, \"👩👩👧👦\": 1467, \"👩👩👧👧\": 1469, \"👩💻\": 1286, \"👩💼\": 1280, \"👩🔧\": 1274, \"👩🔬\": 1283, \"👩🚀\": 1298, \"👩🚒\": 1301, \"👩🦯\": 1372, \"👩🦰\": 1211, \"👩🦱\": 1213, \"👩🦲\": 1217, \"👩🦳\": 1215, \"👩🦼\": 1375, \"👩🦽\": 1378, \"👩⚕\": 1256, \"👩⚖\": 1265, \"👩✈\": 1295, \"👩👨\": 1451, \"👩👩\": 1453, \"👩💋👨\": 1447, \"👩💋👩\": 1449, \"👩\": 1210, \"👪\": 1454, \"👫\": 1444, \"👬\": 1445, \"👭\": 1443, \"👮♀\": 1304, \"👮♂\": 1303, \"👮\": 1302, \"👯♀\": 1387, \"👯♂\": 1386, \"👯\": 1385, \"👰\": 1322, \"👱♀\": 1219, \"👱♂\": 1220, \"👱\": 1203, \"👲\": 1319, \"👳♀\": 1318, \"👳♂\": 1317, \"👳\": 1316, \"👴\": 1222, \"👵\": 1223, \"👶\": 1198, \"👷♀\": 1313, \"👷♂\": 1312, \"👷\": 1311, \"👸\": 1315, \"👹\": 197, \"👺\": 198, \"👻\": 199, \"👼\": 1325, \"👽\": 1100, \"👾\": 1101, \"👿\": 192, \"💀\": 193, \"💁♀\": 1238, \"💁♂\": 1237, \"💁\": 1236, \"💂♀\": 1310, \"💂♂\": 1309, \"💂\": 1308, \"💃\": 1382, \"💄\": 641, \"💅\": 1181, \"💆♀\": 1357, \"💆♂\": 1356, \"💆\": 1355, \"💇♀\": 1360, \"💇♂\": 1359, \"💇\": 1358, \"💈\": 461, \"💉\": 6208, \"💊\": 6210, \"💋\": 1115, \"💌\": 1116, \"💍\": 642, \"💎\": 643, \"💏\": 1446, \"💐\": 2106, \"💑\": 1450, \"💒\": 438, \"💓\": 1121, \"💔\": 1126, \"💕\": 1123, \"💖\": 1119, \"💗\": 1120, \"💘\": 1117, \"💙\": 1131, \"💚\": 1130, \"💛\": 1129, \"💜\": 1132, \"💝\": 1118, \"💞\": 1122, \"💟\": 1124, \"💠\": 6447, \"💡\": 6100, \"💢\": 1137, \"💣\": 1143, \"💤\": 1149, \"💥\": 1138, \"💦\": 1140, \"💧\": 4209, \"💨\": 1141, \"💩\": 195, \"💪\": 1183, \"💫\": 1139, \"💬\": 1144, \"💭\": 1148, \"💮\": 2108, \"💯\": 1136, \"💰\": 6121, \"💱\": 6130, \"💲\": 6131, \"💳\": 6127, \"💴\": 6122, \"💵\": 6123, \"💶\": 6124, \"💷\": 6125, \"💸\": 6126, \"💹\": 6129, \"💺\": 4123, \"💻\": 677, \"💼\": 6152, \"💽\": 683, \"💾\": 684, \"💿\": 685, \"📀\": 686, \"📁\": 6153, \"📂\": 6154, \"📃\": 6113, \"📄\": 6115, \"📅\": 6156, \"📆\": 6157, \"📇\": 6160, \"📈\": 6161, \"📉\": 6162, \"📊\": 6163, \"📋\": 6164, \"📌\": 6165, \"📍\": 6166, \"📎\": 6167, \"📏\": 6169, \"📐\": 6170, \"📑\": 6118, \"📒\": 6112, \"📓\": 6111, \"📔\": 6104, \"📕\": 6105, \"📖\": 6106, \"📗\": 6107, \"📘\": 6108, \"📙\": 6109, \"📚\": 6110, \"📛\": 6337, \"📜\": 6114, \"📝\": 6151, \"📞\": 672, \"📟\": 673, \"📠\": 674, \"📡\": 6207, \"📢\": 648, \"📣\": 649, \"📤\": 6136, \"📥\": 6137, \"📦\": 6138, \"📧\": 6133, \"📨\": 6134, \"📩\": 6135, \"📪\": 6140, \"📫\": 6139, \"📬\": 6141, \"📭\": 6142, \"📮\": 6143, \"📯\": 650, \"📰\": 6116, \"📱\": 669, \"📲\": 670, \"📳\": 6328, \"📴\": 6329, \"📵\": 6256, \"📶\": 6327, \"📷\": 693, \"📸\": 694, \"📹\": 695, \"📺\": 692, \"📻\": 661, \"📼\": 696, \"📽\": 690, \"📿\": 640, \"🔀\": 6306, \"🔁\": 6307, \"🔂\": 6308, \"🔃\": 6274, \"🔄\": 6275, \"🔅\": 6325, \"🔆\": 6326, \"🔇\": 644, \"🔈\": 645, \"🔉\": 646, \"🔊\": 647, \"🔋\": 675, \"🔌\": 676, \"🔍\": 697, \"🔎\": 698, \"🔏\": 6177, \"🔐\": 6178, \"🔑\": 6179, \"🔒\": 6175, \"🔓\": 6176, \"🔔\": 651, \"🔕\": 652, \"🔖\": 6119, \"🔗\": 6197, \"🔘\": 6448, \"🔙\": 6276, \"🔚\": 6277, \"🔛\": 6278, \"🔜\": 6279, \"🔝\": 6280, \"🔞\": 6257, \"🔟\": 6377, \"🔠\": 6378, \"🔡\": 6379, \"🔢\": 6380, \"🔣\": 6381, \"🔤\": 6382, \"🔥\": 4208, \"🔦\": 6101, \"🔧\": 6191, \"🔨\": 6181, \"🔩\": 6192, \"🔪\": 3120, \"🔫\": 6188, \"🔬\": 6205, \"🔭\": 6206, \"🔮\": 559, \"🔯\": 6292, \"🔰\": 6338, \"🔱\": 6336, \"🔲\": 6450, \"🔳\": 6449, \"🔴\": 6417, \"🔵\": 6421, \"🔶\": 6441, \"🔷\": 6442, \"🔸\": 6443, \"🔹\": 6444, \"🔺\": 6445, \"🔻\": 6446, \"🔼\": 6316, \"🔽\": 6318, \"🕉\": 6283, \"🕊\": 268, \"🕋\": 446, \"🕌\": 442, \"🕍\": 444, \"🕎\": 6291, \"🕐\": 4142, \"🕑\": 4144, \"🕒\": 4146, \"🕓\": 4148, \"🕔\": 4150, \"🕕\": 4152, \"🕖\": 4154, \"🕗\": 4156, \"🕘\": 4158, \"🕙\": 4160, \"🕚\": 4162, \"🕛\": 4140, \"🕜\": 4143, \"🕝\": 4145, \"🕞\": 4147, \"🕟\": 4149, \"🕠\": 4151, \"🕡\": 4153, \"🕢\": 4155, \"🕣\": 4157, \"🕤\": 4159, \"🕥\": 4161, \"🕦\": 4163, \"🕧\": 4141, \"🕯\": 699, \"🕰\": 4139, \"🕳\": 1142, \"🕴\": 1384, \"🕵♀\": 1307, \"🕵♂\": 1306, \"🕵\": 1305, \"🕶\": 62, \"🕷\": 2101, \"🕸\": 2102, \"🕹\": 562, \"🕺\": 1383, \"🖇\": 6168, \"🖊\": 6148, \"🖋\": 6147, \"🖌\": 6149, \"🖍\": 6150, \"🖐\": 1152, \"🖕\": 1165, \"🖖\": 1154, \"🖤\": 1134, \"🖥\": 678, \"🖨\": 679, \"🖱\": 681, \"🖲\": 682, \"🖼\": 576, \"🗂\": 6155, \"🗃\": 6172, \"🗄\": 6173, \"🗑\": 6174, \"🗒\": 6158, \"🗓\": 6159, \"🗜\": 6194, \"🗝\": 6180, \"🗞\": 6117, \"🗡\": 6186, \"🗣\": 1480, \"🗨\": 1146, \"🗯\": 1147, \"🗳\": 6144, \"🗺\": 45, \"🗻\": 411, \"🗼\": 439, \"🗽\": 440, \"🗾\": 46, \"🗿\": 6233, \"😀\": 11, \"😁\": 14, \"😂\": 18, \"😃\": 12, \"😄\": 13, \"😅\": 16, \"😆\": 15, \"😇\": 113, \"😈\": 191, \"😉\": 111, \"😊\": 112, \"😋\": 122, \"😌\": 142, \"😍\": 115, \"😎\": 160, \"😏\": 137, \"😐\": 134, \"😑\": 135, \"😒\": 138, \"😓\": 183, \"😔\": 143, \"😕\": 163, \"😖\": 180, \"😗\": 118, \"😘\": 117, \"😙\": 121, \"😚\": 120, \"😛\": 123, \"😜\": 124, \"😝\": 126, \"😞\": 182, \"😟\": 164, \"😠\": 189, \"😡\": 188, \"😢\": 177, \"😣\": 181, \"😤\": 187, \"😥\": 176, \"😦\": 172, \"😧\": 173, \"😨\": 174, \"😩\": 184, \"😪\": 144, \"😫\": 185, \"😬\": 140, \"😭\": 178, \"😮\": 167, \"😯\": 168, \"😰\": 175, \"😱\": 179, \"😲\": 169, \"😳\": 170, \"😴\": 146, \"😵\": 156, \"😶\": 136, \"😷\": 147, \"😸\": 1104, \"😹\": 1105, \"😺\": 1103, \"😻\": 1106, \"😼\": 1107, \"😽\": 1108, \"😾\": 1111, \"😿\": 1110, \"🙀\": 1109, \"🙁\": 165, \"🙂\": 19, \"🙃\": 110, \"🙄\": 139, \"🙅♀\": 1232, \"🙅♂\": 1231, \"🙅\": 1230, \"🙆♀\": 1235, \"🙆♂\": 1234, \"🙆\": 1233, \"🙇♀\": 1247, \"🙇♂\": 1246, \"🙇\": 1245, \"🙈\": 1112, \"🙉\": 1113, \"🙊\": 1114, \"🙋♀\": 1241, \"🙋♂\": 1240, \"🙋\": 1239, \"🙌\": 1175, \"🙍♀\": 1226, \"🙍♂\": 1225, \"🙍\": 1224, \"🙎♀\": 1229, \"🙎♂\": 1228, \"🙎\": 1227, \"🙏\": 1179, \"🚀\": 4129, \"🚁\": 4124, \"🚂\": 463, \"🚃\": 464, \"🚄\": 465, \"🚅\": 466, \"🚆\": 467, \"🚇\": 468, \"🚈\": 469, \"🚉\": 470, \"🚊\": 471, \"🚋\": 474, \"🚌\": 475, \"🚍\": 476, \"🚎\": 477, \"🚏\": 4100, \"🚐\": 478, \"🚑\": 479, \"🚒\": 480, \"🚓\": 481, \"🚔\": 482, \"🚕\": 483, \"🚖\": 484, \"🚗\": 485, \"🚘\": 486, \"🚙\": 487, \"🚚\": 488, \"🚛\": 489, \"🚜\": 490, \"🚝\": 472, \"🚞\": 473, \"🚟\": 4125, \"🚠\": 4126, \"🚡\": 4127, \"🚢\": 4117, \"🚣♀\": 1406, \"🚣♂\": 1405, \"🚣\": 1404, \"🚤\": 4113, \"🚥\": 4106, \"🚦\": 4107, \"🚧\": 4109, \"🚨\": 4105, \"🚩\": 72, \"🚪\": 6213, \"🚫\": 6250, \"🚬\": 6230, \"🚭\": 6252, \"🚮\": 6235, \"🚯\": 6253, \"🚰\": 6236, \"🚱\": 6254, \"🚲\": 497, \"🚳\": 6251, \"🚴♀\": 1418, \"🚴♂\": 1417, \"🚴\": 1416, \"🚵♀\": 1421, \"🚵♂\": 1420, \"🚵\": 1419, \"🚶♀\": 1363, \"🚶♂\": 1362, \"🚶\": 1361, \"🚷\": 6255, \"🚸\": 6248, \"🚹\": 6238, \"🚺\": 6239, \"🚻\": 6240, \"🚼\": 6241, \"🚽\": 6217, \"🚾\": 6242, \"🚿\": 6218, \"🛀\": 1440, \"🛁\": 6219, \"🛂\": 6243, \"🛃\": 6244, \"🛄\": 6245, \"🛅\": 6246, \"🛋\": 6215, \"🛌\": 1441, \"🛍\": 624, \"🛎\": 4131, \"🛏\": 6214, \"🛐\": 6281, \"🛑\": 4108, \"🛒\": 6229, \"🛕\": 443, \"🛠\": 6185, \"🛡\": 6190, \"🛢\": 4103, \"🛣\": 4101, \"🛤\": 4102, \"🛥\": 4116, \"🛩\": 4119, \"🛫\": 4120, \"🛬\": 4121, \"🛰\": 4128, \"🛳\": 4114, \"🛴\": 498, \"🛵\": 493, \"🛶\": 4112, \"🛷\": 553, \"🛸\": 4130, \"🛹\": 499, \"🛺\": 496, \"🟠\": 6418, \"🟡\": 6419, \"🟢\": 6420, \"🟣\": 6422, \"🟤\": 6423, \"🟥\": 6426, \"🟦\": 6430, \"🟧\": 6427, \"🟨\": 6428, \"🟩\": 6429, \"🟪\": 6431, \"🟫\": 6432, \"🤍\": 1135, \"🤎\": 1133, \"🤏\": 1156, \"🤐\": 132, \"🤑\": 127, \"🤒\": 148, \"🤓\": 161, \"🤔\": 131, \"🤕\": 149, \"🤖\": 1102, \"🤗\": 128, \"🤘\": 1160, \"🤙\": 1161, \"🤚\": 1151, \"🤛\": 1172, \"🤜\": 1173, \"🤝\": 1178, \"🤞\": 1158, \"🤟\": 1159, \"🤠\": 158, \"🤡\": 196, \"🤢\": 150, \"🤣\": 17, \"🤤\": 145, \"🤥\": 141, \"🤦♀\": 1250, \"🤦♂\": 1249, \"🤦\": 1248, \"🤧\": 152, \"🤨\": 133, \"🤩\": 116, \"🤪\": 125, \"🤫\": 130, \"🤬\": 190, \"🤭\": 129, \"🤮\": 151, \"🤯\": 157, \"🤰\": 1323, \"🤱\": 1324, \"🤲\": 1177, \"🤳\": 1182, \"🤴\": 1314, \"🤵\": 1321, \"🤶\": 1327, \"🤷♀\": 1253, \"🤷♂\": 1252, \"🤷\": 1251, \"🤸♀\": 1424, \"🤸♂\": 1423, \"🤸\": 1422, \"🤹♀\": 1436, \"🤹♂\": 1435, \"🤹\": 1434, \"🤺\": 1394, \"🤼♀\": 1427, \"🤼♂\": 1426, \"🤼\": 1425, \"🤽♀\": 1430, \"🤽♂\": 1429, \"🤽\": 1428, \"🤾♀\": 1433, \"🤾♂\": 1432, \"🤾\": 1431, \"🤿\": 550, \"🥀\": 2111, \"🥁\": 668, \"🥂\": 3110, \"🥃\": 3111, \"🥄\": 3119, \"🥅\": 546, \"🥇\": 525, \"🥈\": 526, \"🥉\": 527, \"🥊\": 544, \"🥋\": 545, \"🥌\": 554, \"🥍\": 541, \"🥎\": 530, \"🥏\": 536, \"🥐\": 333, \"🥑\": 318, \"🥒\": 324, \"🥓\": 343, \"🥔\": 320, \"🥕\": 321, \"🥖\": 334, \"🥗\": 358, \"🥘\": 355, \"🥙\": 351, \"🥚\": 353, \"🥛\": 3100, \"🥜\": 330, \"🥝\": 315, \"🥞\": 337, \"🥟\": 377, \"🥠\": 378, \"🥡\": 379, \"🥢\": 3116, \"🥣\": 357, \"🥤\": 3112, \"🥥\": 317, \"🥦\": 326, \"🥧\": 393, \"🥨\": 335, \"🥩\": 342, \"🥪\": 348, \"🥫\": 362, \"🥬\": 325, \"🥭\": 38, \"🥮\": 375, \"🥯\": 336, \"🥰\": 114, \"🥱\": 186, \"🥳\": 159, \"🥴\": 155, \"🥵\": 153, \"🥶\": 154, \"🥺\": 171, \"🥻\": 615, \"🥼\": 64, \"🥽\": 63, \"🥾\": 628, \"🥿\": 629, \"🦀\": 380, \"🦁\": 215, \"🦂\": 2103, \"🦃\": 260, \"🦄\": 221, \"🦅\": 269, \"🦆\": 270, \"🦇\": 250, \"🦈\": 291, \"🦉\": 272, \"🦊\": 211, \"🦋\": 295, \"🦌\": 223, \"🦍\": 23, \"🦎\": 279, \"🦏\": 240, \"🦐\": 382, \"🦑\": 383, \"🦒\": 238, \"🦓\": 222, \"🦔\": 249, \"🦕\": 283, \"🦖\": 284, \"🦗\": 2100, \"🦘\": 257, \"🦙\": 237, \"🦚\": 274, \"🦛\": 241, \"🦜\": 275, \"🦝\": 212, \"🦞\": 381, \"🦟\": 2104, \"🦠\": 2105, \"🦡\": 258, \"🦢\": 271, \"🦥\": 254, \"🦦\": 255, \"🦧\": 24, \"🦨\": 256, \"🦩\": 273, \"🦪\": 384, \"🦮\": 27, \"🦯\": 6196, \"🦴\": 1193, \"🦵\": 1186, \"🦶\": 1187, \"🦷\": 1192, \"🦸♀\": 1330, \"🦸♂\": 1329, \"🦸\": 1328, \"🦹♀\": 1333, \"🦹♂\": 1332, \"🦹\": 1331, \"🦺\": 65, \"🦻\": 1189, \"🦼\": 495, \"🦽\": 494, \"🦾\": 1184, \"🦿\": 1185, \"🧀\": 339, \"🧁\": 392, \"🧂\": 361, \"🧃\": 3113, \"🧄\": 327, \"🧅\": 328, \"🧆\": 352, \"🧇\": 338, \"🧈\": 360, \"🧉\": 3114, \"🧊\": 3115, \"🧍♀\": 1366, \"🧍♂\": 1365, \"🧍\": 1364, \"🧎♀\": 1369, \"🧎♂\": 1368, \"🧎\": 1367, \"🧏♀\": 1244, \"🧏♂\": 1243, \"🧏\": 1242, \"🧐\": 162, \"🧑🌾\": 1266, \"🧑🍳\": 1269, \"🧑🎓\": 1257, \"🧑🎤\": 1287, \"🧑🎨\": 1290, \"🧑🏫\": 1260, \"🧑🏭\": 1275, \"🧑💻\": 1284, \"🧑💼\": 1278, \"🧑🔧\": 1272, \"🧑🔬\": 1281, \"🧑🚀\": 1296, \"🧑🚒\": 1299, \"🧑🤝🧑\": 1442, \"🧑🦯\": 1370, \"🧑🦰\": 1212, \"🧑🦱\": 1214, \"🧑🦲\": 1218, \"🧑🦳\": 1216, \"🧑🦼\": 1373, \"🧑🦽\": 1376, \"🧑⚕\": 1254, \"🧑⚖\": 1263, \"🧑✈\": 1293, \"🧑\": 1202, \"🧒\": 1199, \"🧓\": 1221, \"🧔\": 1205, \"🧕\": 1320, \"🧖♀\": 1390, \"🧖♂\": 1389, \"🧖\": 1388, \"🧗♀\": 1393, \"🧗♂\": 1392, \"🧗\": 1391, \"🧘♀\": 1439, \"🧘♂\": 1438, \"🧘\": 1437, \"🧙♀\": 1336, \"🧙♂\": 1335, \"🧙\": 1334, \"🧚♀\": 1339, \"🧚♂\": 1338, \"🧚\": 1337, \"🧛♀\": 1342, \"🧛♂\": 1341, \"🧛\": 1340, \"🧜♀\": 1345, \"🧜♂\": 1344, \"🧜\": 1343, \"🧝♀\": 1348, \"🧝♂\": 1347, \"🧝\": 1346, \"🧞♀\": 1351, \"🧞♂\": 1350, \"🧞\": 1349, \"🧟♀\": 1354, \"🧟♂\": 1353, \"🧟\": 1352, \"🧠\": 1191, \"🧡\": 1128, \"🧢\": 638, \"🧣\": 69, \"🧤\": 610, \"🧥\": 611, \"🧦\": 612, \"🧧\": 516, \"🧨\": 55, \"🧩\": 565, \"🧪\": 6202, \"🧫\": 6203, \"🧬\": 6204, \"🧭\": 47, \"🧮\": 687, \"🧯\": 6228, \"🧰\": 6199, \"🧱\": 420, \"🧲\": 6200, \"🧳\": 4132, \"🧴\": 6221, \"🧵\": 578, \"🧶\": 579, \"🧷\": 6222, \"🧸\": 566, \"🧹\": 6223, \"🧺\": 6224, \"🧻\": 6225, \"🧼\": 6226, \"🧽\": 6227, \"🧾\": 6128, \"🧿\": 560, \"🩰\": 632, \"🩱\": 616, \"🩲\": 617, \"🩳\": 618, \"🩸\": 6209, \"🩹\": 6211, \"🩺\": 6212, \"🪀\": 556, \"🪁\": 557, \"🪂\": 4122, \"🪐\": 4180, \"🪑\": 6216, \"🪒\": 6220, \"🪓\": 6182, \"🪔\": 6103, \"🪕\": 667, \"‼\": 6355, \"⁉\": 6356, \"™\": 6364, \"ℹ\": 6389, \"↔\": 6269, \"↕\": 6268, \"↖\": 6267, \"↗\": 6261, \"↘\": 6263, \"↙\": 6265, \"↩\": 6270, \"↪\": 6271, \"⌚\": 4135, \"⌛\": 4133, \"⌨\": 680, \"⏏\": 6323, \"⏩\": 6310, \"⏪\": 6314, \"⏫\": 6317, \"⏬\": 6319, \"⏭\": 6311, \"⏮\": 6315, \"⏯\": 6312, \"⏰\": 4136, \"⏱\": 4137, \"⏲\": 4138, \"⏳\": 4134, \"⏸\": 6320, \"⏹\": 6321, \"⏺\": 6322, \"Ⓜ\": 6391, \"▪\": 6439, \"▫\": 6440, \"▶\": 6309, \"◀\": 6313, \"◻\": 6436, \"◼\": 6435, \"◽\": 6438, \"◾\": 6437, \"☀\": 4177, \"☁\": 4185, \"☂\": 4200, \"☃\": 4205, \"☄\": 4207, \"☎\": 671, \"☑\": 6341, \"☔\": 4201, \"☕\": 3101, \"☘\": 2123, \"☝\": 1167, \"☠\": 194, \"☢\": 6258, \"☣\": 6259, \"☦\": 6288, \"☪\": 6289, \"☮\": 6290, \"☯\": 6286, \"☸\": 6285, \"☹\": 166, \"☺\": 119, \"♈\": 6293, \"♉\": 6294, \"♊\": 6295, \"♋\": 6296, \"♌\": 6297, \"♍\": 6298, \"♎\": 6299, \"♏\": 6300, \"♐\": 6301, \"♑\": 6302, \"♒\": 6303, \"♓\": 6304, \"♟\": 571, \"♠\": 567, \"♣\": 570, \"♥\": 568, \"♦\": 569, \"♨\": 457, \"♻\": 6334, \"♾\": 6333, \"♿\": 6237, \"⚒\": 6184, \"⚓\": 4110, \"⚔\": 6187, \"⚖\": 6195, \"⚗\": 6201, \"⚙\": 6193, \"⚛\": 6282, \"⚜\": 6335, \"⚠\": 6247, \"⚡\": 4203, \"⚪\": 6425, \"⚫\": 6424, \"⚰\": 6231, \"⚱\": 6232, \"⚽\": 528, \"⚾\": 529, \"⛄\": 4206, \"⛅\": 4186, \"⛈\": 4187, \"⛎\": 6305, \"⛏\": 6183, \"⛑\": 639, \"⛓\": 6198, \"⛔\": 6249, \"⛩\": 445, \"⛪\": 441, \"⛰\": 49, \"⛱\": 4202, \"⛲\": 447, \"⛳\": 547, \"⛴\": 4115, \"⛵\": 4111, \"⛷\": 1396, \"⛸\": 548, \"⛹♀\": 1412, \"⛹♂\": 1411, \"⛹\": 1410, \"⛺\": 448, \"⛽\": 4104, \"✂\": 6171, \"✅\": 6340, \"✈\": 4118, \"✉\": 6132, \"✊\": 1170, \"✋\": 1153, \"✌\": 1157, \"✍\": 1180, \"✏\": 6145, \"✒\": 6146, \"✔\": 6342, \"✖\": 6343, \"✝\": 6287, \"✡\": 6284, \"✨\": 56, \"✳\": 6352, \"✴\": 6353, \"❄\": 4204, \"❇\": 6354, \"❌\": 6344, \"❎\": 6345, \"❓\": 6357, \"❔\": 6358, \"❕\": 6359, \"❗\": 6360, \"❣\": 1125, \"❤\": 1127, \"➕\": 6346, \"➖\": 6347, \"➗\": 6348, \"➡\": 6262, \"➰\": 6349, \"➿\": 6350, \"⤴\": 6272, \"⤵\": 6273, \"⬅\": 6266, \"⬆\": 6260, \"⬇\": 6264, \"⬛\": 6433, \"⬜\": 6434, \"⭐\": 4181, \"⭕\": 6339, \"〰\": 6361, \"〽\": 6351, \"㊗\": 6413, \"㊙\": 6414, \"🎅🏻\": 0, \"🎅🏼\": 0, \"🎅🏽\": 0, \"🎅🏾\": 0, \"🎅🏿\": 0, \"🏂🏻\": 0, \"🏂🏼\": 0, \"🏂🏽\": 0, \"🏂🏾\": 0, \"🏂🏿\": 0, \"🏃🏻♀\": 0, \"🏃🏼♀\": 0, \"🏃🏽♀\": 0, \"🏃🏾♀\": 0, \"🏃🏿♀\": 0, \"🏃🏻♂\": 0, \"🏃🏼♂\": 0, \"🏃🏽♂\": 0, \"🏃🏾♂\": 0, \"🏃🏿♂\": 0, \"🏃🏻\": 0, \"🏃🏼\": 0, \"🏃🏽\": 0, \"🏃🏾\": 0, \"🏃🏿\": 0, \"🏄🏻♀\": 0, \"🏄🏼♀\": 0, \"🏄🏽♀\": 0, \"🏄🏾♀\": 0, \"🏄🏿♀\": 0, \"🏄🏻♂\": 0, \"🏄🏼♂\": 0, \"🏄🏽♂\": 0, \"🏄🏾♂\": 0, \"🏄🏿♂\": 0, \"🏄🏻\": 0, \"🏄🏼\": 0, \"🏄🏽\": 0, \"🏄🏾\": 0, \"🏄🏿\": 0, \"🏇🏻\": 0, \"🏇🏼\": 0, \"🏇🏽\": 0, \"🏇🏾\": 0, \"🏇🏿\": 0, \"🏊🏻♀\": 0, \"🏊🏼♀\": 0, \"🏊🏽♀\": 0, \"🏊🏾♀\": 0, \"🏊🏿♀\": 0, \"🏊🏻♂\": 0, \"🏊🏼♂\": 0, \"🏊🏽♂\": 0, \"🏊🏾♂\": 0, \"🏊🏿♂\": 0, \"🏊🏻\": 0, \"🏊🏼\": 0, \"🏊🏽\": 0, \"🏊🏾\": 0, \"🏊🏿\": 0, \"🏋🏻♀\": 0, \"🏋🏼♀\": 0, \"🏋🏽♀\": 0, \"🏋🏾♀\": 0, \"🏋🏿♀\": 0, \"🏋🏻♂\": 0, \"🏋🏼♂\": 0, \"🏋🏽♂\": 0, \"🏋🏾♂\": 0, \"🏋🏿♂\": 0, \"🏋🏻\": 0, \"🏋🏼\": 0, \"🏋🏽\": 0, \"🏋🏾\": 0, \"🏋🏿\": 0, \"🏌🏻♀\": 0, \"🏌🏼♀\": 0, \"🏌🏽♀\": 0, \"🏌🏾♀\": 0, \"🏌🏿♀\": 0, \"🏌🏻♂\": 0, \"🏌🏼♂\": 0, \"🏌🏽♂\": 0, \"🏌🏾♂\": 0, \"🏌🏿♂\": 0, \"🏌🏻\": 0, \"🏌🏼\": 0, \"🏌🏽\": 0, \"🏌🏾\": 0, \"🏌🏿\": 0, \"👂🏻\": 0, \"👂🏼\": 0, \"👂🏽\": 0, \"👂🏾\": 0, \"👂🏿\": 0, \"👃🏻\": 0, \"👃🏼\": 0, \"👃🏽\": 0, \"👃🏾\": 0, \"👃🏿\": 0, \"👆🏻\": 0, \"👆🏼\": 0, \"👆🏽\": 0, \"👆🏾\": 0, \"👆🏿\": 0, \"👇🏻\": 0, \"👇🏼\": 0, \"👇🏽\": 0, \"👇🏾\": 0, \"👇🏿\": 0, \"👈🏻\": 0, \"👈🏼\": 0, \"👈🏽\": 0, \"👈🏾\": 0, \"👈🏿\": 0, \"👉🏻\": 0, \"👉🏼\": 0, \"👉🏽\": 0, \"👉🏾\": 0, \"👉🏿\": 0, \"👊🏻\": 0, \"👊🏼\": 0, \"👊🏽\": 0, \"👊🏾\": 0, \"👊🏿\": 0, \"👋🏻\": 0, \"👋🏼\": 0, \"👋🏽\": 0, \"👋🏾\": 0, \"👋🏿\": 0, \"👌🏻\": 0, \"👌🏼\": 0, \"👌🏽\": 0, \"👌🏾\": 0, \"👌🏿\": 0, \"👍🏻\": 0, \"👍🏼\": 0, \"👍🏽\": 0, \"👍🏾\": 0, \"👍🏿\": 0, \"👎🏻\": 0, \"👎🏼\": 0, \"👎🏽\": 0, \"👎🏾\": 0, \"👎🏿\": 0, \"👏🏻\": 0, \"👏🏼\": 0, \"👏🏽\": 0, \"👏🏾\": 0, \"👏🏿\": 0, \"👐🏻\": 0, \"👐🏼\": 0, \"👐🏽\": 0, \"👐🏾\": 0, \"👐🏿\": 0, \"👦🏻\": 0, \"👦🏼\": 0, \"👦🏽\": 0, \"👦🏾\": 0, \"👦🏿\": 0, \"👧🏻\": 0, \"👧🏼\": 0, \"👧🏽\": 0, \"👧🏾\": 0, \"👧🏿\": 0, \"👨🏻🌾\": 0, \"👨🏼🌾\": 0, \"👨🏽🌾\": 0, \"👨🏾🌾\": 0, \"👨🏿🌾\": 0, \"👨🏻🍳\": 0, \"👨🏼🍳\": 0, \"👨🏽🍳\": 0, \"👨🏾🍳\": 0, \"👨🏿🍳\": 0, \"👨🏻🎓\": 0, \"👨🏼🎓\": 0, \"👨🏽🎓\": 0, \"👨🏾🎓\": 0, \"👨🏿🎓\": 0, \"👨🏻🎤\": 0, \"👨🏼🎤\": 0, \"👨🏽🎤\": 0, \"👨🏾🎤\": 0, \"👨🏿🎤\": 0, \"👨🏻🎨\": 0, \"👨🏼🎨\": 0, \"👨🏽🎨\": 0, \"👨🏾🎨\": 0, \"👨🏿🎨\": 0, \"👨🏻🏫\": 0, \"👨🏼🏫\": 0, \"👨🏽🏫\": 0, \"👨🏾🏫\": 0, \"👨🏿🏫\": 0, \"👨🏻🏭\": 0, \"👨🏼🏭\": 0, \"👨🏽🏭\": 0, \"👨🏾🏭\": 0, \"👨🏿🏭\": 0, \"👨🏻💻\": 0, \"👨🏼💻\": 0, \"👨🏽💻\": 0, \"👨🏾💻\": 0, \"👨🏿💻\": 0, \"👨🏻💼\": 0, \"👨🏼💼\": 0, \"👨🏽💼\": 0, \"👨🏾💼\": 0, \"👨🏿💼\": 0, \"👨🏻🔧\": 0, \"👨🏼🔧\": 0, \"👨🏽🔧\": 0, \"👨🏾🔧\": 0, \"👨🏿🔧\": 0, \"👨🏻🔬\": 0, \"👨🏼🔬\": 0, \"👨🏽🔬\": 0, \"👨🏾🔬\": 0, \"👨🏿🔬\": 0, \"👨🏻🚀\": 0, \"👨🏼🚀\": 0, \"👨🏽🚀\": 0, \"👨🏾🚀\": 0, \"👨🏿🚀\": 0, \"👨🏻🚒\": 0, \"👨🏼🚒\": 0, \"👨🏽🚒\": 0, \"👨🏾🚒\": 0, \"👨🏿🚒\": 0, \"👨🏻🦯\": 0, \"👨🏼🦯\": 0, \"👨🏽🦯\": 0, \"👨🏾🦯\": 0, \"👨🏿🦯\": 0, \"👨🏻🦰\": 0, \"👨🏼🦰\": 0, \"👨🏽🦰\": 0, \"👨🏾🦰\": 0, \"👨🏿🦰\": 0, \"👨🏻🦱\": 0, \"👨🏼🦱\": 0, \"👨🏽🦱\": 0, \"👨🏾🦱\": 0, \"👨🏿🦱\": 0, \"👨🏻🦲\": 0, \"👨🏼🦲\": 0, \"👨🏽🦲\": 0, \"👨🏾🦲\": 0, \"👨🏿🦲\": 0, \"👨🏻🦳\": 0, \"👨🏼🦳\": 0, \"👨🏽🦳\": 0, \"👨🏾🦳\": 0, \"👨🏿🦳\": 0, \"👨🏻🦼\": 0, \"👨🏼🦼\": 0, \"👨🏽🦼\": 0, \"👨🏾🦼\": 0, \"👨🏿🦼\": 0, \"👨🏻🦽\": 0, \"👨🏼🦽\": 0, \"👨🏽🦽\": 0, \"👨🏾🦽\": 0, \"👨🏿🦽\": 0, \"👨🏻⚕\": 0, \"👨🏼⚕\": 0, \"👨🏽⚕\": 0, \"👨🏾⚕\": 0, \"👨🏿⚕\": 0, \"👨🏻⚖\": 0, \"👨🏼⚖\": 0, \"👨🏽⚖\": 0, \"👨🏾⚖\": 0, \"👨🏿⚖\": 0, \"👨🏻✈\": 0, \"👨🏼✈\": 0, \"👨🏽✈\": 0, \"👨🏾✈\": 0, \"👨🏿✈\": 0, \"👨🏻\": 0, \"👨🏼\": 0, \"👨🏽\": 0, \"👨🏾\": 0, \"👨🏿\": 0, \"👩🏻🌾\": 0, \"👩🏼🌾\": 0, \"👩🏽🌾\": 0, \"👩🏾🌾\": 0, \"👩🏿🌾\": 0, \"👩🏻🍳\": 0, \"👩🏼🍳\": 0, \"👩🏽🍳\": 0, \"👩🏾🍳\": 0, \"👩🏿🍳\": 0, \"👩🏻🎓\": 0, \"👩🏼🎓\": 0, \"👩🏽🎓\": 0, \"👩🏾🎓\": 0, \"👩🏿🎓\": 0, \"👩🏻🎤\": 0, \"👩🏼🎤\": 0, \"👩🏽🎤\": 0, \"👩🏾🎤\": 0, \"👩🏿🎤\": 0, \"👩🏻🎨\": 0, \"👩🏼🎨\": 0, \"👩🏽🎨\": 0, \"👩🏾🎨\": 0, \"👩🏿🎨\": 0, \"👩🏻🏫\": 0, \"👩🏼🏫\": 0, \"👩🏽🏫\": 0, \"👩🏾🏫\": 0, \"👩🏿🏫\": 0, \"👩🏻🏭\": 0, \"👩🏼🏭\": 0, \"👩🏽🏭\": 0, \"👩🏾🏭\": 0, \"👩🏿🏭\": 0, \"👩🏻💻\": 0, \"👩🏼💻\": 0, \"👩🏽💻\": 0, \"👩🏾💻\": 0, \"👩🏿💻\": 0, \"👩🏻💼\": 0, \"👩🏼💼\": 0, \"👩🏽💼\": 0, \"👩🏾💼\": 0, \"👩🏿💼\": 0, \"👩🏻🔧\": 0, \"👩🏼🔧\": 0, \"👩🏽🔧\": 0, \"👩🏾🔧\": 0, \"👩🏿🔧\": 0, \"👩🏻🔬\": 0, \"👩🏼🔬\": 0, \"👩🏽🔬\": 0, \"👩🏾🔬\": 0, \"👩🏿🔬\": 0, \"👩🏻🚀\": 0, \"👩🏼🚀\": 0, \"👩🏽🚀\": 0, \"👩🏾🚀\": 0, \"👩🏿🚀\": 0, \"👩🏻🚒\": 0, \"👩🏼🚒\": 0, \"👩🏽🚒\": 0, \"👩🏾🚒\": 0, \"👩🏿🚒\": 0, \"👩🏻🦯\": 0, \"👩🏼🦯\": 0, \"👩🏽🦯\": 0, \"👩🏾🦯\": 0, \"👩🏿🦯\": 0, \"👩🏻🦰\": 0, \"👩🏼🦰\": 0, \"👩🏽🦰\": 0, \"👩🏾🦰\": 0, \"👩🏿🦰\": 0, \"👩🏻🦱\": 0, \"👩🏼🦱\": 0, \"👩🏽🦱\": 0, \"👩🏾🦱\": 0, \"👩🏿🦱\": 0, \"👩🏻🦲\": 0, \"👩🏼🦲\": 0, \"👩🏽🦲\": 0, \"👩🏾🦲\": 0, \"👩🏿🦲\": 0, \"👩🏻🦳\": 0, \"👩🏼🦳\": 0, \"👩🏽🦳\": 0, \"👩🏾🦳\": 0, \"👩🏿🦳\": 0, \"👩🏻🦼\": 0, \"👩🏼🦼\": 0, \"👩🏽🦼\": 0, \"👩🏾🦼\": 0, \"👩🏿🦼\": 0, \"👩🏻🦽\": 0, \"👩🏼🦽\": 0, \"👩🏽🦽\": 0, \"👩🏾🦽\": 0, \"👩🏿🦽\": 0, \"👩🏻⚕\": 0, \"👩🏼⚕\": 0, \"👩🏽⚕\": 0, \"👩🏾⚕\": 0, \"👩🏿⚕\": 0, \"👩🏻⚖\": 0, \"👩🏼⚖\": 0, \"👩🏽⚖\": 0, \"👩🏾⚖\": 0, \"👩🏿⚖\": 0, \"👩🏻✈\": 0, \"👩🏼✈\": 0, \"👩🏽✈\": 0, \"👩🏾✈\": 0, \"👩🏿✈\": 0, \"👩🏻\": 0, \"👩🏼\": 0, \"👩🏽\": 0, \"👩🏾\": 0, \"👩🏿\": 0, \"👫🏻\": 0, \"👫🏼\": 0, \"👫🏽\": 0, \"👫🏾\": 0, \"👫🏿\": 0, \"👩🏻🤝👨🏼\": 0, \"👩🏻🤝👨🏽\": 0, \"👩🏻🤝👨🏾\": 0, \"👩🏻🤝👨🏿\": 0, \"👩🏼🤝👨🏻\": 0, \"👩🏼🤝👨🏽\": 0, \"👩🏼🤝👨🏾\": 0, \"👩🏼🤝👨🏿\": 0, \"👩🏽🤝👨🏻\": 0, \"👩🏽🤝👨🏼\": 0, \"👩🏽🤝👨🏾\": 0, \"👩🏽🤝👨🏿\": 0, \"👩🏾🤝👨🏻\": 0, \"👩🏾🤝👨🏼\": 0, \"👩🏾🤝👨🏽\": 0, \"👩🏾🤝👨🏿\": 0, \"👩🏿🤝👨🏻\": 0, \"👩🏿🤝👨🏼\": 0, \"👩🏿🤝👨🏽\": 0, \"👩🏿🤝👨🏾\": 0, \"👬🏻\": 0, \"👬🏼\": 0, \"👬🏽\": 0, \"👬🏾\": 0, \"👬🏿\": 0, \"👨🏻🤝👨🏼\": 0, \"👨🏻🤝👨🏽\": 0, \"👨🏻🤝👨🏾\": 0, \"👨🏻🤝👨🏿\": 0, \"👨🏼🤝👨🏻\": 0, \"👨🏼🤝👨🏽\": 0, \"👨🏼🤝👨🏾\": 0, \"👨🏼🤝👨🏿\": 0, \"👨🏽🤝👨🏻\": 0, \"👨🏽🤝👨🏼\": 0, \"👨🏽🤝👨🏾\": 0, \"👨🏽🤝👨🏿\": 0, \"👨🏾🤝👨🏻\": 0, \"👨🏾🤝👨🏼\": 0, \"👨🏾🤝👨🏽\": 0, \"👨🏾🤝👨🏿\": 0, \"👨🏿🤝👨🏻\": 0, \"👨🏿🤝👨🏼\": 0, \"👨🏿🤝👨🏽\": 0, \"👨🏿🤝👨🏾\": 0, \"👭🏻\": 0, \"👭🏼\": 0, \"👭🏽\": 0, \"👭🏾\": 0, \"👭🏿\": 0, \"👩🏻🤝👩🏼\": 0, \"👩🏻🤝👩🏽\": 0, \"👩🏻🤝👩🏾\": 0, \"👩🏻🤝👩🏿\": 0, \"👩🏼🤝👩🏻\": 0, \"👩🏼🤝👩🏽\": 0, \"👩🏼🤝👩🏾\": 0, \"👩🏼🤝👩🏿\": 0, \"👩🏽🤝👩🏻\": 0, \"👩🏽🤝👩🏼\": 0, \"👩🏽🤝👩🏾\": 0, \"👩🏽🤝👩🏿\": 0, \"👩🏾🤝👩🏻\": 0, \"👩🏾🤝👩🏼\": 0, \"👩🏾🤝👩🏽\": 0, \"👩🏾🤝👩🏿\": 0, \"👩🏿🤝👩🏻\": 0, \"👩🏿🤝👩🏼\": 0, \"👩🏿🤝👩🏽\": 0, \"👩🏿🤝👩🏾\": 0, \"👮🏻♀\": 0, \"👮🏼♀\": 0, \"👮🏽♀\": 0, \"👮🏾♀\": 0, \"👮🏿♀\": 0, \"👮🏻♂\": 0, \"👮🏼♂\": 0, \"👮🏽♂\": 0, \"👮🏾♂\": 0, \"👮🏿♂\": 0, \"👮🏻\": 0, \"👮🏼\": 0, \"👮🏽\": 0, \"👮🏾\": 0, \"👮🏿\": 0, \"👰🏻\": 0, \"👰🏼\": 0, \"👰🏽\": 0, \"👰🏾\": 0, \"👰🏿\": 0, \"👱🏻♀\": 0, \"👱🏼♀\": 0, \"👱🏽♀\": 0, \"👱🏾♀\": 0, \"👱🏿♀\": 0, \"👱🏻♂\": 0, \"👱🏼♂\": 0, \"👱🏽♂\": 0, \"👱🏾♂\": 0, \"👱🏿♂\": 0, \"👱🏻\": 0, \"👱🏼\": 0, \"👱🏽\": 0, \"👱🏾\": 0, \"👱🏿\": 0, \"👲🏻\": 0, \"👲🏼\": 0, \"👲🏽\": 0, \"👲🏾\": 0, \"👲🏿\": 0, \"👳🏻♀\": 0, \"👳🏼♀\": 0, \"👳🏽♀\": 0, \"👳🏾♀\": 0, \"👳🏿♀\": 0, \"👳🏻♂\": 0, \"👳🏼♂\": 0, \"👳🏽♂\": 0, \"👳🏾♂\": 0, \"👳🏿♂\": 0, \"👳🏻\": 0, \"👳🏼\": 0, \"👳🏽\": 0, \"👳🏾\": 0, \"👳🏿\": 0, \"👴🏻\": 0, \"👴🏼\": 0, \"👴🏽\": 0, \"👴🏾\": 0, \"👴🏿\": 0, \"👵🏻\": 0, \"👵🏼\": 0, \"👵🏽\": 0, \"👵🏾\": 0, \"👵🏿\": 0, \"👶🏻\": 0, \"👶🏼\": 0, \"👶🏽\": 0, \"👶🏾\": 0, \"👶🏿\": 0, \"👷🏻♀\": 0, \"👷🏼♀\": 0, \"👷🏽♀\": 0, \"👷🏾♀\": 0, \"👷🏿♀\": 0, \"👷🏻♂\": 0, \"👷🏼♂\": 0, \"👷🏽♂\": 0, \"👷🏾♂\": 0, \"👷🏿♂\": 0, \"👷🏻\": 0, \"👷🏼\": 0, \"👷🏽\": 0, \"👷🏾\": 0, \"👷🏿\": 0, \"👸🏻\": 0, \"👸🏼\": 0, \"👸🏽\": 0, \"👸🏾\": 0, \"👸🏿\": 0, \"👼🏻\": 0, \"👼🏼\": 0, \"👼🏽\": 0, \"👼🏾\": 0, \"👼🏿\": 0, \"💁🏻♀\": 0, \"💁🏼♀\": 0, \"💁🏽♀\": 0, \"💁🏾♀\": 0, \"💁🏿♀\": 0, \"💁🏻♂\": 0, \"💁🏼♂\": 0, \"💁🏽♂\": 0, \"💁🏾♂\": 0, \"💁🏿♂\": 0, \"💁🏻\": 0, \"💁🏼\": 0, \"💁🏽\": 0, \"💁🏾\": 0, \"💁🏿\": 0, \"💂🏻♀\": 0, \"💂🏼♀\": 0, \"💂🏽♀\": 0, \"💂🏾♀\": 0, \"💂🏿♀\": 0, \"💂🏻♂\": 0, \"💂🏼♂\": 0, \"💂🏽♂\": 0, \"💂🏾♂\": 0, \"💂🏿♂\": 0, \"💂🏻\": 0, \"💂🏼\": 0, \"💂🏽\": 0, \"💂🏾\": 0, \"💂🏿\": 0, \"💃🏻\": 0, \"💃🏼\": 0, \"💃🏽\": 0, \"💃🏾\": 0, \"💃🏿\": 0, \"💅🏻\": 0, \"💅🏼\": 0, \"💅🏽\": 0, \"💅🏾\": 0, \"💅🏿\": 0, \"💆🏻♀\": 0, \"💆🏼♀\": 0, \"💆🏽♀\": 0, \"💆🏾♀\": 0, \"💆🏿♀\": 0, \"💆🏻♂\": 0, \"💆🏼♂\": 0, \"💆🏽♂\": 0, \"💆🏾♂\": 0, \"💆🏿♂\": 0, \"💆🏻\": 0, \"💆🏼\": 0, \"💆🏽\": 0, \"💆🏾\": 0, \"💆🏿\": 0, \"💇🏻♀\": 0, \"💇🏼♀\": 0, \"💇🏽♀\": 0, \"💇🏾♀\": 0, \"💇🏿♀\": 0, \"💇🏻♂\": 0, \"💇🏼♂\": 0, \"💇🏽♂\": 0, \"💇🏾♂\": 0, \"💇🏿♂\": 0, \"💇🏻\": 0, \"💇🏼\": 0, \"💇🏽\": 0, \"💇🏾\": 0, \"💇🏿\": 0, \"💪🏻\": 0, \"💪🏼\": 0, \"💪🏽\": 0, \"💪🏾\": 0, \"💪🏿\": 0, \"🕴🏻\": 0, \"🕴🏼\": 0, \"🕴🏽\": 0, \"🕴🏾\": 0, \"🕴🏿\": 0, \"🕵🏻♀\": 0, \"🕵🏼♀\": 0, \"🕵🏽♀\": 0, \"🕵🏾♀\": 0, \"🕵🏿♀\": 0, \"🕵🏻♂\": 0, \"🕵🏼♂\": 0, \"🕵🏽♂\": 0, \"🕵🏾♂\": 0, \"🕵🏿♂\": 0, \"🕵🏻\": 0, \"🕵🏼\": 0, \"🕵🏽\": 0, \"🕵🏾\": 0, \"🕵🏿\": 0, \"🕺🏻\": 0, \"🕺🏼\": 0, \"🕺🏽\": 0, \"🕺🏾\": 0, \"🕺🏿\": 0, \"🖐🏻\": 0, \"🖐🏼\": 0, \"🖐🏽\": 0, \"🖐🏾\": 0, \"🖐🏿\": 0, \"🖕🏻\": 0, \"🖕🏼\": 0, \"🖕🏽\": 0, \"🖕🏾\": 0, \"🖕🏿\": 0, \"🖖🏻\": 0, \"🖖🏼\": 0, \"🖖🏽\": 0, \"🖖🏾\": 0, \"🖖🏿\": 0, \"🙅🏻♀\": 0, \"🙅🏼♀\": 0, \"🙅🏽♀\": 0, \"🙅🏾♀\": 0, \"🙅🏿♀\": 0, \"🙅🏻♂\": 0, \"🙅🏼♂\": 0, \"🙅🏽♂\": 0, \"🙅🏾♂\": 0, \"🙅🏿♂\": 0, \"🙅🏻\": 0, \"🙅🏼\": 0, \"🙅🏽\": 0, \"🙅🏾\": 0, \"🙅🏿\": 0, \"🙆🏻♀\": 0, \"🙆🏼♀\": 0, \"🙆🏽♀\": 0, \"🙆🏾♀\": 0, \"🙆🏿♀\": 0, \"🙆🏻♂\": 0, \"🙆🏼♂\": 0, \"🙆🏽♂\": 0, \"🙆🏾♂\": 0, \"🙆🏿♂\": 0, \"🙆🏻\": 0, \"🙆🏼\": 0, \"🙆🏽\": 0, \"🙆🏾\": 0, \"🙆🏿\": 0, \"🙇🏻♀\": 0, \"🙇🏼♀\": 0, \"🙇🏽♀\": 0, \"🙇🏾♀\": 0, \"🙇🏿♀\": 0, \"🙇🏻♂\": 0, \"🙇🏼♂\": 0, \"🙇🏽♂\": 0, \"🙇🏾♂\": 0, \"🙇🏿♂\": 0, \"🙇🏻\": 0, \"🙇🏼\": 0, \"🙇🏽\": 0, \"🙇🏾\": 0, \"🙇🏿\": 0, \"🙋🏻♀\": 0, \"🙋🏼♀\": 0, \"🙋🏽♀\": 0, \"🙋🏾♀\": 0, \"🙋🏿♀\": 0, \"🙋🏻♂\": 0, \"🙋🏼♂\": 0, \"🙋🏽♂\": 0, \"🙋🏾♂\": 0, \"🙋🏿♂\": 0, \"🙋🏻\": 0, \"🙋🏼\": 0, \"🙋🏽\": 0, \"🙋🏾\": 0, \"🙋🏿\": 0, \"🙌🏻\": 0, \"🙌🏼\": 0, \"🙌🏽\": 0, \"🙌🏾\": 0, \"🙌🏿\": 0, \"🙍🏻♀\": 0, \"🙍🏼♀\": 0, \"🙍🏽♀\": 0, \"🙍🏾♀\": 0, \"🙍🏿♀\": 0, \"🙍🏻♂\": 0, \"🙍🏼♂\": 0, \"🙍🏽♂\": 0, \"🙍🏾♂\": 0, \"🙍🏿♂\": 0, \"🙍🏻\": 0, \"🙍🏼\": 0, \"🙍🏽\": 0, \"🙍🏾\": 0, \"🙍🏿\": 0, \"🙎🏻♀\": 0, \"🙎🏼♀\": 0, \"🙎🏽♀\": 0, \"🙎🏾♀\": 0, \"🙎🏿♀\": 0, \"🙎🏻♂\": 0, \"🙎🏼♂\": 0, \"🙎🏽♂\": 0, \"🙎🏾♂\": 0, \"🙎🏿♂\": 0, \"🙎🏻\": 0, \"🙎🏼\": 0, \"🙎🏽\": 0, \"🙎🏾\": 0, \"🙎🏿\": 0, \"🙏🏻\": 0, \"🙏🏼\": 0, \"🙏🏽\": 0, \"🙏🏾\": 0, \"🙏🏿\": 0, \"🚣🏻♀\": 0, \"🚣🏼♀\": 0, \"🚣🏽♀\": 0, \"🚣🏾♀\": 0, \"🚣🏿♀\": 0, \"🚣🏻♂\": 0, \"🚣🏼♂\": 0, \"🚣🏽♂\": 0, \"🚣🏾♂\": 0, \"🚣🏿♂\": 0, \"🚣🏻\": 0, \"🚣🏼\": 0, \"🚣🏽\": 0, \"🚣🏾\": 0, \"🚣🏿\": 0, \"🚴🏻♀\": 0, \"🚴🏼♀\": 0, \"🚴🏽♀\": 0, \"🚴🏾♀\": 0, \"🚴🏿♀\": 0, \"🚴🏻♂\": 0, \"🚴🏼♂\": 0, \"🚴🏽♂\": 0, \"🚴🏾♂\": 0, \"🚴🏿♂\": 0, \"🚴🏻\": 0, \"🚴🏼\": 0, \"🚴🏽\": 0, \"🚴🏾\": 0, \"🚴🏿\": 0, \"🚵🏻♀\": 0, \"🚵🏼♀\": 0, \"🚵🏽♀\": 0, \"🚵🏾♀\": 0, \"🚵🏿♀\": 0, \"🚵🏻♂\": 0, \"🚵🏼♂\": 0, \"🚵🏽♂\": 0, \"🚵🏾♂\": 0, \"🚵🏿♂\": 0, \"🚵🏻\": 0, \"🚵🏼\": 0, \"🚵🏽\": 0, \"🚵🏾\": 0, \"🚵🏿\": 0, \"🚶🏻♀\": 0, \"🚶🏼♀\": 0, \"🚶🏽♀\": 0, \"🚶🏾♀\": 0, \"🚶🏿♀\": 0, \"🚶🏻♂\": 0, \"🚶🏼♂\": 0, \"🚶🏽♂\": 0, \"🚶🏾♂\": 0, \"🚶🏿♂\": 0, \"🚶🏻\": 0, \"🚶🏼\": 0, \"🚶🏽\": 0, \"🚶🏾\": 0, \"🚶🏿\": 0, \"🛀🏻\": 0, \"🛀🏼\": 0, \"🛀🏽\": 0, \"🛀🏾\": 0, \"🛀🏿\": 0, \"🛌🏻\": 0, \"🛌🏼\": 0, \"🛌🏽\": 0, \"🛌🏾\": 0, \"🛌🏿\": 0, \"🤏🏻\": 0, \"🤏🏼\": 0, \"🤏🏽\": 0, \"🤏🏾\": 0, \"🤏🏿\": 0, \"🤘🏻\": 0, \"🤘🏼\": 0, \"🤘🏽\": 0, \"🤘🏾\": 0, \"🤘🏿\": 0, \"🤙🏻\": 0, \"🤙🏼\": 0, \"🤙🏽\": 0, \"🤙🏾\": 0, \"🤙🏿\": 0, \"🤚🏻\": 0, \"🤚🏼\": 0, \"🤚🏽\": 0, \"🤚🏾\": 0, \"🤚🏿\": 0, \"🤛🏻\": 0, \"🤛🏼\": 0, \"🤛🏽\": 0, \"🤛🏾\": 0, \"🤛🏿\": 0, \"🤜🏻\": 0, \"🤜🏼\": 0, \"🤜🏽\": 0, \"🤜🏾\": 0, \"🤜🏿\": 0, \"🤞🏻\": 0, \"🤞🏼\": 0, \"🤞🏽\": 0, \"🤞🏾\": 0, \"🤞🏿\": 0, \"🤟🏻\": 0, \"🤟🏼\": 0, \"🤟🏽\": 0, \"🤟🏾\": 0, \"🤟🏿\": 0, \"🤦🏻♀\": 0, \"🤦🏼♀\": 0, \"🤦🏽♀\": 0, \"🤦🏾♀\": 0, \"🤦🏿♀\": 0, \"🤦🏻♂\": 0, \"🤦🏼♂\": 0, \"🤦🏽♂\": 0, \"🤦🏾♂\": 0, \"🤦🏿♂\": 0, \"🤦🏻\": 0, \"🤦🏼\": 0, \"🤦🏽\": 0, \"🤦🏾\": 0, \"🤦🏿\": 0, \"🤰🏻\": 0, \"🤰🏼\": 0, \"🤰🏽\": 0, \"🤰🏾\": 0, \"🤰🏿\": 0, \"🤱🏻\": 0, \"🤱🏼\": 0, \"🤱🏽\": 0, \"🤱🏾\": 0, \"🤱🏿\": 0, \"🤲🏻\": 0, \"🤲🏼\": 0, \"🤲🏽\": 0, \"🤲🏾\": 0, \"🤲🏿\": 0, \"🤳🏻\": 0, \"🤳🏼\": 0, \"🤳🏽\": 0, \"🤳🏾\": 0, \"🤳🏿\": 0, \"🤴🏻\": 0, \"🤴🏼\": 0, \"🤴🏽\": 0, \"🤴🏾\": 0, \"🤴🏿\": 0, \"🤵🏻\": 0, \"🤵🏼\": 0, \"🤵🏽\": 0, \"🤵🏾\": 0, \"🤵🏿\": 0, \"🤶🏻\": 0, \"🤶🏼\": 0, \"🤶🏽\": 0, \"🤶🏾\": 0, \"🤶🏿\": 0, \"🤷🏻♀\": 0, \"🤷🏼♀\": 0, \"🤷🏽♀\": 0, \"🤷🏾♀\": 0, \"🤷🏿♀\": 0, \"🤷🏻♂\": 0, \"🤷🏼♂\": 0, \"🤷🏽♂\": 0, \"🤷🏾♂\": 0, \"🤷🏿♂\": 0, \"🤷🏻\": 0, \"🤷🏼\": 0, \"🤷🏽\": 0, \"🤷🏾\": 0, \"🤷🏿\": 0, \"🤸🏻♀\": 0, \"🤸🏼♀\": 0, \"🤸🏽♀\": 0, \"🤸🏾♀\": 0, \"🤸🏿♀\": 0, \"🤸🏻♂\": 0, \"🤸🏼♂\": 0, \"🤸🏽♂\": 0, \"🤸🏾♂\": 0, \"🤸🏿♂\": 0, \"🤸🏻\": 0, \"🤸🏼\": 0, \"🤸🏽\": 0, \"🤸🏾\": 0, \"🤸🏿\": 0, \"🤹🏻♀\": 0, \"🤹🏼♀\": 0, \"🤹🏽♀\": 0, \"🤹🏾♀\": 0, \"🤹🏿♀\": 0, \"🤹🏻♂\": 0, \"🤹🏼♂\": 0, \"🤹🏽♂\": 0, \"🤹🏾♂\": 0, \"🤹🏿♂\": 0, \"🤹🏻\": 0, \"🤹🏼\": 0, \"🤹🏽\": 0, \"🤹🏾\": 0, \"🤹🏿\": 0, \"🤽🏻♀\": 0, \"🤽🏼♀\": 0, \"🤽🏽♀\": 0, \"🤽🏾♀\": 0, \"🤽🏿♀\": 0, \"🤽🏻♂\": 0, \"🤽🏼♂\": 0, \"🤽🏽♂\": 0, \"🤽🏾♂\": 0, \"🤽🏿♂\": 0, \"🤽🏻\": 0, \"🤽🏼\": 0, \"🤽🏽\": 0, \"🤽🏾\": 0, \"🤽🏿\": 0, \"🤾🏻♀\": 0, \"🤾🏼♀\": 0, \"🤾🏽♀\": 0, \"🤾🏾♀\": 0, \"🤾🏿♀\": 0, \"🤾🏻♂\": 0, \"🤾🏼♂\": 0, \"🤾🏽♂\": 0, \"🤾🏾♂\": 0, \"🤾🏿♂\": 0, \"🤾🏻\": 0, \"🤾🏼\": 0, \"🤾🏽\": 0, \"🤾🏾\": 0, \"🤾🏿\": 0, \"🦵🏻\": 0, \"🦵🏼\": 0, \"🦵🏽\": 0, \"🦵🏾\": 0, \"🦵🏿\": 0, \"🦶🏻\": 0, \"🦶🏼\": 0, \"🦶🏽\": 0, \"🦶🏾\": 0, \"🦶🏿\": 0, \"🦸🏻♀\": 0, \"🦸🏼♀\": 0, \"🦸🏽♀\": 0, \"🦸🏾♀\": 0, \"🦸🏿♀\": 0, \"🦸🏻♂\": 0, \"🦸🏼♂\": 0, \"🦸🏽♂\": 0, \"🦸🏾♂\": 0, \"🦸🏿♂\": 0, \"🦸🏻\": 0, \"🦸🏼\": 0, \"🦸🏽\": 0, \"🦸🏾\": 0, \"🦸🏿\": 0, \"🦹🏻♀\": 0, \"🦹🏼♀\": 0, \"🦹🏽♀\": 0, \"🦹🏾♀\": 0, \"🦹🏿♀\": 0, \"🦹🏻♂\": 0, \"🦹🏼♂\": 0, \"🦹🏽♂\": 0, \"🦹🏾♂\": 0, \"🦹🏿♂\": 0, \"🦹🏻\": 0, \"🦹🏼\": 0, \"🦹🏽\": 0, \"🦹🏾\": 0, \"🦹🏿\": 0, \"🦻🏻\": 0, \"🦻🏼\": 0, \"🦻🏽\": 0, \"🦻🏾\": 0, \"🦻🏿\": 0, \"🧍🏻♀\": 0, \"🧍🏼♀\": 0, \"🧍🏽♀\": 0, \"🧍🏾♀\": 0, \"🧍🏿♀\": 0, \"🧍🏻♂\": 0, \"🧍🏼♂\": 0, \"🧍🏽♂\": 0, \"🧍🏾♂\": 0, \"🧍🏿♂\": 0, \"🧍🏻\": 0, \"🧍🏼\": 0, \"🧍🏽\": 0, \"🧍🏾\": 0, \"🧍🏿\": 0, \"🧎🏻♀\": 0, \"🧎🏼♀\": 0, \"🧎🏽♀\": 0, \"🧎🏾♀\": 0, \"🧎🏿♀\": 0, \"🧎🏻♂\": 0, \"🧎🏼♂\": 0, \"🧎🏽♂\": 0, \"🧎🏾♂\": 0, \"🧎🏿♂\": 0, \"🧎🏻\": 0, \"🧎🏼\": 0, \"🧎🏽\": 0, \"🧎🏾\": 0, \"🧎🏿\": 0, \"🧏🏻♀\": 0, \"🧏🏼♀\": 0, \"🧏🏽♀\": 0, \"🧏🏾♀\": 0, \"🧏🏿♀\": 0, \"🧏🏻♂\": 0, \"🧏🏼♂\": 0, \"🧏🏽♂\": 0, \"🧏🏾♂\": 0, \"🧏🏿♂\": 0, \"🧏🏻\": 0, \"🧏🏼\": 0, \"🧏🏽\": 0, \"🧏🏾\": 0, \"🧏🏿\": 0, \"🧑🏻🌾\": 0, \"🧑🏼🌾\": 0, \"🧑🏽🌾\": 0, \"🧑🏾🌾\": 0, \"🧑🏿🌾\": 0, \"🧑🏻🍳\": 0, \"🧑🏼🍳\": 0, \"🧑🏽🍳\": 0, \"🧑🏾🍳\": 0, \"🧑🏿🍳\": 0, \"🧑🏻🎓\": 0, \"🧑🏼🎓\": 0, \"🧑🏽🎓\": 0, \"🧑🏾🎓\": 0, \"🧑🏿🎓\": 0, \"🧑🏻🎤\": 0, \"🧑🏼🎤\": 0, \"🧑🏽🎤\": 0, \"🧑🏾🎤\": 0, \"🧑🏿🎤\": 0, \"🧑🏻🎨\": 0, \"🧑🏼🎨\": 0, \"🧑🏽🎨\": 0, \"🧑🏾🎨\": 0, \"🧑🏿🎨\": 0, \"🧑🏻🏫\": 0, \"🧑🏼🏫\": 0, \"🧑🏽🏫\": 0, \"🧑🏾🏫\": 0, \"🧑🏿🏫\": 0, \"🧑🏻🏭\": 0, \"🧑🏼🏭\": 0, \"🧑🏽🏭\": 0, \"🧑🏾🏭\": 0, \"🧑🏿🏭\": 0, \"🧑🏻💻\": 0, \"🧑🏼💻\": 0, \"🧑🏽💻\": 0, \"🧑🏾💻\": 0, \"🧑🏿💻\": 0, \"🧑🏻💼\": 0, \"🧑🏼💼\": 0, \"🧑🏽💼\": 0, \"🧑🏾💼\": 0, \"🧑🏿💼\": 0, \"🧑🏻🔧\": 0, \"🧑🏼🔧\": 0, \"🧑🏽🔧\": 0, \"🧑🏾🔧\": 0, \"🧑🏿🔧\": 0, \"🧑🏻🔬\": 0, \"🧑🏼🔬\": 0, \"🧑🏽🔬\": 0, \"🧑🏾🔬\": 0, \"🧑🏿🔬\": 0, \"🧑🏻🚀\": 0, \"🧑🏼🚀\": 0, \"🧑🏽🚀\": 0, \"🧑🏾🚀\": 0, \"🧑🏿🚀\": 0, \"🧑🏻🚒\": 0, \"🧑🏼🚒\": 0, \"🧑🏽🚒\": 0, \"🧑🏾🚒\": 0, \"🧑🏿🚒\": 0, \"🧑🏻🤝🧑🏻\": 0, \"🧑🏻🤝🧑🏼\": 0, \"🧑🏻🤝🧑🏽\": 0, \"🧑🏻🤝🧑🏾\": 0, \"🧑🏻🤝🧑🏿\": 0, \"🧑🏼🤝🧑🏻\": 0, \"🧑🏼🤝🧑🏼\": 0, \"🧑🏼🤝🧑🏽\": 0, \"🧑🏼🤝🧑🏾\": 0, \"🧑🏼🤝🧑🏿\": 0, \"🧑🏽🤝🧑🏻\": 0, \"🧑🏽🤝🧑🏼\": 0, \"🧑🏽🤝🧑🏽\": 0, \"🧑🏽🤝🧑🏾\": 0, \"🧑🏽🤝🧑🏿\": 0, \"🧑🏾🤝🧑🏻\": 0, \"🧑🏾🤝🧑🏼\": 0, \"🧑🏾🤝🧑🏽\": 0, \"🧑🏾🤝🧑🏾\": 0, \"🧑🏾🤝🧑🏿\": 0, \"🧑🏿🤝🧑🏻\": 0, \"🧑🏿🤝🧑🏼\": 0, \"🧑🏿🤝🧑🏽\": 0, \"🧑🏿🤝🧑🏾\": 0, \"🧑🏿🤝🧑🏿\": 0, \"🧑🏻🦯\": 0, \"🧑🏼🦯\": 0, \"🧑🏽🦯\": 0, \"🧑🏾🦯\": 0, \"🧑🏿🦯\": 0, \"🧑🏻🦰\": 0, \"🧑🏼🦰\": 0, \"🧑🏽🦰\": 0, \"🧑🏾🦰\": 0, \"🧑🏿🦰\": 0, \"🧑🏻🦱\": 0, \"🧑🏼🦱\": 0, \"🧑🏽🦱\": 0, \"🧑🏾🦱\": 0, \"🧑🏿🦱\": 0, \"🧑🏻🦲\": 0, \"🧑🏼🦲\": 0, \"🧑🏽🦲\": 0, \"🧑🏾🦲\": 0, \"🧑🏿🦲\": 0, \"🧑🏻🦳\": 0, \"🧑🏼🦳\": 0, \"🧑🏽🦳\": 0, \"🧑🏾🦳\": 0, \"🧑🏿🦳\": 0, \"🧑🏻🦼\": 0, \"🧑🏼🦼\": 0, \"🧑🏽🦼\": 0, \"🧑🏾🦼\": 0, \"🧑🏿🦼\": 0, \"🧑🏻🦽\": 0, \"🧑🏼🦽\": 0, \"🧑🏽🦽\": 0, \"🧑🏾🦽\": 0, \"🧑🏿🦽\": 0, \"🧑🏻⚕\": 0, \"🧑🏼⚕\": 0, \"🧑🏽⚕\": 0, \"🧑🏾⚕\": 0, \"🧑🏿⚕\": 0, \"🧑🏻⚖\": 0, \"🧑🏼⚖\": 0, \"🧑🏽⚖\": 0, \"🧑🏾⚖\": 0, \"🧑🏿⚖\": 0, \"🧑🏻✈\": 0, \"🧑🏼✈\": 0, \"🧑🏽✈\": 0, \"🧑🏾✈\": 0, \"🧑🏿✈\": 0, \"🧑🏻\": 0, \"🧑🏼\": 0, \"🧑🏽\": 0, \"🧑🏾\": 0, \"🧑🏿\": 0, \"🧒🏻\": 0, \"🧒🏼\": 0, \"🧒🏽\": 0, \"🧒🏾\": 0, \"🧒🏿\": 0, \"🧓🏻\": 0, \"🧓🏼\": 0, \"🧓🏽\": 0, \"🧓🏾\": 0, \"🧓🏿\": 0, \"🧔🏻\": 0, \"🧔🏼\": 0, \"🧔🏽\": 0, \"🧔🏾\": 0, \"🧔🏿\": 0, \"🧕🏻\": 0, \"🧕🏼\": 0, \"🧕🏽\": 0, \"🧕🏾\": 0, \"🧕🏿\": 0, \"🧖🏻♀\": 0, \"🧖🏼♀\": 0, \"🧖🏽♀\": 0, \"🧖🏾♀\": 0, \"🧖🏿♀\": 0, \"🧖🏻♂\": 0, \"🧖🏼♂\": 0, \"🧖🏽♂\": 0, \"🧖🏾♂\": 0, \"🧖🏿♂\": 0, \"🧖🏻\": 0, \"🧖🏼\": 0, \"🧖🏽\": 0, \"🧖🏾\": 0, \"🧖🏿\": 0, \"🧗🏻♀\": 0, \"🧗🏼♀\": 0, \"🧗🏽♀\": 0, \"🧗🏾♀\": 0, \"🧗🏿♀\": 0, \"🧗🏻♂\": 0, \"🧗🏼♂\": 0, \"🧗🏽♂\": 0, \"🧗🏾♂\": 0, \"🧗🏿♂\": 0, \"🧗🏻\": 0, \"🧗🏼\": 0, \"🧗🏽\": 0, \"🧗🏾\": 0, \"🧗🏿\": 0, \"🧘🏻♀\": 0, \"🧘🏼♀\": 0, \"🧘🏽♀\": 0, \"🧘🏾♀\": 0, \"🧘🏿♀\": 0, \"🧘🏻♂\": 0, \"🧘🏼♂\": 0, \"🧘🏽♂\": 0, \"🧘🏾♂\": 0, \"🧘🏿♂\": 0, \"🧘🏻\": 0, \"🧘🏼\": 0, \"🧘🏽\": 0, \"🧘🏾\": 0, \"🧘🏿\": 0, \"🧙🏻♀\": 0, \"🧙🏼♀\": 0, \"🧙🏽♀\": 0, \"🧙🏾♀\": 0, \"🧙🏿♀\": 0, \"🧙🏻♂\": 0, \"🧙🏼♂\": 0, \"🧙🏽♂\": 0, \"🧙🏾♂\": 0, \"🧙🏿♂\": 0, \"🧙🏻\": 0, \"🧙🏼\": 0, \"🧙🏽\": 0, \"🧙🏾\": 0, \"🧙🏿\": 0, \"🧚🏻♀\": 0, \"🧚🏼♀\": 0, \"🧚🏽♀\": 0, \"🧚🏾♀\": 0, \"🧚🏿♀\": 0, \"🧚🏻♂\": 0, \"🧚🏼♂\": 0, \"🧚🏽♂\": 0, \"🧚🏾♂\": 0, \"🧚🏿♂\": 0, \"🧚🏻\": 0, \"🧚🏼\": 0, \"🧚🏽\": 0, \"🧚🏾\": 0, \"🧚🏿\": 0, \"🧛🏻♀\": 0, \"🧛🏼♀\": 0, \"🧛🏽♀\": 0, \"🧛🏾♀\": 0, \"🧛🏿♀\": 0, \"🧛🏻♂\": 0, \"🧛🏼♂\": 0, \"🧛🏽♂\": 0, \"🧛🏾♂\": 0, \"🧛🏿♂\": 0, \"🧛🏻\": 0, \"🧛🏼\": 0, \"🧛🏽\": 0, \"🧛🏾\": 0, \"🧛🏿\": 0, \"🧜🏻♀\": 0, \"🧜🏼♀\": 0, \"🧜🏽♀\": 0, \"🧜🏾♀\": 0, \"🧜🏿♀\": 0, \"🧜🏻♂\": 0, \"🧜🏼♂\": 0, \"🧜🏽♂\": 0, \"🧜🏾♂\": 0, \"🧜🏿♂\": 0, \"🧜🏻\": 0, \"🧜🏼\": 0, \"🧜🏽\": 0, \"🧜🏾\": 0, \"🧜🏿\": 0, \"🧝🏻♀\": 0, \"🧝🏼♀\": 0, \"🧝🏽♀\": 0, \"🧝🏾♀\": 0, \"🧝🏿♀\": 0, \"🧝🏻♂\": 0, \"🧝🏼♂\": 0, \"🧝🏽♂\": 0, \"🧝🏾♂\": 0, \"🧝🏿♂\": 0, \"🧝🏻\": 0, \"🧝🏼\": 0, \"🧝🏽\": 0, \"🧝🏾\": 0, \"🧝🏿\": 0, \"☝🏻\": 0, \"☝🏼\": 0, \"☝🏽\": 0, \"☝🏾\": 0, \"☝🏿\": 0, \"⛹🏻♀\": 0, \"⛹🏼♀\": 0, \"⛹🏽♀\": 0, \"⛹🏾♀\": 0, \"⛹🏿♀\": 0, \"⛹🏻♂\": 0, \"⛹🏼♂\": 0, \"⛹🏽♂\": 0, \"⛹🏾♂\": 0, \"⛹🏿♂\": 0, \"⛹🏻\": 0, \"⛹🏼\": 0, \"⛹🏽\": 0, \"⛹🏾\": 0, \"⛹🏿\": 0, \"✊🏻\": 0, \"✊🏼\": 0, \"✊🏽\": 0, \"✊🏾\": 0, \"✊🏿\": 0, \"✋🏻\": 0, \"✋🏼\": 0, \"✋🏽\": 0, \"✋🏾\": 0, \"✋🏿\": 0, \"✌🏻\": 0, \"✌🏼\": 0, \"✌🏽\": 0, \"✌🏾\": 0, \"✌🏿\": 0, \"✍🏻\": 0, \"✍🏼\": 0, \"✍🏽\": 0, \"✍🏾\": 0, \"✍🏿\": 0 };\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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\page.ts",
"name": "./src/pages/page.ts",
"index": 22,
"index2": 19,
"size": 1928,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 22,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"module": "./src/pages/pageIm.ts",
"moduleName": "./src/pages/pageIm.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "27:31-48"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "15:31-48"
},
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"module": "./src/pages/pagePassword.ts",
"moduleName": "./src/pages/pagePassword.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "13:31-48"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "14:31-48"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "10:31-48"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "36:31-48"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"name": "./src/lib/appManagers/apiUpdatesManager.ts",
"index": 31,
"index2": 24,
"size": 20810,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "23:44-74"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "20:44-74"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "23:44-74"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "23:44-74"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/apiUpdatesManager",
"loc": "11:44-86"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "10:44-74"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.ApiUpdatesManager = void 0;\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.attached = false;\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 ? utils_1.$rootScope.myID : updateMessage.user_id);\r\n var toID = updateMessage.chat_id\r\n ? -updateMessage.chat_id\r\n : (isOut ? updateMessage.user_id : utils_1.$rootScope.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 const 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 return 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 const 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(state) {\r\n if (this.attached)\r\n return;\r\n this.attached = true;\r\n mtprotoworker_1.default.setUpdatesProcessor(this.processUpdateMessage.bind(this));\r\n if (!state || !state.pts || !state.date || !state.seq) {\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 else {\r\n Object.assign(this.updatesState, state);\r\n this.getDifference();\r\n }\r\n }\r\n}\r\nexports.ApiUpdatesManager = ApiUpdatesManager;\r\nexports.default = new ApiUpdatesManager();\r\n"
},
{
"id": 20,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"name": "./src/lib/mtproto/apiFileManager.ts",
"index": 37,
"index2": 29,
"size": 22578,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/apiFileManager",
"loc": "28:41-77"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/apiFileManager",
"loc": "11:41-77"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/apiFileManager",
"loc": "15:41-77"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/apiFileManager",
"loc": "27:41-77"
},
{
"moduleId": 37,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "18:41-77"
},
{
"moduleId": 48,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"module": "./src/components/popupAvatar.ts",
"moduleName": "./src/components/popupAvatar.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/apiFileManager",
"loc": "8:41-81"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.ApiFileManager = void 0;\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\nconst appWebpManager_1 = __importDefault(require(\"../appManagers/appWebpManager\"));\r\nclass ApiFileManager {\r\n constructor() {\r\n this.cachedSavePromises = {};\r\n this.cachedDownloadPromises = {};\r\n this.cachedDownloads = {};\r\n /* public indexedKeys: Set<string> = new Set();\r\n private keysLoaded = false; */\r\n this.downloadPulls = {};\r\n this.downloadActives = {};\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 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 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, options) {\r\n switch (location._) {\r\n case 'inputDocumentFileLocation': {\r\n let fileName = (location.file_name || '').split('.');\r\n let ext = fileName[fileName.length - 1] || '';\r\n if ((options === null || options === void 0 ? void 0 : options.stickerType) == 1 && !appWebpManager_1.default.isSupported()) {\r\n ext += '.png';\r\n }\r\n let thumbPart = location.thumb_size ? '_' + location.thumb_size : '';\r\n return (fileName[0] ? fileName[0] + '_' : '') + location.id + thumbPart + (ext ? '.' + ext : ext);\r\n }\r\n default: {\r\n if (!location.volume_id && !location.file_reference) {\r\n this.log.trace('Empty location', location);\r\n }\r\n let ext = 'jpg';\r\n if ((options === null || options === void 0 ? void 0 : options.stickerType) == 1 && !appWebpManager_1.default.isSupported()) {\r\n ext += '.png';\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 }\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 processSticker = false;\r\n if (options.stickerType == 1 && !appWebpManager_1.default.isSupported()) {\r\n processSticker = true;\r\n options.mimeType = 'image/png';\r\n }\r\n let dcID = options.dcID || location.dc_id;\r\n let mimeType = options.mimeType || 'image/jpeg';\r\n let fileName = this.getFileName(location, options);\r\n let 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 let fileStorage = this.getFileStorage();\r\n return this.cachedDownloadPromises[fileName] = fileStorage.getFile(fileName).then((blob) => {\r\n //throw '';\r\n this.log('downloadSmallFile found photo by fileName:', fileName);\r\n return this.cachedDownloads[fileName] = blob;\r\n }).catch(() => {\r\n this.log.warn('downloadSmallFile found no photo by fileName:', fileName);\r\n let downloadPromise = this.downloadRequest(dcID, () => {\r\n let 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 let processDownloaded = (bytes) => {\r\n //this.log('processDownloaded', location, bytes);\r\n if (processSticker) {\r\n return appWebpManager_1.default.convertToPng(bytes);\r\n }\r\n return Promise.resolve(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) {\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);\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 let processSticker = false;\r\n if (options.stickerType == 1 && !appWebpManager_1.default.isSupported()) {\r\n if (options.toFileEntry || size > 524288) {\r\n delete options.stickerType;\r\n }\r\n else {\r\n processSticker = true;\r\n options.mimeType = 'image/png';\r\n }\r\n }\r\n // this.log('Dload file', dcID, location, size)\r\n let fileName = this.getFileName(location, options);\r\n let toFileEntry = options.toFileEntry || null;\r\n let cachedPromise = this.cachedSavePromises[fileName] || this.cachedDownloadPromises[fileName];\r\n let 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(fileName).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).then((blob) => __awaiter(this, void 0, void 0, function* () {\r\n //this.log('is that i wanted');\r\n //throw '';\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(fileName);\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 if (processSticker) {\r\n return appWebpManager_1.default.convertToPng(bytes);\r\n }\r\n return Promise.resolve(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 }, errorHandler);\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 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": 21,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto_config.ts",
"name": "./src/lib/mtproto/mtproto_config.ts",
"index": 8,
"index2": 6,
"size": 606,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"issuerId": 13,
"issuerName": "./src/lib/storage.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 13,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"name": "./src/lib/storage.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 626,
"building": 787
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 13,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"module": "./src/lib/storage.ts",
"moduleName": "./src/lib/storage.ts",
"type": "cjs require",
"userRequest": "./mtproto/mtproto_config",
"loc": "3:25-60"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtproto_config",
"loc": "16:25-65"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtproto_config",
"loc": "15:25-65"
},
{
"moduleId": 63,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"module": "./src/lib/mtproto/mtproto.ts",
"moduleName": "./src/lib/mtproto/mtproto.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "8:25-52"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtproto_config",
"loc": "40:25-65"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Modes = exports.App = void 0;\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": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"index": 21,
"index2": 68,
"size": 3966,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"module": "./src/pages/pagePassword.ts",
"moduleName": "./src/pages/pagePassword.ts",
"type": "cjs require",
"userRequest": "./pageIm",
"loc": "6:33-52"
},
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./pages/pageIm",
"loc": "105:57-82"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "./pageIm",
"loc": "7:33-52"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "./pageIm",
"loc": "37:33-52"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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(\"../components/misc\");\r\n//import {stackBlurImage} from '../lib/StackBlur';\r\nconst page_1 = __importDefault(require(\"./page\"));\r\nlet onFirstMount = () => {\r\n //return;\r\n let promise = 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 // @ts-ignore\r\n if (process.env.NODE_ENV != 'production') {\r\n Promise.resolve().then(() => __importStar(require('../lib/services')));\r\n }\r\n //(Array.from(document.getElementsByClassName('rp')) as HTMLElement[]).forEach(el => 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\n return promise;\r\n};\r\nconst page = new page_1.default('page-chats', false, onFirstMount);\r\nexports.default = page;\r\n"
},
{
"id": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesIDsManager.ts",
"name": "./src/lib/appManagers/appMessagesIDsManager.ts",
"index": 34,
"index2": 25,
"size": 2147,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesIDsManager",
"loc": "17:48-82"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesIDsManager",
"loc": "17:48-82"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appMessagesIDsManager",
"loc": "10:48-94"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesIDsManager",
"loc": "9:48-99"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesIDsManager",
"loc": "10:48-82"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AppMessagesIDsManager = void 0;\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": 24,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\preloader.ts",
"name": "./src/components/preloader.ts",
"index": 46,
"index2": 39,
"size": 4065,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "31:36-73"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "25:36-73"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "./preloader",
"loc": "41:36-58"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../../components/preloader",
"loc": "21:36-73"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./preloader",
"loc": "29:36-58"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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.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 <div class=\"you-spin-me-round\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"preloader-circular\" viewBox=\"25 25 50 50\">\r\n <circle class=\"preloader-path-new\" cx=\"50\" cy=\"50\" r=\"23\" fill=\"none\" stroke-miterlimit=\"10\"/>\r\n </svg>\r\n </div>`;\r\n if (cancelable) {\r\n this.preloader.innerHTML += `\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"preloader-close\" viewBox=\"0 0 20 20\">\r\n <line x1=\"0\" y1=\"20\" x2=\"20\" y2=\"0\" stroke-width=\"2\" stroke-linecap=\"round\"></line>\r\n <line x1=\"0\" y1=\"0\" x2=\"20\" y2=\"20\" stroke-width=\"2\" stroke-linecap=\"round\"></line>\r\n </svg>`;\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, append = true) {\r\n if (promise) {\r\n this.promise = promise;\r\n let tempID = --this.tempID;\r\n let onEnd = () => {\r\n if (tempID == this.tempID) {\r\n this.detach();\r\n }\r\n promise.notify = null;\r\n };\r\n promise.then(onEnd, onEnd);\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 ? 'append' : 'prepend'](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 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": 25,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"name": "./src/lib/appManagers/appDialogsManager.ts",
"index": 49,
"index2": 45,
"size": 36519,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appDialogsManager",
"loc": "14:44-74"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appDialogsManager",
"loc": "13:44-86"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appDialogsManager",
"loc": "19:44-91"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appDialogsManager",
"loc": "26:44-74"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appDialogsManager",
"loc": "7:44-91"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppDialogsManager = void 0;\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\n//import Scrollable from \"../../components/scrollable\";\r\nconst scrollable_new_1 = __importDefault(require(\"../../components/scrollable_new\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst popup_1 = require(\"../../components/popup\");\r\nconst testScroll = false;\r\nconst USEPINNEDDELIMITER = false;\r\nclass DialogsContextMenu {\r\n constructor(attachTo) {\r\n this.attachTo = attachTo;\r\n this.element = document.getElementById('dialogs-contextmenu');\r\n this.buttons = {};\r\n misc_1.parseMenuButtonsTo(this.buttons, this.element.children);\r\n const onContextMenu = (e) => {\r\n var _a, _b;\r\n let li = null;\r\n try {\r\n li = utils_1.findUpTag(e.target, 'LI');\r\n }\r\n catch (e) { }\r\n if (!li)\r\n return;\r\n e.preventDefault();\r\n if (this.element.classList.contains('active')) {\r\n return false;\r\n }\r\n e.cancelBubble = true;\r\n this.selectedID = +li.getAttribute('data-peerID');\r\n const dialog = appMessagesManager_1.default.getDialogByPeerID(this.selectedID)[0];\r\n const notOurDialog = dialog.peerID != utils_1.$rootScope.myID;\r\n // archive button\r\n if (notOurDialog) {\r\n const button = this.buttons.archive;\r\n const condition = dialog.folder_id == 1;\r\n button.classList.toggle('flip-icon', condition);\r\n button.innerText = condition ? 'Unarchive' : 'Archive';\r\n this.buttons.archive.style.display = '';\r\n }\r\n else {\r\n this.buttons.archive.style.display = 'none';\r\n }\r\n // pin button\r\n {\r\n const button = this.buttons.pin;\r\n const condition = (_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.pinned;\r\n button.classList.toggle('flip-icon', condition);\r\n button.innerText = condition ? 'Unpin' : 'Pin';\r\n }\r\n // mute button\r\n if (notOurDialog) {\r\n const button = this.buttons.mute;\r\n const condition = dialog.notify_settings && dialog.notify_settings.mute_until > (Date.now() / 1000 | 0);\r\n button.classList.toggle('flip-icon', condition);\r\n button.innerText = condition ? 'Unmute' : 'Mute';\r\n this.buttons.mute.style.display = '';\r\n }\r\n else {\r\n this.buttons.mute.style.display = 'none';\r\n }\r\n // unread button\r\n {\r\n const button = this.buttons.unread;\r\n const condition = !!(((_b = dialog.pFlags) === null || _b === void 0 ? void 0 : _b.unread_mark) || dialog.unread_count);\r\n button.classList.toggle('flip-icon', condition);\r\n button.innerText = condition ? 'Mark as Read' : 'Mark as Unread';\r\n }\r\n /* // clear history button\r\n if(appPeersManager.isChannel(this.selectedID)) {\r\n this.buttons.clear.style.display = 'none';\r\n } else {\r\n this.buttons.clear.style.display = '';\r\n } */\r\n // delete button\r\n let deleteButtonText = '';\r\n if (appPeersManager_1.default.isMegagroup(this.selectedID)) {\r\n deleteButtonText = 'Leave';\r\n //deleteButtonText = 'Leave group';\r\n this.peerType = 'megagroup';\r\n }\r\n else if (appPeersManager_1.default.isChannel(this.selectedID)) {\r\n deleteButtonText = 'Leave';\r\n //deleteButtonText = 'Leave channel';\r\n this.peerType = 'channel';\r\n }\r\n else if (this.selectedID < 0) {\r\n deleteButtonText = 'Delete';\r\n //deleteButtonText = 'Delete and leave';\r\n this.peerType = 'group';\r\n }\r\n else {\r\n deleteButtonText = 'Delete';\r\n //deleteButtonText = 'Delete chat';\r\n this.peerType = this.selectedID == utils_1.$rootScope.myID ? 'saved' : 'chat';\r\n }\r\n this.buttons.delete.innerText = deleteButtonText;\r\n li.classList.add('menu-open');\r\n misc_1.positionMenu(e, this.element);\r\n misc_1.openBtnMenu(this.element, () => {\r\n li.classList.remove('menu-open');\r\n });\r\n };\r\n this.attachTo.forEach(el => {\r\n el.addEventListener('contextmenu', onContextMenu);\r\n });\r\n this.buttons.archive.addEventListener('click', () => {\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.selectedID)[0];\r\n if (dialog) {\r\n appMessagesManager_1.default.editPeerFolders([dialog.peerID], +!dialog.folder_id);\r\n }\r\n });\r\n this.buttons.pin.addEventListener('click', () => {\r\n appMessagesManager_1.default.toggleDialogPin(this.selectedID);\r\n });\r\n this.buttons.mute.addEventListener('click', () => {\r\n appImManager_1.default.mutePeer(this.selectedID);\r\n });\r\n this.buttons.unread.addEventListener('click', () => {\r\n appMessagesManager_1.default.markDialogUnread(this.selectedID);\r\n });\r\n this.buttons.delete.addEventListener('click', () => {\r\n let firstName = appPeersManager_1.default.getPeerTitle(this.selectedID, false, true);\r\n let callback = (justClear) => {\r\n appMessagesManager_1.default.flushHistory(this.selectedID, justClear);\r\n };\r\n let title, description, buttons;\r\n switch (this.peerType) {\r\n case 'channel': {\r\n title = 'Leave Channel?';\r\n description = `Are you sure you want to leave this channel?`;\r\n buttons = [{\r\n text: 'LEAVE ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(true)\r\n }];\r\n break;\r\n }\r\n case 'megagroup': {\r\n title = 'Leave Group?';\r\n description = `Are you sure you want to leave this group?`;\r\n buttons = [{\r\n text: 'LEAVE ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(true)\r\n }];\r\n break;\r\n }\r\n case 'chat': {\r\n title = 'Delete Chat?';\r\n description = `Are you sure you want to delete chat with <b>${firstName}</b>?`;\r\n buttons = [{\r\n text: 'DELETE FOR ME AND ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(false)\r\n }, {\r\n text: 'DELETE JUST FOR ME',\r\n isDanger: true,\r\n callback: () => callback(true)\r\n }];\r\n break;\r\n }\r\n case 'saved': {\r\n title = 'Delete Saved Messages?';\r\n description = `Are you sure you want to delete all your saved messages?`;\r\n buttons = [{\r\n text: 'DELETE SAVED MESSAGES',\r\n isDanger: true,\r\n callback: () => callback(false)\r\n }];\r\n break;\r\n }\r\n case 'group': {\r\n title = 'Delete and leave Group?';\r\n description = `Are you sure you want to delete all message history and leave <b>${firstName}</b>?`;\r\n buttons = [{\r\n text: 'DELETE AND LEAVE ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(true)\r\n }];\r\n break;\r\n }\r\n }\r\n buttons.push({\r\n text: 'CANCEL',\r\n isCancel: true\r\n });\r\n let popup = new popup_1.PopupPeer('popup-delete-chat', {\r\n peerID: this.selectedID,\r\n title: title,\r\n description: description,\r\n buttons: buttons\r\n });\r\n popup.show();\r\n });\r\n }\r\n}\r\nclass AppDialogsManager {\r\n constructor() {\r\n this.chatList = document.getElementById('dialogs');\r\n this.chatListArchived = document.getElementById('dialogs-archived');\r\n /* public chatsHidden: Scrollable[\"hiddenElements\"];\r\n public chatsVisible: Scrollable[\"visibleElements\"];\r\n public chatsArchivedHidden: Scrollable[\"hiddenElements\"];\r\n public chatsArchivedVisible: Scrollable[\"visibleElements\"]; */\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.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.contextMenu = new DialogsContextMenu([this.chatList, this.chatListArchived]);\r\n this.chatsPreloader = misc_1.putPreloader(null, true);\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.scroll = new scrollable_new_1.default(this.chatsContainer, 'y', 'CL', this.chatList, 500);\r\n this.scroll.setVirtualContainer(this.chatList);\r\n this.scroll.onScrolledBottom = this.onChatsScroll.bind(this);\r\n //this.scroll.attachSentinels();\r\n this.scrollArchived = new scrollable_new_1.default(this.chatsArchivedContainer, 'y', 'CLA', this.chatListArchived, 500);\r\n this.scrollArchived.setVirtualContainer(this.chatListArchived);\r\n this.scrollArchived.onScrolledBottom = this.onChatsArchivedScroll.bind(this);\r\n ///this.scroll.attachSentinels();\r\n this.setListClickListener(this.chatList);\r\n this.setListClickListener(this.chatListArchived);\r\n if (testScroll) {\r\n let i = 0;\r\n let add = () => {\r\n let li = document.createElement('li');\r\n li.dataset.id = '' + i;\r\n li.id = '' + i;\r\n li.innerHTML = `<div class=\"rp\"><div class=\"user-avatar\" style=\"background-color: rgb(166, 149, 231); font-size: 0px;\"><img src=\"assets/img/pepe.jpg\"></div><div class=\"user-caption\"><p><span class=\"user-title\">${i}</span><span><span class=\"message-status\"></span><span class=\"message-time\">18:33</span></span></p><p><span class=\"user-last-message\"><b>-_-_-_-: </b>qweasd</span><span></span></p></div></div>`;\r\n i++;\r\n this.scroll.append(li);\r\n };\r\n for (let i = 0; i < 1000; ++i) {\r\n add();\r\n }\r\n window.addElement = add;\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.avatarEl.classList.add('is-online');\r\n }\r\n else {\r\n dom.avatarEl.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.setDialogPosition(dialog);\r\n this.setPinnedDelimiter();\r\n });\r\n utils_1.$rootScope.$on('dialog_flush', (e) => {\r\n let peerID = e.detail.peerID;\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n if (dialog) {\r\n this.setLastMessage(dialog);\r\n }\r\n });\r\n utils_1.$rootScope.$on('dialogs_multiupdate', (e) => {\r\n let dialogs = e.detail;\r\n for (let id in dialogs) {\r\n let dialog = dialogs[id];\r\n /////console.log('updating dialog:', dialog);\r\n if (!(dialog.peerID in this.doms)) {\r\n this.addDialog(dialog);\r\n }\r\n this.setLastMessage(dialog);\r\n this.setDialogPosition(dialog);\r\n }\r\n this.setPinnedDelimiter();\r\n });\r\n utils_1.$rootScope.$on('dialog_drop', (e) => {\r\n let { peerID, dialog } = e.detail;\r\n let dom = this.getDialogDom(peerID);\r\n if (dom) {\r\n dom.listEl.remove();\r\n delete this.doms[peerID];\r\n (dialog.folder_id == 1 ? this.scrollArchived : this.scroll).reorder();\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 utils_1.$rootScope.$on('peer_changed', (e) => {\r\n let peerID = e.detail;\r\n let lastPeerID = this.lastActiveListElement && +this.lastActiveListElement.getAttribute('data-peerID');\r\n if (this.lastActiveListElement && lastPeerID != peerID) {\r\n this.lastActiveListElement.classList.remove('active');\r\n this.lastActiveListElement = null;\r\n }\r\n if (lastPeerID != peerID) {\r\n let dom = this.getDialogDom(peerID);\r\n if (dom) {\r\n this.lastActiveListElement = dom.listEl;\r\n dom.listEl.classList.add('active');\r\n }\r\n }\r\n });\r\n appMessagesManager_1.default.loaded.then(() => {\r\n this.loadDialogs().then(result => {\r\n this.setPinnedDelimiter();\r\n //appSidebarLeft.onChatsScroll();\r\n this.loadDialogs(true);\r\n });\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 storage = appMessagesManager_1.default.dialogsStorage[+archived] || [];\r\n let offsetIndex = 0;\r\n for (let i = storage.length - 1; i >= 0; --i) {\r\n let dialog = storage[i];\r\n if (this.getDialogDom(dialog.peerID)) {\r\n offsetIndex = dialog.index;\r\n break;\r\n }\r\n }\r\n //let offset = storage[storage.length - 1]?.index || 0;\r\n try {\r\n console.time('getDialogs time');\r\n let loadCount = 50 /*this.chatsLoadCount */;\r\n this.loadDialogsPromise = appMessagesManager_1.default.getConversations('', offsetIndex, 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 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 this.log('getDialogs ' + loadCount + ' dialogs by offset:', offsetIndex, result, this.scroll.length, archived);\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 });\r\n }\r\n onChatsScroll() {\r\n if (this.loadedAll || this.loadDialogsPromise)\r\n return;\r\n console.log('onChatsScroll');\r\n this.loadDialogs();\r\n }\r\n onChatsArchivedScroll() {\r\n if (this.loadedArchivedAll || this.loadDialogsPromise)\r\n return;\r\n this.loadDialogs(true);\r\n }\r\n setListClickListener(list, onFound) {\r\n list.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\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 result;\r\n //console.log('appDialogsManager: lock lazyLoadQueue');\r\n if (elem) {\r\n if (onFound)\r\n onFound();\r\n let peerID = +elem.getAttribute('data-peerID');\r\n let lastMsgID = +elem.dataset.mid || undefined;\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);\r\n /* if(result instanceof Promise) {\r\n this.lastGoodClickID = this.lastClickID;\r\n appImManager.lazyLoadQueue.lock();\r\n } */\r\n }\r\n else {\r\n result = appImManager_1.default.setPeer(0);\r\n }\r\n }, { capture: true });\r\n }\r\n setDialogPosition(dialog) {\r\n let pos = appMessagesManager_1.default.getDialogByPeerID(dialog.peerID)[1];\r\n let dom = this.getDialogDom(dialog.peerID);\r\n let prevPos = utils_1.whichChild(dom.listEl);\r\n let wrongFolder = (dialog.folder_id == 1 && this.chatList == dom.listEl.parentElement) || (dialog.folder_id == 0 && this.chatListArchived == dom.listEl.parentElement);\r\n if (wrongFolder)\r\n prevPos = 0xFFFF;\r\n if (prevPos == pos) {\r\n return;\r\n }\r\n else if (prevPos < pos) { // was higher\r\n pos += 1;\r\n }\r\n let chatList = dialog.folder_id == 1 ? this.chatListArchived : this.chatList;\r\n if (chatList.childElementCount > pos) {\r\n chatList.insertBefore(dom.listEl, chatList.children[pos]);\r\n }\r\n else {\r\n chatList.append(dom.listEl);\r\n }\r\n (dialog.folder_id == 1 ? this.scrollArchived : this.scroll).reorder();\r\n this.log('setDialogPosition:', dialog, dom, pos);\r\n }\r\n setPinnedDelimiter() {\r\n var _a, _b;\r\n if (!USEPINNEDDELIMITER)\r\n return;\r\n let index = -1;\r\n let dialogs = appMessagesManager_1.default.dialogsStorage[0];\r\n for (let dialog of dialogs) {\r\n if ((_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.pinned) {\r\n index++;\r\n }\r\n }\r\n let currentIndex = (_b = (this.pinnedDelimiter.parentElement && utils_1.whichChild(this.pinnedDelimiter.parentElement))) !== null && _b !== void 0 ? _b : -1;\r\n if (index == currentIndex)\r\n return;\r\n let children = this.chatList.children;\r\n let modifying = [];\r\n if (currentIndex != -1 && children.length > currentIndex) {\r\n let li = children[currentIndex];\r\n modifying.push(li);\r\n }\r\n if (index != -1 && children.length > index) {\r\n let li = children[index];\r\n modifying.push(li);\r\n li.append(this.pinnedDelimiter);\r\n }\r\n else {\r\n this.pinnedDelimiter.remove();\r\n }\r\n modifying.forEach(elem => {\r\n this.scroll.updateElement(elem);\r\n });\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 (!dom) {\r\n dom = this.getDialogDom(dialog.peerID);\r\n }\r\n if (lastMessage._ == 'messageEmpty') {\r\n dom.lastMessageSpan.innerHTML = '';\r\n dom.lastTimeSpan.innerHTML = '';\r\n delete dom.listEl.dataset.mid;\r\n return;\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 if (highlightWord && lastMessage.message) {\r\n let lastMessageText = appMessagesManager_1.default.getRichReplyText(lastMessage, '');\r\n let messageText = lastMessage.message;\r\n let entities = richtextprocessor_1.RichTextProcessor.parseEntities(messageText.replace(/\\n/g, ' '), { noLinebreakers: true });\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 let messageWrapped = richtextprocessor_1.RichTextProcessor.wrapRichText(messageText, {\r\n noLinebreakers: true,\r\n entities: entities,\r\n noTextFormat: true\r\n });\r\n dom.lastMessageSpan.innerHTML = lastMessageText + messageWrapped;\r\n }\r\n else if (!lastMessage.deleted) {\r\n dom.lastMessageSpan.innerHTML = lastMessage.rReply;\r\n }\r\n else {\r\n dom.lastMessageSpan.innerHTML = '';\r\n }\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 if (!lastMessage.deleted) {\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 }\r\n else\r\n dom.lastTimeSpan.innerHTML = '';\r\n if ((this.doms[peerID] || this.domsArchived[peerID]) == dom) {\r\n this.setUnreadMessages(dialog);\r\n }\r\n else { // means search\r\n dom.listEl.dataset.mid = lastMessage.mid;\r\n }\r\n }\r\n setUnreadMessages(dialog) {\r\n let dom = this.getDialogDom(dialog.peerID);\r\n let lastMessage = appMessagesManager_1.default.getMessage(dialog.top_message);\r\n if (lastMessage._ != 'messageEmpty' && !lastMessage.deleted &&\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.innerText = '';\r\n dom.unreadMessagesSpan.classList.remove('tgico-pinnedchat');\r\n if (dialog.unread_count || dialog.pFlags.unread_mark) {\r\n dom.unreadMessagesSpan.innerText = '' + (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 && dialog.folder_id == 0) {\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, rippleEnabled = true, onlyFirstName = false) {\r\n let dialog;\r\n if (typeof (_dialog) === 'number') {\r\n let originalDialog = appMessagesManager_1.default.getDialogByPeerID(_dialog)[0];\r\n if (!originalDialog) {\r\n originalDialog = {\r\n peerID: _dialog,\r\n pFlags: {}\r\n };\r\n }\r\n dialog = originalDialog;\r\n }\r\n else {\r\n dialog = _dialog;\r\n }\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, false, onlyFirstName);\r\n let avatarEl = new avatar_1.default();\r\n avatarEl.setAttribute('dialog', '1');\r\n avatarEl.setAttribute('peer', '' + peerID);\r\n avatarEl.classList.add('dialog-avatar');\r\n if (drawStatus && peerID != utils_1.$rootScope.myID && dialog.peer) {\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 avatarEl.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 < 0) {\r\n let chat = appChatsManager_1.default.getChat(-peerID);\r\n if (chat && chat.pFlags && chat.pFlags.verified) {\r\n titleSpan.classList.add('is-verified');\r\n }\r\n }\r\n else {\r\n let user = appUsersManager_1.default.getUser(peerID);\r\n if (user && user.pFlags && user.pFlags.verified) {\r\n titleSpan.classList.add('is-verified');\r\n }\r\n }\r\n if (peerID == utils_1.$rootScope.myID) {\r\n title = onlyFirstName ? 'Saved' : 'Saved Messages';\r\n }\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(avatarEl, captionDiv);\r\n if (rippleEnabled) {\r\n misc_1.ripple(paddingDiv);\r\n /* ripple(paddingDiv, (id) => {\r\n this.log('dialogs click element');\r\n this.lastClickID = id;\r\n \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.lazyLoadQueue.unlock();\r\n }\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 avatarEl,\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 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 if (dialog.peerID < 0) {\r\n let s = user.rFirstName || user.username;\r\n if (!s)\r\n return;\r\n str = s + ' ';\r\n }\r\n let senderBold = document.createElement('i');\r\n str += 'typing...';\r\n senderBold.innerHTML = 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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\filemanager.ts",
"name": "./src/lib/filemanager.ts",
"index": 36,
"index2": 26,
"size": 7178,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"issuerId": 8,
"issuerName": "./src/lib/appManagers/appPhotosManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"name": "./src/lib/appManagers/appPhotosManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 848,
"building": 194,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../filemanager",
"loc": "9:38-63"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../filemanager",
"loc": "16:38-63"
},
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../filemanager",
"loc": "18:38-63"
},
{
"moduleId": 62,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\idb.ts",
"module": "./src/lib/idb.ts",
"moduleName": "./src/lib/idb.ts",
"type": "cjs require",
"userRequest": "./filemanager",
"loc": "7:38-62"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\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 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 = URL.createObjectURL(blob);\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": 27,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\searchIndexManager.ts",
"name": "./src/lib/searchIndexManager.ts",
"index": 40,
"index2": 31,
"size": 3779,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"issuerId": 4,
"issuerName": "./src/lib/appManagers/appUsersManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 4,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"name": "./src/lib/appManagers/appUsersManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1439,
"building": 131,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../searchIndexManager",
"loc": "14:45-77"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../searchIndexManager",
"loc": "38:45-77"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "../searchIndexManager",
"loc": "22:45-77"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../searchIndexManager",
"loc": "29:45-77"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 config_1 = __importDefault(require(\"./config\"));\r\nlet SearchIndexManager = /** @class */ (() => {\r\n class SearchIndexManager {\r\n createIndex() {\r\n return {\r\n shortIndexes: {},\r\n fullTexts: {}\r\n };\r\n }\r\n cleanSearchText(text, latinize = true) {\r\n const hasTag = text.charAt(0) == '%';\r\n text = text.replace(SearchIndexManager['badCharsRe'], '').replace(SearchIndexManager['trimRe'], '');\r\n if (latinize) {\r\n text = text.replace(/[^A-Za-z0-9]/g, (ch) => {\r\n const latinizeCh = config_1.default.LatinizeMap[ch];\r\n return latinizeCh !== undefined ? latinizeCh : ch;\r\n });\r\n }\r\n text = text.toLowerCase();\r\n if (hasTag) {\r\n text = '%' + text;\r\n }\r\n return text;\r\n }\r\n cleanUsername(username) {\r\n return username && username.toLowerCase() || '';\r\n }\r\n indexObject(id, searchText, searchIndex) {\r\n if (searchIndex.fullTexts[id] !== undefined) {\r\n return false;\r\n }\r\n searchText = this.cleanSearchText(searchText);\r\n if (!searchText.length) {\r\n return false;\r\n }\r\n const shortIndexes = searchIndex.shortIndexes;\r\n searchIndex.fullTexts[id] = searchText;\r\n searchText.split(' ').forEach((searchWord) => {\r\n let len = Math.min(searchWord.length, 3), 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 }\r\n else {\r\n shortIndexes[wordPart].push(id);\r\n }\r\n }\r\n });\r\n }\r\n search(query, searchIndex) {\r\n const shortIndexes = searchIndex.shortIndexes;\r\n const fullTexts = searchIndex.fullTexts;\r\n query = this.cleanSearchText(query);\r\n const queryWords = query.split(' ');\r\n let foundObjs = false, newFoundObjs, i;\r\n let j, searchText;\r\n let found;\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 newFoundObjs = {};\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 return newFoundObjs;\r\n }\r\n }\r\n SearchIndexManager.badCharsRe = /[`~!@#$%^&*()\\-_=+\\[\\]\\\\|{}'\";:\\/?.>,<]+/g;\r\n SearchIndexManager.trimRe = /^\\s+|\\s$/g;\r\n return SearchIndexManager;\r\n})();\r\nexports.default = new SearchIndexManager();\r\n"
},
{
"id": 28,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts",
"name": "./src/lib/mtproto/serverTimeManager.ts",
"index": 41,
"index2": 34,
"size": 1332,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"issuerId": 72,
"issuerName": "./src/pages/pageSignQR.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2979,
"building": 103,
"dependencies": 2951
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/serverTimeManager",
"loc": "12:44-83"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "27:44-83"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "32:44-83"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/serverTimeManager",
"loc": "42:44-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.ServerTimeManager = void 0;\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; // in seconds\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": 29,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\avatar.ts",
"name": "./src/components/avatar.ts",
"index": 50,
"index2": 43,
"size": 2697,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/avatar",
"loc": "35:33-67"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../../components/avatar",
"loc": "27:33-67"
},
{
"moduleId": 43,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popup.ts",
"module": "./src/components/popup.ts",
"moduleName": "./src/components/popup.ts",
"type": "cjs require",
"userRequest": "./avatar",
"loc": "7:33-52"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/avatar",
"loc": "40:33-67"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 appProfileManager_1 = __importDefault(require(\"../lib/appManagers/appProfileManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nutils_1.$rootScope.$on('avatar_update', (e) => {\r\n let peerID = e.detail;\r\n appProfileManager_1.default.removeFromAvatarsCache(peerID);\r\n Array.from(document.querySelectorAll('avatar-element[peer=\"' + peerID + '\"]')).forEach(elem => {\r\n console.log('updating avatar:', elem);\r\n elem.update();\r\n });\r\n});\r\nclass AvatarElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n this.isDialog = false;\r\n // элемент создан\r\n }\r\n connectedCallback() {\r\n // браузер вызывает этот метод при добавлении элемента в документ\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n this.isDialog = !!this.getAttribute('dialog');\r\n }\r\n disconnectedCallback() {\r\n // браузер вызывает этот метод при удалении элемента из документа\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n }\r\n static get observedAttributes() {\r\n return ['peer', 'dialog', 'peer-title' /* массив имён атрибутов для отслеживания их изменений */];\r\n }\r\n attributeChangedCallback(name, oldValue, newValue) {\r\n // вызывается при изменении одного из перечисленных выше атрибутов\r\n if (name == 'peer') {\r\n this.peerID = +newValue;\r\n this.update();\r\n }\r\n else if (name == 'peer-title') {\r\n this.peerTitle = newValue;\r\n }\r\n else if (name == 'dialog') {\r\n this.isDialog = !!newValue;\r\n }\r\n }\r\n update() {\r\n appProfileManager_1.default.putPhoto(this, this.peerID, this.isDialog, this.peerTitle);\r\n }\r\n adoptedCallback() {\r\n // вызывается, когда элемент перемещается в новый документ\r\n // (происходит в document.adoptNode, используется очень редко)\r\n }\r\n}\r\nexports.default = AvatarElement;\r\ncustomElements.define(\"avatar-element\", AvatarElement);\r\n"
},
{
"id": 30,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\lazyLoadQueue.ts",
"name": "./src/components/lazyLoadQueue.ts",
"index": 55,
"index2": 47,
"size": 4543,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/lazyLoadQueue",
"loc": "31:40-81"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "47:40-81"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../../components/lazyLoadQueue",
"loc": "26:40-81"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./lazyLoadQueue",
"loc": "26:40-66"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nclass LazyLoadQueue {\r\n constructor(parallelLimit = 5, withObserver = true) {\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 this.debug = false;\r\n if (!withObserver)\r\n return;\r\n this.observer = new IntersectionObserver(entries => {\r\n if (this.lockPromise)\r\n return;\r\n for (let entry of entries) {\r\n if (entry.isIntersecting) {\r\n let target = entry.target;\r\n // need for set element first if scrolled\r\n let item = this.lazyLoadMedia.findAndSplice(i => i.div == target);\r\n if (item) {\r\n item.wasSeen = true;\r\n this.lazyLoadMedia.unshift(item);\r\n this.processQueue(item);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n clear() {\r\n this.tempID--;\r\n this.lazyLoadMedia.length = 0;\r\n this.loadingMedia = 0;\r\n if (this.observer) {\r\n this.observer.disconnect();\r\n }\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(item) {\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 if (item) {\r\n this.lazyLoadMedia.findAndSplice(i => i == item);\r\n }\r\n else {\r\n item = this.lazyLoadMedia.findAndSplice(i => i.wasSeen);\r\n }\r\n if (item) {\r\n this.loadingMedia++;\r\n let tempID = this.tempID;\r\n this.debug && this.log('will load media', this.lockPromise, item);\r\n try {\r\n if (this.lockPromise /* && false */) {\r\n let perf = performance.now();\r\n yield this.lockPromise;\r\n this.debug && this.log('waited lock:', performance.now() - perf);\r\n }\r\n //await 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);\r\n }\r\n if (tempID == this.tempID) {\r\n this.loadingMedia--;\r\n }\r\n this.debug && this.log('loaded media');\r\n if (this.lazyLoadMedia.length) {\r\n this.processQueue();\r\n }\r\n }\r\n });\r\n }\r\n addElement(el) {\r\n if (el.wasSeen) {\r\n this.processQueue(el);\r\n }\r\n else {\r\n el.wasSeen = false;\r\n if (this.observer) {\r\n this.observer.observe(el.div);\r\n }\r\n }\r\n }\r\n push(el) {\r\n this.lazyLoadMedia.push(el);\r\n this.addElement(el);\r\n }\r\n unshift(el) {\r\n this.lazyLoadMedia.unshift(el);\r\n this.addElement(el);\r\n }\r\n}\r\nexports.default = LazyLoadQueue;\r\n"
},
{
"id": 31,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"name": "./src/components/wrappers.ts",
"index": 64,
"index2": 59,
"size": 40229,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "24:19-55"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../../components/wrappers",
"loc": "48:19-55"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "./wrappers",
"loc": "33:19-40"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./wrappers",
"loc": "27:19-40"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\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\nexports.wrapPoll = exports.wrapAlbum = exports.wrapReply = exports.wrapSticker = exports.wrapPhoto = exports.wrapVoiceMessage = exports.wrapAudio = exports.wrapDocument = exports.wrapVideo = void 0;\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 appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst preloader_1 = __importDefault(require(\"./preloader\"));\r\nconst mediaPlayer_1 = __importStar(require(\"../lib/mediaPlayer\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst misc_1 = require(\"./misc\");\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst groupedLayout_1 = require(\"./groupedLayout\");\r\nconst poll_1 = __importDefault(require(\"./poll\"));\r\nconst appWebpManager_1 = __importDefault(require(\"../lib/appManagers/appWebpManager\"));\r\nfunction wrapVideo({ doc, container, message, 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 (!boxWidth && !boxHeight) { // album\r\n let sizes = doc.thumbs;\r\n if (!doc.downloaded && sizes && sizes[0].bytes) {\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, container, false);\r\n }\r\n }\r\n else {\r\n if (!container.firstElementChild || (container.firstElementChild.tagName != 'IMG' && container.firstElementChild.tagName != 'VIDEO')) {\r\n appPhotosManager_1.default.setAttachmentSize(doc, container, boxWidth, boxHeight);\r\n }\r\n }\r\n img = container.lastElementChild;\r\n if (!img || img.tagName != 'IMG') {\r\n container.append(img = new Image());\r\n }\r\n }\r\n let video = document.createElement('video');\r\n let source = document.createElement('source');\r\n video.append(source);\r\n if (withTail) {\r\n let foreignObject = img.parentElement;\r\n video.width = +foreignObject.getAttributeNS(null, 'width');\r\n video.height = +foreignObject.getAttributeNS(null, 'height');\r\n foreignObject.append(video);\r\n }\r\n else {\r\n container.append(video);\r\n }\r\n let span, spanPlay;\r\n if (doc.type != 'round') {\r\n span = document.createElement('span');\r\n span.classList.add('video-time');\r\n container.append(span);\r\n if (doc.type != 'gif') {\r\n span.innerText = (doc.duration + '').toHHMMSS(false);\r\n spanPlay = document.createElement('span');\r\n spanPlay.classList.add('video-play', 'tgico-largeplay', 'btn-circle', 'position-center');\r\n container.append(spanPlay);\r\n }\r\n else {\r\n span.innerText = 'GIF';\r\n }\r\n }\r\n let loadVideo = () => __awaiter(this, void 0, void 0, function* () {\r\n if (message.media.preloader) { // means upload\r\n message.media.preloader.attach(container, undefined, undefined, false);\r\n }\r\n else if (!doc.downloaded) {\r\n let preloader = new preloader_1.default(container, true);\r\n let promise = appDocsManager_1.default.downloadDoc(doc);\r\n preloader.attach(container, true, promise, false);\r\n yield promise;\r\n }\r\n if (middleware && !middleware()) {\r\n return;\r\n }\r\n console.log('loaded doc:', doc, doc.url, container);\r\n misc_1.renderImageFromUrl(source, doc.url);\r\n source.type = doc.mime_type;\r\n video.append(source);\r\n if (img && img.parentElement) {\r\n img.remove();\r\n }\r\n if (doc.type == 'gif') {\r\n video.autoplay = true;\r\n video.loop = true;\r\n video.play();\r\n }\r\n else if (doc.type == 'round') {\r\n //video.dataset.ckin = doc.type == 'round' ? 'circle' : 'default';\r\n video.dataset.ckin = 'circle';\r\n video.dataset.overlay = '1';\r\n let player = new mediaPlayer_1.default(video /* , doc.type != 'round' */);\r\n }\r\n });\r\n if (doc.size >= 20e6 && !doc.downloaded) {\r\n let downloadDiv = document.createElement('div');\r\n downloadDiv.classList.add('download');\r\n let span = document.createElement('span');\r\n span.classList.add('btn-circle', 'tgico-download');\r\n downloadDiv.append(span);\r\n downloadDiv.addEventListener('click', () => {\r\n downloadDiv.remove();\r\n loadVideo();\r\n });\r\n container.prepend(downloadDiv);\r\n return;\r\n }\r\n return doc.downloaded ? loadVideo() : lazyLoadQueue.push({ div: container, load: loadVideo, wasSeen: true });\r\n}\r\nexports.wrapVideo = wrapVideo;\r\nlet formatDate = (timestamp) => {\r\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n const date = new Date(timestamp * 1000);\r\n return months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear()\r\n + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\r\n};\r\nfunction wrapDocument(doc, withTime = false, uploading = false) {\r\n if (doc.type == 'voice') {\r\n return wrapVoiceMessage(doc, uploading);\r\n }\r\n else if (doc.type == 'audio') {\r\n return wrapAudio(doc, withTime);\r\n }\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 docDiv = document.createElement('div');\r\n docDiv.classList.add('document', `ext-${ext}`);\r\n let ext2 = ext;\r\n if (doc.type == 'photo') {\r\n docDiv.classList.add('photo');\r\n ext2 = `<img src=\"${URL.createObjectURL(doc.file)}\">`;\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 size += ' · ' + formatDate(doc.date);\r\n }\r\n docDiv.innerHTML = `\r\n <div class=\"document-ico\">${ext2}</div>\r\n ${!uploading ? `<div class=\"document-download\"><div class=\"tgico-download\"></div></div>` : ''}\r\n <div class=\"document-name\">${fileName}</div>\r\n <div class=\"document-size\">${size}</div>\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_1.RichTextProcessor.wrapPlainText(doc.audioPerformer) : '';\r\n /* let durationStr = '3:24';\r\n let title = 'Million Telegrams';\r\n let subtitle = 'Best Artist'; */\r\n if (withTime) {\r\n subtitle += (subtitle ? ' · ' : '') + formatDate(doc.date);\r\n }\r\n else if (!subtitle) {\r\n subtitle = 'Unknown Artist';\r\n }\r\n div.innerHTML = `\r\n <div class=\"audio-download\"><div class=\"tgico-download\"></div></div>\r\n <div class=\"audio-toggle audio-ico tgico-largeplay\"></div>\r\n <div class=\"audio-details\">\r\n <div class=\"audio-title\">${title}</div>\r\n <div class=\"audio-subtitle\">${subtitle}</div>\r\n <div class=\"audio-time\">${durationStr}</div>\r\n </div>\r\n `;\r\n /* if(!subtitle) {\r\n div.classList.add('audio-no-subtitle');\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 (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n 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 = doc.url;\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 let launched = false;\r\n toggle.addEventListener('click', () => {\r\n if (!launched) {\r\n div.classList.add('audio-show-progress');\r\n launched = true;\r\n }\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.cancel();\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\n// https://github.com/LonamiWebs/Telethon/blob/4393ec0b83d511b6a20d8a20334138730f084375/telethon/utils.py#L1285\r\nfunction decodeWaveform(waveform) {\r\n if (!(waveform instanceof Uint8Array)) {\r\n waveform = new Uint8Array(waveform);\r\n }\r\n var bitCount = waveform.length * 8;\r\n var valueCount = bitCount / 5 | 0;\r\n if (!valueCount) {\r\n return new Uint8Array([]);\r\n }\r\n var dataView = new DataView(waveform.buffer);\r\n var result = new Uint8Array(valueCount);\r\n for (var i = 0; i < valueCount; i++) {\r\n var byteIndex = i * 5 / 8 | 0;\r\n var bitShift = i * 5 % 8;\r\n var value = dataView.getUint16(byteIndex, true);\r\n result[i] = (value >> bitShift) & 0b00011111;\r\n }\r\n /* var byteIndex = (valueCount - 1) / 8 | 0;\r\n var bitShift = (valueCount - 1) % 8;\r\n if(byteIndex == waveform.length - 1) {\r\n var value = waveform[byteIndex];\r\n } else {\r\n var value = dataView.getUint16(byteIndex, true);\r\n }\r\n \r\n console.log('decoded waveform, setting last value:', value, byteIndex, bitShift);\r\n result[valueCount - 1] = (value >> bitShift) & 0b00011111; */\r\n return result;\r\n}\r\nlet lastAudioToggle = null;\r\nfunction wrapVoiceMessage(doc, uploading = 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 <div class=\"audio-toggle audio-ico tgico-largeplay\"></div>\r\n <div class=\"audio-download\">${uploading ? '' : '<div class=\"tgico-download\"></div>'}</div>\r\n <div class=\"audio-time\">${durationStr}</div>\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 const barWidth = 2;\r\n const barMargin = 1;\r\n const barHeightMin = 2;\r\n const barHeightMax = 23;\r\n let waveform = doc.attributes[0].waveform || [];\r\n waveform = decodeWaveform(waveform.slice());\r\n //console.log('decoded waveform:', waveform);\r\n const normValue = Math.max(...waveform);\r\n const wfSize = waveform.length ? waveform.length : 100;\r\n const availW = 190;\r\n const barCount = Math.min((availW / (barWidth + barMargin)) | 0, wfSize);\r\n let maxValue = 0;\r\n let maxDelta = barHeightMax - barHeightMin;\r\n let html = '';\r\n for (let i = 0, barX = 0, sumI = 0; i < wfSize; ++i) {\r\n const value = waveform[i] || 0;\r\n if ((sumI + barCount) >= wfSize) { // draw bar\r\n sumI = sumI + barCount - wfSize;\r\n if (sumI < (barCount + 1) / 2) {\r\n if (maxValue < value)\r\n maxValue = value;\r\n }\r\n const bar_value = Math.max(((maxValue * maxDelta) + ((normValue + 1) / 2)) / (normValue + 1), barHeightMin);\r\n let h = `\r\n <rect x=\"${barX}\" y=\"${barHeightMax - bar_value}\" width=\"2\" height=\"${bar_value}\" rx=\"1\" ry=\"1\"></rect>\r\n `;\r\n html += h;\r\n /* if(barX >= activeW) {\r\n p.fillRect(nameleft + barX, bottom - bar_value, barWidth, barHeightMin + bar_value, inactive);\r\n } else if (barX + barWidth <= activeW) {\r\n p.fillRect(nameleft + barX, bottom - bar_value, barWidth, barHeightMin + bar_value, active);\r\n } else {\r\n p.fillRect(nameleft + barX, bottom - bar_value, activeW - barX, barHeightMin + bar_value, active);\r\n p.fillRect(nameleft + activeW, bottom - bar_value, barWidth - (activeW - barX), barHeightMin + bar_value, inactive);\r\n } */\r\n barX += barWidth + barMargin;\r\n if (sumI < (barCount + 1) / 2) {\r\n maxValue = 0;\r\n }\r\n else {\r\n maxValue = value;\r\n }\r\n }\r\n else {\r\n if (maxValue < value)\r\n maxValue = value;\r\n sumI += barCount;\r\n }\r\n }\r\n svg.insertAdjacentHTML('beforeend', html);\r\n /* let index = 0;\r\n let skipped = 0;\r\n let h = '';\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 percents = uint8 / 31;\r\n \r\n let height = 23 * percents;\r\n if(height < 2) {\r\n height = 2;\r\n }\r\n \r\n h += `\r\n <rect x=\"${(index - skipped) * 4}\" y=\"${23 - height}\" width=\"2\" height=\"${height}\" rx=\"1\" ry=\"1\"></rect>\r\n `;\r\n \r\n ++index;\r\n }\r\n svg.insertAdjacentHTML('beforeend', h); */\r\n let progress = div.querySelector('.audio-waveform');\r\n let onLoad = () => {\r\n let audio = document.createElement('audio');\r\n let source = document.createElement('source');\r\n source.src = doc.url;\r\n //source.type = doc.mime_type;\r\n source.type = 'audio/wav';\r\n audio.volume = 1;\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 if (!uploading) {\r\n let onClick = () => {\r\n if (!promise) {\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n promise = appDocsManager_1.default.downloadDoc(doc.id);\r\n preloader.attach(downloadDiv, true, promise);\r\n promise.then(() => {\r\n downloadDiv.classList.remove('downloading');\r\n downloadDiv.remove();\r\n div.removeEventListener('click', onClick);\r\n onLoad();\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n downloadDiv.classList.remove('downloading');\r\n promise.cancel();\r\n promise = null;\r\n }\r\n };\r\n div.addEventListener('click', onClick);\r\n div.click();\r\n }\r\n else {\r\n onLoad();\r\n }\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 foreignObject = document.createElementNS(\"http://www.w3.org/2000/svg\", 'foreignObject');\r\n appPhotosManager_1.default.setAttachmentSize(photo._ == 'document' ? photo : photo.id, foreignObject, boxWidth, boxHeight);\r\n let width = +foreignObject.getAttributeNS(null, 'width');\r\n let height = +foreignObject.getAttributeNS(null, 'height');\r\n svg.setAttributeNS(null, 'width', '' + width);\r\n svg.setAttributeNS(null, 'height', '' + height);\r\n svg.setAttributeNS(null, 'viewBox', '0 0 ' + width + ' ' + height);\r\n svg.setAttributeNS(null, 'preserveAspectRatio', 'none');\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 += `<rect width=\"${width}\" height=\"${height}\"></rect>`;\r\n }\r\n else {\r\n if (isOut) {\r\n clipPathHTML += `\r\n <use href=\"#message-tail\" transform=\"translate(${width - 2}, ${height}) scale(-1, -1)\"></use>\r\n <path />\r\n `;\r\n }\r\n else {\r\n clipPathHTML += `\r\n <use href=\"#message-tail\" transform=\"translate(2, ${height}) scale(1, -1)\"></use>\r\n <path />\r\n `;\r\n }\r\n }\r\n defs.innerHTML = `<clipPath id=\"${clipID}\">${clipPathHTML}</clipPath>`;\r\n container.style.width = parseInt(container.style.width) - 9 + 'px';\r\n svg.append(defs, foreignObject);\r\n container.append(svg);\r\n let img = foreignObject.firstElementChild;\r\n if (!img) {\r\n foreignObject.append(img = new Image());\r\n }\r\n return img;\r\n}\r\nfunction wrapPhoto(photoID, message, container, boxWidth = 480, boxHeight = 480, withTail = true, isOut = false, lazyLoadQueue, middleware, size = null) {\r\n let photo = appPhotosManager_1.default.getPhoto(photoID);\r\n let image;\r\n if (withTail) {\r\n image = wrapMediaWithTail(photo, message, container, boxWidth, boxHeight, isOut);\r\n }\r\n else {\r\n if (size) { // album\r\n let sizes = photo.sizes;\r\n if (!photo.downloaded && sizes && sizes[0].bytes) {\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, container, false);\r\n }\r\n }\r\n else if (boxWidth && boxHeight) { // means webpage's preview\r\n size = appPhotosManager_1.default.setAttachmentSize(photoID, container, boxWidth, boxHeight, false);\r\n }\r\n image = container.lastElementChild;\r\n if (!image || image.tagName != 'IMG') {\r\n container.append(image = new 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 (message.media.preloader) { // means upload\r\n message.media.preloader.attach(container);\r\n }\r\n else if (!photo.downloaded) {\r\n preloader = new preloader_1.default(container, false);\r\n }\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 || container, 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, play, onlyThumb, emoji }) {\r\n let stickerType = doc.sticker;\r\n if (stickerType == 2 && !lottieLoader_1.default.loaded) {\r\n //LottieLoader.loadLottie();\r\n lottieLoader_1.default.loadLottieWorkers();\r\n }\r\n if (!stickerType) {\r\n console.error('wrong doc for wrapSticker!', doc);\r\n throw new Error('wrong doc for wrapSticker!');\r\n }\r\n div.dataset.docID = doc.id;\r\n //console.log('wrap sticker', doc, div, onlyThumb);\r\n const toneIndex = emoji ? utils_1.getEmojiToneIndex(emoji) : -1;\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 let img = new Image();\r\n if (appWebpManager_1.default.isSupported() || doc.stickerThumbConverted) {\r\n misc_1.renderImageFromUrl(img, appPhotosManager_1.default.getPreviewURLFromThumb(thumb, true));\r\n div.append(img);\r\n }\r\n else {\r\n appWebpManager_1.default.convertToPng(thumb.bytes).then(bytes => {\r\n if (middleware && !middleware())\r\n return;\r\n thumb.bytes = bytes;\r\n doc.stickerThumbConverted = true;\r\n if (!div.childElementCount) {\r\n misc_1.renderImageFromUrl(img, appPhotosManager_1.default.getPreviewURLFromThumb(thumb, true)).then(() => {\r\n div.append(img);\r\n });\r\n }\r\n });\r\n }\r\n if (onlyThumb) {\r\n return Promise.resolve();\r\n }\r\n }\r\n else if (!onlyThumb && stickerType == 2) {\r\n let img = new Image();\r\n let load = () => appDocsManager_1.default.downloadDocThumb(doc, thumb.type).then(url => {\r\n if (!img.parentElement || (middleware && !middleware()))\r\n return;\r\n let promise = misc_1.renderImageFromUrl(img, url);\r\n if (!downloaded) {\r\n promise.then(() => {\r\n div.append(img);\r\n });\r\n }\r\n });\r\n let downloaded = appDocsManager_1.default.hasDownloadedThumb(doc.id, thumb.type);\r\n if (downloaded) {\r\n div.append(img);\r\n }\r\n lazyLoadQueue && !downloaded ? lazyLoadQueue.push({ div, load, wasSeen: group == 'chat' }) : load();\r\n }\r\n }\r\n if (onlyThumb && doc.thumbs) { // for sticker panel\r\n let thumb = doc.thumbs[0];\r\n let load = () => appDocsManager_1.default.downloadDocThumb(doc, thumb.type).then(url => {\r\n let img = new Image();\r\n misc_1.renderImageFromUrl(img, url).then(() => {\r\n if (middleware && !middleware())\r\n return;\r\n div.append(img);\r\n });\r\n });\r\n return lazyLoadQueue ? (lazyLoadQueue.push({ div, load }), Promise.resolve()) : load();\r\n }\r\n let downloaded = doc.downloaded;\r\n let load = () => appDocsManager_1.default.downloadDoc(doc.id).then(blob => {\r\n //console.log('loaded sticker:', doc, div);\r\n if (middleware && !middleware())\r\n return;\r\n //return;\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 /* if(doc.id == '1860749763008266301') {\r\n console.log('loaded sticker:', doc, div);\r\n } */\r\n let animation = yield lottieLoader_1.default.loadAnimationWorker /* loadAnimation */({\r\n container: div,\r\n loop: !emoji,\r\n autoplay: true,\r\n animationData: JSON.parse(json)\r\n }, group, toneIndex);\r\n animation.addListener('ready', () => {\r\n if (div.firstElementChild && div.firstElementChild.tagName == 'IMG') {\r\n div.firstElementChild.remove();\r\n }\r\n });\r\n //console.timeEnd('render sticker' + doc.id);\r\n /* div.addEventListener('mouseover', (e) => {\r\n let animation = LottieLoader.getAnimation(div, group);\r\n \r\n if(animation) {\r\n //console.log('sticker hover', animation, div);\r\n \r\n // @ts-ignore\r\n animation.loop = true;\r\n \r\n // @ts-ignore\r\n if(animation.currentFrame == animation.totalFrames - 1) {\r\n animation.goToAndPlay(0, true);\r\n } else {\r\n animation.play();\r\n }\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 \r\n if(play && false) {\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 (!downloaded && (!div.firstElementChild || div.firstElementChild.tagName != 'IMG')) {\r\n img.style.opacity = '' + 0;\r\n img.addEventListener('load', () => {\r\n window.requestAnimationFrame(() => {\r\n img.style.opacity = '';\r\n });\r\n });\r\n }\r\n misc_1.renderImageFromUrl(img, doc.url).then(() => {\r\n if (div.firstElementChild && div.firstElementChild != img) {\r\n div.firstElementChild.remove();\r\n }\r\n div.append(img);\r\n });\r\n }\r\n });\r\n return lazyLoadQueue && (!doc.downloaded || stickerType == 2) ? (lazyLoadQueue.push({ div, load, wasSeen: group == 'chat' && stickerType != 2 }), Promise.resolve()) : load();\r\n}\r\nexports.wrapSticker = wrapSticker;\r\nfunction wrapReply(title, subtitle, message) {\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 let media = message && message.media;\r\n if (media) {\r\n replySubtitle.innerHTML = message.rReply;\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(() => {\r\n misc_1.renderImageFromUrl(replyMedia, photo._ == 'photo' ? photo.url : appPhotosManager_1.default.getDocumentCachedThumb(photo.id).url);\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\nfunction wrapAlbum({ groupID, attachmentDiv, middleware, uploading, lazyLoadQueue, isOut }) {\r\n let items = [];\r\n // higher msgID will be the last in album\r\n let storage = appMessagesManager_1.default.groupedMessagesStorage[groupID];\r\n for (let mid in storage) {\r\n let m = appMessagesManager_1.default.getMessage(+mid);\r\n let media = m.media.photo || m.media.document;\r\n let size = media._ == 'photo' ? appPhotosManager_1.default.choosePhotoSize(media, 480, 480) : { w: media.w, h: media.h };\r\n items.push({ size, media, message: m });\r\n }\r\n let spacing = 2;\r\n let layouter = new groupedLayout_1.Layouter(items.map(i => ({ w: i.size.w, h: i.size.h })), 451, 100, spacing);\r\n let layout = layouter.layout();\r\n console.log('layout:', layout, items.map(i => ({ w: i.size.w, h: i.size.h })));\r\n /* let borderRadius = window.getComputedStyle(realParent).getPropertyValue('border-radius');\r\n let brSplitted = fillPropertyValue(borderRadius); */\r\n for (let { geometry, sides } of layout) {\r\n let item = items.shift();\r\n if (!item) {\r\n console.error('no item for layout!');\r\n continue;\r\n }\r\n let { size, media, message } = item;\r\n let div = document.createElement('div');\r\n div.classList.add('album-item');\r\n div.dataset.mid = message.mid;\r\n div.style.width = geometry.width + 'px';\r\n div.style.height = geometry.height + 'px';\r\n div.style.top = geometry.y + 'px';\r\n div.style.left = geometry.x + 'px';\r\n if (sides & groupedLayout_1.RectPart.Right) {\r\n attachmentDiv.style.width = geometry.width + geometry.x + 'px';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Bottom) {\r\n attachmentDiv.style.height = geometry.height + geometry.y + 'px';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Left && sides & groupedLayout_1.RectPart.Top) {\r\n div.style.borderTopLeftRadius = 'inherit';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Left && sides & groupedLayout_1.RectPart.Bottom) {\r\n div.style.borderBottomLeftRadius = 'inherit';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Right && sides & groupedLayout_1.RectPart.Top) {\r\n div.style.borderTopRightRadius = 'inherit';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Right && sides & groupedLayout_1.RectPart.Bottom) {\r\n div.style.borderBottomRightRadius = 'inherit';\r\n }\r\n if (media._ == 'photo') {\r\n wrapPhoto(media.id, message, div, 0, 0, false, isOut, lazyLoadQueue, middleware, size);\r\n }\r\n else {\r\n wrapVideo({\r\n doc: message.media.document,\r\n container: div,\r\n message,\r\n boxWidth: 0,\r\n boxHeight: 0,\r\n withTail: false,\r\n isOut,\r\n lazyLoadQueue,\r\n middleware\r\n });\r\n }\r\n // @ts-ignore\r\n //div.style.backgroundColor = '#' + Math.floor(Math.random() * (2 ** 24 - 1)).toString(16).padStart(6, '0');\r\n attachmentDiv.append(div);\r\n }\r\n}\r\nexports.wrapAlbum = wrapAlbum;\r\nfunction wrapPoll(pollID, mid) {\r\n let elem = new poll_1.default();\r\n elem.setAttribute('poll-id', pollID);\r\n elem.setAttribute('message-id', '' + mid);\r\n return elem;\r\n}\r\nexports.wrapPoll = wrapPoll;\r\n"
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"index": 9,
"index2": 74,
"size": 10374,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./pages/pageSignIn",
"loc": "73:57-86"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "./pageSignIn",
"loc": "6:37-60"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "./pageSignIn",
"loc": "39:37-60"
}
],
"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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst misc_1 = require(\"../components/misc\");\r\nconst scrollable_new_1 = __importDefault(require(\"../components/scrollable_new\"));\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\nconst pageSignQR_1 = __importDefault(require(\"./pageSignQR\"));\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_new_1.default(wrapper);\r\n let initedSelect = false;\r\n page.pageEl.querySelector('.a-qr').addEventListener('click', () => {\r\n pageSignQR_1.default.mount();\r\n });\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 = `<span class=\"emoji-inner\" style=\"background: url(${sheetUrl}${sheetNo}.png);background-position:${xPos}% ${yPos}%;background-size:${sizeX}% ${sizeY}%\" data-codepoints=\"${unified}\"></span>`;\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 //return;\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": 33,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"name": "./src/lib/appManagers/appSidebarRight.ts",
"index": 52,
"index2": 60,
"size": 32542,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appSidebarRight",
"loc": "17:42-70"
},
{
"moduleId": 35,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"module": "./src/components/appForward.ts",
"moduleName": "./src/components/appForward.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appSidebarRight",
"loc": "6:42-87"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appSidebarRight",
"loc": "20:42-82"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\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(\"../../components/misc\");\r\n//import Scrollable from '../../components/scrollable';\r\nconst scrollable_new_1 = __importDefault(require(\"../../components/scrollable_new\"));\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 appForward_1 = __importDefault(require(\"../../components/appForward\"));\r\nconst testScroll = false;\r\nlet 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 });\r\n};\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.contentContainer = this.sidebarEl.querySelector('.content-container');\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.loadSidebarMediaPromises = {};\r\n this.loadedAllMedia = {};\r\n this.sharedMediaTypes = [\r\n 'members',\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.lazyLoadQueue = new lazyLoadQueue_1.default(5);\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.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 this.loadMutex = Promise.resolve();\r\n let container = this.profileContentEl.querySelector('.content-container .tabs-container');\r\n this.profileTabs = this.profileContentEl.querySelector('.profile-tabs');\r\n this.scroll = new scrollable_new_1.default(this.profileContainer, 'y', 'SR', undefined, 400);\r\n this.scroll.onScrolledBottom = () => {\r\n if (this.sharedMediaSelected && this.sharedMediaSelected.childElementCount /* && false */) {\r\n this.log('onScrolledBottom will load media');\r\n this.loadSidebarMedia(true);\r\n }\r\n };\r\n //this.scroll.attachSentinels(undefined, 400);\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.profileTabs.offsetTop) {\r\n this.scroll.scrollTop -= this.profileTabs.offsetTop;\r\n }\r\n /* this.log('setVirtualContainer', id, this.sharedMediaSelected, this.sharedMediaSelected.childElementCount);\r\n this.scroll.setVirtualContainer(this.sharedMediaSelected); */\r\n if (this.prevTabID != -1 && !this.sharedMediaSelected.childElementCount) { // quick brown fix\r\n //this.contentContainer.classList.remove('loaded');\r\n this.loadSidebarMedia(true);\r\n }\r\n this.prevTabID = id;\r\n });\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((a, b) => a - b);\r\n let idx = ids.findIndex(i => i == messageID);\r\n let targets = ids.map(id => ({ element: this.mediaDivsByIDs[id].firstElementChild, mid: id }));\r\n appMediaViewer_1.default.openMedia(message, target, false, this.sidebarEl, targets.slice(idx + 1).reverse(), targets.slice(0, idx).reverse(), true);\r\n });\r\n this.profileElements.notificationsCheckbox.addEventListener('change', () => {\r\n //let checked = this.profileElements.notificationsCheckbox.checked;\r\n appImManager_1.default.mutePeer(this.peerID);\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 toggleSidebar(enable) {\r\n /////this.log('sidebarEl', this.sidebarEl, enable, isElementInViewport(this.sidebarEl));\r\n let active = this.sidebarEl.classList.contains('active');\r\n let willChange;\r\n if (enable !== undefined) {\r\n if (enable) {\r\n if (!active) {\r\n willChange = true;\r\n }\r\n }\r\n else if (active) {\r\n willChange = true;\r\n }\r\n }\r\n else {\r\n willChange = true;\r\n }\r\n if (!willChange)\r\n return Promise.resolve();\r\n let set = () => {\r\n this.sidebarEl.classList.toggle('active', enable);\r\n };\r\n return new Promise((resolve, reject) => {\r\n let hidden = [];\r\n let observer = new IntersectionObserver((entries) => {\r\n for (let entry of entries) {\r\n let bubble = entry.target;\r\n if (!entry.isIntersecting) {\r\n hidden.push({ element: bubble, height: bubble.scrollHeight });\r\n }\r\n }\r\n for (let item of hidden) {\r\n item.element.style.minHeight = item.height + 'px';\r\n item.element.firstElementChild.style.display = 'none';\r\n item.element.style.width = '1px';\r\n }\r\n //console.log('hidden', hidden);\r\n observer.disconnect();\r\n set();\r\n setTimeout(() => {\r\n for (let item of hidden) {\r\n item.element.style.minHeight = '';\r\n item.element.style.width = '';\r\n item.element.firstElementChild.style.display = '';\r\n }\r\n if (enable == false || (this.sidebarEl.classList.contains('active') && enable == undefined)) {\r\n appForward_1.default.close();\r\n this.searchCloseBtn.click();\r\n }\r\n resolve();\r\n }, 200);\r\n });\r\n let length = Object.keys(appImManager_1.default.bubbles).length;\r\n if (length) {\r\n for (let i in appImManager_1.default.bubbles) {\r\n observer.observe(appImManager_1.default.bubbles[i]);\r\n }\r\n }\r\n else {\r\n set();\r\n setTimeout(resolve, 200);\r\n }\r\n });\r\n }\r\n filterMessagesByType(ids, type) {\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 filtered = [];\r\n switch (type) {\r\n case 'inputMessagesFilterPhotoVideo': {\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 filtered.push(message);\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterDocument': {\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 filtered.push(message);\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterUrl': {\r\n for (let message of messages) {\r\n if (!message.media.webpage || message.media.webpage._ == 'webPageEmpty') {\r\n continue;\r\n }\r\n filtered.push(message);\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterMusic': {\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 filtered.push(message);\r\n }\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n return filtered;\r\n }\r\n performSearchResult(messages, type) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let peerID = this.peerID;\r\n let sharedMediaDiv;\r\n let elemsToAppend = [];\r\n let promises = [];\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 let div = document.createElement('div');\r\n div.classList.add('media-item');\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 let isDownloaded;\r\n if (photo) {\r\n isDownloaded = photo.downloaded > 0;\r\n }\r\n else {\r\n let cachedThumb = appPhotosManager_1.default.getDocumentCachedThumb(media.id);\r\n isDownloaded = (cachedThumb === null || cachedThumb === void 0 ? void 0 : cachedThumb.downloaded) > 0;\r\n }\r\n let img = new Image();\r\n img.classList.add('media-image');\r\n div.append(img);\r\n //this.log('inputMessagesFilterPhotoVideo', message, media);\r\n if (!isPhoto) {\r\n let span = document.createElement('span');\r\n span.classList.add('video-time');\r\n div.append(span);\r\n if (media.type != 'gif') {\r\n span.innerText = (media.duration + '').toHHMMSS(false);\r\n /* let spanPlay = document.createElement('span');\r\n spanPlay.classList.add('video-play', 'tgico-largeplay', 'btn-circle', 'position-center');\r\n div.append(spanPlay); */\r\n }\r\n else {\r\n span.innerText = 'GIF';\r\n }\r\n }\r\n let load = () => appPhotosManager_1.default.preloadPhoto(isPhoto ? media.id : media, appPhotosManager_1.default.choosePhotoSize(media, 200, 200))\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 let url = (photo && photo.url) || appPhotosManager_1.default.getDocumentCachedThumb(media.id).url;\r\n if (url) {\r\n misc_1.renderImageFromUrl(img, url);\r\n }\r\n });\r\n img.dataset.mid = '' + message.mid;\r\n let sizes = media.sizes || media.thumbs;\r\n if (isDownloaded || (sizes && sizes[0].bytes)) {\r\n let promise = new Promise((resolve, reject) => {\r\n img.addEventListener('load', () => {\r\n clearTimeout(timeout);\r\n resolve();\r\n });\r\n let timeout = setTimeout(() => {\r\n this.log('did not loaded', img, media, isDownloaded, sizes);\r\n reject();\r\n }, 1e3);\r\n });\r\n promises.push(promise);\r\n }\r\n if (isDownloaded)\r\n load();\r\n else {\r\n if (sizes && sizes[0].bytes) {\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, img, false, false);\r\n }\r\n this.lazyLoadQueue.push({ div, load });\r\n }\r\n elemsToAppend.push(div);\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 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 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 previewDiv.innerText = (webpage.title || webpage.description || webpage.url || webpage.display_url).slice(0, 1);\r\n previewDiv.classList.add('empty');\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 previewDiv.classList.remove('empty');\r\n previewDiv.innerText = '';\r\n misc_1.renderImageFromUrl(previewDiv, webpage.photo.url);\r\n });\r\n this.lazyLoadQueue.push({ div: previewDiv, load });\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 <div class=\"title\">${title}</div>\r\n <div class=\"subtitle\">${subtitle}</div>\r\n <div class=\"url\">${url}</div>\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 let div = wrappers_1.wrapAudio(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', messages);\r\n break;\r\n }\r\n if (this.loadMutex) {\r\n promises.push(this.loadMutex);\r\n }\r\n if (elemsToAppend.length) {\r\n if (promises.length) {\r\n yield Promise.all(promises);\r\n if (this.peerID != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n }\r\n sharedMediaDiv.append(...elemsToAppend);\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 //this.contentContainer.classList.add('loaded');\r\n }\r\n }\r\n });\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, this.loadSidebarMediaPromises);\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 loadCount = (appPhotosManager_1.default.windowH / 130 | 0) * 3; // that's good for all types\r\n let historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = {});\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 // render from cache\r\n if (history.length && this.usedFromHistory[type] < history.length) {\r\n let messages = [];\r\n let used = this.usedFromHistory[type];\r\n do {\r\n let ids = history.slice(used, used + loadCount);\r\n this.log('loadSidebarMedia: will render from cache', used, history, ids, loadCount);\r\n used += ids.length;\r\n messages.push(...this.filterMessagesByType(ids, type));\r\n } while (messages.length < loadCount && used < history.length);\r\n // если перебор\r\n if (messages.length > loadCount) {\r\n let diff = messages.length - loadCount;\r\n messages = messages.slice(0, messages.length - diff);\r\n used -= diff;\r\n }\r\n this.usedFromHistory[type] = used;\r\n if (messages.length) {\r\n return this.performSearchResult(messages, type);\r\n }\r\n return Promise.resolve();\r\n }\r\n // заливать новую картинку сюда только после полной отправки!\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('loadSidebarMedia: 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('loadSidebarMedia: search house of glass', type, value, ids);\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 this.usedFromHistory[type] = history.length;\r\n if (ids.length) {\r\n return this.performSearchResult(this.filterMessagesByType(ids, type), 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);\r\n }\r\n cleanup() {\r\n this.loadSidebarMediaPromises = {};\r\n this.loadedAllMedia = {};\r\n this.prevTabID = -1;\r\n this.mediaDivsByIDs = {};\r\n this.lazyLoadQueue.clear();\r\n this.sharedMediaTypes.forEach(type => {\r\n this.usedFromHistory[type] = 0;\r\n });\r\n this.sharedMediaType = 'inputMessagesFilterPhotoVideo';\r\n }\r\n cleanupHTML() {\r\n //this.contentContainer.classList.remove('loaded');\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 if (this.urlsToRevoke.length) {\r\n this.urlsToRevoke.forEach(url => {\r\n URL.revokeObjectURL(url);\r\n });\r\n this.urlsToRevoke.length = 0;\r\n }\r\n Object.keys(this.sharedMedia).forEach(key => {\r\n this.sharedMedia[key].innerHTML = '';\r\n if (!this.historiesStorage[this.peerID] || !this.historiesStorage[this.peerID][key]) {\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 });\r\n if (testScroll) {\r\n for (let i = 0; i < 30; ++i) {\r\n //div.insertAdjacentHTML('beforeend', `<div style=\"background-image: url(assets/img/camomile.jpg);\"></div>`);\r\n let div = document.createElement('div');\r\n div.classList.add('media-item');\r\n div.dataset.id = '' + (i / 3 | 0);\r\n div.innerText = '' + (i / 3 | 0);\r\n this.sharedMedia.contentMedia.append(div);\r\n }\r\n this.profileTabs.children[1].click(); // set media\r\n }\r\n this.profileTabs.firstElementChild.children[1].click(); // set media\r\n }\r\n setLoadMutex(promise) {\r\n this.loadMutex = promise;\r\n }\r\n setPeer(peerID) {\r\n this.peerID = peerID;\r\n this.cleanup();\r\n }\r\n fillProfileElements() {\r\n let peerID = this.peerID = utils_1.$rootScope.selectedPeerID;\r\n this.cleanupHTML();\r\n this.profileElements.avatar.setAttribute('peer', '' + peerID);\r\n // username\r\n if (peerID != utils_1.$rootScope.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)[0];\r\n if (dialog) {\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 });\r\n }\r\n let membersLi = this.profileTabs.firstElementChild.children[0];\r\n if (peerID > 0) {\r\n membersLi.style.display = 'none';\r\n let user = appUsersManager_1.default.getUser(peerID);\r\n if (user.phone && peerID != utils_1.$rootScope.myID) {\r\n setText(user.rPhone, 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 != utils_1.$rootScope.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 });\r\n }\r\n else {\r\n membersLi.style.display = appPeersManager_1.default.isBroadcast(peerID) ? 'none' : '';\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 });\r\n }\r\n }\r\n}\r\nexports.default = new AppSidebarRight();\r\n"
},
{
"id": 34,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"name": "./src/lib/appManagers/appMediaViewer.ts",
"index": 53,
"index2": 56,
"size": 37157,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appMediaViewer",
"loc": "20:41-68"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appMediaViewer",
"loc": "46:41-68"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appMediaViewer",
"loc": "22:41-80"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppMediaViewer = void 0;\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 lazyLoadQueue_1 = __importDefault(require(\"../../components/lazyLoadQueue\"));\r\nconst appForward_1 = __importDefault(require(\"../../components/appForward\"));\r\nclass AppMediaViewer {\r\n constructor() {\r\n this.wholeDiv = document.querySelector('.media-viewer-whole');\r\n this.overlaysDiv = this.wholeDiv.firstElementChild;\r\n this.author = {\r\n avatarEl: this.overlaysDiv.querySelector('.media-viewer-userpic'),\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 this.content = {\r\n container: this.overlaysDiv.querySelector('.media-viewer-media'),\r\n caption: this.overlaysDiv.querySelector('.media-viewer-caption'),\r\n mover: null\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.needLoadMore = true;\r\n this.pageEl = document.getElementById('page-chats');\r\n this.log = polyfill_1.logger('AMV');\r\n this.preloader = new preloader_1.default();\r\n this.lazyLoadQueue = new lazyLoadQueue_1.default(5, false);\r\n misc_1.parseMenuButtonsTo(this.buttons, this.wholeDiv.querySelectorAll(`[class*='menu']`));\r\n this.onKeyDownBinded = this.onKeyDown.bind(this);\r\n this.buttons.close.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\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.lazyLoadQueue.clear();\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 appForward_1.default.close();\r\n window.removeEventListener('keydown', this.onKeyDownBinded);\r\n });\r\n this.buttons.prev.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n if (this.setMoverPromise)\r\n return;\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', (e) => {\r\n utils_1.cancelEvent(e);\r\n if (this.setMoverPromise)\r\n return;\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.buttons.forward.addEventListener('click', () => {\r\n appForward_1.default.init([this.currentMessageID]);\r\n });\r\n this.onClickBinded = (e) => {\r\n utils_1.cancelEvent(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.wholeDiv.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 this.setNewMover();\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 var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\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 let aspecter;\r\n if (target instanceof HTMLImageElement || target instanceof HTMLVideoElement) {\r\n if (mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter')) {\r\n aspecter = mover.firstElementChild;\r\n let player = aspecter.querySelector('.ckin__player');\r\n if (player) {\r\n let video = player.firstElementChild;\r\n aspecter.append(video);\r\n player.remove();\r\n }\r\n if (!aspecter.style.cssText) { // всё из-за видео, элементы управления скейлятся, так бы можно было этого не делать\r\n mover.classList.remove('active');\r\n this.setFullAspect(aspecter, containerRect, rect);\r\n void mover.offsetLeft; // reflow\r\n mover.classList.add('active');\r\n }\r\n }\r\n else {\r\n aspecter = document.createElement('div');\r\n aspecter.classList.add('media-viewer-aspecter', 'disable-hover');\r\n mover.prepend(aspecter);\r\n }\r\n aspecter.style.cssText = `width: ${rect.width}px; height: ${rect.height}px; transform: scale(${containerRect.width / rect.width}, ${containerRect.height / rect.height});`;\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 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 = utils_1.fillPropertyValue(borderRadius);\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 mediaElement;\r\n let src;\r\n if (target.tagName == 'DIV') { // useContainerAsTarget\r\n if (target.firstElementChild) {\r\n mediaElement = new Image();\r\n src = target.firstElementChild.src;\r\n mover.append(mediaElement);\r\n }\r\n /* mediaElement = new Image();\r\n src = target.style.backgroundImage.slice(5, -2); */\r\n }\r\n else if (target instanceof HTMLImageElement) {\r\n mediaElement = new Image();\r\n src = target.src;\r\n }\r\n else if (target instanceof HTMLVideoElement) {\r\n let video = mediaElement = document.createElement('video');\r\n let source = document.createElement('source');\r\n src = (_a = target.querySelector('source')) === null || _a === void 0 ? void 0 : _a.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 foreignObject = newSvg.lastElementChild;\r\n foreignObject.setAttributeNS(null, 'width', '' + containerRect.width);\r\n foreignObject.setAttributeNS(null, 'height', '' + containerRect.height);\r\n mover.prepend(newSvg);\r\n }\r\n if (aspecter) {\r\n aspecter.style.borderRadius = borderRadius;\r\n aspecter.append(mediaElement);\r\n }\r\n mediaElement = mover.querySelector('video, img');\r\n if (mediaElement instanceof HTMLImageElement) {\r\n yield new Promise((resolve, reject) => {\r\n mediaElement.addEventListener('load', resolve);\r\n if (src) {\r\n mediaElement.src = src;\r\n }\r\n });\r\n }\r\n else if (mediaElement instanceof HTMLVideoElement && mediaElement.firstElementChild && (mediaElement.firstElementChild.src || src)) {\r\n yield new Promise((resolve, reject) => {\r\n mediaElement.addEventListener('loadeddata', resolve);\r\n if (src) {\r\n mediaElement.firstElementChild.src = src;\r\n }\r\n });\r\n }\r\n mover.style.display = '';\r\n window.requestAnimationFrame(() => {\r\n mover.classList.add(wasActive ? 'moving' : 'active');\r\n });\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 if (target.classList.contains('media-viewer-media')) {\r\n mover.classList.add('hiding');\r\n }\r\n setTimeout(() => {\r\n this.wholeDiv.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 }, delay / 2);\r\n setTimeout(() => {\r\n mover.innerHTML = '';\r\n mover.classList.remove('moving', 'active', 'hiding');\r\n mover.style.display = 'none';\r\n }, delay);\r\n return;\r\n }\r\n //await new Promise((resolve) => setTimeout(resolve, 0));\r\n yield new Promise((resolve) => window.requestAnimationFrame(resolve));\r\n //throw '';\r\n mover.style.transform = `translate(${containerRect.left}px,${containerRect.top}px) scale(1,1)`;\r\n if (aspecter) {\r\n this.setFullAspect(aspecter, containerRect, rect);\r\n }\r\n setTimeout(() => {\r\n mover.style.borderRadius = '';\r\n if (mover.firstElementChild) {\r\n mover.firstElementChild.style.borderRadius = '';\r\n }\r\n }, delay / 2);\r\n mover.dataset.timeout = '' + setTimeout(() => {\r\n mover.classList.remove('moving');\r\n if (aspecter) { // всё из-за видео, элементы управления скейлятся, так бы можно было этого не делать\r\n if (mover.querySelector('video')) {\r\n mover.classList.remove('active');\r\n aspecter.style.cssText = '';\r\n void mover.offsetLeft; // reflow\r\n }\r\n aspecter.classList.remove('disable-hover');\r\n }\r\n mover.classList.add('active');\r\n delete mover.dataset.timeout;\r\n }, delay);\r\n if (path) {\r\n this.sizeTailPath(path, containerRect, scaleX, delay, true, isOut, borderRadius);\r\n }\r\n });\r\n }\r\n setFullAspect(aspecter, containerRect, rect) {\r\n let media = aspecter.firstElementChild;\r\n let proportion;\r\n if (media instanceof HTMLImageElement) {\r\n proportion = media.naturalWidth / media.naturalHeight;\r\n }\r\n else if (media instanceof HTMLVideoElement) {\r\n proportion = media.videoWidth / media.videoHeight;\r\n }\r\n let { width, height } = rect;\r\n /* if(proportion == 1) {\r\n aspecter.style.cssText = '';\r\n } else { */\r\n if (proportion > 0) {\r\n width = height * proportion;\r\n }\r\n else {\r\n height = width * proportion;\r\n }\r\n //this.log('will set style aspecter:', `width: ${width}px; height: ${height}px; transform: scale(${containerRect.width / width}, ${containerRect.height / height});`);\r\n aspecter.style.cssText = `width: ${width}px; height: ${height}px; transform: scale(${containerRect.width / width}, ${containerRect.height / height});`;\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.remove('active');\r\n mover.classList.add('moving');\r\n if (mover.dataset.timeout) { // и это тоже всё из-за скейла видео, так бы это не нужно было\r\n clearTimeout(+mover.dataset.timeout);\r\n }\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 if (this.content.mover) {\r\n let oldMover = this.content.mover;\r\n oldMover.parentElement.append(newMover);\r\n }\r\n else {\r\n this.wholeDiv.append(newMover);\r\n }\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 = [], needLoadMore = true) {\r\n if (this.setMoverPromise)\r\n return this.setMoverPromise;\r\n this.log('openMedia doc:', message);\r\n const media = message.media.photo || message.media.document || message.media.webpage.document || message.media.webpage.photo;\r\n const isVideo = media.mime_type == 'video/mp4';\r\n const 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.needLoadMore = needLoadMore;\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 const container = this.content.container;\r\n const 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.needLoadMore) {\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 }\r\n if (container.firstElementChild) {\r\n container.innerHTML = '';\r\n }\r\n const date = new Date(media.date * 1000);\r\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n const dateStr = months[date.getMonth()] + ' ' + date.getDate() + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\r\n this.author.date.innerText = dateStr;\r\n const 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 let oldAvatar = this.author.avatarEl;\r\n // @ts-ignore\r\n this.author.avatarEl = this.author.avatarEl.cloneNode();\r\n this.author.avatarEl.setAttribute('peer', '' + message.fromID);\r\n oldAvatar.parentElement.replaceChild(this.author.avatarEl, oldAvatar);\r\n // ok set\r\n const 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.wholeDiv.classList.add('active');\r\n }\r\n ////////this.log('wasActive:', wasActive);\r\n const mover = this.content.mover;\r\n //const maxWidth = appPhotosManager.windowW - 16;\r\n const maxWidth = this.pageEl.scrollWidth - 16;\r\n const maxHeight = appPhotosManager_1.default.windowH - 100;\r\n const size = appPhotosManager_1.default.setAttachmentSize(isVideo ? media : media.id, container, maxWidth, maxHeight);\r\n // need after setAttachmentSize\r\n /* if(useContainerAsTarget) {\r\n target = target.querySelector('img, video') || target;\r\n } */\r\n let setMoverPromise;\r\n if (isVideo) {\r\n ////////this.log('will wrap video', media, size);\r\n setMoverPromise = this.setMoverToTarget(target, false, fromRight).then(() => {\r\n //return; // set and don't move\r\n //if(wasActive) return;\r\n //return;\r\n let video = mover.querySelector('video') || document.createElement('video');\r\n let source = video.firstElementChild || document.createElement('source');\r\n if (media.type == 'gif') {\r\n video.autoplay = true;\r\n video.loop = true;\r\n }\r\n let createPlayer = () => {\r\n if (media.type != 'gif') {\r\n video.dataset.ckin = 'default';\r\n video.dataset.overlay = '1';\r\n let player = new mediaPlayer_1.default(video, true);\r\n /* player.wrapper.parentElement.append(video);\r\n mover.append(player.wrapper); */\r\n }\r\n else {\r\n video.play();\r\n }\r\n };\r\n if (!source || !source.src) {\r\n let load = () => {\r\n let promise = appDocsManager_1.default.downloadDoc(media);\r\n this.preloader.attach(mover, true, promise);\r\n promise.then(() => {\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 div = mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter') ? mover.firstElementChild : mover;\r\n let image = div.firstElementChild;\r\n if (image instanceof HTMLImageElement) {\r\n image.remove();\r\n }\r\n misc_1.renderImageFromUrl(source, url);\r\n source.type = media.mime_type;\r\n if (!source.parentElement) {\r\n video.append(source);\r\n }\r\n if (!video.parentElement) {\r\n div.prepend(video);\r\n }\r\n }\r\n createPlayer();\r\n });\r\n return promise;\r\n };\r\n this.lazyLoadQueue.unshift({\r\n div: null,\r\n load,\r\n wasSeen: true\r\n });\r\n }\r\n else\r\n createPlayer();\r\n });\r\n }\r\n else {\r\n setMoverPromise = this.setMoverToTarget(target, false, fromRight).then(() => {\r\n //return; // set and don't move\r\n //if(wasActive) return;\r\n //return;\r\n let load = () => {\r\n let cancellablePromise = appPhotosManager_1.default.preloadPhoto(media.id, size);\r\n this.preloader.attach(mover, true, cancellablePromise);\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, 'img');\r\n this.updateMediaSource(mover, url, 'img');\r\n }\r\n else {\r\n let div = mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter') ? mover.firstElementChild : mover;\r\n let image = div.firstElementChild;\r\n if (!image || image.tagName != 'IMG') {\r\n image = new Image();\r\n }\r\n //this.log('will renderImageFromUrl:', image, div, target);\r\n misc_1.renderImageFromUrl(image, url).then(() => {\r\n div.append(image);\r\n });\r\n }\r\n this.preloader.detach();\r\n }).catch(err => {\r\n this.log.error(err);\r\n });\r\n return cancellablePromise;\r\n };\r\n this.lazyLoadQueue.unshift({\r\n div: null,\r\n load,\r\n wasSeen: true\r\n });\r\n });\r\n }\r\n return this.setMoverPromise = setMoverPromise.then(() => {\r\n this.setMoverPromise = null;\r\n });\r\n }\r\n}\r\nexports.AppMediaViewer = AppMediaViewer;\r\nexports.default = new AppMediaViewer();\r\n"
},
{
"id": 35,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"name": "./src/components/appForward.ts",
"index": 56,
"index2": 55,
"size": 2897,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/appForward",
"loc": "33:37-75"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../../components/appForward",
"loc": "50:37-75"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../../components/appForward",
"loc": "27:37-75"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 appSidebarRight_1 = __importDefault(require(\"../lib/appManagers/appSidebarRight\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst misc_1 = require(\"./misc\");\r\nconst appSelectPeers_1 = require(\"./appSelectPeers\");\r\nclass AppForward {\r\n constructor() {\r\n this.container = document.getElementById('forward-container');\r\n this.closeBtn = this.container.querySelector('.sidebar-close-button');\r\n this.sendBtn = this.container.querySelector('.btn-circle');\r\n this.msgIDs = [];\r\n this.closeBtn.addEventListener('click', this.close.bind(this));\r\n this.sendBtn.addEventListener('click', () => {\r\n let peerIDs = this.selector.getSelected();\r\n if (this.msgIDs.length && peerIDs.length) {\r\n this.sendBtn.classList.remove('tgico-send');\r\n this.sendBtn.disabled = true;\r\n misc_1.putPreloader(this.sendBtn);\r\n this.selector.freezed = true;\r\n let s = () => {\r\n let promises = peerIDs.splice(0, 3).map(peerID => {\r\n return appMessagesManager_1.default.forwardMessages(peerID, this.msgIDs);\r\n });\r\n Promise.all(promises).then(() => {\r\n if (peerIDs.length) {\r\n return s();\r\n }\r\n else {\r\n this.closeBtn.click();\r\n }\r\n });\r\n };\r\n s();\r\n }\r\n });\r\n }\r\n close() {\r\n this.cleanup();\r\n this.container.classList.remove('active');\r\n }\r\n cleanup() {\r\n if (this.selector) {\r\n this.selector.container.remove();\r\n this.selector = null;\r\n }\r\n }\r\n init(ids) {\r\n this.cleanup();\r\n this.msgIDs = ids;\r\n this.container.classList.add('active');\r\n this.sendBtn.innerHTML = '';\r\n this.sendBtn.classList.add('tgico-send');\r\n this.sendBtn.disabled = false;\r\n this.selector = new appSelectPeers_1.AppSelectPeers(this.container, (length) => {\r\n if (length) {\r\n this.sendBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.sendBtn.classList.remove('is-visible');\r\n }\r\n }, 'dialogs', () => {\r\n console.log('forward rendered:', this.container.querySelector('.selector ul').childElementCount);\r\n appSidebarRight_1.default.toggleSidebar(true);\r\n });\r\n }\r\n}\r\nexports.default = new AppForward();\r\n"
},
{
"id": 36,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"name": "./src/lib/services.ts",
"index": 58,
"index2": 53,
"size": 3685,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"issuerId": 46,
"issuerName": "./src/lib/appManagers/appSidebarLeft.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 46,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"name": "./src/lib/appManagers/appSidebarLeft.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 499,
"building": 260,
"dependencies": 3
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/services",
"loc": "22:19-45"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../services",
"loc": "36:19-41"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "../services",
"loc": "9:19-41"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.appDialogsManager = exports.appMediaViewer = exports.appSidebarLeft = exports.appSidebarRight = exports.appDocsManager = exports.appStickersManager = exports.appPeersManager = exports.appImManager = exports.appProfileManager = exports.appMessagesManager = exports.appPhotosManager = exports.apiUpdatesManager = exports.appMessagesIDsManager = exports.appChatsManager = exports.appUsersManager = void 0;\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": 37,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appStickersManager.ts",
"name": "./src/lib/appManagers/appStickersManager.ts",
"index": 59,
"index2": 48,
"size": 5493,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appStickersManager",
"loc": "34:45-76"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appStickersManager",
"loc": "18:45-88"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appStickersManager",
"loc": "22:45-93"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 this.saveStickers(set.documents);\r\n }\r\n this.stickerSets = sets;\r\n }\r\n //if(!this.stickerSets['emoji']) {\r\n this.getStickerSet({ id: 'emoji', access_hash: '' }, { overwrite: true });\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 doc = appDocsManager_1.default.saveDoc(doc);\r\n this.documents[doc.id] = doc;\r\n return doc;\r\n }\r\n saveStickers(docs) {\r\n docs.forEach((doc, idx) => {\r\n docs[idx] = this.saveSticker(doc);\r\n });\r\n }\r\n getSticker(fileID) {\r\n return this.documents[fileID];\r\n }\r\n getStickerSet(set, params = {}) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.stickerSets[set.id] && !params.overwrite)\r\n return this.stickerSets[set.id];\r\n let promise = mtprotoworker_1.default.invokeApi('messages.getStickerSet', {\r\n stickerset: set.id == 'emoji' ? {\r\n _: 'inputStickerSetAnimatedEmoji'\r\n } : {\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, set.id);\r\n return stickerSet;\r\n });\r\n }\r\n getRecentStickers() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let res = yield mtprotoworker_1.default.invokeApi('messages.getRecentStickers', { flags: 0, hash: 0 });\r\n this.saveStickers(res.stickers);\r\n return res;\r\n });\r\n }\r\n getAnimatedEmojiSticker(emoji) {\r\n let stickerSet = this.stickerSets.emoji;\r\n emoji = emoji.replace(/\\ufe0f/g, '').replace(/🏻|🏼|🏽|🏾|🏿/g, '');\r\n return stickerSet.documents.find(doc => doc.stickerEmojiRaw == emoji);\r\n }\r\n saveStickerSet(res, 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 this.saveStickers(res.documents);\r\n //console.log('stickers wrote', this.stickerSets);\r\n if (this.saveSetsTimeout)\r\n return;\r\n this.saveSetsTimeout = setTimeout(() => {\r\n storage_1.default.set({\r\n stickerSets: this.stickerSets\r\n });\r\n this.saveSetsTimeout = 0;\r\n }, 0);\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 getStickerSetThumb(stickerSet) {\r\n var _a;\r\n let thumb = stickerSet.thumb;\r\n let dcID = stickerSet.thumb_dc_id;\r\n let isAnimated = (_a = stickerSet.pFlags) === null || _a === void 0 ? void 0 : _a.animated;\r\n let promise = apiFileManager_1.default.downloadFile(dcID, {\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 }, thumb.size, {\r\n stickerType: isAnimated ? 2 : 1,\r\n mimeType: isAnimated ? \"application/x-tgsticker\" : 'image/webp'\r\n });\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\nconst appStickersManager = new AppStickersManager();\r\nwindow.appStickersManager = appStickersManager;\r\nexports.default = appStickersManager;\r\n"
},
{
"id": 39,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebpManager.ts",
"name": "./src/lib/appManagers/appWebpManager.ts",
"index": 39,
"index2": 28,
"size": 3534,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"issuerId": 31,
"issuerName": "./src/components/wrappers.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 31,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"name": "./src/components/wrappers.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 314,
"building": 338,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../appManagers/appWebpManager",
"loc": "22:41-81"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appWebpManager",
"loc": "48:41-85"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass AppWebpManager {\r\n constructor() {\r\n this.webpMachine = null;\r\n this.queue = [];\r\n this.testPromise = null;\r\n this.webpSupport = false;\r\n this.testWebpSupport();\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.testWebpSupport();\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 }\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 { 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 res = yield this.busyPromise;\r\n console.log('converted webp', res);\r\n callback(res);\r\n this.busyPromise = null;\r\n if (this.queue.length) {\r\n this.processQueue();\r\n }\r\n });\r\n }\r\n testWebpSupport() {\r\n if (this.testPromise)\r\n return this.testPromise;\r\n return this.testPromise = new Promise((resolve, reject) => {\r\n let 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(this.webpSupport = webP.height === 2 /* && false */);\r\n };\r\n });\r\n }\r\n isSupported() {\r\n return this.webpSupport;\r\n }\r\n convertToPng(bytes) {\r\n console.warn('convertToPng!');\r\n return new Promise((resolve, reject) => {\r\n // @ts-ignore\r\n this.queue.push({ bytes, callback: resolve });\r\n this.processQueue();\r\n });\r\n }\r\n}\r\nconst appWebpManager = new AppWebpManager();\r\nwindow.appWebpManager = appWebpManager;\r\nexports.default = appWebpManager;\r\n"
},
{
"id": 40,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\opusDecodeController.ts",
"name": "./src/lib/opusDecodeController.ts",
"index": 45,
"index2": 37,
"size": 4463,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"issuerId": 66,
"issuerName": "./src/components/chatInput.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 66,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"name": "./src/components/chatInput.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 246,
"building": 1149,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../opusDecodeController",
"loc": "20:47-81"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/opusDecodeController",
"loc": "40:47-85"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.OpusDecodeController = void 0;\r\nclass OpusDecodeController {\r\n constructor() {\r\n this.sampleRate = 48000;\r\n this.tasks = [];\r\n this.keepAlive = false;\r\n }\r\n loadWavWorker() {\r\n if (this.wavWorker)\r\n return;\r\n this.wavWorker = new Worker('waveWorker.min.js');\r\n this.wavWorker.addEventListener('message', (e) => {\r\n const data = e.data;\r\n if (data && data.page) {\r\n const bytes = data.page;\r\n this.onTaskEnd(this.tasks.shift(), bytes);\r\n }\r\n });\r\n }\r\n loadWorker() {\r\n if (this.worker)\r\n return;\r\n this.worker = new Worker('decoderWorker.min.js');\r\n this.worker.addEventListener('message', (e) => {\r\n const data = e.data;\r\n if (data.type == 'done') {\r\n this.wavWorker.postMessage({ command: 'done' });\r\n if (data.waveform) {\r\n this.tasks[0].waveform = data.waveform;\r\n }\r\n }\r\n else { // e.data contains decoded buffers as float32 values\r\n this.wavWorker.postMessage({\r\n command: 'encode',\r\n buffers: e.data\r\n }, data.map((typedArray) => typedArray.buffer));\r\n }\r\n });\r\n }\r\n setKeepAlive(keepAlive) {\r\n this.keepAlive = keepAlive;\r\n if (this.keepAlive) {\r\n this.loadWorker();\r\n this.loadWavWorker();\r\n }\r\n else if (!this.tasks.length) {\r\n this.terminateWorkers();\r\n }\r\n }\r\n onTaskEnd(task, result) {\r\n task.callback.resolve({ bytes: result, waveform: task.waveform });\r\n if (this.tasks.length) {\r\n this.executeNewTask(this.tasks[0]);\r\n }\r\n this.terminateWorkers();\r\n }\r\n terminateWorkers() {\r\n if (this.keepAlive || this.tasks.length)\r\n return;\r\n this.worker.terminate();\r\n this.worker = null;\r\n this.wavWorker.terminate();\r\n this.wavWorker = null;\r\n }\r\n executeNewTask(task) {\r\n this.worker.postMessage({\r\n command: 'init',\r\n decoderSampleRate: this.sampleRate,\r\n outputBufferSampleRate: this.sampleRate\r\n });\r\n this.wavWorker.postMessage({\r\n command: 'init',\r\n wavBitDepth: 16,\r\n wavSampleRate: this.sampleRate\r\n });\r\n //console.log('sending command to worker:', task);\r\n //setTimeout(() => {\r\n this.worker.postMessage({\r\n command: 'decode',\r\n pages: task.pages,\r\n waveform: task.withWaveform\r\n }, [task.pages.buffer]);\r\n //}, 1e3);\r\n }\r\n pushDecodeTask(pages, withWaveform) {\r\n return new Promise((resolve, reject) => {\r\n const task = {\r\n pages,\r\n withWaveform,\r\n callback: { resolve, reject }\r\n };\r\n this.loadWorker();\r\n this.loadWavWorker();\r\n if (this.tasks.push(task) == 1) {\r\n this.executeNewTask(task);\r\n }\r\n });\r\n }\r\n decode(typedArray, withWaveform = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return this.pushDecodeTask(typedArray, withWaveform).then(result => {\r\n const dataBlob = new Blob([result.bytes], { type: \"audio/wav\" });\r\n return { url: URL.createObjectURL(dataBlob), waveform: result.waveform };\r\n });\r\n });\r\n }\r\n}\r\nexports.OpusDecodeController = OpusDecodeController;\r\nexports.default = new OpusDecodeController();\r\n"
},
{
"id": 41,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"name": "./src/lib/appManagers/appWebPagesManager.ts",
"index": 47,
"index2": 40,
"size": 4216,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appWebPagesManager",
"loc": "35:45-76"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appWebPagesManager",
"loc": "30:45-93"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 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": 42,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"name": "./src/lib/appManagers/appPollsManager.ts",
"index": 48,
"index2": 41,
"size": 3327,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appPollsManager",
"loc": "37:42-70"
},
{
"moduleId": 65,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\poll.ts",
"module": "./src/components/poll.ts",
"moduleName": "./src/components/poll.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appPollsManager",
"loc": "6:42-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nclass AppPollsManager {\r\n constructor() {\r\n this.polls = {};\r\n this.results = {};\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n let update = e.detail;\r\n this.handleUpdate(update);\r\n });\r\n }\r\n handleUpdate(update) {\r\n switch (update._) {\r\n case 'updateMessagePoll': { // when someone voted, we too\r\n console.log('updateMessagePoll:', update);\r\n let poll = this.polls[update.poll_id] || update.poll;\r\n if (!poll) {\r\n break;\r\n }\r\n poll = this.savePoll(poll, update.results);\r\n utils_1.$rootScope.$broadcast('poll_update', { poll, results: update.results });\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n }\r\n savePoll(poll, results) {\r\n let id = poll.id;\r\n if (this.polls[id]) {\r\n poll = this.polls[id];\r\n this.saveResults(poll, results);\r\n return poll;\r\n }\r\n this.polls[id] = poll;\r\n poll.rQuestion = richtextprocessor_1.RichTextProcessor.wrapEmojiText(poll.question);\r\n poll.rReply = richtextprocessor_1.RichTextProcessor.wrapEmojiText('📊') + ' ' + (poll.rQuestion || 'poll');\r\n this.saveResults(poll, results);\r\n return poll;\r\n }\r\n saveResults(poll, results) {\r\n var _a;\r\n this.results[poll.id] = results;\r\n poll.chosenIndex = (_a = (results && results.results && results.results.findIndex(answer => { var _a; return (_a = answer.pFlags) === null || _a === void 0 ? void 0 : _a.chosen; }))) !== null && _a !== void 0 ? _a : -1;\r\n }\r\n getPoll(pollID) {\r\n return {\r\n poll: this.polls[pollID],\r\n results: this.results[pollID]\r\n };\r\n }\r\n sendVote(mid, optionIDs) {\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n let poll = message.media.poll;\r\n let options = optionIDs.map(index => {\r\n return poll.answers[index].option;\r\n });\r\n let inputPeer = appPeersManager_1.default.getInputPeerByID(message.peerID);\r\n let messageID = message.id;\r\n return mtprotoworker_1.default.invokeApi('messages.sendVote', {\r\n peer: inputPeer,\r\n msg_id: messageID,\r\n options\r\n }).then(updates => {\r\n console.log('appPollsManager sendVote updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n}\r\nconst appPollsManager = new AppPollsManager();\r\nwindow.appPollsManager = appPollsManager;\r\nexports.default = appPollsManager;\r\n"
},
{
"id": 43,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popup.ts",
"name": "./src/components/popup.ts",
"index": 51,
"index2": 44,
"size": 2956,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/popup",
"loc": "38:16-49"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../../components/popup",
"loc": "28:16-49"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.PopupPeer = exports.PopupElement = void 0;\r\nconst avatar_1 = __importDefault(require(\"./avatar\"));\r\nconst misc_1 = require(\"./misc\");\r\nclass PopupElement {\r\n constructor(className) {\r\n this.element = document.createElement('div');\r\n this.container = document.createElement('div');\r\n this.header = document.createElement('div');\r\n this.title = document.createElement('div');\r\n this.element.classList.add('popup');\r\n this.element.className = 'popup' + (className ? ' ' + className : '');\r\n this.container.classList.add('popup-container', 'z-depth-1');\r\n this.header.classList.add('popup-header');\r\n this.title.classList.add('popup-title');\r\n this.header.append(this.title);\r\n this.container.append(this.header);\r\n this.element.append(this.container);\r\n }\r\n show() {\r\n document.body.append(this.element);\r\n void this.element.offsetWidth; // reflow\r\n this.element.classList.add('active');\r\n }\r\n destroy() {\r\n this.element.classList.remove('active');\r\n setTimeout(() => {\r\n this.element.remove();\r\n }, 1000);\r\n }\r\n}\r\nexports.PopupElement = PopupElement;\r\nclass PopupPeer extends PopupElement {\r\n constructor(className, options = {}) {\r\n super('popup-peer' + (className ? ' ' + className : ''));\r\n this.className = className;\r\n let avatarEl = new avatar_1.default();\r\n avatarEl.setAttribute('dialog', '1');\r\n avatarEl.setAttribute('peer', '' + options.peerID);\r\n avatarEl.classList.add('peer-avatar');\r\n this.title.innerText = options.title || '';\r\n this.header.prepend(avatarEl);\r\n let p = document.createElement('p');\r\n p.classList.add('popup-description');\r\n p.innerHTML = options.description;\r\n let buttonsDiv = document.createElement('div');\r\n buttonsDiv.classList.add('popup-buttons');\r\n let buttons = options.buttons.map(b => {\r\n let button = document.createElement('button');\r\n misc_1.ripple(button);\r\n button.className = 'btn' + (b.isDanger ? ' danger' : '');\r\n button.innerHTML = b.text;\r\n if (b.callback) {\r\n button.addEventListener('click', () => {\r\n b.callback();\r\n this.destroy();\r\n });\r\n }\r\n else if (b.isCancel) {\r\n button.addEventListener('click', () => {\r\n this.destroy();\r\n });\r\n }\r\n return button;\r\n });\r\n buttonsDiv.append(...buttons);\r\n this.container.append(p, buttonsDiv);\r\n }\r\n}\r\nexports.PopupPeer = PopupPeer;\r\n"
},
{
"id": 44,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mediaPlayer.ts",
"name": "./src/lib/mediaPlayer.ts",
"index": 54,
"index2": 46,
"size": 13929,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"issuerId": 34,
"issuerName": "./src/lib/appManagers/appMediaViewer.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 34,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"name": "./src/lib/appManagers/appMediaViewer.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 620,
"building": 233
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/mediaPlayer",
"loc": "42:35-64"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../mediaPlayer",
"loc": "24:38-63"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.MediaProgressLine = void 0;\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 = '<div class=\"circle-time\"></div><div class=\"iconVolume tgico-nosound\"></div>';\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('<button class=\"' + skin + '__button--big toggle tgico-largeplay\" title=\"Toggle Play\"></button>');\r\n html.push('<div class=\"' + skin + '__gradient-bottom ckin__controls\"></div>');\r\n html.push('<div class=\"' + skin + '__controls ckin__controls\">');\r\n html.push('<div class=\"bottom-controls\">', '<div class=\"left-controls\"><button class=\"' + skin + '__button toggle tgico-play\" title=\"Toggle Video\"></button>', '<div class=\"time\">', '<time id=\"time-elapsed\">0:00</time>', '<span> / </span>', '<time id=\"time-duration\">0:00</time>', '</div>', '</div>', '<div class=\"right-controls\"><button class=\"' + skin + '__button fullscreen tgico-fullscreen\" title=\"Full Screen\"></button></div></div>');\r\n html.push('</div>');\r\n }\r\n else if (skin === 'circle') {\r\n html.push('<svg class=\"progress-ring\" width=\"200px\" height=\"200px\">', '<circle class=\"progress-ring__circle\" stroke=\"white\" stroke-opacity=\"0.3\" stroke-width=\"3.5\" cx=\"100\" cy=\"100\" r=\"93\" fill=\"transparent\" transform=\"rotate(-90, 100, 100)\"/>', '</svg>');\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": 45,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"name": "./src/components/appSelectPeers.ts",
"index": 57,
"index2": 54,
"size": 9820,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"issuerId": 46,
"issuerName": "./src/lib/appManagers/appSidebarLeft.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 46,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"name": "./src/lib/appManagers/appSidebarLeft.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 499,
"building": 260,
"dependencies": 3
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 35,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"module": "./src/components/appForward.ts",
"moduleName": "./src/components/appForward.ts",
"type": "cjs require",
"userRequest": "./appSelectPeers",
"loc": "9:25-52"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/appSelectPeers",
"loc": "39:25-67"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppSelectPeers = void 0;\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst appDialogsManager_1 = __importDefault(require(\"../lib/appManagers/appDialogsManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"../lib/appManagers/appChatsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../lib/appManagers/appUsersManager\"));\r\nconst services_1 = require(\"../lib/services\");\r\nconst appPhotosManager_1 = __importDefault(require(\"../lib/appManagers/appPhotosManager\"));\r\nclass AppSelectPeers {\r\n constructor(appendTo, onChange, peerType = 'dialogs', onFirstRender) {\r\n this.appendTo = appendTo;\r\n this.onChange = onChange;\r\n this.peerType = peerType;\r\n this.container = document.createElement('div');\r\n this.list = document.createElement('ul');\r\n this.chatsContainer = document.createElement('div');\r\n this.selectedContainer = document.createElement('div');\r\n this.input = document.createElement('input');\r\n this.selected = {};\r\n this.freezed = false;\r\n this.myID = utils_1.$rootScope.myID;\r\n this.offsetIndex = 0;\r\n this.query = '';\r\n this.container.classList.add('selector');\r\n let topContainer = document.createElement('div');\r\n topContainer.classList.add('selector-search-container');\r\n this.selectedContainer.classList.add('selector-search');\r\n this.input.placeholder = peerType == 'contacts' ? 'Add People...' : 'Select chat';\r\n this.input.type = 'text';\r\n this.selectedContainer.append(this.input);\r\n topContainer.append(this.selectedContainer);\r\n this.selectedScrollable = new scrollable_new_1.default(topContainer);\r\n let delimiter = document.createElement('hr');\r\n this.chatsContainer.classList.add('chats-container');\r\n this.chatsContainer.append(this.list);\r\n this.scrollable = new scrollable_new_1.default(this.chatsContainer);\r\n this.scrollable.setVirtualContainer(this.list);\r\n this.list.addEventListener('click', (e) => {\r\n let target = e.target;\r\n utils_1.cancelEvent(e);\r\n if (this.freezed)\r\n return;\r\n if (target.tagName != 'LI') {\r\n target = utils_1.findUpTag(target, 'LI');\r\n }\r\n if (!target)\r\n return;\r\n let peerID = +target.getAttribute('data-peerID');\r\n target.classList.toggle('active');\r\n if (peerID in this.selected) {\r\n this.remove(peerID);\r\n }\r\n else {\r\n this.add(peerID);\r\n }\r\n let checkbox = target.querySelector('input');\r\n checkbox.checked = !checkbox.checked;\r\n });\r\n this.selectedContainer.addEventListener('click', (e) => {\r\n if (this.freezed)\r\n return;\r\n let target = e.target;\r\n target = utils_1.findUpClassName(target, 'selector-user');\r\n if (!target)\r\n return;\r\n let peerID = target.dataset.peerID;\r\n let li = this.list.querySelector('[data-peerid=\"' + peerID + '\"]');\r\n li.click();\r\n });\r\n this.input.addEventListener('input', () => {\r\n let value = this.input.value;\r\n if (this.query != value) {\r\n if (this.peerType == 'contacts') {\r\n this.cachedContacts = null;\r\n }\r\n else {\r\n this.offsetIndex = 0;\r\n }\r\n this.promise = null;\r\n this.list.innerHTML = '';\r\n this.query = value;\r\n console.log('selectPeers input:', this.query);\r\n this.getMoreResults();\r\n }\r\n });\r\n this.scrollable.onScrolledBottom = () => {\r\n this.getMoreResults();\r\n };\r\n this.container.append(topContainer, delimiter, this.chatsContainer);\r\n appendTo.append(this.container);\r\n let getResultsPromise = this.getMoreResults();\r\n if (onFirstRender) {\r\n getResultsPromise.then(() => {\r\n onFirstRender();\r\n });\r\n }\r\n }\r\n getMoreDialogs() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.promise)\r\n return this.promise;\r\n // в десктопе - сначала без группы, потом архивные, потом контакты без сообщений\r\n const pageCount = appPhotosManager_1.default.windowH / 72 * 1.25 | 0;\r\n this.promise = appMessagesManager_1.default.getConversations(this.query, this.offsetIndex, pageCount, 0);\r\n const value = yield this.promise;\r\n let dialogs = value.dialogs;\r\n if (!dialogs.length) {\r\n return;\r\n }\r\n const newOffsetIndex = dialogs[dialogs.length - 1].index || 0;\r\n dialogs = dialogs.filter(d => d.peerID != this.myID);\r\n if (!this.offsetIndex) {\r\n dialogs.unshift({\r\n peerID: this.myID,\r\n pFlags: {}\r\n });\r\n }\r\n this.offsetIndex = newOffsetIndex;\r\n this.renderResults(dialogs.map(dialog => dialog.peerID));\r\n this.promise = null;\r\n });\r\n }\r\n getMoreContacts() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.promise)\r\n return this.promise;\r\n if (!this.cachedContacts) {\r\n this.promise = appUsersManager_1.default.getContacts(this.query);\r\n this.cachedContacts = (yield this.promise).slice();\r\n this.cachedContacts.findAndSplice(userID => userID == this.myID); // no my account\r\n this.promise = null;\r\n }\r\n if (this.cachedContacts.length) {\r\n const pageCount = appPhotosManager_1.default.windowH / 72 * 1.25 | 0;\r\n const arr = this.cachedContacts.splice(0, pageCount);\r\n this.renderResults(arr);\r\n }\r\n });\r\n }\r\n getMoreResults() {\r\n if (this.peerType == 'dialogs') {\r\n return this.getMoreDialogs();\r\n }\r\n else {\r\n return this.getMoreContacts();\r\n }\r\n }\r\n renderResults(peerIDs) {\r\n console.log('will renderResults:', peerIDs);\r\n peerIDs.forEach(peerID => {\r\n const { dom } = appDialogsManager_1.default.addDialog(peerID, this.scrollable, false, false);\r\n dom.containerEl.insertAdjacentHTML('afterbegin', '<div class=\"checkbox\"><label><input type=\"checkbox\"><span></span></label></div>');\r\n let subtitle = '';\r\n if (peerID < 0) {\r\n subtitle = appChatsManager_1.default.getChatMembersString(-peerID);\r\n }\r\n else if (peerID == this.myID) {\r\n subtitle = 'chat with yourself';\r\n }\r\n else {\r\n subtitle = appUsersManager_1.default.getUserStatusString(peerID);\r\n if (subtitle == 'online') {\r\n subtitle = `<i>${subtitle}</i>`;\r\n }\r\n }\r\n dom.lastMessageSpan.innerHTML = subtitle;\r\n });\r\n }\r\n add(peerID) {\r\n const div = document.createElement('div');\r\n div.classList.add('selector-user', 'scale-in');\r\n div.dataset.peerID = '' + peerID;\r\n this.selected[peerID] = div;\r\n const title = services_1.appPeersManager.getPeerTitle(peerID, false, true);\r\n const avatarEl = document.createElement('avatar-element');\r\n avatarEl.classList.add('selector-user-avatar', 'tgico');\r\n avatarEl.setAttribute('dialog', '1');\r\n avatarEl.setAttribute('peer', '' + peerID);\r\n div.innerHTML = title;\r\n div.insertAdjacentElement('afterbegin', avatarEl);\r\n this.selectedContainer.insertBefore(div, this.input);\r\n this.selectedScrollable.scrollTop = this.selectedScrollable.scrollHeight;\r\n this.onChange && this.onChange(Object.keys(this.selected).length);\r\n }\r\n remove(peerID) {\r\n const div = this.selected[peerID];\r\n div.classList.remove('scale-in');\r\n void div.offsetWidth;\r\n div.classList.add('scale-out');\r\n div.addEventListener('animationend', () => {\r\n delete this.selected[peerID];\r\n div.remove();\r\n this.onChange && this.onChange(Object.keys(this.selected).length);\r\n }, { once: true });\r\n }\r\n getSelected() {\r\n return Object.keys(this.selected).map(p => +p);\r\n }\r\n}\r\nexports.AppSelectPeers = AppSelectPeers;\r\n"
},
{
"id": 46,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"name": "./src/lib/appManagers/appSidebarLeft.ts",
"index": 60,
"index2": 52,
"size": 29229,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appSidebarLeft",
"loc": "21:41-68"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appSidebarLeft",
"loc": "21:41-80"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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//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\nconst misc_1 = require(\"../../components/misc\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../../components/scrollable_new\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst services_1 = require(\"../services\");\r\nconst popupAvatar_1 = __importDefault(require(\"../../components/popupAvatar\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst appSelectPeers_1 = require(\"../../components/appSelectPeers\");\r\nconst avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\r\navatar_1.default;\r\nconst SLIDERITEMSIDS = {\r\n archived: 1,\r\n contacts: 2,\r\n newChannel: 3,\r\n addMembers: 4,\r\n newGroup: 5,\r\n settings: 6,\r\n editProfile: 7,\r\n};\r\nclass AppAddMembersTab {\r\n constructor() {\r\n this.container = document.querySelector('.addmembers-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.backBtn = this.container.querySelector('.sidebar-close-button');\r\n this.nextBtn = this.contentDiv.querySelector('.btn-corner');\r\n this.nextBtn.addEventListener('click', () => {\r\n let peerIDs = this.selector.getSelected();\r\n if (peerIDs.length) {\r\n if (this.takeOut) {\r\n this.takeOut(peerIDs);\r\n return;\r\n }\r\n this.nextBtn.classList.remove('tgico-next');\r\n this.nextBtn.disabled = true;\r\n misc_1.putPreloader(this.nextBtn);\r\n this.selector.freezed = true;\r\n appChatsManager_1.default.inviteToChannel(this.peerID, peerIDs).then(() => {\r\n this.backBtn.click();\r\n });\r\n }\r\n });\r\n }\r\n onCloseAfterTimeout() {\r\n if (this.selector) {\r\n this.selector.container.remove();\r\n this.selector = null;\r\n }\r\n }\r\n init(id, type, skipable, takeOut) {\r\n this.peerID = Math.abs(id);\r\n this.peerType = type;\r\n this.takeOut = takeOut;\r\n this.onCloseAfterTimeout();\r\n this.selector = new appSelectPeers_1.AppSelectPeers(this.contentDiv, skipable ? null : (length) => {\r\n if (length) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n }, 'contacts');\r\n this.nextBtn.innerHTML = '';\r\n this.nextBtn.disabled = false;\r\n this.nextBtn.classList.add('tgico-next');\r\n if (skipable) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n appSidebarLeft.selectTab(SLIDERITEMSIDS.addMembers);\r\n }\r\n}\r\nclass AppNewChannelTab {\r\n constructor() {\r\n this.container = document.querySelector('.new-channel-container');\r\n this.canvas = this.container.querySelector('.avatar-edit-canvas');\r\n this.channelNameInput = this.container.querySelector('.new-channel-name');\r\n this.channelDescriptionInput = this.container.querySelector('.new-channel-description');\r\n this.nextBtn = this.container.querySelector('.btn-corner');\r\n this.backBtn = this.container.querySelector('.sidebar-close-button');\r\n this.uploadAvatar = null;\r\n this.container.querySelector('.avatar-edit').addEventListener('click', () => {\r\n popupAvatar_1.default.open(this.canvas, (_upload) => {\r\n this.uploadAvatar = _upload;\r\n });\r\n });\r\n this.channelNameInput.addEventListener('input', () => {\r\n let value = this.channelNameInput.value;\r\n if (value.length) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n });\r\n this.nextBtn.addEventListener('click', () => {\r\n let title = this.channelNameInput.value;\r\n let about = this.channelDescriptionInput.value;\r\n this.nextBtn.disabled = true;\r\n appChatsManager_1.default.createChannel(title, about).then((channelID) => {\r\n if (this.uploadAvatar) {\r\n this.uploadAvatar().then((inputFile) => {\r\n appChatsManager_1.default.editPhoto(channelID, inputFile);\r\n });\r\n }\r\n appSidebarLeft.removeTabFromHistory(SLIDERITEMSIDS.newChannel);\r\n appSidebarLeft.addMembersTab.init(channelID, 'channel', true);\r\n });\r\n });\r\n }\r\n onCloseAfterTimeout() {\r\n let ctx = this.canvas.getContext('2d');\r\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\r\n this.uploadAvatar = null;\r\n this.channelNameInput.value = '';\r\n this.channelDescriptionInput.value = '';\r\n this.nextBtn.disabled = false;\r\n }\r\n}\r\nclass AppNewGroupTab {\r\n constructor() {\r\n this.container = document.querySelector('.new-group-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.canvas = this.container.querySelector('.avatar-edit-canvas');\r\n this.groupNameInput = this.container.querySelector('.new-group-name');\r\n this.nextBtn = this.container.querySelector('.btn-corner');\r\n this.searchGroup = new appSearch_1.SearchGroup('', 'contacts', true, 'new-group-members disable-hover', false);\r\n this.uploadAvatar = null;\r\n this.container.querySelector('.avatar-edit').addEventListener('click', () => {\r\n popupAvatar_1.default.open(this.canvas, (_upload) => {\r\n this.uploadAvatar = _upload;\r\n });\r\n });\r\n this.groupNameInput.addEventListener('input', () => {\r\n let value = this.groupNameInput.value;\r\n if (value.length) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n });\r\n this.nextBtn.addEventListener('click', () => {\r\n let title = this.groupNameInput.value;\r\n this.nextBtn.disabled = true;\r\n appChatsManager_1.default.createChat(title, this.userIDs).then((chatID) => {\r\n if (this.uploadAvatar) {\r\n this.uploadAvatar().then((inputFile) => {\r\n appChatsManager_1.default.editPhoto(chatID, inputFile);\r\n });\r\n }\r\n appSidebarLeft.selectTab(0);\r\n });\r\n });\r\n let chatsContainer = document.createElement('div');\r\n chatsContainer.classList.add('chats-container');\r\n chatsContainer.append(this.searchGroup.container);\r\n let scrollable = new scrollable_new_1.default(chatsContainer);\r\n this.contentDiv.append(chatsContainer);\r\n }\r\n onClose() {\r\n }\r\n onCloseAfterTimeout() {\r\n this.searchGroup.clear();\r\n let ctx = this.canvas.getContext('2d');\r\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\r\n this.uploadAvatar = null;\r\n this.groupNameInput.value = '';\r\n this.nextBtn.disabled = false;\r\n }\r\n init(userIDs) {\r\n this.userIDs = userIDs;\r\n appSidebarLeft.selectTab(SLIDERITEMSIDS.newGroup);\r\n this.userIDs.forEach(userID => {\r\n let { dom } = appDialogsManager_1.default.addDialog(userID, this.searchGroup.list, false, false);\r\n let subtitle = '';\r\n subtitle = appUsersManager_1.default.getUserStatusString(userID);\r\n if (subtitle == 'online') {\r\n subtitle = `<i>${subtitle}</i>`;\r\n }\r\n if (subtitle) {\r\n dom.lastMessageSpan.innerHTML = subtitle;\r\n }\r\n });\r\n this.searchGroup.nameEl.innerText = this.userIDs.length + ' members';\r\n this.searchGroup.setActive();\r\n }\r\n}\r\nclass AppContactsTab {\r\n constructor() {\r\n this.container = document.getElementById('contacts-container');\r\n this.list = this.container.querySelector('#contacts');\r\n this.input = this.container.querySelector('#contacts-search');\r\n appDialogsManager_1.default.setListClickListener(this.list);\r\n this.scrollable = new scrollable_new_1.default(this.list.parentElement);\r\n let prevValue = '';\r\n this.input.addEventListener('input', () => {\r\n let value = this.input.value;\r\n if (prevValue != value) {\r\n this.list.innerHTML = '';\r\n this.openContacts(prevValue = value);\r\n }\r\n });\r\n // preload contacts\r\n appUsersManager_1.default.getContacts();\r\n }\r\n // need to clear, and left 1 page for smooth slide\r\n onClose() {\r\n let pageCount = appPhotosManager_1.default.windowH / 72 * 1.25 | 0;\r\n Array.from(this.list.children).slice(pageCount).forEach(el => el.remove());\r\n }\r\n onCloseAfterTimeout() {\r\n this.list.innerHTML = '';\r\n this.input.value = '';\r\n }\r\n openContacts(query) {\r\n if (appSidebarLeft.historyTabIDs.indexOf(SLIDERITEMSIDS.contacts) === -1) {\r\n appSidebarLeft.selectTab(SLIDERITEMSIDS.contacts);\r\n }\r\n if (this.promise)\r\n return this.promise;\r\n this.scrollable.onScrolledBottom = null;\r\n this.promise = appUsersManager_1.default.getContacts(query).then(contacts => {\r\n this.promise = null;\r\n if (appSidebarLeft.historyTabIDs[appSidebarLeft.historyTabIDs.length - 1] != SLIDERITEMSIDS.contacts) {\r\n console.warn('user closed contacts before it\\'s loaded');\r\n return;\r\n }\r\n contacts = contacts.slice();\r\n contacts.findAndSplice(u => u == utils_1.$rootScope.myID);\r\n let sorted = contacts\r\n .map(userID => {\r\n let user = appUsersManager_1.default.getUser(userID);\r\n let status = appUsersManager_1.default.getUserStatusForSort(user.status);\r\n return { user, status };\r\n })\r\n .sort((a, b) => b.status - a.status);\r\n let renderPage = () => {\r\n let pageCount = appPhotosManager_1.default.windowH / 72 * 1.25 | 0;\r\n let arr = sorted.splice(0, pageCount); // надо splice!\r\n arr.forEach(({ user }) => {\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(user.id, this.list, false);\r\n let status = appUsersManager_1.default.getUserStatusString(user.id);\r\n dom.lastMessageSpan.innerHTML = status == 'online' ? `<i>${status}</i>` : status;\r\n });\r\n if (!sorted.length)\r\n renderPage = undefined;\r\n };\r\n renderPage();\r\n this.scrollable.onScrolledBottom = () => {\r\n if (renderPage) {\r\n renderPage();\r\n }\r\n else {\r\n this.scrollable.onScrolledBottom = null;\r\n }\r\n };\r\n });\r\n }\r\n}\r\nclass AppSettingsTab {\r\n constructor() {\r\n this.container = document.querySelector('.settings-container');\r\n this.avatarElem = this.container.querySelector('.profile-avatar');\r\n this.nameDiv = this.container.querySelector('.profile-name');\r\n this.phoneDiv = this.container.querySelector('.profile-subtitle');\r\n this.logOutBtn = this.container.querySelector('.menu-logout');\r\n this.buttons = {};\r\n misc_1.parseMenuButtonsTo(this.buttons, this.container.querySelector('.profile-buttons').children);\r\n utils_1.$rootScope.$on('user_auth', (e) => {\r\n this.fillElements();\r\n });\r\n this.logOutBtn.addEventListener('click', (e) => {\r\n mtprotoworker_1.default.logOut();\r\n });\r\n this.buttons.edit.addEventListener('click', () => {\r\n appSidebarLeft.selectTab(SLIDERITEMSIDS.editProfile);\r\n appSidebarLeft.editProfileTab.fillElements();\r\n });\r\n }\r\n fillElements() {\r\n let user = appUsersManager_1.default.getSelf();\r\n this.avatarElem.setAttribute('peer', '' + user.id);\r\n this.nameDiv.innerHTML = user.rFullName || '';\r\n this.phoneDiv.innerHTML = user.rPhone || '';\r\n }\r\n onClose() {\r\n }\r\n}\r\nclass AppEditProfileTab {\r\n constructor() {\r\n this.container = document.querySelector('.edit-profile-container');\r\n this.scrollWrapper = this.container.querySelector('.scroll-wrapper');\r\n this.nextBtn = this.container.querySelector('.btn-corner');\r\n this.canvas = this.container.querySelector('.avatar-edit-canvas');\r\n this.uploadAvatar = null;\r\n this.firstNameInput = this.container.querySelector('.firstname');\r\n this.lastNameInput = this.container.querySelector('.lastname');\r\n this.bioInput = this.container.querySelector('.bio');\r\n this.userNameInput = this.container.querySelector('.username');\r\n this.avatarElem = document.createElement('avatar-element');\r\n this.profileUrlContainer = this.container.querySelector('.profile-url-container');\r\n this.profileUrlAnchor = this.profileUrlContainer.lastElementChild;\r\n this.originalValues = {\r\n firstName: '',\r\n lastName: '',\r\n userName: '',\r\n bio: ''\r\n };\r\n this.container.querySelector('.avatar-edit').addEventListener('click', () => {\r\n popupAvatar_1.default.open(this.canvas, (_upload) => {\r\n this.uploadAvatar = _upload;\r\n this.handleChange();\r\n this.avatarElem.remove();\r\n });\r\n });\r\n this.avatarElem.classList.add('avatar-placeholder');\r\n let userNameLabel = this.userNameInput.nextElementSibling;\r\n this.firstNameInput.addEventListener('input', () => this.handleChange());\r\n this.lastNameInput.addEventListener('input', () => this.handleChange());\r\n this.bioInput.addEventListener('input', () => this.handleChange());\r\n this.userNameInput.addEventListener('input', () => {\r\n let value = this.userNameInput.value;\r\n console.log('userNameInput:', value);\r\n if (value == this.originalValues.userName || !value.length) {\r\n this.userNameInput.classList.remove('valid', 'error');\r\n userNameLabel.innerText = 'Username (optional)';\r\n this.setProfileUrl();\r\n this.handleChange();\r\n return;\r\n }\r\n else if (!this.isUsernameValid(value)) { // does not check the last underscore\r\n this.userNameInput.classList.add('error');\r\n this.userNameInput.classList.remove('valid');\r\n userNameLabel.innerText = 'Username is invalid';\r\n }\r\n else {\r\n this.userNameInput.classList.remove('valid', 'error');\r\n }\r\n if (this.userNameInput.classList.contains('error')) {\r\n this.setProfileUrl();\r\n this.handleChange();\r\n return;\r\n }\r\n mtprotoworker_1.default.invokeApi('account.checkUsername', {\r\n username: value\r\n }).then(available => {\r\n if (this.userNameInput.value != value)\r\n return;\r\n if (available) {\r\n this.userNameInput.classList.add('valid');\r\n this.userNameInput.classList.remove('error');\r\n userNameLabel.innerText = 'Username is available';\r\n }\r\n else {\r\n this.userNameInput.classList.add('error');\r\n this.userNameInput.classList.remove('valid');\r\n userNameLabel.innerText = 'Username is already taken';\r\n }\r\n }, (err) => {\r\n if (this.userNameInput.value != value)\r\n return;\r\n switch (err.type) {\r\n case 'USERNAME_INVALID': {\r\n this.userNameInput.classList.add('error');\r\n this.userNameInput.classList.remove('valid');\r\n userNameLabel.innerText = 'Username is invalid';\r\n break;\r\n }\r\n }\r\n }).then(() => {\r\n this.handleChange();\r\n this.setProfileUrl();\r\n });\r\n });\r\n this.nextBtn.addEventListener('click', () => {\r\n this.nextBtn.disabled = true;\r\n let promises = [];\r\n promises.push(appProfileManager_1.default.updateProfile(this.firstNameInput.value, this.lastNameInput.value, this.bioInput.value).then(() => {\r\n appSidebarLeft.selectTab(0);\r\n }, (err) => {\r\n console.error('updateProfile error:', err);\r\n }));\r\n if (this.uploadAvatar) {\r\n promises.push(this.uploadAvatar().then(inputFile => {\r\n appProfileManager_1.default.uploadProfilePhoto(inputFile);\r\n }));\r\n }\r\n if (this.userNameInput.value != this.originalValues.userName && this.userNameInput.classList.contains('valid')) {\r\n promises.push(appProfileManager_1.default.updateUsername(this.userNameInput.value));\r\n }\r\n Promise.race(promises).then(() => {\r\n this.nextBtn.disabled = false;\r\n }, () => {\r\n this.nextBtn.disabled = false;\r\n });\r\n });\r\n let scrollable = new scrollable_new_1.default(this.scrollWrapper, 'y');\r\n }\r\n fillElements() {\r\n var _a, _b, _c;\r\n let user = appUsersManager_1.default.getSelf();\r\n this.firstNameInput.value = this.originalValues.firstName = (_a = user.first_name) !== null && _a !== void 0 ? _a : '';\r\n this.lastNameInput.value = this.originalValues.lastName = (_b = user.last_name) !== null && _b !== void 0 ? _b : '';\r\n this.userNameInput.value = this.originalValues.userName = (_c = user.username) !== null && _c !== void 0 ? _c : '';\r\n this.userNameInput.classList.remove('valid', 'error');\r\n this.userNameInput.nextElementSibling.innerHTML = 'Username (optional)';\r\n appProfileManager_1.default.getProfile(user.id).then(userFull => {\r\n if (userFull.rAbout) {\r\n this.bioInput.value = this.originalValues.bio = userFull.rAbout;\r\n }\r\n });\r\n this.avatarElem.setAttribute('peer', '' + utils_1.$rootScope.myID);\r\n if (!this.avatarElem.parentElement) {\r\n this.canvas.parentElement.append(this.avatarElem);\r\n }\r\n this.uploadAvatar = null;\r\n this.setProfileUrl();\r\n }\r\n isUsernameValid(username) {\r\n return ((username.length >= 5 && username.length <= 32) || !username.length) && /^[a-zA-Z0-9_]*$/.test(username);\r\n }\r\n isChanged() {\r\n return !!this.uploadAvatar\r\n || this.firstNameInput.value != this.originalValues.firstName\r\n || this.lastNameInput.value != this.originalValues.lastName\r\n || (this.userNameInput.value != this.originalValues.userName && !this.userNameInput.classList.contains('error'))\r\n || this.bioInput.value != this.originalValues.bio;\r\n }\r\n setProfileUrl() {\r\n if (this.userNameInput.classList.contains('error') || !this.userNameInput.value.length) {\r\n this.profileUrlContainer.style.display = 'none';\r\n }\r\n else {\r\n this.profileUrlContainer.style.display = '';\r\n let url = 'https://t.me/' + this.userNameInput.value;\r\n this.profileUrlAnchor.innerText = url;\r\n this.profileUrlAnchor.href = url;\r\n }\r\n }\r\n handleChange() {\r\n if (this.isChanged()) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n }\r\n onCloseAfterTimeout() {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n}\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.buttons = {};\r\n this.newBtnMenu = this.sidebarEl.querySelector('#new-menu');\r\n this.newButtons = {};\r\n this.newChannelTab = new AppNewChannelTab();\r\n this.addMembersTab = new AppAddMembersTab();\r\n this.contactsTab = new AppContactsTab();\r\n this.newGroupTab = new AppNewGroupTab();\r\n this.settingsTab = new AppSettingsTab();\r\n this.editProfileTab = new AppEditProfileTab();\r\n this.tabs = {\r\n [SLIDERITEMSIDS.newChannel]: this.newChannelTab,\r\n [SLIDERITEMSIDS.contacts]: this.contactsTab,\r\n [SLIDERITEMSIDS.addMembers]: this.addMembersTab,\r\n [SLIDERITEMSIDS.newGroup]: this.newGroupTab,\r\n [SLIDERITEMSIDS.settings]: this.settingsTab,\r\n [SLIDERITEMSIDS.editProfile]: this.editProfileTab,\r\n };\r\n //private log = logger('SL');\r\n this.searchGroups = {\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 people: new appSearch_1.SearchGroup('People', 'contacts', false, 'search-group-people'),\r\n recent: new appSearch_1.SearchGroup('Recent', 'contacts', false, 'search-group-recent')\r\n };\r\n this.globalSearch = new appSearch_1.default(this.searchContainer, this.searchInput, this.searchGroups);\r\n this.historyTabIDs = [];\r\n let peopleContainer = document.createElement('div');\r\n peopleContainer.classList.add('search-group-scrollable');\r\n peopleContainer.append(this.searchGroups.people.list);\r\n this.searchGroups.people.container.append(peopleContainer);\r\n let peopleScrollable = new scrollable_new_1.default(peopleContainer, 'x');\r\n misc_1.parseMenuButtonsTo(this.buttons, this.menuEl.children);\r\n misc_1.parseMenuButtonsTo(this.newButtons, this.newBtnMenu.firstElementChild.children);\r\n this.archivedCount = this.buttons.archived.querySelector('.archived-count');\r\n this.buttons.saved.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.buttons.archived.addEventListener('click', (e) => {\r\n this.selectTab(SLIDERITEMSIDS.archived);\r\n });\r\n this.buttons.contacts.addEventListener('click', (e) => {\r\n this.contactsTab.openContacts();\r\n });\r\n this.buttons.settings.addEventListener('click', () => {\r\n this.settingsTab.fillElements();\r\n this.selectTab(SLIDERITEMSIDS.settings);\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.remove('hide');\r\n void this.searchContainer.offsetWidth; // reflow\r\n this.searchContainer.classList.add('active');\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.backBtn.click();\r\n }\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 setTimeout(() => {\r\n this.searchContainer.classList.add('hide');\r\n this.globalSearch.reset();\r\n this.searchGroups.people.setActive();\r\n //this.searchGroups.recent.setActive();\r\n }, 150);\r\n });\r\n this.newButtons.channel.addEventListener('click', (e) => {\r\n this.selectTab(SLIDERITEMSIDS.newChannel);\r\n });\r\n [this.newButtons.group, this.buttons.newGroup].forEach(btn => {\r\n btn.addEventListener('click', (e) => {\r\n this.addMembersTab.init(0, 'chat', false, (peerIDs) => {\r\n this.newGroupTab.init(peerIDs);\r\n });\r\n });\r\n });\r\n utils_1.$rootScope.$on('dialogs_archived_unread', (e) => {\r\n this.archivedCount.innerText = '' + e.detail.count;\r\n });\r\n this._selectTab = misc_1.horizontalMenu(null, this.sidebarEl.querySelector('.sidebar-slider'), null, null, 420);\r\n this._selectTab(0);\r\n let onCloseBtnClick = () => {\r\n console.log('sidebar-close-button click:', this.historyTabIDs);\r\n let closingID = this.historyTabIDs.pop(); // pop current\r\n this.onCloseTab(closingID);\r\n this._selectTab(this.historyTabIDs[this.historyTabIDs.length - 1] || 0);\r\n };\r\n Array.from(this.sidebarEl.querySelectorAll('.sidebar-close-button')).forEach(el => {\r\n el.addEventListener('click', onCloseBtnClick);\r\n });\r\n appUsersManager_1.default.getTopPeers().then(categories => {\r\n console.log('got top categories:', categories);\r\n let category = categories[0];\r\n if (!category || !category.peers) {\r\n return;\r\n }\r\n category.peers.forEach((topPeer) => {\r\n let peerID = services_1.appPeersManager.getPeerID(topPeer.peer);\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(peerID, this.searchGroups.people.list, false, true, true);\r\n this.searchGroups.people.setActive();\r\n });\r\n });\r\n }\r\n selectTab(id) {\r\n this.historyTabIDs.push(id);\r\n this._selectTab(id);\r\n }\r\n removeTabFromHistory(id) {\r\n this.historyTabIDs.findAndSplice(i => i == id);\r\n this.onCloseTab(id);\r\n }\r\n onCloseTab(id) {\r\n let tab = this.tabs[id];\r\n if (tab) {\r\n if ('onClose' in tab) {\r\n tab.onClose();\r\n }\r\n if ('onCloseAfterTimeout' in tab) {\r\n setTimeout(() => {\r\n tab.onCloseAfterTimeout();\r\n }, 420);\r\n }\r\n }\r\n }\r\n}\r\nconst appSidebarLeft = new AppSidebarLeft();\r\nwindow.appSidebarLeft = appSidebarLeft;\r\nexports.default = appSidebarLeft;\r\n"
},
{
"id": 47,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"name": "./src/components/appSearch.ts",
"index": 61,
"index2": 49,
"size": 9113,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"issuerId": 33,
"issuerName": "./src/lib/appManagers/appSidebarRight.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 33,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"name": "./src/lib/appManagers/appSidebarRight.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 728,
"building": 180,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../../components/appSearch",
"loc": "49:33-70"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/appSearch",
"loc": "31:33-70"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.SearchGroup = void 0;\r\nconst appDialogsManager_1 = __importDefault(require(\"../lib/appManagers/appDialogsManager\"));\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\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\nconst appChatsManager_1 = __importDefault(require(\"../lib/appManagers/appChatsManager\"));\r\nclass SearchGroup {\r\n constructor(name, type, clearable = true, className, clickable = true) {\r\n this.name = name;\r\n this.type = type;\r\n this.clearable = clearable;\r\n this.list = document.createElement('ul');\r\n this.container = document.createElement('div');\r\n if (className)\r\n this.container.className = className;\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', 'search-group-' + type);\r\n this.container.append(this.nameEl, this.list);\r\n this.container.style.display = 'none';\r\n if (clickable) {\r\n appDialogsManager_1.default.setListClickListener(this.list);\r\n }\r\n }\r\n clear() {\r\n this.container.style.display = 'none';\r\n if (this.clearable) {\r\n this.list.innerHTML = '';\r\n }\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_new_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, '<i>$1</i>');\r\n dom.lastMessageSpan.innerText = appChatsManager_1.default.getChatMembersString(-peerID);\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 = '<i>' + username + '</i>';\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": 48,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"name": "./src/components/popupAvatar.ts",
"index": 62,
"index2": 51,
"size": 3360,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"issuerId": 58,
"issuerName": "./src/pages/pageSignUp.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
},
{
"id": 58,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"name": "./src/pages/pageSignUp.ts",
"profile": {
"factory": 1040,
"building": 297,
"dependencies": 1
}
}
],
"profile": {
"factory": 1596,
"building": 115,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/popupAvatar",
"loc": "37:38-77"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "../components/popupAvatar",
"loc": "11:38-74"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.PopupAvatar = void 0;\r\nconst cropper_1 = __importDefault(require(\"../lib/cropper\"));\r\nconst apiFileManager_1 = __importDefault(require(\"../lib/mtproto/apiFileManager\"));\r\nclass PopupAvatar {\r\n constructor() {\r\n this.container = document.getElementById('popup-avatar');\r\n this.input = this.container.querySelector('input');\r\n this.cropContainer = this.container.querySelector('.crop');\r\n this.closeBtn = this.container.querySelector('.popup-close');\r\n this.image = new Image();\r\n this.cropper = {\r\n crop: () => { },\r\n removeHandlers: () => { }\r\n };\r\n this.container.style.display = ''; // need for no blink\r\n this.cropContainer.append(this.image);\r\n this.input.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 this.image = new Image();\r\n this.cropContainer.append(this.image);\r\n this.image.src = contents;\r\n this.image.onload = () => {\r\n /* let {w, h} = calcImageInBox(this.image.naturalWidth, this.image.naturalHeight, 460, 554);\r\n cropContainer.style.width = w + 'px';\r\n cropContainer.style.height = h + 'px'; */\r\n this.container.classList.remove('hide');\r\n void this.container.offsetWidth; // reflow\r\n this.container.classList.add('active');\r\n this.cropper = cropper_1.default(this.image, this.canvas);\r\n this.input.value = '';\r\n };\r\n };\r\n reader.readAsDataURL(file);\r\n }, false);\r\n // apply\r\n this.container.querySelector('.btn-crop').addEventListener('click', () => {\r\n this.cropper.crop();\r\n this.closeBtn.click();\r\n this.canvas.toBlob(blob => {\r\n this.blob = blob; // save blob to send after reg\r\n this.darkenCanvas();\r\n this.resolve();\r\n }, 'image/jpeg', 1);\r\n });\r\n this.closeBtn.addEventListener('click', () => {\r\n setTimeout(() => {\r\n this.cropper.removeHandlers();\r\n if (this.image) {\r\n this.image.remove();\r\n }\r\n this.container.classList.add('hide');\r\n }, 200);\r\n });\r\n }\r\n resolve() {\r\n this.onCrop(() => {\r\n return apiFileManager_1.default.uploadFile(this.blob);\r\n });\r\n }\r\n open(postCanvas, onCrop) {\r\n this.canvas = postCanvas;\r\n this.onCrop = onCrop;\r\n this.input.click();\r\n }\r\n darkenCanvas() {\r\n let ctx = this.canvas.getContext('2d');\r\n ctx.fillStyle = \"rgba(0, 0, 0, 0.3)\";\r\n ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);\r\n }\r\n}\r\nexports.PopupAvatar = PopupAvatar;\r\nexports.default = new PopupAvatar();\r\n"
},
{
"id": 49,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\groupedLayout.ts",
"name": "./src/components/groupedLayout.ts",
"index": 65,
"index2": 57,
"size": 15938,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"issuerId": 31,
"issuerName": "./src/components/wrappers.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 31,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"name": "./src/components/wrappers.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 314,
"building": 338,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "./groupedLayout",
"loc": "46:24-50"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "./groupedLayout",
"loc": "37:24-50"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "\"use strict\";\r\n/*\r\nThis file is part of Telegram Desktop,\r\nthe official desktop application for the Telegram messaging service.\r\nFor license and copyright information please follow this link:\r\nhttps://github.com/telegramdesktop/tdesktop/blob/master/LEGAL\r\n*/\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Layouter = exports.RectPart = void 0;\r\nexports.RectPart = {\r\n None: 0,\r\n Top: 1,\r\n Right: 2,\r\n Bottom: 4,\r\n Left: 8\r\n};\r\nlet accumulate = (arr, initialValue) => arr.reduce((acc, value) => acc + value, initialValue);\r\n// https://github.com/telegramdesktop/tdesktop/blob/74d848311b31ef0eb6d2c43a4d30ade8f1d2d9fb/Telegram/SourceFiles/core/utils.h#L128\r\nfunction snap(v, _min, _max) {\r\n return (v < _min) ? _min : ((v > _max) ? _max : v);\r\n}\r\n// https://github.com/telegramdesktop/tdesktop/blob/4669c07dc5335cbf4795bbbe5b0ab7c007b9aee2/Telegram/SourceFiles/ui/grouped_layout.cpp\r\nclass Layouter {\r\n constructor(sizes, maxWidth, minWidth, spacing, maxHeight = maxWidth) {\r\n this.sizes = sizes;\r\n this.maxWidth = maxWidth;\r\n this.minWidth = minWidth;\r\n this.spacing = spacing;\r\n this.maxHeight = maxHeight;\r\n this.count = sizes.length;\r\n this.ratios = Layouter.countRatios(sizes);\r\n this.proportions = Layouter.countProportions(this.ratios);\r\n this.averageRatio = accumulate(this.ratios, 1) / this.count; // warn\r\n this.maxSizeRatio = maxWidth / this.maxHeight;\r\n }\r\n layout() {\r\n if (!this.count)\r\n return [];\r\n //else if(this.count == 1) return this.layoutOne();\r\n if (this.count >= 5 || this.ratios.find(r => r > 2)) {\r\n return new ComplexLayouter(this.ratios, this.averageRatio, this.maxWidth, this.minWidth, this.spacing).layout();\r\n }\r\n if (this.count == 2)\r\n return this.layoutTwo();\r\n else if (this.count == 3)\r\n return this.layoutThree();\r\n return this.layoutFour();\r\n }\r\n layoutTwo() {\r\n if ((this.proportions == \"ww\")\r\n && (this.averageRatio > 1.4 * this.maxSizeRatio)\r\n && (this.ratios[1] - this.ratios[0] < 0.2)) {\r\n return this.layoutTwoTopBottom();\r\n }\r\n else if (this.proportions == \"ww\" || this.proportions == \"qq\") {\r\n return this.layoutTwoLeftRightEqual();\r\n }\r\n return this.layoutTwoLeftRight();\r\n }\r\n layoutThree() {\r\n console.log('layoutThree:', this);\r\n if (this.proportions[0] == 'n') {\r\n return this.layoutThreeLeftAndOther();\r\n }\r\n return this.layoutThreeTopAndOther();\r\n }\r\n layoutFour() {\r\n if (this.proportions[0] == 'w') {\r\n return this.layoutFourTopAndOther();\r\n }\r\n return this.layoutFourLeftAndOther();\r\n }\r\n layoutTwoTopBottom() {\r\n const width = this.maxWidth;\r\n const height = Math.round(Math.min(width / this.ratios[0], Math.min(width / this.ratios[1], (this.maxHeight - this.spacing) / 2)));\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width, height },\r\n sides: exports.RectPart.Left | exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: 0, y: height + this.spacing, width, height },\r\n sides: exports.RectPart.Left | exports.RectPart.Bottom | exports.RectPart.Right\r\n },\r\n ];\r\n }\r\n layoutTwoLeftRightEqual() {\r\n const width = (this.maxWidth - this.spacing) / 2;\r\n const height = Math.round(Math.min(width / this.ratios[0], Math.min(width / this.ratios[1], this.maxHeight * 1)));\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width, height },\r\n sides: exports.RectPart.Top | exports.RectPart.Left | exports.RectPart.Bottom\r\n },\r\n {\r\n geometry: { x: width + this.spacing, y: 0, width, height },\r\n sides: exports.RectPart.Top | exports.RectPart.Right | exports.RectPart.Bottom\r\n },\r\n ];\r\n }\r\n layoutTwoLeftRight() {\r\n const minimalWidth = Math.round(this.minWidth * 1.5);\r\n const secondWidth = Math.min(Math.round(Math.max(0.4 * (this.maxWidth - this.spacing), (this.maxWidth - this.spacing) / this.ratios[0]\r\n / (1 / this.ratios[0] + 1 / this.ratios[1]))), this.maxWidth - this.spacing - minimalWidth);\r\n const firstWidth = this.maxWidth\r\n - secondWidth\r\n - this.spacing;\r\n const height = Math.min(this.maxHeight, Math.round(Math.min(firstWidth / this.ratios[0], secondWidth / this.ratios[1])));\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: firstWidth, height },\r\n sides: exports.RectPart.Top | exports.RectPart.Left | exports.RectPart.Bottom\r\n },\r\n {\r\n geometry: { x: firstWidth + this.spacing, y: 0, width: secondWidth, height },\r\n sides: exports.RectPart.Top | exports.RectPart.Right | exports.RectPart.Bottom\r\n },\r\n ];\r\n }\r\n layoutThreeLeftAndOther() {\r\n const firstHeight = this.maxHeight;\r\n const thirdHeight = Math.round(Math.min((this.maxHeight - this.spacing) / 2., (this.ratios[1] * (this.maxWidth - this.spacing)\r\n / (this.ratios[2] + this.ratios[1]))));\r\n const secondHeight = firstHeight\r\n - thirdHeight\r\n - this.spacing;\r\n const rightWidth = Math.max(this.minWidth, Math.round(Math.min((this.maxWidth - this.spacing) / 2., Math.min(thirdHeight * this.ratios[2], secondHeight * this.ratios[1]))));\r\n const leftWidth = Math.min(Math.round(firstHeight * this.ratios[0]), this.maxWidth - this.spacing - rightWidth);\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: leftWidth, height: firstHeight },\r\n sides: exports.RectPart.Top | exports.RectPart.Left | exports.RectPart.Bottom\r\n },\r\n {\r\n geometry: { x: leftWidth + this.spacing, y: 0, width: rightWidth, height: secondHeight },\r\n sides: exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: leftWidth + this.spacing, y: secondHeight + this.spacing, width: rightWidth, height: thirdHeight },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Right\r\n },\r\n ];\r\n }\r\n layoutThreeTopAndOther() {\r\n const firstWidth = this.maxWidth;\r\n const firstHeight = Math.round(Math.min(firstWidth / this.ratios[0], (this.maxHeight - this.spacing) * 0.66));\r\n const secondWidth = (this.maxWidth - this.spacing) / 2;\r\n const secondHeight = Math.min(this.maxHeight - firstHeight - this.spacing, Math.round(Math.min(secondWidth / this.ratios[1], secondWidth / this.ratios[2])));\r\n const thirdWidth = firstWidth - secondWidth - this.spacing;\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: firstWidth, height: firstHeight },\r\n sides: exports.RectPart.Left | exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: 0, y: firstHeight + this.spacing, width: secondWidth, height: secondHeight },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Left\r\n },\r\n {\r\n geometry: { x: secondWidth + this.spacing, y: firstHeight + this.spacing, width: thirdWidth, height: secondHeight },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Right\r\n },\r\n ];\r\n }\r\n layoutFourTopAndOther() {\r\n const w = this.maxWidth;\r\n const h0 = Math.round(Math.min(w / this.ratios[0], (this.maxHeight - this.spacing) * 0.66));\r\n const h = Math.round((this.maxWidth - 2 * this.spacing)\r\n / (this.ratios[1] + this.ratios[2] + this.ratios[3]));\r\n const w0 = Math.max(this.minWidth, Math.round(Math.min((this.maxWidth - 2 * this.spacing) * 0.4, h * this.ratios[1])));\r\n const w2 = Math.round(Math.max(Math.max(this.minWidth * 1., (this.maxWidth - 2 * this.spacing) * 0.33), h * this.ratios[3]));\r\n const w1 = w - w0 - w2 - 2 * this.spacing;\r\n const h1 = Math.min(this.maxHeight - h0 - this.spacing, h);\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: w, height: h0 },\r\n sides: exports.RectPart.Left | exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: 0, y: h0 + this.spacing, width: w0, height: h1 },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Left\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing, y: h0 + this.spacing, width: w1, height: h1 },\r\n sides: exports.RectPart.Bottom,\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing + w1 + this.spacing, y: h0 + this.spacing, width: w2, height: h1 },\r\n sides: exports.RectPart.Right | exports.RectPart.Bottom\r\n },\r\n ];\r\n }\r\n layoutFourLeftAndOther() {\r\n const h = this.maxHeight;\r\n const w0 = Math.round(Math.min(h * this.ratios[0], (this.maxWidth - this.spacing) * 0.6));\r\n const w = Math.round((this.maxHeight - 2 * this.spacing)\r\n / (1. / this.ratios[1] + 1. / this.ratios[2] + 1. / this.ratios[3]));\r\n const h0 = Math.round(w / this.ratios[1]);\r\n const h1 = Math.round(w / this.ratios[2]);\r\n const h2 = h - h0 - h1 - 2 * this.spacing;\r\n const w1 = Math.max(this.minWidth, Math.min(this.maxWidth - w0 - this.spacing, w));\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: w0, height: h },\r\n sides: exports.RectPart.Top | exports.RectPart.Left | exports.RectPart.Bottom\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing, y: 0, width: w1, height: h0 },\r\n sides: exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing, y: h0 + this.spacing, width: w1, height: h1 },\r\n sides: exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing, y: h0 + h1 + 2 * this.spacing, width: w1, height: h2 },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Right\r\n },\r\n ];\r\n }\r\n static countRatios(sizes) {\r\n return sizes.map(size => size.w / size.h);\r\n }\r\n static countProportions(ratios) {\r\n return ratios.map(ratio => (ratio > 1.2) ? 'w' : (ratio < 0.8) ? 'n' : 'q').join('');\r\n }\r\n}\r\nexports.Layouter = Layouter;\r\nclass ComplexLayouter {\r\n constructor(ratios, averageRatio, maxWidth, minWidth, spacing, maxHeight = maxWidth * 4 / 3) {\r\n this.averageRatio = averageRatio;\r\n this.maxWidth = maxWidth;\r\n this.minWidth = minWidth;\r\n this.spacing = spacing;\r\n this.maxHeight = maxHeight;\r\n this.ratios = ComplexLayouter.cropRatios(ratios, averageRatio);\r\n this.count = ratios.length;\r\n }\r\n static cropRatios(ratios, averageRatio) {\r\n const kMaxRatio = 2.75;\r\n const kMinRatio = 0.6667;\r\n return ratios.map(ratio => {\r\n return averageRatio > 1.1\r\n ? snap(ratio, 1., kMaxRatio)\r\n : snap(ratio, kMinRatio, 1.);\r\n });\r\n }\r\n layout() {\r\n let result = new Array(this.count);\r\n let attempts = [];\r\n const multiHeight = (offset, count) => {\r\n const ratios = this.ratios.slice(offset, offset + count); // warn\r\n const sum = accumulate(ratios, 0);\r\n return (this.maxWidth - (count - 1) * this.spacing) / sum;\r\n };\r\n const pushAttempt = (lineCounts) => {\r\n let heights = [];\r\n let offset = 0;\r\n for (let count of lineCounts) {\r\n heights.push(multiHeight(offset, count));\r\n offset += count;\r\n }\r\n attempts.push({ lineCounts, heights }); // warn\r\n };\r\n for (let first = 1; first != this.count; ++first) {\r\n const second = this.count - first;\r\n if (first > 3 || second > 3) {\r\n continue;\r\n }\r\n pushAttempt([first, second]);\r\n }\r\n for (let first = 1; first != this.count - 1; ++first) {\r\n for (let second = 1; second != this.count - first; ++second) {\r\n const third = this.count - first - second;\r\n if ((first > 3)\r\n || (second > ((this.averageRatio < 0.85) ? 4 : 3))\r\n || (third > 3)) {\r\n continue;\r\n }\r\n pushAttempt([first, second, third]);\r\n }\r\n }\r\n for (let first = 1; first != this.count - 1; ++first) {\r\n for (let second = 1; second != this.count - first; ++second) {\r\n for (let third = 1; third != this.count - first - second; ++third) {\r\n const fourth = this.count - first - second - third;\r\n if (first > 3 || second > 3 || third > 3 || fourth > 3) {\r\n continue;\r\n }\r\n pushAttempt([first, second, third, fourth]);\r\n }\r\n }\r\n }\r\n let optimalAttempt = null;\r\n let optimalDiff = 0;\r\n for (const attempt of attempts) {\r\n const { heights, lineCounts: counts } = attempt;\r\n const lineCount = counts.length;\r\n const totalHeight = accumulate(heights, 0)\r\n + this.spacing * (lineCount - 1);\r\n const minLineHeight = Math.min(...heights);\r\n const maxLineHeight = Math.max(...heights);\r\n const bad1 = (minLineHeight < this.minWidth) ? 1.5 : 1;\r\n const bad2 = (() => {\r\n for (let line = 1; line != lineCount; ++line) {\r\n if (counts[line - 1] > counts[line]) {\r\n return 1.5;\r\n }\r\n }\r\n return 1.;\r\n })();\r\n const diff = Math.abs(totalHeight - this.maxHeight) * bad1 * bad2;\r\n if (!optimalAttempt || diff < optimalDiff) {\r\n optimalAttempt = attempt;\r\n optimalDiff = diff;\r\n }\r\n }\r\n const optimalCounts = optimalAttempt.lineCounts;\r\n const optimalHeights = optimalAttempt.heights;\r\n const rowCount = optimalCounts.length;\r\n let index = 0;\r\n let y = 0;\r\n for (let row = 0; row != rowCount; ++row) {\r\n const colCount = optimalCounts[row];\r\n const lineHeight = optimalHeights[row];\r\n const height = Math.round(lineHeight);\r\n let x = 0;\r\n for (let col = 0; col != colCount; ++col) {\r\n const sides = exports.RectPart.None\r\n | (row == 0 ? exports.RectPart.Top : exports.RectPart.None)\r\n | (row == rowCount - 1 ? exports.RectPart.Bottom : exports.RectPart.None)\r\n | (col == 0 ? exports.RectPart.Left : exports.RectPart.None)\r\n | (col == colCount - 1 ? exports.RectPart.Right : exports.RectPart.None);\r\n const ratio = this.ratios[index];\r\n const width = (col == colCount - 1)\r\n ? (this.maxWidth - x)\r\n : Math.round(ratio * lineHeight);\r\n result[index] = {\r\n geometry: { x, y, width, height },\r\n sides\r\n };\r\n x += width + this.spacing;\r\n ++index;\r\n }\r\n y += height + this.spacing;\r\n }\r\n return result;\r\n }\r\n}\r\n"
},
{
"id": 50,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"name": "./src/pages/pagePassword.ts",
"index": 73,
"index2": 70,
"size": 4506,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"issuerId": 72,
"issuerName": "./src/pages/pageSignQR.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2979,
"building": 103,
"dependencies": 2951
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "./pagePassword",
"loc": "9:39-64"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "./pagePassword",
"loc": "38:39-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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;\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.loadLottieWorkers(),\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.loadAnimationWorker({\r\n container: page.pageEl.querySelector('.auth-image'),\r\n loop: false,\r\n autoplay: false,\r\n animationData: JSON.parse(str),\r\n width: 166,\r\n height: 166\r\n }))\r\n .then(_animation => {\r\n animation = _animation;\r\n animation.addListener('enterFrame', currentFrame => {\r\n //console.log('enterFrame', e, needFrame);\r\n if ((animation.direction == 1 && currentFrame >= needFrame) ||\r\n (animation.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"
},
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"index": 0,
"index2": 75,
"size": 6167,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 19,
"building": 1832
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "./src/index.ts",
"loc": "index"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\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\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 // We listen to the resize event (https://css-tricks.com/the-trick-to-viewport-units-on-mobile/)\r\n let setVH = () => {\r\n let vh = window.innerHeight * 0.01;\r\n document.documentElement.style.setProperty('--vh', `${vh}px`);\r\n };\r\n window.addEventListener('resize', setVH);\r\n setVH();\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 if (navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1) {\r\n document.body.classList.add('is-mac', 'emoji-supported');\r\n }\r\n // @ts-ignore\r\n if (!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch)) {\r\n document.documentElement.classList.add('no-touch');\r\n }\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/pageSignQR')).default.mount();\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 utils = yield Promise.resolve().then(() => __importStar(require('./lib/utils')));\r\n utils.$rootScope.myID = userID;\r\n let findUpClassName = 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 let ripple = (yield Promise.resolve().then(() => __importStar(require('./components/misc')))).ripple;\r\n Array.from(document.getElementsByClassName('rp')).forEach(el => ripple(el));\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": 53,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"name": "./src/materialize.scss",
"index": 1,
"index2": 1,
"size": 39,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./materialize.scss",
"loc": "31:0-29"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "// extracted by mini-css-extract-plugin"
},
{
"id": 54,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"name": "./src/scss/style.scss",
"index": 3,
"index2": 3,
"size": 39,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./scss/style.scss",
"loc": "32:0-28"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "// extracted by mini-css-extract-plugin"
},
{
"id": 55,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"name": "./src/scss/tgico.scss",
"index": 5,
"index2": 5,
"size": 39,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./scss/tgico.scss",
"loc": "33:0-28"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "// extracted by mini-css-extract-plugin"
},
{
"id": 56,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\smoothscroll.js",
"name": "./src/lib/smoothscroll.js",
"index": 17,
"index2": 14,
"size": 4025,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"issuerId": 9,
"issuerName": "./src/components/scrollable_new.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"name": "./src/components/scrollable_new.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1195,
"building": 1822,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"module": "./src/components/scrollable_new.ts",
"moduleName": "./src/components/scrollable_new.ts",
"type": "cjs require",
"userRequest": "../lib/smoothscroll",
"loc": "7:39-69"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "// credits to https://github.com/iamdustan/smoothscroll\r\n!function(){\"use strict\";function o(){var o=window,t=document;if(!(\"scrollBehavior\"in t.documentElement.style&&!0!==o.__forceSmoothScrollPolyfill__)){var l,e=o.HTMLElement||o.Element,r=468,i={scroll:o.scroll||o.scrollTo,scrollBy:o.scrollBy,elementScroll:e.prototype.scroll||n,scrollIntoView:e.prototype.scrollIntoView},s=o.performance&&o.performance.now?o.performance.now.bind(o.performance):Date.now,c=(l=o.navigator.userAgent,new RegExp([\"MSIE \",\"Trident/\",\"Edge/\"].join(\"|\")).test(l)?1:0);o.scroll=o.scrollTo=function(){void 0!==arguments[0]&&(!0!==f(arguments[0])?h.call(o,t.body,void 0!==arguments[0].left?~~arguments[0].left:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:o.scrollY||o.pageYOffset):i.scroll.call(o,void 0!==arguments[0].left?arguments[0].left:\"object\"!=typeof arguments[0]?arguments[0]:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:o.scrollY||o.pageYOffset))},o.scrollBy=function(){void 0!==arguments[0]&&(f(arguments[0])?i.scrollBy.call(o,void 0!==arguments[0].left?arguments[0].left:\"object\"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(o,t.body,~~arguments[0].left+(o.scrollX||o.pageXOffset),~~arguments[0].top+(o.scrollY||o.pageYOffset)))},e.prototype.scroll=e.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==f(arguments[0])){var o=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===o?this.scrollLeft:~~o,void 0===t?this.scrollTop:~~t)}else{if(\"number\"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError(\"Value could not be converted\");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:\"object\"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},e.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==f(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},e.prototype.scrollIntoView=function(){if(!0!==f(arguments[0])){var l=function(o){for(;o!==t.body&&!1===(e=p(l=o,\"Y\")&&a(l,\"Y\"),r=p(l,\"X\")&&a(l,\"X\"),e||r);)o=o.parentNode||o.host;var l,e,r;return o}(this),e=l.getBoundingClientRect(),r=this.getBoundingClientRect();l!==t.body?(h.call(this,l,l.scrollLeft+r.left-e.left,l.scrollTop+r.top-e.top),\"fixed\"!==o.getComputedStyle(l).position&&o.scrollBy({left:e.left,top:e.top,behavior:\"smooth\"})):o.scrollBy({left:r.left,top:r.top,behavior:\"smooth\"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function n(o,t){this.scrollLeft=o,this.scrollTop=t}function f(o){if(null===o||\"object\"!=typeof o||void 0===o.behavior||\"auto\"===o.behavior||\"instant\"===o.behavior)return!0;if(\"object\"==typeof o&&\"smooth\"===o.behavior)return!1;throw new TypeError(\"behavior member of ScrollOptions \"+o.behavior+\" is not a valid value for enumeration ScrollBehavior.\")}function p(o,t){return\"Y\"===t?o.clientHeight+c<o.scrollHeight:\"X\"===t?o.clientWidth+c<o.scrollWidth:void 0}function a(t,l){var e=o.getComputedStyle(t,null)[\"overflow\"+l];return\"auto\"===e||\"scroll\"===e}function d(t){var l,e,i,c,n=(s()-t.startTime)/r;c=n=n>1?1:n,l=.5*(1-Math.cos(Math.PI*c)),e=t.startX+(t.x-t.startX)*l,i=t.startY+(t.y-t.startY)*l,t.method.call(t.scrollable,e,i),e===t.x&&i===t.y||o.requestAnimationFrame(d.bind(o,t))}function h(l,e,r){var c,f,p,a,h=s();l===t.body?(c=o,f=o.scrollX||o.pageXOffset,p=o.scrollY||o.pageYOffset,a=i.scroll):(c=l,f=l.scrollLeft,p=l.scrollTop,a=n),d({scrollable:c,method:a,startTime:h,startX:f,startY:p,x:e,y:r})}}\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports={polyfill:o}:o()}();"
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"index": 19,
"index2": 71,
"size": 11278,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "./pageAuthCode",
"loc": "11:39-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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;\r\n let idleAnimation;\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 codeInput.focus();\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 cleanup = () => {\r\n setTimeout(() => {\r\n if (animation)\r\n animation.destroy();\r\n if (idleAnimation)\r\n idleAnimation.destroy();\r\n }, 300);\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 cleanup();\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 cleanup();\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 cleanup();\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(Math.min(max, length) * (165 / max) + 11.33);\r\n idleAnimation.canvas.style.display = 'none';\r\n animation.canvas.style.display = '';\r\n }\r\n else {\r\n frame = 0;\r\n }\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 let imageDiv = page.pageEl.querySelector('.auth-image');\r\n return Promise.all([\r\n lottieLoader_1.default.loadLottieWorkers(),\r\n fetch('assets/img/TwoFactorSetupMonkeyIdle.tgs')\r\n .then(res => res.arrayBuffer())\r\n .then(data => mtprotoworker_1.default.gzipUncompress(data, true))\r\n .then(str => lottieLoader_1.default.loadAnimationWorker({\r\n container: imageDiv,\r\n loop: true,\r\n autoplay: true,\r\n animationData: JSON.parse(str),\r\n width: 166,\r\n height: 166\r\n }))\r\n .then(animation => {\r\n idleAnimation = animation;\r\n }),\r\n /* false && */ 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.loadAnimationWorker({\r\n container: imageDiv,\r\n loop: false,\r\n autoplay: false,\r\n animationData: JSON.parse(str),\r\n width: 166,\r\n height: 166\r\n }))\r\n .then(_animation => {\r\n animation = _animation;\r\n if (!codeInput.value.length) {\r\n animation.canvas.style.display = 'none';\r\n }\r\n animation.addListener('enterFrame', currentFrame => {\r\n console.log('enterFrame', currentFrame, needFrame);\r\n //let currentFrame = Math.round(e.currentTime);\r\n if ((animation.direction == 1 && currentFrame >= needFrame) ||\r\n (animation.direction == -1 && currentFrame <= needFrame)) {\r\n animation.setSpeed(1);\r\n animation.pause();\r\n }\r\n if (currentFrame == 0 && needFrame == 0) {\r\n animation.curFrame = 0;\r\n if (idleAnimation) {\r\n animation.canvas.style.display = 'none';\r\n idleAnimation.canvas.style.display = '';\r\n idleAnimation.restart();\r\n }\r\n }\r\n });\r\n //console.log(animation.getDuration(), animation.getDuration(true));\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<br>with the code.';\r\n break;\r\n case 'auth.sentCodeTypeApp':\r\n sentTypeElement.innerHTML = 'We have sent you a message in Telegram<br>with the code.';\r\n break;\r\n case 'auth.sentCodeTypeCall':\r\n sentTypeElement.innerHTML = 'We will call you and voice<br>the code.';\r\n break;\r\n default:\r\n sentTypeElement.innerHTML = `Please check everything<br>for a code (type: ${authCode.type._})`;\r\n break;\r\n }\r\n});\r\nexports.default = page;\r\n"
},
{
"id": 58,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"name": "./src/pages/pageSignUp.ts",
"index": 20,
"index2": 69,
"size": 4295,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"issuerId": 57,
"issuerName": "./src/pages/pageAuthCode.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1040,
"building": 297,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "./pageSignUp",
"loc": "7:37-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 misc_1 = require(\"../components/misc\");\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 page_1 = __importDefault(require(\"./page\"));\r\nconst popupAvatar_1 = __importDefault(require(\"../components/popupAvatar\"));\r\nconst appProfileManager_1 = __importDefault(require(\"../lib/appManagers/appProfileManager\"));\r\nlet authCode = null;\r\nlet onFirstMount = () => {\r\n const pageElement = page.pageEl;\r\n const avatarPreview = pageElement.querySelector('#canvas-avatar');\r\n let uploadAvatar;\r\n pageElement.querySelector('.auth-image').addEventListener('click', () => {\r\n popupAvatar_1.default.open(avatarPreview, (_uploadAvatar) => {\r\n uploadAvatar = _uploadAvatar;\r\n });\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 (!uploadAvatar) {\r\n console.log('User has not selected avatar');\r\n return resolve();\r\n }\r\n console.log('invoking uploadFile...');\r\n uploadAvatar().then((inputFile) => {\r\n console.log('uploaded smthn', inputFile);\r\n appProfileManager_1.default.uploadProfilePhoto(inputFile).then(resolve, 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": 59,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagesManager.ts",
"name": "./src/pages/pagesManager.ts",
"index": 23,
"index2": 18,
"size": 1320,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\page.ts",
"issuerId": 18,
"issuerName": "./src/pages/page.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 18,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\page.ts",
"name": "./src/pages/page.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1027,
"building": 304,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\page.ts",
"module": "./src/pages/page.ts",
"moduleName": "./src/pages/page.ts",
"type": "cjs require",
"userRequest": "./pagesManager",
"loc": "15:39-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 if (this.pageID != -1 && id > 1) {\r\n lottieLoader_1.default.loadLottieWorkers();\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": 60,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_methods.ts",
"name": "./src/lib/crypto/crypto_methods.ts",
"index": 27,
"index2": 20,
"size": 1422,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"issuerId": 1,
"issuerName": "./src/lib/mtproto/mtprotoworker.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"name": "./src/lib/mtproto/mtprotoworker.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2555,
"building": 4645,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"module": "./src/lib/mtproto/mtprotoworker.ts",
"moduleName": "./src/lib/mtproto/mtprotoworker.ts",
"type": "cjs require",
"userRequest": "../crypto/crypto_methods",
"loc": "27:41-76"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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": 61,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\worker-loader\\dist\\cjs.js!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"index": 28,
"index2": 21,
"size": 113,
"cacheable": false,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"issuerId": 1,
"issuerName": "./src/lib/mtproto/mtprotoworker.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"name": "./src/lib/mtproto/mtprotoworker.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2555,
"building": 4645,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"module": "./src/lib/mtproto/mtprotoworker.ts",
"moduleName": "./src/lib/mtproto/mtprotoworker.ts",
"type": "cjs require",
"userRequest": "./mtproto.worker.js",
"loc": "39:54-84"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "module.exports = function() {\n return new Worker(__webpack_public_path__ + \"c37a1e067975b1b72c39.worker.js\");\n};"
},
{
"id": 62,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\idb.ts",
"name": "./src/lib/idb.ts",
"index": 38,
"index2": 27,
"size": 11959,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"issuerId": 20,
"issuerName": "./src/lib/mtproto/apiFileManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
},
{
"id": 20,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"name": "./src/lib/mtproto/apiFileManager.ts",
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
}
}
],
"profile": {
"factory": 1083,
"building": 60,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../idb",
"loc": "17:30-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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.name = 'IndexedDB';\r\n this.openDatabase(true);\r\n }\r\n isAvailable() {\r\n return this.storageIsAvailable;\r\n }\r\n openDatabase(createNew = false) {\r\n if (this.openDbPromise && !createNew) {\r\n return this.openDbPromise;\r\n }\r\n const createObjectStore = (db) => {\r\n db.createObjectStore(this.dbStoreName);\r\n };\r\n try {\r\n var request = indexedDB.open(this.dbName, this.dbVersion);\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 let 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 const db = request.result;\r\n let calledNew = false;\r\n console.log('Opened IndexedDB');\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 db.onclose = (e) => {\r\n console.error('IndexedDB closed:', e);\r\n !calledNew && this.openDatabase();\r\n };\r\n db.onabort = (e) => {\r\n console.error('IndexedDB abort:', e);\r\n const transaction = e.target;\r\n this.openDatabase(calledNew = true);\r\n if (transaction.onerror) {\r\n transaction.onerror(e);\r\n }\r\n db.close();\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 Promise.resolve();\r\n return this.openDatabase().then((db) => {\r\n try {\r\n console.log('IndexedDB: Delete file: `' + fileName + '`');\r\n var objectStore = db.transaction([this.dbStoreName], 'readwrite')\r\n .objectStore(this.dbStoreName);\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 Promise.resolve(blobConstruct([blob]));\r\n return this.openDatabase().then((db) => {\r\n if (!(blob instanceof Blob)) {\r\n blob = bin_utils_1.blobConstruct([blob]);\r\n }\r\n console.log('IndexedDB saveFile:', fileName, blob);\r\n const handleError = (error) => {\r\n console.error('IndexedDB saveFile transaction error:', fileName, blob, db, error, error && error.name);\r\n if ((!error || error.name === 'InvalidStateError') /* && false */) {\r\n setTimeout(() => {\r\n this.saveFile(fileName, blob);\r\n }, 2e3);\r\n }\r\n else {\r\n //console.error('IndexedDB saveFile transaction error:', error, error && error.name);\r\n }\r\n };\r\n var finished = false;\r\n try {\r\n const transaction = db.transaction([this.dbStoreName], 'readwrite');\r\n transaction.onerror = (e) => {\r\n handleError(transaction.error);\r\n };\r\n transaction.oncomplete = (e) => {\r\n console.log('IndexedDB saveFile transaction complete:', fileName);\r\n };\r\n /* transaction.addEventListener('abort', (e) => {\r\n //handleError();\r\n console.error('IndexedDB: saveFile transaction abort!', transaction.error);\r\n }); */\r\n const objectStore = transaction.objectStore(this.dbStoreName);\r\n var request = objectStore.put(blob, fileName);\r\n setTimeout(() => {\r\n if (!finished) {\r\n console.error('IDB: REQUEST NOT FINISHED', fileName, request);\r\n }\r\n }, 3000);\r\n }\r\n catch (error) {\r\n handleError(error);\r\n return blob;\r\n /* this.storageIsAvailable = false;\r\n throw error; */\r\n }\r\n return new Promise((resolve, reject) => {\r\n request.onsuccess = (event) => {\r\n resolve(blob);\r\n finished = true;\r\n };\r\n request.onerror = (error) => {\r\n reject(error);\r\n finished = true;\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) {\r\n //return Promise.reject();\r\n return this.openDatabase().then((db) => {\r\n console.log('IDB getFile pre:', fileName);\r\n var finished = false;\r\n try {\r\n var objectStore = db.transaction([this.dbStoreName], 'readonly')\r\n .objectStore(this.dbStoreName);\r\n var request = objectStore.get(fileName);\r\n setTimeout(() => {\r\n if (!finished) {\r\n console.error('IDB: REQUEST NOT FINISHED', fileName, request);\r\n }\r\n }, 3000);\r\n //console.log('IDB getFile:', fileName, request);\r\n }\r\n catch (err) {\r\n console.error('IDB getFile error:', err, fileName, request, request.error);\r\n }\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 finished = true;\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\nwindow.IdbFileStorage = idbFileStorage;\r\nexports.default = idbFileStorage;\r\n"
},
{
"id": 63,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"name": "./src/lib/mtproto/mtproto.ts",
"index": 43,
"index2": 36,
"size": 2926,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtproto",
"loc": "22:18-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.telegramMeWebService = exports.TelegramMeWebService = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\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 = Date.now() / 1000;\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": 64,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\cropper.ts",
"name": "./src/lib/cropper.ts",
"index": 63,
"index2": 50,
"size": 7890,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"issuerId": 48,
"issuerName": "./src/components/popupAvatar.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
},
{
"id": 58,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"name": "./src/pages/pageSignUp.ts",
"profile": {
"factory": 1040,
"building": 297,
"dependencies": 1
}
},
{
"id": 48,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"name": "./src/components/popupAvatar.ts",
"profile": {
"factory": 1596,
"building": 115,
"dependencies": 1
}
}
],
"profile": {
"factory": 1168,
"building": 28
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 48,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"module": "./src/components/popupAvatar.ts",
"moduleName": "./src/components/popupAvatar.ts",
"type": "cjs require",
"userRequest": "../lib/cropper",
"loc": "7:34-59"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"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": 65,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\poll.ts",
"name": "./src/components/poll.ts",
"index": 66,
"index2": 58,
"size": 11520,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"issuerId": 31,
"issuerName": "./src/components/wrappers.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 31,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"name": "./src/components/wrappers.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 314,
"building": 338,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "./poll",
"loc": "47:31-48"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 appPollsManager_1 = __importDefault(require(\"../lib/appManagers/appPollsManager\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst utils_1 = require(\"../lib/utils\");\r\nlet lineTotalLength = 0;\r\nconst tailLength = 9;\r\nconst times = 10;\r\nconst fullTime = 340;\r\nconst oneTime = fullTime / times;\r\nlet roundPercents = (percents) => {\r\n //console.log('roundPercents before percents:', percents);\r\n let sum = percents.reduce((acc, p) => acc + Math.round(p), 0);\r\n if (sum > 100) {\r\n let diff = sum - 100;\r\n let length = percents.length;\r\n for (let i = 0; i < diff; ++i) {\r\n let minIndex = -1, minRemainder = 1;\r\n for (let k = 0; k < length; ++k) {\r\n let remainder = percents[k] % 1;\r\n if (remainder >= 0.5 && remainder < minRemainder) {\r\n minRemainder = remainder;\r\n minIndex = k;\r\n }\r\n }\r\n if (minIndex == -1) {\r\n throw new Error('lol chto');\r\n }\r\n percents[minIndex] -= minRemainder;\r\n }\r\n }\r\n else if (sum < 100) {\r\n let diff = 100 - sum;\r\n let length = percents.length;\r\n for (let i = 0; i < diff; ++i) {\r\n let minIndex = -1, maxRemainder = 0;\r\n for (let k = 0; k < length; ++k) {\r\n let remainder = percents[k] % 1;\r\n if (remainder < 0.5 && remainder > maxRemainder) {\r\n maxRemainder = remainder;\r\n minIndex = k;\r\n }\r\n }\r\n if (minIndex == -1) {\r\n throw new Error('lol chto');\r\n }\r\n percents[minIndex] += 1 - maxRemainder;\r\n }\r\n }\r\n //console.log('roundPercents after percents:', percents);\r\n};\r\nconst connectedPolls = [];\r\nutils_1.$rootScope.$on('poll_update', (e) => {\r\n let { poll, results } = e.detail;\r\n for (let connected of connectedPolls) {\r\n if (connected.id == poll.id) {\r\n let pollElement = connected.element;\r\n pollElement.performResults(results, poll.chosenIndex);\r\n }\r\n }\r\n});\r\nclass PollElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n this.maxOffset = -46.5;\r\n this.isQuiz = false;\r\n this.isRetracted = false;\r\n this.chosenIndex = -1;\r\n // элемент создан\r\n }\r\n connectedCallback() {\r\n // браузер вызывает этот метод при добавлении элемента в документ\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n if (!lineTotalLength) {\r\n lineTotalLength = document.getElementById('poll-line').getTotalLength();\r\n console.log('line total length:', lineTotalLength);\r\n }\r\n let pollID = this.getAttribute('poll-id');\r\n let { poll, results } = appPollsManager_1.default.getPoll(pollID);\r\n connectedPolls.push({ id: pollID, element: this });\r\n console.log('pollElement poll:', poll, results);\r\n let desc = '';\r\n if (poll.pFlags) {\r\n if (poll.pFlags.closed) {\r\n desc = 'Final results';\r\n }\r\n else {\r\n if (poll.pFlags.quiz) {\r\n this.isQuiz = true;\r\n }\r\n let type = this.isQuiz ? 'Quiz' : 'Poll';\r\n desc = (poll.pFlags.public_voters ? 'Public' : 'Anonymous') + ' ' + type;\r\n }\r\n }\r\n let votes = poll.answers.map((answer, idx) => {\r\n return `\r\n <div class=\"poll-answer\" data-index=\"${idx}\">\r\n <div class=\"circle-hover\">\r\n <div class=\"animation-ring\"></div>\r\n <svg class=\"progress-ring\">\r\n <circle class=\"progress-ring__circle\" cx=\"13\" cy=\"13\" r=\"9\"></circle>\r\n </svg>\r\n </div>\r\n <div class=\"poll-answer-percents\"></div>\r\n <div class=\"poll-answer-text\">${richtextprocessor_1.RichTextProcessor.wrapEmojiText(answer.text)}</div>\r\n <svg version=\"1.1\" class=\"poll-line\" style=\"display: none;\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 480 35\" xml:space=\"preserve\">\r\n <use href=\"#poll-line\"></use>\r\n </svg>\r\n </div>\r\n `;\r\n }).join('');\r\n this.innerHTML = `\r\n <div class=\"poll-title\">${poll.rQuestion}</div>\r\n <div class=\"poll-desc\">${desc}</div>\r\n ${votes}\r\n <div class=\"poll-votes-count\"></div>\r\n `;\r\n this.answerDivs = Array.from(this.querySelectorAll('.poll-answer'));\r\n this.votersCountDiv = this.querySelector('.poll-votes-count');\r\n this.svgLines = Array.from(this.querySelectorAll('.poll-line'));\r\n this.numberDivs = Array.from(this.querySelectorAll('.poll-answer-percents'));\r\n let width = this.getBoundingClientRect().width;\r\n this.maxLength = width + tailLength + this.maxOffset + -13.7; // 13 - position left\r\n if (poll.chosenIndex !== -1) {\r\n this.performResults(results, poll.chosenIndex);\r\n }\r\n else {\r\n this.setVotersCount(results);\r\n this.addEventListener('click', this.clickHandler);\r\n }\r\n }\r\n disconnectedCallback() {\r\n // браузер вызывает этот метод при удалении элемента из документа\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n connectedPolls.findAndSplice(c => c.element == this);\r\n }\r\n static get observedAttributes() {\r\n return [ /* массив имён атрибутов для отслеживания их изменений */];\r\n }\r\n attributeChangedCallback(name, oldValue, newValue) {\r\n // вызывается при изменении одного из перечисленных выше атрибутов\r\n }\r\n adoptedCallback() {\r\n // вызывается, когда элемент перемещается в новый документ\r\n // (происходит в document.adoptNode, используется очень редко)\r\n }\r\n clickHandler(e) {\r\n let target = utils_1.findUpClassName(e.target, 'poll-answer');\r\n if (!target) {\r\n return;\r\n }\r\n let answerIndex = +target.dataset.index;\r\n this.sendVote(answerIndex);\r\n /* target.classList.add('is-voting');\r\n setTimeout(() => { // simulate\r\n this.setResults([100, 0], answerIndex);\r\n target.classList.remove('is-voting');\r\n }, 1000); */\r\n }\r\n sendVote(index) {\r\n let target = this.answerDivs[index];\r\n target.classList.add('is-voting');\r\n let mid = +this.getAttribute('message-id');\r\n this.classList.add('disable-hover');\r\n appPollsManager_1.default.sendVote(mid, [index]).then(() => {\r\n target.classList.remove('is-voting');\r\n this.classList.remove('disable-hover');\r\n });\r\n }\r\n performResults(results, chosenIndex) {\r\n if (this.chosenIndex != chosenIndex) { // if we voted\r\n this.isRetracted = this.chosenIndex != -1 && chosenIndex == -1;\r\n this.chosenIndex = chosenIndex;\r\n if (this.isRetracted) {\r\n this.addEventListener('click', this.clickHandler);\r\n }\r\n else {\r\n this.removeEventListener('click', this.clickHandler);\r\n }\r\n }\r\n // is need update\r\n if (this.chosenIndex != -1 || this.isRetracted) {\r\n const percents = results.results.map(v => v.voters / results.total_voters * 100);\r\n this.setResults(this.isRetracted ? this.percents : percents, chosenIndex);\r\n this.percents = percents;\r\n this.isRetracted = false;\r\n }\r\n this.setVotersCount(results);\r\n }\r\n setResults(percents, chosenIndex) {\r\n this.svgLines.forEach(svg => svg.style.display = '');\r\n if (chosenIndex !== -1) {\r\n let answerDiv = this.answerDivs[chosenIndex];\r\n if (!this.selectedSpan) {\r\n this.selectedSpan = document.createElement('span');\r\n this.selectedSpan.classList.add('poll-answer-selected', 'tgico-check');\r\n }\r\n answerDiv.append(this.selectedSpan);\r\n }\r\n let maxValue = Math.max(...percents);\r\n this.maxLengths = percents.map(p => p / maxValue * this.maxLength);\r\n // line\r\n if (this.isRetracted) {\r\n this.svgLines.forEach((svg, idx) => {\r\n this.setLineProgress(idx, -1);\r\n });\r\n }\r\n else {\r\n this.svgLines.forEach((svg, idx) => {\r\n void svg.getBoundingClientRect(); // reflow\r\n this.setLineProgress(idx, 1);\r\n });\r\n }\r\n percents = percents.slice();\r\n roundPercents(percents);\r\n // numbers\r\n if (this.isRetracted) {\r\n for (let i = (times - 1), k = 0; i >= 0; --i, ++k) {\r\n setTimeout(() => {\r\n percents.forEach((percents, idx) => {\r\n let value = Math.round(percents / times * i);\r\n this.numberDivs[idx].innerText = value + '%';\r\n });\r\n }, oneTime * k);\r\n }\r\n }\r\n else {\r\n for (let i = 0; i < times; ++i) {\r\n setTimeout(() => {\r\n percents.forEach((percents, idx) => {\r\n let value = Math.round(percents / times * (i + 1));\r\n this.numberDivs[idx].innerText = value + '%';\r\n });\r\n }, oneTime * i);\r\n }\r\n }\r\n if (this.isRetracted) {\r\n this.classList.add('is-retracting');\r\n this.classList.remove('is-voted');\r\n setTimeout(() => {\r\n this.classList.remove('is-retracting');\r\n this.svgLines.forEach(svg => svg.style.display = 'none');\r\n }, fullTime);\r\n }\r\n else {\r\n this.classList.add('is-voted');\r\n }\r\n }\r\n setVotersCount(results) {\r\n let votersCount = results.total_voters || 0;\r\n let votersOrAnswers = this.isQuiz ? (votersCount > 1 || !votersCount ? 'answers' : 'answer') : (votersCount > 1 || !votersCount ? 'votes' : 'vote');\r\n this.votersCountDiv.innerText = `${results.total_voters ? results.total_voters + ' ' + votersOrAnswers : 'No ' + votersOrAnswers}`;\r\n }\r\n setLineProgress(index, percents) {\r\n let svg = this.svgLines[index];\r\n if (percents == -1) {\r\n svg.style.strokeDasharray = '';\r\n svg.style.strokeDashoffset = '';\r\n }\r\n else {\r\n svg.style.strokeDasharray = (percents * this.maxLengths[index]) + ', 485.9';\r\n svg.style.strokeDashoffset = '' + percents * this.maxOffset;\r\n }\r\n }\r\n}\r\nexports.default = PollElement;\r\ncustomElements.define(\"poll-element\", PollElement);\r\n"
},
{
"id": 66,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"name": "./src/components/chatInput.ts",
"index": 67,
"index2": 63,
"size": 31855,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/chatInput",
"loc": "27:20-57"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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\nexports.ChatInput = void 0;\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\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\nconst groupedLayout_1 = require(\"./groupedLayout\");\r\nconst recorder_min_1 = __importDefault(require(\"../../public/recorder.min\"));\r\n//import Recorder from '../opus-recorder/dist/recorder.min';\r\nconst opusDecodeController_1 = __importDefault(require(\"../lib/opusDecodeController\"));\r\nclass ChatInput {\r\n constructor() {\r\n this.pageEl = document.getElementById('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_new_1.default(this.inputMessageContainer);\r\n this.btnSend = document.getElementById('btn-send');\r\n this.btnCancelRecord = this.btnSend.parentElement.previousElementSibling;\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.inputContainer = this.btnSend.parentElement.parentElement;\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.recorder = new recorder_min_1.default({\r\n //encoderBitRate: 32,\r\n //encoderPath: \"../dist/encoderWorker.min.js\",\r\n encoderSampleRate: 48000,\r\n monitorGain: 0,\r\n numberOfChannels: 1,\r\n recordingGain: 1\r\n });\r\n this.recording = false;\r\n this.recordCanceled = false;\r\n this.recordTimeEl = this.inputContainer.querySelector('.record-time');\r\n this.recordRippleEl = this.inputContainer.querySelector('.record-ripple');\r\n this.recordStartTime = 0;\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 += '<br>';\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 return new Promise((resolve, reject) => {\r\n let params = {};\r\n params.file = file;\r\n console.log('selected file:', file, typeof (file), willAttach);\r\n let itemDiv = document.createElement('div');\r\n switch (willAttach.type) {\r\n case 'media': {\r\n let isVideo = file.type.indexOf('video/') === 0;\r\n itemDiv.classList.add('popup-item-media');\r\n if (isVideo) {\r\n let video = document.createElement('video');\r\n let source = document.createElement('source');\r\n source.src = params.objectURL = URL.createObjectURL(file);\r\n video.autoplay = false;\r\n video.controls = false;\r\n video.onloadeddata = () => {\r\n params.width = video.videoWidth;\r\n params.height = video.videoHeight;\r\n params.duration = Math.floor(video.duration);\r\n itemDiv.append(video);\r\n resolve(itemDiv);\r\n };\r\n video.append(source);\r\n }\r\n else {\r\n let img = new Image();\r\n img.src = params.objectURL = URL.createObjectURL(file);\r\n img.onload = () => {\r\n params.width = img.naturalWidth;\r\n params.height = img.naturalHeight;\r\n itemDiv.append(img);\r\n resolve(itemDiv);\r\n };\r\n }\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: file.type.indexOf('image/') !== -1 ? 'photo' : 'doc'\r\n }, false, true);\r\n itemDiv.append(docDiv);\r\n resolve(itemDiv);\r\n break;\r\n }\r\n }\r\n willAttach.sendFileDetails.push(params);\r\n });\r\n };\r\n let attachFiles = (files) => {\r\n this.fileInput.value = '';\r\n let container = this.attachMediaPopUp.container.firstElementChild;\r\n container.classList.remove('is-media', 'is-document', 'is-album');\r\n this.attachMediaPopUp.captionInput.value = '';\r\n this.attachMediaPopUp.mediaContainer.innerHTML = '';\r\n this.attachMediaPopUp.mediaContainer.style.width = this.attachMediaPopUp.mediaContainer.style.height = '';\r\n //willAttach.sendFileDetails.length = 0;\r\n willAttach.sendFileDetails = []; // need new array\r\n files = files.filter(file => {\r\n if (willAttach.type == 'media') {\r\n return ['image/', 'video/'].find(s => file.type.indexOf(s) === 0);\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n if (files.length) {\r\n if (willAttach.type == 'document') {\r\n this.attachMediaPopUp.titleEl.innerText = 'Send ' + (files.length > 1 ? files.length + ' Files' : 'File');\r\n container.classList.add('is-document');\r\n }\r\n else {\r\n container.classList.add('is-media');\r\n let foundPhotos = 0;\r\n let foundVideos = 0;\r\n files.forEach(file => {\r\n if (file.type.indexOf('image/') === 0)\r\n ++foundPhotos;\r\n else if (file.type.indexOf('video/') === 0)\r\n ++foundVideos;\r\n });\r\n if (foundPhotos && foundVideos) {\r\n this.attachMediaPopUp.titleEl.innerText = 'Send Album';\r\n }\r\n else if (foundPhotos) {\r\n this.attachMediaPopUp.titleEl.innerText = 'Send ' + (foundPhotos > 1 ? foundPhotos + ' Photos' : 'Photo');\r\n }\r\n else if (foundVideos) {\r\n this.attachMediaPopUp.titleEl.innerText = 'Send ' + (foundVideos > 1 ? foundVideos + ' Videos' : 'Video');\r\n }\r\n }\r\n }\r\n Promise.all(files.map(attachFile)).then(results => {\r\n if (willAttach.type == 'media') {\r\n if (willAttach.sendFileDetails.length > 1) {\r\n container.classList.add('is-album');\r\n let layouter = new groupedLayout_1.Layouter(willAttach.sendFileDetails.map(o => ({ w: o.width, h: o.height })), 380, 100, 4);\r\n let layout = layouter.layout();\r\n for (let { geometry, sides } of layout) {\r\n let div = results.shift();\r\n div.style.width = geometry.width + 'px';\r\n div.style.height = geometry.height + 'px';\r\n div.style.top = geometry.y + 'px';\r\n div.style.left = geometry.x + 'px';\r\n if (sides & groupedLayout_1.RectPart.Right) {\r\n this.attachMediaPopUp.mediaContainer.style.width = geometry.width + geometry.x + 'px';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Bottom) {\r\n this.attachMediaPopUp.mediaContainer.style.height = geometry.height + geometry.y + 'px';\r\n }\r\n this.attachMediaPopUp.mediaContainer.append(div);\r\n }\r\n console.log('chatInput album layout:', layout);\r\n }\r\n else {\r\n let params = willAttach.sendFileDetails[0];\r\n let div = results[0];\r\n let { w, h } = utils_1.calcImageInBox(params.width, params.height, 380, 320);\r\n div.style.width = w + 'px';\r\n div.style.height = h + 'px';\r\n this.attachMediaPopUp.mediaContainer.append(div);\r\n }\r\n }\r\n else {\r\n this.attachMediaPopUp.mediaContainer.append(...results);\r\n }\r\n this.attachMediaPopUp.container.classList.add('active');\r\n });\r\n };\r\n let willAttach = {\r\n sendFileDetails: []\r\n };\r\n this.fileInput.addEventListener('change', (e) => {\r\n let files = e.target.files;\r\n if (!files.length) {\r\n return;\r\n }\r\n attachFiles(Array.from(files));\r\n }, false);\r\n this.attachMenu.media.addEventListener('click', () => {\r\n willAttach.type = 'media';\r\n this.fileInput.click();\r\n });\r\n this.attachMenu.document.addEventListener('click', () => {\r\n willAttach.type = '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.type = file.type.indexOf('image/') === 0 ? 'media' : \"document\";\r\n attachFiles([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 willAttach.isMedia = willAttach.type == 'media';\r\n console.log('will send files with options:', willAttach);\r\n let peerID = appImManager_1.default.peerID;\r\n if (willAttach.sendFileDetails.length > 1 && willAttach.isMedia) {\r\n appMessagesManager_1.default.sendAlbum(peerID, willAttach.sendFileDetails.map(d => d.file), Object.assign({\r\n caption,\r\n replyToMsgID: this.replyToMsgID\r\n }, willAttach));\r\n }\r\n else {\r\n if (caption) {\r\n if (willAttach.sendFileDetails.length > 1) {\r\n appMessagesManager_1.default.sendText(peerID, caption, { replyToMsgID: this.replyToMsgID });\r\n caption = '';\r\n this.replyToMsgID = 0;\r\n }\r\n }\r\n let promises = willAttach.sendFileDetails.map(params => {\r\n let promise = appMessagesManager_1.default.sendFile(peerID, params.file, Object.assign({\r\n isMedia: willAttach.isMedia,\r\n caption,\r\n replyToMsgID: this.replyToMsgID\r\n }, params));\r\n caption = '';\r\n this.replyToMsgID = 0;\r\n return promise;\r\n });\r\n }\r\n //Promise.all(promises);\r\n //appMessagesManager.sendFile(appImManager.peerID, willAttach.file, willAttach);\r\n this.onMessageSent();\r\n });\r\n this.btnSend.addEventListener('click', () => {\r\n if (this.btnSend.classList.contains('tgico-send')) {\r\n if (this.recording) {\r\n this.recorder.stop();\r\n }\r\n else {\r\n this.sendMessage();\r\n }\r\n }\r\n else {\r\n this.recorder.start().then(() => {\r\n this.recordCanceled = false;\r\n this.btnSend.classList.add('tgico-send');\r\n this.inputContainer.classList.add('is-recording');\r\n this.recording = true;\r\n opusDecodeController_1.default.setKeepAlive(true);\r\n this.recordStartTime = Date.now();\r\n const sourceNode = this.recorder.sourceNode;\r\n const context = sourceNode.context;\r\n const analyser = context.createAnalyser();\r\n sourceNode.connect(analyser);\r\n //analyser.connect(context.destination);\r\n analyser.fftSize = 32;\r\n const frequencyData = new Uint8Array(analyser.frequencyBinCount);\r\n const max = frequencyData.length * 255;\r\n const min = 54 / 150;\r\n let r = () => {\r\n if (!this.recording)\r\n return;\r\n analyser.getByteFrequencyData(frequencyData);\r\n let sum = 0;\r\n frequencyData.forEach(value => {\r\n sum += value;\r\n });\r\n let percents = Math.min(1, (sum / max) + min);\r\n console.log('frequencyData', frequencyData, percents);\r\n this.recordRippleEl.style.transform = `scale(${percents})`;\r\n let diff = Date.now() - this.recordStartTime;\r\n let ms = diff % 1000;\r\n let formatted = ('' + (diff / 1000)).toHHMMSS() + ',' + ('00' + Math.round(ms / 10)).slice(-2);\r\n this.recordTimeEl.innerText = formatted;\r\n window.requestAnimationFrame(r);\r\n };\r\n r();\r\n }).catch((e) => {\r\n console.error('Recorder start error:', e);\r\n });\r\n }\r\n });\r\n this.btnCancelRecord.addEventListener('click', () => {\r\n this.recordCanceled = true;\r\n this.recorder.stop();\r\n opusDecodeController_1.default.setKeepAlive(false);\r\n });\r\n this.recorder.onstop = () => {\r\n this.recording = false;\r\n this.inputContainer.classList.remove('is-recording');\r\n this.btnSend.classList.remove('tgico-send');\r\n this.recordRippleEl.style.transform = '';\r\n };\r\n this.recorder.ondataavailable = (typedArray) => {\r\n if (this.recordCanceled)\r\n return;\r\n const duration = (Date.now() - this.recordStartTime) / 1000 | 0;\r\n const dataBlob = new Blob([typedArray], { type: 'audio/ogg' });\r\n /* const fileName = new Date().toISOString() + \".opus\";\r\n console.log('Recorder data received', typedArray, dataBlob); */\r\n /* var url = URL.createObjectURL( dataBlob );\r\n \r\n var audio = document.createElement('audio');\r\n audio.controls = true;\r\n audio.src = url;\r\n \r\n var link = document.createElement('a');\r\n link.href = url;\r\n link.download = fileName;\r\n link.innerHTML = link.download;\r\n \r\n var li = document.createElement('li');\r\n li.appendChild(link);\r\n li.appendChild(audio);\r\n \r\n document.body.append(li);\r\n \r\n return; */\r\n let perf = performance.now();\r\n opusDecodeController_1.default.decode(typedArray, true).then(result => {\r\n console.log('WAVEFORM!:', /* waveform, */ performance.now() - perf);\r\n opusDecodeController_1.default.setKeepAlive(false);\r\n let peerID = appImManager_1.default.peerID;\r\n // тут objectURL ставится уже с audio/wav\r\n appMessagesManager_1.default.sendFile(peerID, dataBlob, {\r\n isVoiceMessage: true,\r\n isMedia: true,\r\n duration,\r\n waveform: result.waveform,\r\n objectURL: result.url\r\n });\r\n });\r\n /* const url = URL.createObjectURL(dataBlob);\r\n \r\n var audio = document.createElement('audio');\r\n audio.controls = true;\r\n audio.src = url;\r\n \r\n var link = document.createElement('a');\r\n link.href = url;\r\n link.download = fileName;\r\n link.innerHTML = link.download;\r\n \r\n var li = document.createElement('li');\r\n li.appendChild(link);\r\n li.appendChild(audio);\r\n \r\n recordingslist.appendChild(li); */\r\n };\r\n let emoticonsDisplayTimeout = 0;\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 this.emoticonsLazyLoadQueue.lock();\r\n clearTimeout(emoticonsDisplayTimeout);\r\n emoticonsDisplayTimeout = setTimeout(() => {\r\n this.emoticonsDropdown.style.display = 'none';\r\n }, 200);\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.style.display = '';\r\n void this.emoticonsDropdown.offsetLeft; // reflow\r\n this.emoticonsDropdown.classList.add('active');\r\n this.emoticonsLazyLoadQueue.unlock();\r\n clearTimeout(emoticonsDisplayTimeout);\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(clearInput = true) {\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();\r\n }\r\n ;\r\n setTopInfo(title, subtitle, input, message) {\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, message));\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": 67,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"name": "./src/components/emoticonsDropdown.ts",
"index": 68,
"index2": 61,
"size": 20905,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"issuerId": 66,
"issuerName": "./src/components/chatInput.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 66,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"name": "./src/components/chatInput.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 246,
"building": 1149,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "./emoticonsDropdown",
"loc": "35:41-71"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.EMOTICONSSTICKERGROUP = void 0;\r\nconst misc_1 = require(\"./misc\");\r\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\n//import Scrollable from \"./scrollable\";\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\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 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 let tabID = -1;\r\n misc_1.horizontalMenu(tabs, container, (id) => {\r\n lottieLoader_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n tabID = id;\r\n }, () => {\r\n if (tabID == 1 && stickersInit) {\r\n stickersInit();\r\n }\r\n else if (tabID == 2 && gifsInit) {\r\n gifsInit();\r\n }\r\n lottieLoader_1.default.checkAnimations(false, exports.EMOTICONSSTICKERGROUP);\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 setTimeout(() => {\r\n lottieLoader_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n }, 100);\r\n /* window.requestAnimationFrame(() => {\r\n window.requestAnimationFrame(() => {\r\n lottieLoader.checkAnimations(true, EMOTICONSSTICKERGROUP);\r\n });\r\n }); */\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 const categories = [\"Smileys & Emotion\", \"Animals & Nature\", \"Food & Drink\", \"Travel & Places\", \"Activities\", \"Objects\", /* \"Symbols\", */ \"Flags\", \"Skin Tones\"];\r\n let divs = {};\r\n let sorted = {};\r\n for (let emoji in config_1.default.Emoji) {\r\n let details = config_1.default.Emoji[emoji];\r\n let i = '' + details;\r\n let category = categories[+i[0] - 1];\r\n if (!category)\r\n continue; // maybe it's skin tones\r\n if (!sorted[category])\r\n sorted[category] = [];\r\n sorted[category][+i.slice(1) || 0] = emoji;\r\n }\r\n console.log('emoticons sorted:', sorted);\r\n //Object.keys(sorted).forEach(c => sorted[c].sort((a, b) => a - b));\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 titleDiv = document.createElement('div');\r\n titleDiv.classList.add('category-title');\r\n titleDiv.innerText = category;\r\n let itemsDiv = document.createElement('div');\r\n itemsDiv.classList.add('category-items');\r\n div.append(titleDiv, itemsDiv);\r\n let emojis = sorted[category];\r\n emojis.forEach(emoji => {\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(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 itemsDiv.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_new_1.default(contentEmojiDiv, 'y', '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(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_new_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 as HTMLElement;\r\n \r\n if(target.tagName == 'CANVAS') { // turn on sticker\r\n let animation = lottieLoader.getAnimation(target.parentElement, EMOTICONSSTICKERGROUP);\r\n \r\n if(animation) {\r\n // @ts-ignore\r\n if(animation.currentFrame == animation.totalFrames - 1) {\r\n animation.goToAndPlay(0, true);\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, categoryTitle, docs, prepend) => {\r\n //if((docs.length % 5) != 0) categoryDiv.classList.add('not-full');\r\n let itemsDiv = document.createElement('div');\r\n itemsDiv.classList.add('category-items');\r\n let titleDiv = document.createElement('div');\r\n titleDiv.classList.add('category-title');\r\n titleDiv.innerText = categoryTitle;\r\n categoryDiv.append(titleDiv, itemsDiv);\r\n docs.forEach(doc => {\r\n let div = document.createElement('div');\r\n wrappers_1.wrapSticker({\r\n doc,\r\n div,\r\n lazyLoadQueue,\r\n group: exports.EMOTICONSSTICKERGROUP,\r\n onlyThumb: true\r\n });\r\n itemsDiv.append(div);\r\n });\r\n if (prepend)\r\n stickersScroll.prepend(categoryDiv);\r\n else\r\n stickersScroll.append(categoryDiv);\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 let concated = Array.from(stickersScroll.splitUp.children);\r\n concated.forEach((el, i) => {\r\n heights[i] = (heights[i - 1] || 0) + el.scrollHeight + (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_new_1.default(contentStickersDiv, 'y', 'STICKERS', undefined, undefined, 2);\r\n stickersScroll.container.addEventListener('scroll', (e) => {\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 emoticonsMenuOnClick(menu, heights, stickersScroll, menuScroll);\r\n stickersInit = null;\r\n Promise.all([\r\n appStickersManager_1.default.getRecentStickers().then(stickers => {\r\n let categoryDiv = document.createElement('div');\r\n categoryDiv.classList.add('sticker-category');\r\n //stickersScroll.prepend(categoryDiv);\r\n categoryPush(categoryDiv, 'Recent', 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.loadAnimationWorker({\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 misc_1.renderImageFromUrl(image, URL.createObjectURL(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({\r\n doc: stickerSet.documents[0],\r\n div: li,\r\n group: exports.EMOTICONSSTICKERGROUP\r\n }); // kostil\r\n }\r\n categoryPush(categoryDiv, stickerSet.set.title, stickerSet.documents, false);\r\n }\r\n }))\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_new_1.default(contentDiv, 'y', 'GIFS', null);\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 = `<video autoplay=\"true\" muted=\"true\" loop=\"true\" src=\"${gif.url}\" type=\"video/mp4\"></video>`;\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": 68,
"identifier": "E:\\projects\\TWEB\\tweb\\public\\recorder.min.js",
"name": "./public/recorder.min.js",
"index": 69,
"index2": 62,
"size": 6813,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"issuerId": 66,
"issuerName": "./src/components/chatInput.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 66,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"name": "./src/components/chatInput.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 246,
"building": 1149,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../../public/recorder.min",
"loc": "38:39-75"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.Recorder=t():e.Recorder=t()}(\"undefined\"!=typeof self?self:this,(function(){return function(e){var t={};function o(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,\"a\",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p=\"\",o(o.s=0)}([function(e,t,o){\"use strict\";(function(t){var o=t.AudioContext||t.webkitAudioContext,i=function(e){if(!i.isRecordingSupported())throw new Error(\"Recording is not supported in this browser\");e||(e={}),this.state=\"inactive\",this.config=Object.assign({bufferLength:4096,encoderApplication:2049,encoderFrameSize:20,encoderPath:\"encoderWorker.min.js\",encoderSampleRate:48e3,maxFramesPerPage:40,mediaTrackConstraints:!0,monitorGain:0,numberOfChannels:1,recordingGain:1,resampleQuality:3,streamPages:!1,reuseWorker:!1,wavBitDepth:16},e),this.encodedSamplePosition=0};i.isRecordingSupported=function(){return o&&t.navigator&&t.navigator.mediaDevices&&t.navigator.mediaDevices.getUserMedia&&t.WebAssembly},i.prototype.clearStream=function(){this.stream&&(this.stream.getTracks?this.stream.getTracks().forEach((function(e){e.stop()})):this.stream.stop(),delete this.stream),this.audioContext&&this.closeAudioContext&&(this.audioContext.close(),delete this.audioContext)},i.prototype.encodeBuffers=function(e){if(\"recording\"===this.state){for(var t=[],o=0;o<e.numberOfChannels;o++)t[o]=e.getChannelData(o);this.encoder.postMessage({command:\"encode\",buffers:t})}},i.prototype.initAudioContext=function(e){return e&&e.context?(this.audioContext=e.context,this.closeAudioContext=!1):(this.audioContext=new o,this.closeAudioContext=!0),this.audioContext},i.prototype.initAudioGraph=function(){this.encodeBuffers=function(){delete this.encodeBuffers},this.scriptProcessorNode=this.audioContext.createScriptProcessor(this.config.bufferLength,this.config.numberOfChannels,this.config.numberOfChannels),this.scriptProcessorNode.connect(this.audioContext.destination),this.scriptProcessorNode.onaudioprocess=e=>{this.encodeBuffers(e.inputBuffer)},this.monitorGainNode=this.audioContext.createGain(),this.setMonitorGain(this.config.monitorGain),this.monitorGainNode.connect(this.audioContext.destination),this.recordingGainNode=this.audioContext.createGain(),this.setRecordingGain(this.config.recordingGain),this.recordingGainNode.connect(this.scriptProcessorNode)},i.prototype.initSourceNode=function(e){return e&&e.context?t.Promise.resolve(e):t.navigator.mediaDevices.getUserMedia({audio:this.config.mediaTrackConstraints}).then(e=>(this.stream=e,this.audioContext.createMediaStreamSource(e)))},i.prototype.loadWorker=function(){this.encoder||(this.encoder=new t.Worker(this.config.encoderPath))},i.prototype.initWorker=function(){var e=(this.config.streamPages?this.streamPage:this.storePage).bind(this);return this.recordedPages=[],this.totalLength=0,this.loadWorker(),new Promise((t,o)=>{var i=o=>{switch(o.data.message){case\"ready\":t();break;case\"page\":this.encodedSamplePosition=o.data.samplePosition,e(o.data.page);break;case\"done\":this.encoder.removeEventListener(\"message\",i),this.finish()}};this.encoder.addEventListener(\"message\",i),this.encoder.postMessage(Object.assign({command:\"init\",originalSampleRate:this.audioContext.sampleRate,wavSampleRate:this.audioContext.sampleRate},this.config))})},i.prototype.pause=function(e){if(\"recording\"===this.state){if(this.state=\"paused\",e&&this.config.streamPages){var t=this.encoder;return new Promise((e,o)=>{var i=o=>{\"flushed\"===o.data.message&&(t.removeEventListener(\"message\",i),this.onpause(),e())};t.addEventListener(\"message\",i),t.postMessage({command:\"flush\"})})}return this.onpause(),Promise.resolve()}},i.prototype.resume=function(){\"paused\"===this.state&&(this.state=\"recording\",this.onresume())},i.prototype.setRecordingGain=function(e){this.config.recordingGain=e,this.recordingGainNode&&this.audioContext&&this.recordingGainNode.gain.setTargetAtTime(e,this.audioContext.currentTime,.01)},i.prototype.setMonitorGain=function(e){this.config.monitorGain=e,this.monitorGainNode&&this.audioContext&&this.monitorGainNode.gain.setTargetAtTime(e,this.audioContext.currentTime,.01)},i.prototype.start=function(e){if(\"inactive\"===this.state)return this.initAudioContext(e),this.initAudioGraph(),this.encodedSamplePosition=0,Promise.all([this.initSourceNode(e),this.initWorker()]).then(e=>{this.sourceNode=e[0],this.state=\"recording\",this.onstart(),this.encoder.postMessage({command:\"getHeaderPages\"}),this.sourceNode.connect(this.monitorGainNode),this.sourceNode.connect(this.recordingGainNode)})},i.prototype.stop=function(){if(\"inactive\"!==this.state){this.state=\"inactive\",this.monitorGainNode.disconnect(),this.scriptProcessorNode.disconnect(),this.recordingGainNode.disconnect(),this.sourceNode.disconnect(),this.clearStream();var e=this.encoder;return new Promise(t=>{var o=i=>{\"done\"===i.data.message&&(e.removeEventListener(\"message\",o),t())};e.addEventListener(\"message\",o),e.postMessage({command:\"done\"}),this.config.reuseWorker||e.postMessage({command:\"close\"})})}return Promise.resolve()},i.prototype.destroyWorker=function(){\"inactive\"===this.state&&this.encoder&&(this.encoder.postMessage({command:\"close\"}),delete this.encoder)},i.prototype.storePage=function(e){this.recordedPages.push(e),this.totalLength+=e.length},i.prototype.streamPage=function(e){this.ondataavailable(e)},i.prototype.finish=function(){if(!this.config.streamPages){var e=new Uint8Array(this.totalLength);this.recordedPages.reduce((function(t,o){return e.set(o,t),t+o.length}),0),this.ondataavailable(e)}this.onstop(),this.config.reuseWorker||delete this.encoder},i.prototype.ondataavailable=function(){},i.prototype.onpause=function(){},i.prototype.onresume=function(){},i.prototype.onstart=function(){},i.prototype.onstop=function(){},e.exports=i}).call(this,o(1))},function(e,t){var o;o=function(){return this}();try{o=o||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(o=window)}e.exports=o}])}));"
},
{
"id": 69,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\bubbleGroups.ts",
"name": "./src/components/bubbleGroups.ts",
"index": 70,
"index2": 64,
"size": 6546,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/bubbleGroups",
"loc": "30:39-79"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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<HTMLDivElement[], number> = 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 else {\r\n this.updateGroup(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 // fix for saved messages forward to self\r\n if (fromID == utils_1.$rootScope.myID && utils_1.$rootScope.selectedPeerID == utils_1.$rootScope.myID && message.fwdFromID == fromID) {\r\n fromID = -fromID;\r\n }\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('[BUBBLE]: 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);\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) {\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 //console.log('[BUBBLE]: 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 //}));\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 this.groups = [];\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": 70,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"name": "./src/lib/appManagers/AppInlineBotsManager.ts",
"index": 71,
"index2": 65,
"size": 11113,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./AppInlineBotsManager",
"loc": "36:47-80"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppInlineBotsManager = void 0;\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst services_1 = require(\"../services\");\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst misc_1 = require(\"../../components/misc\");\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nclass AppInlineBotsManager {\r\n /* private inlineResults: any = {};\r\n \r\n function getPopularBots () {\r\n return Storage.get('inline_bots_popular').then(function (bots) {\r\n var result = []\r\n var i, len\r\n var userID\r\n if (bots && bots.length) {\r\n var now = tsNow(true)\r\n for (i = 0, len = bots.length; i < len; i++) {\r\n if ((now - bots[i][3]) > 14 * 86400) {\r\n continue\r\n }\r\n userID = bots[i][0]\r\n if (!AppUsersManager.hasUser(userID)) {\r\n AppUsersManager.saveApiUser(bots[i][1])\r\n }\r\n result.push({id: userID, rate: bots[i][2], date: bots[i][3]})\r\n }\r\n }\r\n return result\r\n })\r\n }\r\n \r\n function pushPopularBot (id) {\r\n getPopularBots().then(function (bots) {\r\n var exists = false\r\n var count = bots.length\r\n var result = []\r\n for (var i = 0; i < count; i++) {\r\n if (bots[i].id == id) {\r\n exists = true\r\n bots[i].rate++\r\n bots[i].date = tsNow(true)\r\n }\r\n var user = AppUsersManager.getUser(bots[i].id)\r\n result.push([bots[i].id, user, bots[i].rate, bots[i].date])\r\n }\r\n if (exists) {\r\n result.sort(function (a, b) {\r\n return b[2] - a[2]\r\n })\r\n } else {\r\n if (result.length > 15) {\r\n result = result.slice(0, 15)\r\n }\r\n result.push([id, AppUsersManager.getUser(id), 1, tsNow(true)])\r\n }\r\n ConfigStorage.set({inline_bots_popular: result})\r\n \r\n $rootScope.$broadcast('inline_bots_popular')\r\n })\r\n }\r\n \r\n function resolveInlineMention (username) {\r\n return AppPeersManager.resolveUsername(username).then(function (peerID) {\r\n if (peerID > 0) {\r\n var bot = AppUsersManager.getUser(peerID)\r\n if (bot.pFlags.bot && bot.bot_inline_placeholder !== undefined) {\r\n var resolvedBot = {\r\n username: username,\r\n id: peerID,\r\n placeholder: bot.bot_inline_placeholder\r\n }\r\n if (bot.pFlags.bot_inline_geo &&\r\n GeoLocationManager.isAvailable()) {\r\n return checkGeoLocationAccess(peerID).then(function () {\r\n return GeoLocationManager.getPosition().then(function (coords) {\r\n resolvedBot.geo = coords\r\n return qSync.when(resolvedBot)\r\n })\r\n })['catch'](function () {\r\n return qSync.when(resolvedBot)\r\n })\r\n }\r\n return qSync.when(resolvedBot)\r\n }\r\n }\r\n return $q.reject()\r\n }, function (error) {\r\n error.handled = true\r\n return $q.reject(error)\r\n })\r\n }\r\n \r\n function getInlineResults (peerID, botID, query, geo, offset) {\r\n return MtpApiManager.invokeApi('messages.getInlineBotResults', {\r\n flags: 0 | (geo ? 1 : 0),\r\n bot: AppUsersManager.getUserInput(botID),\r\n peer: AppPeersManager.getInputPeerByID(peerID),\r\n query: query,\r\n geo_point: geo && {_: 'inputGeoPoint', lat: geo['lat'], long: geo['long']},\r\n offset: offset\r\n }, {timeout: 1, stopTime: -1, noErrorBox: true}).then(function (botResults) {\r\n var queryID = botResults.query_id\r\n delete botResults._\r\n delete botResults.flags\r\n delete botResults.query_id\r\n \r\n if (botResults.switch_pm) {\r\n botResults.switch_pm.rText = RichTextProcessor.wrapRichText(botResults.switch_pm.text, {noLinebreaks: true, noLinks: true})\r\n }\r\n \r\n angular.forEach(botResults.results, function (result) {\r\n var qID = queryID + '_' + result.id\r\n result.qID = qID\r\n result.botID = botID\r\n \r\n result.rTitle = RichTextProcessor.wrapRichText(result.title, {noLinebreaks: true, noLinks: true})\r\n result.rDescription = RichTextProcessor.wrapRichText(result.description, {noLinebreaks: true, noLinks: true})\r\n result.initials = (result.url || result.title || result.type || '').substr(0, 1)\r\n \r\n if (result.document) {\r\n AppDocsManager.saveDoc(result.document)\r\n }\r\n if (result.photo) {\r\n AppPhotosManager.savePhoto(result.photo)\r\n }\r\n \r\n inlineResults[qID] = result\r\n })\r\n return botResults\r\n })\r\n }\r\n \r\n function regroupWrappedResults (results, rowW, rowH) {\r\n if (!results ||\r\n !results[0] ||\r\n ['photo', 'gif', 'sticker'].indexOf(results[0].type) == -1) {\r\n return\r\n }\r\n var ratios = []\r\n angular.forEach(results, function (result) {\r\n var w\r\n var h, doc\r\n var photo\r\n if (result._ == 'botInlineMediaResult') {\r\n if (doc = result.document) {\r\n w = result.document.w\r\n h = result.document.h\r\n }\r\n else if (photo = result.photo) {\r\n var photoSize = (photo.sizes || [])[0]\r\n w = photoSize && photoSize.w\r\n h = photoSize && photoSize.h\r\n }\r\n }else {\r\n w = result.w\r\n h = result.h\r\n }\r\n if (!w || !h) {\r\n w = h = 1\r\n }\r\n ratios.push(w / h)\r\n })\r\n \r\n var rows = []\r\n var curCnt = 0\r\n var curW = 0\r\n angular.forEach(ratios, function (ratio) {\r\n var w = ratio * rowH\r\n curW += w\r\n if (!curCnt || curCnt < 4 && curW < (rowW * 1.1)) {\r\n curCnt++\r\n } else {\r\n rows.push(curCnt)\r\n curCnt = 1\r\n curW = w\r\n }\r\n })\r\n if (curCnt) {\r\n rows.push(curCnt)\r\n }\r\n \r\n var i = 0\r\n var thumbs = []\r\n var lastRowI = rows.length - 1\r\n angular.forEach(rows, function (rowCnt, rowI) {\r\n var lastRow = rowI == lastRowI\r\n var curRatios = ratios.slice(i, i + rowCnt)\r\n var sumRatios = 0\r\n angular.forEach(curRatios, function (ratio) {\r\n sumRatios += ratio\r\n })\r\n angular.forEach(curRatios, function (ratio, j) {\r\n var thumbH = rowH\r\n var thumbW = rowW * ratio / sumRatios\r\n var realW = thumbH * ratio\r\n if (lastRow && thumbW > realW) {\r\n thumbW = realW\r\n }\r\n var result = results[i + j]\r\n result.thumbW = Math.floor(thumbW) - 2\r\n result.thumbH = Math.floor(thumbH) - 2\r\n })\r\n \r\n i += rowCnt\r\n })\r\n }\r\n \r\n function switchToPM (fromPeerID, botID, startParam) {\r\n var peerString = AppPeersManager.getPeerString(fromPeerID)\r\n var setHash = {}\r\n setHash['inline_switch_pm' + botID] = {peer: peerString, time: tsNow()}\r\n Storage.set(setHash)\r\n $rootScope.$broadcast('history_focus', {peerString: AppPeersManager.getPeerString(botID)})\r\n AppMessagesManager.startBot(botID, 0, startParam)\r\n }\r\n \r\n function checkSwitchReturn (botID) {\r\n var bot = AppUsersManager.getUser(botID)\r\n if (!bot || !bot.pFlags.bot || !bot.bot_inline_placeholder) {\r\n return qSync.when(false)\r\n }\r\n var key = 'inline_switch_pm' + botID\r\n return Storage.get(key).then(function (peerData) {\r\n if (peerData) {\r\n Storage.remove(key)\r\n if (tsNow() - peerData.time < 3600000) {\r\n return peerData.peer\r\n }\r\n }\r\n return false\r\n })\r\n }\r\n \r\n function switchInlineQuery (botID, toPeerString, query) {\r\n $rootScope.$broadcast('history_focus', {\r\n peerString: toPeerString,\r\n attachment: {\r\n _: 'inline_query',\r\n mention: '@' + AppUsersManager.getUser(botID).username,\r\n query: query\r\n }\r\n })\r\n }\r\n \r\n function switchInlineButtonClick (id, button) {\r\n var message = AppMessagesManager.getMessage(id)\r\n var botID = message.viaBotID || message.fromID\r\n if (button.pFlags && button.pFlags.same_peer) {\r\n var peerID = AppMessagesManager.getMessagePeer(message)\r\n var toPeerString = AppPeersManager.getPeerString(peerID)\r\n switchInlineQuery(botID, toPeerString, button.query)\r\n return\r\n }\r\n return checkSwitchReturn(botID).then(function (retPeerString) {\r\n if (retPeerString) {\r\n return switchInlineQuery(botID, retPeerString, button.query)\r\n }\r\n PeersSelectService.selectPeer({\r\n canSend: true\r\n }).then(function (toPeerString) {\r\n return switchInlineQuery(botID, toPeerString, button.query)\r\n })\r\n })\r\n } */\r\n callbackButtonClick(mid, button) {\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n let peerID = appMessagesManager_1.default.getMessagePeer(message);\r\n return mtprotoworker_1.default.invokeApi('messages.getBotCallbackAnswer', {\r\n flags: 1,\r\n peer: services_1.appPeersManager.getInputPeerByID(peerID),\r\n msg_id: appMessagesIDsManager_1.default.getMessageLocalID(mid),\r\n data: button.data\r\n }, { timeout: 1, stopTime: -1, noErrorBox: true }).then((callbackAnswer) => {\r\n if (typeof callbackAnswer.message === 'string' && callbackAnswer.message.length) {\r\n misc_1.toast(richtextprocessor_1.RichTextProcessor.wrapRichText(callbackAnswer.message, { noLinks: true, noLinebreaks: true }));\r\n }\r\n console.log('callbackButtonClick callbackAnswer:', callbackAnswer);\r\n });\r\n }\r\n}\r\nexports.AppInlineBotsManager = AppInlineBotsManager;\r\nconst appInlineBotsManager = new AppInlineBotsManager();\r\nexports.default = appInlineBotsManager;\r\n"
},
{
"id": 71,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\stickyIntersector.ts",
"name": "./src/components/stickyIntersector.ts",
"index": 72,
"index2": 66,
"size": 2877,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/stickyIntersector",
"loc": "37:44-89"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass StickyIntersector {\r\n constructor(container, handler) {\r\n this.container = container;\r\n this.handler = handler;\r\n this.observeHeaders();\r\n this.observeElements();\r\n }\r\n /**\r\n * Sets up an intersection observer to notify when elements with the class\r\n * `.sticky_sentinel--top` become visible/invisible at the top of the container.\r\n * @param {!Element} container\r\n */\r\n observeHeaders() {\r\n this.headersObserver = new IntersectionObserver((entries) => {\r\n for (const entry of entries) {\r\n const targetInfo = entry.boundingClientRect;\r\n const stickyTarget = entry.target.parentElement;\r\n const rootBoundsInfo = entry.rootBounds;\r\n // Started sticking.\r\n if (targetInfo.bottom < rootBoundsInfo.top) {\r\n this.handler(true, stickyTarget);\r\n }\r\n // Stopped sticking.\r\n if (targetInfo.bottom >= rootBoundsInfo.top &&\r\n targetInfo.bottom < rootBoundsInfo.bottom) {\r\n this.handler(false, stickyTarget);\r\n }\r\n }\r\n }, { threshold: 0, root: this.container });\r\n }\r\n observeElements() {\r\n this.elementsObserver = new IntersectionObserver((entries) => {\r\n let entry = entries.filter(entry => entry.boundingClientRect.top < 0).sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top)[0];\r\n if (!entry)\r\n return;\r\n let container = entry.isIntersecting ? entry.target : entry.target.nextElementSibling;\r\n this.handler(true, container);\r\n }, { root: this.container });\r\n }\r\n /**\r\n * @param {!Element} container\r\n * @param {string} className\r\n */\r\n addSentinel(container, className) {\r\n const sentinel = document.createElement('div');\r\n sentinel.classList.add('sticky_sentinel', className);\r\n return container.appendChild(sentinel);\r\n }\r\n /**\r\n * Notifies when elements w/ the `sticky` class begin to stick or stop sticking.\r\n * Note: the elements should be children of `container`.\r\n * @param {!Element} container\r\n */\r\n observeStickyHeaderChanges(element) {\r\n const headerSentinel = this.addSentinel(element, 'sticky_sentinel--top');\r\n this.headersObserver.observe(headerSentinel);\r\n this.elementsObserver.observe(element);\r\n }\r\n disconnect() {\r\n this.headersObserver.disconnect();\r\n this.elementsObserver.disconnect();\r\n }\r\n unobserve(element, headerSentinel) {\r\n this.elementsObserver.unobserve(element);\r\n this.headersObserver.unobserve(headerSentinel);\r\n }\r\n}\r\nexports.default = StickyIntersector;\r\n"
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"index": 74,
"index2": 73,
"size": 7047,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "./pageSignQR",
"loc": "12:37-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\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\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 pageIm_1 = __importDefault(require(\"./pageIm\"));\r\nconst pagePassword_1 = __importDefault(require(\"./pagePassword\"));\r\nconst pageSignIn_1 = __importDefault(require(\"./pageSignIn\"));\r\nconst mtproto_config_1 = require(\"../lib/mtproto/mtproto_config\");\r\nconst bin_utils_1 = require(\"../lib/bin_utils\");\r\nconst serverTimeManager_1 = __importDefault(require(\"../lib/mtproto/serverTimeManager\"));\r\n;\r\n;\r\n;\r\nlet onFirstMount = () => __awaiter(void 0, void 0, void 0, function* () {\r\n const pageElement = page.pageEl;\r\n const imageDiv = pageElement.querySelector('.auth-image');\r\n page.pageEl.querySelector('.a-qr').addEventListener('click', () => {\r\n pageSignIn_1.default.mount();\r\n stop = true;\r\n });\r\n const results = yield Promise.all([\r\n Promise.resolve().then(() => __importStar(require('qr-code-styling')))\r\n ]);\r\n const QRCodeStyling = results[0].default;\r\n let stop = false;\r\n document.addEventListener('user_auth', () => {\r\n stop = true;\r\n cachedPromise = null;\r\n }, { once: true });\r\n let options = { ignoreErrors: true };\r\n let prevToken;\r\n return () => __awaiter(void 0, void 0, void 0, function* () {\r\n stop = false;\r\n do {\r\n if (stop) {\r\n break;\r\n }\r\n try {\r\n let loginToken = yield mtprotoworker_1.default.invokeApi('auth.exportLoginToken', {\r\n api_id: mtproto_config_1.App.id,\r\n api_hash: mtproto_config_1.App.hash,\r\n except_ids: []\r\n }, { ignoreErrors: true });\r\n if (loginToken._ == 'auth.loginTokenMigrateTo') {\r\n if (!options.dcID) {\r\n options.dcID = loginToken.dc_id;\r\n mtprotoworker_1.default.setBaseDcID(loginToken.dc_id);\r\n //continue;\r\n }\r\n loginToken = (yield mtprotoworker_1.default.invokeApi('auth.importLoginToken', {\r\n token: loginToken.token\r\n }, options));\r\n }\r\n if (loginToken._ == 'auth.loginTokenSuccess') {\r\n let authorization = loginToken.authorization;\r\n mtprotoworker_1.default.setUserAuth({\r\n id: authorization.user.id\r\n });\r\n pageIm_1.default.mount();\r\n break;\r\n }\r\n /* // to base64\r\n var decoder = new TextDecoder('utf8');\r\n var b64encoded = btoa(String.fromCharCode.apply(null, [...loginToken.token])); */\r\n if (!prevToken || !bin_utils_1.bytesCmp(prevToken, loginToken.token)) {\r\n prevToken = loginToken.token;\r\n let encoded = bin_utils_1.bytesToBase64(loginToken.token);\r\n let url = \"tg://login?token=\" + encoded.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/\\=+$/, \"\");\r\n imageDiv.innerHTML = '';\r\n const qrCode = new QRCodeStyling({\r\n width: 166,\r\n height: 166,\r\n data: url,\r\n image: \"assets/img/logo_padded.svg\",\r\n dotsOptions: {\r\n color: \"#000000\",\r\n type: \"rounded\"\r\n },\r\n imageOptions: {\r\n imageSize: .75\r\n },\r\n backgroundOptions: {\r\n color: \"#ffffff\"\r\n },\r\n qrOptions: {\r\n errorCorrectionLevel: \"L\"\r\n }\r\n });\r\n qrCode.append(imageDiv);\r\n }\r\n let timestamp = Date.now() / 1000;\r\n let diff = loginToken.expires - timestamp - serverTimeManager_1.default.serverTimeOffset;\r\n yield new Promise((resolve, reject) => setTimeout(resolve, diff > 5 ? 5e3 : 1e3 * diff | 0));\r\n }\r\n catch (err) {\r\n switch (err.type) {\r\n case 'SESSION_PASSWORD_NEEDED':\r\n console.warn('pageSignQR: SESSION_PASSWORD_NEEDED');\r\n err.handled = true;\r\n pagePassword_1.default.mount();\r\n stop = true;\r\n cachedPromise = null;\r\n break;\r\n default:\r\n console.error('pageSignQR: default error:', err);\r\n break;\r\n }\r\n }\r\n } while (true);\r\n });\r\n});\r\nlet cachedPromise;\r\nconst page = new page_1.default('page-signQR', true, () => {\r\n return cachedPromise;\r\n}, () => {\r\n console.log('onMount');\r\n if (!cachedPromise)\r\n cachedPromise = onFirstMount();\r\n cachedPromise.then(func => {\r\n func();\r\n });\r\n});\r\nexports.default = page;\r\n"
},
{
"id": 73,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\qr-code-styling\\lib\\qr-code-styling.js",
"name": "./node_modules/qr-code-styling/lib/qr-code-styling.js",
"index": 75,
"index2": 72,
"size": 28504,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"issuerId": 72,
"issuerName": "./src/pages/pageSignQR.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2979,
"building": 103,
"dependencies": 2951
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "qr-code-styling",
"loc": "54:50-76"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "!function(t,r){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=r():\"function\"==typeof define&&define.amd?define([],r):\"object\"==typeof exports?exports.QRCodeStyling=r():t.QRCodeStyling=r()}(window,function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&r&&\"string\"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,\"a\",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p=\"\",e(e.s=1)}([function(t,r,e){var n,o,i,a=function(){var t=function(t,r){var e=t,n=f[r],o=null,i=0,a=null,u=[],c={},s=function(t,r){o=function(t){for(var r=new Array(t),e=0;e<t;e+=1){r[e]=new Array(t);for(var n=0;n<t;n+=1)r[e][n]=null}return r}(i=4*e+17),h(0,0),h(i-7,0),h(0,i-7),g(),l(),v(t,r),e>=7&&d(t),null==a&&(a=w(e,n,u)),p(a,r)},h=function(t,r){for(var e=-1;e<=7;e+=1)if(!(t+e<=-1||i<=t+e))for(var n=-1;n<=7;n+=1)r+n<=-1||i<=r+n||(o[t+e][r+n]=0<=e&&e<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==e||6==e)||2<=e&&e<=4&&2<=n&&n<=4)},l=function(){for(var t=8;t<i-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var r=8;r<i-8;r+=1)null==o[6][r]&&(o[6][r]=r%2==0)},g=function(){for(var t=y.getPatternPosition(e),r=0;r<t.length;r+=1)for(var n=0;n<t.length;n+=1){var i=t[r],a=t[n];if(null==o[i][a])for(var u=-2;u<=2;u+=1)for(var f=-2;f<=2;f+=1)o[i+u][a+f]=-2==u||2==u||-2==f||2==f||0==u&&0==f}},d=function(t){for(var r=y.getBCHTypeNumber(e),n=0;n<18;n+=1){var a=!t&&1==(r>>n&1);o[Math.floor(n/3)][n%3+i-8-3]=a}for(n=0;n<18;n+=1){a=!t&&1==(r>>n&1);o[n%3+i-8-3][Math.floor(n/3)]=a}},v=function(t,r){for(var e=n<<3|r,a=y.getBCHTypeInfo(e),u=0;u<15;u+=1){var f=!t&&1==(a>>u&1);u<6?o[u][8]=f:u<8?o[u+1][8]=f:o[i-15+u][8]=f}for(u=0;u<15;u+=1){f=!t&&1==(a>>u&1);u<8?o[8][i-u-1]=f:u<9?o[8][15-u-1+1]=f:o[8][15-u-1]=f}o[i-8][8]=!t},p=function(t,r){for(var e=-1,n=i-1,a=7,u=0,f=y.getMaskFunction(r),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var s=0;s<2;s+=1)if(null==o[n][c-s]){var h=!1;u<t.length&&(h=1==(t[u]>>>a&1)),f(n,c-s)&&(h=!h),o[n][c-s]=h,-1==(a-=1)&&(u+=1,a=7)}if((n+=e)<0||i<=n){n-=e,e=-e;break}}},w=function(t,r,e){for(var n=x.getRSBlocks(t,r),o=b(),i=0;i<e.length;i+=1){var a=e[i];o.put(a.getMode(),4),o.put(a.getLength(),y.getLengthInBits(a.getMode(),t)),a.write(o)}var u=0;for(i=0;i<n.length;i+=1)u+=n[i].dataCount;if(o.getLengthInBits()>8*u)throw\"code length overflow. (\"+o.getLengthInBits()+\">\"+8*u+\")\";for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*u||(o.put(236,8),o.getLengthInBits()>=8*u));)o.put(17,8);return function(t,r){for(var e=0,n=0,o=0,i=new Array(r.length),a=new Array(r.length),u=0;u<r.length;u+=1){var f=r[u].dataCount,c=r[u].totalCount-f;n=Math.max(n,f),o=Math.max(o,c),i[u]=new Array(f);for(var s=0;s<i[u].length;s+=1)i[u][s]=255&t.getBuffer()[s+e];e+=f;var h=y.getErrorCorrectPolynomial(c),l=m(i[u],h.getLength()-1).mod(h);a[u]=new Array(h.getLength()-1);for(s=0;s<a[u].length;s+=1){var g=s+l.getLength()-a[u].length;a[u][s]=g>=0?l.getAt(g):0}}var d=0;for(s=0;s<r.length;s+=1)d+=r[s].totalCount;var v=new Array(d),p=0;for(s=0;s<n;s+=1)for(u=0;u<r.length;u+=1)s<i[u].length&&(v[p]=i[u][s],p+=1);for(s=0;s<o;s+=1)for(u=0;u<r.length;u+=1)s<a[u].length&&(v[p]=a[u][s],p+=1);return v}(o,n)};c.addData=function(t,r){var e=null;switch(r=r||\"Byte\"){case\"Numeric\":e=M(t);break;case\"Alphanumeric\":e=C(t);break;case\"Byte\":e=k(t);break;case\"Kanji\":e=_(t);break;default:throw\"mode:\"+r}u.push(e),a=null},c.isDark=function(t,r){if(t<0||i<=t||r<0||i<=r)throw t+\",\"+r;return o[t][r]},c.getModuleCount=function(){return i},c.make=function(){if(e<1){for(var t=1;t<40;t++){for(var r=x.getRSBlocks(t,n),o=b(),i=0;i<u.length;i++){var a=u[i];o.put(a.getMode(),4),o.put(a.getLength(),y.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(i=0;i<r.length;i++)f+=r[i].dataCount;if(o.getLengthInBits()<=8*f)break}e=t}s(!1,function(){for(var t=0,r=0,e=0;e<8;e+=1){s(!0,e);var n=y.getLostPoint(c);(0==e||t>n)&&(t=n,r=e)}return r}())},c.createTableTag=function(t,r){t=t||2;var e=\"\";e+='<table style=\"',e+=\" border-width: 0px; border-style: none;\",e+=\" border-collapse: collapse;\",e+=\" padding: 0px; margin: \"+(r=void 0===r?4*t:r)+\"px;\",e+='\">',e+=\"<tbody>\";for(var n=0;n<c.getModuleCount();n+=1){e+=\"<tr>\";for(var o=0;o<c.getModuleCount();o+=1)e+='<td style=\"',e+=\" border-width: 0px; border-style: none;\",e+=\" border-collapse: collapse;\",e+=\" padding: 0px; margin: 0px;\",e+=\" width: \"+t+\"px;\",e+=\" height: \"+t+\"px;\",e+=\" background-color: \",e+=c.isDark(n,o)?\"#000000\":\"#ffffff\",e+=\";\",e+='\"/>';e+=\"</tr>\"}return e+=\"</tbody>\",e+=\"</table>\"},c.createSvgTag=function(t,r,e,n){var o={};\"object\"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,e=o.alt,n=o.title),t=t||2,r=void 0===r?4*t:r,(e=\"string\"==typeof e?{text:e}:e||{}).text=e.text||null,e.id=e.text?e.id||\"qrcode-description\":null,(n=\"string\"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||\"qrcode-title\":null;var i,a,u,f,s=c.getModuleCount()*t+2*r,h=\"\";for(f=\"l\"+t+\",0 0,\"+t+\" -\"+t+\",0 0,-\"+t+\"z \",h+='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"',h+=o.scalable?\"\":' width=\"'+s+'px\" height=\"'+s+'px\"',h+=' viewBox=\"0 0 '+s+\" \"+s+'\" ',h+=' preserveAspectRatio=\"xMinYMin meet\"',h+=n.text||e.text?' role=\"img\" aria-labelledby=\"'+A([n.id,e.id].join(\" \").trim())+'\"':\"\",h+=\">\",h+=n.text?'<title id=\"'+A(n.id)+'\">'+A(n.text)+\"</title>\":\"\",h+=e.text?'<description id=\"'+A(e.id)+'\">'+A(e.text)+\"</description>\":\"\",h+='<rect width=\"100%\" height=\"100%\" fill=\"white\" cx=\"0\" cy=\"0\"/>',h+='<path d=\"',a=0;a<c.getModuleCount();a+=1)for(u=a*t+r,i=0;i<c.getModuleCount();i+=1)c.isDark(a,i)&&(h+=\"M\"+(i*t+r)+\",\"+u+f);return h+='\" stroke=\"transparent\" fill=\"black\"/>',h+=\"</svg>\"},c.createDataURL=function(t,r){t=t||2,r=void 0===r?4*t:r;var e=c.getModuleCount()*t+2*r,n=r,o=e-r;return D(e,e,function(r,e){if(n<=r&&r<o&&n<=e&&e<o){var i=Math.floor((r-n)/t),a=Math.floor((e-n)/t);return c.isDark(a,i)?0:1}return 1})},c.createImgTag=function(t,r,e){t=t||2,r=void 0===r?4*t:r;var n=c.getModuleCount()*t+2*r,o=\"\";return o+=\"<img\",o+=' src=\"',o+=c.createDataURL(t,r),o+='\"',o+=' width=\"',o+=n,o+='\"',o+=' height=\"',o+=n,o+='\"',e&&(o+=' alt=\"',o+=A(e),o+='\"'),o+=\"/>\"};var A=function(t){for(var r=\"\",e=0;e<t.length;e+=1){var n=t.charAt(e);switch(n){case\"<\":r+=\"&lt;\";break;case\">\":r+=\"&gt;\";break;case\"&\":r+=\"&amp;\";break;case'\"':r+=\"&quot;\";break;default:r+=n}}return r};return c.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,e,n,o,i,a=1*c.getModuleCount()+2*t,u=t,f=a-t,s={\"██\":\"█\",\"█ \":\"▀\",\" █\":\"▄\",\" \":\" \"},h={\"██\":\"▀\",\"█ \":\"▀\",\" █\":\" \",\" \":\" \"},l=\"\";for(r=0;r<a;r+=2){for(n=Math.floor((r-u)/1),o=Math.floor((r+1-u)/1),e=0;e<a;e+=1)i=\"█\",u<=e&&e<f&&u<=r&&r<f&&c.isDark(n,Math.floor((e-u)/1))&&(i=\" \"),u<=e&&e<f&&u<=r+1&&r+1<f&&c.isDark(o,Math.floor((e-u)/1))?i+=\" \":i+=\"█\",l+=t<1&&r+1>=f?h[i]:s[i];l+=\"\\n\"}return a%2&&t>0?l.substring(0,l.length-a-1)+Array(a+1).join(\"▀\"):l.substring(0,l.length-1)}(r);t-=1,r=void 0===r?2*t:r;var e,n,o,i,a=c.getModuleCount()*t+2*r,u=r,f=a-r,s=Array(t+1).join(\"██\"),h=Array(t+1).join(\" \"),l=\"\",g=\"\";for(e=0;e<a;e+=1){for(o=Math.floor((e-u)/t),g=\"\",n=0;n<a;n+=1)i=1,u<=n&&n<f&&u<=e&&e<f&&c.isDark(o,Math.floor((n-u)/t))&&(i=0),g+=i?s:h;for(o=0;o<t;o+=1)l+=g+\"\\n\"}return l.substring(0,l.length-1)},c.renderTo2dContext=function(t,r){r=r||2;for(var e=c.getModuleCount(),n=0;n<e;n++)for(var o=0;o<e;o++)t.fillStyle=c.isDark(n,o)?\"black\":\"white\",t.fillRect(n*r,o*r,r,r)},c};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var r=[],e=0;e<t.length;e+=1){var n=t.charCodeAt(e);r.push(255&n)}return r}}).default,t.createStringToBytes=function(t,r){var e=function(){for(var e=B(t),n=function(){var t=e.read();if(-1==t)throw\"eof\";return t},o=0,i={};;){var a=e.read();if(-1==a)break;var u=n(),f=n()<<8|n();i[String.fromCharCode(a<<8|u)]=f,o+=1}if(o!=r)throw o+\" != \"+r;return i}(),n=\"?\".charCodeAt(0);return function(t){for(var r=[],o=0;o<t.length;o+=1){var i=t.charCodeAt(o);if(i<128)r.push(i);else{var a=e[t.charAt(o)];\"number\"==typeof a?(255&a)==a?r.push(a):(r.push(a>>>8),r.push(255&a)):r.push(n)}}return r}};var r,e,n,o=1,i=2,a=4,u=8,f={L:1,M:0,Q:3,H:2},c=0,s=1,h=2,l=3,g=4,d=5,v=6,p=7,y=(r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(e={}).getBCHTypeInfo=function(t){for(var r=t<<10;n(r)-n(1335)>=0;)r^=1335<<n(r)-n(1335);return 21522^(t<<10|r)},e.getBCHTypeNumber=function(t){for(var r=t<<12;n(r)-n(7973)>=0;)r^=7973<<n(r)-n(7973);return t<<12|r},e.getPatternPosition=function(t){return r[t-1]},e.getMaskFunction=function(t){switch(t){case c:return function(t,r){return(t+r)%2==0};case s:return function(t,r){return t%2==0};case h:return function(t,r){return r%3==0};case l:return function(t,r){return(t+r)%3==0};case g:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case d:return function(t,r){return t*r%2+t*r%3==0};case v:return function(t,r){return(t*r%2+t*r%3)%2==0};case p:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw\"bad maskPattern:\"+t}},e.getErrorCorrectPolynomial=function(t){for(var r=m([1],0),e=0;e<t;e+=1)r=r.multiply(m([1,w.gexp(e)],0));return r},e.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case o:return 10;case i:return 9;case a:case u:return 8;default:throw\"mode:\"+t}else if(r<27)switch(t){case o:return 12;case i:return 11;case a:return 16;case u:return 10;default:throw\"mode:\"+t}else{if(!(r<41))throw\"type:\"+r;switch(t){case o:return 14;case i:return 13;case a:return 16;case u:return 12;default:throw\"mode:\"+t}}},e.getLostPoint=function(t){for(var r=t.getModuleCount(),e=0,n=0;n<r;n+=1)for(var o=0;o<r;o+=1){for(var i=0,a=t.isDark(n,o),u=-1;u<=1;u+=1)if(!(n+u<0||r<=n+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(n+u,o+f)&&(i+=1);i>5&&(e+=3+i-5)}for(n=0;n<r-1;n+=1)for(o=0;o<r-1;o+=1){var c=0;t.isDark(n,o)&&(c+=1),t.isDark(n+1,o)&&(c+=1),t.isDark(n,o+1)&&(c+=1),t.isDark(n+1,o+1)&&(c+=1),0!=c&&4!=c||(e+=3)}for(n=0;n<r;n+=1)for(o=0;o<r-6;o+=1)t.isDark(n,o)&&!t.isDark(n,o+1)&&t.isDark(n,o+2)&&t.isDark(n,o+3)&&t.isDark(n,o+4)&&!t.isDark(n,o+5)&&t.isDark(n,o+6)&&(e+=40);for(o=0;o<r;o+=1)for(n=0;n<r-6;n+=1)t.isDark(n,o)&&!t.isDark(n+1,o)&&t.isDark(n+2,o)&&t.isDark(n+3,o)&&t.isDark(n+4,o)&&!t.isDark(n+5,o)&&t.isDark(n+6,o)&&(e+=40);var s=0;for(o=0;o<r;o+=1)for(n=0;n<r;n+=1)t.isDark(n,o)&&(s+=1);return e+=Math.abs(100*s/r/r-50)/5*10},e),w=function(){for(var t=new Array(256),r=new Array(256),e=0;e<8;e+=1)t[e]=1<<e;for(e=8;e<256;e+=1)t[e]=t[e-4]^t[e-5]^t[e-6]^t[e-8];for(e=0;e<255;e+=1)r[t[e]]=e;var n={glog:function(t){if(t<1)throw\"glog(\"+t+\")\";return r[t]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return t[r]}};return n}();function m(t,r){if(void 0===t.length)throw t.length+\"/\"+r;var e=function(){for(var e=0;e<t.length&&0==t[e];)e+=1;for(var n=new Array(t.length-e+r),o=0;o<t.length-e;o+=1)n[o]=t[o+e];return n}(),n={getAt:function(t){return e[t]},getLength:function(){return e.length},multiply:function(t){for(var r=new Array(n.getLength()+t.getLength()-1),e=0;e<n.getLength();e+=1)for(var o=0;o<t.getLength();o+=1)r[e+o]^=w.gexp(w.glog(n.getAt(e))+w.glog(t.getAt(o)));return m(r,0)},mod:function(t){if(n.getLength()-t.getLength()<0)return n;for(var r=w.glog(n.getAt(0))-w.glog(t.getAt(0)),e=new Array(n.getLength()),o=0;o<n.getLength();o+=1)e[o]=n.getAt(o);for(o=0;o<t.getLength();o+=1)e[o]^=w.gexp(w.glog(t.getAt(o))+r);return m(e,0).mod(t)}};return n}var x=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(t,r){var e={};return e.totalCount=t,e.dataCount=r,e},e={};return e.getRSBlocks=function(e,n){var o=function(r,e){switch(e){case f.L:return t[4*(r-1)+0];case f.M:return t[4*(r-1)+1];case f.Q:return t[4*(r-1)+2];case f.H:return t[4*(r-1)+3];default:return}}(e,n);if(void 0===o)throw\"bad rs block @ typeNumber:\"+e+\"/errorCorrectionLevel:\"+n;for(var i=o.length/3,a=[],u=0;u<i;u+=1)for(var c=o[3*u+0],s=o[3*u+1],h=o[3*u+2],l=0;l<c;l+=1)a.push(r(s,h));return a},e}(),b=function(){var t=[],r=0,e={getBuffer:function(){return t},getAt:function(r){var e=Math.floor(r/8);return 1==(t[e]>>>7-r%8&1)},put:function(t,r){for(var n=0;n<r;n+=1)e.putBit(1==(t>>>r-n-1&1))},getLengthInBits:function(){return r},putBit:function(e){var n=Math.floor(r/8);t.length<=n&&t.push(0),e&&(t[n]|=128>>>r%8),r+=1}};return e},M=function(t){var r=o,e=t,n={getMode:function(){return r},getLength:function(t){return e.length},write:function(t){for(var r=e,n=0;n+2<r.length;)t.put(i(r.substring(n,n+3)),10),n+=3;n<r.length&&(r.length-n==1?t.put(i(r.substring(n,n+1)),4):r.length-n==2&&t.put(i(r.substring(n,n+2)),7))}},i=function(t){for(var r=0,e=0;e<t.length;e+=1)r=10*r+a(t.charAt(e));return r},a=function(t){if(\"0\"<=t&&t<=\"9\")return t.charCodeAt(0)-\"0\".charCodeAt(0);throw\"illegal char :\"+t};return n},C=function(t){var r=i,e=t,n={getMode:function(){return r},getLength:function(t){return e.length},write:function(t){for(var r=e,n=0;n+1<r.length;)t.put(45*o(r.charAt(n))+o(r.charAt(n+1)),11),n+=2;n<r.length&&t.put(o(r.charAt(n)),6)}},o=function(t){if(\"0\"<=t&&t<=\"9\")return t.charCodeAt(0)-\"0\".charCodeAt(0);if(\"A\"<=t&&t<=\"Z\")return t.charCodeAt(0)-\"A\".charCodeAt(0)+10;switch(t){case\" \":return 36;case\"$\":return 37;case\"%\":return 38;case\"*\":return 39;case\"+\":return 40;case\"-\":return 41;case\".\":return 42;case\"/\":return 43;case\":\":return 44;default:throw\"illegal char :\"+t}};return n},k=function(r){var e=a,n=t.stringToBytes(r),o={getMode:function(){return e},getLength:function(t){return n.length},write:function(t){for(var r=0;r<n.length;r+=1)t.put(n[r],8)}};return o},_=function(r){var e=u,n=t.stringToBytesFuncs.SJIS;if(!n)throw\"sjis not supported.\";!function(t,r){var e=n(\"友\");if(2!=e.length||38726!=(e[0]<<8|e[1]))throw\"sjis not supported.\"}();var o=n(r),i={getMode:function(){return e},getLength:function(t){return~~(o.length/2)},write:function(t){for(var r=o,e=0;e+1<r.length;){var n=(255&r[e])<<8|255&r[e+1];if(33088<=n&&n<=40956)n-=33088;else{if(!(57408<=n&&n<=60351))throw\"illegal char at \"+(e+1)+\"/\"+n;n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13),e+=2}if(e<r.length)throw\"illegal char at \"+(e+1)}};return i},A=function(){var t=[],r={writeByte:function(r){t.push(255&r)},writeShort:function(t){r.writeByte(t),r.writeByte(t>>>8)},writeBytes:function(t,e,n){e=e||0,n=n||t.length;for(var o=0;o<n;o+=1)r.writeByte(t[o+e])},writeString:function(t){for(var e=0;e<t.length;e+=1)r.writeByte(t.charCodeAt(e))},toByteArray:function(){return t},toString:function(){var r=\"\";r+=\"[\";for(var e=0;e<t.length;e+=1)e>0&&(r+=\",\"),r+=t[e];return r+=\"]\"}};return r},B=function(t){var r=t,e=0,n=0,o=0,i={read:function(){for(;o<8;){if(e>=r.length){if(0==o)return-1;throw\"unexpected end of file./\"+o}var t=r.charAt(e);if(e+=1,\"=\"==t)return o=0,-1;t.match(/^\\s$/)||(n=n<<6|a(t.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw\"c:\"+t};return i},D=function(t,r,e){for(var n=function(t,r){var e=t,n=r,o=new Array(t*r),i={setPixel:function(t,r,n){o[r*e+t]=n},write:function(t){t.writeString(\"GIF87a\"),t.writeShort(e),t.writeShort(n),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(\",\"),t.writeShort(0),t.writeShort(0),t.writeShort(e),t.writeShort(n),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(\";\")}},a=function(t){for(var r=1<<t,e=1+(1<<t),n=t+1,i=u(),a=0;a<r;a+=1)i.add(String.fromCharCode(a));i.add(String.fromCharCode(r)),i.add(String.fromCharCode(e));var f=A(),c=function(t){var r=t,e=0,n=0,o={write:function(t,o){if(t>>>o!=0)throw\"length over\";for(;e+o>=8;)r.writeByte(255&(t<<e|n)),o-=8-e,t>>>=8-e,n=0,e=0;n|=t<<e,e+=o},flush:function(){e>0&&r.writeByte(n)}};return o}(f);c.write(r,n);var s=0,h=String.fromCharCode(o[s]);for(s+=1;s<o.length;){var l=String.fromCharCode(o[s]);s+=1,i.contains(h+l)?h+=l:(c.write(i.indexOf(h),n),i.size()<4095&&(i.size()==1<<n&&(n+=1),i.add(h+l)),h=l)}return c.write(i.indexOf(h),n),c.write(e,n),c.flush(),f.toByteArray()},u=function(){var t={},r=0,e={add:function(n){if(e.contains(n))throw\"dup key:\"+n;t[n]=r,r+=1},size:function(){return r},indexOf:function(r){return t[r]},contains:function(r){return void 0!==t[r]}};return e};return i}(t,r),o=0;o<r;o+=1)for(var i=0;i<t;i+=1)n.setPixel(i,o,e(i,o));var a=A();n.write(a);for(var u=function(){var t=0,r=0,e=0,n=\"\",o={},i=function(t){n+=String.fromCharCode(a(63&t))},a=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw\"n:\"+t};return o.writeByte=function(n){for(t=t<<8|255&n,r+=8,e+=1;r>=6;)i(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(i(t<<6-r),t=0,r=0),e%3!=0)for(var o=3-e%3,a=0;a<o;a+=1)n+=\"=\"},o.toString=function(){return n},o}(),f=a.toByteArray(),c=0;c<f.length;c+=1)u.writeByte(f[c]);return u.flush(),\"data:image/gif;base64,\"+u};return t}();a.stringToBytesFuncs[\"UTF-8\"]=function(t){return function(t){for(var r=[],e=0;e<t.length;e++){var n=t.charCodeAt(e);n<128?r.push(n):n<2048?r.push(192|n>>6,128|63&n):n<55296||n>=57344?r.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&t.charCodeAt(e)),r.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return r}(t)},o=[],void 0===(i=\"function\"==typeof(n=function(){return a})?n.apply(r,o):n)||(t.exports=i)},function(t,r,e){\"use strict\";e.r(r);var n={numeric:\"Numeric\",alphanumeric:\"Alphanumeric\",byte:\"Byte\",kanji:\"Kanji\"};var o=function(){return(o=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},i=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n},a=function(t){return!!t&&\"object\"==typeof t&&!Array.isArray(t)};function u(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];if(!r.length)return t;var n=r.shift();return void 0!==n&&a(t)&&a(n)?(t=o({},t),Object.keys(n).forEach(function(r){var e=t[r],o=n[r];Array.isArray(e)&&Array.isArray(o)?t[r]=e.concat(o):a(e)&&a(o)?t[r]=u(Object.assign({},e),o):t[r]=o}),u.apply(void 0,i([t],r))):t}for(var f={L:.07,M:.15,Q:.25,H:.3},c=function(){function t(t){var r=t.context,e=t.type;this._context=r,this._type=e}return t.prototype.draw=function(t,r,e,n){var o,i=this._context;switch(this._type){case\"dots\":o=this._drawDots;break;case\"rounded\":o=this._drawRounded;break;case\"square\":default:o=this._drawSquare}o({x:t,y:r,size:e,context:i,getNeighbor:n})},t.prototype._drawDots=function(t){var r=t.x,e=t.y,n=t.size,o=t.context;o.beginPath(),o.arc(r+n/2,e+n/2,n/2,0,2*Math.PI),o.fill()},t.prototype._drawSquare=function(t){var r=t.x,e=t.y,n=t.size;t.context.fillRect(r,e,n,n)},t.prototype._drawRounded=function(t){var r=t.x,e=t.y,n=t.size,o=t.context,i=t.getNeighbor;o.beginPath(),o.moveTo(r,e+n/2),i(-1,0)||i(0,-1)?(o.lineTo(r,e),o.lineTo(r+n/2,e)):o.arc(r+n/2,e+n/2,n/2,-Math.PI,-Math.PI/2),i(0,-1)||i(1,0)?(o.lineTo(r+n,e),o.lineTo(r+n,e+n/2)):o.arc(r+n/2,e+n/2,n/2,-Math.PI/2,0),i(1,0)||i(0,1)?(o.lineTo(r+n,e+n),o.lineTo(r+n/2,e+n)):o.arc(r+n/2,e+n/2,n/2,0,Math.PI/2),i(0,1)||i(-1,0)?(o.lineTo(r,e+n),o.lineTo(r,e+n/2)):o.arc(r+n/2,e+n/2,n/2,Math.PI/2,Math.PI),o.fill()},t}(),s=function(){function t(t){this._canvas=document.createElement(\"canvas\"),this._canvas.width=t.width,this._canvas.height=t.height,this._options=t}return Object.defineProperty(t.prototype,\"context\",{get:function(){return this._canvas.getContext(\"2d\")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"width\",{get:function(){return this._canvas.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"height\",{get:function(){return this._canvas.height},enumerable:!0,configurable:!0}),t.prototype.getCanvas=function(){return this._canvas},t.prototype.clear=function(){var t=this.context;t&&t.clearRect(0,0,this._canvas.width,this._canvas.height)},t.prototype.drawQR=function(t){return this.clear(),this.drawBackground(),this._qr=t,this._options.image?this.drawImageAndDots():(this.drawDots(),Promise.resolve())},t.prototype.drawBackground=function(){var t=this.context,r=this._options;t&&(t.fillStyle=r.backgroundOptions.color,t.fillRect(0,0,this._canvas.width,this._canvas.height))},t.prototype.drawDots=function(t){var r=this;if(!this._qr)throw\"QR code is not defined\";var e=this.context;if(!e)throw\"QR code is not defined\";var n=this._options,o=this._qr.getModuleCount();if(o>n.width||o>n.height)throw\"The canvas is too small.\";for(var i=Math.min(n.width,n.height),a=Math.floor(i/o),u=Math.floor((n.width-o*a)/2),f=Math.floor((n.height-o*a)/2),s=new c({context:e,type:n.dotsOptions.type}),h=function(i){for(var c=function(c){return t&&!t(i,c)?\"continue\":l._qr.isDark(i,c)?(e.fillStyle=n.dotsOptions.color,void s.draw(u+i*a,f+c*a,a,function(e,n){return!(i+e<0||c+n<0||i+e>=o||c+n>=o)&&(!(t&&!t(i+e,c+n))&&(!!r._qr&&r._qr.isDark(i+e,c+n)))})):\"continue\"},h=0;h<o;h++)c(h)},l=this,g=0;g<o;g++)h(g)},t.prototype.drawImageAndDots=function(){var t=this;return new Promise(function(r,e){if(!t._qr)return e(\"QR code is not defined\");var n=t.context;if(!n)return e(\"QR code is not defined\");var o=t._options,i=t._qr.getModuleCount(),a=Math.min(o.width,o.height),u=Math.floor(a/i),c=Math.floor((o.width-i*u)/2),s=Math.floor((o.height-i*u)/2),h=new Image,l=o.imageOptions.imageSize*f[o.qrOptions.errorCorrectionLevel];if(!o.image)return e(\"Image is not defined\");t._image=h,h.onload=function(){var e=Math.floor(l*i*i),a=function(t){var r=t.originalHeight,e=t.originalWidth,n=t.maxHiddenDots,o=t.maxHiddenAxisDots,i=t.dotSize,a={x:0,y:0},u={x:0,y:0};if(r<=0||e<=0||n<=0||i<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var f=r/e;return a.x=Math.floor(Math.sqrt(n/f)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,u.x=a.x*i,a.y=1+2*Math.ceil((a.x*f-1)/2),u.y=Math.round(u.x*f),(a.y*a.x>n||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,u.y=a.y*i,a.x=1+2*Math.ceil((a.y/f-1)/2),u.x=Math.round(u.y/f)),{height:u.y,width:u.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:h.width,originalHeight:h.height,maxHiddenDots:e,maxHiddenAxisDots:i-14,dotSize:u}),f=a.width,g=a.height,d=a.hideXDots,v=a.hideYDots;t.drawDots(function(t,r){return!o.imageOptions.hideBackgroundDots||(t<(i-d)/2||t>=(i+d)/2||r<(i-v)/2||r>=(i+v)/2)}),n.drawImage(h,c+(i*u-f)/2,s+(i*u-g)/2,f,g),r()},h.src=o.image})},t}(),h={},l=0;l<=40;l++)h[l]=l;var g=h,d={L:\"L\",M:\"M\",Q:\"Q\",H:\"H\"},v={width:300,height:300,data:void 0,image:void 0,qrOptions:{typeNumber:g[0],mode:void 0,errorCorrectionLevel:d.Q},imageOptions:{hideBackgroundDots:!0,imageSize:.4},dotsOptions:{type:\"square\",color:\"#000\"},backgroundOptions:{color:\"#fff\"}},p=e(0),y=e.n(p),w=function(){function t(t){this._options=t?u(v,t):v,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML=\"\")},t.prototype.update=function(r){t._clearContainer(this._container),this._options=r?u(this._options,r):this._options,this._options.data&&(this._qr=y()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return n.numeric;case/^[0-9A-Z $%*+\\-.\\/:]*$/.test(t):return n.alphanumeric;default:return n.byte}}(this._options.data)),this._qr.make(),this._canvas=new s(this._options),this._canvas.drawQR(this._qr),this.append(this._container))},t.prototype.append=function(t){if(t){if(\"function\"!=typeof t.appendChild)throw\"Container should be a single DOM node\";this._canvas&&t.appendChild(this._canvas.getCanvas()),this._container=t}},t.prototype.download=function(t){if(this._canvas){var r,e,n,o=this._canvas.getCanvas().toDataURL(t?\"image/\"+t:void 0);r=o,e=\"qr.\"+(t||\"png\"),(n=document.createElement(\"a\")).download=e,n.href=r,document.body.appendChild(n),n.click(),document.body.removeChild(n)}},t}(),m={dots:\"dots\",rounded:\"rounded\",square:\"square\"};e.d(r,\"dotTypes\",function(){return m}),e.d(r,\"errorCorrectionLevels\",function(){return d}),e.d(r,\"errorCorrectionPercents\",function(){return f}),e.d(r,\"modes\",function(){return n}),e.d(r,\"qrTypes\",function(){return g});r.default=w}]).default});\n//# sourceMappingURL=qr-code-styling.js.map"
},
{
"id": "",
"identifier": "css E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss 0",
"name": "css ./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"index": 2,
"index2": 0,
"size": 3696,
"built": false,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"issuerId": 53,
"issuerName": "./src/materialize.scss",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 53,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"name": "./src/materialize.scss",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 0,
"building": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 53,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"module": "./src/materialize.scss",
"moduleName": "./src/materialize.scss"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2
},
{
"id": "",
"identifier": "css E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss 0",
"name": "css ./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"index": 4,
"index2": 2,
"size": 91114,
"built": false,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"issuerId": 54,
"issuerName": "./src/scss/style.scss",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 54,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"name": "./src/scss/style.scss",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 0,
"building": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 54,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"module": "./src/scss/style.scss",
"moduleName": "./src/scss/style.scss"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2
},
{
"id": "",
"identifier": "css E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss 0",
"name": "css ./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"index": 6,
"index2": 4,
"size": 4945,
"built": false,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"issuerId": 55,
"issuerName": "./src/scss/tgico.scss",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 55,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"name": "./src/scss/tgico.scss",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 1,
"building": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 55,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"module": "./src/scss/tgico.scss",
"moduleName": "./src/scss/tgico.scss"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2
}
],
"filteredModules": 0,
"origins": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "index",
"request": "./src/index.ts",
"reasons": []
}
]
},
{
"id": 1,
"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": "a98d319a10b94be58b19",
"siblings": [
0
],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 38,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\jsbn\\index.js",
"name": "./node_modules/jsbn/index.js",
"index": 16,
"index2": 11,
"size": 42308,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
1
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"issuerId": 10,
"issuerName": "./src/lib/polyfill.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"name": "./src/components/scrollable_new.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
},
{
"id": 10,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"name": "./src/lib/polyfill.ts",
"profile": {
"factory": 1195,
"building": 1822,
"dependencies": 1
}
}
],
"profile": {
"factory": 3072,
"building": 27
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"module": "./src/lib/polyfill.ts",
"moduleName": "./src/lib/polyfill.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "6:15-30"
},
{
"moduleId": 11,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"module": "./src/lib/bin_utils.ts",
"moduleName": "./src/lib/bin_utils.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "11:15-30"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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<<dbits)-1);\n BigInteger.prototype.DV = (1<<dbits);\n\n var BI_FP = 52;\n BigInteger.prototype.FV = Math.pow(2,BI_FP);\n BigInteger.prototype.F1 = BI_FP-dbits;\n BigInteger.prototype.F2 = 2*dbits-BI_FP;\n\n // Digit conversions\n var BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n var BI_RC = new Array();\n var rr,vv;\n rr = \"0\".charCodeAt(0);\n for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;\n rr = \"a\".charCodeAt(0);\n for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n rr = \"A\".charCodeAt(0);\n for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n\n function int2char(n) { return BI_RM.charAt(n); }\n function intAt(s,i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c==null)?-1:c;\n }\n\n // (protected) copy this to r\n function bnpCopyTo(r) {\n for(var i = this.t-1; i >= 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))<<sh;\n this[this.t++] = (x>>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<<sh;\n sh += k;\n if(sh >= 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)<<sh;\n }\n this.clamp();\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) clamp off excess high words\n function bnpClamp() {\n var c = this.s&this.DM;\n while(this.t > 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<<k)-1, d, m = false, r = \"\", i = this.t;\n var p = this.DB-(i*this.DB)%k;\n if(i-- > 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)-1))<<(k-p);\n d |= this[--i]>>(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<<cbs)-1;\n var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;\n for(i = this.t-1; i >= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<<bs;\n }\n for(i = ds-1; i >= 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)-1;\n r[0] = this[ds]>>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<<cbs;\n r[i-ds] = this[i]>>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;\n r.t = this.t-ds;\n r.clamp();\n }\n\n // (protected) r = this - a\n function bnpSubTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]-a[i];\n r[i++] = c&this.DM;\n c >>= 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<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;\n var i = r.t, j = i-ys, t = (q==null)?nbi():q;\n y.dlShiftTo(j,t);\n if(r.compareTo(t) >= 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<<i)) > 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))<<this.DB)|this[0];\n }\n\n // (public) return value as byte\n function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>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<<t)-1); else x[0] = 0;\n this.fromString(x,256);\n }\n }\n\n // (public) convert to bigendian byte array\n function bnToByteArray() {\n var i = this.t, r = new Array();\n r[0] = this.s;\n var p = this.DB-(i*this.DB)%8, d, k = 0;\n if(i-- > 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)-1))<<(8-p);\n d |= this[--i]>>(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<<n)\n function bnpChangeBit(n,op) {\n var r = BigInteger.ONE.shiftLeft(n);\n this.bitwiseTo(r,op,r);\n return r;\n }\n\n // (public) this | (1<<n)\n function bnSetBit(n) { return this.changeBit(n,op_or); }\n\n // (public) this & ~(1<<n)\n function bnClearBit(n) { return this.changeBit(n,op_andnot); }\n\n // (public) this ^ (1<<n)\n function bnFlipBit(n) { return this.changeBit(n,op_xor); }\n\n // (protected) r = this + a\n function bnpAddTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]+a[i];\n r[i++] = c&this.DM;\n c >>= 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<<k)-1;\n g[1] = z.convert(this);\n if(k > 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<<i)) == 0) {\n z.sqrTo(r,r2); t = r; r = r2; r2 = t;\n if(--i < 0) { i = this.DB-1; --j; }\n }\n }\n return z.revert(r);\n }\n\n // (public) gcd(this,a) (HAC 14.54)\n function bnGCD(a) {\n var x = (this.s<0)?this.negate():this.clone();\n var y = (a.s<0)?a.negate():a.clone();\n if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }\n var i = x.getLowestSetBit(), g = y.getLowestSetBit();\n if(g < 0) return x;\n if(i < g) g = i;\n if(g > 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 // <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>\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": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "index",
"request": "./src/index.ts",
"reasons": []
}
]
},
{
"id": 2,
"rendered": true,
"initial": true,
"entry": false,
"reason": "split chunk (cache group: vendor) (name: npm.webp-hero)",
"size": 373419,
"names": [
"npm.webp-hero"
],
"files": [
"npm.webp-hero.chunk.js"
],
"hash": "c4262ad900c30b928772",
"siblings": [
3
],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"index": 77,
"index2": 80,
"size": 373419,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
2
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"issuerId": 74,
"issuerName": "./src/lib/webp.ts",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
}
],
"profile": {
"factory": 74,
"building": 621
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 74,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"module": "./src/lib/webp.ts",
"moduleName": "./src/lib/webp.ts",
"type": "cjs require",
"userRequest": "webp-hero/libwebp/dist/webp.js",
"loc": "4:18-59"
}
],
"usedExports": true,
"providedExports": [
"Webp"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module uses injected variables (setImmediate)"
],
"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<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);ret=convertReturnValue(ret);if(stack!==0)stackRestore(stack);return ret}function cwrap(ident,returnType,argTypes,opts){argTypes=argTypes||[];var numericArgs=argTypes.every(function(type){return type===\"number\"});var numericRet=returnType!==\"string\";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}function setValue(ptr,value,type,noSafe){type=type||\"i8\";if(type.charAt(type.length-1)===\"*\")type=\"i32\";switch(type){case\"i1\":HEAP8[ptr>>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<endPtr){var u0=u8Array[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|u8Array[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>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<str.length;++i){var u=str.charCodeAt(i);if(u>=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<str.length;++i){var u=str.charCodeAt(i);if(u>=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<str.length;++i){HEAP8[buffer++>>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<TOTAL_STACK)err(\"TOTAL_MEMORY should be larger than TOTAL_STACK, was \"+INITIAL_TOTAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\");if(Module[\"buffer\"]){buffer=Module[\"buffer\"]}else{{buffer=new ArrayBuffer(INITIAL_TOTAL_MEMORY)}}updateGlobalBufferViews();HEAP32[DYNAMICTOP_PTR>>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<arr.length;start++){if(arr[start]!==\"\")break}var end=arr.length-1;for(;end>=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;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push(\"..\")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join(\"/\")}};function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method=\"timeout\"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method=\"rAF\"}else if(mode==2){if(typeof setImmediate===\"undefined\"){var setImmediates=[];var emscriptenMainLoopMessageId=\"setimmediate\";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener(\"message\",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module[\"setImmediates\"]===undefined)Module[\"setImmediates\"]=[];Module[\"setImmediates\"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,\"*\")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method=\"immediate\"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){Module[\"noExitRuntime\"]=true;assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var browserIterationFunc;if(typeof arg!==\"undefined\"){browserIterationFunc=function(){Module[\"dynCall_vi\"](func,arg)}}else{browserIterationFunc=function(){Module[\"dynCall_v\"](func)}}var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){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(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;setTimeout(Browser.mainLoop.runner,0);return}if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&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(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;if(typeof SDL===\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0)_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<expected){Module[\"setStatus\"](message+\" (\"+(expected-remaining)+\"/\"+expected+\")\")}else{Module[\"setStatus\"](message)}}else{Module[\"setStatus\"](\"\")}}},runIter:function(func){if(ABORT)return;if(Module[\"preMainLoop\"]){var preRet=Module[\"preMainLoop\"]();if(preRet===false){return}}try{func()}catch(e){if(e instanceof ExitStatus){return}else{if(e&&typeof e===\"object\"&&e.stack)err(\"exception thrown: \"+[e,e.stack]);throw e}}if(Module[\"postMainLoop\"])Module[\"postMainLoop\"]()}},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(!Module[\"preloadPlugins\"])Module[\"preloadPlugins\"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;console.log(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder!=\"undefined\"?MozBlobBuilder:typeof WebKitBlobBuilder!=\"undefined\"?WebKitBlobBuilder:!Browser.hasBlobConstructor?console.log(\"warning: no BlobBuilder\"):null;Browser.URLObject=typeof window!=\"undefined\"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject===\"undefined\"){console.log(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\");Module.noImageDecoding=true}var imagePlugin={};imagePlugin[\"canHandle\"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin[\"handle\"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([new Uint8Array(byteArray).buffer],{type:Browser.getMimetype(name)})}}catch(e){warnOnce(\"Blob constructor present but fails: \"+e+\"; falling back to blob builder\")}}if(!b){var bb=new Browser.BlobBuilder;bb.append(new Uint8Array(byteArray).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);var img=new Image;img.onload=function img_onload(){assert(img.complete,\"Image \"+name+\" could not be decoded\");var canvas=document.createElement(\"canvas\");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext(\"2d\");ctx.drawImage(img,0,0);Module[\"preloadedImages\"][name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=function img_onerror(event){console.log(\"Image \"+url+\" could not be decoded\");if(onerror)onerror()};img.src=url};Module[\"preloadPlugins\"].push(imagePlugin);var audioPlugin={};audioPlugin[\"canHandle\"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}};audioPlugin[\"handle\"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;Module[\"preloadedAudios\"][name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;Module[\"preloadedAudios\"][name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);var audio=new Audio;audio.addEventListener(\"canplaythrough\",function(){finish(audio)},false);audio.onerror=function audio_onerror(event){if(done)return;console.log(\"warning: browser could not fully decode audio \"+name+\", trying slower base64 approach\");function encode64(data){var BASE=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";var PAD=\"=\";var ret=\"\";var leftchar=0;var leftbits=0;for(var i=0;i<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=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/h<Module[\"forcedAspectRatio\"]){w=Math.round(h*Module[\"forcedAspectRatio\"])}else{h=Math.round(w/Module[\"forcedAspectRatio\"])}}if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvas.parentNode&&typeof screen!=\"undefined\"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!=\"undefined\"){canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!=\"undefined\"){if(w!=wNative||h!=hNative){canvas.style.setProperty(\"width\",w+\"px\",\"important\");canvas.style.setProperty(\"height\",h+\"px\",\"important\")}else{canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}}},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var handle=Browser.nextWgetRequestHandle;Browser.nextWgetRequestHandle++;return handle}};function _SDL_GetTicks(){return Date.now()-SDL.startTime|0}function _SDL_LockSurface(surf){var surfData=SDL.surfaces[surf];surfData.locked++;if(surfData.locked>1)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<num/4;i++){data[i*4+3]=255}}if(SDL.defaults.copyOnLock&&!SDL.defaults.discardOnLock){if(surfData.isFlagSet(2097152)){throw\"CopyOnLock is not supported for SDL_LockSurface with SDL_HWPALETTE flag set\"+(new Error).stack}else{HEAPU8.set(surfData.image.data,surfData.buffer)}}return 0}var SDL={defaults:{width:320,height:200,copyOnLock:true,discardOnLock:false,opaqueFrontBuffer:true},version:null,surfaces:{},canvasPool:[],events:[],fonts:[null],audios:[null],rwops:[null],music:{audio:null,volume:1},mixerFrequency:22050,mixerFormat:32784,mixerNumChannels:2,mixerChunkSize:1024,channelMinimumNumber:0,GL:false,glAttributes:{0:3,1:3,2:2,3:0,4:0,5:1,6:16,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:1,16:0,17:0,18:0},keyboardState:null,keyboardMap:{},canRequestFullscreen:false,isRequestingFullscreen:false,textInput:false,startTime:null,initFlags:0,buttonState:0,modState:0,DOMButtons:[0,0,0],DOMEventToSDLEvent:{},TOUCH_DEFAULT_ID:0,eventHandler:null,eventHandlerContext:null,eventHandlerTemp:0,keyCodes:{16:1249,17:1248,18:1250,20:1081,33:1099,34:1102,35:1101,36:1098,37:1104,38:1106,39:1103,40:1105,44:316,45:1097,46:127,91:1251,93:1125,96:1122,97:1113,98:1114,99:1115,100:1116,101:1117,102:1118,103:1119,104:1120,105:1121,106:1109,107:1111,109:1110,110:1123,111:1108,112:1082,113:1083,114:1084,115:1085,116:1086,117:1087,118:1088,119:1089,120:1090,121:1091,122:1092,123:1093,124:1128,125:1129,126:1130,127:1131,128:1132,129:1133,130:1134,131:1135,132:1136,133:1137,134:1138,135:1139,144:1107,160:94,161:33,162:34,163:35,164:36,165:37,166:38,167:95,168:40,169:41,170:42,171:43,172:124,173:45,174:123,175:125,176:126,181:127,182:129,183:128,188:44,190:46,191:47,192:96,219:91,220:92,221:93,222:39,224:1251},scanCodes:{8:42,9:43,13:40,27:41,32:44,35:204,39:53,44:54,46:55,47:56,48:39,49:30,50:31,51:32,52:33,53:34,54:35,55:36,56:37,57:38,58:203,59:51,61:46,91:47,92:49,93:48,96:52,97:4,98:5,99:6,100:7,101:8,102:9,103:10,104:11,105:12,106:13,107:14,108:15,109:16,110:17,111:18,112:19,113:20,114:21,115:22,116:23,117:24,118:25,119:26,120:27,121:28,122:29,127:76,305:224,308:226,316:70},loadRect:function(rect){return{x:HEAP32[rect+0>>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<endY;++y){var base=y*fullWidth;for(var x=startX;x<endX;++x){data32[base+x]=colors32[HEAPU8[buffer+base+x>>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;i<event.touches.length;i++){var touch=event.touches[i];if(SDL.downFingers[touch.identifier]!=true){SDL.downFingers[touch.identifier]=true;touches.push(touch)}}}else{touches=event.touches}var firstTouch=touches[0];if(firstTouch){if(event.type==\"touchstart\"){SDL.DOMButtons[0]=1}var mouseEventType;switch(event.type){case\"touchstart\":mouseEventType=\"mousedown\";break;case\"touchmove\":mouseEventType=\"mousemove\";break}var mouseEvent={type:mouseEventType,button:0,pageX:firstTouch.clientX,pageY:firstTouch.clientY};SDL.events.push(mouseEvent)}for(var i=0;i<touches.length;i++){var touch=touches[i];SDL.events.push({type:event.type,touch:touch})}break}case\"touchend\":{event.preventDefault();for(var i=0;i<event.changedTouches.length;i++){var touch=event.changedTouches[i];if(SDL.downFingers[touch.identifier]===true){delete SDL.downFingers[touch.identifier]}}var mouseEvent={type:\"mouseup\",button:0,pageX:event.changedTouches[0].clientX,pageY:event.changedTouches[0].clientY};SDL.DOMButtons[0]=0;SDL.events.push(mouseEvent);for(var i=0;i<event.changedTouches.length;i++){var touch=event.changedTouches[i];SDL.events.push({type:\"touchend\",touch:touch})}break}case\"DOMMouseScroll\":case\"mousewheel\":case\"wheel\":var delta=-Browser.getMouseWheelDelta(event);delta=delta==0?0:delta>0?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<<event.button}else if(event.type==\"mouseup\"){SDL.buttonState&=~(1<<event.button)}case\"mousemove\":{Browser.calculateMouseEvent(event);break}}},flushEventsToHandler:function(){if(!SDL.eventHandler)return;while(SDL.pollEvent(SDL.eventHandlerTemp)){Module[\"dynCall_iii\"](SDL.eventHandler,SDL.eventHandlerContext,SDL.eventHandlerTemp)}},pollEvent:function(ptr){if(SDL.initFlags&512&&SDL.joystickEventState){SDL.queryJoysticks()}if(ptr){while(SDL.events.length>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<cStr.length;++i){HEAP8[ptr+(8+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<num;i++){SDL.channels[i]={audio:null,volume:1}}},setGetVolume:function(info,volume){if(!info)return 0;var ret=info.volume*128;if(volume!=-1){info.volume=Math.min(Math.max(volume,0),128)/128;if(info.audio){try{info.audio.volume=info.volume;if(info.audio.webAudioGainNode)info.audio.webAudioGainNode[\"gain\"][\"value\"]=info.volume}catch(e){err(\"setGetVolume failed to set audio volume: \"+e)}}}return ret},setPannerPosition:function(info,x,y,z){if(!info)return;if(info.audio){if(info.audio.webAudioPannerNode){info.audio.webAudioPannerNode[\"setPosition\"](x,y,z)}}},playWebAudio:function(audio){if(!audio)return;if(audio.webAudioNode)return;if(!SDL.webAudioAvailable())return;try{var webAudio=audio.resource.webAudio;audio.paused=false;if(!webAudio.decodedBuffer){if(webAudio.onDecodeComplete===undefined)abort(\"Cannot play back audio object that was not loaded\");webAudio.onDecodeComplete.push(function(){if(!audio.paused)SDL.playWebAudio(audio)});return}audio.webAudioNode=SDL.audioContext[\"createBufferSource\"]();audio.webAudioNode[\"buffer\"]=webAudio.decodedBuffer;audio.webAudioNode[\"loop\"]=audio.loop;audio.webAudioNode[\"onended\"]=function(){audio[\"onended\"]()};audio.webAudioPannerNode=SDL.audioContext[\"createPanner\"]();audio.webAudioPannerNode[\"setPosition\"](0,0,-.5);audio.webAudioPannerNode[\"panningModel\"]=\"equalpower\";audio.webAudioGainNode=SDL.audioContext[\"createGain\"]();audio.webAudioGainNode[\"gain\"][\"value\"]=audio.volume;audio.webAudioNode[\"connect\"](audio.webAudioPannerNode);audio.webAudioPannerNode[\"connect\"](audio.webAudioGainNode);audio.webAudioGainNode[\"connect\"](SDL.audioContext[\"destination\"]);audio.webAudioNode[\"start\"](0,audio.currentPosition);audio.startTime=SDL.audioContext[\"currentTime\"]-audio.currentPosition}catch(e){err(\"playWebAudio failed: \"+e)}},pauseWebAudio:function(audio){if(!audio)return;if(audio.webAudioNode){try{audio.currentPosition=(SDL.audioContext[\"currentTime\"]-audio.startTime)%audio.resource.webAudio.decodedBuffer.duration;audio.webAudioNode[\"onended\"]=undefined;audio.webAudioNode.stop(0);audio.webAudioNode=undefined}catch(e){err(\"pauseWebAudio failed: \"+e)}}audio.paused=true},openAudioContext:function(){if(!SDL.audioContext){if(typeof AudioContext!==\"undefined\")SDL.audioContext=new AudioContext;else if(typeof webkitAudioContext!==\"undefined\")SDL.audioContext=new webkitAudioContext}},webAudioAvailable:function(){return!!SDL.audioContext},fillWebAudioBufferFromHeap:function(heapPtr,sizeSamplesPerChannel,dstAudioBuffer){var numChannels=SDL.audio.channels;for(var c=0;c<numChannels;++c){var channelData=dstAudioBuffer[\"getChannelData\"](c);if(channelData.length!=sizeSamplesPerChannel){throw\"Web Audio output buffer length mismatch! Destination size: \"+channelData.length+\" samples vs expected \"+sizeSamplesPerChannel+\" samples!\"}if(SDL.audio.format==32784){for(var j=0;j<sizeSamplesPerChannel;++j){channelData[j]=HEAP16[heapPtr+(j*numChannels+c)*2>>1]/32768}}else if(SDL.audio.format==8){for(var j=0;j<sizeSamplesPerChannel;++j){var v=HEAP8[heapPtr+(j*numChannels+c)>>0];channelData[j]=(v>=0?v-128:v+128)/128}}else if(SDL.audio.format==33056){for(var j=0;j<sizeSamplesPerChannel;++j){channelData[j]=HEAPF32[heapPtr+(j*numChannels+c)*4>>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;i<num;i++){console.log(\" diagonal \"+i+\":\"+[data[i*surfData.width*4+i*4+0],data[i*surfData.width*4+i*4+1],data[i*surfData.width*4+i*4+2],data[i*surfData.width*4+i*4+3]])}},joystickEventState:1,lastJoystickState:{},joystickNamePool:{},recordJoystickState:function(joystick,state){var buttons=new Array(state.buttons.length);for(var i=0;i<state.buttons.length;i++){buttons[i]=SDL.getJoystickButtonState(state.buttons[i])}SDL.lastJoystickState[joystick]={buttons:buttons,axes:state.axes.slice(0),timestamp:state.timestamp,index:state.index,id:state.id}},getJoystickButtonState:function(button){if(typeof button===\"object\"){return button[\"pressed\"]}else{return button>0}},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;i<state.buttons.length;i++){var buttonState=SDL.getJoystickButtonState(state.buttons[i]);if(buttonState!==prevState.buttons[i]){SDL.events.push({type:buttonState?\"joystick_button_down\":\"joystick_button_up\",joystick:joystick,index:joystick-1,button:i})}}for(i=0;i<state.axes.length;i++){if(state.axes[i]!==prevState.axes[i]){SDL.events.push({type:\"joystick_axis_motion\",joystick:joystick,index:joystick-1,axis:i,value:state.axes[i]})}}SDL.recordJoystickState(joystick,state)}}},joystickAxisValueConversion:function(value){value=Math.min(1,Math.max(value,-1));return Math.ceil((value+1)*32767.5-32768)},getGamepads:function(){var fcn=navigator.getGamepads||navigator.webkitGamepads||navigator.mozGamepads||navigator.gamepads||navigator.webkitGetGamepads;if(fcn!==undefined){return fcn.apply(navigator)}else{return[]}},getGamepad:function(deviceIndex){var gamepads=SDL.getGamepads();if(gamepads.length>deviceIndex&&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<GL.MINI_TEMP_BUFFER_SIZE;i++){GL.miniTempBufferViews[i]=GL.miniTempBuffer.subarray(0,i+1)}},recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i<ret;i++){table[i]=null}return ret},MINI_TEMP_BUFFER_SIZE:256,miniTempBuffer:null,miniTempBufferViews:[0],getSource:function(shader,count,string,length){var source=\"\";for(var i=0;i<count;++i){var len=length?HEAP32[length+i*4>>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;i<numUniforms;++i){var u=GLctx.getActiveUniform(p,i);var name=u.name;ptable.maxUniformLength=Math.max(ptable.maxUniformLength,name.length+1);if(name.slice(-1)==\"]\"){name=name.slice(0,name.lastIndexOf(\"[\"))}var loc=GLctx.getUniformLocation(p,name);if(loc){var id=GL.getNewId(GL.uniforms);utable[name]=[u.size,id];GL.uniforms[id]=loc;for(var j=1;j<u.size;++j){var n=name+\"[\"+j+\"]\";loc=GLctx.getUniformLocation(p,n);id=GL.getNewId(GL.uniforms);GL.uniforms[id]=loc}}}}};function _SDL_SetVideoMode(width,height,depth,flags){[\"touchstart\",\"touchend\",\"touchmove\",\"mousedown\",\"mouseup\",\"mousemove\",\"DOMMouseScroll\",\"mousewheel\",\"wheel\",\"mouseout\"].forEach(function(event){Module[\"canvas\"].addEventListener(event,SDL.receiveEvent,true)});var canvas=Module[\"canvas\"];if(width==0&&height==0){width=canvas.width;height=canvas.height}if(!SDL.addedResizeListener){SDL.addedResizeListener=true;Browser.resizeListeners.push(function(w,h){if(!SDL.settingVideoMode){SDL.receiveEvent({type:\"resize\",w:w,h:h})}})}SDL.settingVideoMode=true;Browser.setCanvasSize(width,height);SDL.settingVideoMode=false;if(SDL.screen){SDL.freeSurface(SDL.screen);assert(!SDL.screen)}if(SDL.GL)flags=flags|67108864;SDL.screen=SDL.makeSurface(width,height,flags,true,\"screen\");return SDL.screen}function _SDL_UnlockSurface(surf){assert(!SDL.GL);var surfData=SDL.surfaces[surf];if(!surfData.locked||--surfData.locked>0){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<num){var val=HEAP32[src];data[dst]=val&255;data[dst+1]=val>>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<j){data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0}}else{while(i<j){data8[i]=255;i=i+4|0}}}else{data32.set(HEAP32.subarray(src,src+data32.length))}}}else{var width=Module[\"canvas\"].width;var height=Module[\"canvas\"].height;var s=surfData.buffer;var data=surfData.image.data;var colors=surfData.colors;for(var y=0;y<height;y++){var base=y*width*4;for(var x=0;x<width;x++){var val=HEAPU8[s++>>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<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j<len;j++){SYSCALLS.printChar(stream,HEAPU8[ptr+j])}ret+=len}return ret}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _emscripten_get_heap_size(){return HEAP8.length}function abortOnCannotGrowMemory(requestedSize){abort(\"OOM\")}function emscripten_realloc_buffer(size){try{var newBuffer=new ArrayBuffer(size);if(newBuffer.byteLength!=size)return false;new Int8Array(newBuffer).set(HEAP8)}catch(e){return false}Module[\"_emscripten_replace_memory\"](newBuffer);HEAP8=new Int8Array(newBuffer);HEAP16=new Int16Array(newBuffer);HEAP32=new Int32Array(newBuffer);HEAPU8=new Uint8Array(newBuffer);HEAPU16=new Uint16Array(newBuffer);HEAPU32=new Uint32Array(newBuffer);HEAPF32=new Float32Array(newBuffer);HEAPF64=new Float64Array(newBuffer);buffer=newBuffer;return newBuffer}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=16777216;var LIMIT=2147483648-PAGE_MULTIPLE;if(requestedSize>LIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize<requestedSize){if(newSize<=536870912){newSize=alignUp(2*newSize,PAGE_MULTIPLE)}else{newSize=Math.min(alignUp((3*newSize+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=emscripten_realloc_buffer(newSize);if(!replacement||replacement.byteLength!=newSize){return false}updateGlobalBufferViews();return true}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest)}function _pthread_cond_destroy(){return 0}function _pthread_cond_init(){return 0}function _pthread_cond_signal(){return 0}function _pthread_cond_wait(){return 0}function _pthread_create(){return 11}function _pthread_join(){}function ___setErrNo(value){if(Module[\"___errno_location\"])HEAP32[Module[\"___errno_location\"]()>>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;i<array.length;i++){var chr=array[i];if(chr>255){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<input.length);return output};function intArrayFromBase64(s){try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error(\"Converting base64 string to bytes failed.\")}}function tryParseAsDataURI(filename){if(!isDataURI(filename)){return}return intArrayFromBase64(filename.slice(dataURIPrefix.length))}var asmGlobalArg={\"Math\":Math,\"Int8Array\":Int8Array,\"Int16Array\":Int16Array,\"Int32Array\":Int32Array,\"Uint8Array\":Uint8Array,\"Uint16Array\":Uint16Array,\"Float32Array\":Float32Array,\"Float64Array\":Float64Array};var asmLibraryArg={\"a\":abort,\"b\":setTempRet0,\"c\":getTempRet0,\"d\":_SDL_CreateRGBSurface,\"e\":_SDL_Flip,\"f\":_SDL_FreeSurface,\"g\":_SDL_GetTicks,\"h\":_SDL_Init,\"i\":_SDL_LockSurface,\"j\":_SDL_SetVideoMode,\"k\":_SDL_UnlockSurface,\"l\":_SDL_UpperBlit,\"m\":___setErrNo,\"n\":___syscall140,\"o\":___syscall146,\"p\":___syscall6,\"q\":_emscripten_get_heap_size,\"r\":_emscripten_get_now,\"s\":_emscripten_memcpy_big,\"t\":_emscripten_resize_heap,\"u\":_emscripten_set_main_loop,\"v\":_emscripten_set_main_loop_timing,\"w\":_pthread_cond_destroy,\"x\":_pthread_cond_init,\"y\":_pthread_cond_signal,\"z\":_pthread_cond_wait,\"A\":_pthread_create,\"B\":_pthread_join,\"C\":abortOnCannotGrowMemory,\"D\":emscripten_realloc_buffer,\"E\":flush_NO_FILESYSTEM,\"F\":tempDoublePtr,\"G\":DYNAMICTOP_PTR};// EMSCRIPTEN_START_ASM\nvar asm=(/** @suppress {uselessCode} */ function(global,env,buffer) {\n\"almost asm\";var a=new global.Int8Array(buffer),b=new global.Int16Array(buffer),c=new global.Int32Array(buffer),d=new global.Uint8Array(buffer),e=new global.Uint16Array(buffer),f=new global.Float32Array(buffer),g=new global.Float64Array(buffer),h=env.F|0,i=env.G|0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=global.Math.imul,s=global.Math.clz32,t=env.a,u=env.b,v=env.c,w=env.d,x=env.e,y=env.f,z=env.g,A=env.h,B=env.i,C=env.j,D=env.k,E=env.l,F=env.m,G=env.n,H=env.o,I=env.p,J=env.q,K=env.r,L=env.s,M=env.t,N=env.u,O=env.v,P=env.w,Q=env.x,R=env.y,S=env.z,T=env.A,U=env.B,V=env.C,W=env.D,X=env.E,Y=11056,Z=5253936,_=0.0;function $(newBuffer){a=new Int8Array(newBuffer);d=new Uint8Array(newBuffer);b=new Int16Array(newBuffer);e=new Uint16Array(newBuffer);c=new Int32Array(newBuffer);f=new Float32Array(newBuffer);g=new Float64Array(newBuffer);buffer=newBuffer;return true}\n// EMSCRIPTEN_START_FUNCS\nfunction ja(a){a=a|0;var b=0;b=Y;Y=Y+a|0;Y=Y+15&-16;return b|0}function ka(){return Y|0}function la(a){a=a|0;Y=a}function ma(a,b){a=a|0;b=b|0;Y=a;Z=b}function na(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;d=Y;Y=Y+224|0;e=d+16|0;f=d+8|0;g=d;h=d+24|0;i=h+40|0;if(!(Ne(h,520)|0)){zf(8544,26,1,c[2043]|0)|0;j=0;Y=d;return j|0}if(!(c[2484]|0)){A(32)|0;c[2484]=1}do if(!(me(a,b,h,520)|0)){k=h+4|0;l=C(c[h>>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<c>>>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<c>>>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)<<S)|0;S=o;ba=R;ca=c[y>>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)<<ia)|0;if((ma+1|0)>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<W>>>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<W>>>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)<<aa)|0;aa=p;Ya=ca;Za=c[aa>>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)<<ma)|0;if((eb+1|0)>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<ha>>>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<ma>>>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<ma>>>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<W>>>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<t>>>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<s>>>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<<c[b+8>>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;q=p+-1|0;o=p+v|0;v=n?o>>>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;p=q+-1|0;u=k&0-q;t=k-u|0;s=p+k|0;n=v?s>>>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<x>>>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)|0;p=r(o?n>>>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<<p)+-1|0;p=(1<<l)+-1|0;if(!((e|0)>(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<<o)+-1|0;o=(1<<b)+-1|0;if(!((e|0)>(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<<i)+-1|0;i=(1<<j)+-1|0;if(!((e|0)<(f|0)&(k|0)>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<<x;if(y&z|0){u=73;break a}c[q>>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<<x)+-1|0;C=B+(c[z>>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)|0;z=G?x>>>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)+-1|0;H=E+t|0;G=F?H>>>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<<I;if(E){z=(H|0)>-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<<I;if(!(db(i+124|0,I)|0)){c[i>>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<<f)+-1|0;D=H+t|0;c[i+156>>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<<b;e=va(d,((d|0)<0)<<31>>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<<f;n=k;o=n+64|0;do{c[n>>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<<l+-1;G=u;H=p;I=A;do{J=d+(G<<2)|0;K=(e[i+(H<<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<<l;l=1<<p;if((p|0)>=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<<pa-f;a[d+(L<<2)>>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<z>>>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<R>>>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<f>>>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<H>>>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<<I)|0;c[b>>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<<F)+-1|0;c[q>>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<<O);P=J-D|0}else P=D+1|0;D=(s(P|0)|0)^24;c[t>>2]=O-D;c[q>>2]=(P<<D)+-1;Q=E?3:2}else{E=d[y>>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<<S);T=J-H|0}else T=H+1|0;H=(s(T|0)|0)^24;c[t>>2]=S-H;c[q>>2]=(T<<H)+-1;Q=G&1}C=Q&255}a[B+(z*800|0)+798>>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<<W);X=H-J|0}else X=J+1|0;J=(s(X|0)|0)^24;D=W-J|0;c[t>>2]=D;F=(X<<J)+-1|0;c[q>>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<<Y)|0;c[b>>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<<H)+-1|0;c[q>>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<<aa)|0;c[b>>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<<F)+-1|0;c[q>>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<<ea);fa=E-D|0}else fa=D+1|0;D=(s(fa|0)|0)^24;c[t>>2]=ea-D;c[q>>2]=(fa<<D)+-1;ga=G?1:3}else{do if(F){G=c[v>>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<<ia);ja=E-F|0}else ja=F+1|0;F=(s(ja|0)|0)^24;c[t>>2]=ia-F;c[q>>2]=(ja<<F)+-1;ga=H?2:0}H=ga&255;a[B+(z*800|0)+769>>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<<qa)|0;c[b>>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<<na)+-1|0;c[q>>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<<Aa)|0;c[b>>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<<ya)+-1|0;c[q>>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<<Ga)|0;c[b>>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<<F)+-1|0;c[q>>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<<Ka)|0;c[b>>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<<H)+-1|0;c[q>>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<<Oa);Pa=F-D|0}else Pa=D+1|0;D=(s(Pa|0)|0)^24;c[t>>2]=Oa-D;c[q>>2]=(Pa<<D)+-1;Qa=E?1:3}else Qa=2}else Qa=0;a[B+(z*800|0)+785>>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<<t);u=n-r|0}else u=r+1|0;r=(s(u|0)|0)^24;b=t-r|0;c[g>>2]=b;n=(u<<r)+-1|0;c[f>>2]=n;r=(q&1)<<m|l;if((o|0)<=1){e=r;break}else l=r}return e|0}function Ge(a,b){a=a|0;b=b|0;var c=0;c=Fe(a,b)|0;b=(Fe(a,1)|0)==0;return (b?c:0-c|0)|0}function He(b){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,r=0,s=0;f=b+12|0;g=Fe(f,7)|0;if(!(Fe(f,1)|0))h=0;else h=Ge(f,4)|0;if(!(Fe(f,1)|0))i=0;else i=Ge(f,4)|0;if(!(Fe(f,1)|0))j=0;else j=Ge(f,4)|0;if(!(Fe(f,1)|0))k=0;else k=Ge(f,4)|0;if(!(Fe(f,1)|0))l=0;else l=Ge(f,4)|0;f=b+112|0;m=b+776|0;n=(c[b+104>>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<<t);u=n-p|0}else u=p+1|0;p=(s(u|0)|0)^24;c[g>>2]=t-p;c[f>>2]=(u<<p)+-1;if(q)v=Fe(b,8)|0;else v=d[6144+(j*264|0)+(k*33|0)+l>>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<<y);z=p-n|0}else z=n+1|0;n=(s(z|0)|0)^24;c[g>>2]=y-n;c[f>>2]=(z<<n)+-1;if(m)A=Fe(b,8)|0;else A=d[6144+(j*264|0)+(k*33|0)+11+l>>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<<B);C=n-p|0}else C=p+1|0;p=(s(C|0)|0)^24;c[g>>2]=B-p;c[f>>2]=(C<<p)+-1;if(q)D=Fe(b,8)|0;else D=d[6144+(j*264|0)+(k*33|0)+22+l>>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<<v)|0;c[a>>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<<t)+-1|0;c[k>>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<<G)|0;c[a>>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<<E)+-1|0;c[k>>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<<O);P=L-q|0}else P=q+1|0;q=(s(P|0)|0)^24;D=O-q|0;c[l>>2]=D;c[k>>2]=(P<<q)+-1;if(B){B=Ke(a,w)|0;Q=B;R=C+22|0;S=c[l>>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)<<T);w=(r((B^Q)-B|0,c[g+(((t|0)>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<<n)|0;c[b>>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<<j)+-1|0;c[g>>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<<t)|0;c[b>>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<<q)+-1|0;c[g>>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<<y);z=t-o|0}else z=o+1|0;o=(s(z|0)|0)^24;c[i>>2]=y-o;c[g>>2]=(z<<o)+-1;w=l?4:3;return w|0}l=d[e+6>>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<<B)|0;c[b>>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<<A)+-1|0;c[g>>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<<F)|0;c[b>>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<<E)+-1|0;c[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<<J)|0;c[b>>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<<I)+-1|0;c[g>>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<<O)|0;c[b>>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<<C)+-1|0;c[g>>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<<I|3)|0;return w|0}I=d[e+7>>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<<S)|0;c[b>>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<<R)+-1|0;c[g>>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<<W);X=S-D|0}else X=D+1|0;D=(s(X|0)|0)^24;c[i>>2]=W-D;c[g>>2]=(X<<D)+-1;w=T?6:5;return w|0}do if(R){T=b+12|0;D=c[T>>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<<Z)|0;c[b>>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=(_<<Y)+-1|0;c[g>>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<<ba);ca=Z-$|0}else ca=$+1|0;$=(s(ca|0)|0)^24;c[i>>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<<i);else{c[n+12>>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<<f;n=h<<f&(i|0-i);i=(n&0-n)+-1|0;n=(12?i>>>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<<j);c[2550]=i;p=i}else{c[n+12>>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<<h;if(!(p&i)){c[2550]=p|i;q=k;r=k+8|0}else{i=k+8|0;q=c[i>>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<n>>>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<<k);break}}else{k=s+16|0;c[((c[k>>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<<s;if(!(u&g)){c[2550]=u|g;D=k;E=k+8|0}else{u=k+8|0;D=c[u>>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<<z;v=k+520192|0;A=(16?v>>>16:v)&4;v=k<<A;k=v+245760|0;H=(16?k>>>16:k)&2;k=v<<H;v=14-(A|z|H)+(15?k>>>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<H>>>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<<G;s=(v|0-v)&u;if(!s){F=f;break}v=(s&0-s)+-1|0;s=(12?v>>>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<h>>>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<<n);c[2551]=s;da=s;break}}else{s=h+16|0;c[((c[s>>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<<h;if(!(s&n)){c[2550]=s|n;ea=u;fa=u+8|0}else{n=u+8|0;ea=c[n>>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<<s;u=n+520192|0;h=(16?u>>>16:u)&4;u=n<<h;n=u+245760|0;g=(16?n>>>16:n)&2;n=u<<g;u=14-(h|s|g)+(15?n>>>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<<ga;if(!(da&n)){c[2551]=da|n;c[u>>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<ja>>>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<<ha);break}else{c[ga+12>>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<<ha;if(!(ea&g)){c[2550]=ea|g;za=X;Aa=X+8|0}else{g=X+8|0;za=c[g>>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<<ea;ha=g+520192|0;_=(16?ha>>>16:ha)&4;ha=g<<_;g=ha+245760|0;fa=(16?g>>>16:g)&2;g=ha<<fa;ha=14-(_|ea|fa)+(15?g>>>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<<Ba;if(!(ia&ha)){c[2551]=ia|ha;c[X>>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<oa>>>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<Ea>>>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<<X;if(!(W&ha)){c[2550]=W|ha;Fa=na;Ga=na+8|0}else{ha=na+8|0;Fa=c[ha>>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<<W;na=ha+520192|0;X=(16?na>>>16:na)&4;na=ha<<X;ha=na+245760|0;ga=(16?ha>>>16:ha)&2;ha=na<<ga;na=14-(X|W|ga)+(15?ha>>>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<<Ha;if(!(ha&ga)){c[2551]=ha|ga;c[na>>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<ga>>>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<d>>>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<<k);l=h;m=i;n=h;break}else{c[g+12>>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<<j);l=h;m=i;n=h;break}}else{j=g+16|0;c[((c[j>>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<<x);break}else{c[w+12>>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<<t);break}}else{t=w+16|0;c[((c[t>>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<<m;if(!(a&b)){c[2550]=a|b;E=n;F=n+8|0}else{b=n+8|0;E=c[b>>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<<F;n=E+520192|0;b=(16?n>>>16:n)&4;n=E<<b;E=n+245760|0;a=(16?E>>>16:E)&2;E=n<<a;n=14-(b|F|a)+(15?E>>>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<<G;a:do if(!(E&a)){c[2551]=E|a;c[n>>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<<y&75913|0)==0){J=0;K=w;L=x}else{w=0;C=y;y=x;while(1){x=1<<C|w;E=y+1|0;c[k>>2]=E;F=a[E>>0]|0;C=(F<<24>>24)+-32|0;if(C>>>0>31|(1<<C&75913|0)==0){J=x;K=F;L=E;break}else{w=x;y=E}}}if(K<<24>>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<L>>>0){V=(1<<U)+-1|0;S=U?1e9>>>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<L>>>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<fa>>>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<D>>>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<L>>>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<L>>>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<q>>>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<ta>>>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<ta>>>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<I>>>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<I>>>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<d>>>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<f>>>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<a>>>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<<r;y=i>>>(q>>>0)&t;z=0;A=g<<r;break}if(!f){n=0;o=0;return (u(n|0),o)|0}c[f>>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<<p|g>>>(t>>>0))&D;y=D&i>>>(t>>>0);z=g<<q&B;A=(i<<q|g>>>(C>>>0))&B|g<<p&t-33>>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<<p|g>>>(t>>>0);y=i>>>(t>>>0);z=0;A=g<<p;break}if(!f){n=0;o=0;return (u(n|0),o)|0}c[f>>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)-1)<<32-c}u(0);return b>>>c-32|0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){u(b<<c|(a&(1<<c)-1<<32-c)>>>32-c|0);return a<<c}u(a<<c-32|0);return 0}function Kf(a){a=a|0;return (a&255)<<24|(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"
}
],
"filteredModules": 0,
"origins": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "webp",
"request": "./src/lib/webp.ts",
"reasons": []
}
]
},
{
"id": 3,
"rendered": true,
"initial": true,
"entry": true,
"size": 16372,
"names": [
"webp"
],
"files": [
"webp.bundle.js"
],
"hash": "666d91a24a72afef1eb1",
"siblings": [
2
],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 51,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webpack\\buildin\\global.js",
"name": "(webpack)/buildin/global.js",
"index": 79,
"index2": 76,
"size": 472,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"issuerId": 76,
"issuerName": "./node_modules/timers-browserify/main.js",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"profile": {
"factory": 74,
"building": 621
}
},
{
"id": 76,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"name": "./node_modules/timers-browserify/main.js",
"profile": {
"factory": 1419,
"building": 72
}
}
],
"profile": {
"factory": 1949,
"building": 1141,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 76,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"module": "./node_modules/timers-browserify/main.js",
"moduleName": "./node_modules/timers-browserify/main.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-41"
},
{
"moduleId": 77,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"module": "./node_modules/setimmediate/setImmediate.js",
"moduleName": "./node_modules/setimmediate/setImmediate.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-41"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n"
},
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"index": 76,
"index2": 81,
"size": 1985,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 122,
"building": 1761
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "./src/lib/webp.ts",
"loc": "webp"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.WebpMachine = exports.WebpMachineError = void 0;\r\nconst webp_js_1 = require(\"webp-hero/libwebp/dist/webp.js\");\r\nconst relax = () => new Promise(resolve => requestAnimationFrame(resolve));\r\nclass WebpMachineError extends Error {\r\n}\r\nexports.WebpMachineError = WebpMachineError;\r\n/**\r\n * Webp Machine\r\n * - decode and polyfill webp images\r\n * - can only decode images one-at-a-time (otherwise will throw busy error)\r\n */\r\nclass WebpMachine {\r\n constructor() {\r\n this.busy = false;\r\n this.webp = new webp_js_1.Webp();\r\n this.webp.Module.doNotCaptureKeyboard = true;\r\n }\r\n /**\r\n * Decode raw webp data into a png data url\r\n */\r\n decode(webpData) {\r\n if (this.busy)\r\n throw new WebpMachineError(\"cannot decode when already busy\");\r\n this.busy = true;\r\n try {\r\n return relax().then(() => {\r\n const canvas = document.createElement(\"canvas\");\r\n this.webp.setCanvas(canvas);\r\n this.webp.webpToSdl(webpData, webpData.length);\r\n this.busy = false;\r\n return new Promise((resolve, reject) => {\r\n canvas.toBlob(blob => {\r\n let reader = new FileReader();\r\n reader.onload = (event) => {\r\n resolve(new Uint8Array(event.target.result));\r\n };\r\n reader.onerror = reject;\r\n reader.readAsArrayBuffer(blob);\r\n }, 'image/png', 1);\r\n });\r\n });\r\n }\r\n catch (error) {\r\n this.busy = false;\r\n error.name = WebpMachineError.name;\r\n error.message = `failed to decode webp image: ${error.message}`;\r\n throw error;\r\n }\r\n }\r\n}\r\nexports.WebpMachine = WebpMachine;\r\nwindow.WebpMachine = WebpMachine;\r\n"
},
{
"id": 76,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"name": "./node_modules/timers-browserify/main.js",
"index": 78,
"index2": 79,
"size": 2022,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"issuerId": 75,
"issuerName": "./node_modules/webp-hero/libwebp/dist/webp.js",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"profile": {
"factory": 74,
"building": 621
}
}
],
"profile": {
"factory": 1419,
"building": 72
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 75,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"module": "./node_modules/webp-hero/libwebp/dist/webp.js",
"moduleName": "./node_modules/webp-hero/libwebp/dist/webp.js",
"type": "cjs require",
"userRequest": "setImmediate",
"loc": "1:0-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n"
},
{
"id": 77,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"name": "./node_modules/setimmediate/setImmediate.js",
"index": 80,
"index2": 78,
"size": 6475,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"issuerId": 76,
"issuerName": "./node_modules/timers-browserify/main.js",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"profile": {
"factory": 74,
"building": 621
}
},
{
"id": 76,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"name": "./node_modules/timers-browserify/main.js",
"profile": {
"factory": 1419,
"building": 72
}
}
],
"profile": {
"factory": 1949,
"building": 1141,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 76,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"module": "./node_modules/timers-browserify/main.js",
"moduleName": "./node_modules/timers-browserify/main.js",
"type": "cjs require",
"userRequest": "setimmediate",
"loc": "54:0-23"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n"
},
{
"id": 78,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\process\\browser.js",
"name": "./node_modules/process/browser.js",
"index": 81,
"index2": 77,
"size": 5418,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"issuerId": 77,
"issuerName": "./node_modules/setimmediate/setImmediate.js",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"profile": {
"factory": 74,
"building": 621
}
},
{
"id": 76,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"name": "./node_modules/timers-browserify/main.js",
"profile": {
"factory": 1419,
"building": 72
}
},
{
"id": 77,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"name": "./node_modules/setimmediate/setImmediate.js",
"profile": {
"factory": 1949,
"building": 1141,
"dependencies": 0
}
}
],
"profile": {
"factory": 88,
"building": 298
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 77,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"module": "./node_modules/setimmediate/setImmediate.js",
"moduleName": "./node_modules/setimmediate/setImmediate.js",
"type": "cjs require",
"userRequest": "process",
"loc": "1:0-34"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n"
}
],
"filteredModules": 0,
"origins": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "webp",
"request": "./src/lib/webp.ts",
"reasons": []
}
]
},
{
"id": "style-desktop",
"rendered": false,
"initial": false,
"entry": false,
"size": 0,
"names": [
"style-desktop"
],
"files": [
"style-desktop.css"
],
"siblings": [],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [],
"filteredModules": 0,
"origins": []
},
{
"id": "style-mobile",
"rendered": false,
"initial": false,
"entry": false,
"size": 0,
"names": [
"style-mobile"
],
"files": [
"style-mobile.css"
],
"siblings": [],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [],
"filteredModules": 0,
"origins": []
}
],
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\utils.js",
"name": "./src/lib/utils.js",
"index": 11,
"index2": 8,
"size": 13733,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"module": "./src/lib/mtproto/mtprotoworker.ts",
"moduleName": "./src/lib/mtproto/mtprotoworker.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "25:16-35"
},
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\misc.ts",
"module": "./src/components/misc.ts",
"moduleName": "./src/components/misc.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "16:16-39"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony side effect evaluation",
"userRequest": "./utils",
"loc": "1:0-59"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "93:9-21"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "302:32-36"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "324:11-25"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "354:8-22"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "382:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "395:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "413:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "424:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "426:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "439:18-32"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "446:12-26"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "458:57-71"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "459:68-82"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "479:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "481:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "518:20-34"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "524:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "530:20-34"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "535:65-79"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "536:10-24"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./utils",
"loc": "546:12-26"
},
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "7:16-35"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "16:16-35"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "16:16-35"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPeersManager.ts",
"module": "./src/lib/appManagers/appPeersManager.ts",
"moduleName": "./src/lib/appManagers/appPeersManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:16-35"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:16-35"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "19:16-35"
},
{
"moduleId": 14,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\lottieLoader.ts",
"module": "./src/lib/lottieLoader.ts",
"moduleName": "./src/lib/lottieLoader.ts",
"type": "cjs require",
"userRequest": "./utils",
"loc": "13:16-34"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "9:16-35"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "16:16-35"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "10:16-35"
},
{
"moduleId": 24,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "16:16-35"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts",
"module": "./src/lib/mtproto/serverTimeManager.ts",
"moduleName": "./src/lib/mtproto/serverTimeManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:16-35"
},
{
"moduleId": 29,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\avatar.ts",
"module": "./src/components/avatar.ts",
"moduleName": "./src/components/avatar.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "7:16-39"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "40:16-39"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "10:16-39"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "37:16-35"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "22:16-35"
},
{
"moduleId": 41,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"module": "./src/lib/appManagers/appWebPagesManager.ts",
"moduleName": "./src/lib/appManagers/appWebPagesManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "6:16-35"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "11:16-35"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "18:16-39"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../utils",
"loc": "27:16-35"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "13:16-39"
},
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./lib/utils",
"loc": "108:64-86"
},
{
"moduleId": 59,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": 65,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\poll.ts",
"module": "./src/components/poll.ts",
"moduleName": "./src/components/poll.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "8:16-39"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "32:16-39"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/utils",
"loc": "20:16-39"
},
{
"moduleId": 69,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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,
"providedExports": [
"dT",
"isInDOM",
"checkDragEvent",
"cancelEvent",
"getRichValue",
"placeCaretAtEnd",
"getRichElementValue",
"$rootScope",
"generatePathData",
"langPack",
"_",
"isObject",
"tsNow",
"safeReplaceObject",
"numberWithCommas",
"findUpClassName",
"findUpTag",
"whichChild",
"copy",
"formatBytes",
"formatNumber",
"deepEqual",
"listMergeSorted",
"escapeRegExp",
"encodeEntities",
"fillPropertyValue",
"calcImageInBox",
"emojiUnicode",
"getEmojiToneIndex"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/components/appSearch.ts (referenced with cjs require), ./src/components/appSelectPeers.ts (referenced with cjs require), ./src/components/avatar.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/misc.ts (referenced with cjs require), ./src/components/poll.ts (referenced with cjs require), ./src/components/preloader.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/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/appPhotosManager.ts (referenced with cjs require), ./src/lib/appManagers/appPollsManager.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/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 <igor.beatle@gmail.com>\r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nvar _logTimer = Date.now();\r\nexport function dT () {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\n\r\nexport function isInDOM(element, parentNode) {\r\n if(!element) {\r\n return false;\r\n }\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 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 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\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 if(name != 'user_update') {\r\n console.log(dT(), 'Broadcasting ' + name + ' event, with args:', detail);\r\n }\r\n\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 the group\",\r\n\t\"messageActionChatDeleteUser\": \"removed user\",\r\n\t\"messageActionChatJoinedByLink\": \"joined the group\",\r\n \"messageActionPinMessage\": \"pinned message\",\r\n \"messageActionContactSignUp\": \"joined Telegram\",\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 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\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\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, '&amp;').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, '&lt;').replace(/>/g, '&gt;')\r\n}\r\n\r\nexport function fillPropertyValue(str) {\r\n let splitted = str.split(' ');\r\n if(splitted.length != 4) {\r\n if(!splitted[0]) splitted[0] = '0px';\r\n for(let i = splitted.length; i < 4; ++i) {\r\n splitted[i] = splitted[i % 2] || splitted[0] || '0px';\r\n }\r\n }\r\n\r\n return splitted;\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\nexport function emojiUnicode(input) {\r\n let pairs = emojiUnicode.raw(input).split(' ').map(val => parseInt(val).toString(16)).filter(p => p != 'fe0f');\r\n if(pairs.length && pairs[0].length == 2) pairs[0] = '00' + pairs[0];\r\n return pairs.join('-');\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\nemojiUnicode.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\nexport function getEmojiToneIndex(input) {\r\n let match = input.match(/[\\uDFFB-\\uDFFF]/);\r\n return match ? 5 - (57343 - match[0].charCodeAt(0)) : 0;\r\n}\r\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"name": "./src/lib/mtproto/mtprotoworker.ts",
"index": 26,
"index2": 22,
"size": 5358,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "11:40-75"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "34:40-75"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "19:40-75"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "13:40-75"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "8:40-75"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "26:40-75"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "8:40-75"
},
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "./mtprotoworker",
"loc": "20:40-66"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "37:40-79"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "14:40-79"
},
{
"moduleId": 37,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appStickersManager.ts",
"module": "./src/lib/appManagers/appStickersManager.ts",
"moduleName": "./src/lib/appManagers/appStickersManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "17:40-75"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "9:40-75"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "30:40-75"
},
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"module": "./src/pages/pagePassword.ts",
"moduleName": "./src/pages/pagePassword.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "12:40-79"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "13:40-79"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "9:40-79"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "29:40-79"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "24:40-79"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtprotoworker",
"loc": "8:40-75"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtprotoworker",
"loc": "35:40-79"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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 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 = false;\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 === undefined ? deferred.reject(error) : deferred.resolve(result);\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 console.log('will invokeApi:', method, params, options);\r\n return this.performTaskWorker('invokeApi', method, params, options);\r\n }\r\n setBaseDcID(dcID) {\r\n return this.performTaskWorker('setBaseDcID', dcID);\r\n }\r\n setUserAuth(userAuth) {\r\n utils_1.$rootScope.$broadcast('user_auth', 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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\misc.ts",
"name": "./src/components/misc.ts",
"index": 10,
"index2": 10,
"size": 15444,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../../components/misc",
"loc": "13:15-47"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "26:15-47"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "28:15-47"
},
{
"moduleId": 22,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"module": "./src/pages/pageIm.ts",
"moduleName": "./src/pages/pageIm.ts",
"type": "cjs require",
"userRequest": "../components/misc",
"loc": "25:15-44"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "22:15-47"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "44:15-32"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../components/misc",
"loc": "6:15-44"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "34:15-47"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../../components/misc",
"loc": "25:15-47"
},
{
"moduleId": 35,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"module": "./src/components/appForward.ts",
"moduleName": "./src/components/appForward.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "8:15-32"
},
{
"moduleId": 43,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popup.ts",
"module": "./src/components/popup.ts",
"moduleName": "./src/components/popup.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "8:15-32"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/misc",
"loc": "32:15-47"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "14:15-32"
},
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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"
},
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./components/misc",
"loc": "117:66-94"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "../components/misc",
"loc": "6:15-44"
},
{
"moduleId": 59,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./misc",
"loc": "16:15-32"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "../../components/misc",
"loc": "11:15-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"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\nexports.positionMenu = exports.openBtnMenu = exports.parseMenuButtonsTo = exports.formatPhoneNumber = exports.horizontalMenu = exports.putPreloader = exports.renderImageFromUrl = exports.toast = exports.ripple = void 0;\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 return;\r\n if (elem.querySelector('.c-ripple'))\r\n return;\r\n let r = document.createElement('div');\r\n r.classList.add('c-ripple');\r\n elem.append(r);\r\n let handler;\r\n let drawRipple = (clientX, clientY) => {\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 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 handler = null;\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 = clientX - rect.left;\r\n let clickY = 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 };\r\n let touchEnd = () => {\r\n handler && handler();\r\n };\r\n let touchStartFired = false;\r\n elem.addEventListener('touchstart', (e) => {\r\n if (e.touches.length > 1) {\r\n return;\r\n }\r\n console.log('touchstart', e);\r\n touchStartFired = true;\r\n let { clientX, clientY } = e.touches[0];\r\n drawRipple(clientX, clientY);\r\n window.addEventListener('touchend', touchEnd, { once: true });\r\n window.addEventListener('touchmove', (e) => {\r\n e.cancelBubble = true;\r\n e.stopPropagation();\r\n handler && handler();\r\n window.removeEventListener('touchend', touchEnd);\r\n }, { once: true });\r\n });\r\n elem.addEventListener('mousedown', (e) => {\r\n if (elem.dataset.ripple == '0') {\r\n return false;\r\n }\r\n else if (touchStartFired) {\r\n touchStartFired = false;\r\n return false;\r\n }\r\n let { clientX, clientY } = e;\r\n drawRipple(clientX, clientY);\r\n window.addEventListener('mouseup', handler, { once: true });\r\n });\r\n}\r\nexports.ripple = ripple;\r\nconst toastEl = document.createElement('div');\r\ntoastEl.classList.add('toast');\r\nfunction toast(html) {\r\n toastEl.innerHTML = html;\r\n document.body.append(toastEl);\r\n if (toastEl.dataset.timeout)\r\n clearTimeout(+toastEl.dataset.timeout);\r\n toastEl.dataset.timeout = '' + setTimeout(() => {\r\n toastEl.remove();\r\n delete toastEl.dataset.timeout;\r\n }, 3000);\r\n}\r\nexports.toast = toast;\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 set(elem, url);\r\n return Promise.resolve(true);\r\n }\r\n if (elem instanceof HTMLSourceElement) {\r\n elem.src = url;\r\n return Promise.resolve(false);\r\n }\r\n else {\r\n return new Promise((resolve, reject) => {\r\n let loader = new Image();\r\n loader.src = url;\r\n //let perf = performance.now();\r\n loader.addEventListener('load', () => {\r\n set(elem, url);\r\n loadedURLs[url] = true;\r\n //console.log('onload:', url, performance.now() - perf);\r\n resolve(false);\r\n });\r\n loader.addEventListener('error', reject);\r\n });\r\n }\r\n}\r\nexports.renderImageFromUrl = renderImageFromUrl;\r\nfunction putPreloader(elem, returnDiv = false) {\r\n const html = `\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"preloader-circular\" viewBox=\"25 25 50 50\">\r\n <circle class=\"preloader-path\" cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" stroke-miterlimit=\"10\"/>\r\n </svg>`;\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 slideNavigation(tabContent, prevTabContent, toRight) {\r\n if (toRight) {\r\n prevTabContent.style.filter = `brightness(80%)`;\r\n prevTabContent.style.transform = `translateX(-25%)`;\r\n tabContent.style.transform = `translateX(100%)`;\r\n }\r\n else {\r\n tabContent.style.filter = `brightness(80%)`;\r\n tabContent.style.transform = `translateX(-25%)`;\r\n prevTabContent.style.transform = `translateX(100%)`;\r\n }\r\n tabContent.classList.add('active');\r\n void tabContent.offsetWidth; // reflow\r\n tabContent.style.transform = '';\r\n tabContent.style.filter = '';\r\n}\r\nfunction slideTabs(tabContent, prevTabContent, toRight) {\r\n if (toRight) {\r\n tabContent.style.transform = `translateX(100%)`;\r\n prevTabContent.style.transform = `translateX(-100%)`;\r\n }\r\n else {\r\n tabContent.style.transform = `translateX(-100%)`;\r\n prevTabContent.style.transform = `translateX(100%)`;\r\n }\r\n tabContent.classList.add('active');\r\n void tabContent.offsetWidth; // reflow\r\n tabContent.style.transform = '';\r\n}\r\nfunction horizontalMenu(tabs, content, onClick, onTransitionEnd, transitionTime = 300) {\r\n const hideTimeouts = {};\r\n let prevTabContent = null;\r\n let prevId = -1;\r\n const selectTab = (id) => __awaiter(this, void 0, void 0, function* () {\r\n if (id == prevId)\r\n return false;\r\n const p = prevTabContent;\r\n const tabContent = content.children[id];\r\n const toRight = prevId < id;\r\n if (prevId != -1) {\r\n if (tabs) {\r\n slideTabs(tabContent, prevTabContent, toRight);\r\n }\r\n else {\r\n slideNavigation(tabContent, prevTabContent, toRight);\r\n }\r\n }\r\n else {\r\n tabContent.classList.add('active');\r\n }\r\n const _prevId = prevId;\r\n if (hideTimeouts.hasOwnProperty(id))\r\n clearTimeout(hideTimeouts[id]);\r\n if (p /* && false */) {\r\n hideTimeouts[_prevId] = setTimeout(() => {\r\n p.style.transform = '';\r\n p.style.filter = '';\r\n p.classList.remove('active');\r\n delete hideTimeouts[_prevId];\r\n if (onTransitionEnd)\r\n onTransitionEnd();\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 (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\nfunction parseMenuButtonsTo(to, elements) {\r\n Array.from(elements).forEach(el => {\r\n let name = el.className.match(/(?:^|\\s)menu-(.+?)(?:$|\\s)/)[1];\r\n to[name] = el;\r\n });\r\n}\r\nexports.parseMenuButtonsTo = parseMenuButtonsTo;\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 closeBtnMenu();\r\n //openedMenu.parentElement.click();\r\n }\r\n //console.log('mousemove', diffX, diffY);\r\n};\r\nlet onClick = ( /* e: MouseEvent | TouchEvent */) => {\r\n //e.preventDefault();\r\n closeBtnMenu();\r\n};\r\nlet closeBtnMenu = () => {\r\n if (openedMenu) {\r\n openedMenu.classList.remove('active');\r\n openedMenu.parentElement.classList.remove('menu-open');\r\n openedMenu = null;\r\n }\r\n if (openedMenuOnClose) {\r\n openedMenuOnClose();\r\n openedMenuOnClose = null;\r\n }\r\n //document.body.classList.remove('disable-hover');\r\n window.removeEventListener('mousemove', onMouseMove);\r\n window.removeEventListener('touchmove', onClick);\r\n window.removeEventListener('click', onClick);\r\n window.removeEventListener('contextmenu', onClick);\r\n};\r\nlet openedMenu = null, openedMenuOnClose = null;\r\nfunction openBtnMenu(menuElement, onClose) {\r\n closeBtnMenu();\r\n openedMenu = menuElement;\r\n openedMenu.classList.add('active');\r\n openedMenu.parentElement.classList.add('menu-open');\r\n //document.body.classList.add('disable-hover');\r\n openedMenuOnClose = onClose;\r\n window.addEventListener('mousemove', onMouseMove);\r\n window.addEventListener('touchmove', onClick, { once: true });\r\n window.addEventListener('click', onClick, { once: true });\r\n window.addEventListener('contextmenu', onClick, { once: true });\r\n}\r\nexports.openBtnMenu = openBtnMenu;\r\nfunction positionMenu(e, elem, side) {\r\n let { clientX, clientY } = e;\r\n let { scrollWidth, scrollHeight } = elem;\r\n let { innerWidth, innerHeight } = window;\r\n if (side === undefined) {\r\n if ((clientX + scrollWidth) > innerWidth) {\r\n if ((clientX - scrollWidth) < 0) {\r\n elem.style.left = (innerWidth - scrollWidth) + 'px';\r\n }\r\n else {\r\n side = 'right';\r\n }\r\n }\r\n }\r\n if (!side) {\r\n side = 'left';\r\n }\r\n elem.classList.remove('bottom-left', 'bottom-right');\r\n if (side !== undefined) {\r\n elem.style.left = (side == 'right' ? clientX - scrollWidth : clientX) + 'px';\r\n elem.classList.add(side == 'left' ? 'bottom-right' : 'bottom-left');\r\n }\r\n if ((clientY + scrollHeight) > innerHeight) {\r\n elem.style.top = (innerHeight - scrollHeight) + 'px';\r\n }\r\n else {\r\n elem.style.top = clientY + 'px';\r\n }\r\n}\r\nexports.positionMenu = positionMenu;\r\n"
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"name": "./src/lib/richtextprocessor.js",
"index": 18,
"index2": 16,
"size": 33714,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "8:28-59"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "20:28-59"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "17:28-59"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "17:28-59"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "15:28-59"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "21:28-59"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "21:28-59"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "43:28-63"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "8:28-63"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "43:28-59"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "19:28-59"
},
{
"moduleId": 41,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"module": "./src/lib/appManagers/appWebPagesManager.ts",
"moduleName": "./src/lib/appManagers/appWebPagesManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "9:28-59"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "6:28-59"
},
{
"moduleId": 65,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\poll.ts",
"module": "./src/components/poll.ts",
"moduleName": "./src/components/poll.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "7:28-63"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "27:28-63"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/richtextprocessor",
"loc": "21:28-63"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "../richtextprocessor",
"loc": "12:28-59"
}
],
"usedExports": true,
"providedExports": [
"RichTextProcessor"
],
"optimizationBailout": [
"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/poll.ts (referenced with cjs require), ./src/components/wrappers.ts (referenced with cjs require), ./src/lib/appManagers/AppInlineBotsManager.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/appPollsManager.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": 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 emojiSupported = navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1/* && false */,\r\n emojiCode;\r\n\r\n// added * to (?:[©®\\\\u2122\\\\u265f]\\\\ufe0f) and removed \\\\ufe0f from end\r\n// there are no 2640 and 2642 (signs)\r\nvar emojiRegExp = '(?:\\\\ud83d\\\\udc68\\\\ud83c\\\\udffb\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffc-\\\\udfff]|\\\\ud83d\\\\udc68\\\\ud83c\\\\udffc\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb\\\\udffd-\\\\udfff]|\\\\ud83d\\\\udc68\\\\ud83c\\\\udffd\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb\\\\udffc\\\\udffe\\\\udfff]|\\\\ud83d\\\\udc68\\\\ud83c\\\\udffe\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb-\\\\udffd\\\\udfff]|\\\\ud83d\\\\udc68\\\\ud83c\\\\udfff\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb-\\\\udffe]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffb\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffc-\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffb\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffc-\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffc\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb\\\\udffd-\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffc\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffb\\\\udffd-\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffd\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb\\\\udffc\\\\udffe\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffd\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffb\\\\udffc\\\\udffe\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffe\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb-\\\\udffd\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udffe\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffb-\\\\udffd\\\\udfff]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udfff\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc68\\\\ud83c[\\\\udffb-\\\\udffe]|\\\\ud83d\\\\udc69\\\\ud83c\\\\udfff\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83d\\\\udc69\\\\ud83c[\\\\udffb-\\\\udffe]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udffb\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udffc\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udffd\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udffe\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\ud83c\\\\udfff\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83e\\\\uddd1\\\\u200d\\\\ud83e\\\\udd1d\\\\u200d\\\\ud83e\\\\uddd1|\\\\ud83d\\\\udc6b\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83d\\\\udc6c\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83d\\\\udc6d\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ud83d[\\\\udc6b-\\\\udc6d])|(?:\\\\ud83d[\\\\udc68\\\\udc69]|\\\\ud83e\\\\uddd1)(?:\\\\ud83c[\\\\udffb-\\\\udfff])?\\\\u200d(?:\\\\u2695\\\\ufe0f|\\\\u2696\\\\ufe0f|\\\\u2708\\\\ufe0f|\\\\ud83c[\\\\udf3e\\\\udf73\\\\udf7c\\\\udf84\\\\udf93\\\\udfa4\\\\udfa8\\\\udfeb\\\\udfed]|\\\\ud83d[\\\\udcbb\\\\udcbc\\\\udd27\\\\udd2c\\\\ude80\\\\ude92]|\\\\ud83e[\\\\uddaf-\\\\uddb3\\\\uddbc\\\\uddbd])|(?:\\\\ud83c[\\\\udfcb\\\\udfcc]|\\\\ud83d[\\\\udd74\\\\udd75]|\\\\u26f9)((?:\\\\ud83c[\\\\udffb-\\\\udfff]|\\\\ufe0f)\\\\u200d[\\\\u2640\\\\u2642]\\\\ufe0f)|(?:\\\\ud83c[\\\\udfc3\\\\udfc4\\\\udfca]|\\\\ud83d[\\\\udc6e\\\\udc70\\\\udc71\\\\udc73\\\\udc77\\\\udc81\\\\udc82\\\\udc86\\\\udc87\\\\ude45-\\\\ude47\\\\ude4b\\\\ude4d\\\\ude4e\\\\udea3\\\\udeb4-\\\\udeb6]|\\\\ud83e[\\\\udd26\\\\udd35\\\\udd37-\\\\udd39\\\\udd3d\\\\udd3e\\\\uddb8\\\\uddb9\\\\uddcd-\\\\uddcf\\\\uddd6-\\\\udddd])(?:\\\\ud83c[\\\\udffb-\\\\udfff])?\\\\u200d[\\\\u2640\\\\u2642]\\\\ufe0f|(?:\\\\ud83d\\\\udc68\\\\u200d\\\\u2764\\\\ufe0f\\\\u200d\\\\ud83d\\\\udc8b\\\\u200d\\\\ud83d\\\\udc68|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc69\\\\u200d\\\\u2764\\\\ufe0f\\\\u200d\\\\ud83d\\\\udc8b\\\\u200d\\\\ud83d[\\\\udc68\\\\udc69]|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc68\\\\u200d\\\\u2764\\\\ufe0f\\\\u200d\\\\ud83d\\\\udc68|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc69\\\\u200d\\\\u2764\\\\ufe0f\\\\u200d\\\\ud83d[\\\\udc68\\\\udc69]|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc66\\\\u200d\\\\ud83d\\\\udc66|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc67\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83c\\\\udff3\\\\ufe0f\\\\u200d\\\\u26a7\\\\ufe0f|\\\\ud83c\\\\udff3\\\\ufe0f\\\\u200d\\\\ud83c\\\\udf08|\\\\ud83c\\\\udff4\\\\u200d\\\\u2620\\\\ufe0f|\\\\ud83d\\\\udc15\\\\u200d\\\\ud83e\\\\uddba|\\\\ud83d\\\\udc3b\\\\u200d\\\\u2744\\\\ufe0f|\\\\ud83d\\\\udc41\\\\u200d\\\\ud83d\\\\udde8|\\\\ud83d\\\\udc68\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc69\\\\u200d\\\\ud83d[\\\\udc66\\\\udc67]|\\\\ud83d\\\\udc6f\\\\u200d\\\\u2640\\\\ufe0f|\\\\ud83d\\\\udc6f\\\\u200d\\\\u2642\\\\ufe0f|\\\\ud83e\\\\udd3c\\\\u200d\\\\u2640\\\\ufe0f|\\\\ud83e\\\\udd3c\\\\u200d\\\\u2642\\\\ufe0f|\\\\ud83e\\\\uddde\\\\u200d\\\\u2640\\\\ufe0f|\\\\ud83e\\\\uddde\\\\u200d\\\\u2642\\\\ufe0f|\\\\ud83e\\\\udddf\\\\u200d\\\\u2640\\\\ufe0f|\\\\ud83e\\\\udddf\\\\u200d\\\\u2642\\\\ufe0f|\\\\ud83d\\\\udc08\\\\u200d\\\\u2b1b)|[#*0-9]\\\\ufe0f?\\\\u20e3|(?:[©®\\\\u2122\\\\u265f]\\\\ufe0f*)|(?:\\\\ud83c[\\\\udc04\\\\udd70\\\\udd71\\\\udd7e\\\\udd7f\\\\ude02\\\\ude1a\\\\ude2f\\\\ude37\\\\udf21\\\\udf24-\\\\udf2c\\\\udf36\\\\udf7d\\\\udf96\\\\udf97\\\\udf99-\\\\udf9b\\\\udf9e\\\\udf9f\\\\udfcd\\\\udfce\\\\udfd4-\\\\udfdf\\\\udff3\\\\udff5\\\\udff7]|\\\\ud83d[\\\\udc3f\\\\udc41\\\\udcfd\\\\udd49\\\\udd4a\\\\udd6f\\\\udd70\\\\udd73\\\\udd76-\\\\udd79\\\\udd87\\\\udd8a-\\\\udd8d\\\\udda5\\\\udda8\\\\uddb1\\\\uddb2\\\\uddbc\\\\uddc2-\\\\uddc4\\\\uddd1-\\\\uddd3\\\\udddc-\\\\uddde\\\\udde1\\\\udde3\\\\udde8\\\\uddef\\\\uddf3\\\\uddfa\\\\udecb\\\\udecd-\\\\udecf\\\\udee0-\\\\udee5\\\\udee9\\\\udef0\\\\udef3]|[\\\\u203c\\\\u2049\\\\u2139\\\\u2194-\\\\u2199\\\\u21a9\\\\u21aa\\\\u231a\\\\u231b\\\\u2328\\\\u23cf\\\\u23ed-\\\\u23ef\\\\u23f1\\\\u23f2\\\\u23f8-\\\\u23fa\\\\u24c2\\\\u25aa\\\\u25ab\\\\u25b6\\\\u25c0\\\\u25fb-\\\\u25fe\\\\u2600-\\\\u2604\\\\u260e\\\\u2611\\\\u2614\\\\u2615\\\\u2618\\\\u2620\\\\u2622\\\\u2623\\\\u2626\\\\u262a\\\\u262e\\\\u262f\\\\u2638-\\\\u263a\\\\u2640\\\\u2642\\\\u2648-\\\\u2653\\\\u2660\\\\u2663\\\\u2665\\\\u2666\\\\u2668\\\\u267b\\\\u267f\\\\u2692-\\\\u2697\\\\u2699\\\\u269b\\\\u269c\\\\u26a0\\\\u26a1\\\\u26a7\\\\u26aa\\\\u26ab\\\\u26b0\\\\u26b1\\\\u26bd\\\\u26be\\\\u26c4\\\\u26c5\\\\u26c8\\\\u26cf\\\\u26d1\\\\u26d3\\\\u26d4\\\\u26e9\\\\u26ea\\\\u26f0-\\\\u26f5\\\\u26f8\\\\u26fa\\\\u26fd\\\\u2702\\\\u2708\\\\u2709\\\\u270f\\\\u2712\\\\u2714\\\\u2716\\\\u271d\\\\u2721\\\\u2733\\\\u2734\\\\u2744\\\\u2747\\\\u2757\\\\u2763\\\\u2764\\\\u27a1\\\\u2934\\\\u2935\\\\u2b05-\\\\u2b07\\\\u2b1b\\\\u2b1c\\\\u2b50\\\\u2b55\\\\u3030\\\\u303d\\\\u3297\\\\u3299])(?:\\\\ufe0f|(?!\\\\ufe0e))|(?:(?:\\\\ud83c[\\\\udfcb\\\\udfcc]|\\\\ud83d[\\\\udd74\\\\udd75\\\\udd90]|[\\\\u261d\\\\u26f7\\\\u26f9\\\\u270c\\\\u270d])(?:\\\\ufe0f|(?!\\\\ufe0e))|(?:\\\\ud83c[\\\\udf85\\\\udfc2-\\\\udfc4\\\\udfc7\\\\udfca]|\\\\ud83d[\\\\udc42\\\\udc43\\\\udc46-\\\\udc50\\\\udc66-\\\\udc69\\\\udc6e\\\\udc70-\\\\udc78\\\\udc7c\\\\udc81-\\\\udc83\\\\udc85-\\\\udc87\\\\udcaa\\\\udd7a\\\\udd95\\\\udd96\\\\ude45-\\\\ude47\\\\ude4b-\\\\ude4f\\\\udea3\\\\udeb4-\\\\udeb6\\\\udec0\\\\udecc]|\\\\ud83e[\\\\udd0c\\\\udd0f\\\\udd18-\\\\udd1c\\\\udd1e\\\\udd1f\\\\udd26\\\\udd30-\\\\udd39\\\\udd3d\\\\udd3e\\\\udd77\\\\uddb5\\\\uddb6\\\\uddb8\\\\uddb9\\\\uddbb\\\\uddcd-\\\\uddcf\\\\uddd1-\\\\udddd]|[\\\\u270a\\\\u270b]))(?:\\\\ud83c[\\\\udffb-\\\\udfff])?|(?:\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40\\\\udc65\\\\udb40\\\\udc6e\\\\udb40\\\\udc67\\\\udb40\\\\udc7f|\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40\\\\udc73\\\\udb40\\\\udc63\\\\udb40\\\\udc74\\\\udb40\\\\udc7f|\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40\\\\udc77\\\\udb40\\\\udc6c\\\\udb40\\\\udc73\\\\udb40\\\\udc7f|\\\\ud83c\\\\udde6\\\\ud83c[\\\\udde8-\\\\uddec\\\\uddee\\\\uddf1\\\\uddf2\\\\uddf4\\\\uddf6-\\\\uddfa\\\\uddfc\\\\uddfd\\\\uddff]|\\\\ud83c\\\\udde7\\\\ud83c[\\\\udde6\\\\udde7\\\\udde9-\\\\uddef\\\\uddf1-\\\\uddf4\\\\uddf6-\\\\uddf9\\\\uddfb\\\\uddfc\\\\uddfe\\\\uddff]|\\\\ud83c\\\\udde8\\\\ud83c[\\\\udde6\\\\udde8\\\\udde9\\\\uddeb-\\\\uddee\\\\uddf0-\\\\uddf5\\\\uddf7\\\\uddfa-\\\\uddff]|\\\\ud83c\\\\udde9\\\\ud83c[\\\\uddea\\\\uddec\\\\uddef\\\\uddf0\\\\uddf2\\\\uddf4\\\\uddff]|\\\\ud83c\\\\uddea\\\\ud83c[\\\\udde6\\\\udde8\\\\uddea\\\\uddec\\\\udded\\\\uddf7-\\\\uddfa]|\\\\ud83c\\\\uddeb\\\\ud83c[\\\\uddee-\\\\uddf0\\\\uddf2\\\\uddf4\\\\uddf7]|\\\\ud83c\\\\uddec\\\\ud83c[\\\\udde6\\\\udde7\\\\udde9-\\\\uddee\\\\uddf1-\\\\uddf3\\\\uddf5-\\\\uddfa\\\\uddfc\\\\uddfe]|\\\\ud83c\\\\udded\\\\ud83c[\\\\uddf0\\\\uddf2\\\\uddf3\\\\uddf7\\\\uddf9\\\\uddfa]|\\\\ud83c\\\\uddee\\\\ud83c[\\\\udde8-\\\\uddea\\\\uddf1-\\\\uddf4\\\\uddf6-\\\\uddf9]|\\\\ud83c\\\\uddef\\\\ud83c[\\\\uddea\\\\uddf2\\\\uddf4\\\\uddf5]|\\\\ud83c\\\\uddf0\\\\ud83c[\\\\uddea\\\\uddec-\\\\uddee\\\\uddf2\\\\uddf3\\\\uddf5\\\\uddf7\\\\uddfc\\\\uddfe\\\\uddff]|\\\\ud83c\\\\uddf1\\\\ud83c[\\\\udde6-\\\\udde8\\\\uddee\\\\uddf0\\\\uddf7-\\\\uddfb\\\\uddfe]|\\\\ud83c\\\\uddf2\\\\ud83c[\\\\udde6\\\\udde8-\\\\udded\\\\uddf0-\\\\uddff]|\\\\ud83c\\\\uddf3\\\\ud83c[\\\\udde6\\\\udde8\\\\uddea-\\\\uddec\\\\uddee\\\\uddf1\\\\uddf4\\\\uddf5\\\\uddf7\\\\uddfa\\\\uddff]|\\\\ud83c\\\\uddf4\\\\ud83c\\\\uddf2|\\\\ud83c\\\\uddf5\\\\ud83c[\\\\udde6\\\\uddea-\\\\udded\\\\uddf0-\\\\uddf3\\\\uddf7-\\\\uddf9\\\\uddfc\\\\uddfe]|\\\\ud83c\\\\uddf6\\\\ud83c\\\\udde6|\\\\ud83c\\\\uddf7\\\\ud83c[\\\\uddea\\\\uddf4\\\\uddf8\\\\uddfa\\\\uddfc]|\\\\ud83c\\\\uddf8\\\\ud83c[\\\\udde6-\\\\uddea\\\\uddec-\\\\uddf4\\\\uddf7-\\\\uddf9\\\\uddfb\\\\uddfd-\\\\uddff]|\\\\ud83c\\\\uddf9\\\\ud83c[\\\\udde6\\\\udde8\\\\udde9\\\\uddeb-\\\\udded\\\\uddef-\\\\uddf4\\\\uddf7\\\\uddf9\\\\uddfb\\\\uddfc\\\\uddff]|\\\\ud83c\\\\uddfa\\\\ud83c[\\\\udde6\\\\uddec\\\\uddf2\\\\uddf3\\\\uddf8\\\\uddfe\\\\uddff]|\\\\ud83c\\\\uddfb\\\\ud83c[\\\\udde6\\\\udde8\\\\uddea\\\\uddec\\\\uddee\\\\uddf3\\\\uddfa]|\\\\ud83c\\\\uddfc\\\\ud83c[\\\\uddeb\\\\uddf8]|\\\\ud83c\\\\uddfd\\\\ud83c\\\\uddf0|\\\\ud83c\\\\uddfe\\\\ud83c[\\\\uddea\\\\uddf9]|\\\\ud83c\\\\uddff\\\\ud83c[\\\\udde6\\\\uddf2\\\\uddfc]|\\\\ud83c[\\\\udccf\\\\udd8e\\\\udd91-\\\\udd9a\\\\udde6-\\\\uddff\\\\ude01\\\\ude32-\\\\ude36\\\\ude38-\\\\ude3a\\\\ude50\\\\ude51\\\\udf00-\\\\udf20\\\\udf2d-\\\\udf35\\\\udf37-\\\\udf7c\\\\udf7e-\\\\udf84\\\\udf86-\\\\udf93\\\\udfa0-\\\\udfc1\\\\udfc5\\\\udfc6\\\\udfc8\\\\udfc9\\\\udfcf-\\\\udfd3\\\\udfe0-\\\\udff0\\\\udff4\\\\udff8-\\\\udfff]|\\\\ud83d[\\\\udc00-\\\\udc3e\\\\udc40\\\\udc44\\\\udc45\\\\udc51-\\\\udc65\\\\udc6a\\\\udc6f\\\\udc79-\\\\udc7b\\\\udc7d-\\\\udc80\\\\udc84\\\\udc88-\\\\udca9\\\\udcab-\\\\udcfc\\\\udcff-\\\\udd3d\\\\udd4b-\\\\udd4e\\\\udd50-\\\\udd67\\\\udda4\\\\uddfb-\\\\ude44\\\\ude48-\\\\ude4a\\\\ude80-\\\\udea2\\\\udea4-\\\\udeb3\\\\udeb7-\\\\udebf\\\\udec1-\\\\udec5\\\\uded0-\\\\uded2\\\\uded5-\\\\uded7\\\\udeeb\\\\udeec\\\\udef4-\\\\udefc\\\\udfe0-\\\\udfeb]|\\\\ud83e[\\\\udd0d\\\\udd0e\\\\udd10-\\\\udd17\\\\udd1d\\\\udd20-\\\\udd25\\\\udd27-\\\\udd2f\\\\udd3a\\\\udd3c\\\\udd3f-\\\\udd45\\\\udd47-\\\\udd76\\\\udd78\\\\udd7a-\\\\uddb4\\\\uddb7\\\\uddba\\\\uddbc-\\\\uddcb\\\\uddd0\\\\uddde-\\\\uddff\\\\ude70-\\\\ude74\\\\ude78-\\\\ude7a\\\\ude80-\\\\ude86\\\\ude90-\\\\udea8\\\\udeb0-\\\\udeb6\\\\udec0-\\\\udec2\\\\uded0-\\\\uded6]|[\\\\u23e9-\\\\u23ec\\\\u23f0\\\\u23f3\\\\u267e\\\\u26ce\\\\u2705\\\\u2728\\\\u274c\\\\u274e\\\\u2753-\\\\u2755\\\\u2795-\\\\u2797\\\\u27b0\\\\u27bf\\\\ue50a])';\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 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 let emojiInfo = emojiData[emojiCode.replace(/\\ufe0f/g, '')];\r\n if(emojiInfo === undefined) {\r\n //console.error('no emoji by code:', emojiCode, emojiCode && emojiCode.length, new TextEncoder().encode(emojiCode), emojiUnicode(emojiCode));\r\n return null;\r\n }\r\n\r\n return emojiUnicode(emojiCode);\r\n}\r\nfunction parseEntities(text, options = {}) {\r\n var match;\r\n var raw = text, url;\r\n var entities = [], 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 //console.log('parseEntities match:', match);\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]) { // Emoji\r\n //console.log('hit', match[8]);\r\n let emojiCoords = getEmojiSpritesheetCoords(match[8]);\r\n if(emojiCoords) {\r\n entities.push({\r\n _: 'messageEntityEmoji',\r\n offset: matchIndex,\r\n length: match[8].length,\r\n unicode: emojiCoords\r\n });\r\n }\r\n } else if(match[10]) { // Hashtag\r\n entities.push({\r\n _: 'messageEntityHashtag',\r\n offset: matchIndex + (match[9] ? match[9].length : 0),\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] ? match[11].length : 0),\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 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 '<a ',\r\n attr,\r\n contextExternal ? ' target=\"_blank\" rel=\"noopener noreferrer\" ' : '',\r\n ' href=\"',\r\n contextUrl.replace('{1}', encodeURIComponent(username)),\r\n '\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<a href=\"#/im?p=u',\r\n encodeURIComponent(entity.user_id),\r\n '\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<a ',\r\n contextExternal ? ' target=\"_blank\" rel=\"noopener noreferrer\" ' : '',\r\n 'href=\"',\r\n contextUrl.replace('{1}', encodeURIComponent(hashtag))\r\n ,\r\n '\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<a href=\"',\r\n encodeEntities('mailto:' + entityText),\r\n '\" target=\"_blank\" rel=\"noopener noreferrer\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<a href=\"',\r\n encodeEntities(url),\r\n '\" target=\"_blank\" rel=\"noopener noreferrer\">',\r\n inner,\r\n '</a>'\r\n )\r\n }\r\n break\r\n case 'messageEntityLinebreak':\r\n html.push(options.noLinebreaks ? ' ' : '<br/>')\r\n break\r\n case 'messageEntityEmoji':\r\n html.push(emojiSupported ? \r\n `<span class=\"emoji\" contenteditable=\"false\">${encodeEntities(entityText)}</span>` : \r\n `<img src=\"assets/img/emoji/${entity.unicode}.png\" alt=\"${encodeEntities(entityText)}\" class=\"emoji\">`);\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 '<a href=\"',\r\n encodeEntities('tg://bot_command?command=' + encodeURIComponent(command) + (bot ? '&bot=' + encodeURIComponent(bot) : '')),\r\n '\">',\r\n encodeEntities(entityText),\r\n '</a>'\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 '<strong>',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n '</strong>'\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 '<em>',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n '</em>'\r\n )\r\n break\r\n case 'messageEntityHighlight':\r\n html.push(\r\n '<i>',\r\n wrapRichNestedText(entityText, entity.nested, options),\r\n '</i>'\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 '<code>',\r\n encodeEntities(entityText),\r\n '</code>'\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 '<pre><code', (entity.language ? ' class=\"language-' + encodeEntities(entity.language) + '\"' : ''), '>',\r\n encodeEntities(entityText),\r\n '</code></pre>'\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|&#65039;|&#65533;|&#8205;/g, '', text)\r\n var emojiSizeClass = curEmojiSize == 18 ? '' : (' emoji-w' + curEmojiSize)\r\n text = text.replace(/<span((?: [^>]*)?) class=\"emoji emoji-(\\d)-(\\d+)-(\\d+)\"(.+?)<\\/span>/g,\r\n '<span$1 class=\"emoji ' + emojiSizeClass + ' emoji-spritesheet-$2\" style=\"background-position: -$3px -$4px;\" $5</span>')\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": 4,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"name": "./src/lib/appManagers/appUsersManager.ts",
"index": 29,
"index2": 35,
"size": 18969,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "19:42-70"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "18:42-70"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPeersManager.ts",
"module": "./src/lib/appManagers/appPeersManager.ts",
"moduleName": "./src/lib/appManagers/appPeersManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "6:42-70"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "7:42-70"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "10:42-70"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "20:42-70"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "12:42-70"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "20:42-70"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "41:42-70"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appUsersManager",
"loc": "8:42-82"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appUsersManager",
"loc": "21:42-87"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appUsersManager",
"loc": "33:42-70"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appUsersManager",
"loc": "10:42-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppUsersManager = void 0;\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\nconst misc_1 = require(\"../../components/misc\");\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\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 = searchIndexManager_1.default.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 utils_1.$rootScope.$broadcast('avatar_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 fillContacts() {\r\n if (this.contactsFillPromise) {\r\n return this.contactsFillPromise;\r\n }\r\n return this.contactsFillPromise = mtprotoworker_1.default.invokeApi('contacts.getContacts', {\r\n hash: 0\r\n }).then((result) => {\r\n let userID;\r\n this.contactsList = [];\r\n this.saveApiUsers(result.users);\r\n result.contacts.forEach((contact) => {\r\n userID = contact.user_id;\r\n this.contactsList.push(userID);\r\n searchIndexManager_1.default.indexObject(userID, this.getUserSearchText(userID), this.contactsIndex);\r\n });\r\n return this.contactsList;\r\n });\r\n }\r\n getUserSearchText(id) {\r\n const user = this.users[id];\r\n if (!user) {\r\n return '';\r\n }\r\n const serviceText = user.pFlags.self ? 'user_name_saved_msgs_raw' : '';\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 getContacts(query) {\r\n return this.fillContacts().then(contactsList => {\r\n if (query) {\r\n const results = searchIndexManager_1.default.search(query, this.contactsIndex);\r\n const filteredContactsList = contactsList.filter(id => !!results[id]);\r\n contactsList = filteredContactsList;\r\n }\r\n contactsList.sort((userID1, userID2) => {\r\n const sortName1 = (this.users[userID1] || {}).sortName || '';\r\n const sortName2 = (this.users[userID2] || {}).sortName || '';\r\n return sortName1.localeCompare(sortName2);\r\n });\r\n /* contactsList.sort((userID1: number, userID2: number) => {\r\n const sortName1 = (this.users[userID1] || {}).sortName || '';\r\n const sortName2 = (this.users[userID2] || {}).sortName || '';\r\n if(sortName1 == sortName2) {\r\n return 0;\r\n }\r\n \r\n return sortName1 > sortName2 ? 1 : -1;\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 = '+' + misc_1.formatPhoneNumber(apiUser.phone).formatted;\r\n }\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 = searchIndexManager_1.default.cleanUsername(apiUser.username);\r\n this.usernames[searchUsername] = userID;\r\n }\r\n apiUser.sortName = apiUser.pFlags.deleted ? '' : searchIndexManager_1.default.cleanSearchText(apiUser.first_name + ' ' + (apiUser.last_name || ''), false);\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) : '');\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, pFlags: { deleted: true }, access_hash: this.userAccess[id] };\r\n }\r\n getSelf() {\r\n return this.getUser(this.myID);\r\n }\r\n getUserStatusString(userID) {\r\n if (this.isBot(userID)) {\r\n return 'bot';\r\n }\r\n let user = this.getUser(userID);\r\n if (!user || !user.status) {\r\n return '';\r\n }\r\n let str = '';\r\n switch (user.status._) {\r\n case 'userStatusRecently': {\r\n str = 'last seen recently';\r\n break;\r\n }\r\n case 'userStatusLastWeek': {\r\n str = 'last seen last week';\r\n break;\r\n }\r\n case 'userStatusLastMonth': {\r\n str = 'last seen last month';\r\n break;\r\n }\r\n case 'userStatusOffline': {\r\n str = '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 str += ' just now';\r\n }\r\n else if ((now - date) < 3600) {\r\n let c = (now - date) / 60 | 0;\r\n str += c + ' ' + (c == 1 ? 'minute' : 'minutes') + ' ago';\r\n }\r\n else if (now - date < 86400) {\r\n let c = (now - date) / 3600 | 0;\r\n str += c + ' ' + (c == 1 ? 'hour' : 'hours') + ' ago';\r\n }\r\n else {\r\n let d = new Date(date * 1000);\r\n str += ('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 str = 'online';\r\n break;\r\n }\r\n }\r\n return str;\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 /* 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: 30,\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 searchIndexManager_1.default.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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"index": 42,
"index2": 42,
"size": 149617,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "11:45-76"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "19:45-76"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "45:45-93"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "38:45-76"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "18:45-76"
},
{
"moduleId": 35,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"module": "./src/components/appForward.ts",
"moduleName": "./src/components/appForward.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "7:45-93"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appMessagesManager",
"loc": "14:45-88"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "7:45-76"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "17:45-93"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "12:45-93"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesManager",
"loc": "34:45-93"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesManager",
"loc": "7:45-76"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppMessagesManager = void 0;\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\nconst appPollsManager_1 = __importDefault(require(\"./appPollsManager\"));\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\r\nconst APITIMEOUT = 0;\r\nclass AppMessagesManager {\r\n constructor() {\r\n this.messagesStorage = {};\r\n this.groupedMessagesStorage = {}; // will be used for albums\r\n this.historiesStorage = {};\r\n this.dialogsStorage = {};\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.lastSearchFilter = {};\r\n this.lastSearchResults = [];\r\n this.needSingleMessages = [];\r\n this.fetchSingleMessagesTimeout = 0;\r\n this.fetchSingleMessagesPromise = null;\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 this.newUpdatesAfterReloadToHandle = {};\r\n this.loaded = null;\r\n this.dialogsIndex = searchIndexManager_1.default.createIndex();\r\n this.cachedResults = {\r\n query: '',\r\n count: 0,\r\n dialogs: []\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 this.loaded = new Promise((resolve, reject) => {\r\n storage_1.default.get('state').then(({ dialogs, allDialogsLoaded, peers, messages, maxSeenMsgID, updates }) => {\r\n console.log('state res', dialogs, messages);\r\n if (maxSeenMsgID && !appMessagesIDsManager_1.default.getMessageIDInfo(maxSeenMsgID)[1]) {\r\n this.maxSeenID = maxSeenMsgID;\r\n }\r\n //return resolve();\r\n if (peers) {\r\n for (let peerID in peers) {\r\n let peer = peers[peerID];\r\n if (+peerID < 0)\r\n appChatsManager_1.default.saveApiChat(peer);\r\n else\r\n appUsersManager_1.default.saveApiUser(peer);\r\n }\r\n }\r\n if (messages) {\r\n /* let tempID = this.tempID;\r\n \r\n for(let message of messages) {\r\n if(message.id < tempID) {\r\n tempID = message.id;\r\n }\r\n }\r\n \r\n if(tempID != this.tempID) {\r\n console.log('Set tempID to:', tempID);\r\n this.tempID = tempID;\r\n } */\r\n this.saveMessages(messages);\r\n }\r\n if (allDialogsLoaded) {\r\n this.allDialogsLoaded = allDialogsLoaded;\r\n }\r\n if (dialogs) {\r\n dialogs.forEachReverse(dialog => {\r\n this.saveConversation(dialog);\r\n });\r\n }\r\n apiUpdatesManager_1.default.attach(updates !== null && updates !== void 0 ? updates : null);\r\n resolve();\r\n }).catch(resolve);\r\n });\r\n setInterval(() => this.saveState(), 10000);\r\n }\r\n saveState() {\r\n var _a, _b;\r\n let messages = [];\r\n let dialogs = [];\r\n let peers = {};\r\n for (let folderID in this.dialogsStorage) {\r\n for (let dialog of this.dialogsStorage[folderID]) {\r\n let historyStorage = this.historiesStorage[dialog.peerID];\r\n let history = [].concat((_a = historyStorage === null || historyStorage === void 0 ? void 0 : historyStorage.pending) !== null && _a !== void 0 ? _a : [], (_b = historyStorage === null || historyStorage === void 0 ? void 0 : historyStorage.history) !== null && _b !== void 0 ? _b : []);\r\n dialog = utils_1.copy(dialog);\r\n let removeUnread = 0;\r\n for (let mid of history) {\r\n let message = this.getMessage(mid);\r\n if ( /* message._ != 'messageEmpty' && */message.id > 0) {\r\n messages.push(message);\r\n if (message.fromID != dialog.peerID) {\r\n peers[message.fromID] = appPeersManager_1.default.getPeer(message.fromID);\r\n }\r\n dialog.top_message = message.mid;\r\n break;\r\n }\r\n else if (message.pFlags && message.pFlags.unread) {\r\n ++removeUnread;\r\n }\r\n }\r\n if (removeUnread && dialog.unread_count)\r\n dialog.unread_count -= removeUnread;\r\n dialogs.push(dialog);\r\n peers[dialog.peerID] = appPeersManager_1.default.getPeer(dialog.peerID);\r\n }\r\n }\r\n let us = apiUpdatesManager_1.default.updatesState;\r\n let updates = {\r\n seq: us.seq,\r\n pts: us.pts,\r\n date: us.date\r\n };\r\n storage_1.default.set({\r\n state: {\r\n dialogs,\r\n messages,\r\n allDialogsLoaded: this.allDialogsLoaded,\r\n peers,\r\n updates,\r\n maxSeenMsgID: this.maxSeenID\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 var _a;\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 = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = { count: null, history: [], pending: [] });\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 console.log('sendFile', file, fileType);\r\n if (caption) {\r\n let entities = options.entities || [];\r\n caption = richtextprocessor_1.RichTextProcessor.parseMarkdown(caption, entities);\r\n }\r\n let attributes = [];\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.indexOf('audio/') === 0 || ['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 let flags = 0;\r\n if (options.isVoiceMessage) {\r\n flags |= 1 << 10;\r\n flags |= 1 << 2;\r\n attachType = 'voice';\r\n }\r\n let attribute = {\r\n _: 'documentAttributeAudio',\r\n flags: flags,\r\n pFlags: {\r\n voice: options.isVoiceMessage\r\n },\r\n waveform: options.waveform,\r\n voice: options.isVoiceMessage,\r\n duration: options.duration || 0\r\n };\r\n attributes.push(attribute);\r\n }\r\n else if (fileType.indexOf('video/') === 0) {\r\n attachType = 'video';\r\n apiFileName = 'video.mp4';\r\n actionName = 'sendMessageUploadVideoAction';\r\n let flags = 1;\r\n if (options.isRoundMessage)\r\n flags |= 2;\r\n let videoAttribute = {\r\n _: 'documentAttributeVideo',\r\n flags: flags,\r\n pFlags: {\r\n supports_streaming: true,\r\n round_message: options.isRoundMessage\r\n },\r\n round_message: options.isRoundMessage,\r\n supports_streaming: true,\r\n duration: options.duration,\r\n w: options.width,\r\n h: options.height\r\n };\r\n attributes.push(videoAttribute);\r\n }\r\n else {\r\n attachType = 'document';\r\n apiFileName = 'document.' + fileType.split('/')[1];\r\n actionName = 'sendMessageUploadDocumentAction';\r\n }\r\n attributes.push({ _: 'documentAttributeFilename', file_name: fileName || apiFileName });\r\n if (['document', 'video', 'audio', 'voice'].indexOf(attachType) !== -1) {\r\n let doc = {\r\n _: 'document',\r\n id: '' + messageID,\r\n duration: options.duration,\r\n attributes: attributes,\r\n w: options.width,\r\n h: options.height,\r\n downloaded: file.size,\r\n thumbs: [],\r\n mime_type: fileType,\r\n url: options.objectURL || '',\r\n size: file.size\r\n };\r\n appDocsManager_1.default.saveDoc(doc);\r\n }\r\n console.log('AMM: sendFile', attachType, apiFileName, file.type, options);\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 background: options.background,\r\n clear_draft: true,\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 (options.background) {\r\n flags |= 64;\r\n }\r\n flags |= 128; // clear_draft\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 default:\r\n inputMedia = {\r\n _: 'inputMediaUploadedDocument',\r\n file: inputFile,\r\n mime_type: fileType,\r\n attributes: attributes\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 sendAlbum(peerID, files, options = {}) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\r\n let groupID;\r\n let historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = { count: null, history: [], pending: [] });\r\n let flags = 0;\r\n let pFlags = {};\r\n let replyToMsgID = options.replyToMsgID;\r\n let isChannel = appPeersManager_1.default.isChannel(peerID);\r\n let isMegagroup = isChannel && appPeersManager_1.default.isMegagroup(peerID);\r\n let asChannel = isChannel && !isMegagroup ? true : false;\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 console.log('AMM: sendAlbum', files, options);\r\n let fromID = appUsersManager_1.default.getSelf().id;\r\n if (peerID != fromID) {\r\n pFlags.out = true;\r\n if (!isChannel && !appUsersManager_1.default.isBot(peerID)) {\r\n pFlags.unread = true;\r\n }\r\n }\r\n if (replyToMsgID) {\r\n flags |= 1;\r\n }\r\n if (asChannel) {\r\n fromID = 0;\r\n pFlags.post = true;\r\n }\r\n else {\r\n flags |= 128; // clear_draft\r\n }\r\n let ids = files.map(() => this.tempID--).reverse();\r\n groupID = ids[ids.length - 1];\r\n let messages = files.map((file, idx) => {\r\n //let messageID = this.tempID--;\r\n //if(!groupID) groupID = messageID;\r\n let messageID = ids[idx];\r\n let randomID = [bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)];\r\n let randomIDS = bin_utils_1.bigint(randomID[0]).shiftLeft(32).add(bin_utils_1.bigint(randomID[1])).toString();\r\n let preloader = new preloader_1.default(null, true);\r\n let details = options.sendFileDetails[idx];\r\n let media = {\r\n _: 'messageMediaPending',\r\n type: 'album',\r\n preloader: preloader,\r\n progress: {\r\n percent: 1,\r\n total: file.size,\r\n done: 0,\r\n cancel: () => { }\r\n },\r\n document: undefined,\r\n photo: undefined\r\n };\r\n if (file.type.indexOf('video/') === 0) {\r\n let flags = 1;\r\n let videoAttribute = {\r\n _: 'documentAttributeVideo',\r\n flags: flags,\r\n pFlags: {\r\n supports_streaming: true,\r\n round_message: false\r\n },\r\n round_message: false,\r\n supports_streaming: true,\r\n duration: details.duration,\r\n w: details.width,\r\n h: details.height\r\n };\r\n let doc = {\r\n _: 'document',\r\n id: '' + messageID,\r\n attributes: [videoAttribute],\r\n downloaded: file.size,\r\n thumbs: [],\r\n mime_type: file.type,\r\n url: details.objectURL || '',\r\n size: file.size\r\n };\r\n appDocsManager_1.default.saveDoc(doc);\r\n media.document = doc;\r\n }\r\n else {\r\n let photo = {\r\n _: 'photo',\r\n id: '' + messageID,\r\n sizes: [{\r\n _: 'photoSize',\r\n w: details.width,\r\n h: details.height,\r\n type: 'm',\r\n size: file.size\r\n }],\r\n w: details.width,\r\n h: details.height,\r\n downloaded: file.size,\r\n url: details.objectURL || ''\r\n };\r\n appPhotosManager_1.default.savePhoto(photo);\r\n media.photo = photo;\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 let message = {\r\n _: 'message',\r\n id: messageID,\r\n from_id: fromID,\r\n grouped_id: groupID,\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: media,\r\n random_id: randomIDS,\r\n randomID: randomID,\r\n reply_to_msg_id: replyToMsgID,\r\n views: asChannel && 1,\r\n pending: true,\r\n error: false\r\n };\r\n this.saveMessages([message]);\r\n historyStorage.pending.unshift(messageID);\r\n //$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});\r\n this.pendingByRandomID[randomIDS] = [peerID, messageID];\r\n return message;\r\n });\r\n utils_1.$rootScope.$broadcast('history_append', { peerID: peerID, messageID: messages[messages.length - 1].id, my: true });\r\n let toggleError = (message, 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 let uploaded = false, uploadPromise = null;\r\n let inputPeer = appPeersManager_1.default.getInputPeerByID(peerID);\r\n let invoke = (multiMedia) => {\r\n appImManager_1.default.setTyping('sendMessageCancelAction');\r\n return mtprotoworker_1.default.invokeApi('messages.sendMultiMedia', {\r\n flags: flags,\r\n peer: inputPeer,\r\n multi_media: multiMedia,\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 messages.forEach(message => toggleError(message, true));\r\n });\r\n };\r\n let inputs = [];\r\n for (let i = 0, length = files.length; i < length; ++i) {\r\n let file = files[i];\r\n let message = messages[i];\r\n let media = message.media;\r\n let preloader = media.preloader;\r\n let actionName = file.type.indexOf('video/') === 0 ? 'sendMessageUploadVideoAction' : 'sendMessageUploadPhotoAction';\r\n let deferred = polyfill_1.deferredPromise();\r\n yield this.sendFilePromise;\r\n this.sendFilePromise = deferred;\r\n if (!uploaded || message.error) {\r\n uploaded = false;\r\n uploadPromise = apiFileManager_1.default.uploadFile(file);\r\n }\r\n uploadPromise.notify = (progress) => {\r\n console.log('upload progress', progress);\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 yield uploadPromise.then((inputFile) => {\r\n console.log('appMessagesManager: sendAlbum file uploaded:', inputFile);\r\n let inputMedia;\r\n let details = options.sendFileDetails[i];\r\n if (details.duration) {\r\n inputMedia = {\r\n _: 'inputMediaUploadedDocument',\r\n flags: 0,\r\n file: inputFile,\r\n mime_type: file.type,\r\n attributes: [{\r\n _: 'documentAttributeVideo',\r\n flags: 2,\r\n supports_streaming: true,\r\n duration: details.duration,\r\n w: details.width,\r\n h: details.height\r\n }]\r\n };\r\n }\r\n else {\r\n inputMedia = {\r\n _: 'inputMediaUploadedPhoto',\r\n flags: 0,\r\n file: inputFile\r\n };\r\n }\r\n return mtprotoworker_1.default.invokeApi('messages.uploadMedia', {\r\n peer: inputPeer,\r\n media: inputMedia\r\n }).then(messageMedia => {\r\n let inputMedia;\r\n if (messageMedia.photo) {\r\n let photo = messageMedia.photo;\r\n appPhotosManager_1.default.savePhoto(photo);\r\n inputMedia = appPhotosManager_1.default.getInputByID(photo.id);\r\n }\r\n else {\r\n let doc = messageMedia.document;\r\n appDocsManager_1.default.saveDoc(doc);\r\n inputMedia = appDocsManager_1.default.getMediaInputByID(doc.id);\r\n }\r\n inputs.push({\r\n _: 'inputSingleMedia',\r\n flags: 0,\r\n media: inputMedia,\r\n random_id: message.randomID,\r\n message: caption,\r\n entities: []\r\n });\r\n caption = ''; // only 1 caption for all inputs\r\n }, () => {\r\n toggleError(message, true);\r\n });\r\n }, () => {\r\n toggleError(message, true);\r\n });\r\n console.log('appMessagesManager: sendAlbum uploadPromise.finally!');\r\n deferred.resolve();\r\n preloader.detach();\r\n }\r\n uploaded = true;\r\n invoke(inputs);\r\n });\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 getConversations(query = '', offsetIndex, limit = 20, folderID = 0) {\r\n var _a;\r\n let curDialogStorage = (_a = this.dialogsStorage[folderID]) !== null && _a !== void 0 ? _a : (this.dialogsStorage[folderID] = []);\r\n if (query) {\r\n if (!limit || this.cachedResults.query !== query) {\r\n this.cachedResults.query = query;\r\n const results = searchIndexManager_1.default.search(query, this.dialogsIndex);\r\n this.cachedResults.dialogs = [];\r\n for (const folderID in this.dialogsStorage) {\r\n const dialogs = this.dialogsStorage[folderID];\r\n dialogs.forEach(dialog => {\r\n if (results[dialog.peerID]) {\r\n this.cachedResults.dialogs.push(dialog);\r\n }\r\n });\r\n }\r\n this.cachedResults.count = this.cachedResults.dialogs.length;\r\n }\r\n curDialogStorage = this.cachedResults.dialogs;\r\n }\r\n else {\r\n this.cachedResults.query = '';\r\n }\r\n let 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 (query || 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(totalCount => {\r\n //const curDialogStorage = this.dialogsStorage[folderID];\r\n 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 //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: totalCount\r\n };\r\n });\r\n }\r\n getTopMessages(limit, folderID) {\r\n const dialogs = this.dialogsStorage[folderID];\r\n let offsetID = 0;\r\n let offsetDate = 0;\r\n let offsetPeerID = 0;\r\n let offsetIndex = 0;\r\n let flags = 0;\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; // means pinned already loaded\r\n }\r\n //if(folderID > 0) {\r\n //flags |= 1;\r\n flags |= 2;\r\n //}\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: 0\r\n }, {\r\n timeout: APITIMEOUT\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 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 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 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) {\r\n this.scheduleHandleNewDialogs();\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 forwardMessages(peerID, mids, options = {}) {\r\n peerID = appPeersManager_1.default.getPeerMigratedTo(peerID) || peerID;\r\n mids = mids.sort((a, b) => a - b);\r\n var flags = 0;\r\n if (options.withMyScore) {\r\n flags |= 256;\r\n }\r\n let splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(mids);\r\n let promises = [];\r\n for (let channelID in splitted.msgIDs) {\r\n let msgIDs = splitted.msgIDs[channelID];\r\n let len = msgIDs.length;\r\n let randomIDs = [];\r\n for (let i = 0; i < len; i++) {\r\n randomIDs.push([bin_utils_1.nextRandomInt(0xFFFFFFFF), bin_utils_1.nextRandomInt(0xFFFFFFFF)]);\r\n }\r\n let sentRequestOptions = {};\r\n if (this.pendingAfterMsgs[peerID]) {\r\n sentRequestOptions.afterMessageID = this.pendingAfterMsgs[peerID].messageID;\r\n }\r\n let promise = mtprotoworker_1.default.invokeApi('messages.forwardMessages', {\r\n flags: flags,\r\n from_peer: appPeersManager_1.default.getInputPeerByID(-channelID),\r\n id: msgIDs,\r\n random_id: randomIDs,\r\n to_peer: appPeersManager_1.default.getInputPeerByID(peerID)\r\n }, sentRequestOptions).then((updates) => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n }, () => { }).then(() => {\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 promises.push(promise);\r\n }\r\n return Promise.all(promises);\r\n }\r\n /*\r\n var date = Date.now() / 1000 | 0;\r\n var m = date * 0x10000;\r\n \r\n var k = (date + 1) * 0x10000;\r\n k - m;\r\n 65536\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 generateIndexForDialog(dialog) {\r\n const channelID = appPeersManager_1.default.isChannel(dialog.peerID) ? -dialog.peerID : 0;\r\n const mid = appMessagesIDsManager_1.default.getFullMessageID(dialog.top_message, channelID);\r\n const message = this.getMessage(mid);\r\n let topDate = message.date;\r\n if (channelID) {\r\n const 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 const 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 && dialog.folder_id == 0) {\r\n topDate = this.generateDialogPinnedDate(dialog);\r\n //console.log('topDate', peerID, topDate);\r\n }\r\n dialog.index = this.generateDialogIndex(topDate);\r\n }\r\n pushDialogToStorage(dialog, offsetDate) {\r\n var _a;\r\n let dialogs = (_a = this.dialogsStorage[dialog.folder_id]) !== null && _a !== void 0 ? _a : (this.dialogsStorage[dialog.folder_id] = []);\r\n let pos = dialogs.findIndex(d => d.peerID == dialog.peerID);\r\n if (pos !== -1) {\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 !== -1) {\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 let index = dialog.index;\r\n let 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 (let 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 dialogs = this.dialogsStorage;\r\n for (let folderID in dialogs) {\r\n let index = dialogs[folderID].findIndex(dialog => dialog.peerID == peerID);\r\n if (index !== -1) {\r\n return [dialogs[folderID][index], index];\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 doFlushHistory(inputPeer, justClear) {\r\n let flags = 0;\r\n if (justClear) {\r\n flags |= 1;\r\n }\r\n return mtprotoworker_1.default.invokeApi('messages.deleteHistory', {\r\n flags: flags,\r\n peer: inputPeer,\r\n max_id: 0\r\n }).then((affectedHistory) => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updatePts',\r\n pts: affectedHistory.pts,\r\n pts_count: affectedHistory.pts_count\r\n }\r\n });\r\n if (!affectedHistory.offset) {\r\n return true;\r\n }\r\n return this.doFlushHistory(inputPeer, justClear);\r\n });\r\n }\r\n flushHistory(peerID, justClear) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (appPeersManager_1.default.isChannel(peerID)) {\r\n let promise = this.getHistory(peerID, 0, 1);\r\n let historyResult = promise instanceof Promise ? yield promise : promise;\r\n let channelID = -peerID;\r\n let maxID = appMessagesIDsManager_1.default.getMessageLocalID(historyResult.history[0] || 0);\r\n return mtprotoworker_1.default.invokeApi('channels.deleteHistory', {\r\n channel: appChatsManager_1.default.getChannelInput(channelID),\r\n max_id: maxID\r\n }).then(() => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateChannelAvailableMessages',\r\n channel_id: channelID,\r\n available_min_id: maxID\r\n }\r\n });\r\n return true;\r\n });\r\n }\r\n return this.doFlushHistory(appPeersManager_1.default.getInputPeerByID(peerID), justClear).then(() => {\r\n delete this.historiesStorage[peerID];\r\n for (let mid in this.messagesStorage) {\r\n let message = this.messagesStorage[mid];\r\n if (message.peerID == peerID) {\r\n delete this.messagesStorage[mid];\r\n }\r\n }\r\n if (justClear) {\r\n utils_1.$rootScope.$broadcast('dialog_flush', { peerID: peerID });\r\n }\r\n else {\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog[0]) {\r\n this.dialogsStorage[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n }\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID });\r\n }\r\n });\r\n });\r\n }\r\n saveMessages(apiMessages, options = {}) {\r\n apiMessages.forEach((apiMessage) => {\r\n var _a;\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 const peerID = this.getMessagePeer(apiMessage);\r\n const isChannel = apiMessage.to_id._ == 'peerChannel';\r\n const channelID = isChannel ? -peerID : 0;\r\n const isBroadcast = isChannel && appChatsManager_1.default.isBroadcast(channelID);\r\n const mid = appMessagesIDsManager_1.default.getFullMessageID(apiMessage.id, channelID);\r\n apiMessage.mid = mid;\r\n if (apiMessage.grouped_id) {\r\n const storage = (_a = this.groupedMessagesStorage[apiMessage.grouped_id]) !== null && _a !== void 0 ? _a : (this.groupedMessagesStorage[apiMessage.grouped_id] = {});\r\n storage[mid] = apiMessage;\r\n }\r\n const dialog = this.getDialogByPeerID(peerID)[0];\r\n if (dialog && mid > 0) {\r\n apiMessage.pFlags.unread = mid > dialog[apiMessage.pFlags.out\r\n ? 'read_outbox_max_id'\r\n : 'read_inbox_max_id'];\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 const 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 const savedFromPeerID = appPeersManager_1.default.getPeerID(fwdHeader.saved_from_peer);\r\n const 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 const 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 'messageMediaPoll':\r\n apiMessage.media.poll = appPollsManager_1.default.savePoll(apiMessage.media.poll, apiMessage.media.results);\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 let migrateFrom;\r\n let 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 apiMessage.rReply = this.getRichReplyText(apiMessage);\r\n if (apiMessage.message && apiMessage.message.length) {\r\n const myEntities = richtextprocessor_1.RichTextProcessor.parseEntities(apiMessage.message);\r\n const 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 getRichReplyText(message, text = message.message) {\r\n let messageText = '';\r\n if (message.media) {\r\n if (message.grouped_id) {\r\n messageText += '<i>Album' + (message.message ? ', ' : '') + '</i>';\r\n }\r\n else\r\n switch (message.media._) {\r\n case 'messageMediaPhoto':\r\n messageText += '<i>Photo' + (message.message ? ', ' : '') + '</i>';\r\n break;\r\n case 'messageMediaGeo':\r\n messageText += '<i>Geolocation</i>';\r\n break;\r\n case 'messageMediaPoll':\r\n messageText += '<i>' + message.media.poll.rReply + '</i>';\r\n break;\r\n case 'messageMediaContact':\r\n messageText += '<i>Contact</i>';\r\n break;\r\n case 'messageMediaDocument':\r\n let document = message.media.document;\r\n if (document.type == 'video') {\r\n messageText = '<i>Video' + (message.message ? ', ' : '') + '</i>';\r\n }\r\n else if (document.type == 'voice') {\r\n messageText = '<i>Voice message</i>';\r\n }\r\n else if (document.type == 'gif') {\r\n messageText = '<i>GIF' + (message.message ? ', ' : '') + '</i>';\r\n }\r\n else if (document.type == 'round') {\r\n messageText = '<i>Video message' + (message.message ? ', ' : '') + '</i>';\r\n }\r\n else if (document.type == 'sticker') {\r\n messageText = (document.stickerEmoji || '') + '<i>Sticker</i>';\r\n }\r\n else {\r\n messageText = '<i>' + document.file_name + '</i>';\r\n }\r\n break;\r\n default:\r\n ///////console.warn('Got unknown message.media type!', message);\r\n break;\r\n }\r\n }\r\n if (message.action) {\r\n let action = message.action;\r\n let str = '';\r\n if (action.message) {\r\n str = richtextprocessor_1.RichTextProcessor.wrapRichText(action.message, { noLinebreaks: true });\r\n }\r\n else {\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) d.push((duration / 3600 | 0) + ' h');\r\n suffix = ' (' + d.reverse().join(' ') + ')';\r\n }\r\n }\r\n // @ts-ignore\r\n str = utils_1.langPack[_] + suffix;\r\n }\r\n console.log('message action:', action);\r\n messageText = '<i>' + str + '</i>';\r\n }\r\n let messageWrapped = '';\r\n if (text) {\r\n let entities = richtextprocessor_1.RichTextProcessor.parseEntities(text.replace(/\\n/g, ' '), { noLinebreakers: true });\r\n messageWrapped = richtextprocessor_1.RichTextProcessor.wrapRichText(text, {\r\n noLinebreakers: true,\r\n entities: entities,\r\n noTextFormat: true\r\n });\r\n }\r\n return messageText + messageWrapped;\r\n }\r\n editPeerFolders(peerIDs, folderID) {\r\n mtprotoworker_1.default.invokeApi('folders.editPeerFolders', {\r\n folder_peers: peerIDs.map(peerID => {\r\n return {\r\n _: 'inputFolderPeer',\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID),\r\n folder_id: folderID\r\n };\r\n })\r\n }).then(updates => {\r\n console.log('editPeerFolders updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates); // WARNING! возможно тут нужно добавлять channelID, и вызывать апдейт для каждого канала отдельно\r\n });\r\n }\r\n toggleDialogPin(peerID) {\r\n var _a;\r\n let dialog = this.getDialogByPeerID(peerID)[0];\r\n if (!dialog)\r\n return Promise.reject();\r\n let peer = {\r\n _: 'inputDialogPeer',\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID)\r\n };\r\n let flags = ((_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.pinned) ? 0 : 1;\r\n return mtprotoworker_1.default.invokeApi('messages.toggleDialogPin', {\r\n flags,\r\n peer\r\n }).then(bool => {\r\n this.handleUpdate({\r\n _: 'updateDialogPinned',\r\n peer: peer,\r\n pFlags: {\r\n pinned: flags\r\n }\r\n });\r\n });\r\n }\r\n markDialogUnread(peerID) {\r\n var _a;\r\n let dialog = this.getDialogByPeerID(peerID)[0];\r\n if (!dialog)\r\n return Promise.reject();\r\n let peer = {\r\n _: 'inputDialogPeer',\r\n peer: appPeersManager_1.default.getInputPeerByID(peerID)\r\n };\r\n let flags = ((_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.unread_mark) ? 0 : 1;\r\n return mtprotoworker_1.default.invokeApi('messages.markDialogUnread', {\r\n flags,\r\n peer\r\n }).then(bool => {\r\n this.handleUpdate({\r\n _: 'updateDialogUnreadMark',\r\n peer: peer,\r\n pFlags: {\r\n unread: flags\r\n }\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[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: migrateFrom, dialog: foundDialog[0] });\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 const message = this.messagesStorage[messageID];\r\n if (!message || !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 || !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 const updatedDialogs = {};\r\n let hasUpdated = false;\r\n dialogsResult.dialogs.forEach((dialog) => {\r\n const peerID = appPeersManager_1.default.getPeerID(dialog.peer);\r\n let topMessage = dialog.top_message;\r\n const 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 const 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 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 const foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog.length) {\r\n this.dialogsStorage[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID, dialog: foundDialog[0] });\r\n }\r\n }\r\n if (this.newUpdatesAfterReloadToHandle[peerID] !== undefined) {\r\n for (const i in this.newUpdatesAfterReloadToHandle[peerID]) {\r\n const 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 saveConversation(dialog) {\r\n const peerID = appPeersManager_1.default.getPeerID(dialog.peer);\r\n if (!peerID) {\r\n return false;\r\n }\r\n const channelID = appPeersManager_1.default.isChannel(peerID) ? -peerID : 0;\r\n const peerText = appPeersManager_1.default.getPeerSearchText(peerID);\r\n searchIndexManager_1.default.indexObject(peerID, peerText, this.dialogsIndex);\r\n let mid, message;\r\n if (dialog.top_message) {\r\n mid = appMessagesIDsManager_1.default.getFullMessageID(dialog.top_message, channelID);\r\n message = this.getMessage(mid);\r\n }\r\n else {\r\n mid = this.tempID--;\r\n 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 if (!channelID && peerID < 0) {\r\n const chat = appChatsManager_1.default.getChat(-peerID);\r\n if (chat && chat.migrated_to && chat.pFlags.deactivated) {\r\n const 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 if (!dialog.hasOwnProperty('folder_id'))\r\n dialog.folder_id = 0;\r\n dialog.peerID = peerID;\r\n this.generateIndexForDialog(dialog);\r\n this.pushDialogToStorage(dialog, message.date);\r\n // Because we saved message without dialog present\r\n if (message.mid > 0) {\r\n if (message.mid > dialog[message.pFlags.out ? 'read_outbox_max_id' : 'read_inbox_max_id'])\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 */) { // warning\r\n const 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 if (channelID && dialog.pts) {\r\n apiUpdatesManager_1.default.addChannelState(channelID, dialog.pts);\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 && utils_1.deepEqual(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: APITIMEOUT,\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: APITIMEOUT,\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.hasOwnProperty('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 if (pinnedIndex > this.pinnedIndex) {\r\n this.pinnedIndex = 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 let newMaxSeenID = 0;\r\n for (let peerID in this.newDialogsToHandle) {\r\n let dialog = this.newDialogsToHandle[peerID];\r\n if ('reload' in dialog) {\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 //console.log('after order:', this.dialogsStorage[0].map(d => d.peerID));\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 scheduleHandleNewDialogs() {\r\n if (!this.newDialogsHandlePromise) {\r\n this.newDialogsHandlePromise = window.setTimeout(this.handleNewDialogs.bind(this), 0);\r\n }\r\n }\r\n deleteMessages(messageIDs, revoke) {\r\n const splitted = appMessagesIDsManager_1.default.splitMessageIDsByChannels(messageIDs);\r\n const promises = [];\r\n for (const channelIDStr in splitted.msgIDs) {\r\n const channelID = +channelIDStr;\r\n let msgIDs = splitted.msgIDs[channelID];\r\n let promise;\r\n if (channelID > 0) {\r\n const channel = appChatsManager_1.default.getChat(channelID);\r\n if (!channel.pFlags.creator && !(channel.pFlags.editor && channel.pFlags.megagroup)) {\r\n const goodMsgIDs = [];\r\n if (channel.pFlags.editor || channel.pFlags.megagroup) {\r\n msgIDs.forEach((msgID, i) => {\r\n const message = this.getMessage(splitted.mids[channelID][i]);\r\n if (message.pFlags.out) {\r\n goodMsgIDs.push(msgID);\r\n }\r\n });\r\n }\r\n if (!goodMsgIDs.length) {\r\n return;\r\n }\r\n msgIDs = goodMsgIDs;\r\n }\r\n promise = mtprotoworker_1.default.invokeApi('channels.deleteMessages', {\r\n channel: appChatsManager_1.default.getChannelInput(channelID),\r\n id: msgIDs\r\n }).then((affectedMessages) => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateDeleteChannelMessages',\r\n channel_id: channelID,\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 else {\r\n let flags = 0;\r\n if (revoke) {\r\n flags |= 1;\r\n }\r\n promise = mtprotoworker_1.default.invokeApi('messages.deleteMessages', {\r\n flags: flags,\r\n id: msgIDs\r\n }).then((affectedMessages) => {\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateDeleteMessages',\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 promises.push(promise);\r\n }\r\n return Promise.all(promises);\r\n }\r\n readHistory(peerID, maxID = 0, readLength = 0) {\r\n // console.trace('start read')\r\n const isChannel = appPeersManager_1.default.isChannel(peerID);\r\n const historyStorage = this.historiesStorage[peerID];\r\n const 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 foundUnread = !!historyStorage.history.find(messageID => {\r\n const message = this.messagesStorage[messageID];\r\n return message && !message.pFlags.out && message.pFlags.unread;\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 let 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 let index = -1;\r\n if (maxID != 0 && historyStorage.history.length) {\r\n index = historyStorage.history.indexOf(maxID);\r\n }\r\n let readedLength = 1;\r\n if (historyStorage.history.length && maxID) {\r\n for (let i = index == -1 ? 0 : index, length = historyStorage.history.length; i < length; i++) {\r\n const messageID = historyStorage.history[i];\r\n if (messageID > maxID)\r\n continue;\r\n const message = this.messagesStorage[messageID];\r\n if (message && !message.pFlags.out) {\r\n message.pFlags.unread = false;\r\n readedLength++;\r\n //NotificationsManager.cancel('msg' + messageID); // warning\r\n }\r\n }\r\n }\r\n if (foundDialog) {\r\n // console.log('done read history', peerID)\r\n if (historyStorage.history.length) {\r\n ////////console.warn('readPromise:', index, historyStorage.history[index != -1 ? index : 0]);\r\n foundDialog.read_inbox_max_id = maxID;\r\n }\r\n if (foundDialog.read_inbox_max_id == foundDialog.top_message || foundDialog.read_inbox_max_id == foundDialog.read_outbox_max_id) {\r\n foundDialog.unread_count = 0;\r\n }\r\n else {\r\n foundDialog.unread_count = Math.max(foundDialog.unread_count - (readLength || readedLength), 0);\r\n }\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 return true;\r\n }\r\n return false;\r\n }).finally(() => {\r\n delete historyStorage.readPromise;\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 //console.log('AMM updateMessageID:', update, pendingData);\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 this.scheduleHandleNewDialogs();\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 this.scheduleHandleNewDialogs();\r\n break;\r\n }\r\n case 'updateDialogUnreadMark': {\r\n console.log('updateDialogUnreadMark', update);\r\n let peerID = appPeersManager_1.default.getPeerID(update.peer.peer);\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n this.scheduleHandleNewDialogs();\r\n }\r\n else {\r\n let dialog = foundDialog[0];\r\n if (!update.pFlags.unread) {\r\n delete dialog.pFlags.unread_mark;\r\n }\r\n else {\r\n dialog.pFlags.unread_mark = true;\r\n }\r\n utils_1.$rootScope.$broadcast('dialogs_multiupdate', { peerID: dialog });\r\n }\r\n break;\r\n }\r\n case 'updateFolderPeers': {\r\n console.log('updateFolderPeers', update);\r\n let peers = update.folder_peers;\r\n this.scheduleHandleNewDialogs();\r\n peers.forEach((folderPeer) => {\r\n let { folder_id, peer } = folderPeer;\r\n let peerID = appPeersManager_1.default.getPeerID(peer);\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n }\r\n else {\r\n let dialog = foundDialog[0];\r\n this.newDialogsToHandle[peerID] = dialog;\r\n this.dialogsStorage[dialog.folder_id].splice(foundDialog[1], 1);\r\n dialog.folder_id = folder_id;\r\n this.generateIndexForDialog(dialog);\r\n this.pushDialogToStorage(dialog); // need for simultaneously updatePinnedDialogs\r\n }\r\n });\r\n break;\r\n }\r\n case 'updateDialogPinned': {\r\n console.log('updateDialogPinned', update);\r\n let peerID = appPeersManager_1.default.getPeerID(update.peer.peer);\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n this.scheduleHandleNewDialogs();\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n break;\r\n }\r\n else {\r\n let dialog = foundDialog[0];\r\n this.newDialogsToHandle[peerID] = dialog;\r\n if (!update.pFlags.pinned) {\r\n delete dialog.pFlags.pinned;\r\n delete dialog.pinnedIndex;\r\n }\r\n else { // means set\r\n dialog.pFlags.pinned = true;\r\n }\r\n this.generateIndexForDialog(dialog);\r\n }\r\n break;\r\n }\r\n case 'updatePinnedDialogs': {\r\n console.log('updatePinnedDialogs', update);\r\n let 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[0].forEach((dialog) => {\r\n let peerID = dialog.peerID;\r\n if (dialog.pFlags.pinned && !newPinned[peerID]) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n this.scheduleHandleNewDialogs();\r\n }\r\n });\r\n });\r\n break;\r\n }\r\n //console.log('before order:', this.dialogsStorage[0].map(d => d.peerID));\r\n this.pinnedIndex = 0;\r\n let willHandle = false;\r\n update.order.reverse(); // index must be higher\r\n update.order.forEach((peer) => {\r\n let peerID = appPeersManager_1.default.getPeerID(peer.peer);\r\n newPinned[peerID] = true;\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (!foundDialog.length) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n willHandle = true;\r\n return;\r\n }\r\n let dialog = foundDialog[0];\r\n delete dialog.pinnedIndex;\r\n dialog.pFlags.pinned = true;\r\n this.generateIndexForDialog(dialog);\r\n this.newDialogsToHandle[peerID] = dialog;\r\n willHandle = true;\r\n });\r\n this.dialogsStorage[0].forEach(dialog => {\r\n let peerID = dialog.peerID;\r\n if (dialog.pFlags.pinned && !newPinned[peerID]) {\r\n this.newDialogsToHandle[peerID] = { reload: true };\r\n willHandle = true;\r\n }\r\n });\r\n if (willHandle) {\r\n this.scheduleHandleNewDialogs();\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) {\r\n continue;\r\n }\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 (!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 foundDialog[0][isOut ? 'read_outbox_max_id' : 'read_inbox_max_id'] = 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 let historiesUpdated = {};\r\n let channelID = update.channel_id;\r\n for (let i = 0; i < update.messages.length; i++) {\r\n let messageID = appMessagesIDsManager_1.default.getFullMessageID(update.messages[i], channelID);\r\n let message = this.messagesStorage[messageID];\r\n if (message) {\r\n let peerID = this.getMessagePeer(message);\r\n let 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 }\r\n history.count++;\r\n history.msgs[messageID] = true;\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 let peerMessagesToHandle = this.newMessagesToHandle[peerID];\r\n if (peerMessagesToHandle && peerMessagesToHandle.length) {\r\n let 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 let historyStorage = this.historiesStorage[peerID];\r\n if (historyStorage !== undefined) {\r\n let newHistory = [];\r\n let newPending = [];\r\n for (let 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 (let 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 let 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[foundDialog[0].folder_id].splice(foundDialog[1], 1);\r\n utils_1.$rootScope.$broadcast('dialog_drop', { peerID: peerID, dialog: foundDialog[0] });\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n case 'updateChannelReload': {\r\n let channelID = update.channel_id;\r\n let peerID = -channelID;\r\n let foundDialog = this.getDialogByPeerID(peerID);\r\n if (foundDialog[0]) {\r\n this.dialogsStorage[foundDialog[0].folder_id].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 let views = update.views;\r\n let mid = appMessagesIDsManager_1.default.getFullMessageID(update.id, update.channel_id);\r\n let 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 console.log('updateServiceNotification', update);\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 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, backLimit) {\r\n var _a;\r\n if (this.migratedFromTo[peerID]) {\r\n peerID = this.migratedFromTo[peerID];\r\n }\r\n const historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = { count: null, history: [], pending: [] });\r\n const unreadOffset = 0;\r\n const unreadSkip = false;\r\n let offset = 0;\r\n let offsetNotFound = false;\r\n let isMigrated = false;\r\n let 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 (maxID > 0) {\r\n offsetNotFound = true;\r\n for (; 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)) {\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;\r\n }\r\n let 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({\r\n count: historyStorage.count,\r\n history: history,\r\n unreadOffset: unreadOffset,\r\n unreadSkip: unreadSkip\r\n });\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 let 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({\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({\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 const 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 if (!maxID && historyResult.messages.length) {\r\n maxID = historyResult.messages[0].mid + 1;\r\n }\r\n let offset = 0;\r\n if (maxID > 0) {\r\n for (; offset < historyStorage.history.length; offset++) {\r\n if (maxID > historyStorage.history[offset]) {\r\n break;\r\n }\r\n }\r\n }\r\n const 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 const totalCount = historyStorage.history.length;\r\n fullLimit -= (totalCount - wasTotalCount);\r\n const migratedNextPeer = this.migratedFromTo[peerID];\r\n const migratedPrevPeer = this.migratedToFrom[peerID];\r\n const 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(result) {\r\n if (result.unreadOffset) {\r\n for (let i = result.history.length - 1; i >= 0; i--) {\r\n const 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 }\r\n requestHistory(peerID, maxID, limit, offset = 0) {\r\n const 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: APITIMEOUT,\r\n noErrorBox: true\r\n }).then((historyResult) => {\r\n console.log('requestHistory result:', historyResult, maxID, limit, offset);\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 let 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 // will load more history if last message is album grouped (because it can be not last item)\r\n const historyStorage = this.historiesStorage[peerID];\r\n // historyResult.messages: desc sorted\r\n if (length && historyResult.messages[length - 1].grouped_id && (historyStorage.history.length + historyResult.messages.length) < historyResult.count) {\r\n return this.requestHistory(peerID, historyResult.messages[length - 1].mid, 10, 0).then((_historyResult) => {\r\n return historyResult;\r\n });\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 let 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 throw error;\r\n });\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 utils_1.$rootScope.$broadcast('messages_downloaded', [msgID]);\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), 10);\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": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"name": "./src/lib/appManagers/appChatsManager.ts",
"index": 30,
"index2": 33,
"size": 15461,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "9:42-70"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "18:42-70"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPeersManager.ts",
"module": "./src/lib/appManagers/appPeersManager.ts",
"moduleName": "./src/lib/appManagers/appPeersManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "7:42-70"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "22:42-70"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "18:42-70"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "13:42-70"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "26:42-70"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appChatsManager",
"loc": "9:42-82"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appChatsManager",
"loc": "20:42-87"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appChatsManager",
"loc": "38:42-70"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appChatsManager",
"loc": "15:42-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppChatsManager = void 0;\r\nconst utils_1 = require(\"../utils\");\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\r\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\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 this.megagroupOnlines = {};\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 let oldChat = this.chats[apiChat.id];\r\n let titleWords = searchIndexManager_1.default.cleanSearchText(apiChat.title || '', false).split(' ');\r\n let firstWord = titleWords.shift();\r\n let lastWord = titleWords.pop();\r\n apiChat.initials = firstWord.charAt(0) + (lastWord ? lastWord.charAt(0) : '');\r\n if (apiChat.pFlags === undefined) {\r\n apiChat.pFlags = {};\r\n }\r\n if (apiChat.pFlags.min) {\r\n if (oldChat !== undefined) {\r\n return;\r\n }\r\n }\r\n if (apiChat._ == 'channel' &&\r\n apiChat.participants_count === undefined &&\r\n oldChat !== undefined &&\r\n oldChat.participants_count) {\r\n apiChat.participants_count = oldChat.participants_count;\r\n }\r\n if (apiChat.username) {\r\n let searchUsername = searchIndexManager_1.default.cleanUsername(apiChat.username);\r\n this.usernames[searchUsername] = apiChat.id;\r\n }\r\n let changedPhoto = false;\r\n if (oldChat === undefined) {\r\n oldChat = this.chats[apiChat.id] = apiChat;\r\n }\r\n else {\r\n let oldPhoto = oldChat.photo && oldChat.photo.photo_small;\r\n let newPhoto = apiChat.photo && apiChat.photo.photo_small;\r\n if (JSON.stringify(oldPhoto) !== JSON.stringify(newPhoto)) {\r\n changedPhoto = true;\r\n }\r\n utils_1.safeReplaceObject(oldChat, 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 if (changedPhoto) {\r\n utils_1.$rootScope.$broadcast('avatar_update', -apiChat.id);\r\n }\r\n }\r\n getChat(id) {\r\n if (id < 0)\r\n id = -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 var _a, _b;\r\n const chat = this.getChat(id);\r\n if (!chat)\r\n return false;\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 let myFlags = (_b = (_a = (chat.admin_rights || chat.banned_rights || chat.default_banned_rights)) === null || _a === void 0 ? void 0 : _a.pFlags) !== null && _b !== void 0 ? _b : {};\r\n switch (action) {\r\n // good\r\n case 'send': {\r\n if (chat._ == 'channel' &&\r\n !chat.pFlags.megagroup &&\r\n !myFlags.post_messages) {\r\n return false;\r\n }\r\n break;\r\n }\r\n // good\r\n case 'deleteRevoke': {\r\n if (chat._ == 'channel') {\r\n return !!myFlags.delete_messages;\r\n }\r\n else if (!chat.pFlags.admin) {\r\n return false;\r\n }\r\n break;\r\n }\r\n // good\r\n case 'pin': {\r\n if (chat._ == 'channel') {\r\n return chat.admin_rights ? !!myFlags.pin_messages || !!myFlags.post_messages : !myFlags.pin_messages;\r\n }\r\n else {\r\n if (myFlags.pin_messages && !chat.pFlags.admin) {\r\n return false;\r\n }\r\n }\r\n break;\r\n }\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 (!(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 }\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 let chat = this.chats[id];\r\n if (chat && (chat._ == 'channel' || chat._ == 'channelForbidden') || 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 let 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 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 getChatInputPeer(id) {\r\n return {\r\n _: 'inputPeerChat',\r\n chat_id: id\r\n };\r\n }\r\n getChannelInputPeer(id) {\r\n if (!id) {\r\n return { _: 'inputPeerEmpty' };\r\n }\r\n return {\r\n _: 'inputPeerChannel',\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 let chat = this.chats[id];\r\n return utils_1.isObject(chat) && (allowMin || !chat.pFlags.min);\r\n }\r\n getChatPhoto(id) {\r\n let 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 let 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 getChatMembersString(id) {\r\n var _a;\r\n const chat = this.getChat(id);\r\n const isChannel = this.isBroadcast(id);\r\n const participants_count = chat.participants_count || ((_a = chat.participants) === null || _a === void 0 ? void 0 : _a.participants.length) || 0;\r\n return utils_1.numberWithCommas(participants_count) + ' ' + (isChannel ? 'subscribers' : 'members');\r\n }\r\n wrapForFull(id, fullChat) {\r\n let chatFull = utils_1.copy(fullChat);\r\n let 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 let chat = this.getChat(id);\r\n let myID = appUsersManager_1.default.getSelf().id;\r\n if (this.isChannel(id)) {\r\n let isAdmin = chat.pFlags.creator;\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 let 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 createChannel(title, about) {\r\n return mtprotoworker_1.default.invokeApi('channels.createChannel', {\r\n flags: 1,\r\n broadcast: true,\r\n title: title,\r\n about: about\r\n }).then((updates) => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n return updates.chats[0].id;\r\n });\r\n }\r\n inviteToChannel(id, userIDs) {\r\n let input = this.getChannelInput(id);\r\n let usersInputs = userIDs.map(u => appUsersManager_1.default.getUserInput(u));\r\n return mtprotoworker_1.default.invokeApi('channels.inviteToChannel', {\r\n channel: input,\r\n users: usersInputs\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n createChat(title, userIDs) {\r\n return mtprotoworker_1.default.invokeApi('messages.createChat', {\r\n users: userIDs.map(u => appUsersManager_1.default.getUserInput(u)),\r\n title: title\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n return updates.chats[0].id;\r\n });\r\n }\r\n editPhoto(id, inputFile) {\r\n let isChannel = this.isChannel(id);\r\n let inputChatPhoto = {\r\n _: 'inputChatUploadedPhoto',\r\n file: inputFile\r\n };\r\n if (isChannel) {\r\n return mtprotoworker_1.default.invokeApi('channels.editPhoto', {\r\n channel: this.getChannelInputPeer(id),\r\n photo: inputChatPhoto\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n else {\r\n return mtprotoworker_1.default.invokeApi('messages.editChatPhoto', {\r\n chat_id: id,\r\n photo: inputChatPhoto\r\n }).then(updates => {\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n }\r\n getOnlines(id) {\r\n var _a, _b;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.isMegagroup(id)) {\r\n let timestamp = Date.now() / 1000 | 0;\r\n let cached = (_a = this.megagroupOnlines[id]) !== null && _a !== void 0 ? _a : (this.megagroupOnlines[id] = { timestamp: 0, onlines: 1 });\r\n if ((timestamp - cached.timestamp) < 60) {\r\n return cached.onlines;\r\n }\r\n let res = yield mtprotoworker_1.default.invokeApi('messages.getOnlines', {\r\n peer: this.getChannelInputPeer(id)\r\n });\r\n let onlines = (_b = res.onlines) !== null && _b !== void 0 ? _b : 1;\r\n cached.timestamp = timestamp;\r\n cached.onlines = onlines;\r\n return onlines;\r\n }\r\n else if (this.isBroadcast(id)) {\r\n return 1;\r\n }\r\n let chatInfo = appProfileManager_1.default.getChatFull(id);\r\n if (chatInfo._ == 'chatFull' && chatInfo.participants && chatInfo.participants.participants) {\r\n let participants = chatInfo.participants.participants;\r\n return participants.reduce((acc, participant) => {\r\n let user = appUsersManager_1.default.getUser(participant.user_id);\r\n if (user && user.status && user.status._ == 'userStatusOnline') {\r\n return acc + 1;\r\n }\r\n return acc;\r\n }, 0);\r\n }\r\n else {\r\n return 1;\r\n }\r\n });\r\n }\r\n}\r\nexports.AppChatsManager = AppChatsManager;\r\nexports.default = new AppChatsManager();\r\n"
},
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPeersManager.ts",
"name": "./src/lib/appManagers/appPeersManager.ts",
"index": 32,
"index2": 23,
"size": 6887,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "26:42-70"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "12:42-70"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "22:42-70"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"module": "./src/lib/appManagers/apiUpdatesManager.ts",
"moduleName": "./src/lib/appManagers/apiUpdatesManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "11:42-70"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "18:42-70"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "40:42-70"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "16:42-70"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appPeersManager",
"loc": "17:42-82"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "./appPeersManager",
"loc": "8:42-70"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appPeersManager",
"loc": "11:42-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 let 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, onlyFirstName = 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 if (onlyFirstName) {\r\n title = title.split(' ')[0];\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 let 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 else if (!peerString)\r\n return 0;\r\n let isUser = peerString.charAt(0) == 'u';\r\n let 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 getInputPeer: (peerString) => {\r\n var firstChar = peerString.charAt(0);\r\n var peerParams = peerString.substr(1).split('_');\r\n let id = +peerParams[0];\r\n if (firstChar == 'u') {\r\n appUsersManager_1.default.saveUserAccess(id, peerParams[1]);\r\n return {\r\n _: 'inputPeerUser',\r\n user_id: id,\r\n access_hash: peerParams[1]\r\n };\r\n }\r\n else if (firstChar == 'c' || firstChar == 's') {\r\n appChatsManager_1.default.saveChannelAccess(id, peerParams[1]);\r\n if (firstChar == 's') {\r\n appChatsManager_1.default.saveIsMegagroup(id);\r\n }\r\n return {\r\n _: 'inputPeerChannel',\r\n channel_id: id,\r\n access_hash: peerParams[1] || 0\r\n };\r\n }\r\n else {\r\n return {\r\n _: 'inputPeerChat',\r\n chat_id: id\r\n };\r\n }\r\n },\r\n getInputPeerByID: (peerID) => {\r\n if (!peerID) {\r\n return { _: 'inputPeerEmpty' };\r\n }\r\n if (peerID < 0) {\r\n let chatID = -peerID;\r\n if (!appChatsManager_1.default.isChannel(chatID)) {\r\n return appChatsManager_1.default.getChatInputPeer(chatID);\r\n }\r\n else {\r\n return appChatsManager_1.default.getChannelInputPeer(chatID);\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 let 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 let 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": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"name": "./src/lib/appManagers/appPhotosManager.ts",
"index": 35,
"index2": 30,
"size": 16352,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "24:43-72"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "16:43-72"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "19:43-72"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appPhotosManager",
"loc": "35:43-89"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "39:43-72"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "17:43-72"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appPhotosManager",
"loc": "12:43-84"
},
{
"moduleId": 41,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"module": "./src/lib/appManagers/appWebPagesManager.ts",
"moduleName": "./src/lib/appManagers/appWebPagesManager.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "7:43-72"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appPhotosManager",
"loc": "23:43-89"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appPhotosManager",
"loc": "35:43-72"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppPhotosManager = void 0;\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\nlet AppPhotosManager = /** @class */ (() => {\r\n class AppPhotosManager {\r\n constructor() {\r\n this.photos = {};\r\n this.documentThumbsCache = {};\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 sizes = (photo.sizes || photo.thumbs);\r\n if (sizes) {\r\n for (let photoSize of sizes) {\r\n if (!photoSize.w || !photoSize.h)\r\n continue;\r\n bestPhotoSize = photoSize;\r\n let { w, h } = utils_1.calcImageInBox(photoSize.w, photoSize.h, width, height);\r\n if (w == width || h == height) {\r\n break;\r\n }\r\n }\r\n }\r\n /* let bestPhotoSize: MTPhotoSize = {_: 'photoSizeEmpty'};\r\n let bestDiff = 0xFFFFFF;\r\n \r\n //console.log('choosePhotoSize', photo);\r\n \r\n let sizes = photo.sizes || photo.thumbs;\r\n if(!sizes) return bestPhotoSize;\r\n \r\n sizes.forEach((photoSize: typeof bestPhotoSize) => {\r\n if(!photoSize.w || !photoSize.h) return;\r\n \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 \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 getPreviewURLFromBytes(bytes, isSticker = 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 instanceof Uint8Array ? bytes : new Uint8Array(bytes);\r\n }\r\n //console.log('getPreviewURLFromBytes', bytes, arr, div, isSticker);\r\n /* let reader = new FileReader();\r\n reader.onloadend = () => {\r\n let src = reader.result;\r\n };\r\n reader.readAsDataURL(blob); */\r\n let blob = new Blob([arr], { type: \"image/jpeg\" });\r\n return URL.createObjectURL(blob);\r\n }\r\n getPreviewURLFromThumb(thumb, isSticker = false) {\r\n var _a;\r\n return (_a = thumb.url) !== null && _a !== void 0 ? _a : (thumb.url = this.getPreviewURLFromBytes(thumb.bytes, isSticker));\r\n }\r\n setAttachmentPreview(bytes, element, isSticker = false, background = false) {\r\n let url = this.getPreviewURLFromBytes(bytes, isSticker);\r\n if (background) {\r\n let img = new Image();\r\n img.src = url;\r\n img.addEventListener('load', () => {\r\n element.style.backgroundImage = 'url(' + url + ')';\r\n });\r\n return element;\r\n }\r\n else {\r\n if (element instanceof HTMLImageElement) {\r\n element.src = url;\r\n return element;\r\n }\r\n else {\r\n let img = new Image();\r\n /* img.style.width = '100%';\r\n img.style.height = '100%'; */\r\n img.src = url;\r\n element.append(img);\r\n return img;\r\n }\r\n }\r\n }\r\n setAttachmentSize(photoID, element, boxWidth = 480, boxHeight = 480, 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 && 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 SVGForeignObjectElement) {\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 }\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 var _a;\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 let isDocument = photo._ == 'document';\r\n let cacheContext = isDocument ? ((_a = this.documentThumbsCache[photo.id]) !== null && _a !== void 0 ? _a : (this.documentThumbsCache[photo.id] = { downloaded: -1, url: '' })) : photo;\r\n if (cacheContext.downloaded >= photoSize.size && cacheContext.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 _: isDocument ? '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 promise.then(blob => {\r\n if (!cacheContext.downloaded || cacheContext.downloaded < blob.size) {\r\n cacheContext.downloaded = blob.size;\r\n cacheContext.url = URL.createObjectURL(blob);\r\n //console.log('wrote photo:', photo, photoSize, cacheContext, blob);\r\n }\r\n });\r\n return promise;\r\n }\r\n getDocumentCachedThumb(docID) {\r\n return this.documentThumbsCache[docID];\r\n }\r\n getPhoto(photoID) {\r\n return utils_1.isObject(photoID) ? photoID : this.photos[photoID];\r\n }\r\n getInputByID(photoID) {\r\n let photo = this.getPhoto(photoID);\r\n return {\r\n _: 'inputMediaPhoto',\r\n flags: 0,\r\n id: {\r\n _: 'inputPhoto',\r\n id: photo.id,\r\n access_hash: photo.access_hash,\r\n file_reference: photo.file_reference\r\n },\r\n ttl_seconds: 0\r\n };\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\n AppPhotosManager.jf = new Uint8Array(bin_utils_1.bytesFromHex('ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e19282321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2d2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc00011080000000003012200021101031101ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b5100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090a0bffc400b51100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00'));\r\n AppPhotosManager.Df = bin_utils_1.bytesFromHex('ffd9');\r\n return AppPhotosManager;\r\n})();\r\nexports.AppPhotosManager = AppPhotosManager;\r\nexports.default = new AppPhotosManager();\r\n"
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"name": "./src/components/scrollable_new.ts",
"index": 13,
"index2": 15,
"size": 15823,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/scrollable_new",
"loc": "29:41-83"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../../components/scrollable_new",
"loc": "24:41-83"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../components/scrollable_new",
"loc": "7:41-80"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../../components/scrollable_new",
"loc": "36:41-83"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "./scrollable_new",
"loc": "16:41-68"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/scrollable_new",
"loc": "34:41-83"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "./scrollable_new",
"loc": "8:41-68"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "./scrollable_new",
"loc": "26:41-68"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./scrollable_new",
"loc": "19:41-68"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 polyfill_1 = require(\"../lib/polyfill\");\r\nconst smoothscroll_1 = __importDefault(require(\"../lib/smoothscroll\"));\r\nwindow.__forceSmoothScrollPolyfill__ = true;\r\nsmoothscroll_1.default.polyfill();\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\n/*\r\nArray.from($0.querySelectorAll('.bubble__container')).forEach(_el => {\r\n //_el.style.display = '';\r\n //return;\r\n\r\n let el = _el.parentElement;\r\n let height = el.scrollHeight;\r\n let width = el.scrollWidth;\r\n el.style.width = width + 'px';\r\n el.style.height = height + 'px';\r\n _el.style.display = 'none';\r\n});\r\n*/\r\n/* const scrollables: Map<HTMLElement, Scrollable> = new Map();\r\nconst scrollsIntersector = new IntersectionObserver(entries => {\r\n for(let entry of entries) {\r\n const scrollable = scrollables.get(entry.target as HTMLElement);\r\n\r\n if(entry.isIntersecting) {\r\n scrollable.isVisible = true;\r\n } else {\r\n scrollable.isVisible = false;\r\n\r\n if(!isInDOM(entry.target)) {\r\n scrollsIntersector.unobserve(scrollable.container);\r\n scrollables.delete(scrollable.container);\r\n }\r\n }\r\n }\r\n}); */\r\nclass Scrollable {\r\n constructor(el, axis = 'y', logPrefix = '', appendTo = el, onScrollOffset = 300, splitCount = 15) {\r\n this.el = el;\r\n this.appendTo = appendTo;\r\n this.onScrollOffset = onScrollOffset;\r\n this.splitCount = splitCount;\r\n this.onScrolledTop = null;\r\n this.onScrolledBottom = null;\r\n this.onScrollMeasure = null;\r\n this.lastScrollTop = 0;\r\n this.disableHoverTimeout = 0;\r\n this.debug = false;\r\n this.virtualTempIDTop = 0;\r\n this.virtualTempIDBottom = 0;\r\n this.lastTopID = 0;\r\n this.lastBottomID = 0;\r\n this.lastScrollDirection = 0; // true = bottom\r\n this.onScrolledTopFired = false;\r\n this.onScrolledBottomFired = false;\r\n this.scrollLocked = 0;\r\n this.isVisible = false;\r\n this.container = document.createElement('div');\r\n this.container.classList.add('scrollable');\r\n this.visible = new Set();\r\n this.observer = new IntersectionObserver(entries => {\r\n let filtered = entries.filter(entry => entry.isIntersecting);\r\n //return;\r\n //this.log('entries:', entries);\r\n entries.forEach(entry => {\r\n let target = entry.target;\r\n if (entry.isIntersecting) {\r\n this.setVisible(target);\r\n this.debug && this.log('intersection entry:', entry, this.lastTopID, this.lastBottomID);\r\n }\r\n else {\r\n let id = +target.dataset.virtual;\r\n let isTop = entry.boundingClientRect.top < 0;\r\n if (isTop) {\r\n this.lastTopID = id + 1;\r\n }\r\n else {\r\n this.lastBottomID = id - 1;\r\n }\r\n //this.setHidden(target);\r\n //this.log('intersection entry setHidden:', entry);\r\n }\r\n //this.debug && this.log('intersection entry:', entry, isTop, isBottom, this.lastTopID, this.lastBottomID);\r\n });\r\n if (!filtered.length || this.lastScrollDirection === 0) {\r\n return;\r\n }\r\n if (this.lastScrollDirection === 1) { // bottom\r\n let target = filtered[filtered.length - 1].target;\r\n this.lastBottomID = +target.dataset.virtual;\r\n for (let i = 0; i < this.splitCount; ++i) {\r\n target = target.nextElementSibling;\r\n if (!target)\r\n break;\r\n this.setVisible(target);\r\n }\r\n }\r\n else {\r\n let target = filtered[0].target;\r\n this.lastTopID = +target.dataset.virtual;\r\n for (let i = 0; i < this.splitCount; ++i) {\r\n target = target.previousElementSibling;\r\n if (!target)\r\n break;\r\n this.setVisible(target);\r\n }\r\n }\r\n this.debug && this.log('entries:', entries, filtered, this.lastScrollDirection, this.lastTopID, this.lastBottomID);\r\n let minVisibleID = this.lastTopID - this.splitCount;\r\n let maxVisibleID = this.lastBottomID + this.splitCount;\r\n for (let target of this.visible) {\r\n let id = +target.dataset.virtual;\r\n if (id < minVisibleID || id > maxVisibleID) {\r\n this.setHidden(target);\r\n }\r\n }\r\n });\r\n if (!appendTo) {\r\n this.appendTo = this.container;\r\n }\r\n this.log = polyfill_1.logger('SCROLL' + (logPrefix ? '-' + logPrefix : ''));\r\n if (axis == 'x') {\r\n this.container.classList.add('scrollable-x');\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 }\r\n else {\r\n throw new Error('no side for scroll');\r\n }\r\n const binded = this.onScroll.bind(this);\r\n window.addEventListener('resize', () => {\r\n this.overflowContainer = window.innerWidth <= 720 && false ? document.documentElement : this.container;\r\n this.onScroll();\r\n });\r\n this.container.addEventListener('scroll', binded, { passive: true, capture: true });\r\n //document.documentElement.addEventListener('scroll', binded, {passive: true, capture: true});\r\n //window.addEventListener('scroll', binded, {passive: true, capture: true});\r\n Array.from(el.children).forEach(c => this.container.append(c));\r\n el.append(this.container);\r\n //this.onScroll();\r\n this.overflowContainer = window.innerWidth <= 720 && false ? document.documentElement : this.container;\r\n /* scrollables.set(this.container, this);\r\n scrollsIntersector.observe(this.container); */\r\n }\r\n setVisible(element) {\r\n if (this.visible.has(element))\r\n return;\r\n this.debug && this.log('setVisible id:', element.dataset.virtual);\r\n element.firstElementChild.style.display = '';\r\n this.visible.add(element);\r\n }\r\n setHidden(element) {\r\n if (!this.visible.has(element))\r\n return;\r\n this.debug && this.log('setHidden id:', element.dataset.virtual);\r\n element.firstElementChild.style.display = 'none';\r\n this.visible.delete(element);\r\n }\r\n // public attachSentinels(container = this.container, offset = this.onScrollOffset) {\r\n // if(!this.sentinelsObserver) {\r\n // this.topSentinel = document.createElement('div');\r\n // this.topSentinel.classList.add('scrollable-sentinel');\r\n // this.topSentinel.style.top = offset + 'px';\r\n // this.bottomSentinel = document.createElement('div');\r\n // this.bottomSentinel.classList.add('scrollable-sentinel');\r\n // this.bottomSentinel.style.bottom = offset + 'px';\r\n // this.container.append(this.topSentinel, this.bottomSentinel);\r\n // //let fire: () => void;\r\n // this.sentinelsObserver = new IntersectionObserver(entries => {\r\n // for(let entry of entries) {\r\n // let top = entry.target == this.topSentinel;\r\n // if(top) {\r\n // this.onScrolledTopFired = entry.isIntersecting;\r\n // } else {\r\n // this.onScrolledBottomFired = entry.isIntersecting;\r\n // }\r\n // }\r\n // /* this.debug && */this.log('Set onScrolledFires:', this.onScrolledTopFired, this.onScrolledBottomFired);\r\n // /* if((this.onScrolledTopFired || this.onScrolledBottomFired) && !fire) {\r\n // fire = () => window.requestAnimationFrame(() => {\r\n // if(!this.scrollLocked) {\r\n // if(this.onScrolledTopFired && this.onScrolledTop) this.onScrolledTop();\r\n // if(this.onScrolledBottomFired && this.onScrolledBottom) this.onScrolledBottom(); \r\n // }\r\n // if(!this.onScrolledTopFired && !this.onScrolledBottomFired) {\r\n // fire = undefined;\r\n // } else {\r\n // fire();\r\n // }\r\n // });\r\n // fire();\r\n // } */\r\n // });\r\n // this.sentinelsObserver.observe(this.topSentinel);\r\n // this.sentinelsObserver.observe(this.bottomSentinel);\r\n // }\r\n // container.prepend(this.topSentinel);\r\n // container.append(this.bottomSentinel);\r\n // }\r\n setVirtualContainer(el) {\r\n this.splitUp = el;\r\n this.lastScrollTop = 0;\r\n this.log('setVirtualContainer:', el, this);\r\n }\r\n onScroll() {\r\n /* let scrollTop = this.scrollTop;\r\n this.lastScrollDirection = this.lastScrollTop < scrollTop;\r\n this.lastScrollTop = scrollTop;\r\n return; */\r\n //if(!this.isVisible) 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 this.lastScrollDirection = 0;\r\n }, 100);\r\n if (this.onScrollMeasure)\r\n return;\r\n this.onScrollMeasure = window.requestAnimationFrame(() => {\r\n //if(!this.isVisible) return;\r\n this.checkForTriggers(this.overflowContainer);\r\n this.onScrollMeasure = 0;\r\n if (!this.splitUp)\r\n return;\r\n let scrollTop = this.overflowContainer.scrollTop;\r\n if (this.lastScrollTop != scrollTop) {\r\n this.lastScrollDirection = this.lastScrollTop < scrollTop ? 1 : -1;\r\n this.lastScrollTop = scrollTop;\r\n }\r\n else {\r\n this.lastScrollDirection = 0;\r\n }\r\n });\r\n }\r\n checkForTriggers(container) {\r\n if (this.scrollLocked || (!this.onScrolledTop && !this.onScrolledBottom))\r\n return;\r\n let scrollTop = container.scrollTop;\r\n let maxScrollTop = container.scrollHeight - container.clientHeight;\r\n //this.log('checkForTriggers:', scrollTop, maxScrollTop);\r\n if (this.onScrolledTop && scrollTop <= this.onScrollOffset) {\r\n this.onScrolledTop();\r\n }\r\n if (this.onScrolledBottom && (maxScrollTop - scrollTop) <= this.onScrollOffset) {\r\n this.onScrolledBottom();\r\n }\r\n }\r\n reorder() {\r\n Array.from(this.splitUp.children).forEach((el, idx) => {\r\n el.dataset.virtual = '' + idx;\r\n });\r\n }\r\n updateElement(element) {\r\n element.style.minHeight = '';\r\n window.requestAnimationFrame(() => {\r\n let height = element.scrollHeight;\r\n window.requestAnimationFrame(() => {\r\n element.style.minHeight = height + 'px';\r\n });\r\n });\r\n }\r\n prepareElement(element, append = true) {\r\n element.dataset.virtual = '' + (append ? this.virtualTempIDBottom++ : this.virtualTempIDTop--);\r\n this.debug && this.log('prepareElement: prepared');\r\n window.requestAnimationFrame(() => {\r\n let { scrollHeight /* , scrollWidth */ } = element;\r\n this.debug && this.log('prepareElement: first rAF');\r\n window.requestAnimationFrame(() => {\r\n //element.style.height = scrollHeight + 'px';\r\n element.style.minHeight = scrollHeight + 'px'; // height doesn't work for safari\r\n //element.style.width = scrollWidth + 'px';\r\n //(element.firstElementChild as HTMLElement).style.display = 'none';\r\n });\r\n this.visible.add(element);\r\n this.observer.observe(element);\r\n });\r\n }\r\n prepend(element, splitable = true) {\r\n if (splitable)\r\n this.prepareElement(element, false);\r\n if (this.splitUp)\r\n this.splitUp.prepend(element);\r\n else\r\n this.appendTo.prepend(element);\r\n }\r\n append(element, splitable = true) {\r\n if (splitable)\r\n this.prepareElement(element);\r\n if (this.splitUp)\r\n this.splitUp.append(element);\r\n else\r\n this.appendTo.append(element);\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;\r\n }\r\n scrollIntoView(element, smooth = true) {\r\n if (element.parentElement && !this.scrollLocked) {\r\n let isFirstUnread = element.classList.contains('is-first-unread');\r\n let offsetTop = element.getBoundingClientRect().top - this.container.getBoundingClientRect().top;\r\n offsetTop = this.container.scrollTop + offsetTop;\r\n if (!smooth && isFirstUnread) {\r\n this.scrollTo(offsetTop, false);\r\n return;\r\n }\r\n let clientHeight = this.container.clientHeight;\r\n let height = element.scrollHeight;\r\n let d = (clientHeight - height) / 2;\r\n offsetTop -= d;\r\n this.scrollTo(offsetTop, smooth);\r\n }\r\n }\r\n scrollTo(top, smooth = true, important = false) {\r\n if (this.scrollLocked && !important)\r\n return;\r\n let scrollTop = this.scrollTop;\r\n if (scrollTop == Math.floor(top)) {\r\n return;\r\n }\r\n if (this.scrollLocked)\r\n clearTimeout(this.scrollLocked);\r\n this.scrollLocked = setTimeout(() => {\r\n this.scrollLocked = 0;\r\n this.onScroll();\r\n }, 468);\r\n this.container.scrollTo({ behavior: smooth ? 'smooth' : 'auto', top });\r\n }\r\n removeElement(element) {\r\n element.remove();\r\n }\r\n set scrollTop(y) {\r\n this.container.scrollTop = y;\r\n }\r\n get scrollTop() {\r\n //this.log.trace('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 length() {\r\n return this.appendTo.childElementCount;\r\n }\r\n}\r\nexports.default = Scrollable;\r\n"
},
{
"id": 10,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"name": "./src/lib/polyfill.ts",
"index": 14,
"index2": 13,
"size": 3188,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"issuerId": 9,
"issuerName": "./src/components/scrollable_new.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"name": "./src/components/scrollable_new.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1195,
"building": 1822,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "36:19-41"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"module": "./src/components/scrollable_new.ts",
"moduleName": "./src/components/scrollable_new.ts",
"type": "cjs require",
"userRequest": "../lib/polyfill",
"loc": "6:19-45"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "18:19-41"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "18:19-41"
},
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "21:19-41"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "25:19-41"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "44:19-41"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "20:19-41"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.deferredPromise = exports.logger = exports.secureRandom = void 0;\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\nUint8Array.prototype.toJSON = function () {\r\n return [...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": 11,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"name": "./src/lib/bin_utils.ts",
"index": 15,
"index2": 12,
"size": 12166,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"issuerId": 72,
"issuerName": "./src/pages/pageSignQR.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2979,
"building": 103,
"dependencies": 2951
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "21:20-43"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "10:20-43"
},
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"module": "./src/lib/polyfill.ts",
"moduleName": "./src/lib/polyfill.ts",
"type": "cjs require",
"userRequest": "./bin_utils",
"loc": "4:20-42"
},
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "16:20-43"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\filemanager.ts",
"module": "./src/lib/filemanager.ts",
"moduleName": "./src/lib/filemanager.ts",
"type": "cjs require",
"userRequest": "./bin_utils",
"loc": "12:20-42"
},
{
"moduleId": 60,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../bin_utils",
"loc": "3:20-43"
},
{
"moduleId": 62,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\idb.ts",
"module": "./src/lib/idb.ts",
"moduleName": "./src/lib/idb.ts",
"type": "cjs require",
"userRequest": "./bin_utils",
"loc": "6:20-42"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "../lib/bin_utils",
"loc": "41:20-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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 <igor.beatle@gmail.com>\r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.nextRandomInt = exports.addPadding = exports.longFromInts = exports.longToBytes = exports.bytesToWordss = exports.bytesFromWordss = exports.bytesFromWords = exports.longToInts = exports.bufferConcats = exports.bufferConcat = exports.bytesFromArrayBuffer = exports.convertToByteArray = exports.convertToUint8Array = exports.convertToArrayBuffer = exports.bytesToArrayBuffer = exports.bytesFromBigInt = exports.bytesXor = exports.bytesCmp = exports.blobSafeMimeType = exports.blobConstruct = exports.dataUrlToBlob = exports.base64ToBlob = exports.uint6ToBase64 = exports.bytesToBase64 = exports.bytesFromHex = exports.bytesToHex = exports.bigStringInt = exports.bigint = exports.isObject = exports.dT = void 0;\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\n///////////////////////\r\n/////////////\r\n/////////////////////////////////////////////////\r\n///////////////////////////////////////////////////////////////////////////\r\n/////////////////////////////////////////////////////////////////////////////////\r\n/////////////////////////////////////////////////////////////////////////////////////////////\r\n///////////////////////////////////////////////\r\n//////////////////////////////////////////////////////////////////////////\r\n//////////////////////////////////////////////////////////////\r\n////////////////\r\n//////////\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nexports.dT = dT;\r\nfunction isObject(object) {\r\n return typeof (object) === 'object' && object !== null;\r\n}\r\nexports.isObject = isObject;\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 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 nextRandomInt(maxValue) {\r\n return Math.floor(Math.random() * maxValue);\r\n}\r\nexports.nextRandomInt = nextRandomInt;\r\n"
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"name": "./src/lib/appManagers/appDocsManager.ts",
"index": 44,
"index2": 38,
"size": 12353,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "29:41-68"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "32:41-68"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appDocsManager",
"loc": "39:41-85"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "23:41-68"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appDocsManager",
"loc": "19:41-80"
},
{
"moduleId": 37,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appStickersManager.ts",
"module": "./src/lib/appManagers/appStickersManager.ts",
"moduleName": "./src/lib/appManagers/appStickersManager.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "19:41-68"
},
{
"moduleId": 41,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"module": "./src/lib/appManagers/appWebPagesManager.ts",
"moduleName": "./src/lib/appManagers/appWebPagesManager.ts",
"type": "cjs require",
"userRequest": "./appDocsManager",
"loc": "8:41-68"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appDocsManager",
"loc": "28:41-85"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 apiFileManager_1 = __importDefault(require(\"../mtproto/apiFileManager\"));\r\nconst filemanager_1 = __importDefault(require(\"../filemanager\"));\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst utils_1 = require(\"../utils\");\r\nconst opusDecodeController_1 = __importDefault(require(\"../opusDecodeController\"));\r\nclass AppDocsManager {\r\n constructor() {\r\n this.docs = {};\r\n this.thumbs = {};\r\n }\r\n saveDoc(apiDoc, 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 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 apiDoc.sticker = 1;\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.mime_type == 'application/x-tgsticker' && apiDoc.file_name == \"AnimatedSticker.tgs\") {\r\n apiDoc.type = 'sticker';\r\n apiDoc.animated = true;\r\n apiDoc.sticker = 2;\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 utils_1.isObject(docID) ? docID : this.docs[docID];\r\n }\r\n getMediaInputByID(docID) {\r\n let doc = this.getDoc(docID);\r\n return {\r\n _: 'inputMediaDocument',\r\n flags: 0,\r\n id: {\r\n _: 'inputDocument',\r\n id: doc.id,\r\n access_hash: doc.access_hash,\r\n file_reference: doc.file_reference\r\n },\r\n ttl_seconds: 0\r\n };\r\n }\r\n getInputByID(docID, thumbSize) {\r\n let doc = this.getDoc(docID);\r\n return {\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: thumbSize\r\n };\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 downloadDoc(docID, toFileEntry) {\r\n let doc = this.getDoc(docID);\r\n let inputFileLocation = this.getInputByID(doc);\r\n if (doc._ == 'documentEmpty') {\r\n return Promise.reject();\r\n }\r\n if (doc.downloaded && !toFileEntry) {\r\n if (doc.url)\r\n return Promise.resolve(null);\r\n let 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 let deferred = polyfill_1.deferredPromise();\r\n deferred.cancel = () => {\r\n downloadPromise.cancel();\r\n };\r\n // нет смысла делать объект с выполняющимися промисами, нижняя строка и так вернёт загружающийся\r\n let 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 stickerType: doc.sticker\r\n });\r\n downloadPromise.then((blob) => {\r\n if (blob) {\r\n doc.downloaded = true;\r\n if (doc.type == 'voice' /* && false */) {\r\n let reader = new FileReader();\r\n reader.onloadend = (e) => {\r\n let uint8 = new Uint8Array(e.target.result);\r\n //console.log('sending uint8 to decoder:', uint8);\r\n opusDecodeController_1.default.decode(uint8).then(result => {\r\n doc.url = result.url;\r\n deferred.resolve(blob);\r\n }, deferred.reject);\r\n };\r\n reader.readAsArrayBuffer(blob);\r\n return;\r\n }\r\n else if (doc.type && doc.sticker != 2) {\r\n doc.url = URL.createObjectURL(blob);\r\n }\r\n }\r\n deferred.resolve(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 deferred;\r\n }\r\n downloadDocThumb(docID, thumbSize) {\r\n let doc = this.getDoc(docID);\r\n let key = doc.id + '-' + thumbSize;\r\n if (this.thumbs[key]) {\r\n return this.thumbs[key];\r\n }\r\n let input = this.getInputByID(doc, thumbSize);\r\n if (doc._ == 'documentEmpty') {\r\n return Promise.reject();\r\n }\r\n let mimeType = doc.sticker ? 'image/webp' : doc.mime_type;\r\n let promise = apiFileManager_1.default.downloadSmallFile(input, {\r\n dcID: doc.dc_id,\r\n stickerType: doc.sticker ? 1 : undefined,\r\n mimeType: mimeType\r\n });\r\n return this.thumbs[key] = promise.then((blob) => {\r\n return URL.createObjectURL(blob);\r\n });\r\n }\r\n hasDownloadedThumb(docID, thumbSize) {\r\n return !!this.thumbs[docID + '-' + thumbSize];\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": 13,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"name": "./src/lib/storage.ts",
"index": 7,
"index2": 7,
"size": 6346,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"module": "./src/lib/mtproto/mtprotoworker.ts",
"moduleName": "./src/lib/mtproto/mtprotoworker.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "26:34-55"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "25:34-55"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "24:34-55"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts",
"module": "./src/lib/mtproto/serverTimeManager.ts",
"moduleName": "./src/lib/mtproto/serverTimeManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "7:34-55"
},
{
"moduleId": 37,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./lib/storage",
"loc": "60:70-94"
},
{
"moduleId": 63,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"module": "./src/lib/mtproto/mtproto.ts",
"moduleName": "./src/lib/mtproto/mtproto.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "7:34-55"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 = JSON.stringify(value, (key, value) => {\r\n if (key == 'downloaded' || (key == 'url' && value.indexOf('blob:') === 0))\r\n return undefined;\r\n return value;\r\n });\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<Cache>;\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": 14,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\lottieLoader.ts",
"name": "./src/lib/lottieLoader.ts",
"index": 24,
"index2": 17,
"size": 16963,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"issuerId": 57,
"issuerName": "./src/pages/pageAuthCode.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1040,
"building": 297,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../lottieLoader",
"loc": "19:39-65"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "38:39-69"
},
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"module": "./src/pages/pagePassword.ts",
"moduleName": "./src/pages/pagePassword.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "10:39-69"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "10:39-69"
},
{
"moduleId": 59,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagesManager.ts",
"module": "./src/pages/pagesManager.ts",
"moduleName": "./src/pages/pagesManager.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "8:39-69"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "36:39-69"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/lottieLoader",
"loc": "17:39-69"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.RLottiePlayer = void 0;\r\nconst utils_1 = require(\"./utils\");\r\nlet convert = (value) => {\r\n return Math.round(Math.min(Math.max(value, 0), 1) * 255);\r\n};\r\nlet RLottiePlayer = /** @class */ (() => {\r\n class RLottiePlayer {\r\n constructor({ el, width, height, worker }) {\r\n this.reqId = 0;\r\n this.listeners = {};\r\n this.listenerResults = {};\r\n this.paused = true;\r\n this.direction = 1;\r\n this.speed = 1;\r\n this.autoplay = true;\r\n this.loop = true;\r\n this.playedTimes = 0;\r\n this.reqId = ++RLottiePlayer['reqId'];\r\n this.el = el;\r\n this.width = width;\r\n this.height = height;\r\n this.worker = worker;\r\n this.canvas = document.createElement('canvas');\r\n this.canvas.width = this.width;\r\n this.canvas.height = this.height;\r\n this.context = this.canvas.getContext('2d');\r\n }\r\n addListener(name, callback) {\r\n if (this.listenerResults.hasOwnProperty(name))\r\n return Promise.resolve(this.listenerResults[name]);\r\n this.listeners[name] = callback;\r\n }\r\n setListenerResult(name, value) {\r\n this.listenerResults[name] = value;\r\n if (this.listeners[name]) {\r\n this.listeners[name](value);\r\n }\r\n }\r\n sendQuery(methodName, ...args) {\r\n this.worker.sendQuery(methodName, this.reqId, ...args);\r\n }\r\n loadFromData(json) {\r\n this.sendQuery('loadFromData', json, this.width, this.height, {\r\n paused: this.paused,\r\n direction: this.direction,\r\n speed: this.speed\r\n });\r\n }\r\n play() {\r\n if (!this.paused)\r\n return;\r\n this.paused = false;\r\n this.setMainLoop();\r\n }\r\n pause() {\r\n if (this.paused)\r\n return;\r\n this.paused = true;\r\n window.cancelAnimationFrame(this.rafId);\r\n }\r\n stop() {\r\n this.pause();\r\n this.curFrame = this.direction == 1 ? 0 : this.frameCount;\r\n this.sendQuery('renderFrame', this.curFrame);\r\n }\r\n restart() {\r\n this.stop();\r\n this.play();\r\n }\r\n setSpeed(speed) {\r\n this.speed = speed;\r\n if (!this.paused) {\r\n this.setMainLoop();\r\n }\r\n }\r\n setDirection(direction) {\r\n this.direction = direction;\r\n if (!this.paused) {\r\n this.setMainLoop();\r\n }\r\n }\r\n destroy() {\r\n lottieLoader.onDestroy(this.reqId);\r\n this.pause();\r\n this.sendQuery('destroy');\r\n }\r\n renderFrame(frame, frameNo) {\r\n this.context.putImageData(new ImageData(frame, this.width, this.height), 0, 0);\r\n this.setListenerResult('enterFrame', frameNo);\r\n }\r\n mainLoop(method) {\r\n let r = () => {\r\n if (this.paused) {\r\n return;\r\n }\r\n const now = Date.now(), delta = now - this.frThen;\r\n if (delta > this.frInterval) {\r\n this.frThen = now - (delta % this.frInterval);\r\n const canContinue = method();\r\n if (!canContinue && !this.loop && this.autoplay) {\r\n this.autoplay = false;\r\n }\r\n }\r\n this.rafId = window.requestAnimationFrame(r);\r\n };\r\n //this.rafId = window.requestAnimationFrame(r);\r\n r();\r\n }\r\n mainLoopForwards() {\r\n this.sendQuery('renderFrame', this.curFrame++);\r\n if (this.curFrame >= this.frameCount) {\r\n this.playedTimes++;\r\n if (!this.loop)\r\n return false;\r\n this.curFrame = 0;\r\n }\r\n return true;\r\n }\r\n ;\r\n mainLoopBackwards() {\r\n this.sendQuery('renderFrame', this.curFrame--);\r\n if (this.curFrame < 0) {\r\n this.playedTimes++;\r\n if (!this.loop)\r\n return false;\r\n this.curFrame = this.frameCount - 1;\r\n }\r\n return true;\r\n }\r\n ;\r\n setMainLoop() {\r\n window.cancelAnimationFrame(this.rafId);\r\n this.frInterval = 1000 / this.fps / this.speed;\r\n this.frThen = Date.now();\r\n //console.trace('setMainLoop', this.frInterval, this.direction, this);\r\n const method = (this.direction == 1 ? this.mainLoopForwards : this.mainLoopBackwards).bind(this);\r\n this.mainLoop(method);\r\n }\r\n ;\r\n }\r\n RLottiePlayer.reqId = 0;\r\n return RLottiePlayer;\r\n})();\r\nexports.RLottiePlayer = RLottiePlayer;\r\nclass QueryableWorker {\r\n constructor(url, defaultListener = () => { }, onError) {\r\n this.defaultListener = defaultListener;\r\n this.listeners = {};\r\n this.worker = new Worker(url);\r\n if (onError) {\r\n this.worker.onerror = onError;\r\n }\r\n this.worker.onmessage = (event) => {\r\n if (event.data instanceof Object &&\r\n event.data.hasOwnProperty('queryMethodListener') &&\r\n event.data.hasOwnProperty('queryMethodArguments')) {\r\n this.listeners[event.data.queryMethodListener].apply(this, event.data.queryMethodArguments);\r\n }\r\n else {\r\n this.defaultListener.call(this, event.data);\r\n }\r\n };\r\n }\r\n postMessage(message) {\r\n this.worker.postMessage(message);\r\n }\r\n terminate() {\r\n this.worker.terminate();\r\n }\r\n addListener(name, listener) {\r\n this.listeners[name] = listener;\r\n }\r\n removeListener(name) {\r\n delete this.listeners[name];\r\n }\r\n sendQuery(queryMethod, ...args) {\r\n this.worker.postMessage({\r\n 'queryMethod': queryMethod,\r\n 'queryMethodArguments': args\r\n });\r\n }\r\n}\r\nlet LottieLoader = /** @class */ (() => {\r\n class LottieLoader {\r\n constructor() {\r\n this.loaded = false;\r\n this.workersLimit = 4;\r\n this.players = {};\r\n this.byGroups = {};\r\n this.workers = [];\r\n this.curWorkerNum = 0;\r\n this.visible = new Set();\r\n this.debug = true;\r\n this.observer = new IntersectionObserver((entries) => {\r\n for (const entry of entries) {\r\n const target = entry.target;\r\n for (const group in this.byGroups) {\r\n const player = this.byGroups[group].find(p => p.el == target);\r\n if (player) {\r\n if (entry.isIntersecting) {\r\n this.visible.add(player);\r\n this.checkAnimation(player, false);\r\n }\r\n else {\r\n this.visible.delete(player);\r\n this.checkAnimation(player, true);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n loadLottieWorkers() {\r\n if (this.loadPromise)\r\n return this.loadPromise;\r\n const onFrame = this.onFrame.bind(this);\r\n const onPlayerLoaded = this.onPlayerLoaded.bind(this);\r\n return this.loadPromise = new Promise((resolve, reject) => {\r\n let remain = this.workersLimit;\r\n for (let i = 0; i < this.workersLimit; ++i) {\r\n const worker = this.workers[i] = new QueryableWorker('rlottie.worker.js');\r\n worker.addListener('ready', () => {\r\n console.log('worker #' + i + ' ready');\r\n worker.addListener('frame', onFrame);\r\n worker.addListener('loaded', onPlayerLoaded);\r\n --remain;\r\n if (!remain) {\r\n console.log('workers ready');\r\n resolve();\r\n this.loaded = true;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n applyReplacements(object, toneIndex) {\r\n const replacements = LottieLoader.COLORREPLACEMENTS[toneIndex - 2];\r\n const iterateIt = (it) => {\r\n for (let smth of it) {\r\n switch (smth.ty) {\r\n case 'st':\r\n case 'fl':\r\n let k = smth.c.k;\r\n let color = convert(k[2]) | (convert(k[1]) << 8) | (convert(k[0]) << 16);\r\n let foundReplacement = replacements.find(p => p[0] == color);\r\n if (foundReplacement) {\r\n k[0] = ((foundReplacement[1] >> 16) & 255) / 255;\r\n k[1] = ((foundReplacement[1] >> 8) & 255) / 255;\r\n k[2] = (foundReplacement[1] & 255) / 255;\r\n }\r\n //console.log('foundReplacement!', foundReplacement, color.toString(16), k);\r\n break;\r\n }\r\n if (smth.hasOwnProperty('it')) {\r\n iterateIt(smth.it);\r\n }\r\n }\r\n };\r\n for (let layer of object.layers) {\r\n if (!layer.shapes)\r\n continue;\r\n for (let shape of layer.shapes) {\r\n iterateIt(shape.it);\r\n }\r\n }\r\n }\r\n loadAnimationWorker(params, group = '', toneIndex = -1) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n params.autoplay = true;\r\n if (toneIndex >= 1 && toneIndex <= 5) {\r\n this.applyReplacements(params.animationData, toneIndex);\r\n }\r\n if (!this.loaded) {\r\n yield this.loadLottieWorkers();\r\n }\r\n const width = params.width || parseInt(params.container.style.width);\r\n const height = params.height || parseInt(params.container.style.height);\r\n const player = this.initPlayer(params.container, params.animationData, width, height);\r\n for (let i in params) {\r\n // @ts-ignore\r\n if (player.hasOwnProperty(i)) {\r\n // @ts-ignore\r\n player[i] = params[i];\r\n }\r\n }\r\n ((_a = this.byGroups[group]) !== null && _a !== void 0 ? _a : (this.byGroups[group] = [])).push(player);\r\n return player;\r\n });\r\n }\r\n checkAnimations(blurred, group, destroy = false) {\r\n const groups = group && false ? [group] : Object.keys(this.byGroups);\r\n if (group && !this.byGroups[group]) {\r\n console.warn('no animation group:', group);\r\n this.byGroups[group] = [];\r\n //return;\r\n }\r\n for (const group of groups) {\r\n const animations = this.byGroups[group];\r\n animations.forEach(player => {\r\n this.checkAnimation(player, blurred, destroy);\r\n //if(!autoplay) continue;\r\n /* if(blurred || !isElementInViewport(container)) {\r\n if(!paused) {\r\n this.debug && console.log('pause animation', isElementInViewport(container), container);\r\n animation.pause();\r\n animations[i].paused = true;\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 checkAnimation(player, blurred = false, destroy = false) {\r\n if (destroy || (!utils_1.isInDOM(player.el) && player.listenerResults.hasOwnProperty('ready'))) {\r\n //console.log('destroy animation');\r\n player.destroy();\r\n return;\r\n }\r\n if (blurred) {\r\n if (!player.paused) {\r\n this.debug && console.log('pause animation', player);\r\n player.pause();\r\n }\r\n }\r\n else if (player.paused && this.visible.has(player) && player.autoplay) {\r\n this.debug && console.log('play animation', player);\r\n player.play();\r\n }\r\n }\r\n onPlayerLoaded(reqId, frameCount, fps) {\r\n const rlPlayer = this.players[reqId];\r\n if (!rlPlayer) {\r\n this.debug && console.warn('onPlayerLoaded on destroyed player:', reqId, frameCount);\r\n return;\r\n }\r\n rlPlayer.el.appendChild(rlPlayer.canvas);\r\n rlPlayer.curFrame = rlPlayer.direction == 1 ? 0 : frameCount - 1;\r\n rlPlayer.frameCount = frameCount;\r\n rlPlayer.fps = fps;\r\n rlPlayer.sendQuery('renderFrame', 0);\r\n rlPlayer.setListenerResult('ready');\r\n this.observer.observe(rlPlayer.el);\r\n }\r\n onFrame(reqId, frameNo, frame) {\r\n const rlPlayer = this.players[reqId];\r\n if (!rlPlayer) {\r\n this.debug && console.warn('onFrame on destroyed player:', reqId, frameNo);\r\n return;\r\n }\r\n rlPlayer.renderFrame(frame, frameNo);\r\n }\r\n onDestroy(reqId) {\r\n let player = this.players[reqId];\r\n for (let group in this.byGroups) {\r\n this.byGroups[group].findAndSplice(p => p == player);\r\n }\r\n delete this.players[player.reqId];\r\n this.observer.unobserve(player.el);\r\n this.visible.delete(player);\r\n }\r\n destroyWorkers() {\r\n this.workers.forEach((worker, idx) => {\r\n worker.terminate();\r\n console.log('worker #' + idx + ' terminated');\r\n });\r\n console.log('workers destroyed');\r\n this.workers.length = 0;\r\n }\r\n initPlayer(el, json, width, height) {\r\n const rlPlayer = new RLottiePlayer({\r\n el,\r\n width,\r\n height,\r\n worker: this.workers[this.curWorkerNum++]\r\n });\r\n this.players[rlPlayer.reqId] = rlPlayer;\r\n if (this.curWorkerNum >= this.workers.length) {\r\n this.curWorkerNum = 0;\r\n }\r\n rlPlayer.loadFromData(json);\r\n return rlPlayer;\r\n }\r\n }\r\n LottieLoader.COLORREPLACEMENTS = [\r\n [\r\n [0xf77e41, 0xca907a],\r\n [0xffb139, 0xedc5a5],\r\n [0xffd140, 0xf7e3c3],\r\n [0xffdf79, 0xfbefd6],\r\n ],\r\n [\r\n [0xf77e41, 0xaa7c60],\r\n [0xffb139, 0xc8a987],\r\n [0xffd140, 0xddc89f],\r\n [0xffdf79, 0xe6d6b2],\r\n ],\r\n [\r\n [0xf77e41, 0x8c6148],\r\n [0xffb139, 0xad8562],\r\n [0xffd140, 0xc49e76],\r\n [0xffdf79, 0xd4b188],\r\n ],\r\n [\r\n [0xf77e41, 0x6e3c2c],\r\n [0xffb139, 0x925a34],\r\n [0xffd140, 0xa16e46],\r\n [0xffdf79, 0xac7a52],\r\n ]\r\n ];\r\n return LottieLoader;\r\n})();\r\nconst lottieLoader = new LottieLoader();\r\nwindow.LottieLoader = lottieLoader;\r\nexports.default = lottieLoader;\r\n"
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"index": 25,
"index2": 67,
"size": 105261,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"issuerId": 22,
"issuerName": "./src/pages/pageIm.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appImManager",
"loc": "30:39-64"
},
{
"moduleId": 22,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"module": "./src/pages/pageIm.ts",
"moduleName": "./src/pages/pageIm.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appImManager",
"loc": "30:60-102"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "./appImManager",
"loc": "17:39-64"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appImManager",
"loc": "45:39-64"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appImManager",
"loc": "16:39-76"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appImManager",
"loc": "28:39-64"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appImManager",
"loc": "31:39-81"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppImManager = void 0;\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 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\n//import Scrollable from '../../components/scrollable';\r\nconst scrollable_new_1 = __importDefault(require(\"../../components/scrollable_new\"));\r\nconst bubbleGroups_1 = __importDefault(require(\"../../components/bubbleGroups\"));\r\nconst lazyLoadQueue_1 = __importDefault(require(\"../../components/lazyLoadQueue\"));\r\nconst appDocsManager_1 = __importDefault(require(\"./appDocsManager\"));\r\nconst appForward_1 = __importDefault(require(\"../../components/appForward\"));\r\nconst appStickersManager_1 = __importDefault(require(\"./appStickersManager\"));\r\nconst avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst AppInlineBotsManager_1 = __importDefault(require(\"./AppInlineBotsManager\"));\r\nconst stickyIntersector_1 = __importDefault(require(\"../../components/stickyIntersector\"));\r\nconst popup_1 = require(\"../../components/popup\");\r\nconsole.log('appImManager included!');\r\nappSidebarLeft_1.default; // just to include\r\nlet testScroll = false;\r\nconst IGNOREACTIONS = ['messageActionChannelMigrateFrom'];\r\nclass ChatContextMenu {\r\n constructor(attachTo) {\r\n this.attachTo = attachTo;\r\n this.element = document.getElementById('bubble-contextmenu');\r\n this.buttons = {};\r\n misc_1.parseMenuButtonsTo(this.buttons, this.element.children);\r\n attachTo.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 return;\r\n e.preventDefault();\r\n if (this.element.classList.contains('active')) {\r\n return false;\r\n }\r\n e.cancelBubble = true;\r\n bubble = bubble.parentElement; // bc container\r\n let msgID = +bubble.dataset.mid;\r\n if (!msgID)\r\n return;\r\n let peerID = utils_1.$rootScope.selectedPeerID;\r\n this.msgID = msgID;\r\n const message = appMessagesManager_1.default.getMessage(msgID);\r\n this.buttons.copy.style.display = message.message ? '' : 'none';\r\n if (utils_1.$rootScope.myID == peerID || (peerID < 0 && appChatsManager_1.default.hasRights(-peerID, 'pin'))) {\r\n this.buttons.pin.style.display = '';\r\n }\r\n else {\r\n this.buttons.pin.style.display = 'none';\r\n }\r\n this.buttons.edit.style.display = appMessagesManager_1.default.canEditMessage(msgID) ? '' : 'none';\r\n let side = bubble.classList.contains('is-in') ? 'left' : 'right';\r\n misc_1.positionMenu(e, this.element, side);\r\n misc_1.openBtnMenu(this.element);\r\n /////this.log('contextmenu', e, bubble, msgID, side);\r\n });\r\n this.buttons.copy.addEventListener('click', () => {\r\n let message = appMessagesManager_1.default.getMessage(this.msgID);\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.buttons.delete.addEventListener('click', () => {\r\n let peerID = utils_1.$rootScope.selectedPeerID;\r\n let firstName = appPeersManager_1.default.getPeerTitle(peerID, false, true);\r\n let callback = (revoke) => {\r\n appMessagesManager_1.default.deleteMessages([this.msgID], revoke);\r\n };\r\n let title, description, buttons;\r\n title = 'Delete Message?';\r\n description = `Are you sure you want to delete this message?`;\r\n if (peerID == utils_1.$rootScope.myID) {\r\n buttons = [{\r\n text: 'DELETE',\r\n isDanger: true,\r\n callback: () => callback(false)\r\n }];\r\n }\r\n else {\r\n buttons = [{\r\n text: 'DELETE JUST FOR ME',\r\n isDanger: true,\r\n callback: () => callback(false)\r\n }];\r\n if (peerID > 0) {\r\n buttons.push({\r\n text: 'DELETE FOR ME AND ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(true)\r\n });\r\n }\r\n else if (appChatsManager_1.default.hasRights(-peerID, 'deleteRevoke')) {\r\n buttons.push({\r\n text: 'DELETE FOR ALL',\r\n isDanger: true,\r\n callback: () => callback(true)\r\n });\r\n }\r\n }\r\n buttons.push({\r\n text: 'CANCEL',\r\n isCancel: true\r\n });\r\n let popup = new popup_1.PopupPeer('popup-delete-chat', {\r\n peerID: peerID,\r\n title: title,\r\n description: description,\r\n buttons: buttons\r\n });\r\n popup.show();\r\n });\r\n this.buttons.reply.addEventListener('click', () => {\r\n const message = appMessagesManager_1.default.getMessage(this.msgID);\r\n const chatInputC = appImManager.chatInputC;\r\n chatInputC.setTopInfo(appPeersManager_1.default.getPeerTitle(message.fromID, true), message.message, undefined, message);\r\n chatInputC.replyToMsgID = this.msgID;\r\n chatInputC.editMsgID = 0;\r\n });\r\n this.buttons.forward.addEventListener('click', () => {\r\n appForward_1.default.init([this.msgID]);\r\n });\r\n this.buttons.edit.addEventListener('click', () => {\r\n const message = appMessagesManager_1.default.getMessage(this.msgID);\r\n const chatInputC = appImManager.chatInputC;\r\n chatInputC.setTopInfo('Editing', message.message, message.message, message);\r\n chatInputC.replyToMsgID = 0;\r\n chatInputC.editMsgID = this.msgID;\r\n });\r\n this.buttons.pin.addEventListener('click', () => {\r\n mtprotoworker_1.default.invokeApi('messages.updatePinnedMessage', {\r\n flags: 0,\r\n peer: appPeersManager_1.default.getInputPeerByID(utils_1.$rootScope.selectedPeerID),\r\n id: this.msgID\r\n }).then(updates => {\r\n /////this.log('pinned updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n });\r\n }\r\n}\r\nclass AppImManager {\r\n constructor() {\r\n /* if(!lottieLoader.loaded) {\r\n lottieLoader.loadLottie();\r\n } */\r\n this.pageEl = document.getElementById('page-chats');\r\n this.btnMute = this.pageEl.querySelector('.chat-mute-button');\r\n this.btnMenuMute = this.pageEl.querySelector('.chat-more-button .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.bubbles = {};\r\n this.dateMessages = {};\r\n this.unreadOut = new Set();\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.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 = document.getElementById('topbar');\r\n this.chatInput = document.getElementById('chat-input');\r\n this.contextMenu = new ChatContextMenu(this.bubblesContainer);\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.unreadedObserver = null;\r\n this.unreaded = [];\r\n this.loadedTopTimes = 0;\r\n this.loadedBottomTimes = 0;\r\n this.messagesQueuePromise = null;\r\n this.messagesQueue = [];\r\n this.messagesQueueOnRender = null;\r\n this.firstUnreadBubble = null;\r\n this.stickyIntersector = null;\r\n this.cleanupID = 0;\r\n this.selectTab = misc_1.horizontalMenu(null, document.getElementById('main-columns'));\r\n this.closeBtn = this.topbar.querySelector('.sidebar-close-button');\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.selectTab(0);\r\n mtprotoworker_1.default.getUserID().then((id) => {\r\n this.myID = utils_1.$rootScope.myID = id;\r\n });\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 if (!this.scrolledAllDown) {\r\n this.setPeer(this.peerID, 0);\r\n }\r\n else {\r\n this.renderNewMessagesByIDs([details.messageID], true);\r\n }\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 utils_1.$rootScope.$on('dialog_flush', (e) => {\r\n let peerID = e.detail.peerID;\r\n if (this.peerID == peerID) {\r\n this.deleteMessagesByIDs(Object.keys(this.bubbles).map(m => +m));\r\n }\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 // set cached url to media\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n if (message.media) {\r\n if (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 else if (message.media.document) {\r\n let doc = appDocsManager_1.default.getDoc(tempID);\r\n if (doc && doc.type && doc.type != 'sticker') {\r\n let newDoc = message.media.document;\r\n newDoc.downloaded = doc.downloaded;\r\n newDoc.url = doc.url;\r\n }\r\n }\r\n }\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 new mids to album items for mediaViewer\r\n if (message.grouped_id) {\r\n let items = bubble.querySelectorAll('.album-item');\r\n let groupIDs = Object.keys(appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id]).map(i => +i).sort((a, b) => a - b);\r\n Array.from(items).forEach((item, idx) => {\r\n item.dataset.mid = '' + groupIDs[idx];\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 if (this.unreadOut.has(tempID)) {\r\n this.unreadOut.delete(tempID);\r\n this.unreadOut.add(mid);\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 message = appMessagesManager_1.default.getMessage(mid);\r\n let bubble = this.bubbles[mid];\r\n if (!bubble && message.grouped_id) {\r\n let a = this.getAlbumBubble(message.grouped_id);\r\n bubble = a.bubble;\r\n message = a.message;\r\n }\r\n if (!bubble)\r\n return;\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.topbar.classList.add('is-pinned-shown');\r\n this.pinnedMessageContent.innerHTML = message.rReply;\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.bubblesContainer.addEventListener('click', (e) => {\r\n var _a;\r\n let target = e.target;\r\n let bubble = null;\r\n try {\r\n bubble = utils_1.findUpClassName(target, 'bubble');\r\n }\r\n catch (err) { }\r\n if (!bubble)\r\n return;\r\n let contactDiv = utils_1.findUpClassName(target, 'contact');\r\n if (contactDiv) {\r\n this.setPeer(+contactDiv.dataset.peerID);\r\n return;\r\n }\r\n //this.log('chatInner click:', target);\r\n if (target.tagName == 'SPAN') {\r\n let video = target.parentElement.querySelector('video');\r\n if (video) {\r\n video.click(); // hot-fix for time and play button\r\n }\r\n return;\r\n }\r\n if ((target.tagName == 'IMG' && !target.classList.contains('emoji') && target.parentElement.tagName != \"AVATAR-ELEMENT\")\r\n || target.tagName == 'image'\r\n || target.classList.contains('album-item')\r\n || (target.tagName == 'VIDEO' && !bubble.classList.contains('round'))) {\r\n let messageID = +((_a = utils_1.findUpClassName(target, 'album-item')) === null || _a === void 0 ? void 0 : _a.dataset.mid) || +bubble.dataset.mid;\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 targets = [];\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((a, b) => a - b);\r\n ids.forEach(id => {\r\n let elements = this.bubbles[id].querySelectorAll('.album-item img, .album-item video, .preview img, .preview video, .bubble__media-container');\r\n Array.from(elements).forEach((element) => {\r\n let albumItem = utils_1.findUpClassName(element, 'album-item');\r\n targets.push({\r\n element,\r\n mid: +(albumItem === null || albumItem === void 0 ? void 0 : albumItem.dataset.mid) || id\r\n });\r\n });\r\n });\r\n let idx = targets.findIndex(t => t.mid == messageID);\r\n this.log('open mediaViewer single with ids:', ids, idx, targets);\r\n appMediaViewer_1.default.openMedia(message, targets[idx].element, true, this.scroll.parentElement, targets.slice(0, idx), targets.slice(idx + 1) /* , !message.grouped_id */);\r\n //appMediaViewer.openMedia(message, target as HTMLImageElement);\r\n }\r\n if (['IMG', 'DIV'].indexOf(target.tagName) === -1)\r\n target = utils_1.findUpTag(target, 'DIV');\r\n if (target.tagName == 'DIV' || target.tagName == \"AVATAR-ELEMENT\") {\r\n if (target.classList.contains('goto-original')) {\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);\r\n return;\r\n }\r\n else if (target.tagName == \"AVATAR-ELEMENT\" || 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 (target.tagName == 'IMG' && target.parentElement.tagName == \"AVATAR-ELEMENT\") {\r\n let peerID = +target.parentElement.dataset.peerID;\r\n if (!isNaN(peerID)) {\r\n this.setPeer(peerID);\r\n }\r\n }\r\n //console.log('chatInner click', e);\r\n });\r\n this.closeBtn.addEventListener('click', () => {\r\n this.setPeer(0);\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(this.peerID));\r\n this.btnMute.addEventListener('click', () => this.mutePeer(this.peerID));\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 == 'Escape') {\r\n if (appMediaViewer_1.default.wholeDiv.classList.contains('active')) {\r\n appMediaViewer_1.default.buttons.close.click();\r\n }\r\n else if (appForward_1.default.container.classList.contains('active')) {\r\n appForward_1.default.close();\r\n }\r\n else if (this.chatInputC.replyElements.container.classList.contains('active')) {\r\n this.chatInputC.replyElements.cancelBtn.click();\r\n }\r\n else if (this.peerID != 0) { // hide current dialog\r\n this.setPeer(0);\r\n }\r\n }\r\n else 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.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.attach();\r\n this.stickyIntersector = new stickyIntersector_1.default(this.scrollable.container, (stuck, target) => {\r\n for (let timestamp in this.dateMessages) {\r\n let dateMessage = this.dateMessages[timestamp];\r\n if (dateMessage.container == target) {\r\n dateMessage.div.classList.toggle('is-sticky', stuck);\r\n break;\r\n }\r\n }\r\n });\r\n this.unreadedObserver = new IntersectionObserver((entries) => {\r\n let readed = [];\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n let target = entry.target;\r\n let mid = +target.dataset.mid;\r\n readed.push(mid);\r\n this.unreadedObserver.unobserve(target);\r\n this.unreaded.findAndSplice(id => id == mid);\r\n }\r\n });\r\n if (readed.length) {\r\n let max = Math.max(...readed);\r\n let length = readed.length;\r\n for (let i = this.unreaded.length - 1; i >= 0; --i) {\r\n let mid = this.unreaded[i];\r\n if (mid < max) {\r\n length++;\r\n this.unreaded.splice(i, 1);\r\n }\r\n }\r\n this.log('will readHistory by ids:', max, length);\r\n /* if(this.peerID < 0) {\r\n max = appMessagesIDsManager.getMessageIDInfo(max)[0];\r\n } */\r\n //appMessagesManager.readMessages(readed);\r\n /* false && */ appMessagesManager_1.default.readHistory(this.peerID, max, length).catch((err) => {\r\n this.log.error('readHistory err:', err);\r\n appMessagesManager_1.default.readHistory(this.peerID, max, length);\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 getAlbumBubble(groupID) {\r\n let group = appMessagesManager_1.default.groupedMessagesStorage[groupID];\r\n for (let i in group) {\r\n let mid = +i;\r\n if (this.bubbles[mid])\r\n return {\r\n bubble: this.bubbles[mid],\r\n message: appMessagesManager_1.default.getMessage(mid)\r\n };\r\n }\r\n return null;\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 // warning, если иды только отрицательные то вниз не попадёт (хотя мб и так не попадёт)\r\n let history = Object.keys(this.bubbles).map(id => +id).filter(id => id > 0).sort((a, b) => a - b);\r\n if (!history.length)\r\n return;\r\n if (top && !this.scrolledAll) {\r\n this.log('Will load more (up) history by id:', history[0], 'maxID:', history[history.length - 1], history);\r\n /* if(history.length == 75) {\r\n this.log('load more', this.scrollable.scrollHeight, this.scrollable.scrollTop, this.scrollable);\r\n return;\r\n } */\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 scroll down after search\r\n if (!top && (!dialog || history.indexOf(dialog.top_message) === -1)) {\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 //if(this.scrollable.scrollLocked) return;\r\n this.onScrollRAF = window.requestAnimationFrame(() => {\r\n lottieLoader_1.default.checkAnimations(false, 'chat');\r\n if (this.isScrollingTimeout) {\r\n clearTimeout(this.isScrollingTimeout);\r\n }\r\n else if (!this.chatInner.classList.contains('is-scrolling')) {\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 - Math.round(this.scroll.scrollTop + this.scroll.offsetHeight) <= 1 /* <= 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_new_1.default(this.bubblesContainer, 'y', 'IM', this.chatInner, 300);\r\n this.scroll = this.scrollable.container;\r\n this.bubblesContainer.append(this.goDownBtn);\r\n this.scrollable.onScrolledTop = () => this.loadMoreHistory(true);\r\n this.scrollable.onScrolledBottom = () => this.loadMoreHistory(false);\r\n //this.scrollable.attachSentinels(undefined, 300);\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 appProfileManager_1.default.getChatFull(chat.id).then((chatInfo) => {\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 && chatInfo.participants.participants && chatInfo.participants.participants.length);\r\n if (participants_count) {\r\n let subtitle = utils_1.numberWithCommas(participants_count) + ' ' + (isChannel ? 'subscribers' : 'members');\r\n this.subtitleEl.innerText = appSidebarRight_1.default.profileElements.subtitle.innerText = subtitle;\r\n if (participants_count < 2)\r\n return;\r\n appChatsManager_1.default.getOnlines(chat.id).then(onlines => {\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 });\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 = appUsersManager_1.default.getUserStatusString(user.id);\r\n if (subtitle == 'online') {\r\n this.subtitleEl.classList.add('online');\r\n appSidebarRight_1.default.profileElements.subtitle.classList.add('online');\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 else {\r\n this.subtitleEl.innerText = 'bot';\r\n appSidebarRight_1.default.profileElements.subtitle.innerText = 'bot';\r\n }\r\n }\r\n cleanup(bubblesToo = false) {\r\n ////console.time('appImManager cleanup');\r\n this.scrolledAll = false;\r\n this.scrolledAllDown = false;\r\n this.bubbles = {};\r\n this.dateMessages = {};\r\n this.bubbleGroups.cleanup();\r\n this.unreadOut.clear();\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 if (bubblesToo) {\r\n this.scrollable.container.innerHTML = '';\r\n }\r\n this.peerChanged = false;\r\n this.firstUnreadBubble = null;\r\n this.attachedUnreadBubble = false;\r\n this.messagesQueue.length = 0;\r\n this.messagesQueuePromise = null;\r\n lottieLoader_1.default.checkAnimations(false, 'chat', true);\r\n this.getHistoryTopPromise = this.getHistoryBottomPromise = undefined;\r\n this.stickyIntersector.disconnect();\r\n this.unreadedObserver.disconnect();\r\n this.unreaded.length = 0;\r\n this.loadedTopTimes = this.loadedBottomTimes = 0;\r\n this.cleanupID++;\r\n ////console.timeEnd('appImManager cleanup');\r\n }\r\n setPeer(peerID, lastMsgID) {\r\n var _a;\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(true);\r\n this.peerID = utils_1.$rootScope.selectedPeerID = 0;\r\n utils_1.$rootScope.$broadcast('peer_changed', this.peerID);\r\n if (window.innerWidth <= 720) {\r\n this.selectTab(0);\r\n }\r\n return false;\r\n }\r\n const samePeer = this.peerID == peerID;\r\n if (this.setPeerPromise && samePeer)\r\n return this.setPeerPromise;\r\n const dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0] || null;\r\n const topMessage = lastMsgID <= 0 ? lastMsgID : (_a = dialog === null || dialog === void 0 ? void 0 : dialog.top_message) !== null && _a !== void 0 ? _a : 0;\r\n const isTarget = lastMsgID !== undefined;\r\n if (!isTarget && dialog) {\r\n if (dialog.unread_count && !samePeer) {\r\n lastMsgID = dialog.read_inbox_max_id;\r\n }\r\n else {\r\n lastMsgID = dialog.top_message;\r\n }\r\n }\r\n if (samePeer) {\r\n if (this.bubbles[lastMsgID]) {\r\n if (dialog && lastMsgID == topMessage) {\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 if (isTarget) {\r\n this.scrollable.scrollIntoView(this.bubbles[lastMsgID]);\r\n this.highlightBubble(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 // set new\r\n this.peerID = utils_1.$rootScope.selectedPeerID = peerID;\r\n this.log('setPeer peerID:', this.peerID, dialog, lastMsgID, topMessage);\r\n if (window.innerWidth <= 720) {\r\n this.selectTab(1);\r\n }\r\n const isJump = lastMsgID != topMessage;\r\n // add last message, bc in getHistory will load < max_id\r\n const additionMsgID = isJump ? 0 : topMessage;\r\n /* this.setPeerPromise = null;\r\n this.preloader.detach();\r\n return true; */\r\n //////appSidebarRight.toggleSidebar(true);\r\n const maxBubbleID = samePeer && Math.max(...Object.keys(this.bubbles).map(mid => +mid));\r\n const oldChatInner = this.chatInner;\r\n this.cleanup();\r\n this.chatInner = document.createElement('div');\r\n this.chatInner.id = 'bubbles-inner';\r\n this.scrollable.appendTo = this.chatInner;\r\n this.chatInner.className = oldChatInner.className;\r\n this.chatInner.classList.add('disable-hover', 'is-scrolling');\r\n this.lazyLoadQueue.lock();\r\n const { promise, cached } = this.getHistory(lastMsgID, true, isJump, additionMsgID);\r\n if (!samePeer) {\r\n appSidebarRight_1.default.setPeer(this.peerID);\r\n }\r\n else {\r\n this.peerChanged = true;\r\n }\r\n // clear \r\n if (!cached) {\r\n this.scrollable.container.innerHTML = '';\r\n //oldChatInner.remove();\r\n !samePeer && this.finishPeerChange();\r\n this.preloader.attach(this.bubblesContainer);\r\n }\r\n //console.timeEnd('appImManager setPeer pre promise');\r\n this.setPeerPromise = Promise.all([\r\n promise.then(() => {\r\n ////this.log('setPeer removing preloader');\r\n if (cached) {\r\n this.scrollable.container.innerHTML = '';\r\n //oldChatInner.remove();\r\n !samePeer && this.finishPeerChange();\r\n }\r\n else {\r\n this.preloader.detach();\r\n }\r\n this.scrollable.container.append(this.chatInner);\r\n //this.scrollable.attachSentinels();\r\n //this.scrollable.container.insertBefore(this.chatInner, this.scrollable.container.lastElementChild);\r\n this.lazyLoadQueue.unlock();\r\n if (dialog && lastMsgID && lastMsgID != topMessage && (this.bubbles[lastMsgID] || this.firstUnreadBubble)) {\r\n if (this.scrollable.scrollLocked) {\r\n clearTimeout(this.scrollable.scrollLocked);\r\n this.scrollable.scrollLocked = 0;\r\n }\r\n const fromUp = maxBubbleID > 0 && (maxBubbleID < lastMsgID || lastMsgID < 0);\r\n const forwardingUnread = dialog.read_inbox_max_id == lastMsgID;\r\n if (!fromUp && (samePeer || forwardingUnread)) {\r\n this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n }\r\n const bubble = forwardingUnread ? (this.firstUnreadBubble || this.bubbles[lastMsgID]) : this.bubbles[lastMsgID];\r\n this.scrollable.scrollIntoView(bubble, samePeer /* , fromUp */);\r\n if (!forwardingUnread) {\r\n this.highlightBubble(bubble);\r\n }\r\n }\r\n else {\r\n this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n }\r\n // warning\r\n if (!lastMsgID || this.bubbles[topMessage] || lastMsgID == topMessage) {\r\n this.scrolledAllDown = true;\r\n }\r\n this.log('scrolledAllDown:', this.scrolledAllDown);\r\n //if(!this.unreaded.length && dialog) { // lol\r\n if (this.scrolledAllDown && dialog) { // lol\r\n appMessagesManager_1.default.readHistory(peerID, dialog.top_message);\r\n }\r\n this.chatInner.classList.remove('disable-hover', 'is-scrolling'); // warning, performance!\r\n //console.timeEnd('appImManager setPeer');\r\n return true;\r\n }).catch(err => {\r\n this.log.error('getHistory promise error:', err);\r\n throw err;\r\n })\r\n ]).catch(err => {\r\n this.log.error('setPeer promises error:', err);\r\n this.preloader.detach();\r\n //oldChatInner.remove();\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 //if(this.messagesQueuePromise) {\r\n //appSidebarRight.setLoadMutex(this.setPeerPromise);\r\n //}\r\n appSidebarRight_1.default.setLoadMutex(this.setPeerPromise);\r\n appSidebarRight_1.default.loadSidebarMedia(true);\r\n return this.setPeerPromise;\r\n }\r\n finishPeerChange() {\r\n if (this.peerChanged)\r\n return;\r\n let peerID = this.peerID;\r\n this.peerChanged = true;\r\n this.avatarEl.setAttribute('peer', '' + this.peerID);\r\n const isChannel = appPeersManager_1.default.isChannel(peerID);\r\n const hasRights = isChannel && appChatsManager_1.default.hasRights(-peerID, 'send');\r\n this.chatInner.classList.toggle('has-rights', hasRights);\r\n this.chatInput.style.display = !isChannel || hasRights ? '' : 'none';\r\n this.topbar.classList.remove('is-pinned-shown');\r\n this.topbar.style.display = '';\r\n this.chatInner.classList.toggle('is-chat', appPeersManager_1.default.isAnyGroup(peerID) || peerID == this.myID);\r\n this.chatInner.classList.toggle('is-channel', isChannel);\r\n this.btnMute.style.display = appPeersManager_1.default.isBroadcast(peerID) ? '' : 'none';\r\n window.requestAnimationFrame(() => {\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_1.default.profileElements.name.innerHTML = title;\r\n this.goDownBtn.style.display = '';\r\n this.setPeerStatus(true);\r\n });\r\n appSidebarRight_1.default.fillProfileElements();\r\n utils_1.$rootScope.$broadcast('peer_changed', this.peerID);\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 for (let msgID of this.unreadOut) {\r\n if (msgID > 0 && msgID <= maxID) {\r\n let bubble = this.bubbles[msgID];\r\n if (bubble) {\r\n bubble.classList.remove('is-sent');\r\n bubble.classList.add('is-read');\r\n }\r\n this.unreadOut.delete(msgID);\r\n }\r\n }\r\n }\r\n deleteMessagesByIDs(msgIDs) {\r\n msgIDs.forEach(id => {\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 if (this.firstUnreadBubble == bubble) {\r\n this.firstUnreadBubble = null;\r\n }\r\n this.bubbleGroups.removeBubble(bubble, id);\r\n this.unreadedObserver.unobserve(bubble);\r\n //this.unreaded.findAndSplice(mid => mid == id);\r\n this.scrollable.removeElement(bubble);\r\n //bubble.remove();\r\n });\r\n lottieLoader_1.default.checkAnimations();\r\n this.deleteEmptyDateGroups();\r\n }\r\n renderNewMessagesByIDs(msgIDs, scrolledDown = this.scrolledDown) {\r\n if (!this.scrolledAllDown) { // seems search active or sliced\r\n this.log('seems search is active, skipping render:', msgIDs);\r\n return;\r\n }\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) this.scrollable.scrollTop = this.scrollable.scrollHeight;\r\n if (this.messagesQueuePromise && scrolledDown) {\r\n this.scrollable.scrollTo(this.scrollable.scrollHeight - 1, false, true);\r\n this.messagesQueuePromise.then(() => {\r\n this.log('messagesQueuePromise after:', this.chatInner.childElementCount, this.scrollable.scrollHeight);\r\n this.scrollable.scrollTo(this.scrollable.scrollHeight, true, true);\r\n setTimeout(() => {\r\n this.log('messagesQueuePromise afterafter:', this.chatInner.childElementCount, this.scrollable.scrollHeight);\r\n }, 10);\r\n });\r\n }\r\n }\r\n highlightBubble(element) {\r\n if (element.dataset.timeout) {\r\n clearTimeout(+element.dataset.timeout);\r\n element.classList.remove('is-selected');\r\n void element.offsetWidth; // reflow\r\n }\r\n element.classList.add('is-selected');\r\n element.dataset.timeout = '' + setTimeout(() => {\r\n element.classList.remove('is-selected');\r\n delete element.dataset.timeout;\r\n }, 2000);\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 = `<div class=\"bubble__container\"><div class=\"service-msg\">${str}</div></div>`;\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 //this.scrollable.prepareElement(div, false);\r\n if (reverse) {\r\n //let scrollTopPrevious = this.scrollable.scrollTop;\r\n this.scrollable.prepend(container, false);\r\n /* if(!scrollTopPrevious) {\r\n this.scrollable.scrollTop += container.scrollHeight;\r\n } */\r\n }\r\n else {\r\n this.scrollable.append(container, false);\r\n }\r\n this.stickyIntersector.observeStickyHeaderChanges(container);\r\n }\r\n return this.dateMessages[dateTimestamp];\r\n }\r\n renderMessagesQueue(message, bubble, reverse) {\r\n let promises = [];\r\n Array.from(bubble.querySelectorAll('img, video')).forEach(el => {\r\n if (el instanceof HTMLVideoElement) {\r\n let source = el.firstElementChild;\r\n if (!source || !source.src) {\r\n this.log.warn('no source', el, source, 'src', source.src);\r\n return;\r\n }\r\n else if (el.readyState >= 4)\r\n return;\r\n }\r\n else if (el.complete || !el.src)\r\n return;\r\n let src = el.src;\r\n let promise = new Promise((resolve, reject) => {\r\n let r;\r\n let onLoad = () => {\r\n clearTimeout(timeout);\r\n resolve();\r\n };\r\n if (el instanceof HTMLVideoElement) {\r\n el.addEventListener('loadeddata', onLoad);\r\n r = () => el.readyState >= 4;\r\n }\r\n else {\r\n el.addEventListener('load', onLoad);\r\n r = () => el.complete;\r\n }\r\n // for safari\r\n let c = () => r() ? onLoad() : window.requestAnimationFrame(c);\r\n window.requestAnimationFrame(c);\r\n let timeout = setTimeout(() => {\r\n console.log('did not called', el, el.parentElement, el.complete, src);\r\n reject();\r\n }, 1500);\r\n });\r\n promises.push(promise);\r\n });\r\n this.messagesQueue.push({ message, bubble, reverse, promises });\r\n if (!this.messagesQueuePromise) {\r\n this.messagesQueuePromise = new Promise((resolve, reject) => {\r\n setTimeout(() => {\r\n let chatInner = this.chatInner;\r\n let queue = this.messagesQueue.slice();\r\n this.messagesQueue.length = 0;\r\n let promises = queue.reduce((acc, { promises }) => acc.concat(promises), []);\r\n //console.log('promises to call', promises, queue);\r\n Promise.all(promises).then(() => {\r\n if (this.chatInner != chatInner) {\r\n this.log.warn('chatInner changed!', this.chatInner, chatInner);\r\n return reject('chatInner changed!');\r\n }\r\n if (this.messagesQueueOnRender) {\r\n this.messagesQueueOnRender();\r\n }\r\n queue.forEach(({ message, bubble, reverse }) => {\r\n let dateMessage = this.getDateContainerByMessage(message, reverse);\r\n if (reverse) {\r\n dateMessage.container.insertBefore(bubble, dateMessage.div.nextSibling);\r\n //this.scrollable.prepareElement(bubble, false);\r\n }\r\n else {\r\n dateMessage.container.append(bubble);\r\n //this.scrollable.prepareElement(bubble, true);\r\n }\r\n });\r\n resolve();\r\n this.messagesQueuePromise = null;\r\n }, reject);\r\n }, 0);\r\n });\r\n }\r\n }\r\n getMiddleware() {\r\n let cleanupID = this.cleanupID;\r\n return () => {\r\n return this.cleanupID == cleanupID;\r\n };\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 //return;\r\n if (message.deleted)\r\n return;\r\n else if (message.grouped_id) { // will render only last album's message\r\n let storage = appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id];\r\n let maxID = Math.max(...Object.keys(storage).map(i => +i));\r\n if (message.mid < maxID) {\r\n return;\r\n }\r\n }\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 if (bubble == this.firstUnreadBubble) {\r\n bubble.classList.add('is-first-unread');\r\n }\r\n //bubble.innerHTML = '';\r\n }\r\n bubble.dataset.mid = message.mid;\r\n if (message._ == 'messageService') {\r\n let action = message.action;\r\n let _ = action._;\r\n if (IGNOREACTIONS.indexOf(_) !== -1) {\r\n return bubble;\r\n }\r\n bubble.className = 'bubble service';\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 str = '';\r\n if (action.message) {\r\n str = richtextprocessor_1.RichTextProcessor.wrapRichText(action.message, { noLinebreaks: true });\r\n }\r\n else {\r\n if (_ == \"messageActionPhoneCall\") {\r\n _ += '.' + action.type;\r\n }\r\n // @ts-ignore\r\n let l = utils_1.langPack[_];\r\n if (!l) {\r\n l = '[' + _ + ']';\r\n }\r\n str = l[0].toUpperCase() == l[0] ? l : (name.innerText ? name.outerHTML + ' ' : '') + l;\r\n }\r\n bubbleContainer.innerHTML = `<div class=\"service-msg\">${str}</div>`;\r\n if (updatePosition) {\r\n this.renderMessagesQueue(message, bubble, reverse);\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) + ' <i class=\"tgico-channelviews\"></i> ' + time;\r\n }\r\n if (message.edit_date) {\r\n bubble.classList.add('is-edited');\r\n time = '<i class=\"edited\">edited</i> ' + 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 messageMessage, totalEntities;\r\n if (message.grouped_id) {\r\n let group = appMessagesManager_1.default.groupedMessagesStorage[message.grouped_id];\r\n let foundMessages = 0;\r\n for (let i in group) {\r\n let m = group[i];\r\n if (m.message) {\r\n if (++foundMessages > 1)\r\n break;\r\n messageMessage = m.message;\r\n totalEntities = m.totalEntities;\r\n }\r\n }\r\n if (foundMessages > 1) {\r\n messageMessage = undefined;\r\n totalEntities = undefined;\r\n }\r\n }\r\n if (!messageMessage && !totalEntities) {\r\n messageMessage = message.message;\r\n totalEntities = message.totalEntities;\r\n }\r\n let richText = richtextprocessor_1.RichTextProcessor.wrapRichText(messageMessage, {\r\n entities: totalEntities\r\n });\r\n let messageMedia = message.media;\r\n if (totalEntities) {\r\n let emojiEntities = totalEntities.filter((e) => e._ == 'messageEntityEmoji');\r\n let strLength = messageMessage.length;\r\n let emojiStrLength = emojiEntities.reduce((acc, curr) => acc + curr.length, 0);\r\n if (emojiStrLength == strLength && emojiEntities.length <= 3) {\r\n let sticker = appStickersManager_1.default.getAnimatedEmojiSticker(messageMessage);\r\n if (emojiEntities.length == 1 && !messageMedia && sticker) {\r\n messageMedia = {\r\n _: 'messageMediaDocument',\r\n document: sticker\r\n };\r\n }\r\n else {\r\n let attachmentDiv = document.createElement('div');\r\n attachmentDiv.classList.add('attachment');\r\n attachmentDiv.innerHTML = richText;\r\n bubble.classList.add('emoji-' + emojiEntities.length + 'x');\r\n bubbleContainer.append(attachmentDiv);\r\n }\r\n bubble.classList.add('is-message-empty', 'emoji-big');\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 (message.reply_markup && message.reply_markup._ == 'replyInlineMarkup' && message.reply_markup.rows && message.reply_markup.rows.length) {\r\n let rows = message.reply_markup.rows;\r\n let containerDiv = document.createElement('div');\r\n containerDiv.classList.add('reply-markup');\r\n rows.forEach((row) => {\r\n let buttons = row.buttons;\r\n if (!buttons || !buttons.length)\r\n return;\r\n let rowDiv = document.createElement('div');\r\n rowDiv.classList.add('reply-markup-row');\r\n buttons.forEach((button) => {\r\n let text = richtextprocessor_1.RichTextProcessor.wrapRichText(button.text, { noLinks: true, noLinebreaks: true });\r\n let buttonEl;\r\n switch (button._) {\r\n case 'keyboardButtonUrl': {\r\n let from = appUsersManager_1.default.getUser(message.fromID);\r\n let unsafe = !(from && from.pFlags && from.pFlags.verified);\r\n let url = richtextprocessor_1.RichTextProcessor.wrapUrl(button.url, unsafe);\r\n buttonEl = document.createElement('a');\r\n buttonEl.href = url;\r\n buttonEl.rel = 'noopener noreferrer';\r\n buttonEl.target = '_blank';\r\n buttonEl.classList.add('is-link', 'tgico');\r\n break;\r\n }\r\n default: {\r\n buttonEl = document.createElement('button');\r\n break;\r\n }\r\n }\r\n buttonEl.classList.add('reply-markup-button', 'rp');\r\n buttonEl.innerHTML = text;\r\n misc_1.ripple(buttonEl);\r\n rowDiv.append(buttonEl);\r\n });\r\n containerDiv.append(rowDiv);\r\n });\r\n containerDiv.addEventListener('click', (e) => {\r\n let target = e.target;\r\n if (!target.classList.contains('reply-markup-button'))\r\n target = utils_1.findUpClassName(target, 'reply-markup-button');\r\n if (!target)\r\n return;\r\n let column = utils_1.whichChild(target);\r\n let row = rows[utils_1.whichChild(target.parentElement)];\r\n if (!row.buttons || !row.buttons[column]) {\r\n this.log.warn('no such button', row, column, message);\r\n return;\r\n }\r\n let button = row.buttons[column];\r\n AppInlineBotsManager_1.default.callbackButtonClick(message.mid, button);\r\n });\r\n let offset = rows.length * 45 + 'px';\r\n bubbleContainer.style.marginBottom = offset;\r\n containerDiv.style.bottom = '-' + offset;\r\n bubbleContainer.prepend(containerDiv);\r\n }\r\n if (our) {\r\n if (message.pFlags.unread || message.mid < 0)\r\n this.unreadOut.add(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.unreadedObserver.observe(bubble);\r\n if (!this.unreaded.indexOf(message.mid)) {\r\n this.unreaded.push(message.mid);\r\n }\r\n }\r\n }\r\n const isOut = our && (!message.fwd_from || this.peerID != this.myID);\r\n // media\r\n if (messageMedia /* && messageMedia._ == 'messageMediaPhoto' */) {\r\n let attachmentDiv = document.createElement('div');\r\n attachmentDiv.classList.add('attachment');\r\n if (!messageMessage) {\r\n bubble.classList.add('is-message-empty');\r\n }\r\n let processingWebPage = false;\r\n switch (messageMedia._) {\r\n case 'messageMediaPending': {\r\n let pending = messageMedia;\r\n let preloader = pending.preloader;\r\n switch (pending.type) {\r\n case 'album': {\r\n this.log('will wrap pending album');\r\n bubble.classList.add('hide-name', 'photo', 'is-album');\r\n wrappers_1.wrapAlbum({\r\n groupID: '' + message.id,\r\n attachmentDiv,\r\n uploading: true,\r\n isOut: true\r\n });\r\n break;\r\n }\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 bubble.classList.add('hide-name', 'photo');\r\n //}\r\n break;\r\n }\r\n case 'video': {\r\n //if(pending.size < 5e6) {\r\n let doc = appDocsManager_1.default.getDoc(message.id);\r\n this.log('will wrap pending video:', pending, message, doc);\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n boxWidth: 480,\r\n boxHeight: 480,\r\n withTail: doc.type != 'round',\r\n isOut: isOut,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: null\r\n });\r\n preloader.attach(attachmentDiv, false);\r\n bubble.classList.add('hide-name', 'video');\r\n //}\r\n break;\r\n }\r\n case 'audio':\r\n case 'voice':\r\n case 'document': {\r\n let doc = appDocsManager_1.default.getDoc(message.id);\r\n this.log('will wrap pending doc:', doc);\r\n let docDiv = wrappers_1.wrapDocument(doc, false, true);\r\n let icoDiv = docDiv.querySelector('.audio-download, .document-ico');\r\n preloader.attach(icoDiv, false);\r\n if (pending.type == 'voice') {\r\n bubble.classList.add('bubble-audio');\r\n }\r\n bubble.classList.remove('is-message-empty');\r\n messageDiv.classList.add((pending.type || 'document') + '-message');\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 = messageMedia.photo;\r\n ////////this.log('messageMediaPhoto', photo);\r\n bubble.classList.add('hide-name', 'photo');\r\n if (message.grouped_id) {\r\n bubble.classList.add('is-album');\r\n wrappers_1.wrapAlbum({\r\n groupID: message.grouped_id,\r\n attachmentDiv,\r\n middleware: this.getMiddleware(),\r\n isOut: our,\r\n lazyLoadQueue: this.lazyLoadQueue\r\n });\r\n }\r\n else {\r\n wrappers_1.wrapPhoto(photo.id, message, attachmentDiv, undefined, undefined, true, isOut, this.lazyLoadQueue, this.getMiddleware());\r\n }\r\n break;\r\n }\r\n case 'messageMediaWebPage': {\r\n processingWebPage = true;\r\n let webpage = messageMedia.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 previewResizer, preview;\r\n if (webpage.photo || webpage.document) {\r\n previewResizer = document.createElement('div');\r\n previewResizer.classList.add('preview-resizer');\r\n preview = document.createElement('div');\r\n preview.classList.add('preview');\r\n previewResizer.append(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 boxWidth: 480,\r\n boxHeight: 400,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: this.getMiddleware(),\r\n isOut\r\n });\r\n //}\r\n }\r\n else {\r\n doc = null;\r\n }\r\n }\r\n if (previewResizer) {\r\n quote.append(previewResizer);\r\n }\r\n let quoteTextDiv = document.createElement('div');\r\n quoteTextDiv.classList.add('quote-text');\r\n if (webpage.site_name) {\r\n let nameEl = document.createElement('a');\r\n nameEl.classList.add('name');\r\n nameEl.setAttribute('target', '_blank');\r\n nameEl.href = webpage.url || '#';\r\n nameEl.innerHTML = richtextprocessor_1.RichTextProcessor.wrapEmojiText(webpage.site_name);\r\n quoteTextDiv.append(nameEl);\r\n }\r\n if (webpage.title) {\r\n let titleDiv = document.createElement('div');\r\n titleDiv.classList.add('title');\r\n titleDiv.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.title);\r\n quoteTextDiv.append(titleDiv);\r\n }\r\n if (webpage.description) {\r\n let textDiv = document.createElement('div');\r\n textDiv.classList.add('text');\r\n textDiv.innerHTML = richtextprocessor_1.RichTextProcessor.wrapRichText(webpage.description);\r\n quoteTextDiv.append(textDiv);\r\n }\r\n quote.append(quoteTextDiv);\r\n if (webpage.photo && !doc) {\r\n bubble.classList.add('photo');\r\n const size = webpage.photo.sizes[webpage.photo.sizes.length - 1];\r\n if (size.w == size.h && quoteTextDiv.childElementCount) {\r\n bubble.classList.add('is-square-photo');\r\n }\r\n else if (size.h > size.w) {\r\n bubble.classList.add('is-vertical-photo');\r\n }\r\n wrappers_1.wrapPhoto(webpage.photo.id, message, preview, 480, 400, false, null, this.lazyLoadQueue, this.getMiddleware());\r\n }\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 = messageMedia.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 let size = bubble.classList.contains('emoji-big') ? 140 : 200;\r\n appPhotosManager_1.default.setAttachmentSize(doc, attachmentDiv, size, size, 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({\r\n doc,\r\n div: attachmentDiv,\r\n middleware: this.getMiddleware(),\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n group: 'chat',\r\n play: !!message.pending || !multipleRender,\r\n emoji: bubble.classList.contains('emoji-big') ? messageMessage : undefined\r\n });\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 if (message.grouped_id) {\r\n bubble.classList.add('is-album');\r\n wrappers_1.wrapAlbum({\r\n groupID: message.grouped_id,\r\n attachmentDiv,\r\n middleware: this.getMiddleware(),\r\n isOut: our,\r\n lazyLoadQueue: this.lazyLoadQueue\r\n });\r\n }\r\n else {\r\n wrappers_1.wrapVideo({\r\n doc,\r\n container: attachmentDiv,\r\n message,\r\n boxWidth: 480,\r\n boxHeight: 480,\r\n withTail: doc.type != 'round',\r\n isOut: isOut,\r\n lazyLoadQueue: this.lazyLoadQueue,\r\n middleware: this.getMiddleware()\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 messageDiv.classList.add((doc.type || 'document') + '-message');\r\n processingWebPage = true;\r\n break;\r\n }\r\n break;\r\n }\r\n case 'messageMediaContact': {\r\n //this.log('wrapping contact', message);\r\n let contactDiv = document.createElement('div');\r\n contactDiv.classList.add('contact');\r\n contactDiv.dataset.peerID = '' + messageMedia.user_id;\r\n messageDiv.classList.add('contact-message');\r\n processingWebPage = true;\r\n let texts = [];\r\n if (message.media.first_name)\r\n texts.push(richtextprocessor_1.RichTextProcessor.wrapEmojiText(message.media.first_name));\r\n if (message.media.last_name)\r\n texts.push(richtextprocessor_1.RichTextProcessor.wrapEmojiText(message.media.last_name));\r\n contactDiv.innerHTML = `\r\n <div class=\"contact-details\">\r\n <div class=\"contact-name\">${texts.join(' ')}</div>\r\n <div class=\"contact-number\">${message.media.phone_number ? '+' + misc_1.formatPhoneNumber(message.media.phone_number).formatted : 'Unknown phone number'}</div>\r\n </div>`;\r\n let avatarElem = new avatar_1.default();\r\n avatarElem.setAttribute('peer', '' + message.media.user_id);\r\n avatarElem.classList.add('contact-avatar');\r\n contactDiv.prepend(avatarElem);\r\n bubble.classList.remove('is-message-empty');\r\n messageDiv.append(contactDiv);\r\n break;\r\n }\r\n case 'messageMediaPoll': {\r\n bubble.classList.remove('is-message-empty');\r\n let pollElement = wrappers_1.wrapPoll(message.media.poll.id, message.mid);\r\n messageDiv.prepend(pollElement);\r\n break;\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 = richtextprocessor_1.RichTextProcessor.wrapEmojiText(message.fwd_from.from_name);\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 if (this.peerID != this.myID) {\r\n bubble.classList.add('forwarded');\r\n }\r\n if (message.savedFrom) {\r\n let goto = document.createElement('div');\r\n goto.classList.add('goto-original', 'tgico-next');\r\n /* fwd.innerHTML = `\r\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 24 24\">\r\n <defs>\r\n <path d=\"M13.55 3.24L13.64 3.25L13.73 3.27L13.81 3.29L13.9 3.32L13.98 3.35L14.06 3.39L14.14 3.43L14.22 3.48L14.29 3.53L14.36 3.59L14.43 3.64L22.23 10.85L22.36 10.99L22.48 11.15L22.57 11.31L22.64 11.48L22.69 11.66L22.72 11.85L22.73 12.04L22.71 12.22L22.67 12.41L22.61 12.59L22.53 12.76L22.42 12.93L22.29 13.09L22.23 13.15L14.43 20.36L14.28 20.48L14.12 20.58L13.95 20.66L13.77 20.72L13.58 20.76L13.4 20.77L13.22 20.76L13.03 20.73L12.85 20.68L12.68 20.61L12.52 20.52L12.36 20.4L12.22 20.27L12.16 20.2L12.1 20.13L12.05 20.05L12.01 19.98L11.96 19.9L11.93 19.82L11.89 19.73L11.87 19.65L11.84 19.56L11.83 19.47L11.81 19.39L11.81 19.3L11.8 19.2L11.8 16.42L11 16.49L10.23 16.58L9.51 16.71L8.82 16.88L8.18 17.09L7.57 17.33L7.01 17.6L6.48 17.91L5.99 18.26L5.55 18.64L5.14 19.05L4.77 19.51L4.43 19.99L4.29 20.23L4.21 20.35L4.11 20.47L4 20.57L3.88 20.65L3.75 20.72L3.62 20.78L3.48 20.82L3.33 20.84L3.19 20.84L3.04 20.83L2.9 20.79L2.75 20.74L2.62 20.68L2.53 20.62L2.45 20.56L2.38 20.5L2.31 20.43L2.25 20.36L2.2 20.28L2.15 20.19L2.11 20.11L2.07 20.02L2.04 19.92L2.02 19.83L2.01 19.73L2 19.63L2.04 17.99L2.19 16.46L2.46 15.05L2.85 13.75L3.35 12.58L3.97 11.53L4.7 10.6L5.55 9.8L6.51 9.12L7.59 8.56L8.77 8.13L10.07 7.83L11.48 7.65L11.8 7.63L11.8 4.8L11.91 4.56L12.02 4.35L12.14 4.16L12.25 3.98L12.37 3.82L12.48 3.68L12.61 3.56L12.73 3.46L12.85 3.38L12.98 3.31L13.11 3.27L13.24 3.24L13.37 3.23L13.46 3.23L13.55 3.24Z\" id=\"b13RmHDQtl\"></path>\r\n </defs>\r\n <use xlink:href=\"#b13RmHDQtl\" opacity=\"1\" fill=\"#fff\" fill-opacity=\"1\"></use>\r\n </svg>`; */\r\n bubbleContainer.append(goto);\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.dataset.peerID = message.fwdFromID;\r\n if (this.peerID == this.myID) {\r\n nameDiv.style.color = appPeersManager_1.default.getPeerColorByID(message.fwdFromID, false);\r\n nameDiv.innerHTML = title;\r\n }\r\n else {\r\n nameDiv.innerHTML = 'Forwarded from ' + title;\r\n }\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));\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 || (this.peerID == this.myID && !message.reply_to_mid)) {\r\n let avatarElem = new avatar_1.default();\r\n avatarElem.classList.add('user-avatar');\r\n if (!message.fromID && message.fwd_from && message.fwd_from.from_name) {\r\n avatarElem.setAttribute('peer-title', message.fwd_from.from_name);\r\n }\r\n avatarElem.setAttribute('peer', '' + ((message.fwd_from && this.peerID == this.myID ? message.fwdFromID : message.fromID) || 0));\r\n this.log('exec loadDialogPhoto', message);\r\n bubbleContainer.append(avatarElem);\r\n }\r\n }\r\n else {\r\n bubble.classList.add('hide-name');\r\n }\r\n bubble.classList.add(isOut ? 'is-out' : 'is-in');\r\n if (updatePosition) {\r\n this.bubbleGroups.addBubble(bubble, message, reverse);\r\n this.renderMessagesQueue(message, bubble, reverse);\r\n }\r\n else {\r\n this.bubbleGroups.updateGroupByMessageID(message.mid);\r\n }\r\n return bubble;\r\n }\r\n performHistoryResult(history, reverse, isBackLimit, additionMsgID) {\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 /* if(testScroll && additionMsgID) {\r\n for(let i = 0; i < 3; ++i) {\r\n let _history = history.slice();\r\n setTimeout(() => {\r\n this.performHistoryResult(_history, reverse, isBackLimit, 0, resetPromises);\r\n }, 0);\r\n }\r\n } */\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\r\n if (dialog && dialog.top_message) {\r\n for (let mid of history) {\r\n if (mid == dialog.top_message) {\r\n this.scrolledAllDown = true;\r\n break;\r\n }\r\n }\r\n }\r\n console.time('appImManager render history');\r\n return new Promise((resolve, reject) => {\r\n let method = (reverse ? history.shift : history.pop).bind(history);\r\n let realLength = this.scrollable.length;\r\n let previousScrollHeightMinusTop;\r\n if (realLength > 0 && reverse) { // for safari need set when scrolling bottom too\r\n this.messagesQueueOnRender = () => {\r\n let scrollTop = this.scrollable.scrollTop;\r\n previousScrollHeightMinusTop = this.scrollable.scrollHeight - scrollTop;\r\n /* if(reverse) {\r\n previousScrollHeightMinusTop = this.scrollable.scrollHeight - scrollTop;\r\n } else {\r\n previousScrollHeightMinusTop = scrollTop;\r\n } */\r\n this.log('performHistoryResult: messagesQueueOnRender, scrollTop:', scrollTop, previousScrollHeightMinusTop);\r\n this.messagesQueueOnRender = undefined;\r\n };\r\n }\r\n while (history.length) {\r\n let message = appMessagesManager_1.default.getMessage(method());\r\n this.renderMessage(message, reverse, true);\r\n }\r\n (this.messagesQueuePromise || Promise.resolve()).then(() => {\r\n if (previousScrollHeightMinusTop !== undefined) {\r\n const newScrollTop = reverse ? this.scrollable.scrollHeight - previousScrollHeightMinusTop : previousScrollHeightMinusTop;\r\n this.log('performHistoryResult: will set scrollTop', this.scrollable.scrollHeight, newScrollTop, this.scrollable.container.clientHeight);\r\n this.scrollable.scrollTop = newScrollTop;\r\n }\r\n resolve(true);\r\n }, reject);\r\n }).then(() => {\r\n console.timeEnd('appImManager render history');\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 pageCount = appPhotosManager_1.default.windowH / 38 /* * 1.25 */ | 0;\r\n //let loadCount = Object.keys(this.bubbles).length > 0 ? 50 : pageCount;\r\n let realLoadCount = Object.keys(this.bubbles).length > 0 ? Math.max(40, pageCount) : pageCount; //let realLoadCount = 50;\r\n let loadCount = realLoadCount;\r\n if (testScroll) {\r\n //loadCount = 1;\r\n if (Object.keys(this.bubbles).length > 0)\r\n return { cached: false, promise: 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 if (!reverse) { // if not jump\r\n loadCount = 0;\r\n maxID += 1;\r\n }\r\n }\r\n let result = appMessagesManager_1.default.getHistory(this.peerID, maxID, loadCount, backLimit);\r\n let promise, cached;\r\n if (result instanceof Promise) {\r\n cached = false;\r\n promise = result.then((result) => {\r\n this.log('getHistory not cached result by maxID:', maxID, reverse, isBackLimit, result, peerID);\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);\r\n }, (err) => {\r\n this.log.error('getHistory error:', err);\r\n (reverse ? this.getHistoryTopPromise = undefined : this.getHistoryBottomPromise = undefined);\r\n return false;\r\n });\r\n }\r\n else {\r\n cached = true;\r\n this.log('getHistory cached result by maxID:', maxID, reverse, isBackLimit, result, peerID);\r\n promise = this.performHistoryResult(result.history || [], reverse, isBackLimit, additionMsgID);\r\n //return (reverse ? this.getHistoryTopPromise = promise : this.getHistoryBottomPromise = promise);\r\n //return this.performHistoryResult(result.history || [], reverse, isBackLimit, additionMsgID, true);\r\n }\r\n (reverse ? this.getHistoryTopPromise = promise : this.getHistoryBottomPromise = promise);\r\n /* false && */ promise.then(() => {\r\n if (reverse) {\r\n this.loadedTopTimes++;\r\n this.loadedBottomTimes = Math.max(0, --this.loadedBottomTimes);\r\n }\r\n else {\r\n this.loadedBottomTimes++;\r\n this.loadedTopTimes = Math.max(0, --this.loadedTopTimes);\r\n }\r\n let ids;\r\n if ((reverse && this.loadedTopTimes > 2) || (!reverse && this.loadedBottomTimes > 2)) {\r\n ids = Object.keys(this.bubbles).map(i => +i).sort((a, b) => a - b);\r\n }\r\n //let removeCount = loadCount / 2;\r\n let safeCount = realLoadCount * 2; // cause i've been runningrunningrunning all day\r\n this.log('getHistory: slice loadedTimes:', reverse, pageCount, this.loadedTopTimes, this.loadedBottomTimes, ids && ids.length, safeCount);\r\n if (ids && ids.length > safeCount) {\r\n if (reverse) {\r\n //ids = ids.slice(-removeCount);\r\n //ids = ids.slice(removeCount * 2);\r\n ids = ids.slice(safeCount);\r\n this.scrolledAllDown = false;\r\n }\r\n else {\r\n //ids = ids.slice(0, removeCount);\r\n //ids = ids.slice(0, ids.length - (removeCount * 2));\r\n ids = ids.slice(0, ids.length - safeCount);\r\n this.scrolledAll = false;\r\n this.log('getHistory: slice bottom: to:', ids.length, loadCount);\r\n }\r\n this.log('getHistory: will slice ids:', ids, reverse);\r\n this.deleteMessagesByIDs(ids);\r\n }\r\n (reverse ? this.getHistoryTopPromise = undefined : this.getHistoryBottomPromise = undefined);\r\n this.setUnreadDelimiter(); // не нашёл места лучше\r\n });\r\n return { cached, promise };\r\n }\r\n setUnreadDelimiter() {\r\n if (this.attachedUnreadBubble) {\r\n return;\r\n }\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.peerID)[0];\r\n if (!(dialog === null || dialog === void 0 ? void 0 : dialog.unread_count))\r\n return;\r\n let maxID = dialog.read_inbox_max_id;\r\n maxID = Object.keys(this.bubbles).filter(mid => !this.bubbles[mid].classList.contains('is-out')).map(i => +i).sort((a, b) => a - b).find(i => i > maxID);\r\n if (maxID && this.bubbles[maxID]) {\r\n let bubble = this.bubbles[maxID];\r\n if (this.firstUnreadBubble && this.firstUnreadBubble != bubble) {\r\n this.firstUnreadBubble.classList.remove('is-first-unread');\r\n this.firstUnreadBubble = null;\r\n }\r\n if (maxID != dialog.top_message) {\r\n bubble.classList.add('is-first-unread');\r\n }\r\n this.firstUnreadBubble = bubble;\r\n this.attachedUnreadBubble = true;\r\n }\r\n }\r\n deleteEmptyDateGroups() {\r\n for (let i in this.dateMessages) {\r\n let dateMessage = this.dateMessages[i];\r\n if (dateMessage.container.childElementCount == 2) { // only date div + sentinel div\r\n dateMessage.container.remove();\r\n this.stickyIntersector.unobserve(dateMessage.container, dateMessage.div);\r\n delete this.dateMessages[i];\r\n }\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 if (appPeersManager_1.default.isBroadcast(this.peerID)) { // not human\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 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 rp && this.btnMenuMute.appendChild(rp);\r\n }\r\n mutePeer(peerID) {\r\n let inputPeer = appPeersManager_1.default.getInputPeerByID(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 let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n let muted = true;\r\n if (dialog && dialog.notify_settings) {\r\n muted = dialog.notify_settings.mute_until > (Date.now() / 1000 | 0);\r\n }\r\n if (!muted) {\r\n settings.flags |= 1 << 2;\r\n settings.mute_until = 2147483647;\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(bool => {\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 }\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\nwindow.appImManager = appImManager;\r\nexports.default = appImManager;\r\n"
},
{
"id": 16,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"name": "./src/lib/appManagers/appProfileManager.ts",
"index": 33,
"index2": 32,
"size": 24638,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "./appProfileManager",
"loc": "21:44-74"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appProfileManager",
"loc": "13:44-74"
},
{
"moduleId": 29,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\avatar.ts",
"module": "./src/components/avatar.ts",
"moduleName": "./src/components/avatar.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appProfileManager",
"loc": "6:44-91"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appProfileManager",
"loc": "42:44-74"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appProfileManager",
"loc": "15:44-86"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appProfileManager",
"loc": "41:44-74"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appProfileManager",
"loc": "12:44-91"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppProfileManager = void 0;\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\nconst searchIndexManager_1 = __importDefault(require(\"../searchIndexManager\"));\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 let fullChat = this.chatsFull[chatID];\r\n let chat = appChatsManager_1.default.getChat(chatID);\r\n if (!chat.photo || !fullChat) {\r\n return;\r\n }\r\n let 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 let smallUserpic = chat.photo.photo_small;\r\n let 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 let botID = botInfo && botInfo.user_id;\r\n if (!botID) {\r\n return false;\r\n }\r\n let 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: 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 let 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: 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 let promiseKey = [id, filter._, offset, limit].join('_');\r\n let promiseData = this.chatParticipantsPromises[promiseKey];\r\n if (filter._ == 'channelParticipantsRecent') {\r\n let 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 let fetchParticipants = (cachedParticipants) => {\r\n let hash = 0;\r\n if (cachedParticipants) {\r\n let userIDs = [];\r\n cachedParticipants.forEach((participant) => {\r\n userIDs.push(participant.user_id);\r\n });\r\n userIDs.sort((a, b) => a - b);\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 let maybeAddSelf = (participants) => {\r\n let chat = appChatsManager_1.default.getChat(id);\r\n let 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 let myID = appUsersManager_1.default.getSelf().id;\r\n let myIndex = participants.findIndex(p => p.user_id == myID);\r\n let myParticipant;\r\n if (myIndex !== -1) {\r\n myParticipant = participants[myIndex];\r\n participants.splice(myIndex, 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 let timeNow = utils_1.tsNow();\r\n if (promiseData !== undefined) {\r\n let 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 let 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 let 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 let 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 let 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 let 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 updateProfile(first_name, last_name, about) {\r\n /* let flags = 0;\r\n if(first_name) flags |= 1;\r\n if(last_name) flags |= 2;\r\n if(about) flags |= 4; */\r\n let flags = (1 << 0) | (1 << 1) | (1 << 2);\r\n return mtprotoworker_1.default.invokeApi('account.updateProfile', {\r\n flags,\r\n first_name,\r\n last_name,\r\n about\r\n }).then(user => {\r\n appUsersManager_1.default.saveApiUser(user);\r\n });\r\n }\r\n uploadProfilePhoto(inputFile) {\r\n return mtprotoworker_1.default.invokeApi('photos.uploadProfilePhoto', {\r\n file: inputFile\r\n }).then((updateResult) => {\r\n appUsersManager_1.default.saveApiUsers(updateResult.users);\r\n mtprotoworker_1.default.getUserID().then((id) => {\r\n appPhotosManager_1.default.savePhoto(updateResult.photo, {\r\n user_id: id\r\n });\r\n apiUpdatesManager_1.default.processUpdateMessage({\r\n _: 'updateShort',\r\n update: {\r\n _: 'updateUserPhoto',\r\n user_id: id,\r\n date: utils_1.tsNow(true),\r\n photo: appUsersManager_1.default.getUser(id).photo,\r\n previous: true\r\n }\r\n });\r\n });\r\n });\r\n }\r\n updateUsername(username) {\r\n return mtprotoworker_1.default.invokeApi('account.updateUsername', {\r\n username: username\r\n }).then((user) => {\r\n appUsersManager_1.default.saveApiUser(user);\r\n });\r\n }\r\n removeFromAvatarsCache(peerID) {\r\n if (this.savedAvatarURLs[peerID]) {\r\n delete this.savedAvatarURLs[peerID];\r\n }\r\n }\r\n // peerID == peerID || title\r\n putPhoto(div, peerID, isDialog = false, title = '') {\r\n var _a;\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) {\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 > 0) {\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 abbr;\r\n if (!title) {\r\n abbr = (_a = appPeersManager_1.default.getPeer(peerID).initials) !== null && _a !== void 0 ? _a : '';\r\n }\r\n else {\r\n const name = searchIndexManager_1.default.cleanSearchText(title, false);\r\n const nameWords = name.split(' ');\r\n const firstWord = nameWords.shift();\r\n const lastWord = nameWords.pop();\r\n abbr = firstWord.charAt(0) + (lastWord ? lastWord.charAt(0) : '');\r\n }\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 //console.warn('will invoke downloadSmallFile:', 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 let cached = yield misc_1.renderImageFromUrl(img, this.savedAvatarURLs[peerID]);\r\n if (cached) {\r\n div.innerHTML = '';\r\n div.append(img);\r\n }\r\n else {\r\n img.classList.add('fade-in');\r\n img.addEventListener('load', () => {\r\n div.innerHTML = '';\r\n div.append(img);\r\n });\r\n }\r\n return true;\r\n });\r\n }\r\n}\r\nexports.AppProfileManager = AppProfileManager;\r\nexports.default = new AppProfileManager();\r\n"
},
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\config.ts",
"name": "./src/lib/config.ts",
"index": 12,
"index2": 9,
"size": 98954,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\misc.ts",
"module": "./src/components/misc.ts",
"moduleName": "./src/components/misc.ts",
"type": "cjs require",
"userRequest": "../lib/config",
"loc": "17:33-57"
},
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\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": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\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": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\richtextprocessor.js",
"module": "./src/lib/richtextprocessor.js",
"moduleName": "./src/lib/richtextprocessor.js",
"type": "harmony import specifier",
"userRequest": "./config",
"loc": "125:58-64"
},
{
"moduleId": 27,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\searchIndexManager.ts",
"module": "./src/lib/searchIndexManager.ts",
"moduleName": "./src/lib/searchIndexManager.ts",
"type": "cjs require",
"userRequest": "./config",
"loc": "6:33-52"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/config",
"loc": "9:33-57"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/config",
"loc": "30:33-57"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 <igor.beatle@gmail.com>\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\nconst Emoji = { \"#\": 6365, \"*\": 6366, \"0\": 6367, \"1\": 6368, \"2\": 6369, \"3\": 6370, \"4\": 6371, \"5\": 6372, \"6\": 6373, \"7\": 6374, \"8\": 6375, \"9\": 6376, \"©\": 6362, \"®\": 6363, \"🀄\": 573, \"🃏\": 572, \"🅰\": 6383, \"🅱\": 6385, \"🅾\": 6394, \"🅿\": 6396, \"🆎\": 6384, \"🆑\": 6386, \"🆒\": 6387, \"🆓\": 6388, \"🆔\": 6390, \"🆕\": 6392, \"🆖\": 6393, \"🆗\": 6395, \"🆘\": 6397, \"🆙\": 6398, \"🆚\": 6399, \"🇦🇨\": 78, \"🇦🇩\": 79, \"🇦🇪\": 710, \"🇦🇫\": 711, \"🇦🇬\": 712, \"🇦🇮\": 713, \"🇦🇱\": 714, \"🇦🇲\": 715, \"🇦🇴\": 716, \"🇦🇶\": 717, \"🇦🇷\": 718, \"🇦🇸\": 719, \"🇦🇹\": 720, \"🇦🇺\": 721, \"🇦🇼\": 722, \"🇦🇽\": 723, \"🇦🇿\": 724, \"🇧🇦\": 725, \"🇧🇧\": 726, \"🇧🇩\": 727, \"🇧🇪\": 728, \"🇧🇫\": 729, \"🇧🇬\": 730, \"🇧🇭\": 731, \"🇧🇮\": 732, \"🇧🇯\": 733, \"🇧🇱\": 734, \"🇧🇲\": 735, \"🇧🇳\": 736, \"🇧🇴\": 737, \"🇧🇶\": 738, \"🇧🇷\": 739, \"🇧🇸\": 740, \"🇧🇹\": 741, \"🇧🇻\": 742, \"🇧🇼\": 743, \"🇧🇾\": 744, \"🇧🇿\": 745, \"🇨🇦\": 746, \"🇨🇨\": 747, \"🇨🇩\": 748, \"🇨🇫\": 749, \"🇨🇬\": 750, \"🇨🇭\": 751, \"🇨🇮\": 752, \"🇨🇰\": 753, \"🇨🇱\": 754, \"🇨🇲\": 755, \"🇨🇳\": 756, \"🇨🇴\": 757, \"🇨🇵\": 758, \"🇨🇷\": 759, \"🇨🇺\": 760, \"🇨🇻\": 761, \"🇨🇼\": 762, \"🇨🇽\": 763, \"🇨🇾\": 764, \"🇨🇿\": 765, \"🇩🇪\": 766, \"🇩🇬\": 767, \"🇩🇯\": 768, \"🇩🇰\": 769, \"🇩🇲\": 770, \"🇩🇴\": 771, \"🇩🇿\": 772, \"🇪🇦\": 773, \"🇪🇨\": 774, \"🇪🇪\": 775, \"🇪🇬\": 776, \"🇪🇭\": 777, \"🇪🇷\": 778, \"🇪🇸\": 779, \"🇪🇹\": 780, \"🇪🇺\": 781, \"🇫🇮\": 782, \"🇫🇯\": 783, \"🇫🇰\": 784, \"🇫🇲\": 785, \"🇫🇴\": 786, \"🇫🇷\": 787, \"🇬🇦\": 788, \"🇬🇧\": 789, \"🇬🇩\": 790, \"🇬🇪\": 791, \"🇬🇫\": 792, \"🇬🇬\": 793, \"🇬🇭\": 794, \"🇬🇮\": 795, \"🇬🇱\": 796, \"🇬🇲\": 797, \"🇬🇳\": 798, \"🇬🇵\": 799, \"🇬🇶\": 7100, \"🇬🇷\": 7101, \"🇬🇸\": 7102, \"🇬🇹\": 7103, \"🇬🇺\": 7104, \"🇬🇼\": 7105, \"🇬🇾\": 7106, \"🇭🇰\": 7107, \"🇭🇲\": 7108, \"🇭🇳\": 7109, \"🇭🇷\": 7110, \"🇭🇹\": 7111, \"🇭🇺\": 7112, \"🇮🇨\": 7113, \"🇮🇩\": 7114, \"🇮🇪\": 7115, \"🇮🇱\": 7116, \"🇮🇲\": 7117, \"🇮🇳\": 7118, \"🇮🇴\": 7119, \"🇮🇶\": 7120, \"🇮🇷\": 7121, \"🇮🇸\": 7122, \"🇮🇹\": 7123, \"🇯🇪\": 7124, \"🇯🇲\": 7125, \"🇯🇴\": 7126, \"🇯🇵\": 7127, \"🇰🇪\": 7128, \"🇰🇬\": 7129, \"🇰🇭\": 7130, \"🇰🇮\": 7131, \"🇰🇲\": 7132, \"🇰🇳\": 7133, \"🇰🇵\": 7134, \"🇰🇷\": 7135, \"🇰🇼\": 7136, \"🇰🇾\": 7137, \"🇰🇿\": 7138, \"🇱🇦\": 7139, \"🇱🇧\": 7140, \"🇱🇨\": 7141, \"🇱🇮\": 7142, \"🇱🇰\": 7143, \"🇱🇷\": 7144, \"🇱🇸\": 7145, \"🇱🇹\": 7146, \"🇱🇺\": 7147, \"🇱🇻\": 7148, \"🇱🇾\": 7149, \"🇲🇦\": 7150, \"🇲🇨\": 7151, \"🇲🇩\": 7152, \"🇲🇪\": 7153, \"🇲🇫\": 7154, \"🇲🇬\": 7155, \"🇲🇭\": 7156, \"🇲🇰\": 7157, \"🇲🇱\": 7158, \"🇲🇲\": 7159, \"🇲🇳\": 7160, \"🇲🇴\": 7161, \"🇲🇵\": 7162, \"🇲🇶\": 7163, \"🇲🇷\": 7164, \"🇲🇸\": 7165, \"🇲🇹\": 7166, \"🇲🇺\": 7167, \"🇲🇻\": 7168, \"🇲🇼\": 7169, \"🇲🇽\": 7170, \"🇲🇾\": 7171, \"🇲🇿\": 7172, \"🇳🇦\": 7173, \"🇳🇨\": 7174, \"🇳🇪\": 7175, \"🇳🇫\": 7176, \"🇳🇬\": 7177, \"🇳🇮\": 7178, \"🇳🇱\": 7179, \"🇳🇴\": 7180, \"🇳🇵\": 7181, \"🇳🇷\": 7182, \"🇳🇺\": 7183, \"🇳🇿\": 7184, \"🇴🇲\": 7185, \"🇵🇦\": 7186, \"🇵🇪\": 7187, \"🇵🇫\": 7188, \"🇵🇬\": 7189, \"🇵🇭\": 7190, \"🇵🇰\": 7191, \"🇵🇱\": 7192, \"🇵🇲\": 7193, \"🇵🇳\": 7194, \"🇵🇷\": 7195, \"🇵🇸\": 7196, \"🇵🇹\": 7197, \"🇵🇼\": 7198, \"🇵🇾\": 7199, \"🇶🇦\": 7200, \"🇷🇪\": 7201, \"🇷🇴\": 7202, \"🇷🇸\": 7203, \"🇷🇺\": 7204, \"🇷🇼\": 7205, \"🇸🇦\": 7206, \"🇸🇧\": 7207, \"🇸🇨\": 7208, \"🇸🇩\": 7209, \"🇸🇪\": 7210, \"🇸🇬\": 7211, \"🇸🇭\": 7212, \"🇸🇮\": 7213, \"🇸🇯\": 7214, \"🇸🇰\": 7215, \"🇸🇱\": 7216, \"🇸🇲\": 7217, \"🇸🇳\": 7218, \"🇸🇴\": 7219, \"🇸🇷\": 7220, \"🇸🇸\": 7221, \"🇸🇹\": 7222, \"🇸🇻\": 7223, \"🇸🇽\": 7224, \"🇸🇾\": 7225, \"🇸🇿\": 7226, \"🇹🇦\": 7227, \"🇹🇨\": 7228, \"🇹🇩\": 7229, \"🇹🇫\": 7230, \"🇹🇬\": 7231, \"🇹🇭\": 7232, \"🇹🇯\": 7233, \"🇹🇰\": 7234, \"🇹🇱\": 7235, \"🇹🇲\": 7236, \"🇹🇳\": 7237, \"🇹🇴\": 7238, \"🇹🇷\": 7239, \"🇹🇹\": 7240, \"🇹🇻\": 7241, \"🇹🇼\": 7242, \"🇹🇿\": 7243, \"🇺🇦\": 7244, \"🇺🇬\": 7245, \"🇺🇲\": 7246, \"🇺🇳\": 7247, \"🇺🇸\": 7248, \"🇺🇾\": 7249, \"🇺🇿\": 7250, \"🇻🇦\": 7251, \"🇻🇨\": 7252, \"🇻🇪\": 7253, \"🇻🇬\": 7254, \"🇻🇮\": 7255, \"🇻🇳\": 7256, \"🇻🇺\": 7257, \"🇼🇫\": 7258, \"🇼🇸\": 7259, \"🇽🇰\": 7260, \"🇾🇪\": 7261, \"🇾🇹\": 7262, \"🇿🇦\": 7263, \"🇿🇲\": 7264, \"🇿🇼\": 7265, \"🈁\": 6400, \"🈂\": 6401, \"🈚\": 6407, \"🈯\": 6404, \"🈲\": 6408, \"🈳\": 6412, \"🈴\": 6411, \"🈵\": 6416, \"🈶\": 6403, \"🈷\": 6402, \"🈸\": 6410, \"🈹\": 6406, \"🈺\": 6415, \"🉐\": 6405, \"🉑\": 6409, \"🌀\": 4197, \"🌁\": 449, \"🌂\": 4199, \"🌃\": 450, \"🌄\": 452, \"🌅\": 453, \"🌆\": 454, \"🌇\": 455, \"🌈\": 4198, \"🌉\": 456, \"🌊\": 4210, \"🌋\": 410, \"🌌\": 4184, \"🌍\": 41, \"🌎\": 42, \"🌏\": 43, \"🌐\": 44, \"🌑\": 4164, \"🌒\": 4165, \"🌓\": 4166, \"🌔\": 4167, \"🌕\": 4168, \"🌖\": 4169, \"🌗\": 4170, \"🌘\": 4171, \"🌙\": 4172, \"🌚\": 4173, \"🌛\": 4174, \"🌜\": 4175, \"🌝\": 4178, \"🌞\": 4179, \"🌟\": 4182, \"🌠\": 4183, \"🌡\": 4176, \"🌤\": 4188, \"🌥\": 4189, \"🌦\": 4190, \"🌧\": 4191, \"🌨\": 4192, \"🌩\": 4193, \"🌪\": 4194, \"🌫\": 4195, \"🌬\": 4196, \"🌭\": 347, \"🌮\": 349, \"🌯\": 350, \"🌰\": 331, \"🌱\": 2116, \"🌲\": 2117, \"🌳\": 2118, \"🌴\": 2119, \"🌵\": 2120, \"🌶\": 323, \"🌷\": 2115, \"🌸\": 2107, \"🌹\": 2110, \"🌺\": 2112, \"🌻\": 2113, \"🌼\": 2114, \"🌽\": 322, \"🌾\": 2121, \"🌿\": 2122, \"🍀\": 2124, \"🍁\": 2125, \"🍂\": 2126, \"🍃\": 2127, \"🍄\": 329, \"🍅\": 316, \"🍆\": 319, \"🍇\": 31, \"🍈\": 32, \"🍉\": 33, \"🍊\": 34, \"🍋\": 35, \"🍌\": 36, \"🍍\": 37, \"🍎\": 39, \"🍏\": 310, \"🍐\": 311, \"🍑\": 312, \"🍒\": 313, \"🍓\": 314, \"🍔\": 344, \"🍕\": 346, \"🍖\": 340, \"🍗\": 341, \"🍘\": 364, \"🍙\": 365, \"🍚\": 366, \"🍛\": 367, \"🍜\": 368, \"🍝\": 369, \"🍞\": 332, \"🍟\": 345, \"🍠\": 370, \"🍡\": 376, \"🍢\": 371, \"🍣\": 372, \"🍤\": 373, \"🍥\": 374, \"🍦\": 385, \"🍧\": 386, \"🍨\": 387, \"🍩\": 388, \"🍪\": 389, \"🍫\": 394, \"🍬\": 395, \"🍭\": 396, \"🍮\": 397, \"🍯\": 398, \"🍰\": 391, \"🍱\": 363, \"🍲\": 356, \"🍳\": 354, \"🍴\": 3118, \"🍵\": 3102, \"🍶\": 3103, \"🍷\": 3105, \"🍸\": 3106, \"🍹\": 3107, \"🍺\": 3108, \"🍻\": 3109, \"🍼\": 399, \"🍽\": 3117, \"🍾\": 3104, \"🍿\": 359, \"🎀\": 517, \"🎁\": 518, \"🎂\": 390, \"🎃\": 51, \"🎄\": 52, \"🎅\": 1326, \"🎆\": 53, \"🎇\": 54, \"🎈\": 57, \"🎉\": 58, \"🎊\": 59, \"🎋\": 510, \"🎌\": 73, \"🎍\": 511, \"🎎\": 512, \"🎏\": 513, \"🎐\": 514, \"🎑\": 515, \"🎒\": 625, \"🎓\": 637, \"🎖\": 522, \"🎗\": 519, \"🎙\": 656, \"🎚\": 657, \"🎛\": 658, \"🎞\": 689, \"🎟\": 520, \"🎠\": 458, \"🎡\": 459, \"🎢\": 460, \"🎣\": 549, \"🎤\": 659, \"🎥\": 688, \"🎦\": 6324, \"🎧\": 660, \"🎨\": 577, \"🎩\": 636, \"🎪\": 462, \"🎫\": 521, \"🎬\": 691, \"🎭\": 575, \"🎮\": 561, \"🎯\": 555, \"🎰\": 563, \"🎱\": 558, \"🎲\": 564, \"🎳\": 537, \"🎴\": 574, \"🎵\": 654, \"🎶\": 655, \"🎷\": 662, \"🎸\": 663, \"🎹\": 664, \"🎺\": 665, \"🎻\": 666, \"🎼\": 653, \"🎽\": 551, \"🎾\": 535, \"🎿\": 552, \"🏀\": 531, \"🏁\": 71, \"🏂\": 1397, \"🏃♀\": 1381, \"🏃♂\": 1380, \"🏃\": 1379, \"🏄♀\": 1403, \"🏄♂\": 1402, \"🏄\": 1401, \"🏅\": 524, \"🏆\": 523, \"🏇\": 1395, \"🏈\": 533, \"🏉\": 534, \"🏊♀\": 1409, \"🏊♂\": 1408, \"🏊\": 1407, \"🏋♀\": 1415, \"🏋♂\": 1414, \"🏋\": 1413, \"🏌♀\": 1400, \"🏌♂\": 1399, \"🏌\": 1398, \"🏍\": 492, \"🏎\": 491, \"🏏\": 538, \"🏐\": 532, \"🏑\": 539, \"🏒\": 540, \"🏓\": 542, \"🏔\": 48, \"🏕\": 412, \"🏖\": 413, \"🏗\": 419, \"🏘\": 421, \"🏙\": 451, \"🏚\": 422, \"🏛\": 418, \"🏜\": 414, \"🏝\": 415, \"🏞\": 416, \"🏟\": 417, \"🏠\": 423, \"🏡\": 424, \"🏢\": 425, \"🏣\": 426, \"🏤\": 427, \"🏥\": 428, \"🏦\": 429, \"🏧\": 6234, \"🏨\": 430, \"🏩\": 431, \"🏪\": 432, \"🏫\": 433, \"🏬\": 434, \"🏭\": 435, \"🏮\": 6102, \"🏯\": 436, \"🏰\": 437, \"🏳🌈\": 76, \"🏳\": 75, \"🏴☠\": 77, \"🏴󠁧󠁢󠁥󠁮󠁧󠁿\": 7266, \"🏴󠁧󠁢󠁳󠁣󠁴󠁿\": 7267, \"🏴󠁧󠁢󠁷󠁬󠁳󠁿\": 7268, \"🏴\": 74, \"🏵\": 2109, \"🏷\": 6120, \"🏸\": 543, \"🏹\": 6189, \"🏺\": 3121, \"🏻\": 81, \"🏼\": 82, \"🏽\": 83, \"🏾\": 84, \"🏿\": 85, \"🐀\": 244, \"🐁\": 243, \"🐂\": 225, \"🐃\": 226, \"🐄\": 227, \"🐅\": 217, \"🐆\": 218, \"🐇\": 247, \"🐈\": 214, \"🐉\": 282, \"🐊\": 277, \"🐋\": 286, \"🐌\": 294, \"🐍\": 280, \"🐎\": 220, \"🐏\": 232, \"🐐\": 234, \"🐑\": 233, \"🐒\": 22, \"🐓\": 262, \"🐔\": 261, \"🐕🦺\": 28, \"🐕\": 26, \"🐖\": 229, \"🐗\": 230, \"🐘\": 239, \"🐙\": 292, \"🐚\": 293, \"🐛\": 296, \"🐜\": 297, \"🐝\": 298, \"🐞\": 299, \"🐟\": 288, \"🐠\": 289, \"🐡\": 290, \"🐢\": 278, \"🐣\": 263, \"🐤\": 264, \"🐥\": 265, \"🐦\": 266, \"🐧\": 267, \"🐨\": 252, \"🐩\": 29, \"🐪\": 235, \"🐫\": 236, \"🐬\": 287, \"🐭\": 242, \"🐮\": 224, \"🐯\": 216, \"🐰\": 246, \"🐱\": 213, \"🐲\": 281, \"🐳\": 285, \"🐴\": 219, \"🐵\": 21, \"🐶\": 25, \"🐷\": 228, \"🐸\": 276, \"🐹\": 245, \"🐺\": 210, \"🐻\": 251, \"🐼\": 253, \"🐽\": 231, \"🐾\": 259, \"🐿\": 248, \"👀\": 1194, \"👁🗨\": 1145, \"👁\": 1195, \"👂\": 1188, \"👃\": 1190, \"👄\": 1197, \"👅\": 1196, \"👆\": 1164, \"👇\": 1166, \"👈\": 1162, \"👉\": 1163, \"👊\": 1171, \"👋\": 1150, \"👌\": 1155, \"👍\": 1168, \"👎\": 1169, \"👏\": 1174, \"👐\": 1176, \"👑\": 634, \"👒\": 635, \"👓\": 61, \"👔\": 66, \"👕\": 67, \"👖\": 68, \"👗\": 613, \"👘\": 614, \"👙\": 619, \"👚\": 620, \"👛\": 621, \"👜\": 622, \"👝\": 623, \"👞\": 626, \"👟\": 627, \"👠\": 630, \"👡\": 631, \"👢\": 633, \"👣\": 1483, \"👤\": 1481, \"👥\": 1482, \"👦\": 1200, \"👧\": 1201, \"👨🌾\": 1267, \"👨🍳\": 1270, \"👨🎓\": 1258, \"👨🎤\": 1288, \"👨🎨\": 1291, \"👨🏫\": 1261, \"👨🏭\": 1276, \"👨👦👦\": 1471, \"👨👦\": 1470, \"👨👧👦\": 1473, \"👨👧👧\": 1474, \"👨👧\": 1472, \"👨👨👦\": 1460, \"👨👨👦👦\": 1463, \"👨👨👧\": 1461, \"👨👨👧👦\": 1462, \"👨👨👧👧\": 1464, \"👨👩👦\": 1455, \"👨👩👦👦\": 1458, \"👨👩👧\": 1456, \"👨👩👧👦\": 1457, \"👨👩👧👧\": 1459, \"👨💻\": 1285, \"👨💼\": 1279, \"👨🔧\": 1273, \"👨🔬\": 1282, \"👨🚀\": 1297, \"👨🚒\": 1300, \"👨🦯\": 1371, \"👨🦰\": 1206, \"👨🦱\": 1207, \"👨🦲\": 1209, \"👨🦳\": 1208, \"👨🦼\": 1374, \"👨🦽\": 1377, \"👨⚕\": 1255, \"👨⚖\": 1264, \"👨✈\": 1294, \"👨👨\": 1452, \"👨💋👨\": 1448, \"👨\": 1204, \"👩🌾\": 1268, \"👩🍳\": 1271, \"👩🎓\": 1259, \"👩🎤\": 1289, \"👩🎨\": 1292, \"👩🏫\": 1262, \"👩🏭\": 1277, \"👩👦👦\": 1476, \"👩👦\": 1475, \"👩👧👦\": 1478, \"👩👧👧\": 1479, \"👩👧\": 1477, \"👩👩👦\": 1465, \"👩👩👦👦\": 1468, \"👩👩👧\": 1466, \"👩👩👧👦\": 1467, \"👩👩👧👧\": 1469, \"👩💻\": 1286, \"👩💼\": 1280, \"👩🔧\": 1274, \"👩🔬\": 1283, \"👩🚀\": 1298, \"👩🚒\": 1301, \"👩🦯\": 1372, \"👩🦰\": 1211, \"👩🦱\": 1213, \"👩🦲\": 1217, \"👩🦳\": 1215, \"👩🦼\": 1375, \"👩🦽\": 1378, \"👩⚕\": 1256, \"👩⚖\": 1265, \"👩✈\": 1295, \"👩👨\": 1451, \"👩👩\": 1453, \"👩💋👨\": 1447, \"👩💋👩\": 1449, \"👩\": 1210, \"👪\": 1454, \"👫\": 1444, \"👬\": 1445, \"👭\": 1443, \"👮♀\": 1304, \"👮♂\": 1303, \"👮\": 1302, \"👯♀\": 1387, \"👯♂\": 1386, \"👯\": 1385, \"👰\": 1322, \"👱♀\": 1219, \"👱♂\": 1220, \"👱\": 1203, \"👲\": 1319, \"👳♀\": 1318, \"👳♂\": 1317, \"👳\": 1316, \"👴\": 1222, \"👵\": 1223, \"👶\": 1198, \"👷♀\": 1313, \"👷♂\": 1312, \"👷\": 1311, \"👸\": 1315, \"👹\": 197, \"👺\": 198, \"👻\": 199, \"👼\": 1325, \"👽\": 1100, \"👾\": 1101, \"👿\": 192, \"💀\": 193, \"💁♀\": 1238, \"💁♂\": 1237, \"💁\": 1236, \"💂♀\": 1310, \"💂♂\": 1309, \"💂\": 1308, \"💃\": 1382, \"💄\": 641, \"💅\": 1181, \"💆♀\": 1357, \"💆♂\": 1356, \"💆\": 1355, \"💇♀\": 1360, \"💇♂\": 1359, \"💇\": 1358, \"💈\": 461, \"💉\": 6208, \"💊\": 6210, \"💋\": 1115, \"💌\": 1116, \"💍\": 642, \"💎\": 643, \"💏\": 1446, \"💐\": 2106, \"💑\": 1450, \"💒\": 438, \"💓\": 1121, \"💔\": 1126, \"💕\": 1123, \"💖\": 1119, \"💗\": 1120, \"💘\": 1117, \"💙\": 1131, \"💚\": 1130, \"💛\": 1129, \"💜\": 1132, \"💝\": 1118, \"💞\": 1122, \"💟\": 1124, \"💠\": 6447, \"💡\": 6100, \"💢\": 1137, \"💣\": 1143, \"💤\": 1149, \"💥\": 1138, \"💦\": 1140, \"💧\": 4209, \"💨\": 1141, \"💩\": 195, \"💪\": 1183, \"💫\": 1139, \"💬\": 1144, \"💭\": 1148, \"💮\": 2108, \"💯\": 1136, \"💰\": 6121, \"💱\": 6130, \"💲\": 6131, \"💳\": 6127, \"💴\": 6122, \"💵\": 6123, \"💶\": 6124, \"💷\": 6125, \"💸\": 6126, \"💹\": 6129, \"💺\": 4123, \"💻\": 677, \"💼\": 6152, \"💽\": 683, \"💾\": 684, \"💿\": 685, \"📀\": 686, \"📁\": 6153, \"📂\": 6154, \"📃\": 6113, \"📄\": 6115, \"📅\": 6156, \"📆\": 6157, \"📇\": 6160, \"📈\": 6161, \"📉\": 6162, \"📊\": 6163, \"📋\": 6164, \"📌\": 6165, \"📍\": 6166, \"📎\": 6167, \"📏\": 6169, \"📐\": 6170, \"📑\": 6118, \"📒\": 6112, \"📓\": 6111, \"📔\": 6104, \"📕\": 6105, \"📖\": 6106, \"📗\": 6107, \"📘\": 6108, \"📙\": 6109, \"📚\": 6110, \"📛\": 6337, \"📜\": 6114, \"📝\": 6151, \"📞\": 672, \"📟\": 673, \"📠\": 674, \"📡\": 6207, \"📢\": 648, \"📣\": 649, \"📤\": 6136, \"📥\": 6137, \"📦\": 6138, \"📧\": 6133, \"📨\": 6134, \"📩\": 6135, \"📪\": 6140, \"📫\": 6139, \"📬\": 6141, \"📭\": 6142, \"📮\": 6143, \"📯\": 650, \"📰\": 6116, \"📱\": 669, \"📲\": 670, \"📳\": 6328, \"📴\": 6329, \"📵\": 6256, \"📶\": 6327, \"📷\": 693, \"📸\": 694, \"📹\": 695, \"📺\": 692, \"📻\": 661, \"📼\": 696, \"📽\": 690, \"📿\": 640, \"🔀\": 6306, \"🔁\": 6307, \"🔂\": 6308, \"🔃\": 6274, \"🔄\": 6275, \"🔅\": 6325, \"🔆\": 6326, \"🔇\": 644, \"🔈\": 645, \"🔉\": 646, \"🔊\": 647, \"🔋\": 675, \"🔌\": 676, \"🔍\": 697, \"🔎\": 698, \"🔏\": 6177, \"🔐\": 6178, \"🔑\": 6179, \"🔒\": 6175, \"🔓\": 6176, \"🔔\": 651, \"🔕\": 652, \"🔖\": 6119, \"🔗\": 6197, \"🔘\": 6448, \"🔙\": 6276, \"🔚\": 6277, \"🔛\": 6278, \"🔜\": 6279, \"🔝\": 6280, \"🔞\": 6257, \"🔟\": 6377, \"🔠\": 6378, \"🔡\": 6379, \"🔢\": 6380, \"🔣\": 6381, \"🔤\": 6382, \"🔥\": 4208, \"🔦\": 6101, \"🔧\": 6191, \"🔨\": 6181, \"🔩\": 6192, \"🔪\": 3120, \"🔫\": 6188, \"🔬\": 6205, \"🔭\": 6206, \"🔮\": 559, \"🔯\": 6292, \"🔰\": 6338, \"🔱\": 6336, \"🔲\": 6450, \"🔳\": 6449, \"🔴\": 6417, \"🔵\": 6421, \"🔶\": 6441, \"🔷\": 6442, \"🔸\": 6443, \"🔹\": 6444, \"🔺\": 6445, \"🔻\": 6446, \"🔼\": 6316, \"🔽\": 6318, \"🕉\": 6283, \"🕊\": 268, \"🕋\": 446, \"🕌\": 442, \"🕍\": 444, \"🕎\": 6291, \"🕐\": 4142, \"🕑\": 4144, \"🕒\": 4146, \"🕓\": 4148, \"🕔\": 4150, \"🕕\": 4152, \"🕖\": 4154, \"🕗\": 4156, \"🕘\": 4158, \"🕙\": 4160, \"🕚\": 4162, \"🕛\": 4140, \"🕜\": 4143, \"🕝\": 4145, \"🕞\": 4147, \"🕟\": 4149, \"🕠\": 4151, \"🕡\": 4153, \"🕢\": 4155, \"🕣\": 4157, \"🕤\": 4159, \"🕥\": 4161, \"🕦\": 4163, \"🕧\": 4141, \"🕯\": 699, \"🕰\": 4139, \"🕳\": 1142, \"🕴\": 1384, \"🕵♀\": 1307, \"🕵♂\": 1306, \"🕵\": 1305, \"🕶\": 62, \"🕷\": 2101, \"🕸\": 2102, \"🕹\": 562, \"🕺\": 1383, \"🖇\": 6168, \"🖊\": 6148, \"🖋\": 6147, \"🖌\": 6149, \"🖍\": 6150, \"🖐\": 1152, \"🖕\": 1165, \"🖖\": 1154, \"🖤\": 1134, \"🖥\": 678, \"🖨\": 679, \"🖱\": 681, \"🖲\": 682, \"🖼\": 576, \"🗂\": 6155, \"🗃\": 6172, \"🗄\": 6173, \"🗑\": 6174, \"🗒\": 6158, \"🗓\": 6159, \"🗜\": 6194, \"🗝\": 6180, \"🗞\": 6117, \"🗡\": 6186, \"🗣\": 1480, \"🗨\": 1146, \"🗯\": 1147, \"🗳\": 6144, \"🗺\": 45, \"🗻\": 411, \"🗼\": 439, \"🗽\": 440, \"🗾\": 46, \"🗿\": 6233, \"😀\": 11, \"😁\": 14, \"😂\": 18, \"😃\": 12, \"😄\": 13, \"😅\": 16, \"😆\": 15, \"😇\": 113, \"😈\": 191, \"😉\": 111, \"😊\": 112, \"😋\": 122, \"😌\": 142, \"😍\": 115, \"😎\": 160, \"😏\": 137, \"😐\": 134, \"😑\": 135, \"😒\": 138, \"😓\": 183, \"😔\": 143, \"😕\": 163, \"😖\": 180, \"😗\": 118, \"😘\": 117, \"😙\": 121, \"😚\": 120, \"😛\": 123, \"😜\": 124, \"😝\": 126, \"😞\": 182, \"😟\": 164, \"😠\": 189, \"😡\": 188, \"😢\": 177, \"😣\": 181, \"😤\": 187, \"😥\": 176, \"😦\": 172, \"😧\": 173, \"😨\": 174, \"😩\": 184, \"😪\": 144, \"😫\": 185, \"😬\": 140, \"😭\": 178, \"😮\": 167, \"😯\": 168, \"😰\": 175, \"😱\": 179, \"😲\": 169, \"😳\": 170, \"😴\": 146, \"😵\": 156, \"😶\": 136, \"😷\": 147, \"😸\": 1104, \"😹\": 1105, \"😺\": 1103, \"😻\": 1106, \"😼\": 1107, \"😽\": 1108, \"😾\": 1111, \"😿\": 1110, \"🙀\": 1109, \"🙁\": 165, \"🙂\": 19, \"🙃\": 110, \"🙄\": 139, \"🙅♀\": 1232, \"🙅♂\": 1231, \"🙅\": 1230, \"🙆♀\": 1235, \"🙆♂\": 1234, \"🙆\": 1233, \"🙇♀\": 1247, \"🙇♂\": 1246, \"🙇\": 1245, \"🙈\": 1112, \"🙉\": 1113, \"🙊\": 1114, \"🙋♀\": 1241, \"🙋♂\": 1240, \"🙋\": 1239, \"🙌\": 1175, \"🙍♀\": 1226, \"🙍♂\": 1225, \"🙍\": 1224, \"🙎♀\": 1229, \"🙎♂\": 1228, \"🙎\": 1227, \"🙏\": 1179, \"🚀\": 4129, \"🚁\": 4124, \"🚂\": 463, \"🚃\": 464, \"🚄\": 465, \"🚅\": 466, \"🚆\": 467, \"🚇\": 468, \"🚈\": 469, \"🚉\": 470, \"🚊\": 471, \"🚋\": 474, \"🚌\": 475, \"🚍\": 476, \"🚎\": 477, \"🚏\": 4100, \"🚐\": 478, \"🚑\": 479, \"🚒\": 480, \"🚓\": 481, \"🚔\": 482, \"🚕\": 483, \"🚖\": 484, \"🚗\": 485, \"🚘\": 486, \"🚙\": 487, \"🚚\": 488, \"🚛\": 489, \"🚜\": 490, \"🚝\": 472, \"🚞\": 473, \"🚟\": 4125, \"🚠\": 4126, \"🚡\": 4127, \"🚢\": 4117, \"🚣♀\": 1406, \"🚣♂\": 1405, \"🚣\": 1404, \"🚤\": 4113, \"🚥\": 4106, \"🚦\": 4107, \"🚧\": 4109, \"🚨\": 4105, \"🚩\": 72, \"🚪\": 6213, \"🚫\": 6250, \"🚬\": 6230, \"🚭\": 6252, \"🚮\": 6235, \"🚯\": 6253, \"🚰\": 6236, \"🚱\": 6254, \"🚲\": 497, \"🚳\": 6251, \"🚴♀\": 1418, \"🚴♂\": 1417, \"🚴\": 1416, \"🚵♀\": 1421, \"🚵♂\": 1420, \"🚵\": 1419, \"🚶♀\": 1363, \"🚶♂\": 1362, \"🚶\": 1361, \"🚷\": 6255, \"🚸\": 6248, \"🚹\": 6238, \"🚺\": 6239, \"🚻\": 6240, \"🚼\": 6241, \"🚽\": 6217, \"🚾\": 6242, \"🚿\": 6218, \"🛀\": 1440, \"🛁\": 6219, \"🛂\": 6243, \"🛃\": 6244, \"🛄\": 6245, \"🛅\": 6246, \"🛋\": 6215, \"🛌\": 1441, \"🛍\": 624, \"🛎\": 4131, \"🛏\": 6214, \"🛐\": 6281, \"🛑\": 4108, \"🛒\": 6229, \"🛕\": 443, \"🛠\": 6185, \"🛡\": 6190, \"🛢\": 4103, \"🛣\": 4101, \"🛤\": 4102, \"🛥\": 4116, \"🛩\": 4119, \"🛫\": 4120, \"🛬\": 4121, \"🛰\": 4128, \"🛳\": 4114, \"🛴\": 498, \"🛵\": 493, \"🛶\": 4112, \"🛷\": 553, \"🛸\": 4130, \"🛹\": 499, \"🛺\": 496, \"🟠\": 6418, \"🟡\": 6419, \"🟢\": 6420, \"🟣\": 6422, \"🟤\": 6423, \"🟥\": 6426, \"🟦\": 6430, \"🟧\": 6427, \"🟨\": 6428, \"🟩\": 6429, \"🟪\": 6431, \"🟫\": 6432, \"🤍\": 1135, \"🤎\": 1133, \"🤏\": 1156, \"🤐\": 132, \"🤑\": 127, \"🤒\": 148, \"🤓\": 161, \"🤔\": 131, \"🤕\": 149, \"🤖\": 1102, \"🤗\": 128, \"🤘\": 1160, \"🤙\": 1161, \"🤚\": 1151, \"🤛\": 1172, \"🤜\": 1173, \"🤝\": 1178, \"🤞\": 1158, \"🤟\": 1159, \"🤠\": 158, \"🤡\": 196, \"🤢\": 150, \"🤣\": 17, \"🤤\": 145, \"🤥\": 141, \"🤦♀\": 1250, \"🤦♂\": 1249, \"🤦\": 1248, \"🤧\": 152, \"🤨\": 133, \"🤩\": 116, \"🤪\": 125, \"🤫\": 130, \"🤬\": 190, \"🤭\": 129, \"🤮\": 151, \"🤯\": 157, \"🤰\": 1323, \"🤱\": 1324, \"🤲\": 1177, \"🤳\": 1182, \"🤴\": 1314, \"🤵\": 1321, \"🤶\": 1327, \"🤷♀\": 1253, \"🤷♂\": 1252, \"🤷\": 1251, \"🤸♀\": 1424, \"🤸♂\": 1423, \"🤸\": 1422, \"🤹♀\": 1436, \"🤹♂\": 1435, \"🤹\": 1434, \"🤺\": 1394, \"🤼♀\": 1427, \"🤼♂\": 1426, \"🤼\": 1425, \"🤽♀\": 1430, \"🤽♂\": 1429, \"🤽\": 1428, \"🤾♀\": 1433, \"🤾♂\": 1432, \"🤾\": 1431, \"🤿\": 550, \"🥀\": 2111, \"🥁\": 668, \"🥂\": 3110, \"🥃\": 3111, \"🥄\": 3119, \"🥅\": 546, \"🥇\": 525, \"🥈\": 526, \"🥉\": 527, \"🥊\": 544, \"🥋\": 545, \"🥌\": 554, \"🥍\": 541, \"🥎\": 530, \"🥏\": 536, \"🥐\": 333, \"🥑\": 318, \"🥒\": 324, \"🥓\": 343, \"🥔\": 320, \"🥕\": 321, \"🥖\": 334, \"🥗\": 358, \"🥘\": 355, \"🥙\": 351, \"🥚\": 353, \"🥛\": 3100, \"🥜\": 330, \"🥝\": 315, \"🥞\": 337, \"🥟\": 377, \"🥠\": 378, \"🥡\": 379, \"🥢\": 3116, \"🥣\": 357, \"🥤\": 3112, \"🥥\": 317, \"🥦\": 326, \"🥧\": 393, \"🥨\": 335, \"🥩\": 342, \"🥪\": 348, \"🥫\": 362, \"🥬\": 325, \"🥭\": 38, \"🥮\": 375, \"🥯\": 336, \"🥰\": 114, \"🥱\": 186, \"🥳\": 159, \"🥴\": 155, \"🥵\": 153, \"🥶\": 154, \"🥺\": 171, \"🥻\": 615, \"🥼\": 64, \"🥽\": 63, \"🥾\": 628, \"🥿\": 629, \"🦀\": 380, \"🦁\": 215, \"🦂\": 2103, \"🦃\": 260, \"🦄\": 221, \"🦅\": 269, \"🦆\": 270, \"🦇\": 250, \"🦈\": 291, \"🦉\": 272, \"🦊\": 211, \"🦋\": 295, \"🦌\": 223, \"🦍\": 23, \"🦎\": 279, \"🦏\": 240, \"🦐\": 382, \"🦑\": 383, \"🦒\": 238, \"🦓\": 222, \"🦔\": 249, \"🦕\": 283, \"🦖\": 284, \"🦗\": 2100, \"🦘\": 257, \"🦙\": 237, \"🦚\": 274, \"🦛\": 241, \"🦜\": 275, \"🦝\": 212, \"🦞\": 381, \"🦟\": 2104, \"🦠\": 2105, \"🦡\": 258, \"🦢\": 271, \"🦥\": 254, \"🦦\": 255, \"🦧\": 24, \"🦨\": 256, \"🦩\": 273, \"🦪\": 384, \"🦮\": 27, \"🦯\": 6196, \"🦴\": 1193, \"🦵\": 1186, \"🦶\": 1187, \"🦷\": 1192, \"🦸♀\": 1330, \"🦸♂\": 1329, \"🦸\": 1328, \"🦹♀\": 1333, \"🦹♂\": 1332, \"🦹\": 1331, \"🦺\": 65, \"🦻\": 1189, \"🦼\": 495, \"🦽\": 494, \"🦾\": 1184, \"🦿\": 1185, \"🧀\": 339, \"🧁\": 392, \"🧂\": 361, \"🧃\": 3113, \"🧄\": 327, \"🧅\": 328, \"🧆\": 352, \"🧇\": 338, \"🧈\": 360, \"🧉\": 3114, \"🧊\": 3115, \"🧍♀\": 1366, \"🧍♂\": 1365, \"🧍\": 1364, \"🧎♀\": 1369, \"🧎♂\": 1368, \"🧎\": 1367, \"🧏♀\": 1244, \"🧏♂\": 1243, \"🧏\": 1242, \"🧐\": 162, \"🧑🌾\": 1266, \"🧑🍳\": 1269, \"🧑🎓\": 1257, \"🧑🎤\": 1287, \"🧑🎨\": 1290, \"🧑🏫\": 1260, \"🧑🏭\": 1275, \"🧑💻\": 1284, \"🧑💼\": 1278, \"🧑🔧\": 1272, \"🧑🔬\": 1281, \"🧑🚀\": 1296, \"🧑🚒\": 1299, \"🧑🤝🧑\": 1442, \"🧑🦯\": 1370, \"🧑🦰\": 1212, \"🧑🦱\": 1214, \"🧑🦲\": 1218, \"🧑🦳\": 1216, \"🧑🦼\": 1373, \"🧑🦽\": 1376, \"🧑⚕\": 1254, \"🧑⚖\": 1263, \"🧑✈\": 1293, \"🧑\": 1202, \"🧒\": 1199, \"🧓\": 1221, \"🧔\": 1205, \"🧕\": 1320, \"🧖♀\": 1390, \"🧖♂\": 1389, \"🧖\": 1388, \"🧗♀\": 1393, \"🧗♂\": 1392, \"🧗\": 1391, \"🧘♀\": 1439, \"🧘♂\": 1438, \"🧘\": 1437, \"🧙♀\": 1336, \"🧙♂\": 1335, \"🧙\": 1334, \"🧚♀\": 1339, \"🧚♂\": 1338, \"🧚\": 1337, \"🧛♀\": 1342, \"🧛♂\": 1341, \"🧛\": 1340, \"🧜♀\": 1345, \"🧜♂\": 1344, \"🧜\": 1343, \"🧝♀\": 1348, \"🧝♂\": 1347, \"🧝\": 1346, \"🧞♀\": 1351, \"🧞♂\": 1350, \"🧞\": 1349, \"🧟♀\": 1354, \"🧟♂\": 1353, \"🧟\": 1352, \"🧠\": 1191, \"🧡\": 1128, \"🧢\": 638, \"🧣\": 69, \"🧤\": 610, \"🧥\": 611, \"🧦\": 612, \"🧧\": 516, \"🧨\": 55, \"🧩\": 565, \"🧪\": 6202, \"🧫\": 6203, \"🧬\": 6204, \"🧭\": 47, \"🧮\": 687, \"🧯\": 6228, \"🧰\": 6199, \"🧱\": 420, \"🧲\": 6200, \"🧳\": 4132, \"🧴\": 6221, \"🧵\": 578, \"🧶\": 579, \"🧷\": 6222, \"🧸\": 566, \"🧹\": 6223, \"🧺\": 6224, \"🧻\": 6225, \"🧼\": 6226, \"🧽\": 6227, \"🧾\": 6128, \"🧿\": 560, \"🩰\": 632, \"🩱\": 616, \"🩲\": 617, \"🩳\": 618, \"🩸\": 6209, \"🩹\": 6211, \"🩺\": 6212, \"🪀\": 556, \"🪁\": 557, \"🪂\": 4122, \"🪐\": 4180, \"🪑\": 6216, \"🪒\": 6220, \"🪓\": 6182, \"🪔\": 6103, \"🪕\": 667, \"‼\": 6355, \"⁉\": 6356, \"™\": 6364, \"ℹ\": 6389, \"↔\": 6269, \"↕\": 6268, \"↖\": 6267, \"↗\": 6261, \"↘\": 6263, \"↙\": 6265, \"↩\": 6270, \"↪\": 6271, \"⌚\": 4135, \"⌛\": 4133, \"⌨\": 680, \"⏏\": 6323, \"⏩\": 6310, \"⏪\": 6314, \"⏫\": 6317, \"⏬\": 6319, \"⏭\": 6311, \"⏮\": 6315, \"⏯\": 6312, \"⏰\": 4136, \"⏱\": 4137, \"⏲\": 4138, \"⏳\": 4134, \"⏸\": 6320, \"⏹\": 6321, \"⏺\": 6322, \"Ⓜ\": 6391, \"▪\": 6439, \"▫\": 6440, \"▶\": 6309, \"◀\": 6313, \"◻\": 6436, \"◼\": 6435, \"◽\": 6438, \"◾\": 6437, \"☀\": 4177, \"☁\": 4185, \"☂\": 4200, \"☃\": 4205, \"☄\": 4207, \"☎\": 671, \"☑\": 6341, \"☔\": 4201, \"☕\": 3101, \"☘\": 2123, \"☝\": 1167, \"☠\": 194, \"☢\": 6258, \"☣\": 6259, \"☦\": 6288, \"☪\": 6289, \"☮\": 6290, \"☯\": 6286, \"☸\": 6285, \"☹\": 166, \"☺\": 119, \"♈\": 6293, \"♉\": 6294, \"♊\": 6295, \"♋\": 6296, \"♌\": 6297, \"♍\": 6298, \"♎\": 6299, \"♏\": 6300, \"♐\": 6301, \"♑\": 6302, \"♒\": 6303, \"♓\": 6304, \"♟\": 571, \"♠\": 567, \"♣\": 570, \"♥\": 568, \"♦\": 569, \"♨\": 457, \"♻\": 6334, \"♾\": 6333, \"♿\": 6237, \"⚒\": 6184, \"⚓\": 4110, \"⚔\": 6187, \"⚖\": 6195, \"⚗\": 6201, \"⚙\": 6193, \"⚛\": 6282, \"⚜\": 6335, \"⚠\": 6247, \"⚡\": 4203, \"⚪\": 6425, \"⚫\": 6424, \"⚰\": 6231, \"⚱\": 6232, \"⚽\": 528, \"⚾\": 529, \"⛄\": 4206, \"⛅\": 4186, \"⛈\": 4187, \"⛎\": 6305, \"⛏\": 6183, \"⛑\": 639, \"⛓\": 6198, \"⛔\": 6249, \"⛩\": 445, \"⛪\": 441, \"⛰\": 49, \"⛱\": 4202, \"⛲\": 447, \"⛳\": 547, \"⛴\": 4115, \"⛵\": 4111, \"⛷\": 1396, \"⛸\": 548, \"⛹♀\": 1412, \"⛹♂\": 1411, \"⛹\": 1410, \"⛺\": 448, \"⛽\": 4104, \"✂\": 6171, \"✅\": 6340, \"✈\": 4118, \"✉\": 6132, \"✊\": 1170, \"✋\": 1153, \"✌\": 1157, \"✍\": 1180, \"✏\": 6145, \"✒\": 6146, \"✔\": 6342, \"✖\": 6343, \"✝\": 6287, \"✡\": 6284, \"✨\": 56, \"✳\": 6352, \"✴\": 6353, \"❄\": 4204, \"❇\": 6354, \"❌\": 6344, \"❎\": 6345, \"❓\": 6357, \"❔\": 6358, \"❕\": 6359, \"❗\": 6360, \"❣\": 1125, \"❤\": 1127, \"➕\": 6346, \"➖\": 6347, \"➗\": 6348, \"➡\": 6262, \"➰\": 6349, \"➿\": 6350, \"⤴\": 6272, \"⤵\": 6273, \"⬅\": 6266, \"⬆\": 6260, \"⬇\": 6264, \"⬛\": 6433, \"⬜\": 6434, \"⭐\": 4181, \"⭕\": 6339, \"〰\": 6361, \"〽\": 6351, \"㊗\": 6413, \"㊙\": 6414, \"🎅🏻\": 0, \"🎅🏼\": 0, \"🎅🏽\": 0, \"🎅🏾\": 0, \"🎅🏿\": 0, \"🏂🏻\": 0, \"🏂🏼\": 0, \"🏂🏽\": 0, \"🏂🏾\": 0, \"🏂🏿\": 0, \"🏃🏻♀\": 0, \"🏃🏼♀\": 0, \"🏃🏽♀\": 0, \"🏃🏾♀\": 0, \"🏃🏿♀\": 0, \"🏃🏻♂\": 0, \"🏃🏼♂\": 0, \"🏃🏽♂\": 0, \"🏃🏾♂\": 0, \"🏃🏿♂\": 0, \"🏃🏻\": 0, \"🏃🏼\": 0, \"🏃🏽\": 0, \"🏃🏾\": 0, \"🏃🏿\": 0, \"🏄🏻♀\": 0, \"🏄🏼♀\": 0, \"🏄🏽♀\": 0, \"🏄🏾♀\": 0, \"🏄🏿♀\": 0, \"🏄🏻♂\": 0, \"🏄🏼♂\": 0, \"🏄🏽♂\": 0, \"🏄🏾♂\": 0, \"🏄🏿♂\": 0, \"🏄🏻\": 0, \"🏄🏼\": 0, \"🏄🏽\": 0, \"🏄🏾\": 0, \"🏄🏿\": 0, \"🏇🏻\": 0, \"🏇🏼\": 0, \"🏇🏽\": 0, \"🏇🏾\": 0, \"🏇🏿\": 0, \"🏊🏻♀\": 0, \"🏊🏼♀\": 0, \"🏊🏽♀\": 0, \"🏊🏾♀\": 0, \"🏊🏿♀\": 0, \"🏊🏻♂\": 0, \"🏊🏼♂\": 0, \"🏊🏽♂\": 0, \"🏊🏾♂\": 0, \"🏊🏿♂\": 0, \"🏊🏻\": 0, \"🏊🏼\": 0, \"🏊🏽\": 0, \"🏊🏾\": 0, \"🏊🏿\": 0, \"🏋🏻♀\": 0, \"🏋🏼♀\": 0, \"🏋🏽♀\": 0, \"🏋🏾♀\": 0, \"🏋🏿♀\": 0, \"🏋🏻♂\": 0, \"🏋🏼♂\": 0, \"🏋🏽♂\": 0, \"🏋🏾♂\": 0, \"🏋🏿♂\": 0, \"🏋🏻\": 0, \"🏋🏼\": 0, \"🏋🏽\": 0, \"🏋🏾\": 0, \"🏋🏿\": 0, \"🏌🏻♀\": 0, \"🏌🏼♀\": 0, \"🏌🏽♀\": 0, \"🏌🏾♀\": 0, \"🏌🏿♀\": 0, \"🏌🏻♂\": 0, \"🏌🏼♂\": 0, \"🏌🏽♂\": 0, \"🏌🏾♂\": 0, \"🏌🏿♂\": 0, \"🏌🏻\": 0, \"🏌🏼\": 0, \"🏌🏽\": 0, \"🏌🏾\": 0, \"🏌🏿\": 0, \"👂🏻\": 0, \"👂🏼\": 0, \"👂🏽\": 0, \"👂🏾\": 0, \"👂🏿\": 0, \"👃🏻\": 0, \"👃🏼\": 0, \"👃🏽\": 0, \"👃🏾\": 0, \"👃🏿\": 0, \"👆🏻\": 0, \"👆🏼\": 0, \"👆🏽\": 0, \"👆🏾\": 0, \"👆🏿\": 0, \"👇🏻\": 0, \"👇🏼\": 0, \"👇🏽\": 0, \"👇🏾\": 0, \"👇🏿\": 0, \"👈🏻\": 0, \"👈🏼\": 0, \"👈🏽\": 0, \"👈🏾\": 0, \"👈🏿\": 0, \"👉🏻\": 0, \"👉🏼\": 0, \"👉🏽\": 0, \"👉🏾\": 0, \"👉🏿\": 0, \"👊🏻\": 0, \"👊🏼\": 0, \"👊🏽\": 0, \"👊🏾\": 0, \"👊🏿\": 0, \"👋🏻\": 0, \"👋🏼\": 0, \"👋🏽\": 0, \"👋🏾\": 0, \"👋🏿\": 0, \"👌🏻\": 0, \"👌🏼\": 0, \"👌🏽\": 0, \"👌🏾\": 0, \"👌🏿\": 0, \"👍🏻\": 0, \"👍🏼\": 0, \"👍🏽\": 0, \"👍🏾\": 0, \"👍🏿\": 0, \"👎🏻\": 0, \"👎🏼\": 0, \"👎🏽\": 0, \"👎🏾\": 0, \"👎🏿\": 0, \"👏🏻\": 0, \"👏🏼\": 0, \"👏🏽\": 0, \"👏🏾\": 0, \"👏🏿\": 0, \"👐🏻\": 0, \"👐🏼\": 0, \"👐🏽\": 0, \"👐🏾\": 0, \"👐🏿\": 0, \"👦🏻\": 0, \"👦🏼\": 0, \"👦🏽\": 0, \"👦🏾\": 0, \"👦🏿\": 0, \"👧🏻\": 0, \"👧🏼\": 0, \"👧🏽\": 0, \"👧🏾\": 0, \"👧🏿\": 0, \"👨🏻🌾\": 0, \"👨🏼🌾\": 0, \"👨🏽🌾\": 0, \"👨🏾🌾\": 0, \"👨🏿🌾\": 0, \"👨🏻🍳\": 0, \"👨🏼🍳\": 0, \"👨🏽🍳\": 0, \"👨🏾🍳\": 0, \"👨🏿🍳\": 0, \"👨🏻🎓\": 0, \"👨🏼🎓\": 0, \"👨🏽🎓\": 0, \"👨🏾🎓\": 0, \"👨🏿🎓\": 0, \"👨🏻🎤\": 0, \"👨🏼🎤\": 0, \"👨🏽🎤\": 0, \"👨🏾🎤\": 0, \"👨🏿🎤\": 0, \"👨🏻🎨\": 0, \"👨🏼🎨\": 0, \"👨🏽🎨\": 0, \"👨🏾🎨\": 0, \"👨🏿🎨\": 0, \"👨🏻🏫\": 0, \"👨🏼🏫\": 0, \"👨🏽🏫\": 0, \"👨🏾🏫\": 0, \"👨🏿🏫\": 0, \"👨🏻🏭\": 0, \"👨🏼🏭\": 0, \"👨🏽🏭\": 0, \"👨🏾🏭\": 0, \"👨🏿🏭\": 0, \"👨🏻💻\": 0, \"👨🏼💻\": 0, \"👨🏽💻\": 0, \"👨🏾💻\": 0, \"👨🏿💻\": 0, \"👨🏻💼\": 0, \"👨🏼💼\": 0, \"👨🏽💼\": 0, \"👨🏾💼\": 0, \"👨🏿💼\": 0, \"👨🏻🔧\": 0, \"👨🏼🔧\": 0, \"👨🏽🔧\": 0, \"👨🏾🔧\": 0, \"👨🏿🔧\": 0, \"👨🏻🔬\": 0, \"👨🏼🔬\": 0, \"👨🏽🔬\": 0, \"👨🏾🔬\": 0, \"👨🏿🔬\": 0, \"👨🏻🚀\": 0, \"👨🏼🚀\": 0, \"👨🏽🚀\": 0, \"👨🏾🚀\": 0, \"👨🏿🚀\": 0, \"👨🏻🚒\": 0, \"👨🏼🚒\": 0, \"👨🏽🚒\": 0, \"👨🏾🚒\": 0, \"👨🏿🚒\": 0, \"👨🏻🦯\": 0, \"👨🏼🦯\": 0, \"👨🏽🦯\": 0, \"👨🏾🦯\": 0, \"👨🏿🦯\": 0, \"👨🏻🦰\": 0, \"👨🏼🦰\": 0, \"👨🏽🦰\": 0, \"👨🏾🦰\": 0, \"👨🏿🦰\": 0, \"👨🏻🦱\": 0, \"👨🏼🦱\": 0, \"👨🏽🦱\": 0, \"👨🏾🦱\": 0, \"👨🏿🦱\": 0, \"👨🏻🦲\": 0, \"👨🏼🦲\": 0, \"👨🏽🦲\": 0, \"👨🏾🦲\": 0, \"👨🏿🦲\": 0, \"👨🏻🦳\": 0, \"👨🏼🦳\": 0, \"👨🏽🦳\": 0, \"👨🏾🦳\": 0, \"👨🏿🦳\": 0, \"👨🏻🦼\": 0, \"👨🏼🦼\": 0, \"👨🏽🦼\": 0, \"👨🏾🦼\": 0, \"👨🏿🦼\": 0, \"👨🏻🦽\": 0, \"👨🏼🦽\": 0, \"👨🏽🦽\": 0, \"👨🏾🦽\": 0, \"👨🏿🦽\": 0, \"👨🏻⚕\": 0, \"👨🏼⚕\": 0, \"👨🏽⚕\": 0, \"👨🏾⚕\": 0, \"👨🏿⚕\": 0, \"👨🏻⚖\": 0, \"👨🏼⚖\": 0, \"👨🏽⚖\": 0, \"👨🏾⚖\": 0, \"👨🏿⚖\": 0, \"👨🏻✈\": 0, \"👨🏼✈\": 0, \"👨🏽✈\": 0, \"👨🏾✈\": 0, \"👨🏿✈\": 0, \"👨🏻\": 0, \"👨🏼\": 0, \"👨🏽\": 0, \"👨🏾\": 0, \"👨🏿\": 0, \"👩🏻🌾\": 0, \"👩🏼🌾\": 0, \"👩🏽🌾\": 0, \"👩🏾🌾\": 0, \"👩🏿🌾\": 0, \"👩🏻🍳\": 0, \"👩🏼🍳\": 0, \"👩🏽🍳\": 0, \"👩🏾🍳\": 0, \"👩🏿🍳\": 0, \"👩🏻🎓\": 0, \"👩🏼🎓\": 0, \"👩🏽🎓\": 0, \"👩🏾🎓\": 0, \"👩🏿🎓\": 0, \"👩🏻🎤\": 0, \"👩🏼🎤\": 0, \"👩🏽🎤\": 0, \"👩🏾🎤\": 0, \"👩🏿🎤\": 0, \"👩🏻🎨\": 0, \"👩🏼🎨\": 0, \"👩🏽🎨\": 0, \"👩🏾🎨\": 0, \"👩🏿🎨\": 0, \"👩🏻🏫\": 0, \"👩🏼🏫\": 0, \"👩🏽🏫\": 0, \"👩🏾🏫\": 0, \"👩🏿🏫\": 0, \"👩🏻🏭\": 0, \"👩🏼🏭\": 0, \"👩🏽🏭\": 0, \"👩🏾🏭\": 0, \"👩🏿🏭\": 0, \"👩🏻💻\": 0, \"👩🏼💻\": 0, \"👩🏽💻\": 0, \"👩🏾💻\": 0, \"👩🏿💻\": 0, \"👩🏻💼\": 0, \"👩🏼💼\": 0, \"👩🏽💼\": 0, \"👩🏾💼\": 0, \"👩🏿💼\": 0, \"👩🏻🔧\": 0, \"👩🏼🔧\": 0, \"👩🏽🔧\": 0, \"👩🏾🔧\": 0, \"👩🏿🔧\": 0, \"👩🏻🔬\": 0, \"👩🏼🔬\": 0, \"👩🏽🔬\": 0, \"👩🏾🔬\": 0, \"👩🏿🔬\": 0, \"👩🏻🚀\": 0, \"👩🏼🚀\": 0, \"👩🏽🚀\": 0, \"👩🏾🚀\": 0, \"👩🏿🚀\": 0, \"👩🏻🚒\": 0, \"👩🏼🚒\": 0, \"👩🏽🚒\": 0, \"👩🏾🚒\": 0, \"👩🏿🚒\": 0, \"👩🏻🦯\": 0, \"👩🏼🦯\": 0, \"👩🏽🦯\": 0, \"👩🏾🦯\": 0, \"👩🏿🦯\": 0, \"👩🏻🦰\": 0, \"👩🏼🦰\": 0, \"👩🏽🦰\": 0, \"👩🏾🦰\": 0, \"👩🏿🦰\": 0, \"👩🏻🦱\": 0, \"👩🏼🦱\": 0, \"👩🏽🦱\": 0, \"👩🏾🦱\": 0, \"👩🏿🦱\": 0, \"👩🏻🦲\": 0, \"👩🏼🦲\": 0, \"👩🏽🦲\": 0, \"👩🏾🦲\": 0, \"👩🏿🦲\": 0, \"👩🏻🦳\": 0, \"👩🏼🦳\": 0, \"👩🏽🦳\": 0, \"👩🏾🦳\": 0, \"👩🏿🦳\": 0, \"👩🏻🦼\": 0, \"👩🏼🦼\": 0, \"👩🏽🦼\": 0, \"👩🏾🦼\": 0, \"👩🏿🦼\": 0, \"👩🏻🦽\": 0, \"👩🏼🦽\": 0, \"👩🏽🦽\": 0, \"👩🏾🦽\": 0, \"👩🏿🦽\": 0, \"👩🏻⚕\": 0, \"👩🏼⚕\": 0, \"👩🏽⚕\": 0, \"👩🏾⚕\": 0, \"👩🏿⚕\": 0, \"👩🏻⚖\": 0, \"👩🏼⚖\": 0, \"👩🏽⚖\": 0, \"👩🏾⚖\": 0, \"👩🏿⚖\": 0, \"👩🏻✈\": 0, \"👩🏼✈\": 0, \"👩🏽✈\": 0, \"👩🏾✈\": 0, \"👩🏿✈\": 0, \"👩🏻\": 0, \"👩🏼\": 0, \"👩🏽\": 0, \"👩🏾\": 0, \"👩🏿\": 0, \"👫🏻\": 0, \"👫🏼\": 0, \"👫🏽\": 0, \"👫🏾\": 0, \"👫🏿\": 0, \"👩🏻🤝👨🏼\": 0, \"👩🏻🤝👨🏽\": 0, \"👩🏻🤝👨🏾\": 0, \"👩🏻🤝👨🏿\": 0, \"👩🏼🤝👨🏻\": 0, \"👩🏼🤝👨🏽\": 0, \"👩🏼🤝👨🏾\": 0, \"👩🏼🤝👨🏿\": 0, \"👩🏽🤝👨🏻\": 0, \"👩🏽🤝👨🏼\": 0, \"👩🏽🤝👨🏾\": 0, \"👩🏽🤝👨🏿\": 0, \"👩🏾🤝👨🏻\": 0, \"👩🏾🤝👨🏼\": 0, \"👩🏾🤝👨🏽\": 0, \"👩🏾🤝👨🏿\": 0, \"👩🏿🤝👨🏻\": 0, \"👩🏿🤝👨🏼\": 0, \"👩🏿🤝👨🏽\": 0, \"👩🏿🤝👨🏾\": 0, \"👬🏻\": 0, \"👬🏼\": 0, \"👬🏽\": 0, \"👬🏾\": 0, \"👬🏿\": 0, \"👨🏻🤝👨🏼\": 0, \"👨🏻🤝👨🏽\": 0, \"👨🏻🤝👨🏾\": 0, \"👨🏻🤝👨🏿\": 0, \"👨🏼🤝👨🏻\": 0, \"👨🏼🤝👨🏽\": 0, \"👨🏼🤝👨🏾\": 0, \"👨🏼🤝👨🏿\": 0, \"👨🏽🤝👨🏻\": 0, \"👨🏽🤝👨🏼\": 0, \"👨🏽🤝👨🏾\": 0, \"👨🏽🤝👨🏿\": 0, \"👨🏾🤝👨🏻\": 0, \"👨🏾🤝👨🏼\": 0, \"👨🏾🤝👨🏽\": 0, \"👨🏾🤝👨🏿\": 0, \"👨🏿🤝👨🏻\": 0, \"👨🏿🤝👨🏼\": 0, \"👨🏿🤝👨🏽\": 0, \"👨🏿🤝👨🏾\": 0, \"👭🏻\": 0, \"👭🏼\": 0, \"👭🏽\": 0, \"👭🏾\": 0, \"👭🏿\": 0, \"👩🏻🤝👩🏼\": 0, \"👩🏻🤝👩🏽\": 0, \"👩🏻🤝👩🏾\": 0, \"👩🏻🤝👩🏿\": 0, \"👩🏼🤝👩🏻\": 0, \"👩🏼🤝👩🏽\": 0, \"👩🏼🤝👩🏾\": 0, \"👩🏼🤝👩🏿\": 0, \"👩🏽🤝👩🏻\": 0, \"👩🏽🤝👩🏼\": 0, \"👩🏽🤝👩🏾\": 0, \"👩🏽🤝👩🏿\": 0, \"👩🏾🤝👩🏻\": 0, \"👩🏾🤝👩🏼\": 0, \"👩🏾🤝👩🏽\": 0, \"👩🏾🤝👩🏿\": 0, \"👩🏿🤝👩🏻\": 0, \"👩🏿🤝👩🏼\": 0, \"👩🏿🤝👩🏽\": 0, \"👩🏿🤝👩🏾\": 0, \"👮🏻♀\": 0, \"👮🏼♀\": 0, \"👮🏽♀\": 0, \"👮🏾♀\": 0, \"👮🏿♀\": 0, \"👮🏻♂\": 0, \"👮🏼♂\": 0, \"👮🏽♂\": 0, \"👮🏾♂\": 0, \"👮🏿♂\": 0, \"👮🏻\": 0, \"👮🏼\": 0, \"👮🏽\": 0, \"👮🏾\": 0, \"👮🏿\": 0, \"👰🏻\": 0, \"👰🏼\": 0, \"👰🏽\": 0, \"👰🏾\": 0, \"👰🏿\": 0, \"👱🏻♀\": 0, \"👱🏼♀\": 0, \"👱🏽♀\": 0, \"👱🏾♀\": 0, \"👱🏿♀\": 0, \"👱🏻♂\": 0, \"👱🏼♂\": 0, \"👱🏽♂\": 0, \"👱🏾♂\": 0, \"👱🏿♂\": 0, \"👱🏻\": 0, \"👱🏼\": 0, \"👱🏽\": 0, \"👱🏾\": 0, \"👱🏿\": 0, \"👲🏻\": 0, \"👲🏼\": 0, \"👲🏽\": 0, \"👲🏾\": 0, \"👲🏿\": 0, \"👳🏻♀\": 0, \"👳🏼♀\": 0, \"👳🏽♀\": 0, \"👳🏾♀\": 0, \"👳🏿♀\": 0, \"👳🏻♂\": 0, \"👳🏼♂\": 0, \"👳🏽♂\": 0, \"👳🏾♂\": 0, \"👳🏿♂\": 0, \"👳🏻\": 0, \"👳🏼\": 0, \"👳🏽\": 0, \"👳🏾\": 0, \"👳🏿\": 0, \"👴🏻\": 0, \"👴🏼\": 0, \"👴🏽\": 0, \"👴🏾\": 0, \"👴🏿\": 0, \"👵🏻\": 0, \"👵🏼\": 0, \"👵🏽\": 0, \"👵🏾\": 0, \"👵🏿\": 0, \"👶🏻\": 0, \"👶🏼\": 0, \"👶🏽\": 0, \"👶🏾\": 0, \"👶🏿\": 0, \"👷🏻♀\": 0, \"👷🏼♀\": 0, \"👷🏽♀\": 0, \"👷🏾♀\": 0, \"👷🏿♀\": 0, \"👷🏻♂\": 0, \"👷🏼♂\": 0, \"👷🏽♂\": 0, \"👷🏾♂\": 0, \"👷🏿♂\": 0, \"👷🏻\": 0, \"👷🏼\": 0, \"👷🏽\": 0, \"👷🏾\": 0, \"👷🏿\": 0, \"👸🏻\": 0, \"👸🏼\": 0, \"👸🏽\": 0, \"👸🏾\": 0, \"👸🏿\": 0, \"👼🏻\": 0, \"👼🏼\": 0, \"👼🏽\": 0, \"👼🏾\": 0, \"👼🏿\": 0, \"💁🏻♀\": 0, \"💁🏼♀\": 0, \"💁🏽♀\": 0, \"💁🏾♀\": 0, \"💁🏿♀\": 0, \"💁🏻♂\": 0, \"💁🏼♂\": 0, \"💁🏽♂\": 0, \"💁🏾♂\": 0, \"💁🏿♂\": 0, \"💁🏻\": 0, \"💁🏼\": 0, \"💁🏽\": 0, \"💁🏾\": 0, \"💁🏿\": 0, \"💂🏻♀\": 0, \"💂🏼♀\": 0, \"💂🏽♀\": 0, \"💂🏾♀\": 0, \"💂🏿♀\": 0, \"💂🏻♂\": 0, \"💂🏼♂\": 0, \"💂🏽♂\": 0, \"💂🏾♂\": 0, \"💂🏿♂\": 0, \"💂🏻\": 0, \"💂🏼\": 0, \"💂🏽\": 0, \"💂🏾\": 0, \"💂🏿\": 0, \"💃🏻\": 0, \"💃🏼\": 0, \"💃🏽\": 0, \"💃🏾\": 0, \"💃🏿\": 0, \"💅🏻\": 0, \"💅🏼\": 0, \"💅🏽\": 0, \"💅🏾\": 0, \"💅🏿\": 0, \"💆🏻♀\": 0, \"💆🏼♀\": 0, \"💆🏽♀\": 0, \"💆🏾♀\": 0, \"💆🏿♀\": 0, \"💆🏻♂\": 0, \"💆🏼♂\": 0, \"💆🏽♂\": 0, \"💆🏾♂\": 0, \"💆🏿♂\": 0, \"💆🏻\": 0, \"💆🏼\": 0, \"💆🏽\": 0, \"💆🏾\": 0, \"💆🏿\": 0, \"💇🏻♀\": 0, \"💇🏼♀\": 0, \"💇🏽♀\": 0, \"💇🏾♀\": 0, \"💇🏿♀\": 0, \"💇🏻♂\": 0, \"💇🏼♂\": 0, \"💇🏽♂\": 0, \"💇🏾♂\": 0, \"💇🏿♂\": 0, \"💇🏻\": 0, \"💇🏼\": 0, \"💇🏽\": 0, \"💇🏾\": 0, \"💇🏿\": 0, \"💪🏻\": 0, \"💪🏼\": 0, \"💪🏽\": 0, \"💪🏾\": 0, \"💪🏿\": 0, \"🕴🏻\": 0, \"🕴🏼\": 0, \"🕴🏽\": 0, \"🕴🏾\": 0, \"🕴🏿\": 0, \"🕵🏻♀\": 0, \"🕵🏼♀\": 0, \"🕵🏽♀\": 0, \"🕵🏾♀\": 0, \"🕵🏿♀\": 0, \"🕵🏻♂\": 0, \"🕵🏼♂\": 0, \"🕵🏽♂\": 0, \"🕵🏾♂\": 0, \"🕵🏿♂\": 0, \"🕵🏻\": 0, \"🕵🏼\": 0, \"🕵🏽\": 0, \"🕵🏾\": 0, \"🕵🏿\": 0, \"🕺🏻\": 0, \"🕺🏼\": 0, \"🕺🏽\": 0, \"🕺🏾\": 0, \"🕺🏿\": 0, \"🖐🏻\": 0, \"🖐🏼\": 0, \"🖐🏽\": 0, \"🖐🏾\": 0, \"🖐🏿\": 0, \"🖕🏻\": 0, \"🖕🏼\": 0, \"🖕🏽\": 0, \"🖕🏾\": 0, \"🖕🏿\": 0, \"🖖🏻\": 0, \"🖖🏼\": 0, \"🖖🏽\": 0, \"🖖🏾\": 0, \"🖖🏿\": 0, \"🙅🏻♀\": 0, \"🙅🏼♀\": 0, \"🙅🏽♀\": 0, \"🙅🏾♀\": 0, \"🙅🏿♀\": 0, \"🙅🏻♂\": 0, \"🙅🏼♂\": 0, \"🙅🏽♂\": 0, \"🙅🏾♂\": 0, \"🙅🏿♂\": 0, \"🙅🏻\": 0, \"🙅🏼\": 0, \"🙅🏽\": 0, \"🙅🏾\": 0, \"🙅🏿\": 0, \"🙆🏻♀\": 0, \"🙆🏼♀\": 0, \"🙆🏽♀\": 0, \"🙆🏾♀\": 0, \"🙆🏿♀\": 0, \"🙆🏻♂\": 0, \"🙆🏼♂\": 0, \"🙆🏽♂\": 0, \"🙆🏾♂\": 0, \"🙆🏿♂\": 0, \"🙆🏻\": 0, \"🙆🏼\": 0, \"🙆🏽\": 0, \"🙆🏾\": 0, \"🙆🏿\": 0, \"🙇🏻♀\": 0, \"🙇🏼♀\": 0, \"🙇🏽♀\": 0, \"🙇🏾♀\": 0, \"🙇🏿♀\": 0, \"🙇🏻♂\": 0, \"🙇🏼♂\": 0, \"🙇🏽♂\": 0, \"🙇🏾♂\": 0, \"🙇🏿♂\": 0, \"🙇🏻\": 0, \"🙇🏼\": 0, \"🙇🏽\": 0, \"🙇🏾\": 0, \"🙇🏿\": 0, \"🙋🏻♀\": 0, \"🙋🏼♀\": 0, \"🙋🏽♀\": 0, \"🙋🏾♀\": 0, \"🙋🏿♀\": 0, \"🙋🏻♂\": 0, \"🙋🏼♂\": 0, \"🙋🏽♂\": 0, \"🙋🏾♂\": 0, \"🙋🏿♂\": 0, \"🙋🏻\": 0, \"🙋🏼\": 0, \"🙋🏽\": 0, \"🙋🏾\": 0, \"🙋🏿\": 0, \"🙌🏻\": 0, \"🙌🏼\": 0, \"🙌🏽\": 0, \"🙌🏾\": 0, \"🙌🏿\": 0, \"🙍🏻♀\": 0, \"🙍🏼♀\": 0, \"🙍🏽♀\": 0, \"🙍🏾♀\": 0, \"🙍🏿♀\": 0, \"🙍🏻♂\": 0, \"🙍🏼♂\": 0, \"🙍🏽♂\": 0, \"🙍🏾♂\": 0, \"🙍🏿♂\": 0, \"🙍🏻\": 0, \"🙍🏼\": 0, \"🙍🏽\": 0, \"🙍🏾\": 0, \"🙍🏿\": 0, \"🙎🏻♀\": 0, \"🙎🏼♀\": 0, \"🙎🏽♀\": 0, \"🙎🏾♀\": 0, \"🙎🏿♀\": 0, \"🙎🏻♂\": 0, \"🙎🏼♂\": 0, \"🙎🏽♂\": 0, \"🙎🏾♂\": 0, \"🙎🏿♂\": 0, \"🙎🏻\": 0, \"🙎🏼\": 0, \"🙎🏽\": 0, \"🙎🏾\": 0, \"🙎🏿\": 0, \"🙏🏻\": 0, \"🙏🏼\": 0, \"🙏🏽\": 0, \"🙏🏾\": 0, \"🙏🏿\": 0, \"🚣🏻♀\": 0, \"🚣🏼♀\": 0, \"🚣🏽♀\": 0, \"🚣🏾♀\": 0, \"🚣🏿♀\": 0, \"🚣🏻♂\": 0, \"🚣🏼♂\": 0, \"🚣🏽♂\": 0, \"🚣🏾♂\": 0, \"🚣🏿♂\": 0, \"🚣🏻\": 0, \"🚣🏼\": 0, \"🚣🏽\": 0, \"🚣🏾\": 0, \"🚣🏿\": 0, \"🚴🏻♀\": 0, \"🚴🏼♀\": 0, \"🚴🏽♀\": 0, \"🚴🏾♀\": 0, \"🚴🏿♀\": 0, \"🚴🏻♂\": 0, \"🚴🏼♂\": 0, \"🚴🏽♂\": 0, \"🚴🏾♂\": 0, \"🚴🏿♂\": 0, \"🚴🏻\": 0, \"🚴🏼\": 0, \"🚴🏽\": 0, \"🚴🏾\": 0, \"🚴🏿\": 0, \"🚵🏻♀\": 0, \"🚵🏼♀\": 0, \"🚵🏽♀\": 0, \"🚵🏾♀\": 0, \"🚵🏿♀\": 0, \"🚵🏻♂\": 0, \"🚵🏼♂\": 0, \"🚵🏽♂\": 0, \"🚵🏾♂\": 0, \"🚵🏿♂\": 0, \"🚵🏻\": 0, \"🚵🏼\": 0, \"🚵🏽\": 0, \"🚵🏾\": 0, \"🚵🏿\": 0, \"🚶🏻♀\": 0, \"🚶🏼♀\": 0, \"🚶🏽♀\": 0, \"🚶🏾♀\": 0, \"🚶🏿♀\": 0, \"🚶🏻♂\": 0, \"🚶🏼♂\": 0, \"🚶🏽♂\": 0, \"🚶🏾♂\": 0, \"🚶🏿♂\": 0, \"🚶🏻\": 0, \"🚶🏼\": 0, \"🚶🏽\": 0, \"🚶🏾\": 0, \"🚶🏿\": 0, \"🛀🏻\": 0, \"🛀🏼\": 0, \"🛀🏽\": 0, \"🛀🏾\": 0, \"🛀🏿\": 0, \"🛌🏻\": 0, \"🛌🏼\": 0, \"🛌🏽\": 0, \"🛌🏾\": 0, \"🛌🏿\": 0, \"🤏🏻\": 0, \"🤏🏼\": 0, \"🤏🏽\": 0, \"🤏🏾\": 0, \"🤏🏿\": 0, \"🤘🏻\": 0, \"🤘🏼\": 0, \"🤘🏽\": 0, \"🤘🏾\": 0, \"🤘🏿\": 0, \"🤙🏻\": 0, \"🤙🏼\": 0, \"🤙🏽\": 0, \"🤙🏾\": 0, \"🤙🏿\": 0, \"🤚🏻\": 0, \"🤚🏼\": 0, \"🤚🏽\": 0, \"🤚🏾\": 0, \"🤚🏿\": 0, \"🤛🏻\": 0, \"🤛🏼\": 0, \"🤛🏽\": 0, \"🤛🏾\": 0, \"🤛🏿\": 0, \"🤜🏻\": 0, \"🤜🏼\": 0, \"🤜🏽\": 0, \"🤜🏾\": 0, \"🤜🏿\": 0, \"🤞🏻\": 0, \"🤞🏼\": 0, \"🤞🏽\": 0, \"🤞🏾\": 0, \"🤞🏿\": 0, \"🤟🏻\": 0, \"🤟🏼\": 0, \"🤟🏽\": 0, \"🤟🏾\": 0, \"🤟🏿\": 0, \"🤦🏻♀\": 0, \"🤦🏼♀\": 0, \"🤦🏽♀\": 0, \"🤦🏾♀\": 0, \"🤦🏿♀\": 0, \"🤦🏻♂\": 0, \"🤦🏼♂\": 0, \"🤦🏽♂\": 0, \"🤦🏾♂\": 0, \"🤦🏿♂\": 0, \"🤦🏻\": 0, \"🤦🏼\": 0, \"🤦🏽\": 0, \"🤦🏾\": 0, \"🤦🏿\": 0, \"🤰🏻\": 0, \"🤰🏼\": 0, \"🤰🏽\": 0, \"🤰🏾\": 0, \"🤰🏿\": 0, \"🤱🏻\": 0, \"🤱🏼\": 0, \"🤱🏽\": 0, \"🤱🏾\": 0, \"🤱🏿\": 0, \"🤲🏻\": 0, \"🤲🏼\": 0, \"🤲🏽\": 0, \"🤲🏾\": 0, \"🤲🏿\": 0, \"🤳🏻\": 0, \"🤳🏼\": 0, \"🤳🏽\": 0, \"🤳🏾\": 0, \"🤳🏿\": 0, \"🤴🏻\": 0, \"🤴🏼\": 0, \"🤴🏽\": 0, \"🤴🏾\": 0, \"🤴🏿\": 0, \"🤵🏻\": 0, \"🤵🏼\": 0, \"🤵🏽\": 0, \"🤵🏾\": 0, \"🤵🏿\": 0, \"🤶🏻\": 0, \"🤶🏼\": 0, \"🤶🏽\": 0, \"🤶🏾\": 0, \"🤶🏿\": 0, \"🤷🏻♀\": 0, \"🤷🏼♀\": 0, \"🤷🏽♀\": 0, \"🤷🏾♀\": 0, \"🤷🏿♀\": 0, \"🤷🏻♂\": 0, \"🤷🏼♂\": 0, \"🤷🏽♂\": 0, \"🤷🏾♂\": 0, \"🤷🏿♂\": 0, \"🤷🏻\": 0, \"🤷🏼\": 0, \"🤷🏽\": 0, \"🤷🏾\": 0, \"🤷🏿\": 0, \"🤸🏻♀\": 0, \"🤸🏼♀\": 0, \"🤸🏽♀\": 0, \"🤸🏾♀\": 0, \"🤸🏿♀\": 0, \"🤸🏻♂\": 0, \"🤸🏼♂\": 0, \"🤸🏽♂\": 0, \"🤸🏾♂\": 0, \"🤸🏿♂\": 0, \"🤸🏻\": 0, \"🤸🏼\": 0, \"🤸🏽\": 0, \"🤸🏾\": 0, \"🤸🏿\": 0, \"🤹🏻♀\": 0, \"🤹🏼♀\": 0, \"🤹🏽♀\": 0, \"🤹🏾♀\": 0, \"🤹🏿♀\": 0, \"🤹🏻♂\": 0, \"🤹🏼♂\": 0, \"🤹🏽♂\": 0, \"🤹🏾♂\": 0, \"🤹🏿♂\": 0, \"🤹🏻\": 0, \"🤹🏼\": 0, \"🤹🏽\": 0, \"🤹🏾\": 0, \"🤹🏿\": 0, \"🤽🏻♀\": 0, \"🤽🏼♀\": 0, \"🤽🏽♀\": 0, \"🤽🏾♀\": 0, \"🤽🏿♀\": 0, \"🤽🏻♂\": 0, \"🤽🏼♂\": 0, \"🤽🏽♂\": 0, \"🤽🏾♂\": 0, \"🤽🏿♂\": 0, \"🤽🏻\": 0, \"🤽🏼\": 0, \"🤽🏽\": 0, \"🤽🏾\": 0, \"🤽🏿\": 0, \"🤾🏻♀\": 0, \"🤾🏼♀\": 0, \"🤾🏽♀\": 0, \"🤾🏾♀\": 0, \"🤾🏿♀\": 0, \"🤾🏻♂\": 0, \"🤾🏼♂\": 0, \"🤾🏽♂\": 0, \"🤾🏾♂\": 0, \"🤾🏿♂\": 0, \"🤾🏻\": 0, \"🤾🏼\": 0, \"🤾🏽\": 0, \"🤾🏾\": 0, \"🤾🏿\": 0, \"🦵🏻\": 0, \"🦵🏼\": 0, \"🦵🏽\": 0, \"🦵🏾\": 0, \"🦵🏿\": 0, \"🦶🏻\": 0, \"🦶🏼\": 0, \"🦶🏽\": 0, \"🦶🏾\": 0, \"🦶🏿\": 0, \"🦸🏻♀\": 0, \"🦸🏼♀\": 0, \"🦸🏽♀\": 0, \"🦸🏾♀\": 0, \"🦸🏿♀\": 0, \"🦸🏻♂\": 0, \"🦸🏼♂\": 0, \"🦸🏽♂\": 0, \"🦸🏾♂\": 0, \"🦸🏿♂\": 0, \"🦸🏻\": 0, \"🦸🏼\": 0, \"🦸🏽\": 0, \"🦸🏾\": 0, \"🦸🏿\": 0, \"🦹🏻♀\": 0, \"🦹🏼♀\": 0, \"🦹🏽♀\": 0, \"🦹🏾♀\": 0, \"🦹🏿♀\": 0, \"🦹🏻♂\": 0, \"🦹🏼♂\": 0, \"🦹🏽♂\": 0, \"🦹🏾♂\": 0, \"🦹🏿♂\": 0, \"🦹🏻\": 0, \"🦹🏼\": 0, \"🦹🏽\": 0, \"🦹🏾\": 0, \"🦹🏿\": 0, \"🦻🏻\": 0, \"🦻🏼\": 0, \"🦻🏽\": 0, \"🦻🏾\": 0, \"🦻🏿\": 0, \"🧍🏻♀\": 0, \"🧍🏼♀\": 0, \"🧍🏽♀\": 0, \"🧍🏾♀\": 0, \"🧍🏿♀\": 0, \"🧍🏻♂\": 0, \"🧍🏼♂\": 0, \"🧍🏽♂\": 0, \"🧍🏾♂\": 0, \"🧍🏿♂\": 0, \"🧍🏻\": 0, \"🧍🏼\": 0, \"🧍🏽\": 0, \"🧍🏾\": 0, \"🧍🏿\": 0, \"🧎🏻♀\": 0, \"🧎🏼♀\": 0, \"🧎🏽♀\": 0, \"🧎🏾♀\": 0, \"🧎🏿♀\": 0, \"🧎🏻♂\": 0, \"🧎🏼♂\": 0, \"🧎🏽♂\": 0, \"🧎🏾♂\": 0, \"🧎🏿♂\": 0, \"🧎🏻\": 0, \"🧎🏼\": 0, \"🧎🏽\": 0, \"🧎🏾\": 0, \"🧎🏿\": 0, \"🧏🏻♀\": 0, \"🧏🏼♀\": 0, \"🧏🏽♀\": 0, \"🧏🏾♀\": 0, \"🧏🏿♀\": 0, \"🧏🏻♂\": 0, \"🧏🏼♂\": 0, \"🧏🏽♂\": 0, \"🧏🏾♂\": 0, \"🧏🏿♂\": 0, \"🧏🏻\": 0, \"🧏🏼\": 0, \"🧏🏽\": 0, \"🧏🏾\": 0, \"🧏🏿\": 0, \"🧑🏻🌾\": 0, \"🧑🏼🌾\": 0, \"🧑🏽🌾\": 0, \"🧑🏾🌾\": 0, \"🧑🏿🌾\": 0, \"🧑🏻🍳\": 0, \"🧑🏼🍳\": 0, \"🧑🏽🍳\": 0, \"🧑🏾🍳\": 0, \"🧑🏿🍳\": 0, \"🧑🏻🎓\": 0, \"🧑🏼🎓\": 0, \"🧑🏽🎓\": 0, \"🧑🏾🎓\": 0, \"🧑🏿🎓\": 0, \"🧑🏻🎤\": 0, \"🧑🏼🎤\": 0, \"🧑🏽🎤\": 0, \"🧑🏾🎤\": 0, \"🧑🏿🎤\": 0, \"🧑🏻🎨\": 0, \"🧑🏼🎨\": 0, \"🧑🏽🎨\": 0, \"🧑🏾🎨\": 0, \"🧑🏿🎨\": 0, \"🧑🏻🏫\": 0, \"🧑🏼🏫\": 0, \"🧑🏽🏫\": 0, \"🧑🏾🏫\": 0, \"🧑🏿🏫\": 0, \"🧑🏻🏭\": 0, \"🧑🏼🏭\": 0, \"🧑🏽🏭\": 0, \"🧑🏾🏭\": 0, \"🧑🏿🏭\": 0, \"🧑🏻💻\": 0, \"🧑🏼💻\": 0, \"🧑🏽💻\": 0, \"🧑🏾💻\": 0, \"🧑🏿💻\": 0, \"🧑🏻💼\": 0, \"🧑🏼💼\": 0, \"🧑🏽💼\": 0, \"🧑🏾💼\": 0, \"🧑🏿💼\": 0, \"🧑🏻🔧\": 0, \"🧑🏼🔧\": 0, \"🧑🏽🔧\": 0, \"🧑🏾🔧\": 0, \"🧑🏿🔧\": 0, \"🧑🏻🔬\": 0, \"🧑🏼🔬\": 0, \"🧑🏽🔬\": 0, \"🧑🏾🔬\": 0, \"🧑🏿🔬\": 0, \"🧑🏻🚀\": 0, \"🧑🏼🚀\": 0, \"🧑🏽🚀\": 0, \"🧑🏾🚀\": 0, \"🧑🏿🚀\": 0, \"🧑🏻🚒\": 0, \"🧑🏼🚒\": 0, \"🧑🏽🚒\": 0, \"🧑🏾🚒\": 0, \"🧑🏿🚒\": 0, \"🧑🏻🤝🧑🏻\": 0, \"🧑🏻🤝🧑🏼\": 0, \"🧑🏻🤝🧑🏽\": 0, \"🧑🏻🤝🧑🏾\": 0, \"🧑🏻🤝🧑🏿\": 0, \"🧑🏼🤝🧑🏻\": 0, \"🧑🏼🤝🧑🏼\": 0, \"🧑🏼🤝🧑🏽\": 0, \"🧑🏼🤝🧑🏾\": 0, \"🧑🏼🤝🧑🏿\": 0, \"🧑🏽🤝🧑🏻\": 0, \"🧑🏽🤝🧑🏼\": 0, \"🧑🏽🤝🧑🏽\": 0, \"🧑🏽🤝🧑🏾\": 0, \"🧑🏽🤝🧑🏿\": 0, \"🧑🏾🤝🧑🏻\": 0, \"🧑🏾🤝🧑🏼\": 0, \"🧑🏾🤝🧑🏽\": 0, \"🧑🏾🤝🧑🏾\": 0, \"🧑🏾🤝🧑🏿\": 0, \"🧑🏿🤝🧑🏻\": 0, \"🧑🏿🤝🧑🏼\": 0, \"🧑🏿🤝🧑🏽\": 0, \"🧑🏿🤝🧑🏾\": 0, \"🧑🏿🤝🧑🏿\": 0, \"🧑🏻🦯\": 0, \"🧑🏼🦯\": 0, \"🧑🏽🦯\": 0, \"🧑🏾🦯\": 0, \"🧑🏿🦯\": 0, \"🧑🏻🦰\": 0, \"🧑🏼🦰\": 0, \"🧑🏽🦰\": 0, \"🧑🏾🦰\": 0, \"🧑🏿🦰\": 0, \"🧑🏻🦱\": 0, \"🧑🏼🦱\": 0, \"🧑🏽🦱\": 0, \"🧑🏾🦱\": 0, \"🧑🏿🦱\": 0, \"🧑🏻🦲\": 0, \"🧑🏼🦲\": 0, \"🧑🏽🦲\": 0, \"🧑🏾🦲\": 0, \"🧑🏿🦲\": 0, \"🧑🏻🦳\": 0, \"🧑🏼🦳\": 0, \"🧑🏽🦳\": 0, \"🧑🏾🦳\": 0, \"🧑🏿🦳\": 0, \"🧑🏻🦼\": 0, \"🧑🏼🦼\": 0, \"🧑🏽🦼\": 0, \"🧑🏾🦼\": 0, \"🧑🏿🦼\": 0, \"🧑🏻🦽\": 0, \"🧑🏼🦽\": 0, \"🧑🏽🦽\": 0, \"🧑🏾🦽\": 0, \"🧑🏿🦽\": 0, \"🧑🏻⚕\": 0, \"🧑🏼⚕\": 0, \"🧑🏽⚕\": 0, \"🧑🏾⚕\": 0, \"🧑🏿⚕\": 0, \"🧑🏻⚖\": 0, \"🧑🏼⚖\": 0, \"🧑🏽⚖\": 0, \"🧑🏾⚖\": 0, \"🧑🏿⚖\": 0, \"🧑🏻✈\": 0, \"🧑🏼✈\": 0, \"🧑🏽✈\": 0, \"🧑🏾✈\": 0, \"🧑🏿✈\": 0, \"🧑🏻\": 0, \"🧑🏼\": 0, \"🧑🏽\": 0, \"🧑🏾\": 0, \"🧑🏿\": 0, \"🧒🏻\": 0, \"🧒🏼\": 0, \"🧒🏽\": 0, \"🧒🏾\": 0, \"🧒🏿\": 0, \"🧓🏻\": 0, \"🧓🏼\": 0, \"🧓🏽\": 0, \"🧓🏾\": 0, \"🧓🏿\": 0, \"🧔🏻\": 0, \"🧔🏼\": 0, \"🧔🏽\": 0, \"🧔🏾\": 0, \"🧔🏿\": 0, \"🧕🏻\": 0, \"🧕🏼\": 0, \"🧕🏽\": 0, \"🧕🏾\": 0, \"🧕🏿\": 0, \"🧖🏻♀\": 0, \"🧖🏼♀\": 0, \"🧖🏽♀\": 0, \"🧖🏾♀\": 0, \"🧖🏿♀\": 0, \"🧖🏻♂\": 0, \"🧖🏼♂\": 0, \"🧖🏽♂\": 0, \"🧖🏾♂\": 0, \"🧖🏿♂\": 0, \"🧖🏻\": 0, \"🧖🏼\": 0, \"🧖🏽\": 0, \"🧖🏾\": 0, \"🧖🏿\": 0, \"🧗🏻♀\": 0, \"🧗🏼♀\": 0, \"🧗🏽♀\": 0, \"🧗🏾♀\": 0, \"🧗🏿♀\": 0, \"🧗🏻♂\": 0, \"🧗🏼♂\": 0, \"🧗🏽♂\": 0, \"🧗🏾♂\": 0, \"🧗🏿♂\": 0, \"🧗🏻\": 0, \"🧗🏼\": 0, \"🧗🏽\": 0, \"🧗🏾\": 0, \"🧗🏿\": 0, \"🧘🏻♀\": 0, \"🧘🏼♀\": 0, \"🧘🏽♀\": 0, \"🧘🏾♀\": 0, \"🧘🏿♀\": 0, \"🧘🏻♂\": 0, \"🧘🏼♂\": 0, \"🧘🏽♂\": 0, \"🧘🏾♂\": 0, \"🧘🏿♂\": 0, \"🧘🏻\": 0, \"🧘🏼\": 0, \"🧘🏽\": 0, \"🧘🏾\": 0, \"🧘🏿\": 0, \"🧙🏻♀\": 0, \"🧙🏼♀\": 0, \"🧙🏽♀\": 0, \"🧙🏾♀\": 0, \"🧙🏿♀\": 0, \"🧙🏻♂\": 0, \"🧙🏼♂\": 0, \"🧙🏽♂\": 0, \"🧙🏾♂\": 0, \"🧙🏿♂\": 0, \"🧙🏻\": 0, \"🧙🏼\": 0, \"🧙🏽\": 0, \"🧙🏾\": 0, \"🧙🏿\": 0, \"🧚🏻♀\": 0, \"🧚🏼♀\": 0, \"🧚🏽♀\": 0, \"🧚🏾♀\": 0, \"🧚🏿♀\": 0, \"🧚🏻♂\": 0, \"🧚🏼♂\": 0, \"🧚🏽♂\": 0, \"🧚🏾♂\": 0, \"🧚🏿♂\": 0, \"🧚🏻\": 0, \"🧚🏼\": 0, \"🧚🏽\": 0, \"🧚🏾\": 0, \"🧚🏿\": 0, \"🧛🏻♀\": 0, \"🧛🏼♀\": 0, \"🧛🏽♀\": 0, \"🧛🏾♀\": 0, \"🧛🏿♀\": 0, \"🧛🏻♂\": 0, \"🧛🏼♂\": 0, \"🧛🏽♂\": 0, \"🧛🏾♂\": 0, \"🧛🏿♂\": 0, \"🧛🏻\": 0, \"🧛🏼\": 0, \"🧛🏽\": 0, \"🧛🏾\": 0, \"🧛🏿\": 0, \"🧜🏻♀\": 0, \"🧜🏼♀\": 0, \"🧜🏽♀\": 0, \"🧜🏾♀\": 0, \"🧜🏿♀\": 0, \"🧜🏻♂\": 0, \"🧜🏼♂\": 0, \"🧜🏽♂\": 0, \"🧜🏾♂\": 0, \"🧜🏿♂\": 0, \"🧜🏻\": 0, \"🧜🏼\": 0, \"🧜🏽\": 0, \"🧜🏾\": 0, \"🧜🏿\": 0, \"🧝🏻♀\": 0, \"🧝🏼♀\": 0, \"🧝🏽♀\": 0, \"🧝🏾♀\": 0, \"🧝🏿♀\": 0, \"🧝🏻♂\": 0, \"🧝🏼♂\": 0, \"🧝🏽♂\": 0, \"🧝🏾♂\": 0, \"🧝🏿♂\": 0, \"🧝🏻\": 0, \"🧝🏼\": 0, \"🧝🏽\": 0, \"🧝🏾\": 0, \"🧝🏿\": 0, \"☝🏻\": 0, \"☝🏼\": 0, \"☝🏽\": 0, \"☝🏾\": 0, \"☝🏿\": 0, \"⛹🏻♀\": 0, \"⛹🏼♀\": 0, \"⛹🏽♀\": 0, \"⛹🏾♀\": 0, \"⛹🏿♀\": 0, \"⛹🏻♂\": 0, \"⛹🏼♂\": 0, \"⛹🏽♂\": 0, \"⛹🏾♂\": 0, \"⛹🏿♂\": 0, \"⛹🏻\": 0, \"⛹🏼\": 0, \"⛹🏽\": 0, \"⛹🏾\": 0, \"⛹🏿\": 0, \"✊🏻\": 0, \"✊🏼\": 0, \"✊🏽\": 0, \"✊🏾\": 0, \"✊🏿\": 0, \"✋🏻\": 0, \"✋🏼\": 0, \"✋🏽\": 0, \"✋🏾\": 0, \"✋🏿\": 0, \"✌🏻\": 0, \"✌🏼\": 0, \"✌🏽\": 0, \"✌🏾\": 0, \"✌🏿\": 0, \"✍🏻\": 0, \"✍🏼\": 0, \"✍🏽\": 0, \"✍🏾\": 0, \"✍🏿\": 0 };\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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\page.ts",
"name": "./src/pages/page.ts",
"index": 22,
"index2": 19,
"size": 1928,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 22,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"module": "./src/pages/pageIm.ts",
"moduleName": "./src/pages/pageIm.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "27:31-48"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "15:31-48"
},
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"module": "./src/pages/pagePassword.ts",
"moduleName": "./src/pages/pagePassword.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "13:31-48"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "14:31-48"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "10:31-48"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "./page",
"loc": "36:31-48"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\apiUpdatesManager.ts",
"name": "./src/lib/appManagers/apiUpdatesManager.ts",
"index": 31,
"index2": 24,
"size": 20810,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "23:44-74"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "20:44-74"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "23:44-74"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "23:44-74"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/apiUpdatesManager",
"loc": "11:44-86"
},
{
"moduleId": 42,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"module": "./src/lib/appManagers/appPollsManager.ts",
"moduleName": "./src/lib/appManagers/appPollsManager.ts",
"type": "cjs require",
"userRequest": "./apiUpdatesManager",
"loc": "10:44-74"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.ApiUpdatesManager = void 0;\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.attached = false;\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 ? utils_1.$rootScope.myID : updateMessage.user_id);\r\n var toID = updateMessage.chat_id\r\n ? -updateMessage.chat_id\r\n : (isOut ? updateMessage.user_id : utils_1.$rootScope.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 const 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 return 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 const 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(state) {\r\n if (this.attached)\r\n return;\r\n this.attached = true;\r\n mtprotoworker_1.default.setUpdatesProcessor(this.processUpdateMessage.bind(this));\r\n if (!state || !state.pts || !state.date || !state.seq) {\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 else {\r\n Object.assign(this.updatesState, state);\r\n this.getDifference();\r\n }\r\n }\r\n}\r\nexports.ApiUpdatesManager = ApiUpdatesManager;\r\nexports.default = new ApiUpdatesManager();\r\n"
},
{
"id": 20,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"name": "./src/lib/mtproto/apiFileManager.ts",
"index": 37,
"index2": 29,
"size": 22578,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/apiFileManager",
"loc": "28:41-77"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/apiFileManager",
"loc": "11:41-77"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/apiFileManager",
"loc": "15:41-77"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/apiFileManager",
"loc": "27:41-77"
},
{
"moduleId": 37,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "18:41-77"
},
{
"moduleId": 48,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"module": "./src/components/popupAvatar.ts",
"moduleName": "./src/components/popupAvatar.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/apiFileManager",
"loc": "8:41-81"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.ApiFileManager = void 0;\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\nconst appWebpManager_1 = __importDefault(require(\"../appManagers/appWebpManager\"));\r\nclass ApiFileManager {\r\n constructor() {\r\n this.cachedSavePromises = {};\r\n this.cachedDownloadPromises = {};\r\n this.cachedDownloads = {};\r\n /* public indexedKeys: Set<string> = new Set();\r\n private keysLoaded = false; */\r\n this.downloadPulls = {};\r\n this.downloadActives = {};\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 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 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, options) {\r\n switch (location._) {\r\n case 'inputDocumentFileLocation': {\r\n let fileName = (location.file_name || '').split('.');\r\n let ext = fileName[fileName.length - 1] || '';\r\n if ((options === null || options === void 0 ? void 0 : options.stickerType) == 1 && !appWebpManager_1.default.isSupported()) {\r\n ext += '.png';\r\n }\r\n let thumbPart = location.thumb_size ? '_' + location.thumb_size : '';\r\n return (fileName[0] ? fileName[0] + '_' : '') + location.id + thumbPart + (ext ? '.' + ext : ext);\r\n }\r\n default: {\r\n if (!location.volume_id && !location.file_reference) {\r\n this.log.trace('Empty location', location);\r\n }\r\n let ext = 'jpg';\r\n if ((options === null || options === void 0 ? void 0 : options.stickerType) == 1 && !appWebpManager_1.default.isSupported()) {\r\n ext += '.png';\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 }\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 processSticker = false;\r\n if (options.stickerType == 1 && !appWebpManager_1.default.isSupported()) {\r\n processSticker = true;\r\n options.mimeType = 'image/png';\r\n }\r\n let dcID = options.dcID || location.dc_id;\r\n let mimeType = options.mimeType || 'image/jpeg';\r\n let fileName = this.getFileName(location, options);\r\n let 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 let fileStorage = this.getFileStorage();\r\n return this.cachedDownloadPromises[fileName] = fileStorage.getFile(fileName).then((blob) => {\r\n //throw '';\r\n this.log('downloadSmallFile found photo by fileName:', fileName);\r\n return this.cachedDownloads[fileName] = blob;\r\n }).catch(() => {\r\n this.log.warn('downloadSmallFile found no photo by fileName:', fileName);\r\n let downloadPromise = this.downloadRequest(dcID, () => {\r\n let 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 let processDownloaded = (bytes) => {\r\n //this.log('processDownloaded', location, bytes);\r\n if (processSticker) {\r\n return appWebpManager_1.default.convertToPng(bytes);\r\n }\r\n return Promise.resolve(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) {\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);\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 let processSticker = false;\r\n if (options.stickerType == 1 && !appWebpManager_1.default.isSupported()) {\r\n if (options.toFileEntry || size > 524288) {\r\n delete options.stickerType;\r\n }\r\n else {\r\n processSticker = true;\r\n options.mimeType = 'image/png';\r\n }\r\n }\r\n // this.log('Dload file', dcID, location, size)\r\n let fileName = this.getFileName(location, options);\r\n let toFileEntry = options.toFileEntry || null;\r\n let cachedPromise = this.cachedSavePromises[fileName] || this.cachedDownloadPromises[fileName];\r\n let 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(fileName).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).then((blob) => __awaiter(this, void 0, void 0, function* () {\r\n //this.log('is that i wanted');\r\n //throw '';\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(fileName);\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 if (processSticker) {\r\n return appWebpManager_1.default.convertToPng(bytes);\r\n }\r\n return Promise.resolve(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 }, errorHandler);\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 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": 21,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto_config.ts",
"name": "./src/lib/mtproto/mtproto_config.ts",
"index": 8,
"index2": 6,
"size": 606,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"issuerId": 13,
"issuerName": "./src/lib/storage.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 13,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"name": "./src/lib/storage.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 626,
"building": 787
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 13,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"module": "./src/lib/storage.ts",
"moduleName": "./src/lib/storage.ts",
"type": "cjs require",
"userRequest": "./mtproto/mtproto_config",
"loc": "3:25-60"
},
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtproto_config",
"loc": "16:25-65"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtproto_config",
"loc": "15:25-65"
},
{
"moduleId": 63,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"module": "./src/lib/mtproto/mtproto.ts",
"moduleName": "./src/lib/mtproto/mtproto.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "8:25-52"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/mtproto_config",
"loc": "40:25-65"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Modes = exports.App = void 0;\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": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"index": 21,
"index2": 68,
"size": 3966,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 50,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"module": "./src/pages/pagePassword.ts",
"moduleName": "./src/pages/pagePassword.ts",
"type": "cjs require",
"userRequest": "./pageIm",
"loc": "6:33-52"
},
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./pages/pageIm",
"loc": "105:57-82"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "./pageIm",
"loc": "7:33-52"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "./pageIm",
"loc": "37:33-52"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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(\"../components/misc\");\r\n//import {stackBlurImage} from '../lib/StackBlur';\r\nconst page_1 = __importDefault(require(\"./page\"));\r\nlet onFirstMount = () => {\r\n //return;\r\n let promise = 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 // @ts-ignore\r\n if (process.env.NODE_ENV != 'production') {\r\n Promise.resolve().then(() => __importStar(require('../lib/services')));\r\n }\r\n //(Array.from(document.getElementsByClassName('rp')) as HTMLElement[]).forEach(el => 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\n return promise;\r\n};\r\nconst page = new page_1.default('page-chats', false, onFirstMount);\r\nexports.default = page;\r\n"
},
{
"id": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesIDsManager.ts",
"name": "./src/lib/appManagers/appMessagesIDsManager.ts",
"index": 34,
"index2": 25,
"size": 2147,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesIDsManager",
"loc": "17:48-82"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesIDsManager",
"loc": "17:48-82"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appMessagesIDsManager",
"loc": "10:48-94"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appMessagesIDsManager",
"loc": "9:48-99"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "./appMessagesIDsManager",
"loc": "10:48-82"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AppMessagesIDsManager = void 0;\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": 24,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\preloader.ts",
"name": "./src/components/preloader.ts",
"index": 46,
"index2": 39,
"size": 4065,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "31:36-73"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "25:36-73"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "./preloader",
"loc": "41:36-58"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../../components/preloader",
"loc": "21:36-73"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./preloader",
"loc": "29:36-58"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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.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 <div class=\"you-spin-me-round\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"preloader-circular\" viewBox=\"25 25 50 50\">\r\n <circle class=\"preloader-path-new\" cx=\"50\" cy=\"50\" r=\"23\" fill=\"none\" stroke-miterlimit=\"10\"/>\r\n </svg>\r\n </div>`;\r\n if (cancelable) {\r\n this.preloader.innerHTML += `\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"preloader-close\" viewBox=\"0 0 20 20\">\r\n <line x1=\"0\" y1=\"20\" x2=\"20\" y2=\"0\" stroke-width=\"2\" stroke-linecap=\"round\"></line>\r\n <line x1=\"0\" y1=\"0\" x2=\"20\" y2=\"20\" stroke-width=\"2\" stroke-linecap=\"round\"></line>\r\n </svg>`;\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, append = true) {\r\n if (promise) {\r\n this.promise = promise;\r\n let tempID = --this.tempID;\r\n let onEnd = () => {\r\n if (tempID == this.tempID) {\r\n this.detach();\r\n }\r\n promise.notify = null;\r\n };\r\n promise.then(onEnd, onEnd);\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 ? 'append' : 'prepend'](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 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": 25,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"name": "./src/lib/appManagers/appDialogsManager.ts",
"index": 49,
"index2": 45,
"size": 36519,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appDialogsManager",
"loc": "14:44-74"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appDialogsManager",
"loc": "13:44-86"
},
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appDialogsManager",
"loc": "19:44-91"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "./appDialogsManager",
"loc": "26:44-74"
},
{
"moduleId": 47,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"module": "./src/components/appSearch.ts",
"moduleName": "./src/components/appSearch.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appDialogsManager",
"loc": "7:44-91"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppDialogsManager = void 0;\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\n//import Scrollable from \"../../components/scrollable\";\r\nconst scrollable_new_1 = __importDefault(require(\"../../components/scrollable_new\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst popup_1 = require(\"../../components/popup\");\r\nconst testScroll = false;\r\nconst USEPINNEDDELIMITER = false;\r\nclass DialogsContextMenu {\r\n constructor(attachTo) {\r\n this.attachTo = attachTo;\r\n this.element = document.getElementById('dialogs-contextmenu');\r\n this.buttons = {};\r\n misc_1.parseMenuButtonsTo(this.buttons, this.element.children);\r\n const onContextMenu = (e) => {\r\n var _a, _b;\r\n let li = null;\r\n try {\r\n li = utils_1.findUpTag(e.target, 'LI');\r\n }\r\n catch (e) { }\r\n if (!li)\r\n return;\r\n e.preventDefault();\r\n if (this.element.classList.contains('active')) {\r\n return false;\r\n }\r\n e.cancelBubble = true;\r\n this.selectedID = +li.getAttribute('data-peerID');\r\n const dialog = appMessagesManager_1.default.getDialogByPeerID(this.selectedID)[0];\r\n const notOurDialog = dialog.peerID != utils_1.$rootScope.myID;\r\n // archive button\r\n if (notOurDialog) {\r\n const button = this.buttons.archive;\r\n const condition = dialog.folder_id == 1;\r\n button.classList.toggle('flip-icon', condition);\r\n button.innerText = condition ? 'Unarchive' : 'Archive';\r\n this.buttons.archive.style.display = '';\r\n }\r\n else {\r\n this.buttons.archive.style.display = 'none';\r\n }\r\n // pin button\r\n {\r\n const button = this.buttons.pin;\r\n const condition = (_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.pinned;\r\n button.classList.toggle('flip-icon', condition);\r\n button.innerText = condition ? 'Unpin' : 'Pin';\r\n }\r\n // mute button\r\n if (notOurDialog) {\r\n const button = this.buttons.mute;\r\n const condition = dialog.notify_settings && dialog.notify_settings.mute_until > (Date.now() / 1000 | 0);\r\n button.classList.toggle('flip-icon', condition);\r\n button.innerText = condition ? 'Unmute' : 'Mute';\r\n this.buttons.mute.style.display = '';\r\n }\r\n else {\r\n this.buttons.mute.style.display = 'none';\r\n }\r\n // unread button\r\n {\r\n const button = this.buttons.unread;\r\n const condition = !!(((_b = dialog.pFlags) === null || _b === void 0 ? void 0 : _b.unread_mark) || dialog.unread_count);\r\n button.classList.toggle('flip-icon', condition);\r\n button.innerText = condition ? 'Mark as Read' : 'Mark as Unread';\r\n }\r\n /* // clear history button\r\n if(appPeersManager.isChannel(this.selectedID)) {\r\n this.buttons.clear.style.display = 'none';\r\n } else {\r\n this.buttons.clear.style.display = '';\r\n } */\r\n // delete button\r\n let deleteButtonText = '';\r\n if (appPeersManager_1.default.isMegagroup(this.selectedID)) {\r\n deleteButtonText = 'Leave';\r\n //deleteButtonText = 'Leave group';\r\n this.peerType = 'megagroup';\r\n }\r\n else if (appPeersManager_1.default.isChannel(this.selectedID)) {\r\n deleteButtonText = 'Leave';\r\n //deleteButtonText = 'Leave channel';\r\n this.peerType = 'channel';\r\n }\r\n else if (this.selectedID < 0) {\r\n deleteButtonText = 'Delete';\r\n //deleteButtonText = 'Delete and leave';\r\n this.peerType = 'group';\r\n }\r\n else {\r\n deleteButtonText = 'Delete';\r\n //deleteButtonText = 'Delete chat';\r\n this.peerType = this.selectedID == utils_1.$rootScope.myID ? 'saved' : 'chat';\r\n }\r\n this.buttons.delete.innerText = deleteButtonText;\r\n li.classList.add('menu-open');\r\n misc_1.positionMenu(e, this.element);\r\n misc_1.openBtnMenu(this.element, () => {\r\n li.classList.remove('menu-open');\r\n });\r\n };\r\n this.attachTo.forEach(el => {\r\n el.addEventListener('contextmenu', onContextMenu);\r\n });\r\n this.buttons.archive.addEventListener('click', () => {\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(this.selectedID)[0];\r\n if (dialog) {\r\n appMessagesManager_1.default.editPeerFolders([dialog.peerID], +!dialog.folder_id);\r\n }\r\n });\r\n this.buttons.pin.addEventListener('click', () => {\r\n appMessagesManager_1.default.toggleDialogPin(this.selectedID);\r\n });\r\n this.buttons.mute.addEventListener('click', () => {\r\n appImManager_1.default.mutePeer(this.selectedID);\r\n });\r\n this.buttons.unread.addEventListener('click', () => {\r\n appMessagesManager_1.default.markDialogUnread(this.selectedID);\r\n });\r\n this.buttons.delete.addEventListener('click', () => {\r\n let firstName = appPeersManager_1.default.getPeerTitle(this.selectedID, false, true);\r\n let callback = (justClear) => {\r\n appMessagesManager_1.default.flushHistory(this.selectedID, justClear);\r\n };\r\n let title, description, buttons;\r\n switch (this.peerType) {\r\n case 'channel': {\r\n title = 'Leave Channel?';\r\n description = `Are you sure you want to leave this channel?`;\r\n buttons = [{\r\n text: 'LEAVE ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(true)\r\n }];\r\n break;\r\n }\r\n case 'megagroup': {\r\n title = 'Leave Group?';\r\n description = `Are you sure you want to leave this group?`;\r\n buttons = [{\r\n text: 'LEAVE ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(true)\r\n }];\r\n break;\r\n }\r\n case 'chat': {\r\n title = 'Delete Chat?';\r\n description = `Are you sure you want to delete chat with <b>${firstName}</b>?`;\r\n buttons = [{\r\n text: 'DELETE FOR ME AND ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(false)\r\n }, {\r\n text: 'DELETE JUST FOR ME',\r\n isDanger: true,\r\n callback: () => callback(true)\r\n }];\r\n break;\r\n }\r\n case 'saved': {\r\n title = 'Delete Saved Messages?';\r\n description = `Are you sure you want to delete all your saved messages?`;\r\n buttons = [{\r\n text: 'DELETE SAVED MESSAGES',\r\n isDanger: true,\r\n callback: () => callback(false)\r\n }];\r\n break;\r\n }\r\n case 'group': {\r\n title = 'Delete and leave Group?';\r\n description = `Are you sure you want to delete all message history and leave <b>${firstName}</b>?`;\r\n buttons = [{\r\n text: 'DELETE AND LEAVE ' + firstName,\r\n isDanger: true,\r\n callback: () => callback(true)\r\n }];\r\n break;\r\n }\r\n }\r\n buttons.push({\r\n text: 'CANCEL',\r\n isCancel: true\r\n });\r\n let popup = new popup_1.PopupPeer('popup-delete-chat', {\r\n peerID: this.selectedID,\r\n title: title,\r\n description: description,\r\n buttons: buttons\r\n });\r\n popup.show();\r\n });\r\n }\r\n}\r\nclass AppDialogsManager {\r\n constructor() {\r\n this.chatList = document.getElementById('dialogs');\r\n this.chatListArchived = document.getElementById('dialogs-archived');\r\n /* public chatsHidden: Scrollable[\"hiddenElements\"];\r\n public chatsVisible: Scrollable[\"visibleElements\"];\r\n public chatsArchivedHidden: Scrollable[\"hiddenElements\"];\r\n public chatsArchivedVisible: Scrollable[\"visibleElements\"]; */\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.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.contextMenu = new DialogsContextMenu([this.chatList, this.chatListArchived]);\r\n this.chatsPreloader = misc_1.putPreloader(null, true);\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.scroll = new scrollable_new_1.default(this.chatsContainer, 'y', 'CL', this.chatList, 500);\r\n this.scroll.setVirtualContainer(this.chatList);\r\n this.scroll.onScrolledBottom = this.onChatsScroll.bind(this);\r\n //this.scroll.attachSentinels();\r\n this.scrollArchived = new scrollable_new_1.default(this.chatsArchivedContainer, 'y', 'CLA', this.chatListArchived, 500);\r\n this.scrollArchived.setVirtualContainer(this.chatListArchived);\r\n this.scrollArchived.onScrolledBottom = this.onChatsArchivedScroll.bind(this);\r\n ///this.scroll.attachSentinels();\r\n this.setListClickListener(this.chatList);\r\n this.setListClickListener(this.chatListArchived);\r\n if (testScroll) {\r\n let i = 0;\r\n let add = () => {\r\n let li = document.createElement('li');\r\n li.dataset.id = '' + i;\r\n li.id = '' + i;\r\n li.innerHTML = `<div class=\"rp\"><div class=\"user-avatar\" style=\"background-color: rgb(166, 149, 231); font-size: 0px;\"><img src=\"assets/img/pepe.jpg\"></div><div class=\"user-caption\"><p><span class=\"user-title\">${i}</span><span><span class=\"message-status\"></span><span class=\"message-time\">18:33</span></span></p><p><span class=\"user-last-message\"><b>-_-_-_-: </b>qweasd</span><span></span></p></div></div>`;\r\n i++;\r\n this.scroll.append(li);\r\n };\r\n for (let i = 0; i < 1000; ++i) {\r\n add();\r\n }\r\n window.addElement = add;\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.avatarEl.classList.add('is-online');\r\n }\r\n else {\r\n dom.avatarEl.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.setDialogPosition(dialog);\r\n this.setPinnedDelimiter();\r\n });\r\n utils_1.$rootScope.$on('dialog_flush', (e) => {\r\n let peerID = e.detail.peerID;\r\n let dialog = appMessagesManager_1.default.getDialogByPeerID(peerID)[0];\r\n if (dialog) {\r\n this.setLastMessage(dialog);\r\n }\r\n });\r\n utils_1.$rootScope.$on('dialogs_multiupdate', (e) => {\r\n let dialogs = e.detail;\r\n for (let id in dialogs) {\r\n let dialog = dialogs[id];\r\n /////console.log('updating dialog:', dialog);\r\n if (!(dialog.peerID in this.doms)) {\r\n this.addDialog(dialog);\r\n }\r\n this.setLastMessage(dialog);\r\n this.setDialogPosition(dialog);\r\n }\r\n this.setPinnedDelimiter();\r\n });\r\n utils_1.$rootScope.$on('dialog_drop', (e) => {\r\n let { peerID, dialog } = e.detail;\r\n let dom = this.getDialogDom(peerID);\r\n if (dom) {\r\n dom.listEl.remove();\r\n delete this.doms[peerID];\r\n (dialog.folder_id == 1 ? this.scrollArchived : this.scroll).reorder();\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 utils_1.$rootScope.$on('peer_changed', (e) => {\r\n let peerID = e.detail;\r\n let lastPeerID = this.lastActiveListElement && +this.lastActiveListElement.getAttribute('data-peerID');\r\n if (this.lastActiveListElement && lastPeerID != peerID) {\r\n this.lastActiveListElement.classList.remove('active');\r\n this.lastActiveListElement = null;\r\n }\r\n if (lastPeerID != peerID) {\r\n let dom = this.getDialogDom(peerID);\r\n if (dom) {\r\n this.lastActiveListElement = dom.listEl;\r\n dom.listEl.classList.add('active');\r\n }\r\n }\r\n });\r\n appMessagesManager_1.default.loaded.then(() => {\r\n this.loadDialogs().then(result => {\r\n this.setPinnedDelimiter();\r\n //appSidebarLeft.onChatsScroll();\r\n this.loadDialogs(true);\r\n });\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 storage = appMessagesManager_1.default.dialogsStorage[+archived] || [];\r\n let offsetIndex = 0;\r\n for (let i = storage.length - 1; i >= 0; --i) {\r\n let dialog = storage[i];\r\n if (this.getDialogDom(dialog.peerID)) {\r\n offsetIndex = dialog.index;\r\n break;\r\n }\r\n }\r\n //let offset = storage[storage.length - 1]?.index || 0;\r\n try {\r\n console.time('getDialogs time');\r\n let loadCount = 50 /*this.chatsLoadCount */;\r\n this.loadDialogsPromise = appMessagesManager_1.default.getConversations('', offsetIndex, 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 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 this.log('getDialogs ' + loadCount + ' dialogs by offset:', offsetIndex, result, this.scroll.length, archived);\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 });\r\n }\r\n onChatsScroll() {\r\n if (this.loadedAll || this.loadDialogsPromise)\r\n return;\r\n console.log('onChatsScroll');\r\n this.loadDialogs();\r\n }\r\n onChatsArchivedScroll() {\r\n if (this.loadedArchivedAll || this.loadDialogsPromise)\r\n return;\r\n this.loadDialogs(true);\r\n }\r\n setListClickListener(list, onFound) {\r\n list.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\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 result;\r\n //console.log('appDialogsManager: lock lazyLoadQueue');\r\n if (elem) {\r\n if (onFound)\r\n onFound();\r\n let peerID = +elem.getAttribute('data-peerID');\r\n let lastMsgID = +elem.dataset.mid || undefined;\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);\r\n /* if(result instanceof Promise) {\r\n this.lastGoodClickID = this.lastClickID;\r\n appImManager.lazyLoadQueue.lock();\r\n } */\r\n }\r\n else {\r\n result = appImManager_1.default.setPeer(0);\r\n }\r\n }, { capture: true });\r\n }\r\n setDialogPosition(dialog) {\r\n let pos = appMessagesManager_1.default.getDialogByPeerID(dialog.peerID)[1];\r\n let dom = this.getDialogDom(dialog.peerID);\r\n let prevPos = utils_1.whichChild(dom.listEl);\r\n let wrongFolder = (dialog.folder_id == 1 && this.chatList == dom.listEl.parentElement) || (dialog.folder_id == 0 && this.chatListArchived == dom.listEl.parentElement);\r\n if (wrongFolder)\r\n prevPos = 0xFFFF;\r\n if (prevPos == pos) {\r\n return;\r\n }\r\n else if (prevPos < pos) { // was higher\r\n pos += 1;\r\n }\r\n let chatList = dialog.folder_id == 1 ? this.chatListArchived : this.chatList;\r\n if (chatList.childElementCount > pos) {\r\n chatList.insertBefore(dom.listEl, chatList.children[pos]);\r\n }\r\n else {\r\n chatList.append(dom.listEl);\r\n }\r\n (dialog.folder_id == 1 ? this.scrollArchived : this.scroll).reorder();\r\n this.log('setDialogPosition:', dialog, dom, pos);\r\n }\r\n setPinnedDelimiter() {\r\n var _a, _b;\r\n if (!USEPINNEDDELIMITER)\r\n return;\r\n let index = -1;\r\n let dialogs = appMessagesManager_1.default.dialogsStorage[0];\r\n for (let dialog of dialogs) {\r\n if ((_a = dialog.pFlags) === null || _a === void 0 ? void 0 : _a.pinned) {\r\n index++;\r\n }\r\n }\r\n let currentIndex = (_b = (this.pinnedDelimiter.parentElement && utils_1.whichChild(this.pinnedDelimiter.parentElement))) !== null && _b !== void 0 ? _b : -1;\r\n if (index == currentIndex)\r\n return;\r\n let children = this.chatList.children;\r\n let modifying = [];\r\n if (currentIndex != -1 && children.length > currentIndex) {\r\n let li = children[currentIndex];\r\n modifying.push(li);\r\n }\r\n if (index != -1 && children.length > index) {\r\n let li = children[index];\r\n modifying.push(li);\r\n li.append(this.pinnedDelimiter);\r\n }\r\n else {\r\n this.pinnedDelimiter.remove();\r\n }\r\n modifying.forEach(elem => {\r\n this.scroll.updateElement(elem);\r\n });\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 (!dom) {\r\n dom = this.getDialogDom(dialog.peerID);\r\n }\r\n if (lastMessage._ == 'messageEmpty') {\r\n dom.lastMessageSpan.innerHTML = '';\r\n dom.lastTimeSpan.innerHTML = '';\r\n delete dom.listEl.dataset.mid;\r\n return;\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 if (highlightWord && lastMessage.message) {\r\n let lastMessageText = appMessagesManager_1.default.getRichReplyText(lastMessage, '');\r\n let messageText = lastMessage.message;\r\n let entities = richtextprocessor_1.RichTextProcessor.parseEntities(messageText.replace(/\\n/g, ' '), { noLinebreakers: true });\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 let messageWrapped = richtextprocessor_1.RichTextProcessor.wrapRichText(messageText, {\r\n noLinebreakers: true,\r\n entities: entities,\r\n noTextFormat: true\r\n });\r\n dom.lastMessageSpan.innerHTML = lastMessageText + messageWrapped;\r\n }\r\n else if (!lastMessage.deleted) {\r\n dom.lastMessageSpan.innerHTML = lastMessage.rReply;\r\n }\r\n else {\r\n dom.lastMessageSpan.innerHTML = '';\r\n }\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 if (!lastMessage.deleted) {\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 }\r\n else\r\n dom.lastTimeSpan.innerHTML = '';\r\n if ((this.doms[peerID] || this.domsArchived[peerID]) == dom) {\r\n this.setUnreadMessages(dialog);\r\n }\r\n else { // means search\r\n dom.listEl.dataset.mid = lastMessage.mid;\r\n }\r\n }\r\n setUnreadMessages(dialog) {\r\n let dom = this.getDialogDom(dialog.peerID);\r\n let lastMessage = appMessagesManager_1.default.getMessage(dialog.top_message);\r\n if (lastMessage._ != 'messageEmpty' && !lastMessage.deleted &&\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.innerText = '';\r\n dom.unreadMessagesSpan.classList.remove('tgico-pinnedchat');\r\n if (dialog.unread_count || dialog.pFlags.unread_mark) {\r\n dom.unreadMessagesSpan.innerText = '' + (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 && dialog.folder_id == 0) {\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, rippleEnabled = true, onlyFirstName = false) {\r\n let dialog;\r\n if (typeof (_dialog) === 'number') {\r\n let originalDialog = appMessagesManager_1.default.getDialogByPeerID(_dialog)[0];\r\n if (!originalDialog) {\r\n originalDialog = {\r\n peerID: _dialog,\r\n pFlags: {}\r\n };\r\n }\r\n dialog = originalDialog;\r\n }\r\n else {\r\n dialog = _dialog;\r\n }\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, false, onlyFirstName);\r\n let avatarEl = new avatar_1.default();\r\n avatarEl.setAttribute('dialog', '1');\r\n avatarEl.setAttribute('peer', '' + peerID);\r\n avatarEl.classList.add('dialog-avatar');\r\n if (drawStatus && peerID != utils_1.$rootScope.myID && dialog.peer) {\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 avatarEl.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 < 0) {\r\n let chat = appChatsManager_1.default.getChat(-peerID);\r\n if (chat && chat.pFlags && chat.pFlags.verified) {\r\n titleSpan.classList.add('is-verified');\r\n }\r\n }\r\n else {\r\n let user = appUsersManager_1.default.getUser(peerID);\r\n if (user && user.pFlags && user.pFlags.verified) {\r\n titleSpan.classList.add('is-verified');\r\n }\r\n }\r\n if (peerID == utils_1.$rootScope.myID) {\r\n title = onlyFirstName ? 'Saved' : 'Saved Messages';\r\n }\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(avatarEl, captionDiv);\r\n if (rippleEnabled) {\r\n misc_1.ripple(paddingDiv);\r\n /* ripple(paddingDiv, (id) => {\r\n this.log('dialogs click element');\r\n this.lastClickID = id;\r\n \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.lazyLoadQueue.unlock();\r\n }\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 avatarEl,\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 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 if (dialog.peerID < 0) {\r\n let s = user.rFirstName || user.username;\r\n if (!s)\r\n return;\r\n str = s + ' ';\r\n }\r\n let senderBold = document.createElement('i');\r\n str += 'typing...';\r\n senderBold.innerHTML = 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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\filemanager.ts",
"name": "./src/lib/filemanager.ts",
"index": 36,
"index2": 26,
"size": 7178,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"issuerId": 8,
"issuerName": "./src/lib/appManagers/appPhotosManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"name": "./src/lib/appManagers/appPhotosManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 848,
"building": 194,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPhotosManager.ts",
"module": "./src/lib/appManagers/appPhotosManager.ts",
"moduleName": "./src/lib/appManagers/appPhotosManager.ts",
"type": "cjs require",
"userRequest": "../filemanager",
"loc": "9:38-63"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../filemanager",
"loc": "16:38-63"
},
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../filemanager",
"loc": "18:38-63"
},
{
"moduleId": 62,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\idb.ts",
"module": "./src/lib/idb.ts",
"moduleName": "./src/lib/idb.ts",
"type": "cjs require",
"userRequest": "./filemanager",
"loc": "7:38-62"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\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 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 = URL.createObjectURL(blob);\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": 27,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\searchIndexManager.ts",
"name": "./src/lib/searchIndexManager.ts",
"index": 40,
"index2": 31,
"size": 3779,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"issuerId": 4,
"issuerName": "./src/lib/appManagers/appUsersManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 4,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"name": "./src/lib/appManagers/appUsersManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1439,
"building": 131,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../searchIndexManager",
"loc": "14:45-77"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../searchIndexManager",
"loc": "38:45-77"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appChatsManager.ts",
"module": "./src/lib/appManagers/appChatsManager.ts",
"moduleName": "./src/lib/appManagers/appChatsManager.ts",
"type": "cjs require",
"userRequest": "../searchIndexManager",
"loc": "22:45-77"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appProfileManager.ts",
"module": "./src/lib/appManagers/appProfileManager.ts",
"moduleName": "./src/lib/appManagers/appProfileManager.ts",
"type": "cjs require",
"userRequest": "../searchIndexManager",
"loc": "29:45-77"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 config_1 = __importDefault(require(\"./config\"));\r\nlet SearchIndexManager = /** @class */ (() => {\r\n class SearchIndexManager {\r\n createIndex() {\r\n return {\r\n shortIndexes: {},\r\n fullTexts: {}\r\n };\r\n }\r\n cleanSearchText(text, latinize = true) {\r\n const hasTag = text.charAt(0) == '%';\r\n text = text.replace(SearchIndexManager['badCharsRe'], '').replace(SearchIndexManager['trimRe'], '');\r\n if (latinize) {\r\n text = text.replace(/[^A-Za-z0-9]/g, (ch) => {\r\n const latinizeCh = config_1.default.LatinizeMap[ch];\r\n return latinizeCh !== undefined ? latinizeCh : ch;\r\n });\r\n }\r\n text = text.toLowerCase();\r\n if (hasTag) {\r\n text = '%' + text;\r\n }\r\n return text;\r\n }\r\n cleanUsername(username) {\r\n return username && username.toLowerCase() || '';\r\n }\r\n indexObject(id, searchText, searchIndex) {\r\n if (searchIndex.fullTexts[id] !== undefined) {\r\n return false;\r\n }\r\n searchText = this.cleanSearchText(searchText);\r\n if (!searchText.length) {\r\n return false;\r\n }\r\n const shortIndexes = searchIndex.shortIndexes;\r\n searchIndex.fullTexts[id] = searchText;\r\n searchText.split(' ').forEach((searchWord) => {\r\n let len = Math.min(searchWord.length, 3), 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 }\r\n else {\r\n shortIndexes[wordPart].push(id);\r\n }\r\n }\r\n });\r\n }\r\n search(query, searchIndex) {\r\n const shortIndexes = searchIndex.shortIndexes;\r\n const fullTexts = searchIndex.fullTexts;\r\n query = this.cleanSearchText(query);\r\n const queryWords = query.split(' ');\r\n let foundObjs = false, newFoundObjs, i;\r\n let j, searchText;\r\n let found;\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 newFoundObjs = {};\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 return newFoundObjs;\r\n }\r\n }\r\n SearchIndexManager.badCharsRe = /[`~!@#$%^&*()\\-_=+\\[\\]\\\\|{}'\";:\\/?.>,<]+/g;\r\n SearchIndexManager.trimRe = /^\\s+|\\s$/g;\r\n return SearchIndexManager;\r\n})();\r\nexports.default = new SearchIndexManager();\r\n"
},
{
"id": 28,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\serverTimeManager.ts",
"name": "./src/lib/mtproto/serverTimeManager.ts",
"index": 41,
"index2": 34,
"size": 1332,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"issuerId": 72,
"issuerName": "./src/pages/pageSignQR.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2979,
"building": 103,
"dependencies": 2951
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appUsersManager.ts",
"module": "./src/lib/appManagers/appUsersManager.ts",
"moduleName": "./src/lib/appManagers/appUsersManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/serverTimeManager",
"loc": "12:44-83"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "27:44-83"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "32:44-83"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "../lib/mtproto/serverTimeManager",
"loc": "42:44-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.ServerTimeManager = void 0;\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; // in seconds\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": 29,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\avatar.ts",
"name": "./src/components/avatar.ts",
"index": 50,
"index2": 43,
"size": 2697,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/avatar",
"loc": "35:33-67"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../../components/avatar",
"loc": "27:33-67"
},
{
"moduleId": 43,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popup.ts",
"module": "./src/components/popup.ts",
"moduleName": "./src/components/popup.ts",
"type": "cjs require",
"userRequest": "./avatar",
"loc": "7:33-52"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/avatar",
"loc": "40:33-67"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 appProfileManager_1 = __importDefault(require(\"../lib/appManagers/appProfileManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nutils_1.$rootScope.$on('avatar_update', (e) => {\r\n let peerID = e.detail;\r\n appProfileManager_1.default.removeFromAvatarsCache(peerID);\r\n Array.from(document.querySelectorAll('avatar-element[peer=\"' + peerID + '\"]')).forEach(elem => {\r\n console.log('updating avatar:', elem);\r\n elem.update();\r\n });\r\n});\r\nclass AvatarElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n this.isDialog = false;\r\n // элемент создан\r\n }\r\n connectedCallback() {\r\n // браузер вызывает этот метод при добавлении элемента в документ\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n this.isDialog = !!this.getAttribute('dialog');\r\n }\r\n disconnectedCallback() {\r\n // браузер вызывает этот метод при удалении элемента из документа\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n }\r\n static get observedAttributes() {\r\n return ['peer', 'dialog', 'peer-title' /* массив имён атрибутов для отслеживания их изменений */];\r\n }\r\n attributeChangedCallback(name, oldValue, newValue) {\r\n // вызывается при изменении одного из перечисленных выше атрибутов\r\n if (name == 'peer') {\r\n this.peerID = +newValue;\r\n this.update();\r\n }\r\n else if (name == 'peer-title') {\r\n this.peerTitle = newValue;\r\n }\r\n else if (name == 'dialog') {\r\n this.isDialog = !!newValue;\r\n }\r\n }\r\n update() {\r\n appProfileManager_1.default.putPhoto(this, this.peerID, this.isDialog, this.peerTitle);\r\n }\r\n adoptedCallback() {\r\n // вызывается, когда элемент перемещается в новый документ\r\n // (происходит в document.adoptNode, используется очень редко)\r\n }\r\n}\r\nexports.default = AvatarElement;\r\ncustomElements.define(\"avatar-element\", AvatarElement);\r\n"
},
{
"id": 30,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\lazyLoadQueue.ts",
"name": "./src/components/lazyLoadQueue.ts",
"index": 55,
"index2": 47,
"size": 4543,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/lazyLoadQueue",
"loc": "31:40-81"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "47:40-81"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../../components/lazyLoadQueue",
"loc": "26:40-81"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./lazyLoadQueue",
"loc": "26:40-66"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nclass LazyLoadQueue {\r\n constructor(parallelLimit = 5, withObserver = true) {\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 this.debug = false;\r\n if (!withObserver)\r\n return;\r\n this.observer = new IntersectionObserver(entries => {\r\n if (this.lockPromise)\r\n return;\r\n for (let entry of entries) {\r\n if (entry.isIntersecting) {\r\n let target = entry.target;\r\n // need for set element first if scrolled\r\n let item = this.lazyLoadMedia.findAndSplice(i => i.div == target);\r\n if (item) {\r\n item.wasSeen = true;\r\n this.lazyLoadMedia.unshift(item);\r\n this.processQueue(item);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n clear() {\r\n this.tempID--;\r\n this.lazyLoadMedia.length = 0;\r\n this.loadingMedia = 0;\r\n if (this.observer) {\r\n this.observer.disconnect();\r\n }\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(item) {\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 if (item) {\r\n this.lazyLoadMedia.findAndSplice(i => i == item);\r\n }\r\n else {\r\n item = this.lazyLoadMedia.findAndSplice(i => i.wasSeen);\r\n }\r\n if (item) {\r\n this.loadingMedia++;\r\n let tempID = this.tempID;\r\n this.debug && this.log('will load media', this.lockPromise, item);\r\n try {\r\n if (this.lockPromise /* && false */) {\r\n let perf = performance.now();\r\n yield this.lockPromise;\r\n this.debug && this.log('waited lock:', performance.now() - perf);\r\n }\r\n //await 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);\r\n }\r\n if (tempID == this.tempID) {\r\n this.loadingMedia--;\r\n }\r\n this.debug && this.log('loaded media');\r\n if (this.lazyLoadMedia.length) {\r\n this.processQueue();\r\n }\r\n }\r\n });\r\n }\r\n addElement(el) {\r\n if (el.wasSeen) {\r\n this.processQueue(el);\r\n }\r\n else {\r\n el.wasSeen = false;\r\n if (this.observer) {\r\n this.observer.observe(el.div);\r\n }\r\n }\r\n }\r\n push(el) {\r\n this.lazyLoadMedia.push(el);\r\n this.addElement(el);\r\n }\r\n unshift(el) {\r\n this.lazyLoadMedia.unshift(el);\r\n this.addElement(el);\r\n }\r\n}\r\nexports.default = LazyLoadQueue;\r\n"
},
{
"id": 31,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"name": "./src/components/wrappers.ts",
"index": 64,
"index2": 59,
"size": 40229,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "24:19-55"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../../components/wrappers",
"loc": "48:19-55"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "./wrappers",
"loc": "33:19-40"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "./wrappers",
"loc": "27:19-40"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\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\nexports.wrapPoll = exports.wrapAlbum = exports.wrapReply = exports.wrapSticker = exports.wrapPhoto = exports.wrapVoiceMessage = exports.wrapAudio = exports.wrapDocument = exports.wrapVideo = void 0;\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 appDocsManager_1 = __importDefault(require(\"../lib/appManagers/appDocsManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst preloader_1 = __importDefault(require(\"./preloader\"));\r\nconst mediaPlayer_1 = __importStar(require(\"../lib/mediaPlayer\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst misc_1 = require(\"./misc\");\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst groupedLayout_1 = require(\"./groupedLayout\");\r\nconst poll_1 = __importDefault(require(\"./poll\"));\r\nconst appWebpManager_1 = __importDefault(require(\"../lib/appManagers/appWebpManager\"));\r\nfunction wrapVideo({ doc, container, message, 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 (!boxWidth && !boxHeight) { // album\r\n let sizes = doc.thumbs;\r\n if (!doc.downloaded && sizes && sizes[0].bytes) {\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, container, false);\r\n }\r\n }\r\n else {\r\n if (!container.firstElementChild || (container.firstElementChild.tagName != 'IMG' && container.firstElementChild.tagName != 'VIDEO')) {\r\n appPhotosManager_1.default.setAttachmentSize(doc, container, boxWidth, boxHeight);\r\n }\r\n }\r\n img = container.lastElementChild;\r\n if (!img || img.tagName != 'IMG') {\r\n container.append(img = new Image());\r\n }\r\n }\r\n let video = document.createElement('video');\r\n let source = document.createElement('source');\r\n video.append(source);\r\n if (withTail) {\r\n let foreignObject = img.parentElement;\r\n video.width = +foreignObject.getAttributeNS(null, 'width');\r\n video.height = +foreignObject.getAttributeNS(null, 'height');\r\n foreignObject.append(video);\r\n }\r\n else {\r\n container.append(video);\r\n }\r\n let span, spanPlay;\r\n if (doc.type != 'round') {\r\n span = document.createElement('span');\r\n span.classList.add('video-time');\r\n container.append(span);\r\n if (doc.type != 'gif') {\r\n span.innerText = (doc.duration + '').toHHMMSS(false);\r\n spanPlay = document.createElement('span');\r\n spanPlay.classList.add('video-play', 'tgico-largeplay', 'btn-circle', 'position-center');\r\n container.append(spanPlay);\r\n }\r\n else {\r\n span.innerText = 'GIF';\r\n }\r\n }\r\n let loadVideo = () => __awaiter(this, void 0, void 0, function* () {\r\n if (message.media.preloader) { // means upload\r\n message.media.preloader.attach(container, undefined, undefined, false);\r\n }\r\n else if (!doc.downloaded) {\r\n let preloader = new preloader_1.default(container, true);\r\n let promise = appDocsManager_1.default.downloadDoc(doc);\r\n preloader.attach(container, true, promise, false);\r\n yield promise;\r\n }\r\n if (middleware && !middleware()) {\r\n return;\r\n }\r\n console.log('loaded doc:', doc, doc.url, container);\r\n misc_1.renderImageFromUrl(source, doc.url);\r\n source.type = doc.mime_type;\r\n video.append(source);\r\n if (img && img.parentElement) {\r\n img.remove();\r\n }\r\n if (doc.type == 'gif') {\r\n video.autoplay = true;\r\n video.loop = true;\r\n video.play();\r\n }\r\n else if (doc.type == 'round') {\r\n //video.dataset.ckin = doc.type == 'round' ? 'circle' : 'default';\r\n video.dataset.ckin = 'circle';\r\n video.dataset.overlay = '1';\r\n let player = new mediaPlayer_1.default(video /* , doc.type != 'round' */);\r\n }\r\n });\r\n if (doc.size >= 20e6 && !doc.downloaded) {\r\n let downloadDiv = document.createElement('div');\r\n downloadDiv.classList.add('download');\r\n let span = document.createElement('span');\r\n span.classList.add('btn-circle', 'tgico-download');\r\n downloadDiv.append(span);\r\n downloadDiv.addEventListener('click', () => {\r\n downloadDiv.remove();\r\n loadVideo();\r\n });\r\n container.prepend(downloadDiv);\r\n return;\r\n }\r\n return doc.downloaded ? loadVideo() : lazyLoadQueue.push({ div: container, load: loadVideo, wasSeen: true });\r\n}\r\nexports.wrapVideo = wrapVideo;\r\nlet formatDate = (timestamp) => {\r\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n const date = new Date(timestamp * 1000);\r\n return months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear()\r\n + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\r\n};\r\nfunction wrapDocument(doc, withTime = false, uploading = false) {\r\n if (doc.type == 'voice') {\r\n return wrapVoiceMessage(doc, uploading);\r\n }\r\n else if (doc.type == 'audio') {\r\n return wrapAudio(doc, withTime);\r\n }\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 docDiv = document.createElement('div');\r\n docDiv.classList.add('document', `ext-${ext}`);\r\n let ext2 = ext;\r\n if (doc.type == 'photo') {\r\n docDiv.classList.add('photo');\r\n ext2 = `<img src=\"${URL.createObjectURL(doc.file)}\">`;\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 size += ' · ' + formatDate(doc.date);\r\n }\r\n docDiv.innerHTML = `\r\n <div class=\"document-ico\">${ext2}</div>\r\n ${!uploading ? `<div class=\"document-download\"><div class=\"tgico-download\"></div></div>` : ''}\r\n <div class=\"document-name\">${fileName}</div>\r\n <div class=\"document-size\">${size}</div>\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_1.RichTextProcessor.wrapPlainText(doc.audioPerformer) : '';\r\n /* let durationStr = '3:24';\r\n let title = 'Million Telegrams';\r\n let subtitle = 'Best Artist'; */\r\n if (withTime) {\r\n subtitle += (subtitle ? ' · ' : '') + formatDate(doc.date);\r\n }\r\n else if (!subtitle) {\r\n subtitle = 'Unknown Artist';\r\n }\r\n div.innerHTML = `\r\n <div class=\"audio-download\"><div class=\"tgico-download\"></div></div>\r\n <div class=\"audio-toggle audio-ico tgico-largeplay\"></div>\r\n <div class=\"audio-details\">\r\n <div class=\"audio-title\">${title}</div>\r\n <div class=\"audio-subtitle\">${subtitle}</div>\r\n <div class=\"audio-time\">${durationStr}</div>\r\n </div>\r\n `;\r\n /* if(!subtitle) {\r\n div.classList.add('audio-no-subtitle');\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 (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n 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 = doc.url;\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 let launched = false;\r\n toggle.addEventListener('click', () => {\r\n if (!launched) {\r\n div.classList.add('audio-show-progress');\r\n launched = true;\r\n }\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.cancel();\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\n// https://github.com/LonamiWebs/Telethon/blob/4393ec0b83d511b6a20d8a20334138730f084375/telethon/utils.py#L1285\r\nfunction decodeWaveform(waveform) {\r\n if (!(waveform instanceof Uint8Array)) {\r\n waveform = new Uint8Array(waveform);\r\n }\r\n var bitCount = waveform.length * 8;\r\n var valueCount = bitCount / 5 | 0;\r\n if (!valueCount) {\r\n return new Uint8Array([]);\r\n }\r\n var dataView = new DataView(waveform.buffer);\r\n var result = new Uint8Array(valueCount);\r\n for (var i = 0; i < valueCount; i++) {\r\n var byteIndex = i * 5 / 8 | 0;\r\n var bitShift = i * 5 % 8;\r\n var value = dataView.getUint16(byteIndex, true);\r\n result[i] = (value >> bitShift) & 0b00011111;\r\n }\r\n /* var byteIndex = (valueCount - 1) / 8 | 0;\r\n var bitShift = (valueCount - 1) % 8;\r\n if(byteIndex == waveform.length - 1) {\r\n var value = waveform[byteIndex];\r\n } else {\r\n var value = dataView.getUint16(byteIndex, true);\r\n }\r\n \r\n console.log('decoded waveform, setting last value:', value, byteIndex, bitShift);\r\n result[valueCount - 1] = (value >> bitShift) & 0b00011111; */\r\n return result;\r\n}\r\nlet lastAudioToggle = null;\r\nfunction wrapVoiceMessage(doc, uploading = 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 <div class=\"audio-toggle audio-ico tgico-largeplay\"></div>\r\n <div class=\"audio-download\">${uploading ? '' : '<div class=\"tgico-download\"></div>'}</div>\r\n <div class=\"audio-time\">${durationStr}</div>\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 const barWidth = 2;\r\n const barMargin = 1;\r\n const barHeightMin = 2;\r\n const barHeightMax = 23;\r\n let waveform = doc.attributes[0].waveform || [];\r\n waveform = decodeWaveform(waveform.slice());\r\n //console.log('decoded waveform:', waveform);\r\n const normValue = Math.max(...waveform);\r\n const wfSize = waveform.length ? waveform.length : 100;\r\n const availW = 190;\r\n const barCount = Math.min((availW / (barWidth + barMargin)) | 0, wfSize);\r\n let maxValue = 0;\r\n let maxDelta = barHeightMax - barHeightMin;\r\n let html = '';\r\n for (let i = 0, barX = 0, sumI = 0; i < wfSize; ++i) {\r\n const value = waveform[i] || 0;\r\n if ((sumI + barCount) >= wfSize) { // draw bar\r\n sumI = sumI + barCount - wfSize;\r\n if (sumI < (barCount + 1) / 2) {\r\n if (maxValue < value)\r\n maxValue = value;\r\n }\r\n const bar_value = Math.max(((maxValue * maxDelta) + ((normValue + 1) / 2)) / (normValue + 1), barHeightMin);\r\n let h = `\r\n <rect x=\"${barX}\" y=\"${barHeightMax - bar_value}\" width=\"2\" height=\"${bar_value}\" rx=\"1\" ry=\"1\"></rect>\r\n `;\r\n html += h;\r\n /* if(barX >= activeW) {\r\n p.fillRect(nameleft + barX, bottom - bar_value, barWidth, barHeightMin + bar_value, inactive);\r\n } else if (barX + barWidth <= activeW) {\r\n p.fillRect(nameleft + barX, bottom - bar_value, barWidth, barHeightMin + bar_value, active);\r\n } else {\r\n p.fillRect(nameleft + barX, bottom - bar_value, activeW - barX, barHeightMin + bar_value, active);\r\n p.fillRect(nameleft + activeW, bottom - bar_value, barWidth - (activeW - barX), barHeightMin + bar_value, inactive);\r\n } */\r\n barX += barWidth + barMargin;\r\n if (sumI < (barCount + 1) / 2) {\r\n maxValue = 0;\r\n }\r\n else {\r\n maxValue = value;\r\n }\r\n }\r\n else {\r\n if (maxValue < value)\r\n maxValue = value;\r\n sumI += barCount;\r\n }\r\n }\r\n svg.insertAdjacentHTML('beforeend', html);\r\n /* let index = 0;\r\n let skipped = 0;\r\n let h = '';\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 percents = uint8 / 31;\r\n \r\n let height = 23 * percents;\r\n if(height < 2) {\r\n height = 2;\r\n }\r\n \r\n h += `\r\n <rect x=\"${(index - skipped) * 4}\" y=\"${23 - height}\" width=\"2\" height=\"${height}\" rx=\"1\" ry=\"1\"></rect>\r\n `;\r\n \r\n ++index;\r\n }\r\n svg.insertAdjacentHTML('beforeend', h); */\r\n let progress = div.querySelector('.audio-waveform');\r\n let onLoad = () => {\r\n let audio = document.createElement('audio');\r\n let source = document.createElement('source');\r\n source.src = doc.url;\r\n //source.type = doc.mime_type;\r\n source.type = 'audio/wav';\r\n audio.volume = 1;\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 if (!uploading) {\r\n let onClick = () => {\r\n if (!promise) {\r\n if (!preloader) {\r\n preloader = new preloader_1.default(null, true);\r\n }\r\n promise = appDocsManager_1.default.downloadDoc(doc.id);\r\n preloader.attach(downloadDiv, true, promise);\r\n promise.then(() => {\r\n downloadDiv.classList.remove('downloading');\r\n downloadDiv.remove();\r\n div.removeEventListener('click', onClick);\r\n onLoad();\r\n });\r\n downloadDiv.classList.add('downloading');\r\n }\r\n else {\r\n downloadDiv.classList.remove('downloading');\r\n promise.cancel();\r\n promise = null;\r\n }\r\n };\r\n div.addEventListener('click', onClick);\r\n div.click();\r\n }\r\n else {\r\n onLoad();\r\n }\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 foreignObject = document.createElementNS(\"http://www.w3.org/2000/svg\", 'foreignObject');\r\n appPhotosManager_1.default.setAttachmentSize(photo._ == 'document' ? photo : photo.id, foreignObject, boxWidth, boxHeight);\r\n let width = +foreignObject.getAttributeNS(null, 'width');\r\n let height = +foreignObject.getAttributeNS(null, 'height');\r\n svg.setAttributeNS(null, 'width', '' + width);\r\n svg.setAttributeNS(null, 'height', '' + height);\r\n svg.setAttributeNS(null, 'viewBox', '0 0 ' + width + ' ' + height);\r\n svg.setAttributeNS(null, 'preserveAspectRatio', 'none');\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 += `<rect width=\"${width}\" height=\"${height}\"></rect>`;\r\n }\r\n else {\r\n if (isOut) {\r\n clipPathHTML += `\r\n <use href=\"#message-tail\" transform=\"translate(${width - 2}, ${height}) scale(-1, -1)\"></use>\r\n <path />\r\n `;\r\n }\r\n else {\r\n clipPathHTML += `\r\n <use href=\"#message-tail\" transform=\"translate(2, ${height}) scale(1, -1)\"></use>\r\n <path />\r\n `;\r\n }\r\n }\r\n defs.innerHTML = `<clipPath id=\"${clipID}\">${clipPathHTML}</clipPath>`;\r\n container.style.width = parseInt(container.style.width) - 9 + 'px';\r\n svg.append(defs, foreignObject);\r\n container.append(svg);\r\n let img = foreignObject.firstElementChild;\r\n if (!img) {\r\n foreignObject.append(img = new Image());\r\n }\r\n return img;\r\n}\r\nfunction wrapPhoto(photoID, message, container, boxWidth = 480, boxHeight = 480, withTail = true, isOut = false, lazyLoadQueue, middleware, size = null) {\r\n let photo = appPhotosManager_1.default.getPhoto(photoID);\r\n let image;\r\n if (withTail) {\r\n image = wrapMediaWithTail(photo, message, container, boxWidth, boxHeight, isOut);\r\n }\r\n else {\r\n if (size) { // album\r\n let sizes = photo.sizes;\r\n if (!photo.downloaded && sizes && sizes[0].bytes) {\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, container, false);\r\n }\r\n }\r\n else if (boxWidth && boxHeight) { // means webpage's preview\r\n size = appPhotosManager_1.default.setAttachmentSize(photoID, container, boxWidth, boxHeight, false);\r\n }\r\n image = container.lastElementChild;\r\n if (!image || image.tagName != 'IMG') {\r\n container.append(image = new 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 (message.media.preloader) { // means upload\r\n message.media.preloader.attach(container);\r\n }\r\n else if (!photo.downloaded) {\r\n preloader = new preloader_1.default(container, false);\r\n }\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 || container, 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, play, onlyThumb, emoji }) {\r\n let stickerType = doc.sticker;\r\n if (stickerType == 2 && !lottieLoader_1.default.loaded) {\r\n //LottieLoader.loadLottie();\r\n lottieLoader_1.default.loadLottieWorkers();\r\n }\r\n if (!stickerType) {\r\n console.error('wrong doc for wrapSticker!', doc);\r\n throw new Error('wrong doc for wrapSticker!');\r\n }\r\n div.dataset.docID = doc.id;\r\n //console.log('wrap sticker', doc, div, onlyThumb);\r\n const toneIndex = emoji ? utils_1.getEmojiToneIndex(emoji) : -1;\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 let img = new Image();\r\n if (appWebpManager_1.default.isSupported() || doc.stickerThumbConverted) {\r\n misc_1.renderImageFromUrl(img, appPhotosManager_1.default.getPreviewURLFromThumb(thumb, true));\r\n div.append(img);\r\n }\r\n else {\r\n appWebpManager_1.default.convertToPng(thumb.bytes).then(bytes => {\r\n if (middleware && !middleware())\r\n return;\r\n thumb.bytes = bytes;\r\n doc.stickerThumbConverted = true;\r\n if (!div.childElementCount) {\r\n misc_1.renderImageFromUrl(img, appPhotosManager_1.default.getPreviewURLFromThumb(thumb, true)).then(() => {\r\n div.append(img);\r\n });\r\n }\r\n });\r\n }\r\n if (onlyThumb) {\r\n return Promise.resolve();\r\n }\r\n }\r\n else if (!onlyThumb && stickerType == 2) {\r\n let img = new Image();\r\n let load = () => appDocsManager_1.default.downloadDocThumb(doc, thumb.type).then(url => {\r\n if (!img.parentElement || (middleware && !middleware()))\r\n return;\r\n let promise = misc_1.renderImageFromUrl(img, url);\r\n if (!downloaded) {\r\n promise.then(() => {\r\n div.append(img);\r\n });\r\n }\r\n });\r\n let downloaded = appDocsManager_1.default.hasDownloadedThumb(doc.id, thumb.type);\r\n if (downloaded) {\r\n div.append(img);\r\n }\r\n lazyLoadQueue && !downloaded ? lazyLoadQueue.push({ div, load, wasSeen: group == 'chat' }) : load();\r\n }\r\n }\r\n if (onlyThumb && doc.thumbs) { // for sticker panel\r\n let thumb = doc.thumbs[0];\r\n let load = () => appDocsManager_1.default.downloadDocThumb(doc, thumb.type).then(url => {\r\n let img = new Image();\r\n misc_1.renderImageFromUrl(img, url).then(() => {\r\n if (middleware && !middleware())\r\n return;\r\n div.append(img);\r\n });\r\n });\r\n return lazyLoadQueue ? (lazyLoadQueue.push({ div, load }), Promise.resolve()) : load();\r\n }\r\n let downloaded = doc.downloaded;\r\n let load = () => appDocsManager_1.default.downloadDoc(doc.id).then(blob => {\r\n //console.log('loaded sticker:', doc, div);\r\n if (middleware && !middleware())\r\n return;\r\n //return;\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 /* if(doc.id == '1860749763008266301') {\r\n console.log('loaded sticker:', doc, div);\r\n } */\r\n let animation = yield lottieLoader_1.default.loadAnimationWorker /* loadAnimation */({\r\n container: div,\r\n loop: !emoji,\r\n autoplay: true,\r\n animationData: JSON.parse(json)\r\n }, group, toneIndex);\r\n animation.addListener('ready', () => {\r\n if (div.firstElementChild && div.firstElementChild.tagName == 'IMG') {\r\n div.firstElementChild.remove();\r\n }\r\n });\r\n //console.timeEnd('render sticker' + doc.id);\r\n /* div.addEventListener('mouseover', (e) => {\r\n let animation = LottieLoader.getAnimation(div, group);\r\n \r\n if(animation) {\r\n //console.log('sticker hover', animation, div);\r\n \r\n // @ts-ignore\r\n animation.loop = true;\r\n \r\n // @ts-ignore\r\n if(animation.currentFrame == animation.totalFrames - 1) {\r\n animation.goToAndPlay(0, true);\r\n } else {\r\n animation.play();\r\n }\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 \r\n if(play && false) {\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 (!downloaded && (!div.firstElementChild || div.firstElementChild.tagName != 'IMG')) {\r\n img.style.opacity = '' + 0;\r\n img.addEventListener('load', () => {\r\n window.requestAnimationFrame(() => {\r\n img.style.opacity = '';\r\n });\r\n });\r\n }\r\n misc_1.renderImageFromUrl(img, doc.url).then(() => {\r\n if (div.firstElementChild && div.firstElementChild != img) {\r\n div.firstElementChild.remove();\r\n }\r\n div.append(img);\r\n });\r\n }\r\n });\r\n return lazyLoadQueue && (!doc.downloaded || stickerType == 2) ? (lazyLoadQueue.push({ div, load, wasSeen: group == 'chat' && stickerType != 2 }), Promise.resolve()) : load();\r\n}\r\nexports.wrapSticker = wrapSticker;\r\nfunction wrapReply(title, subtitle, message) {\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 let media = message && message.media;\r\n if (media) {\r\n replySubtitle.innerHTML = message.rReply;\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(() => {\r\n misc_1.renderImageFromUrl(replyMedia, photo._ == 'photo' ? photo.url : appPhotosManager_1.default.getDocumentCachedThumb(photo.id).url);\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\nfunction wrapAlbum({ groupID, attachmentDiv, middleware, uploading, lazyLoadQueue, isOut }) {\r\n let items = [];\r\n // higher msgID will be the last in album\r\n let storage = appMessagesManager_1.default.groupedMessagesStorage[groupID];\r\n for (let mid in storage) {\r\n let m = appMessagesManager_1.default.getMessage(+mid);\r\n let media = m.media.photo || m.media.document;\r\n let size = media._ == 'photo' ? appPhotosManager_1.default.choosePhotoSize(media, 480, 480) : { w: media.w, h: media.h };\r\n items.push({ size, media, message: m });\r\n }\r\n let spacing = 2;\r\n let layouter = new groupedLayout_1.Layouter(items.map(i => ({ w: i.size.w, h: i.size.h })), 451, 100, spacing);\r\n let layout = layouter.layout();\r\n console.log('layout:', layout, items.map(i => ({ w: i.size.w, h: i.size.h })));\r\n /* let borderRadius = window.getComputedStyle(realParent).getPropertyValue('border-radius');\r\n let brSplitted = fillPropertyValue(borderRadius); */\r\n for (let { geometry, sides } of layout) {\r\n let item = items.shift();\r\n if (!item) {\r\n console.error('no item for layout!');\r\n continue;\r\n }\r\n let { size, media, message } = item;\r\n let div = document.createElement('div');\r\n div.classList.add('album-item');\r\n div.dataset.mid = message.mid;\r\n div.style.width = geometry.width + 'px';\r\n div.style.height = geometry.height + 'px';\r\n div.style.top = geometry.y + 'px';\r\n div.style.left = geometry.x + 'px';\r\n if (sides & groupedLayout_1.RectPart.Right) {\r\n attachmentDiv.style.width = geometry.width + geometry.x + 'px';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Bottom) {\r\n attachmentDiv.style.height = geometry.height + geometry.y + 'px';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Left && sides & groupedLayout_1.RectPart.Top) {\r\n div.style.borderTopLeftRadius = 'inherit';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Left && sides & groupedLayout_1.RectPart.Bottom) {\r\n div.style.borderBottomLeftRadius = 'inherit';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Right && sides & groupedLayout_1.RectPart.Top) {\r\n div.style.borderTopRightRadius = 'inherit';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Right && sides & groupedLayout_1.RectPart.Bottom) {\r\n div.style.borderBottomRightRadius = 'inherit';\r\n }\r\n if (media._ == 'photo') {\r\n wrapPhoto(media.id, message, div, 0, 0, false, isOut, lazyLoadQueue, middleware, size);\r\n }\r\n else {\r\n wrapVideo({\r\n doc: message.media.document,\r\n container: div,\r\n message,\r\n boxWidth: 0,\r\n boxHeight: 0,\r\n withTail: false,\r\n isOut,\r\n lazyLoadQueue,\r\n middleware\r\n });\r\n }\r\n // @ts-ignore\r\n //div.style.backgroundColor = '#' + Math.floor(Math.random() * (2 ** 24 - 1)).toString(16).padStart(6, '0');\r\n attachmentDiv.append(div);\r\n }\r\n}\r\nexports.wrapAlbum = wrapAlbum;\r\nfunction wrapPoll(pollID, mid) {\r\n let elem = new poll_1.default();\r\n elem.setAttribute('poll-id', pollID);\r\n elem.setAttribute('message-id', '' + mid);\r\n return elem;\r\n}\r\nexports.wrapPoll = wrapPoll;\r\n"
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"index": 9,
"index2": 74,
"size": 10374,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./pages/pageSignIn",
"loc": "73:57-86"
},
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "./pageSignIn",
"loc": "6:37-60"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "./pageSignIn",
"loc": "39:37-60"
}
],
"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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst misc_1 = require(\"../components/misc\");\r\nconst scrollable_new_1 = __importDefault(require(\"../components/scrollable_new\"));\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\nconst pageSignQR_1 = __importDefault(require(\"./pageSignQR\"));\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_new_1.default(wrapper);\r\n let initedSelect = false;\r\n page.pageEl.querySelector('.a-qr').addEventListener('click', () => {\r\n pageSignQR_1.default.mount();\r\n });\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 = `<span class=\"emoji-inner\" style=\"background: url(${sheetUrl}${sheetNo}.png);background-position:${xPos}% ${yPos}%;background-size:${sizeX}% ${sizeY}%\" data-codepoints=\"${unified}\"></span>`;\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 //return;\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": 33,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"name": "./src/lib/appManagers/appSidebarRight.ts",
"index": 52,
"index2": 60,
"size": 32542,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appSidebarRight",
"loc": "17:42-70"
},
{
"moduleId": 35,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"module": "./src/components/appForward.ts",
"moduleName": "./src/components/appForward.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appSidebarRight",
"loc": "6:42-87"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appSidebarRight",
"loc": "20:42-82"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\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(\"../../components/misc\");\r\n//import Scrollable from '../../components/scrollable';\r\nconst scrollable_new_1 = __importDefault(require(\"../../components/scrollable_new\"));\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 appForward_1 = __importDefault(require(\"../../components/appForward\"));\r\nconst testScroll = false;\r\nlet 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 });\r\n};\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.contentContainer = this.sidebarEl.querySelector('.content-container');\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.loadSidebarMediaPromises = {};\r\n this.loadedAllMedia = {};\r\n this.sharedMediaTypes = [\r\n 'members',\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.lazyLoadQueue = new lazyLoadQueue_1.default(5);\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.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 this.loadMutex = Promise.resolve();\r\n let container = this.profileContentEl.querySelector('.content-container .tabs-container');\r\n this.profileTabs = this.profileContentEl.querySelector('.profile-tabs');\r\n this.scroll = new scrollable_new_1.default(this.profileContainer, 'y', 'SR', undefined, 400);\r\n this.scroll.onScrolledBottom = () => {\r\n if (this.sharedMediaSelected && this.sharedMediaSelected.childElementCount /* && false */) {\r\n this.log('onScrolledBottom will load media');\r\n this.loadSidebarMedia(true);\r\n }\r\n };\r\n //this.scroll.attachSentinels(undefined, 400);\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.profileTabs.offsetTop) {\r\n this.scroll.scrollTop -= this.profileTabs.offsetTop;\r\n }\r\n /* this.log('setVirtualContainer', id, this.sharedMediaSelected, this.sharedMediaSelected.childElementCount);\r\n this.scroll.setVirtualContainer(this.sharedMediaSelected); */\r\n if (this.prevTabID != -1 && !this.sharedMediaSelected.childElementCount) { // quick brown fix\r\n //this.contentContainer.classList.remove('loaded');\r\n this.loadSidebarMedia(true);\r\n }\r\n this.prevTabID = id;\r\n });\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((a, b) => a - b);\r\n let idx = ids.findIndex(i => i == messageID);\r\n let targets = ids.map(id => ({ element: this.mediaDivsByIDs[id].firstElementChild, mid: id }));\r\n appMediaViewer_1.default.openMedia(message, target, false, this.sidebarEl, targets.slice(idx + 1).reverse(), targets.slice(0, idx).reverse(), true);\r\n });\r\n this.profileElements.notificationsCheckbox.addEventListener('change', () => {\r\n //let checked = this.profileElements.notificationsCheckbox.checked;\r\n appImManager_1.default.mutePeer(this.peerID);\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 toggleSidebar(enable) {\r\n /////this.log('sidebarEl', this.sidebarEl, enable, isElementInViewport(this.sidebarEl));\r\n let active = this.sidebarEl.classList.contains('active');\r\n let willChange;\r\n if (enable !== undefined) {\r\n if (enable) {\r\n if (!active) {\r\n willChange = true;\r\n }\r\n }\r\n else if (active) {\r\n willChange = true;\r\n }\r\n }\r\n else {\r\n willChange = true;\r\n }\r\n if (!willChange)\r\n return Promise.resolve();\r\n let set = () => {\r\n this.sidebarEl.classList.toggle('active', enable);\r\n };\r\n return new Promise((resolve, reject) => {\r\n let hidden = [];\r\n let observer = new IntersectionObserver((entries) => {\r\n for (let entry of entries) {\r\n let bubble = entry.target;\r\n if (!entry.isIntersecting) {\r\n hidden.push({ element: bubble, height: bubble.scrollHeight });\r\n }\r\n }\r\n for (let item of hidden) {\r\n item.element.style.minHeight = item.height + 'px';\r\n item.element.firstElementChild.style.display = 'none';\r\n item.element.style.width = '1px';\r\n }\r\n //console.log('hidden', hidden);\r\n observer.disconnect();\r\n set();\r\n setTimeout(() => {\r\n for (let item of hidden) {\r\n item.element.style.minHeight = '';\r\n item.element.style.width = '';\r\n item.element.firstElementChild.style.display = '';\r\n }\r\n if (enable == false || (this.sidebarEl.classList.contains('active') && enable == undefined)) {\r\n appForward_1.default.close();\r\n this.searchCloseBtn.click();\r\n }\r\n resolve();\r\n }, 200);\r\n });\r\n let length = Object.keys(appImManager_1.default.bubbles).length;\r\n if (length) {\r\n for (let i in appImManager_1.default.bubbles) {\r\n observer.observe(appImManager_1.default.bubbles[i]);\r\n }\r\n }\r\n else {\r\n set();\r\n setTimeout(resolve, 200);\r\n }\r\n });\r\n }\r\n filterMessagesByType(ids, type) {\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 filtered = [];\r\n switch (type) {\r\n case 'inputMessagesFilterPhotoVideo': {\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 filtered.push(message);\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterDocument': {\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 filtered.push(message);\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterUrl': {\r\n for (let message of messages) {\r\n if (!message.media.webpage || message.media.webpage._ == 'webPageEmpty') {\r\n continue;\r\n }\r\n filtered.push(message);\r\n }\r\n break;\r\n }\r\n case 'inputMessagesFilterMusic': {\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 filtered.push(message);\r\n }\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n return filtered;\r\n }\r\n performSearchResult(messages, type) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let peerID = this.peerID;\r\n let sharedMediaDiv;\r\n let elemsToAppend = [];\r\n let promises = [];\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 let div = document.createElement('div');\r\n div.classList.add('media-item');\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 let isDownloaded;\r\n if (photo) {\r\n isDownloaded = photo.downloaded > 0;\r\n }\r\n else {\r\n let cachedThumb = appPhotosManager_1.default.getDocumentCachedThumb(media.id);\r\n isDownloaded = (cachedThumb === null || cachedThumb === void 0 ? void 0 : cachedThumb.downloaded) > 0;\r\n }\r\n let img = new Image();\r\n img.classList.add('media-image');\r\n div.append(img);\r\n //this.log('inputMessagesFilterPhotoVideo', message, media);\r\n if (!isPhoto) {\r\n let span = document.createElement('span');\r\n span.classList.add('video-time');\r\n div.append(span);\r\n if (media.type != 'gif') {\r\n span.innerText = (media.duration + '').toHHMMSS(false);\r\n /* let spanPlay = document.createElement('span');\r\n spanPlay.classList.add('video-play', 'tgico-largeplay', 'btn-circle', 'position-center');\r\n div.append(spanPlay); */\r\n }\r\n else {\r\n span.innerText = 'GIF';\r\n }\r\n }\r\n let load = () => appPhotosManager_1.default.preloadPhoto(isPhoto ? media.id : media, appPhotosManager_1.default.choosePhotoSize(media, 200, 200))\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 let url = (photo && photo.url) || appPhotosManager_1.default.getDocumentCachedThumb(media.id).url;\r\n if (url) {\r\n misc_1.renderImageFromUrl(img, url);\r\n }\r\n });\r\n img.dataset.mid = '' + message.mid;\r\n let sizes = media.sizes || media.thumbs;\r\n if (isDownloaded || (sizes && sizes[0].bytes)) {\r\n let promise = new Promise((resolve, reject) => {\r\n img.addEventListener('load', () => {\r\n clearTimeout(timeout);\r\n resolve();\r\n });\r\n let timeout = setTimeout(() => {\r\n this.log('did not loaded', img, media, isDownloaded, sizes);\r\n reject();\r\n }, 1e3);\r\n });\r\n promises.push(promise);\r\n }\r\n if (isDownloaded)\r\n load();\r\n else {\r\n if (sizes && sizes[0].bytes) {\r\n appPhotosManager_1.default.setAttachmentPreview(sizes[0].bytes, img, false, false);\r\n }\r\n this.lazyLoadQueue.push({ div, load });\r\n }\r\n elemsToAppend.push(div);\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 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 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 previewDiv.innerText = (webpage.title || webpage.description || webpage.url || webpage.display_url).slice(0, 1);\r\n previewDiv.classList.add('empty');\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 previewDiv.classList.remove('empty');\r\n previewDiv.innerText = '';\r\n misc_1.renderImageFromUrl(previewDiv, webpage.photo.url);\r\n });\r\n this.lazyLoadQueue.push({ div: previewDiv, load });\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 <div class=\"title\">${title}</div>\r\n <div class=\"subtitle\">${subtitle}</div>\r\n <div class=\"url\">${url}</div>\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 let div = wrappers_1.wrapAudio(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', messages);\r\n break;\r\n }\r\n if (this.loadMutex) {\r\n promises.push(this.loadMutex);\r\n }\r\n if (elemsToAppend.length) {\r\n if (promises.length) {\r\n yield Promise.all(promises);\r\n if (this.peerID != peerID) {\r\n this.log.warn('peer changed');\r\n return;\r\n }\r\n }\r\n sharedMediaDiv.append(...elemsToAppend);\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 //this.contentContainer.classList.add('loaded');\r\n }\r\n }\r\n });\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, this.loadSidebarMediaPromises);\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 loadCount = (appPhotosManager_1.default.windowH / 130 | 0) * 3; // that's good for all types\r\n let historyStorage = (_a = this.historiesStorage[peerID]) !== null && _a !== void 0 ? _a : (this.historiesStorage[peerID] = {});\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 // render from cache\r\n if (history.length && this.usedFromHistory[type] < history.length) {\r\n let messages = [];\r\n let used = this.usedFromHistory[type];\r\n do {\r\n let ids = history.slice(used, used + loadCount);\r\n this.log('loadSidebarMedia: will render from cache', used, history, ids, loadCount);\r\n used += ids.length;\r\n messages.push(...this.filterMessagesByType(ids, type));\r\n } while (messages.length < loadCount && used < history.length);\r\n // если перебор\r\n if (messages.length > loadCount) {\r\n let diff = messages.length - loadCount;\r\n messages = messages.slice(0, messages.length - diff);\r\n used -= diff;\r\n }\r\n this.usedFromHistory[type] = used;\r\n if (messages.length) {\r\n return this.performSearchResult(messages, type);\r\n }\r\n return Promise.resolve();\r\n }\r\n // заливать новую картинку сюда только после полной отправки!\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('loadSidebarMedia: 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('loadSidebarMedia: search house of glass', type, value, ids);\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 this.usedFromHistory[type] = history.length;\r\n if (ids.length) {\r\n return this.performSearchResult(this.filterMessagesByType(ids, type), 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);\r\n }\r\n cleanup() {\r\n this.loadSidebarMediaPromises = {};\r\n this.loadedAllMedia = {};\r\n this.prevTabID = -1;\r\n this.mediaDivsByIDs = {};\r\n this.lazyLoadQueue.clear();\r\n this.sharedMediaTypes.forEach(type => {\r\n this.usedFromHistory[type] = 0;\r\n });\r\n this.sharedMediaType = 'inputMessagesFilterPhotoVideo';\r\n }\r\n cleanupHTML() {\r\n //this.contentContainer.classList.remove('loaded');\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 if (this.urlsToRevoke.length) {\r\n this.urlsToRevoke.forEach(url => {\r\n URL.revokeObjectURL(url);\r\n });\r\n this.urlsToRevoke.length = 0;\r\n }\r\n Object.keys(this.sharedMedia).forEach(key => {\r\n this.sharedMedia[key].innerHTML = '';\r\n if (!this.historiesStorage[this.peerID] || !this.historiesStorage[this.peerID][key]) {\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 });\r\n if (testScroll) {\r\n for (let i = 0; i < 30; ++i) {\r\n //div.insertAdjacentHTML('beforeend', `<div style=\"background-image: url(assets/img/camomile.jpg);\"></div>`);\r\n let div = document.createElement('div');\r\n div.classList.add('media-item');\r\n div.dataset.id = '' + (i / 3 | 0);\r\n div.innerText = '' + (i / 3 | 0);\r\n this.sharedMedia.contentMedia.append(div);\r\n }\r\n this.profileTabs.children[1].click(); // set media\r\n }\r\n this.profileTabs.firstElementChild.children[1].click(); // set media\r\n }\r\n setLoadMutex(promise) {\r\n this.loadMutex = promise;\r\n }\r\n setPeer(peerID) {\r\n this.peerID = peerID;\r\n this.cleanup();\r\n }\r\n fillProfileElements() {\r\n let peerID = this.peerID = utils_1.$rootScope.selectedPeerID;\r\n this.cleanupHTML();\r\n this.profileElements.avatar.setAttribute('peer', '' + peerID);\r\n // username\r\n if (peerID != utils_1.$rootScope.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)[0];\r\n if (dialog) {\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 });\r\n }\r\n let membersLi = this.profileTabs.firstElementChild.children[0];\r\n if (peerID > 0) {\r\n membersLi.style.display = 'none';\r\n let user = appUsersManager_1.default.getUser(peerID);\r\n if (user.phone && peerID != utils_1.$rootScope.myID) {\r\n setText(user.rPhone, 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 != utils_1.$rootScope.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 });\r\n }\r\n else {\r\n membersLi.style.display = appPeersManager_1.default.isBroadcast(peerID) ? 'none' : '';\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 });\r\n }\r\n }\r\n}\r\nexports.default = new AppSidebarRight();\r\n"
},
{
"id": 34,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"name": "./src/lib/appManagers/appMediaViewer.ts",
"index": 53,
"index2": 56,
"size": 37157,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appMediaViewer",
"loc": "20:41-68"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "./appMediaViewer",
"loc": "46:41-68"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appMediaViewer",
"loc": "22:41-80"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppMediaViewer = void 0;\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 lazyLoadQueue_1 = __importDefault(require(\"../../components/lazyLoadQueue\"));\r\nconst appForward_1 = __importDefault(require(\"../../components/appForward\"));\r\nclass AppMediaViewer {\r\n constructor() {\r\n this.wholeDiv = document.querySelector('.media-viewer-whole');\r\n this.overlaysDiv = this.wholeDiv.firstElementChild;\r\n this.author = {\r\n avatarEl: this.overlaysDiv.querySelector('.media-viewer-userpic'),\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 this.content = {\r\n container: this.overlaysDiv.querySelector('.media-viewer-media'),\r\n caption: this.overlaysDiv.querySelector('.media-viewer-caption'),\r\n mover: null\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.needLoadMore = true;\r\n this.pageEl = document.getElementById('page-chats');\r\n this.log = polyfill_1.logger('AMV');\r\n this.preloader = new preloader_1.default();\r\n this.lazyLoadQueue = new lazyLoadQueue_1.default(5, false);\r\n misc_1.parseMenuButtonsTo(this.buttons, this.wholeDiv.querySelectorAll(`[class*='menu']`));\r\n this.onKeyDownBinded = this.onKeyDown.bind(this);\r\n this.buttons.close.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\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.lazyLoadQueue.clear();\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 appForward_1.default.close();\r\n window.removeEventListener('keydown', this.onKeyDownBinded);\r\n });\r\n this.buttons.prev.addEventListener('click', (e) => {\r\n utils_1.cancelEvent(e);\r\n if (this.setMoverPromise)\r\n return;\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', (e) => {\r\n utils_1.cancelEvent(e);\r\n if (this.setMoverPromise)\r\n return;\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.buttons.forward.addEventListener('click', () => {\r\n appForward_1.default.init([this.currentMessageID]);\r\n });\r\n this.onClickBinded = (e) => {\r\n utils_1.cancelEvent(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.wholeDiv.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 this.setNewMover();\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 var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\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 let aspecter;\r\n if (target instanceof HTMLImageElement || target instanceof HTMLVideoElement) {\r\n if (mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter')) {\r\n aspecter = mover.firstElementChild;\r\n let player = aspecter.querySelector('.ckin__player');\r\n if (player) {\r\n let video = player.firstElementChild;\r\n aspecter.append(video);\r\n player.remove();\r\n }\r\n if (!aspecter.style.cssText) { // всё из-за видео, элементы управления скейлятся, так бы можно было этого не делать\r\n mover.classList.remove('active');\r\n this.setFullAspect(aspecter, containerRect, rect);\r\n void mover.offsetLeft; // reflow\r\n mover.classList.add('active');\r\n }\r\n }\r\n else {\r\n aspecter = document.createElement('div');\r\n aspecter.classList.add('media-viewer-aspecter', 'disable-hover');\r\n mover.prepend(aspecter);\r\n }\r\n aspecter.style.cssText = `width: ${rect.width}px; height: ${rect.height}px; transform: scale(${containerRect.width / rect.width}, ${containerRect.height / rect.height});`;\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 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 = utils_1.fillPropertyValue(borderRadius);\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 mediaElement;\r\n let src;\r\n if (target.tagName == 'DIV') { // useContainerAsTarget\r\n if (target.firstElementChild) {\r\n mediaElement = new Image();\r\n src = target.firstElementChild.src;\r\n mover.append(mediaElement);\r\n }\r\n /* mediaElement = new Image();\r\n src = target.style.backgroundImage.slice(5, -2); */\r\n }\r\n else if (target instanceof HTMLImageElement) {\r\n mediaElement = new Image();\r\n src = target.src;\r\n }\r\n else if (target instanceof HTMLVideoElement) {\r\n let video = mediaElement = document.createElement('video');\r\n let source = document.createElement('source');\r\n src = (_a = target.querySelector('source')) === null || _a === void 0 ? void 0 : _a.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 foreignObject = newSvg.lastElementChild;\r\n foreignObject.setAttributeNS(null, 'width', '' + containerRect.width);\r\n foreignObject.setAttributeNS(null, 'height', '' + containerRect.height);\r\n mover.prepend(newSvg);\r\n }\r\n if (aspecter) {\r\n aspecter.style.borderRadius = borderRadius;\r\n aspecter.append(mediaElement);\r\n }\r\n mediaElement = mover.querySelector('video, img');\r\n if (mediaElement instanceof HTMLImageElement) {\r\n yield new Promise((resolve, reject) => {\r\n mediaElement.addEventListener('load', resolve);\r\n if (src) {\r\n mediaElement.src = src;\r\n }\r\n });\r\n }\r\n else if (mediaElement instanceof HTMLVideoElement && mediaElement.firstElementChild && (mediaElement.firstElementChild.src || src)) {\r\n yield new Promise((resolve, reject) => {\r\n mediaElement.addEventListener('loadeddata', resolve);\r\n if (src) {\r\n mediaElement.firstElementChild.src = src;\r\n }\r\n });\r\n }\r\n mover.style.display = '';\r\n window.requestAnimationFrame(() => {\r\n mover.classList.add(wasActive ? 'moving' : 'active');\r\n });\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 if (target.classList.contains('media-viewer-media')) {\r\n mover.classList.add('hiding');\r\n }\r\n setTimeout(() => {\r\n this.wholeDiv.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 }, delay / 2);\r\n setTimeout(() => {\r\n mover.innerHTML = '';\r\n mover.classList.remove('moving', 'active', 'hiding');\r\n mover.style.display = 'none';\r\n }, delay);\r\n return;\r\n }\r\n //await new Promise((resolve) => setTimeout(resolve, 0));\r\n yield new Promise((resolve) => window.requestAnimationFrame(resolve));\r\n //throw '';\r\n mover.style.transform = `translate(${containerRect.left}px,${containerRect.top}px) scale(1,1)`;\r\n if (aspecter) {\r\n this.setFullAspect(aspecter, containerRect, rect);\r\n }\r\n setTimeout(() => {\r\n mover.style.borderRadius = '';\r\n if (mover.firstElementChild) {\r\n mover.firstElementChild.style.borderRadius = '';\r\n }\r\n }, delay / 2);\r\n mover.dataset.timeout = '' + setTimeout(() => {\r\n mover.classList.remove('moving');\r\n if (aspecter) { // всё из-за видео, элементы управления скейлятся, так бы можно было этого не делать\r\n if (mover.querySelector('video')) {\r\n mover.classList.remove('active');\r\n aspecter.style.cssText = '';\r\n void mover.offsetLeft; // reflow\r\n }\r\n aspecter.classList.remove('disable-hover');\r\n }\r\n mover.classList.add('active');\r\n delete mover.dataset.timeout;\r\n }, delay);\r\n if (path) {\r\n this.sizeTailPath(path, containerRect, scaleX, delay, true, isOut, borderRadius);\r\n }\r\n });\r\n }\r\n setFullAspect(aspecter, containerRect, rect) {\r\n let media = aspecter.firstElementChild;\r\n let proportion;\r\n if (media instanceof HTMLImageElement) {\r\n proportion = media.naturalWidth / media.naturalHeight;\r\n }\r\n else if (media instanceof HTMLVideoElement) {\r\n proportion = media.videoWidth / media.videoHeight;\r\n }\r\n let { width, height } = rect;\r\n /* if(proportion == 1) {\r\n aspecter.style.cssText = '';\r\n } else { */\r\n if (proportion > 0) {\r\n width = height * proportion;\r\n }\r\n else {\r\n height = width * proportion;\r\n }\r\n //this.log('will set style aspecter:', `width: ${width}px; height: ${height}px; transform: scale(${containerRect.width / width}, ${containerRect.height / height});`);\r\n aspecter.style.cssText = `width: ${width}px; height: ${height}px; transform: scale(${containerRect.width / width}, ${containerRect.height / height});`;\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.remove('active');\r\n mover.classList.add('moving');\r\n if (mover.dataset.timeout) { // и это тоже всё из-за скейла видео, так бы это не нужно было\r\n clearTimeout(+mover.dataset.timeout);\r\n }\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 if (this.content.mover) {\r\n let oldMover = this.content.mover;\r\n oldMover.parentElement.append(newMover);\r\n }\r\n else {\r\n this.wholeDiv.append(newMover);\r\n }\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 = [], needLoadMore = true) {\r\n if (this.setMoverPromise)\r\n return this.setMoverPromise;\r\n this.log('openMedia doc:', message);\r\n const media = message.media.photo || message.media.document || message.media.webpage.document || message.media.webpage.photo;\r\n const isVideo = media.mime_type == 'video/mp4';\r\n const 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.needLoadMore = needLoadMore;\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 const container = this.content.container;\r\n const 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.needLoadMore) {\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 }\r\n if (container.firstElementChild) {\r\n container.innerHTML = '';\r\n }\r\n const date = new Date(media.date * 1000);\r\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n const dateStr = months[date.getMonth()] + ' ' + date.getDate() + ' at ' + date.getHours() + ':' + ('0' + date.getMinutes()).slice(-2);\r\n this.author.date.innerText = dateStr;\r\n const 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 let oldAvatar = this.author.avatarEl;\r\n // @ts-ignore\r\n this.author.avatarEl = this.author.avatarEl.cloneNode();\r\n this.author.avatarEl.setAttribute('peer', '' + message.fromID);\r\n oldAvatar.parentElement.replaceChild(this.author.avatarEl, oldAvatar);\r\n // ok set\r\n const 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.wholeDiv.classList.add('active');\r\n }\r\n ////////this.log('wasActive:', wasActive);\r\n const mover = this.content.mover;\r\n //const maxWidth = appPhotosManager.windowW - 16;\r\n const maxWidth = this.pageEl.scrollWidth - 16;\r\n const maxHeight = appPhotosManager_1.default.windowH - 100;\r\n const size = appPhotosManager_1.default.setAttachmentSize(isVideo ? media : media.id, container, maxWidth, maxHeight);\r\n // need after setAttachmentSize\r\n /* if(useContainerAsTarget) {\r\n target = target.querySelector('img, video') || target;\r\n } */\r\n let setMoverPromise;\r\n if (isVideo) {\r\n ////////this.log('will wrap video', media, size);\r\n setMoverPromise = this.setMoverToTarget(target, false, fromRight).then(() => {\r\n //return; // set and don't move\r\n //if(wasActive) return;\r\n //return;\r\n let video = mover.querySelector('video') || document.createElement('video');\r\n let source = video.firstElementChild || document.createElement('source');\r\n if (media.type == 'gif') {\r\n video.autoplay = true;\r\n video.loop = true;\r\n }\r\n let createPlayer = () => {\r\n if (media.type != 'gif') {\r\n video.dataset.ckin = 'default';\r\n video.dataset.overlay = '1';\r\n let player = new mediaPlayer_1.default(video, true);\r\n /* player.wrapper.parentElement.append(video);\r\n mover.append(player.wrapper); */\r\n }\r\n else {\r\n video.play();\r\n }\r\n };\r\n if (!source || !source.src) {\r\n let load = () => {\r\n let promise = appDocsManager_1.default.downloadDoc(media);\r\n this.preloader.attach(mover, true, promise);\r\n promise.then(() => {\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 div = mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter') ? mover.firstElementChild : mover;\r\n let image = div.firstElementChild;\r\n if (image instanceof HTMLImageElement) {\r\n image.remove();\r\n }\r\n misc_1.renderImageFromUrl(source, url);\r\n source.type = media.mime_type;\r\n if (!source.parentElement) {\r\n video.append(source);\r\n }\r\n if (!video.parentElement) {\r\n div.prepend(video);\r\n }\r\n }\r\n createPlayer();\r\n });\r\n return promise;\r\n };\r\n this.lazyLoadQueue.unshift({\r\n div: null,\r\n load,\r\n wasSeen: true\r\n });\r\n }\r\n else\r\n createPlayer();\r\n });\r\n }\r\n else {\r\n setMoverPromise = this.setMoverToTarget(target, false, fromRight).then(() => {\r\n //return; // set and don't move\r\n //if(wasActive) return;\r\n //return;\r\n let load = () => {\r\n let cancellablePromise = appPhotosManager_1.default.preloadPhoto(media.id, size);\r\n this.preloader.attach(mover, true, cancellablePromise);\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, 'img');\r\n this.updateMediaSource(mover, url, 'img');\r\n }\r\n else {\r\n let div = mover.firstElementChild && mover.firstElementChild.classList.contains('media-viewer-aspecter') ? mover.firstElementChild : mover;\r\n let image = div.firstElementChild;\r\n if (!image || image.tagName != 'IMG') {\r\n image = new Image();\r\n }\r\n //this.log('will renderImageFromUrl:', image, div, target);\r\n misc_1.renderImageFromUrl(image, url).then(() => {\r\n div.append(image);\r\n });\r\n }\r\n this.preloader.detach();\r\n }).catch(err => {\r\n this.log.error(err);\r\n });\r\n return cancellablePromise;\r\n };\r\n this.lazyLoadQueue.unshift({\r\n div: null,\r\n load,\r\n wasSeen: true\r\n });\r\n });\r\n }\r\n return this.setMoverPromise = setMoverPromise.then(() => {\r\n this.setMoverPromise = null;\r\n });\r\n }\r\n}\r\nexports.AppMediaViewer = AppMediaViewer;\r\nexports.default = new AppMediaViewer();\r\n"
},
{
"id": 35,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"name": "./src/components/appForward.ts",
"index": 56,
"index2": 55,
"size": 2897,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/appForward",
"loc": "33:37-75"
},
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../../components/appForward",
"loc": "50:37-75"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../../components/appForward",
"loc": "27:37-75"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 appSidebarRight_1 = __importDefault(require(\"../lib/appManagers/appSidebarRight\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst misc_1 = require(\"./misc\");\r\nconst appSelectPeers_1 = require(\"./appSelectPeers\");\r\nclass AppForward {\r\n constructor() {\r\n this.container = document.getElementById('forward-container');\r\n this.closeBtn = this.container.querySelector('.sidebar-close-button');\r\n this.sendBtn = this.container.querySelector('.btn-circle');\r\n this.msgIDs = [];\r\n this.closeBtn.addEventListener('click', this.close.bind(this));\r\n this.sendBtn.addEventListener('click', () => {\r\n let peerIDs = this.selector.getSelected();\r\n if (this.msgIDs.length && peerIDs.length) {\r\n this.sendBtn.classList.remove('tgico-send');\r\n this.sendBtn.disabled = true;\r\n misc_1.putPreloader(this.sendBtn);\r\n this.selector.freezed = true;\r\n let s = () => {\r\n let promises = peerIDs.splice(0, 3).map(peerID => {\r\n return appMessagesManager_1.default.forwardMessages(peerID, this.msgIDs);\r\n });\r\n Promise.all(promises).then(() => {\r\n if (peerIDs.length) {\r\n return s();\r\n }\r\n else {\r\n this.closeBtn.click();\r\n }\r\n });\r\n };\r\n s();\r\n }\r\n });\r\n }\r\n close() {\r\n this.cleanup();\r\n this.container.classList.remove('active');\r\n }\r\n cleanup() {\r\n if (this.selector) {\r\n this.selector.container.remove();\r\n this.selector = null;\r\n }\r\n }\r\n init(ids) {\r\n this.cleanup();\r\n this.msgIDs = ids;\r\n this.container.classList.add('active');\r\n this.sendBtn.innerHTML = '';\r\n this.sendBtn.classList.add('tgico-send');\r\n this.sendBtn.disabled = false;\r\n this.selector = new appSelectPeers_1.AppSelectPeers(this.container, (length) => {\r\n if (length) {\r\n this.sendBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.sendBtn.classList.remove('is-visible');\r\n }\r\n }, 'dialogs', () => {\r\n console.log('forward rendered:', this.container.querySelector('.selector ul').childElementCount);\r\n appSidebarRight_1.default.toggleSidebar(true);\r\n });\r\n }\r\n}\r\nexports.default = new AppForward();\r\n"
},
{
"id": 36,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"name": "./src/lib/services.ts",
"index": 58,
"index2": 53,
"size": 3685,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"issuerId": 46,
"issuerName": "./src/lib/appManagers/appSidebarLeft.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 46,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"name": "./src/lib/appManagers/appSidebarLeft.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 499,
"building": 260,
"dependencies": 3
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 45,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"module": "./src/components/appSelectPeers.ts",
"moduleName": "./src/components/appSelectPeers.ts",
"type": "cjs require",
"userRequest": "../lib/services",
"loc": "22:19-45"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../services",
"loc": "36:19-41"
},
{
"moduleId": 70,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"module": "./src/lib/appManagers/AppInlineBotsManager.ts",
"moduleName": "./src/lib/appManagers/AppInlineBotsManager.ts",
"type": "cjs require",
"userRequest": "../services",
"loc": "9:19-41"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.appDialogsManager = exports.appMediaViewer = exports.appSidebarLeft = exports.appSidebarRight = exports.appDocsManager = exports.appStickersManager = exports.appPeersManager = exports.appImManager = exports.appProfileManager = exports.appMessagesManager = exports.appPhotosManager = exports.apiUpdatesManager = exports.appMessagesIDsManager = exports.appChatsManager = exports.appUsersManager = void 0;\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": 37,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appStickersManager.ts",
"name": "./src/lib/appManagers/appStickersManager.ts",
"index": 59,
"index2": 48,
"size": 5493,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appStickersManager",
"loc": "34:45-76"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appStickersManager",
"loc": "18:45-88"
},
{
"moduleId": 67,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"module": "./src/components/emoticonsDropdown.ts",
"moduleName": "./src/components/emoticonsDropdown.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appStickersManager",
"loc": "22:45-93"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 this.saveStickers(set.documents);\r\n }\r\n this.stickerSets = sets;\r\n }\r\n //if(!this.stickerSets['emoji']) {\r\n this.getStickerSet({ id: 'emoji', access_hash: '' }, { overwrite: true });\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 doc = appDocsManager_1.default.saveDoc(doc);\r\n this.documents[doc.id] = doc;\r\n return doc;\r\n }\r\n saveStickers(docs) {\r\n docs.forEach((doc, idx) => {\r\n docs[idx] = this.saveSticker(doc);\r\n });\r\n }\r\n getSticker(fileID) {\r\n return this.documents[fileID];\r\n }\r\n getStickerSet(set, params = {}) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.stickerSets[set.id] && !params.overwrite)\r\n return this.stickerSets[set.id];\r\n let promise = mtprotoworker_1.default.invokeApi('messages.getStickerSet', {\r\n stickerset: set.id == 'emoji' ? {\r\n _: 'inputStickerSetAnimatedEmoji'\r\n } : {\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, set.id);\r\n return stickerSet;\r\n });\r\n }\r\n getRecentStickers() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let res = yield mtprotoworker_1.default.invokeApi('messages.getRecentStickers', { flags: 0, hash: 0 });\r\n this.saveStickers(res.stickers);\r\n return res;\r\n });\r\n }\r\n getAnimatedEmojiSticker(emoji) {\r\n let stickerSet = this.stickerSets.emoji;\r\n emoji = emoji.replace(/\\ufe0f/g, '').replace(/🏻|🏼|🏽|🏾|🏿/g, '');\r\n return stickerSet.documents.find(doc => doc.stickerEmojiRaw == emoji);\r\n }\r\n saveStickerSet(res, 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 this.saveStickers(res.documents);\r\n //console.log('stickers wrote', this.stickerSets);\r\n if (this.saveSetsTimeout)\r\n return;\r\n this.saveSetsTimeout = setTimeout(() => {\r\n storage_1.default.set({\r\n stickerSets: this.stickerSets\r\n });\r\n this.saveSetsTimeout = 0;\r\n }, 0);\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 getStickerSetThumb(stickerSet) {\r\n var _a;\r\n let thumb = stickerSet.thumb;\r\n let dcID = stickerSet.thumb_dc_id;\r\n let isAnimated = (_a = stickerSet.pFlags) === null || _a === void 0 ? void 0 : _a.animated;\r\n let promise = apiFileManager_1.default.downloadFile(dcID, {\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 }, thumb.size, {\r\n stickerType: isAnimated ? 2 : 1,\r\n mimeType: isAnimated ? \"application/x-tgsticker\" : 'image/webp'\r\n });\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\nconst appStickersManager = new AppStickersManager();\r\nwindow.appStickersManager = appStickersManager;\r\nexports.default = appStickersManager;\r\n"
},
{
"id": 38,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\jsbn\\index.js",
"name": "./node_modules/jsbn/index.js",
"index": 16,
"index2": 11,
"size": 42308,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
1
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"issuerId": 10,
"issuerName": "./src/lib/polyfill.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"name": "./src/components/scrollable_new.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
},
{
"id": 10,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"name": "./src/lib/polyfill.ts",
"profile": {
"factory": 1195,
"building": 1822,
"dependencies": 1
}
}
],
"profile": {
"factory": 3072,
"building": 27
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"module": "./src/lib/polyfill.ts",
"moduleName": "./src/lib/polyfill.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "6:15-30"
},
{
"moduleId": 11,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"module": "./src/lib/bin_utils.ts",
"moduleName": "./src/lib/bin_utils.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "11:15-30"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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<<dbits)-1);\n BigInteger.prototype.DV = (1<<dbits);\n\n var BI_FP = 52;\n BigInteger.prototype.FV = Math.pow(2,BI_FP);\n BigInteger.prototype.F1 = BI_FP-dbits;\n BigInteger.prototype.F2 = 2*dbits-BI_FP;\n\n // Digit conversions\n var BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n var BI_RC = new Array();\n var rr,vv;\n rr = \"0\".charCodeAt(0);\n for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;\n rr = \"a\".charCodeAt(0);\n for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n rr = \"A\".charCodeAt(0);\n for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n\n function int2char(n) { return BI_RM.charAt(n); }\n function intAt(s,i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c==null)?-1:c;\n }\n\n // (protected) copy this to r\n function bnpCopyTo(r) {\n for(var i = this.t-1; i >= 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))<<sh;\n this[this.t++] = (x>>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<<sh;\n sh += k;\n if(sh >= 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)<<sh;\n }\n this.clamp();\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) clamp off excess high words\n function bnpClamp() {\n var c = this.s&this.DM;\n while(this.t > 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<<k)-1, d, m = false, r = \"\", i = this.t;\n var p = this.DB-(i*this.DB)%k;\n if(i-- > 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)-1))<<(k-p);\n d |= this[--i]>>(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<<cbs)-1;\n var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;\n for(i = this.t-1; i >= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<<bs;\n }\n for(i = ds-1; i >= 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)-1;\n r[0] = this[ds]>>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<<cbs;\n r[i-ds] = this[i]>>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;\n r.t = this.t-ds;\n r.clamp();\n }\n\n // (protected) r = this - a\n function bnpSubTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]-a[i];\n r[i++] = c&this.DM;\n c >>= 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<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;\n var i = r.t, j = i-ys, t = (q==null)?nbi():q;\n y.dlShiftTo(j,t);\n if(r.compareTo(t) >= 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<<i)) > 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))<<this.DB)|this[0];\n }\n\n // (public) return value as byte\n function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>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<<t)-1); else x[0] = 0;\n this.fromString(x,256);\n }\n }\n\n // (public) convert to bigendian byte array\n function bnToByteArray() {\n var i = this.t, r = new Array();\n r[0] = this.s;\n var p = this.DB-(i*this.DB)%8, d, k = 0;\n if(i-- > 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)-1))<<(8-p);\n d |= this[--i]>>(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<<n)\n function bnpChangeBit(n,op) {\n var r = BigInteger.ONE.shiftLeft(n);\n this.bitwiseTo(r,op,r);\n return r;\n }\n\n // (public) this | (1<<n)\n function bnSetBit(n) { return this.changeBit(n,op_or); }\n\n // (public) this & ~(1<<n)\n function bnClearBit(n) { return this.changeBit(n,op_andnot); }\n\n // (public) this ^ (1<<n)\n function bnFlipBit(n) { return this.changeBit(n,op_xor); }\n\n // (protected) r = this + a\n function bnpAddTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]+a[i];\n r[i++] = c&this.DM;\n c >>= 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<<k)-1;\n g[1] = z.convert(this);\n if(k > 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<<i)) == 0) {\n z.sqrTo(r,r2); t = r; r = r2; r2 = t;\n if(--i < 0) { i = this.DB-1; --j; }\n }\n }\n return z.revert(r);\n }\n\n // (public) gcd(this,a) (HAC 14.54)\n function bnGCD(a) {\n var x = (this.s<0)?this.negate():this.clone();\n var y = (a.s<0)?a.negate():a.clone();\n if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }\n var i = x.getLowestSetBit(), g = y.getLowestSetBit();\n if(g < 0) return x;\n if(i < g) g = i;\n if(g > 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 // <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>\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"
},
{
"id": 39,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebpManager.ts",
"name": "./src/lib/appManagers/appWebpManager.ts",
"index": 39,
"index2": 28,
"size": 3534,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"issuerId": 31,
"issuerName": "./src/components/wrappers.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 31,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"name": "./src/components/wrappers.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 314,
"building": 338,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../appManagers/appWebpManager",
"loc": "22:41-81"
},
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appWebpManager",
"loc": "48:41-85"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass AppWebpManager {\r\n constructor() {\r\n this.webpMachine = null;\r\n this.queue = [];\r\n this.testPromise = null;\r\n this.webpSupport = false;\r\n this.testWebpSupport();\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.testWebpSupport();\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 }\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 { 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 res = yield this.busyPromise;\r\n console.log('converted webp', res);\r\n callback(res);\r\n this.busyPromise = null;\r\n if (this.queue.length) {\r\n this.processQueue();\r\n }\r\n });\r\n }\r\n testWebpSupport() {\r\n if (this.testPromise)\r\n return this.testPromise;\r\n return this.testPromise = new Promise((resolve, reject) => {\r\n let 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(this.webpSupport = webP.height === 2 /* && false */);\r\n };\r\n });\r\n }\r\n isSupported() {\r\n return this.webpSupport;\r\n }\r\n convertToPng(bytes) {\r\n console.warn('convertToPng!');\r\n return new Promise((resolve, reject) => {\r\n // @ts-ignore\r\n this.queue.push({ bytes, callback: resolve });\r\n this.processQueue();\r\n });\r\n }\r\n}\r\nconst appWebpManager = new AppWebpManager();\r\nwindow.appWebpManager = appWebpManager;\r\nexports.default = appWebpManager;\r\n"
},
{
"id": 40,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\opusDecodeController.ts",
"name": "./src/lib/opusDecodeController.ts",
"index": 45,
"index2": 37,
"size": 4463,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"issuerId": 66,
"issuerName": "./src/components/chatInput.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 66,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"name": "./src/components/chatInput.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 246,
"building": 1149,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDocsManager.ts",
"module": "./src/lib/appManagers/appDocsManager.ts",
"moduleName": "./src/lib/appManagers/appDocsManager.ts",
"type": "cjs require",
"userRequest": "../opusDecodeController",
"loc": "20:47-81"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/opusDecodeController",
"loc": "40:47-85"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.OpusDecodeController = void 0;\r\nclass OpusDecodeController {\r\n constructor() {\r\n this.sampleRate = 48000;\r\n this.tasks = [];\r\n this.keepAlive = false;\r\n }\r\n loadWavWorker() {\r\n if (this.wavWorker)\r\n return;\r\n this.wavWorker = new Worker('waveWorker.min.js');\r\n this.wavWorker.addEventListener('message', (e) => {\r\n const data = e.data;\r\n if (data && data.page) {\r\n const bytes = data.page;\r\n this.onTaskEnd(this.tasks.shift(), bytes);\r\n }\r\n });\r\n }\r\n loadWorker() {\r\n if (this.worker)\r\n return;\r\n this.worker = new Worker('decoderWorker.min.js');\r\n this.worker.addEventListener('message', (e) => {\r\n const data = e.data;\r\n if (data.type == 'done') {\r\n this.wavWorker.postMessage({ command: 'done' });\r\n if (data.waveform) {\r\n this.tasks[0].waveform = data.waveform;\r\n }\r\n }\r\n else { // e.data contains decoded buffers as float32 values\r\n this.wavWorker.postMessage({\r\n command: 'encode',\r\n buffers: e.data\r\n }, data.map((typedArray) => typedArray.buffer));\r\n }\r\n });\r\n }\r\n setKeepAlive(keepAlive) {\r\n this.keepAlive = keepAlive;\r\n if (this.keepAlive) {\r\n this.loadWorker();\r\n this.loadWavWorker();\r\n }\r\n else if (!this.tasks.length) {\r\n this.terminateWorkers();\r\n }\r\n }\r\n onTaskEnd(task, result) {\r\n task.callback.resolve({ bytes: result, waveform: task.waveform });\r\n if (this.tasks.length) {\r\n this.executeNewTask(this.tasks[0]);\r\n }\r\n this.terminateWorkers();\r\n }\r\n terminateWorkers() {\r\n if (this.keepAlive || this.tasks.length)\r\n return;\r\n this.worker.terminate();\r\n this.worker = null;\r\n this.wavWorker.terminate();\r\n this.wavWorker = null;\r\n }\r\n executeNewTask(task) {\r\n this.worker.postMessage({\r\n command: 'init',\r\n decoderSampleRate: this.sampleRate,\r\n outputBufferSampleRate: this.sampleRate\r\n });\r\n this.wavWorker.postMessage({\r\n command: 'init',\r\n wavBitDepth: 16,\r\n wavSampleRate: this.sampleRate\r\n });\r\n //console.log('sending command to worker:', task);\r\n //setTimeout(() => {\r\n this.worker.postMessage({\r\n command: 'decode',\r\n pages: task.pages,\r\n waveform: task.withWaveform\r\n }, [task.pages.buffer]);\r\n //}, 1e3);\r\n }\r\n pushDecodeTask(pages, withWaveform) {\r\n return new Promise((resolve, reject) => {\r\n const task = {\r\n pages,\r\n withWaveform,\r\n callback: { resolve, reject }\r\n };\r\n this.loadWorker();\r\n this.loadWavWorker();\r\n if (this.tasks.push(task) == 1) {\r\n this.executeNewTask(task);\r\n }\r\n });\r\n }\r\n decode(typedArray, withWaveform = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return this.pushDecodeTask(typedArray, withWaveform).then(result => {\r\n const dataBlob = new Blob([result.bytes], { type: \"audio/wav\" });\r\n return { url: URL.createObjectURL(dataBlob), waveform: result.waveform };\r\n });\r\n });\r\n }\r\n}\r\nexports.OpusDecodeController = OpusDecodeController;\r\nexports.default = new OpusDecodeController();\r\n"
},
{
"id": 41,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appWebPagesManager.ts",
"name": "./src/lib/appManagers/appWebPagesManager.ts",
"index": 47,
"index2": 40,
"size": 4216,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appWebPagesManager",
"loc": "35:45-76"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appWebPagesManager",
"loc": "30:45-93"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 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": 42,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appPollsManager.ts",
"name": "./src/lib/appManagers/appPollsManager.ts",
"index": 48,
"index2": 41,
"size": 3327,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "./appPollsManager",
"loc": "37:42-70"
},
{
"moduleId": 65,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\poll.ts",
"module": "./src/components/poll.ts",
"moduleName": "./src/components/poll.ts",
"type": "cjs require",
"userRequest": "../lib/appManagers/appPollsManager",
"loc": "6:42-87"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 richtextprocessor_1 = require(\"../richtextprocessor\");\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst appPeersManager_1 = __importDefault(require(\"./appPeersManager\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst apiUpdatesManager_1 = __importDefault(require(\"./apiUpdatesManager\"));\r\nconst utils_1 = require(\"../utils\");\r\nclass AppPollsManager {\r\n constructor() {\r\n this.polls = {};\r\n this.results = {};\r\n utils_1.$rootScope.$on('apiUpdate', (e) => {\r\n let update = e.detail;\r\n this.handleUpdate(update);\r\n });\r\n }\r\n handleUpdate(update) {\r\n switch (update._) {\r\n case 'updateMessagePoll': { // when someone voted, we too\r\n console.log('updateMessagePoll:', update);\r\n let poll = this.polls[update.poll_id] || update.poll;\r\n if (!poll) {\r\n break;\r\n }\r\n poll = this.savePoll(poll, update.results);\r\n utils_1.$rootScope.$broadcast('poll_update', { poll, results: update.results });\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n }\r\n savePoll(poll, results) {\r\n let id = poll.id;\r\n if (this.polls[id]) {\r\n poll = this.polls[id];\r\n this.saveResults(poll, results);\r\n return poll;\r\n }\r\n this.polls[id] = poll;\r\n poll.rQuestion = richtextprocessor_1.RichTextProcessor.wrapEmojiText(poll.question);\r\n poll.rReply = richtextprocessor_1.RichTextProcessor.wrapEmojiText('📊') + ' ' + (poll.rQuestion || 'poll');\r\n this.saveResults(poll, results);\r\n return poll;\r\n }\r\n saveResults(poll, results) {\r\n var _a;\r\n this.results[poll.id] = results;\r\n poll.chosenIndex = (_a = (results && results.results && results.results.findIndex(answer => { var _a; return (_a = answer.pFlags) === null || _a === void 0 ? void 0 : _a.chosen; }))) !== null && _a !== void 0 ? _a : -1;\r\n }\r\n getPoll(pollID) {\r\n return {\r\n poll: this.polls[pollID],\r\n results: this.results[pollID]\r\n };\r\n }\r\n sendVote(mid, optionIDs) {\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n let poll = message.media.poll;\r\n let options = optionIDs.map(index => {\r\n return poll.answers[index].option;\r\n });\r\n let inputPeer = appPeersManager_1.default.getInputPeerByID(message.peerID);\r\n let messageID = message.id;\r\n return mtprotoworker_1.default.invokeApi('messages.sendVote', {\r\n peer: inputPeer,\r\n msg_id: messageID,\r\n options\r\n }).then(updates => {\r\n console.log('appPollsManager sendVote updates:', updates);\r\n apiUpdatesManager_1.default.processUpdateMessage(updates);\r\n });\r\n }\r\n}\r\nconst appPollsManager = new AppPollsManager();\r\nwindow.appPollsManager = appPollsManager;\r\nexports.default = appPollsManager;\r\n"
},
{
"id": 43,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popup.ts",
"name": "./src/components/popup.ts",
"index": 51,
"index2": 44,
"size": 2956,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/popup",
"loc": "38:16-49"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appDialogsManager.ts",
"module": "./src/lib/appManagers/appDialogsManager.ts",
"moduleName": "./src/lib/appManagers/appDialogsManager.ts",
"type": "cjs require",
"userRequest": "../../components/popup",
"loc": "28:16-49"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.PopupPeer = exports.PopupElement = void 0;\r\nconst avatar_1 = __importDefault(require(\"./avatar\"));\r\nconst misc_1 = require(\"./misc\");\r\nclass PopupElement {\r\n constructor(className) {\r\n this.element = document.createElement('div');\r\n this.container = document.createElement('div');\r\n this.header = document.createElement('div');\r\n this.title = document.createElement('div');\r\n this.element.classList.add('popup');\r\n this.element.className = 'popup' + (className ? ' ' + className : '');\r\n this.container.classList.add('popup-container', 'z-depth-1');\r\n this.header.classList.add('popup-header');\r\n this.title.classList.add('popup-title');\r\n this.header.append(this.title);\r\n this.container.append(this.header);\r\n this.element.append(this.container);\r\n }\r\n show() {\r\n document.body.append(this.element);\r\n void this.element.offsetWidth; // reflow\r\n this.element.classList.add('active');\r\n }\r\n destroy() {\r\n this.element.classList.remove('active');\r\n setTimeout(() => {\r\n this.element.remove();\r\n }, 1000);\r\n }\r\n}\r\nexports.PopupElement = PopupElement;\r\nclass PopupPeer extends PopupElement {\r\n constructor(className, options = {}) {\r\n super('popup-peer' + (className ? ' ' + className : ''));\r\n this.className = className;\r\n let avatarEl = new avatar_1.default();\r\n avatarEl.setAttribute('dialog', '1');\r\n avatarEl.setAttribute('peer', '' + options.peerID);\r\n avatarEl.classList.add('peer-avatar');\r\n this.title.innerText = options.title || '';\r\n this.header.prepend(avatarEl);\r\n let p = document.createElement('p');\r\n p.classList.add('popup-description');\r\n p.innerHTML = options.description;\r\n let buttonsDiv = document.createElement('div');\r\n buttonsDiv.classList.add('popup-buttons');\r\n let buttons = options.buttons.map(b => {\r\n let button = document.createElement('button');\r\n misc_1.ripple(button);\r\n button.className = 'btn' + (b.isDanger ? ' danger' : '');\r\n button.innerHTML = b.text;\r\n if (b.callback) {\r\n button.addEventListener('click', () => {\r\n b.callback();\r\n this.destroy();\r\n });\r\n }\r\n else if (b.isCancel) {\r\n button.addEventListener('click', () => {\r\n this.destroy();\r\n });\r\n }\r\n return button;\r\n });\r\n buttonsDiv.append(...buttons);\r\n this.container.append(p, buttonsDiv);\r\n }\r\n}\r\nexports.PopupPeer = PopupPeer;\r\n"
},
{
"id": 44,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mediaPlayer.ts",
"name": "./src/lib/mediaPlayer.ts",
"index": 54,
"index2": 46,
"size": 13929,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"issuerId": 34,
"issuerName": "./src/lib/appManagers/appMediaViewer.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 34,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"name": "./src/lib/appManagers/appMediaViewer.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 620,
"building": 233
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "../lib/mediaPlayer",
"loc": "42:35-64"
},
{
"moduleId": 34,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMediaViewer.ts",
"module": "./src/lib/appManagers/appMediaViewer.ts",
"moduleName": "./src/lib/appManagers/appMediaViewer.ts",
"type": "cjs require",
"userRequest": "../mediaPlayer",
"loc": "24:38-63"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.MediaProgressLine = void 0;\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 = '<div class=\"circle-time\"></div><div class=\"iconVolume tgico-nosound\"></div>';\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('<button class=\"' + skin + '__button--big toggle tgico-largeplay\" title=\"Toggle Play\"></button>');\r\n html.push('<div class=\"' + skin + '__gradient-bottom ckin__controls\"></div>');\r\n html.push('<div class=\"' + skin + '__controls ckin__controls\">');\r\n html.push('<div class=\"bottom-controls\">', '<div class=\"left-controls\"><button class=\"' + skin + '__button toggle tgico-play\" title=\"Toggle Video\"></button>', '<div class=\"time\">', '<time id=\"time-elapsed\">0:00</time>', '<span> / </span>', '<time id=\"time-duration\">0:00</time>', '</div>', '</div>', '<div class=\"right-controls\"><button class=\"' + skin + '__button fullscreen tgico-fullscreen\" title=\"Full Screen\"></button></div></div>');\r\n html.push('</div>');\r\n }\r\n else if (skin === 'circle') {\r\n html.push('<svg class=\"progress-ring\" width=\"200px\" height=\"200px\">', '<circle class=\"progress-ring__circle\" stroke=\"white\" stroke-opacity=\"0.3\" stroke-width=\"3.5\" cx=\"100\" cy=\"100\" r=\"93\" fill=\"transparent\" transform=\"rotate(-90, 100, 100)\"/>', '</svg>');\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": 45,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSelectPeers.ts",
"name": "./src/components/appSelectPeers.ts",
"index": 57,
"index2": 54,
"size": 9820,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"issuerId": 46,
"issuerName": "./src/lib/appManagers/appSidebarLeft.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 46,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"name": "./src/lib/appManagers/appSidebarLeft.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 499,
"building": 260,
"dependencies": 3
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 35,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appForward.ts",
"module": "./src/components/appForward.ts",
"moduleName": "./src/components/appForward.ts",
"type": "cjs require",
"userRequest": "./appSelectPeers",
"loc": "9:25-52"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/appSelectPeers",
"loc": "39:25-67"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppSelectPeers = void 0;\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\r\nconst appMessagesManager_1 = __importDefault(require(\"../lib/appManagers/appMessagesManager\"));\r\nconst utils_1 = require(\"../lib/utils\");\r\nconst appDialogsManager_1 = __importDefault(require(\"../lib/appManagers/appDialogsManager\"));\r\nconst appChatsManager_1 = __importDefault(require(\"../lib/appManagers/appChatsManager\"));\r\nconst appUsersManager_1 = __importDefault(require(\"../lib/appManagers/appUsersManager\"));\r\nconst services_1 = require(\"../lib/services\");\r\nconst appPhotosManager_1 = __importDefault(require(\"../lib/appManagers/appPhotosManager\"));\r\nclass AppSelectPeers {\r\n constructor(appendTo, onChange, peerType = 'dialogs', onFirstRender) {\r\n this.appendTo = appendTo;\r\n this.onChange = onChange;\r\n this.peerType = peerType;\r\n this.container = document.createElement('div');\r\n this.list = document.createElement('ul');\r\n this.chatsContainer = document.createElement('div');\r\n this.selectedContainer = document.createElement('div');\r\n this.input = document.createElement('input');\r\n this.selected = {};\r\n this.freezed = false;\r\n this.myID = utils_1.$rootScope.myID;\r\n this.offsetIndex = 0;\r\n this.query = '';\r\n this.container.classList.add('selector');\r\n let topContainer = document.createElement('div');\r\n topContainer.classList.add('selector-search-container');\r\n this.selectedContainer.classList.add('selector-search');\r\n this.input.placeholder = peerType == 'contacts' ? 'Add People...' : 'Select chat';\r\n this.input.type = 'text';\r\n this.selectedContainer.append(this.input);\r\n topContainer.append(this.selectedContainer);\r\n this.selectedScrollable = new scrollable_new_1.default(topContainer);\r\n let delimiter = document.createElement('hr');\r\n this.chatsContainer.classList.add('chats-container');\r\n this.chatsContainer.append(this.list);\r\n this.scrollable = new scrollable_new_1.default(this.chatsContainer);\r\n this.scrollable.setVirtualContainer(this.list);\r\n this.list.addEventListener('click', (e) => {\r\n let target = e.target;\r\n utils_1.cancelEvent(e);\r\n if (this.freezed)\r\n return;\r\n if (target.tagName != 'LI') {\r\n target = utils_1.findUpTag(target, 'LI');\r\n }\r\n if (!target)\r\n return;\r\n let peerID = +target.getAttribute('data-peerID');\r\n target.classList.toggle('active');\r\n if (peerID in this.selected) {\r\n this.remove(peerID);\r\n }\r\n else {\r\n this.add(peerID);\r\n }\r\n let checkbox = target.querySelector('input');\r\n checkbox.checked = !checkbox.checked;\r\n });\r\n this.selectedContainer.addEventListener('click', (e) => {\r\n if (this.freezed)\r\n return;\r\n let target = e.target;\r\n target = utils_1.findUpClassName(target, 'selector-user');\r\n if (!target)\r\n return;\r\n let peerID = target.dataset.peerID;\r\n let li = this.list.querySelector('[data-peerid=\"' + peerID + '\"]');\r\n li.click();\r\n });\r\n this.input.addEventListener('input', () => {\r\n let value = this.input.value;\r\n if (this.query != value) {\r\n if (this.peerType == 'contacts') {\r\n this.cachedContacts = null;\r\n }\r\n else {\r\n this.offsetIndex = 0;\r\n }\r\n this.promise = null;\r\n this.list.innerHTML = '';\r\n this.query = value;\r\n console.log('selectPeers input:', this.query);\r\n this.getMoreResults();\r\n }\r\n });\r\n this.scrollable.onScrolledBottom = () => {\r\n this.getMoreResults();\r\n };\r\n this.container.append(topContainer, delimiter, this.chatsContainer);\r\n appendTo.append(this.container);\r\n let getResultsPromise = this.getMoreResults();\r\n if (onFirstRender) {\r\n getResultsPromise.then(() => {\r\n onFirstRender();\r\n });\r\n }\r\n }\r\n getMoreDialogs() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.promise)\r\n return this.promise;\r\n // в десктопе - сначала без группы, потом архивные, потом контакты без сообщений\r\n const pageCount = appPhotosManager_1.default.windowH / 72 * 1.25 | 0;\r\n this.promise = appMessagesManager_1.default.getConversations(this.query, this.offsetIndex, pageCount, 0);\r\n const value = yield this.promise;\r\n let dialogs = value.dialogs;\r\n if (!dialogs.length) {\r\n return;\r\n }\r\n const newOffsetIndex = dialogs[dialogs.length - 1].index || 0;\r\n dialogs = dialogs.filter(d => d.peerID != this.myID);\r\n if (!this.offsetIndex) {\r\n dialogs.unshift({\r\n peerID: this.myID,\r\n pFlags: {}\r\n });\r\n }\r\n this.offsetIndex = newOffsetIndex;\r\n this.renderResults(dialogs.map(dialog => dialog.peerID));\r\n this.promise = null;\r\n });\r\n }\r\n getMoreContacts() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.promise)\r\n return this.promise;\r\n if (!this.cachedContacts) {\r\n this.promise = appUsersManager_1.default.getContacts(this.query);\r\n this.cachedContacts = (yield this.promise).slice();\r\n this.cachedContacts.findAndSplice(userID => userID == this.myID); // no my account\r\n this.promise = null;\r\n }\r\n if (this.cachedContacts.length) {\r\n const pageCount = appPhotosManager_1.default.windowH / 72 * 1.25 | 0;\r\n const arr = this.cachedContacts.splice(0, pageCount);\r\n this.renderResults(arr);\r\n }\r\n });\r\n }\r\n getMoreResults() {\r\n if (this.peerType == 'dialogs') {\r\n return this.getMoreDialogs();\r\n }\r\n else {\r\n return this.getMoreContacts();\r\n }\r\n }\r\n renderResults(peerIDs) {\r\n console.log('will renderResults:', peerIDs);\r\n peerIDs.forEach(peerID => {\r\n const { dom } = appDialogsManager_1.default.addDialog(peerID, this.scrollable, false, false);\r\n dom.containerEl.insertAdjacentHTML('afterbegin', '<div class=\"checkbox\"><label><input type=\"checkbox\"><span></span></label></div>');\r\n let subtitle = '';\r\n if (peerID < 0) {\r\n subtitle = appChatsManager_1.default.getChatMembersString(-peerID);\r\n }\r\n else if (peerID == this.myID) {\r\n subtitle = 'chat with yourself';\r\n }\r\n else {\r\n subtitle = appUsersManager_1.default.getUserStatusString(peerID);\r\n if (subtitle == 'online') {\r\n subtitle = `<i>${subtitle}</i>`;\r\n }\r\n }\r\n dom.lastMessageSpan.innerHTML = subtitle;\r\n });\r\n }\r\n add(peerID) {\r\n const div = document.createElement('div');\r\n div.classList.add('selector-user', 'scale-in');\r\n div.dataset.peerID = '' + peerID;\r\n this.selected[peerID] = div;\r\n const title = services_1.appPeersManager.getPeerTitle(peerID, false, true);\r\n const avatarEl = document.createElement('avatar-element');\r\n avatarEl.classList.add('selector-user-avatar', 'tgico');\r\n avatarEl.setAttribute('dialog', '1');\r\n avatarEl.setAttribute('peer', '' + peerID);\r\n div.innerHTML = title;\r\n div.insertAdjacentElement('afterbegin', avatarEl);\r\n this.selectedContainer.insertBefore(div, this.input);\r\n this.selectedScrollable.scrollTop = this.selectedScrollable.scrollHeight;\r\n this.onChange && this.onChange(Object.keys(this.selected).length);\r\n }\r\n remove(peerID) {\r\n const div = this.selected[peerID];\r\n div.classList.remove('scale-in');\r\n void div.offsetWidth;\r\n div.classList.add('scale-out');\r\n div.addEventListener('animationend', () => {\r\n delete this.selected[peerID];\r\n div.remove();\r\n this.onChange && this.onChange(Object.keys(this.selected).length);\r\n }, { once: true });\r\n }\r\n getSelected() {\r\n return Object.keys(this.selected).map(p => +p);\r\n }\r\n}\r\nexports.AppSelectPeers = AppSelectPeers;\r\n"
},
{
"id": 46,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"name": "./src/lib/appManagers/appSidebarLeft.ts",
"index": 60,
"index2": 52,
"size": 29229,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./appSidebarLeft",
"loc": "21:41-68"
},
{
"moduleId": 36,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\services.ts",
"module": "./src/lib/services.ts",
"moduleName": "./src/lib/services.ts",
"type": "cjs require",
"userRequest": "./appManagers/appSidebarLeft",
"loc": "21:41-80"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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//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\nconst misc_1 = require(\"../../components/misc\");\r\nconst appUsersManager_1 = __importDefault(require(\"./appUsersManager\"));\r\nconst scrollable_new_1 = __importDefault(require(\"../../components/scrollable_new\"));\r\nconst appPhotosManager_1 = __importDefault(require(\"./appPhotosManager\"));\r\nconst services_1 = require(\"../services\");\r\nconst popupAvatar_1 = __importDefault(require(\"../../components/popupAvatar\"));\r\nconst appChatsManager_1 = __importDefault(require(\"./appChatsManager\"));\r\nconst appSelectPeers_1 = require(\"../../components/appSelectPeers\");\r\nconst avatar_1 = __importDefault(require(\"../../components/avatar\"));\r\nconst appProfileManager_1 = __importDefault(require(\"./appProfileManager\"));\r\navatar_1.default;\r\nconst SLIDERITEMSIDS = {\r\n archived: 1,\r\n contacts: 2,\r\n newChannel: 3,\r\n addMembers: 4,\r\n newGroup: 5,\r\n settings: 6,\r\n editProfile: 7,\r\n};\r\nclass AppAddMembersTab {\r\n constructor() {\r\n this.container = document.querySelector('.addmembers-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.backBtn = this.container.querySelector('.sidebar-close-button');\r\n this.nextBtn = this.contentDiv.querySelector('.btn-corner');\r\n this.nextBtn.addEventListener('click', () => {\r\n let peerIDs = this.selector.getSelected();\r\n if (peerIDs.length) {\r\n if (this.takeOut) {\r\n this.takeOut(peerIDs);\r\n return;\r\n }\r\n this.nextBtn.classList.remove('tgico-next');\r\n this.nextBtn.disabled = true;\r\n misc_1.putPreloader(this.nextBtn);\r\n this.selector.freezed = true;\r\n appChatsManager_1.default.inviteToChannel(this.peerID, peerIDs).then(() => {\r\n this.backBtn.click();\r\n });\r\n }\r\n });\r\n }\r\n onCloseAfterTimeout() {\r\n if (this.selector) {\r\n this.selector.container.remove();\r\n this.selector = null;\r\n }\r\n }\r\n init(id, type, skipable, takeOut) {\r\n this.peerID = Math.abs(id);\r\n this.peerType = type;\r\n this.takeOut = takeOut;\r\n this.onCloseAfterTimeout();\r\n this.selector = new appSelectPeers_1.AppSelectPeers(this.contentDiv, skipable ? null : (length) => {\r\n if (length) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n }, 'contacts');\r\n this.nextBtn.innerHTML = '';\r\n this.nextBtn.disabled = false;\r\n this.nextBtn.classList.add('tgico-next');\r\n if (skipable) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n appSidebarLeft.selectTab(SLIDERITEMSIDS.addMembers);\r\n }\r\n}\r\nclass AppNewChannelTab {\r\n constructor() {\r\n this.container = document.querySelector('.new-channel-container');\r\n this.canvas = this.container.querySelector('.avatar-edit-canvas');\r\n this.channelNameInput = this.container.querySelector('.new-channel-name');\r\n this.channelDescriptionInput = this.container.querySelector('.new-channel-description');\r\n this.nextBtn = this.container.querySelector('.btn-corner');\r\n this.backBtn = this.container.querySelector('.sidebar-close-button');\r\n this.uploadAvatar = null;\r\n this.container.querySelector('.avatar-edit').addEventListener('click', () => {\r\n popupAvatar_1.default.open(this.canvas, (_upload) => {\r\n this.uploadAvatar = _upload;\r\n });\r\n });\r\n this.channelNameInput.addEventListener('input', () => {\r\n let value = this.channelNameInput.value;\r\n if (value.length) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n });\r\n this.nextBtn.addEventListener('click', () => {\r\n let title = this.channelNameInput.value;\r\n let about = this.channelDescriptionInput.value;\r\n this.nextBtn.disabled = true;\r\n appChatsManager_1.default.createChannel(title, about).then((channelID) => {\r\n if (this.uploadAvatar) {\r\n this.uploadAvatar().then((inputFile) => {\r\n appChatsManager_1.default.editPhoto(channelID, inputFile);\r\n });\r\n }\r\n appSidebarLeft.removeTabFromHistory(SLIDERITEMSIDS.newChannel);\r\n appSidebarLeft.addMembersTab.init(channelID, 'channel', true);\r\n });\r\n });\r\n }\r\n onCloseAfterTimeout() {\r\n let ctx = this.canvas.getContext('2d');\r\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\r\n this.uploadAvatar = null;\r\n this.channelNameInput.value = '';\r\n this.channelDescriptionInput.value = '';\r\n this.nextBtn.disabled = false;\r\n }\r\n}\r\nclass AppNewGroupTab {\r\n constructor() {\r\n this.container = document.querySelector('.new-group-container');\r\n this.contentDiv = this.container.querySelector('.sidebar-content');\r\n this.canvas = this.container.querySelector('.avatar-edit-canvas');\r\n this.groupNameInput = this.container.querySelector('.new-group-name');\r\n this.nextBtn = this.container.querySelector('.btn-corner');\r\n this.searchGroup = new appSearch_1.SearchGroup('', 'contacts', true, 'new-group-members disable-hover', false);\r\n this.uploadAvatar = null;\r\n this.container.querySelector('.avatar-edit').addEventListener('click', () => {\r\n popupAvatar_1.default.open(this.canvas, (_upload) => {\r\n this.uploadAvatar = _upload;\r\n });\r\n });\r\n this.groupNameInput.addEventListener('input', () => {\r\n let value = this.groupNameInput.value;\r\n if (value.length) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n });\r\n this.nextBtn.addEventListener('click', () => {\r\n let title = this.groupNameInput.value;\r\n this.nextBtn.disabled = true;\r\n appChatsManager_1.default.createChat(title, this.userIDs).then((chatID) => {\r\n if (this.uploadAvatar) {\r\n this.uploadAvatar().then((inputFile) => {\r\n appChatsManager_1.default.editPhoto(chatID, inputFile);\r\n });\r\n }\r\n appSidebarLeft.selectTab(0);\r\n });\r\n });\r\n let chatsContainer = document.createElement('div');\r\n chatsContainer.classList.add('chats-container');\r\n chatsContainer.append(this.searchGroup.container);\r\n let scrollable = new scrollable_new_1.default(chatsContainer);\r\n this.contentDiv.append(chatsContainer);\r\n }\r\n onClose() {\r\n }\r\n onCloseAfterTimeout() {\r\n this.searchGroup.clear();\r\n let ctx = this.canvas.getContext('2d');\r\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\r\n this.uploadAvatar = null;\r\n this.groupNameInput.value = '';\r\n this.nextBtn.disabled = false;\r\n }\r\n init(userIDs) {\r\n this.userIDs = userIDs;\r\n appSidebarLeft.selectTab(SLIDERITEMSIDS.newGroup);\r\n this.userIDs.forEach(userID => {\r\n let { dom } = appDialogsManager_1.default.addDialog(userID, this.searchGroup.list, false, false);\r\n let subtitle = '';\r\n subtitle = appUsersManager_1.default.getUserStatusString(userID);\r\n if (subtitle == 'online') {\r\n subtitle = `<i>${subtitle}</i>`;\r\n }\r\n if (subtitle) {\r\n dom.lastMessageSpan.innerHTML = subtitle;\r\n }\r\n });\r\n this.searchGroup.nameEl.innerText = this.userIDs.length + ' members';\r\n this.searchGroup.setActive();\r\n }\r\n}\r\nclass AppContactsTab {\r\n constructor() {\r\n this.container = document.getElementById('contacts-container');\r\n this.list = this.container.querySelector('#contacts');\r\n this.input = this.container.querySelector('#contacts-search');\r\n appDialogsManager_1.default.setListClickListener(this.list);\r\n this.scrollable = new scrollable_new_1.default(this.list.parentElement);\r\n let prevValue = '';\r\n this.input.addEventListener('input', () => {\r\n let value = this.input.value;\r\n if (prevValue != value) {\r\n this.list.innerHTML = '';\r\n this.openContacts(prevValue = value);\r\n }\r\n });\r\n // preload contacts\r\n appUsersManager_1.default.getContacts();\r\n }\r\n // need to clear, and left 1 page for smooth slide\r\n onClose() {\r\n let pageCount = appPhotosManager_1.default.windowH / 72 * 1.25 | 0;\r\n Array.from(this.list.children).slice(pageCount).forEach(el => el.remove());\r\n }\r\n onCloseAfterTimeout() {\r\n this.list.innerHTML = '';\r\n this.input.value = '';\r\n }\r\n openContacts(query) {\r\n if (appSidebarLeft.historyTabIDs.indexOf(SLIDERITEMSIDS.contacts) === -1) {\r\n appSidebarLeft.selectTab(SLIDERITEMSIDS.contacts);\r\n }\r\n if (this.promise)\r\n return this.promise;\r\n this.scrollable.onScrolledBottom = null;\r\n this.promise = appUsersManager_1.default.getContacts(query).then(contacts => {\r\n this.promise = null;\r\n if (appSidebarLeft.historyTabIDs[appSidebarLeft.historyTabIDs.length - 1] != SLIDERITEMSIDS.contacts) {\r\n console.warn('user closed contacts before it\\'s loaded');\r\n return;\r\n }\r\n contacts = contacts.slice();\r\n contacts.findAndSplice(u => u == utils_1.$rootScope.myID);\r\n let sorted = contacts\r\n .map(userID => {\r\n let user = appUsersManager_1.default.getUser(userID);\r\n let status = appUsersManager_1.default.getUserStatusForSort(user.status);\r\n return { user, status };\r\n })\r\n .sort((a, b) => b.status - a.status);\r\n let renderPage = () => {\r\n let pageCount = appPhotosManager_1.default.windowH / 72 * 1.25 | 0;\r\n let arr = sorted.splice(0, pageCount); // надо splice!\r\n arr.forEach(({ user }) => {\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(user.id, this.list, false);\r\n let status = appUsersManager_1.default.getUserStatusString(user.id);\r\n dom.lastMessageSpan.innerHTML = status == 'online' ? `<i>${status}</i>` : status;\r\n });\r\n if (!sorted.length)\r\n renderPage = undefined;\r\n };\r\n renderPage();\r\n this.scrollable.onScrolledBottom = () => {\r\n if (renderPage) {\r\n renderPage();\r\n }\r\n else {\r\n this.scrollable.onScrolledBottom = null;\r\n }\r\n };\r\n });\r\n }\r\n}\r\nclass AppSettingsTab {\r\n constructor() {\r\n this.container = document.querySelector('.settings-container');\r\n this.avatarElem = this.container.querySelector('.profile-avatar');\r\n this.nameDiv = this.container.querySelector('.profile-name');\r\n this.phoneDiv = this.container.querySelector('.profile-subtitle');\r\n this.logOutBtn = this.container.querySelector('.menu-logout');\r\n this.buttons = {};\r\n misc_1.parseMenuButtonsTo(this.buttons, this.container.querySelector('.profile-buttons').children);\r\n utils_1.$rootScope.$on('user_auth', (e) => {\r\n this.fillElements();\r\n });\r\n this.logOutBtn.addEventListener('click', (e) => {\r\n mtprotoworker_1.default.logOut();\r\n });\r\n this.buttons.edit.addEventListener('click', () => {\r\n appSidebarLeft.selectTab(SLIDERITEMSIDS.editProfile);\r\n appSidebarLeft.editProfileTab.fillElements();\r\n });\r\n }\r\n fillElements() {\r\n let user = appUsersManager_1.default.getSelf();\r\n this.avatarElem.setAttribute('peer', '' + user.id);\r\n this.nameDiv.innerHTML = user.rFullName || '';\r\n this.phoneDiv.innerHTML = user.rPhone || '';\r\n }\r\n onClose() {\r\n }\r\n}\r\nclass AppEditProfileTab {\r\n constructor() {\r\n this.container = document.querySelector('.edit-profile-container');\r\n this.scrollWrapper = this.container.querySelector('.scroll-wrapper');\r\n this.nextBtn = this.container.querySelector('.btn-corner');\r\n this.canvas = this.container.querySelector('.avatar-edit-canvas');\r\n this.uploadAvatar = null;\r\n this.firstNameInput = this.container.querySelector('.firstname');\r\n this.lastNameInput = this.container.querySelector('.lastname');\r\n this.bioInput = this.container.querySelector('.bio');\r\n this.userNameInput = this.container.querySelector('.username');\r\n this.avatarElem = document.createElement('avatar-element');\r\n this.profileUrlContainer = this.container.querySelector('.profile-url-container');\r\n this.profileUrlAnchor = this.profileUrlContainer.lastElementChild;\r\n this.originalValues = {\r\n firstName: '',\r\n lastName: '',\r\n userName: '',\r\n bio: ''\r\n };\r\n this.container.querySelector('.avatar-edit').addEventListener('click', () => {\r\n popupAvatar_1.default.open(this.canvas, (_upload) => {\r\n this.uploadAvatar = _upload;\r\n this.handleChange();\r\n this.avatarElem.remove();\r\n });\r\n });\r\n this.avatarElem.classList.add('avatar-placeholder');\r\n let userNameLabel = this.userNameInput.nextElementSibling;\r\n this.firstNameInput.addEventListener('input', () => this.handleChange());\r\n this.lastNameInput.addEventListener('input', () => this.handleChange());\r\n this.bioInput.addEventListener('input', () => this.handleChange());\r\n this.userNameInput.addEventListener('input', () => {\r\n let value = this.userNameInput.value;\r\n console.log('userNameInput:', value);\r\n if (value == this.originalValues.userName || !value.length) {\r\n this.userNameInput.classList.remove('valid', 'error');\r\n userNameLabel.innerText = 'Username (optional)';\r\n this.setProfileUrl();\r\n this.handleChange();\r\n return;\r\n }\r\n else if (!this.isUsernameValid(value)) { // does not check the last underscore\r\n this.userNameInput.classList.add('error');\r\n this.userNameInput.classList.remove('valid');\r\n userNameLabel.innerText = 'Username is invalid';\r\n }\r\n else {\r\n this.userNameInput.classList.remove('valid', 'error');\r\n }\r\n if (this.userNameInput.classList.contains('error')) {\r\n this.setProfileUrl();\r\n this.handleChange();\r\n return;\r\n }\r\n mtprotoworker_1.default.invokeApi('account.checkUsername', {\r\n username: value\r\n }).then(available => {\r\n if (this.userNameInput.value != value)\r\n return;\r\n if (available) {\r\n this.userNameInput.classList.add('valid');\r\n this.userNameInput.classList.remove('error');\r\n userNameLabel.innerText = 'Username is available';\r\n }\r\n else {\r\n this.userNameInput.classList.add('error');\r\n this.userNameInput.classList.remove('valid');\r\n userNameLabel.innerText = 'Username is already taken';\r\n }\r\n }, (err) => {\r\n if (this.userNameInput.value != value)\r\n return;\r\n switch (err.type) {\r\n case 'USERNAME_INVALID': {\r\n this.userNameInput.classList.add('error');\r\n this.userNameInput.classList.remove('valid');\r\n userNameLabel.innerText = 'Username is invalid';\r\n break;\r\n }\r\n }\r\n }).then(() => {\r\n this.handleChange();\r\n this.setProfileUrl();\r\n });\r\n });\r\n this.nextBtn.addEventListener('click', () => {\r\n this.nextBtn.disabled = true;\r\n let promises = [];\r\n promises.push(appProfileManager_1.default.updateProfile(this.firstNameInput.value, this.lastNameInput.value, this.bioInput.value).then(() => {\r\n appSidebarLeft.selectTab(0);\r\n }, (err) => {\r\n console.error('updateProfile error:', err);\r\n }));\r\n if (this.uploadAvatar) {\r\n promises.push(this.uploadAvatar().then(inputFile => {\r\n appProfileManager_1.default.uploadProfilePhoto(inputFile);\r\n }));\r\n }\r\n if (this.userNameInput.value != this.originalValues.userName && this.userNameInput.classList.contains('valid')) {\r\n promises.push(appProfileManager_1.default.updateUsername(this.userNameInput.value));\r\n }\r\n Promise.race(promises).then(() => {\r\n this.nextBtn.disabled = false;\r\n }, () => {\r\n this.nextBtn.disabled = false;\r\n });\r\n });\r\n let scrollable = new scrollable_new_1.default(this.scrollWrapper, 'y');\r\n }\r\n fillElements() {\r\n var _a, _b, _c;\r\n let user = appUsersManager_1.default.getSelf();\r\n this.firstNameInput.value = this.originalValues.firstName = (_a = user.first_name) !== null && _a !== void 0 ? _a : '';\r\n this.lastNameInput.value = this.originalValues.lastName = (_b = user.last_name) !== null && _b !== void 0 ? _b : '';\r\n this.userNameInput.value = this.originalValues.userName = (_c = user.username) !== null && _c !== void 0 ? _c : '';\r\n this.userNameInput.classList.remove('valid', 'error');\r\n this.userNameInput.nextElementSibling.innerHTML = 'Username (optional)';\r\n appProfileManager_1.default.getProfile(user.id).then(userFull => {\r\n if (userFull.rAbout) {\r\n this.bioInput.value = this.originalValues.bio = userFull.rAbout;\r\n }\r\n });\r\n this.avatarElem.setAttribute('peer', '' + utils_1.$rootScope.myID);\r\n if (!this.avatarElem.parentElement) {\r\n this.canvas.parentElement.append(this.avatarElem);\r\n }\r\n this.uploadAvatar = null;\r\n this.setProfileUrl();\r\n }\r\n isUsernameValid(username) {\r\n return ((username.length >= 5 && username.length <= 32) || !username.length) && /^[a-zA-Z0-9_]*$/.test(username);\r\n }\r\n isChanged() {\r\n return !!this.uploadAvatar\r\n || this.firstNameInput.value != this.originalValues.firstName\r\n || this.lastNameInput.value != this.originalValues.lastName\r\n || (this.userNameInput.value != this.originalValues.userName && !this.userNameInput.classList.contains('error'))\r\n || this.bioInput.value != this.originalValues.bio;\r\n }\r\n setProfileUrl() {\r\n if (this.userNameInput.classList.contains('error') || !this.userNameInput.value.length) {\r\n this.profileUrlContainer.style.display = 'none';\r\n }\r\n else {\r\n this.profileUrlContainer.style.display = '';\r\n let url = 'https://t.me/' + this.userNameInput.value;\r\n this.profileUrlAnchor.innerText = url;\r\n this.profileUrlAnchor.href = url;\r\n }\r\n }\r\n handleChange() {\r\n if (this.isChanged()) {\r\n this.nextBtn.classList.add('is-visible');\r\n }\r\n else {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n }\r\n onCloseAfterTimeout() {\r\n this.nextBtn.classList.remove('is-visible');\r\n }\r\n}\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.buttons = {};\r\n this.newBtnMenu = this.sidebarEl.querySelector('#new-menu');\r\n this.newButtons = {};\r\n this.newChannelTab = new AppNewChannelTab();\r\n this.addMembersTab = new AppAddMembersTab();\r\n this.contactsTab = new AppContactsTab();\r\n this.newGroupTab = new AppNewGroupTab();\r\n this.settingsTab = new AppSettingsTab();\r\n this.editProfileTab = new AppEditProfileTab();\r\n this.tabs = {\r\n [SLIDERITEMSIDS.newChannel]: this.newChannelTab,\r\n [SLIDERITEMSIDS.contacts]: this.contactsTab,\r\n [SLIDERITEMSIDS.addMembers]: this.addMembersTab,\r\n [SLIDERITEMSIDS.newGroup]: this.newGroupTab,\r\n [SLIDERITEMSIDS.settings]: this.settingsTab,\r\n [SLIDERITEMSIDS.editProfile]: this.editProfileTab,\r\n };\r\n //private log = logger('SL');\r\n this.searchGroups = {\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 people: new appSearch_1.SearchGroup('People', 'contacts', false, 'search-group-people'),\r\n recent: new appSearch_1.SearchGroup('Recent', 'contacts', false, 'search-group-recent')\r\n };\r\n this.globalSearch = new appSearch_1.default(this.searchContainer, this.searchInput, this.searchGroups);\r\n this.historyTabIDs = [];\r\n let peopleContainer = document.createElement('div');\r\n peopleContainer.classList.add('search-group-scrollable');\r\n peopleContainer.append(this.searchGroups.people.list);\r\n this.searchGroups.people.container.append(peopleContainer);\r\n let peopleScrollable = new scrollable_new_1.default(peopleContainer, 'x');\r\n misc_1.parseMenuButtonsTo(this.buttons, this.menuEl.children);\r\n misc_1.parseMenuButtonsTo(this.newButtons, this.newBtnMenu.firstElementChild.children);\r\n this.archivedCount = this.buttons.archived.querySelector('.archived-count');\r\n this.buttons.saved.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.buttons.archived.addEventListener('click', (e) => {\r\n this.selectTab(SLIDERITEMSIDS.archived);\r\n });\r\n this.buttons.contacts.addEventListener('click', (e) => {\r\n this.contactsTab.openContacts();\r\n });\r\n this.buttons.settings.addEventListener('click', () => {\r\n this.settingsTab.fillElements();\r\n this.selectTab(SLIDERITEMSIDS.settings);\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.remove('hide');\r\n void this.searchContainer.offsetWidth; // reflow\r\n this.searchContainer.classList.add('active');\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.backBtn.click();\r\n }\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 setTimeout(() => {\r\n this.searchContainer.classList.add('hide');\r\n this.globalSearch.reset();\r\n this.searchGroups.people.setActive();\r\n //this.searchGroups.recent.setActive();\r\n }, 150);\r\n });\r\n this.newButtons.channel.addEventListener('click', (e) => {\r\n this.selectTab(SLIDERITEMSIDS.newChannel);\r\n });\r\n [this.newButtons.group, this.buttons.newGroup].forEach(btn => {\r\n btn.addEventListener('click', (e) => {\r\n this.addMembersTab.init(0, 'chat', false, (peerIDs) => {\r\n this.newGroupTab.init(peerIDs);\r\n });\r\n });\r\n });\r\n utils_1.$rootScope.$on('dialogs_archived_unread', (e) => {\r\n this.archivedCount.innerText = '' + e.detail.count;\r\n });\r\n this._selectTab = misc_1.horizontalMenu(null, this.sidebarEl.querySelector('.sidebar-slider'), null, null, 420);\r\n this._selectTab(0);\r\n let onCloseBtnClick = () => {\r\n console.log('sidebar-close-button click:', this.historyTabIDs);\r\n let closingID = this.historyTabIDs.pop(); // pop current\r\n this.onCloseTab(closingID);\r\n this._selectTab(this.historyTabIDs[this.historyTabIDs.length - 1] || 0);\r\n };\r\n Array.from(this.sidebarEl.querySelectorAll('.sidebar-close-button')).forEach(el => {\r\n el.addEventListener('click', onCloseBtnClick);\r\n });\r\n appUsersManager_1.default.getTopPeers().then(categories => {\r\n console.log('got top categories:', categories);\r\n let category = categories[0];\r\n if (!category || !category.peers) {\r\n return;\r\n }\r\n category.peers.forEach((topPeer) => {\r\n let peerID = services_1.appPeersManager.getPeerID(topPeer.peer);\r\n let { dialog, dom } = appDialogsManager_1.default.addDialog(peerID, this.searchGroups.people.list, false, true, true);\r\n this.searchGroups.people.setActive();\r\n });\r\n });\r\n }\r\n selectTab(id) {\r\n this.historyTabIDs.push(id);\r\n this._selectTab(id);\r\n }\r\n removeTabFromHistory(id) {\r\n this.historyTabIDs.findAndSplice(i => i == id);\r\n this.onCloseTab(id);\r\n }\r\n onCloseTab(id) {\r\n let tab = this.tabs[id];\r\n if (tab) {\r\n if ('onClose' in tab) {\r\n tab.onClose();\r\n }\r\n if ('onCloseAfterTimeout' in tab) {\r\n setTimeout(() => {\r\n tab.onCloseAfterTimeout();\r\n }, 420);\r\n }\r\n }\r\n }\r\n}\r\nconst appSidebarLeft = new AppSidebarLeft();\r\nwindow.appSidebarLeft = appSidebarLeft;\r\nexports.default = appSidebarLeft;\r\n"
},
{
"id": 47,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\appSearch.ts",
"name": "./src/components/appSearch.ts",
"index": 61,
"index2": 49,
"size": 9113,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"issuerId": 33,
"issuerName": "./src/lib/appManagers/appSidebarRight.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 33,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"name": "./src/lib/appManagers/appSidebarRight.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 728,
"building": 180,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 33,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarRight.ts",
"module": "./src/lib/appManagers/appSidebarRight.ts",
"moduleName": "./src/lib/appManagers/appSidebarRight.ts",
"type": "cjs require",
"userRequest": "../../components/appSearch",
"loc": "49:33-70"
},
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/appSearch",
"loc": "31:33-70"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.SearchGroup = void 0;\r\nconst appDialogsManager_1 = __importDefault(require(\"../lib/appManagers/appDialogsManager\"));\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\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\nconst appChatsManager_1 = __importDefault(require(\"../lib/appManagers/appChatsManager\"));\r\nclass SearchGroup {\r\n constructor(name, type, clearable = true, className, clickable = true) {\r\n this.name = name;\r\n this.type = type;\r\n this.clearable = clearable;\r\n this.list = document.createElement('ul');\r\n this.container = document.createElement('div');\r\n if (className)\r\n this.container.className = className;\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', 'search-group-' + type);\r\n this.container.append(this.nameEl, this.list);\r\n this.container.style.display = 'none';\r\n if (clickable) {\r\n appDialogsManager_1.default.setListClickListener(this.list);\r\n }\r\n }\r\n clear() {\r\n this.container.style.display = 'none';\r\n if (this.clearable) {\r\n this.list.innerHTML = '';\r\n }\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_new_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, '<i>$1</i>');\r\n dom.lastMessageSpan.innerText = appChatsManager_1.default.getChatMembersString(-peerID);\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 = '<i>' + username + '</i>';\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": 48,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"name": "./src/components/popupAvatar.ts",
"index": 62,
"index2": 51,
"size": 3360,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"issuerId": 58,
"issuerName": "./src/pages/pageSignUp.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
},
{
"id": 58,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"name": "./src/pages/pageSignUp.ts",
"profile": {
"factory": 1040,
"building": 297,
"dependencies": 1
}
}
],
"profile": {
"factory": 1596,
"building": 115,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 46,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appSidebarLeft.ts",
"module": "./src/lib/appManagers/appSidebarLeft.ts",
"moduleName": "./src/lib/appManagers/appSidebarLeft.ts",
"type": "cjs require",
"userRequest": "../../components/popupAvatar",
"loc": "37:38-77"
},
{
"moduleId": 58,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"module": "./src/pages/pageSignUp.ts",
"moduleName": "./src/pages/pageSignUp.ts",
"type": "cjs require",
"userRequest": "../components/popupAvatar",
"loc": "11:38-74"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.PopupAvatar = void 0;\r\nconst cropper_1 = __importDefault(require(\"../lib/cropper\"));\r\nconst apiFileManager_1 = __importDefault(require(\"../lib/mtproto/apiFileManager\"));\r\nclass PopupAvatar {\r\n constructor() {\r\n this.container = document.getElementById('popup-avatar');\r\n this.input = this.container.querySelector('input');\r\n this.cropContainer = this.container.querySelector('.crop');\r\n this.closeBtn = this.container.querySelector('.popup-close');\r\n this.image = new Image();\r\n this.cropper = {\r\n crop: () => { },\r\n removeHandlers: () => { }\r\n };\r\n this.container.style.display = ''; // need for no blink\r\n this.cropContainer.append(this.image);\r\n this.input.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 this.image = new Image();\r\n this.cropContainer.append(this.image);\r\n this.image.src = contents;\r\n this.image.onload = () => {\r\n /* let {w, h} = calcImageInBox(this.image.naturalWidth, this.image.naturalHeight, 460, 554);\r\n cropContainer.style.width = w + 'px';\r\n cropContainer.style.height = h + 'px'; */\r\n this.container.classList.remove('hide');\r\n void this.container.offsetWidth; // reflow\r\n this.container.classList.add('active');\r\n this.cropper = cropper_1.default(this.image, this.canvas);\r\n this.input.value = '';\r\n };\r\n };\r\n reader.readAsDataURL(file);\r\n }, false);\r\n // apply\r\n this.container.querySelector('.btn-crop').addEventListener('click', () => {\r\n this.cropper.crop();\r\n this.closeBtn.click();\r\n this.canvas.toBlob(blob => {\r\n this.blob = blob; // save blob to send after reg\r\n this.darkenCanvas();\r\n this.resolve();\r\n }, 'image/jpeg', 1);\r\n });\r\n this.closeBtn.addEventListener('click', () => {\r\n setTimeout(() => {\r\n this.cropper.removeHandlers();\r\n if (this.image) {\r\n this.image.remove();\r\n }\r\n this.container.classList.add('hide');\r\n }, 200);\r\n });\r\n }\r\n resolve() {\r\n this.onCrop(() => {\r\n return apiFileManager_1.default.uploadFile(this.blob);\r\n });\r\n }\r\n open(postCanvas, onCrop) {\r\n this.canvas = postCanvas;\r\n this.onCrop = onCrop;\r\n this.input.click();\r\n }\r\n darkenCanvas() {\r\n let ctx = this.canvas.getContext('2d');\r\n ctx.fillStyle = \"rgba(0, 0, 0, 0.3)\";\r\n ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);\r\n }\r\n}\r\nexports.PopupAvatar = PopupAvatar;\r\nexports.default = new PopupAvatar();\r\n"
},
{
"id": 49,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\groupedLayout.ts",
"name": "./src/components/groupedLayout.ts",
"index": 65,
"index2": 57,
"size": 15938,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"issuerId": 31,
"issuerName": "./src/components/wrappers.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 31,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"name": "./src/components/wrappers.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 314,
"building": 338,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "./groupedLayout",
"loc": "46:24-50"
},
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "./groupedLayout",
"loc": "37:24-50"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "\"use strict\";\r\n/*\r\nThis file is part of Telegram Desktop,\r\nthe official desktop application for the Telegram messaging service.\r\nFor license and copyright information please follow this link:\r\nhttps://github.com/telegramdesktop/tdesktop/blob/master/LEGAL\r\n*/\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Layouter = exports.RectPart = void 0;\r\nexports.RectPart = {\r\n None: 0,\r\n Top: 1,\r\n Right: 2,\r\n Bottom: 4,\r\n Left: 8\r\n};\r\nlet accumulate = (arr, initialValue) => arr.reduce((acc, value) => acc + value, initialValue);\r\n// https://github.com/telegramdesktop/tdesktop/blob/74d848311b31ef0eb6d2c43a4d30ade8f1d2d9fb/Telegram/SourceFiles/core/utils.h#L128\r\nfunction snap(v, _min, _max) {\r\n return (v < _min) ? _min : ((v > _max) ? _max : v);\r\n}\r\n// https://github.com/telegramdesktop/tdesktop/blob/4669c07dc5335cbf4795bbbe5b0ab7c007b9aee2/Telegram/SourceFiles/ui/grouped_layout.cpp\r\nclass Layouter {\r\n constructor(sizes, maxWidth, minWidth, spacing, maxHeight = maxWidth) {\r\n this.sizes = sizes;\r\n this.maxWidth = maxWidth;\r\n this.minWidth = minWidth;\r\n this.spacing = spacing;\r\n this.maxHeight = maxHeight;\r\n this.count = sizes.length;\r\n this.ratios = Layouter.countRatios(sizes);\r\n this.proportions = Layouter.countProportions(this.ratios);\r\n this.averageRatio = accumulate(this.ratios, 1) / this.count; // warn\r\n this.maxSizeRatio = maxWidth / this.maxHeight;\r\n }\r\n layout() {\r\n if (!this.count)\r\n return [];\r\n //else if(this.count == 1) return this.layoutOne();\r\n if (this.count >= 5 || this.ratios.find(r => r > 2)) {\r\n return new ComplexLayouter(this.ratios, this.averageRatio, this.maxWidth, this.minWidth, this.spacing).layout();\r\n }\r\n if (this.count == 2)\r\n return this.layoutTwo();\r\n else if (this.count == 3)\r\n return this.layoutThree();\r\n return this.layoutFour();\r\n }\r\n layoutTwo() {\r\n if ((this.proportions == \"ww\")\r\n && (this.averageRatio > 1.4 * this.maxSizeRatio)\r\n && (this.ratios[1] - this.ratios[0] < 0.2)) {\r\n return this.layoutTwoTopBottom();\r\n }\r\n else if (this.proportions == \"ww\" || this.proportions == \"qq\") {\r\n return this.layoutTwoLeftRightEqual();\r\n }\r\n return this.layoutTwoLeftRight();\r\n }\r\n layoutThree() {\r\n console.log('layoutThree:', this);\r\n if (this.proportions[0] == 'n') {\r\n return this.layoutThreeLeftAndOther();\r\n }\r\n return this.layoutThreeTopAndOther();\r\n }\r\n layoutFour() {\r\n if (this.proportions[0] == 'w') {\r\n return this.layoutFourTopAndOther();\r\n }\r\n return this.layoutFourLeftAndOther();\r\n }\r\n layoutTwoTopBottom() {\r\n const width = this.maxWidth;\r\n const height = Math.round(Math.min(width / this.ratios[0], Math.min(width / this.ratios[1], (this.maxHeight - this.spacing) / 2)));\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width, height },\r\n sides: exports.RectPart.Left | exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: 0, y: height + this.spacing, width, height },\r\n sides: exports.RectPart.Left | exports.RectPart.Bottom | exports.RectPart.Right\r\n },\r\n ];\r\n }\r\n layoutTwoLeftRightEqual() {\r\n const width = (this.maxWidth - this.spacing) / 2;\r\n const height = Math.round(Math.min(width / this.ratios[0], Math.min(width / this.ratios[1], this.maxHeight * 1)));\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width, height },\r\n sides: exports.RectPart.Top | exports.RectPart.Left | exports.RectPart.Bottom\r\n },\r\n {\r\n geometry: { x: width + this.spacing, y: 0, width, height },\r\n sides: exports.RectPart.Top | exports.RectPart.Right | exports.RectPart.Bottom\r\n },\r\n ];\r\n }\r\n layoutTwoLeftRight() {\r\n const minimalWidth = Math.round(this.minWidth * 1.5);\r\n const secondWidth = Math.min(Math.round(Math.max(0.4 * (this.maxWidth - this.spacing), (this.maxWidth - this.spacing) / this.ratios[0]\r\n / (1 / this.ratios[0] + 1 / this.ratios[1]))), this.maxWidth - this.spacing - minimalWidth);\r\n const firstWidth = this.maxWidth\r\n - secondWidth\r\n - this.spacing;\r\n const height = Math.min(this.maxHeight, Math.round(Math.min(firstWidth / this.ratios[0], secondWidth / this.ratios[1])));\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: firstWidth, height },\r\n sides: exports.RectPart.Top | exports.RectPart.Left | exports.RectPart.Bottom\r\n },\r\n {\r\n geometry: { x: firstWidth + this.spacing, y: 0, width: secondWidth, height },\r\n sides: exports.RectPart.Top | exports.RectPart.Right | exports.RectPart.Bottom\r\n },\r\n ];\r\n }\r\n layoutThreeLeftAndOther() {\r\n const firstHeight = this.maxHeight;\r\n const thirdHeight = Math.round(Math.min((this.maxHeight - this.spacing) / 2., (this.ratios[1] * (this.maxWidth - this.spacing)\r\n / (this.ratios[2] + this.ratios[1]))));\r\n const secondHeight = firstHeight\r\n - thirdHeight\r\n - this.spacing;\r\n const rightWidth = Math.max(this.minWidth, Math.round(Math.min((this.maxWidth - this.spacing) / 2., Math.min(thirdHeight * this.ratios[2], secondHeight * this.ratios[1]))));\r\n const leftWidth = Math.min(Math.round(firstHeight * this.ratios[0]), this.maxWidth - this.spacing - rightWidth);\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: leftWidth, height: firstHeight },\r\n sides: exports.RectPart.Top | exports.RectPart.Left | exports.RectPart.Bottom\r\n },\r\n {\r\n geometry: { x: leftWidth + this.spacing, y: 0, width: rightWidth, height: secondHeight },\r\n sides: exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: leftWidth + this.spacing, y: secondHeight + this.spacing, width: rightWidth, height: thirdHeight },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Right\r\n },\r\n ];\r\n }\r\n layoutThreeTopAndOther() {\r\n const firstWidth = this.maxWidth;\r\n const firstHeight = Math.round(Math.min(firstWidth / this.ratios[0], (this.maxHeight - this.spacing) * 0.66));\r\n const secondWidth = (this.maxWidth - this.spacing) / 2;\r\n const secondHeight = Math.min(this.maxHeight - firstHeight - this.spacing, Math.round(Math.min(secondWidth / this.ratios[1], secondWidth / this.ratios[2])));\r\n const thirdWidth = firstWidth - secondWidth - this.spacing;\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: firstWidth, height: firstHeight },\r\n sides: exports.RectPart.Left | exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: 0, y: firstHeight + this.spacing, width: secondWidth, height: secondHeight },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Left\r\n },\r\n {\r\n geometry: { x: secondWidth + this.spacing, y: firstHeight + this.spacing, width: thirdWidth, height: secondHeight },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Right\r\n },\r\n ];\r\n }\r\n layoutFourTopAndOther() {\r\n const w = this.maxWidth;\r\n const h0 = Math.round(Math.min(w / this.ratios[0], (this.maxHeight - this.spacing) * 0.66));\r\n const h = Math.round((this.maxWidth - 2 * this.spacing)\r\n / (this.ratios[1] + this.ratios[2] + this.ratios[3]));\r\n const w0 = Math.max(this.minWidth, Math.round(Math.min((this.maxWidth - 2 * this.spacing) * 0.4, h * this.ratios[1])));\r\n const w2 = Math.round(Math.max(Math.max(this.minWidth * 1., (this.maxWidth - 2 * this.spacing) * 0.33), h * this.ratios[3]));\r\n const w1 = w - w0 - w2 - 2 * this.spacing;\r\n const h1 = Math.min(this.maxHeight - h0 - this.spacing, h);\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: w, height: h0 },\r\n sides: exports.RectPart.Left | exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: 0, y: h0 + this.spacing, width: w0, height: h1 },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Left\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing, y: h0 + this.spacing, width: w1, height: h1 },\r\n sides: exports.RectPart.Bottom,\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing + w1 + this.spacing, y: h0 + this.spacing, width: w2, height: h1 },\r\n sides: exports.RectPart.Right | exports.RectPart.Bottom\r\n },\r\n ];\r\n }\r\n layoutFourLeftAndOther() {\r\n const h = this.maxHeight;\r\n const w0 = Math.round(Math.min(h * this.ratios[0], (this.maxWidth - this.spacing) * 0.6));\r\n const w = Math.round((this.maxHeight - 2 * this.spacing)\r\n / (1. / this.ratios[1] + 1. / this.ratios[2] + 1. / this.ratios[3]));\r\n const h0 = Math.round(w / this.ratios[1]);\r\n const h1 = Math.round(w / this.ratios[2]);\r\n const h2 = h - h0 - h1 - 2 * this.spacing;\r\n const w1 = Math.max(this.minWidth, Math.min(this.maxWidth - w0 - this.spacing, w));\r\n return [\r\n {\r\n geometry: { x: 0, y: 0, width: w0, height: h },\r\n sides: exports.RectPart.Top | exports.RectPart.Left | exports.RectPart.Bottom\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing, y: 0, width: w1, height: h0 },\r\n sides: exports.RectPart.Top | exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing, y: h0 + this.spacing, width: w1, height: h1 },\r\n sides: exports.RectPart.Right\r\n },\r\n {\r\n geometry: { x: w0 + this.spacing, y: h0 + h1 + 2 * this.spacing, width: w1, height: h2 },\r\n sides: exports.RectPart.Bottom | exports.RectPart.Right\r\n },\r\n ];\r\n }\r\n static countRatios(sizes) {\r\n return sizes.map(size => size.w / size.h);\r\n }\r\n static countProportions(ratios) {\r\n return ratios.map(ratio => (ratio > 1.2) ? 'w' : (ratio < 0.8) ? 'n' : 'q').join('');\r\n }\r\n}\r\nexports.Layouter = Layouter;\r\nclass ComplexLayouter {\r\n constructor(ratios, averageRatio, maxWidth, minWidth, spacing, maxHeight = maxWidth * 4 / 3) {\r\n this.averageRatio = averageRatio;\r\n this.maxWidth = maxWidth;\r\n this.minWidth = minWidth;\r\n this.spacing = spacing;\r\n this.maxHeight = maxHeight;\r\n this.ratios = ComplexLayouter.cropRatios(ratios, averageRatio);\r\n this.count = ratios.length;\r\n }\r\n static cropRatios(ratios, averageRatio) {\r\n const kMaxRatio = 2.75;\r\n const kMinRatio = 0.6667;\r\n return ratios.map(ratio => {\r\n return averageRatio > 1.1\r\n ? snap(ratio, 1., kMaxRatio)\r\n : snap(ratio, kMinRatio, 1.);\r\n });\r\n }\r\n layout() {\r\n let result = new Array(this.count);\r\n let attempts = [];\r\n const multiHeight = (offset, count) => {\r\n const ratios = this.ratios.slice(offset, offset + count); // warn\r\n const sum = accumulate(ratios, 0);\r\n return (this.maxWidth - (count - 1) * this.spacing) / sum;\r\n };\r\n const pushAttempt = (lineCounts) => {\r\n let heights = [];\r\n let offset = 0;\r\n for (let count of lineCounts) {\r\n heights.push(multiHeight(offset, count));\r\n offset += count;\r\n }\r\n attempts.push({ lineCounts, heights }); // warn\r\n };\r\n for (let first = 1; first != this.count; ++first) {\r\n const second = this.count - first;\r\n if (first > 3 || second > 3) {\r\n continue;\r\n }\r\n pushAttempt([first, second]);\r\n }\r\n for (let first = 1; first != this.count - 1; ++first) {\r\n for (let second = 1; second != this.count - first; ++second) {\r\n const third = this.count - first - second;\r\n if ((first > 3)\r\n || (second > ((this.averageRatio < 0.85) ? 4 : 3))\r\n || (third > 3)) {\r\n continue;\r\n }\r\n pushAttempt([first, second, third]);\r\n }\r\n }\r\n for (let first = 1; first != this.count - 1; ++first) {\r\n for (let second = 1; second != this.count - first; ++second) {\r\n for (let third = 1; third != this.count - first - second; ++third) {\r\n const fourth = this.count - first - second - third;\r\n if (first > 3 || second > 3 || third > 3 || fourth > 3) {\r\n continue;\r\n }\r\n pushAttempt([first, second, third, fourth]);\r\n }\r\n }\r\n }\r\n let optimalAttempt = null;\r\n let optimalDiff = 0;\r\n for (const attempt of attempts) {\r\n const { heights, lineCounts: counts } = attempt;\r\n const lineCount = counts.length;\r\n const totalHeight = accumulate(heights, 0)\r\n + this.spacing * (lineCount - 1);\r\n const minLineHeight = Math.min(...heights);\r\n const maxLineHeight = Math.max(...heights);\r\n const bad1 = (minLineHeight < this.minWidth) ? 1.5 : 1;\r\n const bad2 = (() => {\r\n for (let line = 1; line != lineCount; ++line) {\r\n if (counts[line - 1] > counts[line]) {\r\n return 1.5;\r\n }\r\n }\r\n return 1.;\r\n })();\r\n const diff = Math.abs(totalHeight - this.maxHeight) * bad1 * bad2;\r\n if (!optimalAttempt || diff < optimalDiff) {\r\n optimalAttempt = attempt;\r\n optimalDiff = diff;\r\n }\r\n }\r\n const optimalCounts = optimalAttempt.lineCounts;\r\n const optimalHeights = optimalAttempt.heights;\r\n const rowCount = optimalCounts.length;\r\n let index = 0;\r\n let y = 0;\r\n for (let row = 0; row != rowCount; ++row) {\r\n const colCount = optimalCounts[row];\r\n const lineHeight = optimalHeights[row];\r\n const height = Math.round(lineHeight);\r\n let x = 0;\r\n for (let col = 0; col != colCount; ++col) {\r\n const sides = exports.RectPart.None\r\n | (row == 0 ? exports.RectPart.Top : exports.RectPart.None)\r\n | (row == rowCount - 1 ? exports.RectPart.Bottom : exports.RectPart.None)\r\n | (col == 0 ? exports.RectPart.Left : exports.RectPart.None)\r\n | (col == colCount - 1 ? exports.RectPart.Right : exports.RectPart.None);\r\n const ratio = this.ratios[index];\r\n const width = (col == colCount - 1)\r\n ? (this.maxWidth - x)\r\n : Math.round(ratio * lineHeight);\r\n result[index] = {\r\n geometry: { x, y, width, height },\r\n sides\r\n };\r\n x += width + this.spacing;\r\n ++index;\r\n }\r\n y += height + this.spacing;\r\n }\r\n return result;\r\n }\r\n}\r\n"
},
{
"id": 50,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagePassword.ts",
"name": "./src/pages/pagePassword.ts",
"index": 73,
"index2": 70,
"size": 4506,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"issuerId": 72,
"issuerName": "./src/pages/pageSignQR.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2979,
"building": 103,
"dependencies": 2951
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "./pagePassword",
"loc": "9:39-64"
},
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "./pagePassword",
"loc": "38:39-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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;\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.loadLottieWorkers(),\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.loadAnimationWorker({\r\n container: page.pageEl.querySelector('.auth-image'),\r\n loop: false,\r\n autoplay: false,\r\n animationData: JSON.parse(str),\r\n width: 166,\r\n height: 166\r\n }))\r\n .then(_animation => {\r\n animation = _animation;\r\n animation.addListener('enterFrame', currentFrame => {\r\n //console.log('enterFrame', e, needFrame);\r\n if ((animation.direction == 1 && currentFrame >= needFrame) ||\r\n (animation.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"
},
{
"id": 51,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webpack\\buildin\\global.js",
"name": "(webpack)/buildin/global.js",
"index": 79,
"index2": 76,
"size": 472,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"issuerId": 76,
"issuerName": "./node_modules/timers-browserify/main.js",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"profile": {
"factory": 74,
"building": 621
}
},
{
"id": 76,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"name": "./node_modules/timers-browserify/main.js",
"profile": {
"factory": 1419,
"building": 72
}
}
],
"profile": {
"factory": 1949,
"building": 1141,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 76,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"module": "./node_modules/timers-browserify/main.js",
"moduleName": "./node_modules/timers-browserify/main.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-41"
},
{
"moduleId": 77,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"module": "./node_modules/setimmediate/setImmediate.js",
"moduleName": "./node_modules/setimmediate/setImmediate.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-41"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n"
},
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"index": 0,
"index2": 75,
"size": 6167,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 19,
"building": 1832
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "./src/index.ts",
"loc": "index"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\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\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 // We listen to the resize event (https://css-tricks.com/the-trick-to-viewport-units-on-mobile/)\r\n let setVH = () => {\r\n let vh = window.innerHeight * 0.01;\r\n document.documentElement.style.setProperty('--vh', `${vh}px`);\r\n };\r\n window.addEventListener('resize', setVH);\r\n setVH();\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 if (navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i) != -1) {\r\n document.body.classList.add('is-mac', 'emoji-supported');\r\n }\r\n // @ts-ignore\r\n if (!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch)) {\r\n document.documentElement.classList.add('no-touch');\r\n }\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/pageSignQR')).default.mount();\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 utils = yield Promise.resolve().then(() => __importStar(require('./lib/utils')));\r\n utils.$rootScope.myID = userID;\r\n let findUpClassName = 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 let ripple = (yield Promise.resolve().then(() => __importStar(require('./components/misc')))).ripple;\r\n Array.from(document.getElementsByClassName('rp')).forEach(el => ripple(el));\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": 53,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"name": "./src/materialize.scss",
"index": 1,
"index2": 1,
"size": 39,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./materialize.scss",
"loc": "31:0-29"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "// extracted by mini-css-extract-plugin"
},
{
"id": 54,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"name": "./src/scss/style.scss",
"index": 3,
"index2": 3,
"size": 39,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./scss/style.scss",
"loc": "32:0-28"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "// extracted by mini-css-extract-plugin"
},
{
"id": 55,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"name": "./src/scss/tgico.scss",
"index": 5,
"index2": 5,
"size": 39,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"issuerId": 52,
"issuerName": "./src/index.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
}
],
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 52,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"module": "./src/index.ts",
"moduleName": "./src/index.ts",
"type": "cjs require",
"userRequest": "./scss/tgico.scss",
"loc": "33:0-28"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "// extracted by mini-css-extract-plugin"
},
{
"id": 56,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\smoothscroll.js",
"name": "./src/lib/smoothscroll.js",
"index": 17,
"index2": 14,
"size": 4025,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"issuerId": 9,
"issuerName": "./src/components/scrollable_new.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"name": "./src/components/scrollable_new.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1195,
"building": 1822,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\scrollable_new.ts",
"module": "./src/components/scrollable_new.ts",
"moduleName": "./src/components/scrollable_new.ts",
"type": "cjs require",
"userRequest": "../lib/smoothscroll",
"loc": "7:39-69"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "// credits to https://github.com/iamdustan/smoothscroll\r\n!function(){\"use strict\";function o(){var o=window,t=document;if(!(\"scrollBehavior\"in t.documentElement.style&&!0!==o.__forceSmoothScrollPolyfill__)){var l,e=o.HTMLElement||o.Element,r=468,i={scroll:o.scroll||o.scrollTo,scrollBy:o.scrollBy,elementScroll:e.prototype.scroll||n,scrollIntoView:e.prototype.scrollIntoView},s=o.performance&&o.performance.now?o.performance.now.bind(o.performance):Date.now,c=(l=o.navigator.userAgent,new RegExp([\"MSIE \",\"Trident/\",\"Edge/\"].join(\"|\")).test(l)?1:0);o.scroll=o.scrollTo=function(){void 0!==arguments[0]&&(!0!==f(arguments[0])?h.call(o,t.body,void 0!==arguments[0].left?~~arguments[0].left:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:o.scrollY||o.pageYOffset):i.scroll.call(o,void 0!==arguments[0].left?arguments[0].left:\"object\"!=typeof arguments[0]?arguments[0]:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:o.scrollY||o.pageYOffset))},o.scrollBy=function(){void 0!==arguments[0]&&(f(arguments[0])?i.scrollBy.call(o,void 0!==arguments[0].left?arguments[0].left:\"object\"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(o,t.body,~~arguments[0].left+(o.scrollX||o.pageXOffset),~~arguments[0].top+(o.scrollY||o.pageYOffset)))},e.prototype.scroll=e.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==f(arguments[0])){var o=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===o?this.scrollLeft:~~o,void 0===t?this.scrollTop:~~t)}else{if(\"number\"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError(\"Value could not be converted\");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:\"object\"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},e.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==f(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},e.prototype.scrollIntoView=function(){if(!0!==f(arguments[0])){var l=function(o){for(;o!==t.body&&!1===(e=p(l=o,\"Y\")&&a(l,\"Y\"),r=p(l,\"X\")&&a(l,\"X\"),e||r);)o=o.parentNode||o.host;var l,e,r;return o}(this),e=l.getBoundingClientRect(),r=this.getBoundingClientRect();l!==t.body?(h.call(this,l,l.scrollLeft+r.left-e.left,l.scrollTop+r.top-e.top),\"fixed\"!==o.getComputedStyle(l).position&&o.scrollBy({left:e.left,top:e.top,behavior:\"smooth\"})):o.scrollBy({left:r.left,top:r.top,behavior:\"smooth\"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function n(o,t){this.scrollLeft=o,this.scrollTop=t}function f(o){if(null===o||\"object\"!=typeof o||void 0===o.behavior||\"auto\"===o.behavior||\"instant\"===o.behavior)return!0;if(\"object\"==typeof o&&\"smooth\"===o.behavior)return!1;throw new TypeError(\"behavior member of ScrollOptions \"+o.behavior+\" is not a valid value for enumeration ScrollBehavior.\")}function p(o,t){return\"Y\"===t?o.clientHeight+c<o.scrollHeight:\"X\"===t?o.clientWidth+c<o.scrollWidth:void 0}function a(t,l){var e=o.getComputedStyle(t,null)[\"overflow\"+l];return\"auto\"===e||\"scroll\"===e}function d(t){var l,e,i,c,n=(s()-t.startTime)/r;c=n=n>1?1:n,l=.5*(1-Math.cos(Math.PI*c)),e=t.startX+(t.x-t.startX)*l,i=t.startY+(t.y-t.startY)*l,t.method.call(t.scrollable,e,i),e===t.x&&i===t.y||o.requestAnimationFrame(d.bind(o,t))}function h(l,e,r){var c,f,p,a,h=s();l===t.body?(c=o,f=o.scrollX||o.pageXOffset,p=o.scrollY||o.pageYOffset,a=i.scroll):(c=l,f=l.scrollLeft,p=l.scrollTop,a=n),d({scrollable:c,method:a,startTime:h,startX:f,startY:p,x:e,y:r})}}\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports={polyfill:o}:o()}();"
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"index": 19,
"index2": 71,
"size": 11278,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "./pageAuthCode",
"loc": "11:39-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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;\r\n let idleAnimation;\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 codeInput.focus();\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 cleanup = () => {\r\n setTimeout(() => {\r\n if (animation)\r\n animation.destroy();\r\n if (idleAnimation)\r\n idleAnimation.destroy();\r\n }, 300);\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 cleanup();\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 cleanup();\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 cleanup();\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(Math.min(max, length) * (165 / max) + 11.33);\r\n idleAnimation.canvas.style.display = 'none';\r\n animation.canvas.style.display = '';\r\n }\r\n else {\r\n frame = 0;\r\n }\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 let imageDiv = page.pageEl.querySelector('.auth-image');\r\n return Promise.all([\r\n lottieLoader_1.default.loadLottieWorkers(),\r\n fetch('assets/img/TwoFactorSetupMonkeyIdle.tgs')\r\n .then(res => res.arrayBuffer())\r\n .then(data => mtprotoworker_1.default.gzipUncompress(data, true))\r\n .then(str => lottieLoader_1.default.loadAnimationWorker({\r\n container: imageDiv,\r\n loop: true,\r\n autoplay: true,\r\n animationData: JSON.parse(str),\r\n width: 166,\r\n height: 166\r\n }))\r\n .then(animation => {\r\n idleAnimation = animation;\r\n }),\r\n /* false && */ 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.loadAnimationWorker({\r\n container: imageDiv,\r\n loop: false,\r\n autoplay: false,\r\n animationData: JSON.parse(str),\r\n width: 166,\r\n height: 166\r\n }))\r\n .then(_animation => {\r\n animation = _animation;\r\n if (!codeInput.value.length) {\r\n animation.canvas.style.display = 'none';\r\n }\r\n animation.addListener('enterFrame', currentFrame => {\r\n console.log('enterFrame', currentFrame, needFrame);\r\n //let currentFrame = Math.round(e.currentTime);\r\n if ((animation.direction == 1 && currentFrame >= needFrame) ||\r\n (animation.direction == -1 && currentFrame <= needFrame)) {\r\n animation.setSpeed(1);\r\n animation.pause();\r\n }\r\n if (currentFrame == 0 && needFrame == 0) {\r\n animation.curFrame = 0;\r\n if (idleAnimation) {\r\n animation.canvas.style.display = 'none';\r\n idleAnimation.canvas.style.display = '';\r\n idleAnimation.restart();\r\n }\r\n }\r\n });\r\n //console.log(animation.getDuration(), animation.getDuration(true));\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<br>with the code.';\r\n break;\r\n case 'auth.sentCodeTypeApp':\r\n sentTypeElement.innerHTML = 'We have sent you a message in Telegram<br>with the code.';\r\n break;\r\n case 'auth.sentCodeTypeCall':\r\n sentTypeElement.innerHTML = 'We will call you and voice<br>the code.';\r\n break;\r\n default:\r\n sentTypeElement.innerHTML = `Please check everything<br>for a code (type: ${authCode.type._})`;\r\n break;\r\n }\r\n});\r\nexports.default = page;\r\n"
},
{
"id": 58,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"name": "./src/pages/pageSignUp.ts",
"index": 20,
"index2": 69,
"size": 4295,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"issuerId": 57,
"issuerName": "./src/pages/pageAuthCode.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1040,
"building": 297,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 57,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"module": "./src/pages/pageAuthCode.ts",
"moduleName": "./src/pages/pageAuthCode.ts",
"type": "cjs require",
"userRequest": "./pageSignUp",
"loc": "7:37-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 misc_1 = require(\"../components/misc\");\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 page_1 = __importDefault(require(\"./page\"));\r\nconst popupAvatar_1 = __importDefault(require(\"../components/popupAvatar\"));\r\nconst appProfileManager_1 = __importDefault(require(\"../lib/appManagers/appProfileManager\"));\r\nlet authCode = null;\r\nlet onFirstMount = () => {\r\n const pageElement = page.pageEl;\r\n const avatarPreview = pageElement.querySelector('#canvas-avatar');\r\n let uploadAvatar;\r\n pageElement.querySelector('.auth-image').addEventListener('click', () => {\r\n popupAvatar_1.default.open(avatarPreview, (_uploadAvatar) => {\r\n uploadAvatar = _uploadAvatar;\r\n });\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 (!uploadAvatar) {\r\n console.log('User has not selected avatar');\r\n return resolve();\r\n }\r\n console.log('invoking uploadFile...');\r\n uploadAvatar().then((inputFile) => {\r\n console.log('uploaded smthn', inputFile);\r\n appProfileManager_1.default.uploadProfilePhoto(inputFile).then(resolve, 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": 59,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pagesManager.ts",
"name": "./src/pages/pagesManager.ts",
"index": 23,
"index2": 18,
"size": 1320,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\page.ts",
"issuerId": 18,
"issuerName": "./src/pages/page.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 18,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\page.ts",
"name": "./src/pages/page.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 1027,
"building": 304,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\page.ts",
"module": "./src/pages/page.ts",
"moduleName": "./src/pages/page.ts",
"type": "cjs require",
"userRequest": "./pagesManager",
"loc": "15:39-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 if (this.pageID != -1 && id > 1) {\r\n lottieLoader_1.default.loadLottieWorkers();\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": 60,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_methods.ts",
"name": "./src/lib/crypto/crypto_methods.ts",
"index": 27,
"index2": 20,
"size": 1422,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"issuerId": 1,
"issuerName": "./src/lib/mtproto/mtprotoworker.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"name": "./src/lib/mtproto/mtprotoworker.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2555,
"building": 4645,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"module": "./src/lib/mtproto/mtprotoworker.ts",
"moduleName": "./src/lib/mtproto/mtprotoworker.ts",
"type": "cjs require",
"userRequest": "../crypto/crypto_methods",
"loc": "27:41-76"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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": 61,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\worker-loader\\dist\\cjs.js!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"index": 28,
"index2": 21,
"size": 113,
"cacheable": false,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"issuerId": 1,
"issuerName": "./src/lib/mtproto/mtprotoworker.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"name": "./src/lib/mtproto/mtprotoworker.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2555,
"building": 4645,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtprotoworker.ts",
"module": "./src/lib/mtproto/mtprotoworker.ts",
"moduleName": "./src/lib/mtproto/mtprotoworker.ts",
"type": "cjs require",
"userRequest": "./mtproto.worker.js",
"loc": "39:54-84"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "module.exports = function() {\n return new Worker(__webpack_public_path__ + \"c37a1e067975b1b72c39.worker.js\");\n};"
},
{
"id": 62,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\idb.ts",
"name": "./src/lib/idb.ts",
"index": 38,
"index2": 27,
"size": 11959,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"issuerId": 20,
"issuerName": "./src/lib/mtproto/apiFileManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
},
{
"id": 20,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"name": "./src/lib/mtproto/apiFileManager.ts",
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
}
}
],
"profile": {
"factory": 1083,
"building": 60,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 20,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiFileManager.ts",
"module": "./src/lib/mtproto/apiFileManager.ts",
"moduleName": "./src/lib/mtproto/apiFileManager.ts",
"type": "cjs require",
"userRequest": "../idb",
"loc": "17:30-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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.name = 'IndexedDB';\r\n this.openDatabase(true);\r\n }\r\n isAvailable() {\r\n return this.storageIsAvailable;\r\n }\r\n openDatabase(createNew = false) {\r\n if (this.openDbPromise && !createNew) {\r\n return this.openDbPromise;\r\n }\r\n const createObjectStore = (db) => {\r\n db.createObjectStore(this.dbStoreName);\r\n };\r\n try {\r\n var request = indexedDB.open(this.dbName, this.dbVersion);\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 let 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 const db = request.result;\r\n let calledNew = false;\r\n console.log('Opened IndexedDB');\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 db.onclose = (e) => {\r\n console.error('IndexedDB closed:', e);\r\n !calledNew && this.openDatabase();\r\n };\r\n db.onabort = (e) => {\r\n console.error('IndexedDB abort:', e);\r\n const transaction = e.target;\r\n this.openDatabase(calledNew = true);\r\n if (transaction.onerror) {\r\n transaction.onerror(e);\r\n }\r\n db.close();\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 Promise.resolve();\r\n return this.openDatabase().then((db) => {\r\n try {\r\n console.log('IndexedDB: Delete file: `' + fileName + '`');\r\n var objectStore = db.transaction([this.dbStoreName], 'readwrite')\r\n .objectStore(this.dbStoreName);\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 Promise.resolve(blobConstruct([blob]));\r\n return this.openDatabase().then((db) => {\r\n if (!(blob instanceof Blob)) {\r\n blob = bin_utils_1.blobConstruct([blob]);\r\n }\r\n console.log('IndexedDB saveFile:', fileName, blob);\r\n const handleError = (error) => {\r\n console.error('IndexedDB saveFile transaction error:', fileName, blob, db, error, error && error.name);\r\n if ((!error || error.name === 'InvalidStateError') /* && false */) {\r\n setTimeout(() => {\r\n this.saveFile(fileName, blob);\r\n }, 2e3);\r\n }\r\n else {\r\n //console.error('IndexedDB saveFile transaction error:', error, error && error.name);\r\n }\r\n };\r\n var finished = false;\r\n try {\r\n const transaction = db.transaction([this.dbStoreName], 'readwrite');\r\n transaction.onerror = (e) => {\r\n handleError(transaction.error);\r\n };\r\n transaction.oncomplete = (e) => {\r\n console.log('IndexedDB saveFile transaction complete:', fileName);\r\n };\r\n /* transaction.addEventListener('abort', (e) => {\r\n //handleError();\r\n console.error('IndexedDB: saveFile transaction abort!', transaction.error);\r\n }); */\r\n const objectStore = transaction.objectStore(this.dbStoreName);\r\n var request = objectStore.put(blob, fileName);\r\n setTimeout(() => {\r\n if (!finished) {\r\n console.error('IDB: REQUEST NOT FINISHED', fileName, request);\r\n }\r\n }, 3000);\r\n }\r\n catch (error) {\r\n handleError(error);\r\n return blob;\r\n /* this.storageIsAvailable = false;\r\n throw error; */\r\n }\r\n return new Promise((resolve, reject) => {\r\n request.onsuccess = (event) => {\r\n resolve(blob);\r\n finished = true;\r\n };\r\n request.onerror = (error) => {\r\n reject(error);\r\n finished = true;\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) {\r\n //return Promise.reject();\r\n return this.openDatabase().then((db) => {\r\n console.log('IDB getFile pre:', fileName);\r\n var finished = false;\r\n try {\r\n var objectStore = db.transaction([this.dbStoreName], 'readonly')\r\n .objectStore(this.dbStoreName);\r\n var request = objectStore.get(fileName);\r\n setTimeout(() => {\r\n if (!finished) {\r\n console.error('IDB: REQUEST NOT FINISHED', fileName, request);\r\n }\r\n }, 3000);\r\n //console.log('IDB getFile:', fileName, request);\r\n }\r\n catch (err) {\r\n console.error('IDB getFile error:', err, fileName, request, request.error);\r\n }\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 finished = true;\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\nwindow.IdbFileStorage = idbFileStorage;\r\nexports.default = idbFileStorage;\r\n"
},
{
"id": 63,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"name": "./src/lib/mtproto/mtproto.ts",
"index": 43,
"index2": 36,
"size": 2926,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"issuerId": 5,
"issuerName": "./src/lib/appManagers/appMessagesManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"name": "./src/lib/appManagers/appMessagesManager.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 1135,
"building": 161,
"dependencies": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appMessagesManager.ts",
"module": "./src/lib/appManagers/appMessagesManager.ts",
"moduleName": "./src/lib/appManagers/appMessagesManager.ts",
"type": "cjs require",
"userRequest": "../mtproto/mtproto",
"loc": "22:18-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.telegramMeWebService = exports.TelegramMeWebService = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\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 = Date.now() / 1000;\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": 64,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\cropper.ts",
"name": "./src/lib/cropper.ts",
"index": 63,
"index2": 50,
"size": 7890,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"issuerId": 48,
"issuerName": "./src/components/popupAvatar.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 57,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageAuthCode.ts",
"name": "./src/pages/pageAuthCode.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
},
{
"id": 58,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignUp.ts",
"name": "./src/pages/pageSignUp.ts",
"profile": {
"factory": 1040,
"building": 297,
"dependencies": 1
}
},
{
"id": 48,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"name": "./src/components/popupAvatar.ts",
"profile": {
"factory": 1596,
"building": 115,
"dependencies": 1
}
}
],
"profile": {
"factory": 1168,
"building": 28
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 48,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\popupAvatar.ts",
"module": "./src/components/popupAvatar.ts",
"moduleName": "./src/components/popupAvatar.ts",
"type": "cjs require",
"userRequest": "../lib/cropper",
"loc": "7:34-59"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"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": 65,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\poll.ts",
"name": "./src/components/poll.ts",
"index": 66,
"index2": 58,
"size": 11520,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"issuerId": 31,
"issuerName": "./src/components/wrappers.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 31,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"name": "./src/components/wrappers.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 314,
"building": 338,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 31,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\wrappers.ts",
"module": "./src/components/wrappers.ts",
"moduleName": "./src/components/wrappers.ts",
"type": "cjs require",
"userRequest": "./poll",
"loc": "47:31-48"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 appPollsManager_1 = __importDefault(require(\"../lib/appManagers/appPollsManager\"));\r\nconst richtextprocessor_1 = require(\"../lib/richtextprocessor\");\r\nconst utils_1 = require(\"../lib/utils\");\r\nlet lineTotalLength = 0;\r\nconst tailLength = 9;\r\nconst times = 10;\r\nconst fullTime = 340;\r\nconst oneTime = fullTime / times;\r\nlet roundPercents = (percents) => {\r\n //console.log('roundPercents before percents:', percents);\r\n let sum = percents.reduce((acc, p) => acc + Math.round(p), 0);\r\n if (sum > 100) {\r\n let diff = sum - 100;\r\n let length = percents.length;\r\n for (let i = 0; i < diff; ++i) {\r\n let minIndex = -1, minRemainder = 1;\r\n for (let k = 0; k < length; ++k) {\r\n let remainder = percents[k] % 1;\r\n if (remainder >= 0.5 && remainder < minRemainder) {\r\n minRemainder = remainder;\r\n minIndex = k;\r\n }\r\n }\r\n if (minIndex == -1) {\r\n throw new Error('lol chto');\r\n }\r\n percents[minIndex] -= minRemainder;\r\n }\r\n }\r\n else if (sum < 100) {\r\n let diff = 100 - sum;\r\n let length = percents.length;\r\n for (let i = 0; i < diff; ++i) {\r\n let minIndex = -1, maxRemainder = 0;\r\n for (let k = 0; k < length; ++k) {\r\n let remainder = percents[k] % 1;\r\n if (remainder < 0.5 && remainder > maxRemainder) {\r\n maxRemainder = remainder;\r\n minIndex = k;\r\n }\r\n }\r\n if (minIndex == -1) {\r\n throw new Error('lol chto');\r\n }\r\n percents[minIndex] += 1 - maxRemainder;\r\n }\r\n }\r\n //console.log('roundPercents after percents:', percents);\r\n};\r\nconst connectedPolls = [];\r\nutils_1.$rootScope.$on('poll_update', (e) => {\r\n let { poll, results } = e.detail;\r\n for (let connected of connectedPolls) {\r\n if (connected.id == poll.id) {\r\n let pollElement = connected.element;\r\n pollElement.performResults(results, poll.chosenIndex);\r\n }\r\n }\r\n});\r\nclass PollElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n this.maxOffset = -46.5;\r\n this.isQuiz = false;\r\n this.isRetracted = false;\r\n this.chosenIndex = -1;\r\n // элемент создан\r\n }\r\n connectedCallback() {\r\n // браузер вызывает этот метод при добавлении элемента в документ\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n if (!lineTotalLength) {\r\n lineTotalLength = document.getElementById('poll-line').getTotalLength();\r\n console.log('line total length:', lineTotalLength);\r\n }\r\n let pollID = this.getAttribute('poll-id');\r\n let { poll, results } = appPollsManager_1.default.getPoll(pollID);\r\n connectedPolls.push({ id: pollID, element: this });\r\n console.log('pollElement poll:', poll, results);\r\n let desc = '';\r\n if (poll.pFlags) {\r\n if (poll.pFlags.closed) {\r\n desc = 'Final results';\r\n }\r\n else {\r\n if (poll.pFlags.quiz) {\r\n this.isQuiz = true;\r\n }\r\n let type = this.isQuiz ? 'Quiz' : 'Poll';\r\n desc = (poll.pFlags.public_voters ? 'Public' : 'Anonymous') + ' ' + type;\r\n }\r\n }\r\n let votes = poll.answers.map((answer, idx) => {\r\n return `\r\n <div class=\"poll-answer\" data-index=\"${idx}\">\r\n <div class=\"circle-hover\">\r\n <div class=\"animation-ring\"></div>\r\n <svg class=\"progress-ring\">\r\n <circle class=\"progress-ring__circle\" cx=\"13\" cy=\"13\" r=\"9\"></circle>\r\n </svg>\r\n </div>\r\n <div class=\"poll-answer-percents\"></div>\r\n <div class=\"poll-answer-text\">${richtextprocessor_1.RichTextProcessor.wrapEmojiText(answer.text)}</div>\r\n <svg version=\"1.1\" class=\"poll-line\" style=\"display: none;\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 480 35\" xml:space=\"preserve\">\r\n <use href=\"#poll-line\"></use>\r\n </svg>\r\n </div>\r\n `;\r\n }).join('');\r\n this.innerHTML = `\r\n <div class=\"poll-title\">${poll.rQuestion}</div>\r\n <div class=\"poll-desc\">${desc}</div>\r\n ${votes}\r\n <div class=\"poll-votes-count\"></div>\r\n `;\r\n this.answerDivs = Array.from(this.querySelectorAll('.poll-answer'));\r\n this.votersCountDiv = this.querySelector('.poll-votes-count');\r\n this.svgLines = Array.from(this.querySelectorAll('.poll-line'));\r\n this.numberDivs = Array.from(this.querySelectorAll('.poll-answer-percents'));\r\n let width = this.getBoundingClientRect().width;\r\n this.maxLength = width + tailLength + this.maxOffset + -13.7; // 13 - position left\r\n if (poll.chosenIndex !== -1) {\r\n this.performResults(results, poll.chosenIndex);\r\n }\r\n else {\r\n this.setVotersCount(results);\r\n this.addEventListener('click', this.clickHandler);\r\n }\r\n }\r\n disconnectedCallback() {\r\n // браузер вызывает этот метод при удалении элемента из документа\r\n // (может вызываться много раз, если элемент многократно добавляется/удаляется)\r\n connectedPolls.findAndSplice(c => c.element == this);\r\n }\r\n static get observedAttributes() {\r\n return [ /* массив имён атрибутов для отслеживания их изменений */];\r\n }\r\n attributeChangedCallback(name, oldValue, newValue) {\r\n // вызывается при изменении одного из перечисленных выше атрибутов\r\n }\r\n adoptedCallback() {\r\n // вызывается, когда элемент перемещается в новый документ\r\n // (происходит в document.adoptNode, используется очень редко)\r\n }\r\n clickHandler(e) {\r\n let target = utils_1.findUpClassName(e.target, 'poll-answer');\r\n if (!target) {\r\n return;\r\n }\r\n let answerIndex = +target.dataset.index;\r\n this.sendVote(answerIndex);\r\n /* target.classList.add('is-voting');\r\n setTimeout(() => { // simulate\r\n this.setResults([100, 0], answerIndex);\r\n target.classList.remove('is-voting');\r\n }, 1000); */\r\n }\r\n sendVote(index) {\r\n let target = this.answerDivs[index];\r\n target.classList.add('is-voting');\r\n let mid = +this.getAttribute('message-id');\r\n this.classList.add('disable-hover');\r\n appPollsManager_1.default.sendVote(mid, [index]).then(() => {\r\n target.classList.remove('is-voting');\r\n this.classList.remove('disable-hover');\r\n });\r\n }\r\n performResults(results, chosenIndex) {\r\n if (this.chosenIndex != chosenIndex) { // if we voted\r\n this.isRetracted = this.chosenIndex != -1 && chosenIndex == -1;\r\n this.chosenIndex = chosenIndex;\r\n if (this.isRetracted) {\r\n this.addEventListener('click', this.clickHandler);\r\n }\r\n else {\r\n this.removeEventListener('click', this.clickHandler);\r\n }\r\n }\r\n // is need update\r\n if (this.chosenIndex != -1 || this.isRetracted) {\r\n const percents = results.results.map(v => v.voters / results.total_voters * 100);\r\n this.setResults(this.isRetracted ? this.percents : percents, chosenIndex);\r\n this.percents = percents;\r\n this.isRetracted = false;\r\n }\r\n this.setVotersCount(results);\r\n }\r\n setResults(percents, chosenIndex) {\r\n this.svgLines.forEach(svg => svg.style.display = '');\r\n if (chosenIndex !== -1) {\r\n let answerDiv = this.answerDivs[chosenIndex];\r\n if (!this.selectedSpan) {\r\n this.selectedSpan = document.createElement('span');\r\n this.selectedSpan.classList.add('poll-answer-selected', 'tgico-check');\r\n }\r\n answerDiv.append(this.selectedSpan);\r\n }\r\n let maxValue = Math.max(...percents);\r\n this.maxLengths = percents.map(p => p / maxValue * this.maxLength);\r\n // line\r\n if (this.isRetracted) {\r\n this.svgLines.forEach((svg, idx) => {\r\n this.setLineProgress(idx, -1);\r\n });\r\n }\r\n else {\r\n this.svgLines.forEach((svg, idx) => {\r\n void svg.getBoundingClientRect(); // reflow\r\n this.setLineProgress(idx, 1);\r\n });\r\n }\r\n percents = percents.slice();\r\n roundPercents(percents);\r\n // numbers\r\n if (this.isRetracted) {\r\n for (let i = (times - 1), k = 0; i >= 0; --i, ++k) {\r\n setTimeout(() => {\r\n percents.forEach((percents, idx) => {\r\n let value = Math.round(percents / times * i);\r\n this.numberDivs[idx].innerText = value + '%';\r\n });\r\n }, oneTime * k);\r\n }\r\n }\r\n else {\r\n for (let i = 0; i < times; ++i) {\r\n setTimeout(() => {\r\n percents.forEach((percents, idx) => {\r\n let value = Math.round(percents / times * (i + 1));\r\n this.numberDivs[idx].innerText = value + '%';\r\n });\r\n }, oneTime * i);\r\n }\r\n }\r\n if (this.isRetracted) {\r\n this.classList.add('is-retracting');\r\n this.classList.remove('is-voted');\r\n setTimeout(() => {\r\n this.classList.remove('is-retracting');\r\n this.svgLines.forEach(svg => svg.style.display = 'none');\r\n }, fullTime);\r\n }\r\n else {\r\n this.classList.add('is-voted');\r\n }\r\n }\r\n setVotersCount(results) {\r\n let votersCount = results.total_voters || 0;\r\n let votersOrAnswers = this.isQuiz ? (votersCount > 1 || !votersCount ? 'answers' : 'answer') : (votersCount > 1 || !votersCount ? 'votes' : 'vote');\r\n this.votersCountDiv.innerText = `${results.total_voters ? results.total_voters + ' ' + votersOrAnswers : 'No ' + votersOrAnswers}`;\r\n }\r\n setLineProgress(index, percents) {\r\n let svg = this.svgLines[index];\r\n if (percents == -1) {\r\n svg.style.strokeDasharray = '';\r\n svg.style.strokeDashoffset = '';\r\n }\r\n else {\r\n svg.style.strokeDasharray = (percents * this.maxLengths[index]) + ', 485.9';\r\n svg.style.strokeDashoffset = '' + percents * this.maxOffset;\r\n }\r\n }\r\n}\r\nexports.default = PollElement;\r\ncustomElements.define(\"poll-element\", PollElement);\r\n"
},
{
"id": 66,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"name": "./src/components/chatInput.ts",
"index": 67,
"index2": 63,
"size": 31855,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/chatInput",
"loc": "27:20-57"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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\nexports.ChatInput = void 0;\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\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\nconst groupedLayout_1 = require(\"./groupedLayout\");\r\nconst recorder_min_1 = __importDefault(require(\"../../public/recorder.min\"));\r\n//import Recorder from '../opus-recorder/dist/recorder.min';\r\nconst opusDecodeController_1 = __importDefault(require(\"../lib/opusDecodeController\"));\r\nclass ChatInput {\r\n constructor() {\r\n this.pageEl = document.getElementById('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_new_1.default(this.inputMessageContainer);\r\n this.btnSend = document.getElementById('btn-send');\r\n this.btnCancelRecord = this.btnSend.parentElement.previousElementSibling;\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.inputContainer = this.btnSend.parentElement.parentElement;\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.recorder = new recorder_min_1.default({\r\n //encoderBitRate: 32,\r\n //encoderPath: \"../dist/encoderWorker.min.js\",\r\n encoderSampleRate: 48000,\r\n monitorGain: 0,\r\n numberOfChannels: 1,\r\n recordingGain: 1\r\n });\r\n this.recording = false;\r\n this.recordCanceled = false;\r\n this.recordTimeEl = this.inputContainer.querySelector('.record-time');\r\n this.recordRippleEl = this.inputContainer.querySelector('.record-ripple');\r\n this.recordStartTime = 0;\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 += '<br>';\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 return new Promise((resolve, reject) => {\r\n let params = {};\r\n params.file = file;\r\n console.log('selected file:', file, typeof (file), willAttach);\r\n let itemDiv = document.createElement('div');\r\n switch (willAttach.type) {\r\n case 'media': {\r\n let isVideo = file.type.indexOf('video/') === 0;\r\n itemDiv.classList.add('popup-item-media');\r\n if (isVideo) {\r\n let video = document.createElement('video');\r\n let source = document.createElement('source');\r\n source.src = params.objectURL = URL.createObjectURL(file);\r\n video.autoplay = false;\r\n video.controls = false;\r\n video.onloadeddata = () => {\r\n params.width = video.videoWidth;\r\n params.height = video.videoHeight;\r\n params.duration = Math.floor(video.duration);\r\n itemDiv.append(video);\r\n resolve(itemDiv);\r\n };\r\n video.append(source);\r\n }\r\n else {\r\n let img = new Image();\r\n img.src = params.objectURL = URL.createObjectURL(file);\r\n img.onload = () => {\r\n params.width = img.naturalWidth;\r\n params.height = img.naturalHeight;\r\n itemDiv.append(img);\r\n resolve(itemDiv);\r\n };\r\n }\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: file.type.indexOf('image/') !== -1 ? 'photo' : 'doc'\r\n }, false, true);\r\n itemDiv.append(docDiv);\r\n resolve(itemDiv);\r\n break;\r\n }\r\n }\r\n willAttach.sendFileDetails.push(params);\r\n });\r\n };\r\n let attachFiles = (files) => {\r\n this.fileInput.value = '';\r\n let container = this.attachMediaPopUp.container.firstElementChild;\r\n container.classList.remove('is-media', 'is-document', 'is-album');\r\n this.attachMediaPopUp.captionInput.value = '';\r\n this.attachMediaPopUp.mediaContainer.innerHTML = '';\r\n this.attachMediaPopUp.mediaContainer.style.width = this.attachMediaPopUp.mediaContainer.style.height = '';\r\n //willAttach.sendFileDetails.length = 0;\r\n willAttach.sendFileDetails = []; // need new array\r\n files = files.filter(file => {\r\n if (willAttach.type == 'media') {\r\n return ['image/', 'video/'].find(s => file.type.indexOf(s) === 0);\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n if (files.length) {\r\n if (willAttach.type == 'document') {\r\n this.attachMediaPopUp.titleEl.innerText = 'Send ' + (files.length > 1 ? files.length + ' Files' : 'File');\r\n container.classList.add('is-document');\r\n }\r\n else {\r\n container.classList.add('is-media');\r\n let foundPhotos = 0;\r\n let foundVideos = 0;\r\n files.forEach(file => {\r\n if (file.type.indexOf('image/') === 0)\r\n ++foundPhotos;\r\n else if (file.type.indexOf('video/') === 0)\r\n ++foundVideos;\r\n });\r\n if (foundPhotos && foundVideos) {\r\n this.attachMediaPopUp.titleEl.innerText = 'Send Album';\r\n }\r\n else if (foundPhotos) {\r\n this.attachMediaPopUp.titleEl.innerText = 'Send ' + (foundPhotos > 1 ? foundPhotos + ' Photos' : 'Photo');\r\n }\r\n else if (foundVideos) {\r\n this.attachMediaPopUp.titleEl.innerText = 'Send ' + (foundVideos > 1 ? foundVideos + ' Videos' : 'Video');\r\n }\r\n }\r\n }\r\n Promise.all(files.map(attachFile)).then(results => {\r\n if (willAttach.type == 'media') {\r\n if (willAttach.sendFileDetails.length > 1) {\r\n container.classList.add('is-album');\r\n let layouter = new groupedLayout_1.Layouter(willAttach.sendFileDetails.map(o => ({ w: o.width, h: o.height })), 380, 100, 4);\r\n let layout = layouter.layout();\r\n for (let { geometry, sides } of layout) {\r\n let div = results.shift();\r\n div.style.width = geometry.width + 'px';\r\n div.style.height = geometry.height + 'px';\r\n div.style.top = geometry.y + 'px';\r\n div.style.left = geometry.x + 'px';\r\n if (sides & groupedLayout_1.RectPart.Right) {\r\n this.attachMediaPopUp.mediaContainer.style.width = geometry.width + geometry.x + 'px';\r\n }\r\n if (sides & groupedLayout_1.RectPart.Bottom) {\r\n this.attachMediaPopUp.mediaContainer.style.height = geometry.height + geometry.y + 'px';\r\n }\r\n this.attachMediaPopUp.mediaContainer.append(div);\r\n }\r\n console.log('chatInput album layout:', layout);\r\n }\r\n else {\r\n let params = willAttach.sendFileDetails[0];\r\n let div = results[0];\r\n let { w, h } = utils_1.calcImageInBox(params.width, params.height, 380, 320);\r\n div.style.width = w + 'px';\r\n div.style.height = h + 'px';\r\n this.attachMediaPopUp.mediaContainer.append(div);\r\n }\r\n }\r\n else {\r\n this.attachMediaPopUp.mediaContainer.append(...results);\r\n }\r\n this.attachMediaPopUp.container.classList.add('active');\r\n });\r\n };\r\n let willAttach = {\r\n sendFileDetails: []\r\n };\r\n this.fileInput.addEventListener('change', (e) => {\r\n let files = e.target.files;\r\n if (!files.length) {\r\n return;\r\n }\r\n attachFiles(Array.from(files));\r\n }, false);\r\n this.attachMenu.media.addEventListener('click', () => {\r\n willAttach.type = 'media';\r\n this.fileInput.click();\r\n });\r\n this.attachMenu.document.addEventListener('click', () => {\r\n willAttach.type = '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.type = file.type.indexOf('image/') === 0 ? 'media' : \"document\";\r\n attachFiles([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 willAttach.isMedia = willAttach.type == 'media';\r\n console.log('will send files with options:', willAttach);\r\n let peerID = appImManager_1.default.peerID;\r\n if (willAttach.sendFileDetails.length > 1 && willAttach.isMedia) {\r\n appMessagesManager_1.default.sendAlbum(peerID, willAttach.sendFileDetails.map(d => d.file), Object.assign({\r\n caption,\r\n replyToMsgID: this.replyToMsgID\r\n }, willAttach));\r\n }\r\n else {\r\n if (caption) {\r\n if (willAttach.sendFileDetails.length > 1) {\r\n appMessagesManager_1.default.sendText(peerID, caption, { replyToMsgID: this.replyToMsgID });\r\n caption = '';\r\n this.replyToMsgID = 0;\r\n }\r\n }\r\n let promises = willAttach.sendFileDetails.map(params => {\r\n let promise = appMessagesManager_1.default.sendFile(peerID, params.file, Object.assign({\r\n isMedia: willAttach.isMedia,\r\n caption,\r\n replyToMsgID: this.replyToMsgID\r\n }, params));\r\n caption = '';\r\n this.replyToMsgID = 0;\r\n return promise;\r\n });\r\n }\r\n //Promise.all(promises);\r\n //appMessagesManager.sendFile(appImManager.peerID, willAttach.file, willAttach);\r\n this.onMessageSent();\r\n });\r\n this.btnSend.addEventListener('click', () => {\r\n if (this.btnSend.classList.contains('tgico-send')) {\r\n if (this.recording) {\r\n this.recorder.stop();\r\n }\r\n else {\r\n this.sendMessage();\r\n }\r\n }\r\n else {\r\n this.recorder.start().then(() => {\r\n this.recordCanceled = false;\r\n this.btnSend.classList.add('tgico-send');\r\n this.inputContainer.classList.add('is-recording');\r\n this.recording = true;\r\n opusDecodeController_1.default.setKeepAlive(true);\r\n this.recordStartTime = Date.now();\r\n const sourceNode = this.recorder.sourceNode;\r\n const context = sourceNode.context;\r\n const analyser = context.createAnalyser();\r\n sourceNode.connect(analyser);\r\n //analyser.connect(context.destination);\r\n analyser.fftSize = 32;\r\n const frequencyData = new Uint8Array(analyser.frequencyBinCount);\r\n const max = frequencyData.length * 255;\r\n const min = 54 / 150;\r\n let r = () => {\r\n if (!this.recording)\r\n return;\r\n analyser.getByteFrequencyData(frequencyData);\r\n let sum = 0;\r\n frequencyData.forEach(value => {\r\n sum += value;\r\n });\r\n let percents = Math.min(1, (sum / max) + min);\r\n console.log('frequencyData', frequencyData, percents);\r\n this.recordRippleEl.style.transform = `scale(${percents})`;\r\n let diff = Date.now() - this.recordStartTime;\r\n let ms = diff % 1000;\r\n let formatted = ('' + (diff / 1000)).toHHMMSS() + ',' + ('00' + Math.round(ms / 10)).slice(-2);\r\n this.recordTimeEl.innerText = formatted;\r\n window.requestAnimationFrame(r);\r\n };\r\n r();\r\n }).catch((e) => {\r\n console.error('Recorder start error:', e);\r\n });\r\n }\r\n });\r\n this.btnCancelRecord.addEventListener('click', () => {\r\n this.recordCanceled = true;\r\n this.recorder.stop();\r\n opusDecodeController_1.default.setKeepAlive(false);\r\n });\r\n this.recorder.onstop = () => {\r\n this.recording = false;\r\n this.inputContainer.classList.remove('is-recording');\r\n this.btnSend.classList.remove('tgico-send');\r\n this.recordRippleEl.style.transform = '';\r\n };\r\n this.recorder.ondataavailable = (typedArray) => {\r\n if (this.recordCanceled)\r\n return;\r\n const duration = (Date.now() - this.recordStartTime) / 1000 | 0;\r\n const dataBlob = new Blob([typedArray], { type: 'audio/ogg' });\r\n /* const fileName = new Date().toISOString() + \".opus\";\r\n console.log('Recorder data received', typedArray, dataBlob); */\r\n /* var url = URL.createObjectURL( dataBlob );\r\n \r\n var audio = document.createElement('audio');\r\n audio.controls = true;\r\n audio.src = url;\r\n \r\n var link = document.createElement('a');\r\n link.href = url;\r\n link.download = fileName;\r\n link.innerHTML = link.download;\r\n \r\n var li = document.createElement('li');\r\n li.appendChild(link);\r\n li.appendChild(audio);\r\n \r\n document.body.append(li);\r\n \r\n return; */\r\n let perf = performance.now();\r\n opusDecodeController_1.default.decode(typedArray, true).then(result => {\r\n console.log('WAVEFORM!:', /* waveform, */ performance.now() - perf);\r\n opusDecodeController_1.default.setKeepAlive(false);\r\n let peerID = appImManager_1.default.peerID;\r\n // тут objectURL ставится уже с audio/wav\r\n appMessagesManager_1.default.sendFile(peerID, dataBlob, {\r\n isVoiceMessage: true,\r\n isMedia: true,\r\n duration,\r\n waveform: result.waveform,\r\n objectURL: result.url\r\n });\r\n });\r\n /* const url = URL.createObjectURL(dataBlob);\r\n \r\n var audio = document.createElement('audio');\r\n audio.controls = true;\r\n audio.src = url;\r\n \r\n var link = document.createElement('a');\r\n link.href = url;\r\n link.download = fileName;\r\n link.innerHTML = link.download;\r\n \r\n var li = document.createElement('li');\r\n li.appendChild(link);\r\n li.appendChild(audio);\r\n \r\n recordingslist.appendChild(li); */\r\n };\r\n let emoticonsDisplayTimeout = 0;\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 this.emoticonsLazyLoadQueue.lock();\r\n clearTimeout(emoticonsDisplayTimeout);\r\n emoticonsDisplayTimeout = setTimeout(() => {\r\n this.emoticonsDropdown.style.display = 'none';\r\n }, 200);\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.style.display = '';\r\n void this.emoticonsDropdown.offsetLeft; // reflow\r\n this.emoticonsDropdown.classList.add('active');\r\n this.emoticonsLazyLoadQueue.unlock();\r\n clearTimeout(emoticonsDisplayTimeout);\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(clearInput = true) {\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();\r\n }\r\n ;\r\n setTopInfo(title, subtitle, input, message) {\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, message));\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": 67,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\emoticonsDropdown.ts",
"name": "./src/components/emoticonsDropdown.ts",
"index": 68,
"index2": 61,
"size": 20905,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"issuerId": 66,
"issuerName": "./src/components/chatInput.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 66,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"name": "./src/components/chatInput.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 246,
"building": 1149,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "./emoticonsDropdown",
"loc": "35:41-71"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.EMOTICONSSTICKERGROUP = void 0;\r\nconst misc_1 = require(\"./misc\");\r\nconst lottieLoader_1 = __importDefault(require(\"../lib/lottieLoader\"));\r\n//import Scrollable from \"./scrollable\";\r\nconst scrollable_new_1 = __importDefault(require(\"./scrollable_new\"));\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 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 let tabID = -1;\r\n misc_1.horizontalMenu(tabs, container, (id) => {\r\n lottieLoader_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n tabID = id;\r\n }, () => {\r\n if (tabID == 1 && stickersInit) {\r\n stickersInit();\r\n }\r\n else if (tabID == 2 && gifsInit) {\r\n gifsInit();\r\n }\r\n lottieLoader_1.default.checkAnimations(false, exports.EMOTICONSSTICKERGROUP);\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 setTimeout(() => {\r\n lottieLoader_1.default.checkAnimations(true, exports.EMOTICONSSTICKERGROUP);\r\n }, 100);\r\n /* window.requestAnimationFrame(() => {\r\n window.requestAnimationFrame(() => {\r\n lottieLoader.checkAnimations(true, EMOTICONSSTICKERGROUP);\r\n });\r\n }); */\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 const categories = [\"Smileys & Emotion\", \"Animals & Nature\", \"Food & Drink\", \"Travel & Places\", \"Activities\", \"Objects\", /* \"Symbols\", */ \"Flags\", \"Skin Tones\"];\r\n let divs = {};\r\n let sorted = {};\r\n for (let emoji in config_1.default.Emoji) {\r\n let details = config_1.default.Emoji[emoji];\r\n let i = '' + details;\r\n let category = categories[+i[0] - 1];\r\n if (!category)\r\n continue; // maybe it's skin tones\r\n if (!sorted[category])\r\n sorted[category] = [];\r\n sorted[category][+i.slice(1) || 0] = emoji;\r\n }\r\n console.log('emoticons sorted:', sorted);\r\n //Object.keys(sorted).forEach(c => sorted[c].sort((a, b) => a - b));\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 titleDiv = document.createElement('div');\r\n titleDiv.classList.add('category-title');\r\n titleDiv.innerText = category;\r\n let itemsDiv = document.createElement('div');\r\n itemsDiv.classList.add('category-items');\r\n div.append(titleDiv, itemsDiv);\r\n let emojis = sorted[category];\r\n emojis.forEach(emoji => {\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(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 itemsDiv.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_new_1.default(contentEmojiDiv, 'y', '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(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_new_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 as HTMLElement;\r\n \r\n if(target.tagName == 'CANVAS') { // turn on sticker\r\n let animation = lottieLoader.getAnimation(target.parentElement, EMOTICONSSTICKERGROUP);\r\n \r\n if(animation) {\r\n // @ts-ignore\r\n if(animation.currentFrame == animation.totalFrames - 1) {\r\n animation.goToAndPlay(0, true);\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, categoryTitle, docs, prepend) => {\r\n //if((docs.length % 5) != 0) categoryDiv.classList.add('not-full');\r\n let itemsDiv = document.createElement('div');\r\n itemsDiv.classList.add('category-items');\r\n let titleDiv = document.createElement('div');\r\n titleDiv.classList.add('category-title');\r\n titleDiv.innerText = categoryTitle;\r\n categoryDiv.append(titleDiv, itemsDiv);\r\n docs.forEach(doc => {\r\n let div = document.createElement('div');\r\n wrappers_1.wrapSticker({\r\n doc,\r\n div,\r\n lazyLoadQueue,\r\n group: exports.EMOTICONSSTICKERGROUP,\r\n onlyThumb: true\r\n });\r\n itemsDiv.append(div);\r\n });\r\n if (prepend)\r\n stickersScroll.prepend(categoryDiv);\r\n else\r\n stickersScroll.append(categoryDiv);\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 let concated = Array.from(stickersScroll.splitUp.children);\r\n concated.forEach((el, i) => {\r\n heights[i] = (heights[i - 1] || 0) + el.scrollHeight + (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_new_1.default(contentStickersDiv, 'y', 'STICKERS', undefined, undefined, 2);\r\n stickersScroll.container.addEventListener('scroll', (e) => {\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 emoticonsMenuOnClick(menu, heights, stickersScroll, menuScroll);\r\n stickersInit = null;\r\n Promise.all([\r\n appStickersManager_1.default.getRecentStickers().then(stickers => {\r\n let categoryDiv = document.createElement('div');\r\n categoryDiv.classList.add('sticker-category');\r\n //stickersScroll.prepend(categoryDiv);\r\n categoryPush(categoryDiv, 'Recent', 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.loadAnimationWorker({\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 misc_1.renderImageFromUrl(image, URL.createObjectURL(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({\r\n doc: stickerSet.documents[0],\r\n div: li,\r\n group: exports.EMOTICONSSTICKERGROUP\r\n }); // kostil\r\n }\r\n categoryPush(categoryDiv, stickerSet.set.title, stickerSet.documents, false);\r\n }\r\n }))\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_new_1.default(contentDiv, 'y', 'GIFS', null);\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 = `<video autoplay=\"true\" muted=\"true\" loop=\"true\" src=\"${gif.url}\" type=\"video/mp4\"></video>`;\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": 68,
"identifier": "E:\\projects\\TWEB\\tweb\\public\\recorder.min.js",
"name": "./public/recorder.min.js",
"index": 69,
"index2": 62,
"size": 6813,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"issuerId": 66,
"issuerName": "./src/components/chatInput.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
},
{
"id": 66,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"name": "./src/components/chatInput.ts",
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
}
}
],
"profile": {
"factory": 246,
"building": 1149,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 66,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\chatInput.ts",
"module": "./src/components/chatInput.ts",
"moduleName": "./src/components/chatInput.ts",
"type": "cjs require",
"userRequest": "../../public/recorder.min",
"loc": "38:39-75"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.Recorder=t():e.Recorder=t()}(\"undefined\"!=typeof self?self:this,(function(){return function(e){var t={};function o(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,\"a\",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p=\"\",o(o.s=0)}([function(e,t,o){\"use strict\";(function(t){var o=t.AudioContext||t.webkitAudioContext,i=function(e){if(!i.isRecordingSupported())throw new Error(\"Recording is not supported in this browser\");e||(e={}),this.state=\"inactive\",this.config=Object.assign({bufferLength:4096,encoderApplication:2049,encoderFrameSize:20,encoderPath:\"encoderWorker.min.js\",encoderSampleRate:48e3,maxFramesPerPage:40,mediaTrackConstraints:!0,monitorGain:0,numberOfChannels:1,recordingGain:1,resampleQuality:3,streamPages:!1,reuseWorker:!1,wavBitDepth:16},e),this.encodedSamplePosition=0};i.isRecordingSupported=function(){return o&&t.navigator&&t.navigator.mediaDevices&&t.navigator.mediaDevices.getUserMedia&&t.WebAssembly},i.prototype.clearStream=function(){this.stream&&(this.stream.getTracks?this.stream.getTracks().forEach((function(e){e.stop()})):this.stream.stop(),delete this.stream),this.audioContext&&this.closeAudioContext&&(this.audioContext.close(),delete this.audioContext)},i.prototype.encodeBuffers=function(e){if(\"recording\"===this.state){for(var t=[],o=0;o<e.numberOfChannels;o++)t[o]=e.getChannelData(o);this.encoder.postMessage({command:\"encode\",buffers:t})}},i.prototype.initAudioContext=function(e){return e&&e.context?(this.audioContext=e.context,this.closeAudioContext=!1):(this.audioContext=new o,this.closeAudioContext=!0),this.audioContext},i.prototype.initAudioGraph=function(){this.encodeBuffers=function(){delete this.encodeBuffers},this.scriptProcessorNode=this.audioContext.createScriptProcessor(this.config.bufferLength,this.config.numberOfChannels,this.config.numberOfChannels),this.scriptProcessorNode.connect(this.audioContext.destination),this.scriptProcessorNode.onaudioprocess=e=>{this.encodeBuffers(e.inputBuffer)},this.monitorGainNode=this.audioContext.createGain(),this.setMonitorGain(this.config.monitorGain),this.monitorGainNode.connect(this.audioContext.destination),this.recordingGainNode=this.audioContext.createGain(),this.setRecordingGain(this.config.recordingGain),this.recordingGainNode.connect(this.scriptProcessorNode)},i.prototype.initSourceNode=function(e){return e&&e.context?t.Promise.resolve(e):t.navigator.mediaDevices.getUserMedia({audio:this.config.mediaTrackConstraints}).then(e=>(this.stream=e,this.audioContext.createMediaStreamSource(e)))},i.prototype.loadWorker=function(){this.encoder||(this.encoder=new t.Worker(this.config.encoderPath))},i.prototype.initWorker=function(){var e=(this.config.streamPages?this.streamPage:this.storePage).bind(this);return this.recordedPages=[],this.totalLength=0,this.loadWorker(),new Promise((t,o)=>{var i=o=>{switch(o.data.message){case\"ready\":t();break;case\"page\":this.encodedSamplePosition=o.data.samplePosition,e(o.data.page);break;case\"done\":this.encoder.removeEventListener(\"message\",i),this.finish()}};this.encoder.addEventListener(\"message\",i),this.encoder.postMessage(Object.assign({command:\"init\",originalSampleRate:this.audioContext.sampleRate,wavSampleRate:this.audioContext.sampleRate},this.config))})},i.prototype.pause=function(e){if(\"recording\"===this.state){if(this.state=\"paused\",e&&this.config.streamPages){var t=this.encoder;return new Promise((e,o)=>{var i=o=>{\"flushed\"===o.data.message&&(t.removeEventListener(\"message\",i),this.onpause(),e())};t.addEventListener(\"message\",i),t.postMessage({command:\"flush\"})})}return this.onpause(),Promise.resolve()}},i.prototype.resume=function(){\"paused\"===this.state&&(this.state=\"recording\",this.onresume())},i.prototype.setRecordingGain=function(e){this.config.recordingGain=e,this.recordingGainNode&&this.audioContext&&this.recordingGainNode.gain.setTargetAtTime(e,this.audioContext.currentTime,.01)},i.prototype.setMonitorGain=function(e){this.config.monitorGain=e,this.monitorGainNode&&this.audioContext&&this.monitorGainNode.gain.setTargetAtTime(e,this.audioContext.currentTime,.01)},i.prototype.start=function(e){if(\"inactive\"===this.state)return this.initAudioContext(e),this.initAudioGraph(),this.encodedSamplePosition=0,Promise.all([this.initSourceNode(e),this.initWorker()]).then(e=>{this.sourceNode=e[0],this.state=\"recording\",this.onstart(),this.encoder.postMessage({command:\"getHeaderPages\"}),this.sourceNode.connect(this.monitorGainNode),this.sourceNode.connect(this.recordingGainNode)})},i.prototype.stop=function(){if(\"inactive\"!==this.state){this.state=\"inactive\",this.monitorGainNode.disconnect(),this.scriptProcessorNode.disconnect(),this.recordingGainNode.disconnect(),this.sourceNode.disconnect(),this.clearStream();var e=this.encoder;return new Promise(t=>{var o=i=>{\"done\"===i.data.message&&(e.removeEventListener(\"message\",o),t())};e.addEventListener(\"message\",o),e.postMessage({command:\"done\"}),this.config.reuseWorker||e.postMessage({command:\"close\"})})}return Promise.resolve()},i.prototype.destroyWorker=function(){\"inactive\"===this.state&&this.encoder&&(this.encoder.postMessage({command:\"close\"}),delete this.encoder)},i.prototype.storePage=function(e){this.recordedPages.push(e),this.totalLength+=e.length},i.prototype.streamPage=function(e){this.ondataavailable(e)},i.prototype.finish=function(){if(!this.config.streamPages){var e=new Uint8Array(this.totalLength);this.recordedPages.reduce((function(t,o){return e.set(o,t),t+o.length}),0),this.ondataavailable(e)}this.onstop(),this.config.reuseWorker||delete this.encoder},i.prototype.ondataavailable=function(){},i.prototype.onpause=function(){},i.prototype.onresume=function(){},i.prototype.onstart=function(){},i.prototype.onstop=function(){},e.exports=i}).call(this,o(1))},function(e,t){var o;o=function(){return this}();try{o=o||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(o=window)}e.exports=o}])}));"
},
{
"id": 69,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\bubbleGroups.ts",
"name": "./src/components/bubbleGroups.ts",
"index": 70,
"index2": 64,
"size": 6546,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/bubbleGroups",
"loc": "30:39-79"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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<HTMLDivElement[], number> = 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 else {\r\n this.updateGroup(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 // fix for saved messages forward to self\r\n if (fromID == utils_1.$rootScope.myID && utils_1.$rootScope.selectedPeerID == utils_1.$rootScope.myID && message.fwdFromID == fromID) {\r\n fromID = -fromID;\r\n }\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('[BUBBLE]: 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);\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) {\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 //console.log('[BUBBLE]: 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 //}));\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 this.groups = [];\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": 70,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\AppInlineBotsManager.ts",
"name": "./src/lib/appManagers/AppInlineBotsManager.ts",
"index": 71,
"index2": 65,
"size": 11113,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "./AppInlineBotsManager",
"loc": "36:47-80"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.AppInlineBotsManager = void 0;\r\nconst appMessagesManager_1 = __importDefault(require(\"./appMessagesManager\"));\r\nconst mtprotoworker_1 = __importDefault(require(\"../mtproto/mtprotoworker\"));\r\nconst services_1 = require(\"../services\");\r\nconst appMessagesIDsManager_1 = __importDefault(require(\"./appMessagesIDsManager\"));\r\nconst misc_1 = require(\"../../components/misc\");\r\nconst richtextprocessor_1 = require(\"../richtextprocessor\");\r\nclass AppInlineBotsManager {\r\n /* private inlineResults: any = {};\r\n \r\n function getPopularBots () {\r\n return Storage.get('inline_bots_popular').then(function (bots) {\r\n var result = []\r\n var i, len\r\n var userID\r\n if (bots && bots.length) {\r\n var now = tsNow(true)\r\n for (i = 0, len = bots.length; i < len; i++) {\r\n if ((now - bots[i][3]) > 14 * 86400) {\r\n continue\r\n }\r\n userID = bots[i][0]\r\n if (!AppUsersManager.hasUser(userID)) {\r\n AppUsersManager.saveApiUser(bots[i][1])\r\n }\r\n result.push({id: userID, rate: bots[i][2], date: bots[i][3]})\r\n }\r\n }\r\n return result\r\n })\r\n }\r\n \r\n function pushPopularBot (id) {\r\n getPopularBots().then(function (bots) {\r\n var exists = false\r\n var count = bots.length\r\n var result = []\r\n for (var i = 0; i < count; i++) {\r\n if (bots[i].id == id) {\r\n exists = true\r\n bots[i].rate++\r\n bots[i].date = tsNow(true)\r\n }\r\n var user = AppUsersManager.getUser(bots[i].id)\r\n result.push([bots[i].id, user, bots[i].rate, bots[i].date])\r\n }\r\n if (exists) {\r\n result.sort(function (a, b) {\r\n return b[2] - a[2]\r\n })\r\n } else {\r\n if (result.length > 15) {\r\n result = result.slice(0, 15)\r\n }\r\n result.push([id, AppUsersManager.getUser(id), 1, tsNow(true)])\r\n }\r\n ConfigStorage.set({inline_bots_popular: result})\r\n \r\n $rootScope.$broadcast('inline_bots_popular')\r\n })\r\n }\r\n \r\n function resolveInlineMention (username) {\r\n return AppPeersManager.resolveUsername(username).then(function (peerID) {\r\n if (peerID > 0) {\r\n var bot = AppUsersManager.getUser(peerID)\r\n if (bot.pFlags.bot && bot.bot_inline_placeholder !== undefined) {\r\n var resolvedBot = {\r\n username: username,\r\n id: peerID,\r\n placeholder: bot.bot_inline_placeholder\r\n }\r\n if (bot.pFlags.bot_inline_geo &&\r\n GeoLocationManager.isAvailable()) {\r\n return checkGeoLocationAccess(peerID).then(function () {\r\n return GeoLocationManager.getPosition().then(function (coords) {\r\n resolvedBot.geo = coords\r\n return qSync.when(resolvedBot)\r\n })\r\n })['catch'](function () {\r\n return qSync.when(resolvedBot)\r\n })\r\n }\r\n return qSync.when(resolvedBot)\r\n }\r\n }\r\n return $q.reject()\r\n }, function (error) {\r\n error.handled = true\r\n return $q.reject(error)\r\n })\r\n }\r\n \r\n function getInlineResults (peerID, botID, query, geo, offset) {\r\n return MtpApiManager.invokeApi('messages.getInlineBotResults', {\r\n flags: 0 | (geo ? 1 : 0),\r\n bot: AppUsersManager.getUserInput(botID),\r\n peer: AppPeersManager.getInputPeerByID(peerID),\r\n query: query,\r\n geo_point: geo && {_: 'inputGeoPoint', lat: geo['lat'], long: geo['long']},\r\n offset: offset\r\n }, {timeout: 1, stopTime: -1, noErrorBox: true}).then(function (botResults) {\r\n var queryID = botResults.query_id\r\n delete botResults._\r\n delete botResults.flags\r\n delete botResults.query_id\r\n \r\n if (botResults.switch_pm) {\r\n botResults.switch_pm.rText = RichTextProcessor.wrapRichText(botResults.switch_pm.text, {noLinebreaks: true, noLinks: true})\r\n }\r\n \r\n angular.forEach(botResults.results, function (result) {\r\n var qID = queryID + '_' + result.id\r\n result.qID = qID\r\n result.botID = botID\r\n \r\n result.rTitle = RichTextProcessor.wrapRichText(result.title, {noLinebreaks: true, noLinks: true})\r\n result.rDescription = RichTextProcessor.wrapRichText(result.description, {noLinebreaks: true, noLinks: true})\r\n result.initials = (result.url || result.title || result.type || '').substr(0, 1)\r\n \r\n if (result.document) {\r\n AppDocsManager.saveDoc(result.document)\r\n }\r\n if (result.photo) {\r\n AppPhotosManager.savePhoto(result.photo)\r\n }\r\n \r\n inlineResults[qID] = result\r\n })\r\n return botResults\r\n })\r\n }\r\n \r\n function regroupWrappedResults (results, rowW, rowH) {\r\n if (!results ||\r\n !results[0] ||\r\n ['photo', 'gif', 'sticker'].indexOf(results[0].type) == -1) {\r\n return\r\n }\r\n var ratios = []\r\n angular.forEach(results, function (result) {\r\n var w\r\n var h, doc\r\n var photo\r\n if (result._ == 'botInlineMediaResult') {\r\n if (doc = result.document) {\r\n w = result.document.w\r\n h = result.document.h\r\n }\r\n else if (photo = result.photo) {\r\n var photoSize = (photo.sizes || [])[0]\r\n w = photoSize && photoSize.w\r\n h = photoSize && photoSize.h\r\n }\r\n }else {\r\n w = result.w\r\n h = result.h\r\n }\r\n if (!w || !h) {\r\n w = h = 1\r\n }\r\n ratios.push(w / h)\r\n })\r\n \r\n var rows = []\r\n var curCnt = 0\r\n var curW = 0\r\n angular.forEach(ratios, function (ratio) {\r\n var w = ratio * rowH\r\n curW += w\r\n if (!curCnt || curCnt < 4 && curW < (rowW * 1.1)) {\r\n curCnt++\r\n } else {\r\n rows.push(curCnt)\r\n curCnt = 1\r\n curW = w\r\n }\r\n })\r\n if (curCnt) {\r\n rows.push(curCnt)\r\n }\r\n \r\n var i = 0\r\n var thumbs = []\r\n var lastRowI = rows.length - 1\r\n angular.forEach(rows, function (rowCnt, rowI) {\r\n var lastRow = rowI == lastRowI\r\n var curRatios = ratios.slice(i, i + rowCnt)\r\n var sumRatios = 0\r\n angular.forEach(curRatios, function (ratio) {\r\n sumRatios += ratio\r\n })\r\n angular.forEach(curRatios, function (ratio, j) {\r\n var thumbH = rowH\r\n var thumbW = rowW * ratio / sumRatios\r\n var realW = thumbH * ratio\r\n if (lastRow && thumbW > realW) {\r\n thumbW = realW\r\n }\r\n var result = results[i + j]\r\n result.thumbW = Math.floor(thumbW) - 2\r\n result.thumbH = Math.floor(thumbH) - 2\r\n })\r\n \r\n i += rowCnt\r\n })\r\n }\r\n \r\n function switchToPM (fromPeerID, botID, startParam) {\r\n var peerString = AppPeersManager.getPeerString(fromPeerID)\r\n var setHash = {}\r\n setHash['inline_switch_pm' + botID] = {peer: peerString, time: tsNow()}\r\n Storage.set(setHash)\r\n $rootScope.$broadcast('history_focus', {peerString: AppPeersManager.getPeerString(botID)})\r\n AppMessagesManager.startBot(botID, 0, startParam)\r\n }\r\n \r\n function checkSwitchReturn (botID) {\r\n var bot = AppUsersManager.getUser(botID)\r\n if (!bot || !bot.pFlags.bot || !bot.bot_inline_placeholder) {\r\n return qSync.when(false)\r\n }\r\n var key = 'inline_switch_pm' + botID\r\n return Storage.get(key).then(function (peerData) {\r\n if (peerData) {\r\n Storage.remove(key)\r\n if (tsNow() - peerData.time < 3600000) {\r\n return peerData.peer\r\n }\r\n }\r\n return false\r\n })\r\n }\r\n \r\n function switchInlineQuery (botID, toPeerString, query) {\r\n $rootScope.$broadcast('history_focus', {\r\n peerString: toPeerString,\r\n attachment: {\r\n _: 'inline_query',\r\n mention: '@' + AppUsersManager.getUser(botID).username,\r\n query: query\r\n }\r\n })\r\n }\r\n \r\n function switchInlineButtonClick (id, button) {\r\n var message = AppMessagesManager.getMessage(id)\r\n var botID = message.viaBotID || message.fromID\r\n if (button.pFlags && button.pFlags.same_peer) {\r\n var peerID = AppMessagesManager.getMessagePeer(message)\r\n var toPeerString = AppPeersManager.getPeerString(peerID)\r\n switchInlineQuery(botID, toPeerString, button.query)\r\n return\r\n }\r\n return checkSwitchReturn(botID).then(function (retPeerString) {\r\n if (retPeerString) {\r\n return switchInlineQuery(botID, retPeerString, button.query)\r\n }\r\n PeersSelectService.selectPeer({\r\n canSend: true\r\n }).then(function (toPeerString) {\r\n return switchInlineQuery(botID, toPeerString, button.query)\r\n })\r\n })\r\n } */\r\n callbackButtonClick(mid, button) {\r\n let message = appMessagesManager_1.default.getMessage(mid);\r\n let peerID = appMessagesManager_1.default.getMessagePeer(message);\r\n return mtprotoworker_1.default.invokeApi('messages.getBotCallbackAnswer', {\r\n flags: 1,\r\n peer: services_1.appPeersManager.getInputPeerByID(peerID),\r\n msg_id: appMessagesIDsManager_1.default.getMessageLocalID(mid),\r\n data: button.data\r\n }, { timeout: 1, stopTime: -1, noErrorBox: true }).then((callbackAnswer) => {\r\n if (typeof callbackAnswer.message === 'string' && callbackAnswer.message.length) {\r\n misc_1.toast(richtextprocessor_1.RichTextProcessor.wrapRichText(callbackAnswer.message, { noLinks: true, noLinebreaks: true }));\r\n }\r\n console.log('callbackButtonClick callbackAnswer:', callbackAnswer);\r\n });\r\n }\r\n}\r\nexports.AppInlineBotsManager = AppInlineBotsManager;\r\nconst appInlineBotsManager = new AppInlineBotsManager();\r\nexports.default = appInlineBotsManager;\r\n"
},
{
"id": 71,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\components\\stickyIntersector.ts",
"name": "./src/components/stickyIntersector.ts",
"index": 72,
"index2": 66,
"size": 2877,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"issuerId": 15,
"issuerName": "./src/lib/appManagers/appImManager.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageIm.ts",
"name": "./src/pages/pageIm.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"name": "./src/lib/appManagers/appImManager.ts",
"profile": {
"factory": 429,
"building": 1400,
"dependencies": 76
}
}
],
"profile": {
"factory": 82,
"building": 1822,
"dependencies": 1076
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\appManagers\\appImManager.ts",
"module": "./src/lib/appManagers/appImManager.ts",
"moduleName": "./src/lib/appManagers/appImManager.ts",
"type": "cjs require",
"userRequest": "../../components/stickyIntersector",
"loc": "37:44-89"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass StickyIntersector {\r\n constructor(container, handler) {\r\n this.container = container;\r\n this.handler = handler;\r\n this.observeHeaders();\r\n this.observeElements();\r\n }\r\n /**\r\n * Sets up an intersection observer to notify when elements with the class\r\n * `.sticky_sentinel--top` become visible/invisible at the top of the container.\r\n * @param {!Element} container\r\n */\r\n observeHeaders() {\r\n this.headersObserver = new IntersectionObserver((entries) => {\r\n for (const entry of entries) {\r\n const targetInfo = entry.boundingClientRect;\r\n const stickyTarget = entry.target.parentElement;\r\n const rootBoundsInfo = entry.rootBounds;\r\n // Started sticking.\r\n if (targetInfo.bottom < rootBoundsInfo.top) {\r\n this.handler(true, stickyTarget);\r\n }\r\n // Stopped sticking.\r\n if (targetInfo.bottom >= rootBoundsInfo.top &&\r\n targetInfo.bottom < rootBoundsInfo.bottom) {\r\n this.handler(false, stickyTarget);\r\n }\r\n }\r\n }, { threshold: 0, root: this.container });\r\n }\r\n observeElements() {\r\n this.elementsObserver = new IntersectionObserver((entries) => {\r\n let entry = entries.filter(entry => entry.boundingClientRect.top < 0).sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top)[0];\r\n if (!entry)\r\n return;\r\n let container = entry.isIntersecting ? entry.target : entry.target.nextElementSibling;\r\n this.handler(true, container);\r\n }, { root: this.container });\r\n }\r\n /**\r\n * @param {!Element} container\r\n * @param {string} className\r\n */\r\n addSentinel(container, className) {\r\n const sentinel = document.createElement('div');\r\n sentinel.classList.add('sticky_sentinel', className);\r\n return container.appendChild(sentinel);\r\n }\r\n /**\r\n * Notifies when elements w/ the `sticky` class begin to stick or stop sticking.\r\n * Note: the elements should be children of `container`.\r\n * @param {!Element} container\r\n */\r\n observeStickyHeaderChanges(element) {\r\n const headerSentinel = this.addSentinel(element, 'sticky_sentinel--top');\r\n this.headersObserver.observe(headerSentinel);\r\n this.elementsObserver.observe(element);\r\n }\r\n disconnect() {\r\n this.headersObserver.disconnect();\r\n this.elementsObserver.disconnect();\r\n }\r\n unobserve(element, headerSentinel) {\r\n this.elementsObserver.unobserve(element);\r\n this.headersObserver.unobserve(headerSentinel);\r\n }\r\n}\r\nexports.default = StickyIntersector;\r\n"
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"index": 74,
"index2": 73,
"size": 7047,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"issuerId": 32,
"issuerName": "./src/pages/pageSignIn.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 32,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"module": "./src/pages/pageSignIn.ts",
"moduleName": "./src/pages/pageSignIn.ts",
"type": "cjs require",
"userRequest": "./pageSignQR",
"loc": "12:37-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\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\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 pageIm_1 = __importDefault(require(\"./pageIm\"));\r\nconst pagePassword_1 = __importDefault(require(\"./pagePassword\"));\r\nconst pageSignIn_1 = __importDefault(require(\"./pageSignIn\"));\r\nconst mtproto_config_1 = require(\"../lib/mtproto/mtproto_config\");\r\nconst bin_utils_1 = require(\"../lib/bin_utils\");\r\nconst serverTimeManager_1 = __importDefault(require(\"../lib/mtproto/serverTimeManager\"));\r\n;\r\n;\r\n;\r\nlet onFirstMount = () => __awaiter(void 0, void 0, void 0, function* () {\r\n const pageElement = page.pageEl;\r\n const imageDiv = pageElement.querySelector('.auth-image');\r\n page.pageEl.querySelector('.a-qr').addEventListener('click', () => {\r\n pageSignIn_1.default.mount();\r\n stop = true;\r\n });\r\n const results = yield Promise.all([\r\n Promise.resolve().then(() => __importStar(require('qr-code-styling')))\r\n ]);\r\n const QRCodeStyling = results[0].default;\r\n let stop = false;\r\n document.addEventListener('user_auth', () => {\r\n stop = true;\r\n cachedPromise = null;\r\n }, { once: true });\r\n let options = { ignoreErrors: true };\r\n let prevToken;\r\n return () => __awaiter(void 0, void 0, void 0, function* () {\r\n stop = false;\r\n do {\r\n if (stop) {\r\n break;\r\n }\r\n try {\r\n let loginToken = yield mtprotoworker_1.default.invokeApi('auth.exportLoginToken', {\r\n api_id: mtproto_config_1.App.id,\r\n api_hash: mtproto_config_1.App.hash,\r\n except_ids: []\r\n }, { ignoreErrors: true });\r\n if (loginToken._ == 'auth.loginTokenMigrateTo') {\r\n if (!options.dcID) {\r\n options.dcID = loginToken.dc_id;\r\n mtprotoworker_1.default.setBaseDcID(loginToken.dc_id);\r\n //continue;\r\n }\r\n loginToken = (yield mtprotoworker_1.default.invokeApi('auth.importLoginToken', {\r\n token: loginToken.token\r\n }, options));\r\n }\r\n if (loginToken._ == 'auth.loginTokenSuccess') {\r\n let authorization = loginToken.authorization;\r\n mtprotoworker_1.default.setUserAuth({\r\n id: authorization.user.id\r\n });\r\n pageIm_1.default.mount();\r\n break;\r\n }\r\n /* // to base64\r\n var decoder = new TextDecoder('utf8');\r\n var b64encoded = btoa(String.fromCharCode.apply(null, [...loginToken.token])); */\r\n if (!prevToken || !bin_utils_1.bytesCmp(prevToken, loginToken.token)) {\r\n prevToken = loginToken.token;\r\n let encoded = bin_utils_1.bytesToBase64(loginToken.token);\r\n let url = \"tg://login?token=\" + encoded.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/\\=+$/, \"\");\r\n imageDiv.innerHTML = '';\r\n const qrCode = new QRCodeStyling({\r\n width: 166,\r\n height: 166,\r\n data: url,\r\n image: \"assets/img/logo_padded.svg\",\r\n dotsOptions: {\r\n color: \"#000000\",\r\n type: \"rounded\"\r\n },\r\n imageOptions: {\r\n imageSize: .75\r\n },\r\n backgroundOptions: {\r\n color: \"#ffffff\"\r\n },\r\n qrOptions: {\r\n errorCorrectionLevel: \"L\"\r\n }\r\n });\r\n qrCode.append(imageDiv);\r\n }\r\n let timestamp = Date.now() / 1000;\r\n let diff = loginToken.expires - timestamp - serverTimeManager_1.default.serverTimeOffset;\r\n yield new Promise((resolve, reject) => setTimeout(resolve, diff > 5 ? 5e3 : 1e3 * diff | 0));\r\n }\r\n catch (err) {\r\n switch (err.type) {\r\n case 'SESSION_PASSWORD_NEEDED':\r\n console.warn('pageSignQR: SESSION_PASSWORD_NEEDED');\r\n err.handled = true;\r\n pagePassword_1.default.mount();\r\n stop = true;\r\n cachedPromise = null;\r\n break;\r\n default:\r\n console.error('pageSignQR: default error:', err);\r\n break;\r\n }\r\n }\r\n } while (true);\r\n });\r\n});\r\nlet cachedPromise;\r\nconst page = new page_1.default('page-signQR', true, () => {\r\n return cachedPromise;\r\n}, () => {\r\n console.log('onMount');\r\n if (!cachedPromise)\r\n cachedPromise = onFirstMount();\r\n cachedPromise.then(func => {\r\n func();\r\n });\r\n});\r\nexports.default = page;\r\n"
},
{
"id": 73,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\qr-code-styling\\lib\\qr-code-styling.js",
"name": "./node_modules/qr-code-styling/lib/qr-code-styling.js",
"index": 75,
"index2": 72,
"size": 28504,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"issuerId": 72,
"issuerName": "./src/pages/pageSignQR.ts",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 32,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignIn.ts",
"name": "./src/pages/pageSignIn.ts",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
},
{
"id": 72,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"name": "./src/pages/pageSignQR.ts",
"profile": {
"factory": 676,
"building": 1235,
"dependencies": 1039
}
}
],
"profile": {
"factory": 2979,
"building": 103,
"dependencies": 2951
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 72,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\pages\\pageSignQR.ts",
"module": "./src/pages/pageSignQR.ts",
"moduleName": "./src/pages/pageSignQR.ts",
"type": "cjs require",
"userRequest": "qr-code-styling",
"loc": "54:50-76"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "!function(t,r){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=r():\"function\"==typeof define&&define.amd?define([],r):\"object\"==typeof exports?exports.QRCodeStyling=r():t.QRCodeStyling=r()}(window,function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&r&&\"string\"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,\"a\",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p=\"\",e(e.s=1)}([function(t,r,e){var n,o,i,a=function(){var t=function(t,r){var e=t,n=f[r],o=null,i=0,a=null,u=[],c={},s=function(t,r){o=function(t){for(var r=new Array(t),e=0;e<t;e+=1){r[e]=new Array(t);for(var n=0;n<t;n+=1)r[e][n]=null}return r}(i=4*e+17),h(0,0),h(i-7,0),h(0,i-7),g(),l(),v(t,r),e>=7&&d(t),null==a&&(a=w(e,n,u)),p(a,r)},h=function(t,r){for(var e=-1;e<=7;e+=1)if(!(t+e<=-1||i<=t+e))for(var n=-1;n<=7;n+=1)r+n<=-1||i<=r+n||(o[t+e][r+n]=0<=e&&e<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==e||6==e)||2<=e&&e<=4&&2<=n&&n<=4)},l=function(){for(var t=8;t<i-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var r=8;r<i-8;r+=1)null==o[6][r]&&(o[6][r]=r%2==0)},g=function(){for(var t=y.getPatternPosition(e),r=0;r<t.length;r+=1)for(var n=0;n<t.length;n+=1){var i=t[r],a=t[n];if(null==o[i][a])for(var u=-2;u<=2;u+=1)for(var f=-2;f<=2;f+=1)o[i+u][a+f]=-2==u||2==u||-2==f||2==f||0==u&&0==f}},d=function(t){for(var r=y.getBCHTypeNumber(e),n=0;n<18;n+=1){var a=!t&&1==(r>>n&1);o[Math.floor(n/3)][n%3+i-8-3]=a}for(n=0;n<18;n+=1){a=!t&&1==(r>>n&1);o[n%3+i-8-3][Math.floor(n/3)]=a}},v=function(t,r){for(var e=n<<3|r,a=y.getBCHTypeInfo(e),u=0;u<15;u+=1){var f=!t&&1==(a>>u&1);u<6?o[u][8]=f:u<8?o[u+1][8]=f:o[i-15+u][8]=f}for(u=0;u<15;u+=1){f=!t&&1==(a>>u&1);u<8?o[8][i-u-1]=f:u<9?o[8][15-u-1+1]=f:o[8][15-u-1]=f}o[i-8][8]=!t},p=function(t,r){for(var e=-1,n=i-1,a=7,u=0,f=y.getMaskFunction(r),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var s=0;s<2;s+=1)if(null==o[n][c-s]){var h=!1;u<t.length&&(h=1==(t[u]>>>a&1)),f(n,c-s)&&(h=!h),o[n][c-s]=h,-1==(a-=1)&&(u+=1,a=7)}if((n+=e)<0||i<=n){n-=e,e=-e;break}}},w=function(t,r,e){for(var n=x.getRSBlocks(t,r),o=b(),i=0;i<e.length;i+=1){var a=e[i];o.put(a.getMode(),4),o.put(a.getLength(),y.getLengthInBits(a.getMode(),t)),a.write(o)}var u=0;for(i=0;i<n.length;i+=1)u+=n[i].dataCount;if(o.getLengthInBits()>8*u)throw\"code length overflow. (\"+o.getLengthInBits()+\">\"+8*u+\")\";for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*u||(o.put(236,8),o.getLengthInBits()>=8*u));)o.put(17,8);return function(t,r){for(var e=0,n=0,o=0,i=new Array(r.length),a=new Array(r.length),u=0;u<r.length;u+=1){var f=r[u].dataCount,c=r[u].totalCount-f;n=Math.max(n,f),o=Math.max(o,c),i[u]=new Array(f);for(var s=0;s<i[u].length;s+=1)i[u][s]=255&t.getBuffer()[s+e];e+=f;var h=y.getErrorCorrectPolynomial(c),l=m(i[u],h.getLength()-1).mod(h);a[u]=new Array(h.getLength()-1);for(s=0;s<a[u].length;s+=1){var g=s+l.getLength()-a[u].length;a[u][s]=g>=0?l.getAt(g):0}}var d=0;for(s=0;s<r.length;s+=1)d+=r[s].totalCount;var v=new Array(d),p=0;for(s=0;s<n;s+=1)for(u=0;u<r.length;u+=1)s<i[u].length&&(v[p]=i[u][s],p+=1);for(s=0;s<o;s+=1)for(u=0;u<r.length;u+=1)s<a[u].length&&(v[p]=a[u][s],p+=1);return v}(o,n)};c.addData=function(t,r){var e=null;switch(r=r||\"Byte\"){case\"Numeric\":e=M(t);break;case\"Alphanumeric\":e=C(t);break;case\"Byte\":e=k(t);break;case\"Kanji\":e=_(t);break;default:throw\"mode:\"+r}u.push(e),a=null},c.isDark=function(t,r){if(t<0||i<=t||r<0||i<=r)throw t+\",\"+r;return o[t][r]},c.getModuleCount=function(){return i},c.make=function(){if(e<1){for(var t=1;t<40;t++){for(var r=x.getRSBlocks(t,n),o=b(),i=0;i<u.length;i++){var a=u[i];o.put(a.getMode(),4),o.put(a.getLength(),y.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(i=0;i<r.length;i++)f+=r[i].dataCount;if(o.getLengthInBits()<=8*f)break}e=t}s(!1,function(){for(var t=0,r=0,e=0;e<8;e+=1){s(!0,e);var n=y.getLostPoint(c);(0==e||t>n)&&(t=n,r=e)}return r}())},c.createTableTag=function(t,r){t=t||2;var e=\"\";e+='<table style=\"',e+=\" border-width: 0px; border-style: none;\",e+=\" border-collapse: collapse;\",e+=\" padding: 0px; margin: \"+(r=void 0===r?4*t:r)+\"px;\",e+='\">',e+=\"<tbody>\";for(var n=0;n<c.getModuleCount();n+=1){e+=\"<tr>\";for(var o=0;o<c.getModuleCount();o+=1)e+='<td style=\"',e+=\" border-width: 0px; border-style: none;\",e+=\" border-collapse: collapse;\",e+=\" padding: 0px; margin: 0px;\",e+=\" width: \"+t+\"px;\",e+=\" height: \"+t+\"px;\",e+=\" background-color: \",e+=c.isDark(n,o)?\"#000000\":\"#ffffff\",e+=\";\",e+='\"/>';e+=\"</tr>\"}return e+=\"</tbody>\",e+=\"</table>\"},c.createSvgTag=function(t,r,e,n){var o={};\"object\"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,e=o.alt,n=o.title),t=t||2,r=void 0===r?4*t:r,(e=\"string\"==typeof e?{text:e}:e||{}).text=e.text||null,e.id=e.text?e.id||\"qrcode-description\":null,(n=\"string\"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||\"qrcode-title\":null;var i,a,u,f,s=c.getModuleCount()*t+2*r,h=\"\";for(f=\"l\"+t+\",0 0,\"+t+\" -\"+t+\",0 0,-\"+t+\"z \",h+='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"',h+=o.scalable?\"\":' width=\"'+s+'px\" height=\"'+s+'px\"',h+=' viewBox=\"0 0 '+s+\" \"+s+'\" ',h+=' preserveAspectRatio=\"xMinYMin meet\"',h+=n.text||e.text?' role=\"img\" aria-labelledby=\"'+A([n.id,e.id].join(\" \").trim())+'\"':\"\",h+=\">\",h+=n.text?'<title id=\"'+A(n.id)+'\">'+A(n.text)+\"</title>\":\"\",h+=e.text?'<description id=\"'+A(e.id)+'\">'+A(e.text)+\"</description>\":\"\",h+='<rect width=\"100%\" height=\"100%\" fill=\"white\" cx=\"0\" cy=\"0\"/>',h+='<path d=\"',a=0;a<c.getModuleCount();a+=1)for(u=a*t+r,i=0;i<c.getModuleCount();i+=1)c.isDark(a,i)&&(h+=\"M\"+(i*t+r)+\",\"+u+f);return h+='\" stroke=\"transparent\" fill=\"black\"/>',h+=\"</svg>\"},c.createDataURL=function(t,r){t=t||2,r=void 0===r?4*t:r;var e=c.getModuleCount()*t+2*r,n=r,o=e-r;return D(e,e,function(r,e){if(n<=r&&r<o&&n<=e&&e<o){var i=Math.floor((r-n)/t),a=Math.floor((e-n)/t);return c.isDark(a,i)?0:1}return 1})},c.createImgTag=function(t,r,e){t=t||2,r=void 0===r?4*t:r;var n=c.getModuleCount()*t+2*r,o=\"\";return o+=\"<img\",o+=' src=\"',o+=c.createDataURL(t,r),o+='\"',o+=' width=\"',o+=n,o+='\"',o+=' height=\"',o+=n,o+='\"',e&&(o+=' alt=\"',o+=A(e),o+='\"'),o+=\"/>\"};var A=function(t){for(var r=\"\",e=0;e<t.length;e+=1){var n=t.charAt(e);switch(n){case\"<\":r+=\"&lt;\";break;case\">\":r+=\"&gt;\";break;case\"&\":r+=\"&amp;\";break;case'\"':r+=\"&quot;\";break;default:r+=n}}return r};return c.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,e,n,o,i,a=1*c.getModuleCount()+2*t,u=t,f=a-t,s={\"██\":\"█\",\"█ \":\"▀\",\" █\":\"▄\",\" \":\" \"},h={\"██\":\"▀\",\"█ \":\"▀\",\" █\":\" \",\" \":\" \"},l=\"\";for(r=0;r<a;r+=2){for(n=Math.floor((r-u)/1),o=Math.floor((r+1-u)/1),e=0;e<a;e+=1)i=\"█\",u<=e&&e<f&&u<=r&&r<f&&c.isDark(n,Math.floor((e-u)/1))&&(i=\" \"),u<=e&&e<f&&u<=r+1&&r+1<f&&c.isDark(o,Math.floor((e-u)/1))?i+=\" \":i+=\"█\",l+=t<1&&r+1>=f?h[i]:s[i];l+=\"\\n\"}return a%2&&t>0?l.substring(0,l.length-a-1)+Array(a+1).join(\"▀\"):l.substring(0,l.length-1)}(r);t-=1,r=void 0===r?2*t:r;var e,n,o,i,a=c.getModuleCount()*t+2*r,u=r,f=a-r,s=Array(t+1).join(\"██\"),h=Array(t+1).join(\" \"),l=\"\",g=\"\";for(e=0;e<a;e+=1){for(o=Math.floor((e-u)/t),g=\"\",n=0;n<a;n+=1)i=1,u<=n&&n<f&&u<=e&&e<f&&c.isDark(o,Math.floor((n-u)/t))&&(i=0),g+=i?s:h;for(o=0;o<t;o+=1)l+=g+\"\\n\"}return l.substring(0,l.length-1)},c.renderTo2dContext=function(t,r){r=r||2;for(var e=c.getModuleCount(),n=0;n<e;n++)for(var o=0;o<e;o++)t.fillStyle=c.isDark(n,o)?\"black\":\"white\",t.fillRect(n*r,o*r,r,r)},c};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var r=[],e=0;e<t.length;e+=1){var n=t.charCodeAt(e);r.push(255&n)}return r}}).default,t.createStringToBytes=function(t,r){var e=function(){for(var e=B(t),n=function(){var t=e.read();if(-1==t)throw\"eof\";return t},o=0,i={};;){var a=e.read();if(-1==a)break;var u=n(),f=n()<<8|n();i[String.fromCharCode(a<<8|u)]=f,o+=1}if(o!=r)throw o+\" != \"+r;return i}(),n=\"?\".charCodeAt(0);return function(t){for(var r=[],o=0;o<t.length;o+=1){var i=t.charCodeAt(o);if(i<128)r.push(i);else{var a=e[t.charAt(o)];\"number\"==typeof a?(255&a)==a?r.push(a):(r.push(a>>>8),r.push(255&a)):r.push(n)}}return r}};var r,e,n,o=1,i=2,a=4,u=8,f={L:1,M:0,Q:3,H:2},c=0,s=1,h=2,l=3,g=4,d=5,v=6,p=7,y=(r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(e={}).getBCHTypeInfo=function(t){for(var r=t<<10;n(r)-n(1335)>=0;)r^=1335<<n(r)-n(1335);return 21522^(t<<10|r)},e.getBCHTypeNumber=function(t){for(var r=t<<12;n(r)-n(7973)>=0;)r^=7973<<n(r)-n(7973);return t<<12|r},e.getPatternPosition=function(t){return r[t-1]},e.getMaskFunction=function(t){switch(t){case c:return function(t,r){return(t+r)%2==0};case s:return function(t,r){return t%2==0};case h:return function(t,r){return r%3==0};case l:return function(t,r){return(t+r)%3==0};case g:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case d:return function(t,r){return t*r%2+t*r%3==0};case v:return function(t,r){return(t*r%2+t*r%3)%2==0};case p:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw\"bad maskPattern:\"+t}},e.getErrorCorrectPolynomial=function(t){for(var r=m([1],0),e=0;e<t;e+=1)r=r.multiply(m([1,w.gexp(e)],0));return r},e.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case o:return 10;case i:return 9;case a:case u:return 8;default:throw\"mode:\"+t}else if(r<27)switch(t){case o:return 12;case i:return 11;case a:return 16;case u:return 10;default:throw\"mode:\"+t}else{if(!(r<41))throw\"type:\"+r;switch(t){case o:return 14;case i:return 13;case a:return 16;case u:return 12;default:throw\"mode:\"+t}}},e.getLostPoint=function(t){for(var r=t.getModuleCount(),e=0,n=0;n<r;n+=1)for(var o=0;o<r;o+=1){for(var i=0,a=t.isDark(n,o),u=-1;u<=1;u+=1)if(!(n+u<0||r<=n+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(n+u,o+f)&&(i+=1);i>5&&(e+=3+i-5)}for(n=0;n<r-1;n+=1)for(o=0;o<r-1;o+=1){var c=0;t.isDark(n,o)&&(c+=1),t.isDark(n+1,o)&&(c+=1),t.isDark(n,o+1)&&(c+=1),t.isDark(n+1,o+1)&&(c+=1),0!=c&&4!=c||(e+=3)}for(n=0;n<r;n+=1)for(o=0;o<r-6;o+=1)t.isDark(n,o)&&!t.isDark(n,o+1)&&t.isDark(n,o+2)&&t.isDark(n,o+3)&&t.isDark(n,o+4)&&!t.isDark(n,o+5)&&t.isDark(n,o+6)&&(e+=40);for(o=0;o<r;o+=1)for(n=0;n<r-6;n+=1)t.isDark(n,o)&&!t.isDark(n+1,o)&&t.isDark(n+2,o)&&t.isDark(n+3,o)&&t.isDark(n+4,o)&&!t.isDark(n+5,o)&&t.isDark(n+6,o)&&(e+=40);var s=0;for(o=0;o<r;o+=1)for(n=0;n<r;n+=1)t.isDark(n,o)&&(s+=1);return e+=Math.abs(100*s/r/r-50)/5*10},e),w=function(){for(var t=new Array(256),r=new Array(256),e=0;e<8;e+=1)t[e]=1<<e;for(e=8;e<256;e+=1)t[e]=t[e-4]^t[e-5]^t[e-6]^t[e-8];for(e=0;e<255;e+=1)r[t[e]]=e;var n={glog:function(t){if(t<1)throw\"glog(\"+t+\")\";return r[t]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return t[r]}};return n}();function m(t,r){if(void 0===t.length)throw t.length+\"/\"+r;var e=function(){for(var e=0;e<t.length&&0==t[e];)e+=1;for(var n=new Array(t.length-e+r),o=0;o<t.length-e;o+=1)n[o]=t[o+e];return n}(),n={getAt:function(t){return e[t]},getLength:function(){return e.length},multiply:function(t){for(var r=new Array(n.getLength()+t.getLength()-1),e=0;e<n.getLength();e+=1)for(var o=0;o<t.getLength();o+=1)r[e+o]^=w.gexp(w.glog(n.getAt(e))+w.glog(t.getAt(o)));return m(r,0)},mod:function(t){if(n.getLength()-t.getLength()<0)return n;for(var r=w.glog(n.getAt(0))-w.glog(t.getAt(0)),e=new Array(n.getLength()),o=0;o<n.getLength();o+=1)e[o]=n.getAt(o);for(o=0;o<t.getLength();o+=1)e[o]^=w.gexp(w.glog(t.getAt(o))+r);return m(e,0).mod(t)}};return n}var x=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(t,r){var e={};return e.totalCount=t,e.dataCount=r,e},e={};return e.getRSBlocks=function(e,n){var o=function(r,e){switch(e){case f.L:return t[4*(r-1)+0];case f.M:return t[4*(r-1)+1];case f.Q:return t[4*(r-1)+2];case f.H:return t[4*(r-1)+3];default:return}}(e,n);if(void 0===o)throw\"bad rs block @ typeNumber:\"+e+\"/errorCorrectionLevel:\"+n;for(var i=o.length/3,a=[],u=0;u<i;u+=1)for(var c=o[3*u+0],s=o[3*u+1],h=o[3*u+2],l=0;l<c;l+=1)a.push(r(s,h));return a},e}(),b=function(){var t=[],r=0,e={getBuffer:function(){return t},getAt:function(r){var e=Math.floor(r/8);return 1==(t[e]>>>7-r%8&1)},put:function(t,r){for(var n=0;n<r;n+=1)e.putBit(1==(t>>>r-n-1&1))},getLengthInBits:function(){return r},putBit:function(e){var n=Math.floor(r/8);t.length<=n&&t.push(0),e&&(t[n]|=128>>>r%8),r+=1}};return e},M=function(t){var r=o,e=t,n={getMode:function(){return r},getLength:function(t){return e.length},write:function(t){for(var r=e,n=0;n+2<r.length;)t.put(i(r.substring(n,n+3)),10),n+=3;n<r.length&&(r.length-n==1?t.put(i(r.substring(n,n+1)),4):r.length-n==2&&t.put(i(r.substring(n,n+2)),7))}},i=function(t){for(var r=0,e=0;e<t.length;e+=1)r=10*r+a(t.charAt(e));return r},a=function(t){if(\"0\"<=t&&t<=\"9\")return t.charCodeAt(0)-\"0\".charCodeAt(0);throw\"illegal char :\"+t};return n},C=function(t){var r=i,e=t,n={getMode:function(){return r},getLength:function(t){return e.length},write:function(t){for(var r=e,n=0;n+1<r.length;)t.put(45*o(r.charAt(n))+o(r.charAt(n+1)),11),n+=2;n<r.length&&t.put(o(r.charAt(n)),6)}},o=function(t){if(\"0\"<=t&&t<=\"9\")return t.charCodeAt(0)-\"0\".charCodeAt(0);if(\"A\"<=t&&t<=\"Z\")return t.charCodeAt(0)-\"A\".charCodeAt(0)+10;switch(t){case\" \":return 36;case\"$\":return 37;case\"%\":return 38;case\"*\":return 39;case\"+\":return 40;case\"-\":return 41;case\".\":return 42;case\"/\":return 43;case\":\":return 44;default:throw\"illegal char :\"+t}};return n},k=function(r){var e=a,n=t.stringToBytes(r),o={getMode:function(){return e},getLength:function(t){return n.length},write:function(t){for(var r=0;r<n.length;r+=1)t.put(n[r],8)}};return o},_=function(r){var e=u,n=t.stringToBytesFuncs.SJIS;if(!n)throw\"sjis not supported.\";!function(t,r){var e=n(\"友\");if(2!=e.length||38726!=(e[0]<<8|e[1]))throw\"sjis not supported.\"}();var o=n(r),i={getMode:function(){return e},getLength:function(t){return~~(o.length/2)},write:function(t){for(var r=o,e=0;e+1<r.length;){var n=(255&r[e])<<8|255&r[e+1];if(33088<=n&&n<=40956)n-=33088;else{if(!(57408<=n&&n<=60351))throw\"illegal char at \"+(e+1)+\"/\"+n;n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13),e+=2}if(e<r.length)throw\"illegal char at \"+(e+1)}};return i},A=function(){var t=[],r={writeByte:function(r){t.push(255&r)},writeShort:function(t){r.writeByte(t),r.writeByte(t>>>8)},writeBytes:function(t,e,n){e=e||0,n=n||t.length;for(var o=0;o<n;o+=1)r.writeByte(t[o+e])},writeString:function(t){for(var e=0;e<t.length;e+=1)r.writeByte(t.charCodeAt(e))},toByteArray:function(){return t},toString:function(){var r=\"\";r+=\"[\";for(var e=0;e<t.length;e+=1)e>0&&(r+=\",\"),r+=t[e];return r+=\"]\"}};return r},B=function(t){var r=t,e=0,n=0,o=0,i={read:function(){for(;o<8;){if(e>=r.length){if(0==o)return-1;throw\"unexpected end of file./\"+o}var t=r.charAt(e);if(e+=1,\"=\"==t)return o=0,-1;t.match(/^\\s$/)||(n=n<<6|a(t.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw\"c:\"+t};return i},D=function(t,r,e){for(var n=function(t,r){var e=t,n=r,o=new Array(t*r),i={setPixel:function(t,r,n){o[r*e+t]=n},write:function(t){t.writeString(\"GIF87a\"),t.writeShort(e),t.writeShort(n),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(\",\"),t.writeShort(0),t.writeShort(0),t.writeShort(e),t.writeShort(n),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(\";\")}},a=function(t){for(var r=1<<t,e=1+(1<<t),n=t+1,i=u(),a=0;a<r;a+=1)i.add(String.fromCharCode(a));i.add(String.fromCharCode(r)),i.add(String.fromCharCode(e));var f=A(),c=function(t){var r=t,e=0,n=0,o={write:function(t,o){if(t>>>o!=0)throw\"length over\";for(;e+o>=8;)r.writeByte(255&(t<<e|n)),o-=8-e,t>>>=8-e,n=0,e=0;n|=t<<e,e+=o},flush:function(){e>0&&r.writeByte(n)}};return o}(f);c.write(r,n);var s=0,h=String.fromCharCode(o[s]);for(s+=1;s<o.length;){var l=String.fromCharCode(o[s]);s+=1,i.contains(h+l)?h+=l:(c.write(i.indexOf(h),n),i.size()<4095&&(i.size()==1<<n&&(n+=1),i.add(h+l)),h=l)}return c.write(i.indexOf(h),n),c.write(e,n),c.flush(),f.toByteArray()},u=function(){var t={},r=0,e={add:function(n){if(e.contains(n))throw\"dup key:\"+n;t[n]=r,r+=1},size:function(){return r},indexOf:function(r){return t[r]},contains:function(r){return void 0!==t[r]}};return e};return i}(t,r),o=0;o<r;o+=1)for(var i=0;i<t;i+=1)n.setPixel(i,o,e(i,o));var a=A();n.write(a);for(var u=function(){var t=0,r=0,e=0,n=\"\",o={},i=function(t){n+=String.fromCharCode(a(63&t))},a=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw\"n:\"+t};return o.writeByte=function(n){for(t=t<<8|255&n,r+=8,e+=1;r>=6;)i(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(i(t<<6-r),t=0,r=0),e%3!=0)for(var o=3-e%3,a=0;a<o;a+=1)n+=\"=\"},o.toString=function(){return n},o}(),f=a.toByteArray(),c=0;c<f.length;c+=1)u.writeByte(f[c]);return u.flush(),\"data:image/gif;base64,\"+u};return t}();a.stringToBytesFuncs[\"UTF-8\"]=function(t){return function(t){for(var r=[],e=0;e<t.length;e++){var n=t.charCodeAt(e);n<128?r.push(n):n<2048?r.push(192|n>>6,128|63&n):n<55296||n>=57344?r.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&t.charCodeAt(e)),r.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return r}(t)},o=[],void 0===(i=\"function\"==typeof(n=function(){return a})?n.apply(r,o):n)||(t.exports=i)},function(t,r,e){\"use strict\";e.r(r);var n={numeric:\"Numeric\",alphanumeric:\"Alphanumeric\",byte:\"Byte\",kanji:\"Kanji\"};var o=function(){return(o=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},i=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n},a=function(t){return!!t&&\"object\"==typeof t&&!Array.isArray(t)};function u(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];if(!r.length)return t;var n=r.shift();return void 0!==n&&a(t)&&a(n)?(t=o({},t),Object.keys(n).forEach(function(r){var e=t[r],o=n[r];Array.isArray(e)&&Array.isArray(o)?t[r]=e.concat(o):a(e)&&a(o)?t[r]=u(Object.assign({},e),o):t[r]=o}),u.apply(void 0,i([t],r))):t}for(var f={L:.07,M:.15,Q:.25,H:.3},c=function(){function t(t){var r=t.context,e=t.type;this._context=r,this._type=e}return t.prototype.draw=function(t,r,e,n){var o,i=this._context;switch(this._type){case\"dots\":o=this._drawDots;break;case\"rounded\":o=this._drawRounded;break;case\"square\":default:o=this._drawSquare}o({x:t,y:r,size:e,context:i,getNeighbor:n})},t.prototype._drawDots=function(t){var r=t.x,e=t.y,n=t.size,o=t.context;o.beginPath(),o.arc(r+n/2,e+n/2,n/2,0,2*Math.PI),o.fill()},t.prototype._drawSquare=function(t){var r=t.x,e=t.y,n=t.size;t.context.fillRect(r,e,n,n)},t.prototype._drawRounded=function(t){var r=t.x,e=t.y,n=t.size,o=t.context,i=t.getNeighbor;o.beginPath(),o.moveTo(r,e+n/2),i(-1,0)||i(0,-1)?(o.lineTo(r,e),o.lineTo(r+n/2,e)):o.arc(r+n/2,e+n/2,n/2,-Math.PI,-Math.PI/2),i(0,-1)||i(1,0)?(o.lineTo(r+n,e),o.lineTo(r+n,e+n/2)):o.arc(r+n/2,e+n/2,n/2,-Math.PI/2,0),i(1,0)||i(0,1)?(o.lineTo(r+n,e+n),o.lineTo(r+n/2,e+n)):o.arc(r+n/2,e+n/2,n/2,0,Math.PI/2),i(0,1)||i(-1,0)?(o.lineTo(r,e+n),o.lineTo(r,e+n/2)):o.arc(r+n/2,e+n/2,n/2,Math.PI/2,Math.PI),o.fill()},t}(),s=function(){function t(t){this._canvas=document.createElement(\"canvas\"),this._canvas.width=t.width,this._canvas.height=t.height,this._options=t}return Object.defineProperty(t.prototype,\"context\",{get:function(){return this._canvas.getContext(\"2d\")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"width\",{get:function(){return this._canvas.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"height\",{get:function(){return this._canvas.height},enumerable:!0,configurable:!0}),t.prototype.getCanvas=function(){return this._canvas},t.prototype.clear=function(){var t=this.context;t&&t.clearRect(0,0,this._canvas.width,this._canvas.height)},t.prototype.drawQR=function(t){return this.clear(),this.drawBackground(),this._qr=t,this._options.image?this.drawImageAndDots():(this.drawDots(),Promise.resolve())},t.prototype.drawBackground=function(){var t=this.context,r=this._options;t&&(t.fillStyle=r.backgroundOptions.color,t.fillRect(0,0,this._canvas.width,this._canvas.height))},t.prototype.drawDots=function(t){var r=this;if(!this._qr)throw\"QR code is not defined\";var e=this.context;if(!e)throw\"QR code is not defined\";var n=this._options,o=this._qr.getModuleCount();if(o>n.width||o>n.height)throw\"The canvas is too small.\";for(var i=Math.min(n.width,n.height),a=Math.floor(i/o),u=Math.floor((n.width-o*a)/2),f=Math.floor((n.height-o*a)/2),s=new c({context:e,type:n.dotsOptions.type}),h=function(i){for(var c=function(c){return t&&!t(i,c)?\"continue\":l._qr.isDark(i,c)?(e.fillStyle=n.dotsOptions.color,void s.draw(u+i*a,f+c*a,a,function(e,n){return!(i+e<0||c+n<0||i+e>=o||c+n>=o)&&(!(t&&!t(i+e,c+n))&&(!!r._qr&&r._qr.isDark(i+e,c+n)))})):\"continue\"},h=0;h<o;h++)c(h)},l=this,g=0;g<o;g++)h(g)},t.prototype.drawImageAndDots=function(){var t=this;return new Promise(function(r,e){if(!t._qr)return e(\"QR code is not defined\");var n=t.context;if(!n)return e(\"QR code is not defined\");var o=t._options,i=t._qr.getModuleCount(),a=Math.min(o.width,o.height),u=Math.floor(a/i),c=Math.floor((o.width-i*u)/2),s=Math.floor((o.height-i*u)/2),h=new Image,l=o.imageOptions.imageSize*f[o.qrOptions.errorCorrectionLevel];if(!o.image)return e(\"Image is not defined\");t._image=h,h.onload=function(){var e=Math.floor(l*i*i),a=function(t){var r=t.originalHeight,e=t.originalWidth,n=t.maxHiddenDots,o=t.maxHiddenAxisDots,i=t.dotSize,a={x:0,y:0},u={x:0,y:0};if(r<=0||e<=0||n<=0||i<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var f=r/e;return a.x=Math.floor(Math.sqrt(n/f)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,u.x=a.x*i,a.y=1+2*Math.ceil((a.x*f-1)/2),u.y=Math.round(u.x*f),(a.y*a.x>n||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,u.y=a.y*i,a.x=1+2*Math.ceil((a.y/f-1)/2),u.x=Math.round(u.y/f)),{height:u.y,width:u.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:h.width,originalHeight:h.height,maxHiddenDots:e,maxHiddenAxisDots:i-14,dotSize:u}),f=a.width,g=a.height,d=a.hideXDots,v=a.hideYDots;t.drawDots(function(t,r){return!o.imageOptions.hideBackgroundDots||(t<(i-d)/2||t>=(i+d)/2||r<(i-v)/2||r>=(i+v)/2)}),n.drawImage(h,c+(i*u-f)/2,s+(i*u-g)/2,f,g),r()},h.src=o.image})},t}(),h={},l=0;l<=40;l++)h[l]=l;var g=h,d={L:\"L\",M:\"M\",Q:\"Q\",H:\"H\"},v={width:300,height:300,data:void 0,image:void 0,qrOptions:{typeNumber:g[0],mode:void 0,errorCorrectionLevel:d.Q},imageOptions:{hideBackgroundDots:!0,imageSize:.4},dotsOptions:{type:\"square\",color:\"#000\"},backgroundOptions:{color:\"#fff\"}},p=e(0),y=e.n(p),w=function(){function t(t){this._options=t?u(v,t):v,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML=\"\")},t.prototype.update=function(r){t._clearContainer(this._container),this._options=r?u(this._options,r):this._options,this._options.data&&(this._qr=y()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return n.numeric;case/^[0-9A-Z $%*+\\-.\\/:]*$/.test(t):return n.alphanumeric;default:return n.byte}}(this._options.data)),this._qr.make(),this._canvas=new s(this._options),this._canvas.drawQR(this._qr),this.append(this._container))},t.prototype.append=function(t){if(t){if(\"function\"!=typeof t.appendChild)throw\"Container should be a single DOM node\";this._canvas&&t.appendChild(this._canvas.getCanvas()),this._container=t}},t.prototype.download=function(t){if(this._canvas){var r,e,n,o=this._canvas.getCanvas().toDataURL(t?\"image/\"+t:void 0);r=o,e=\"qr.\"+(t||\"png\"),(n=document.createElement(\"a\")).download=e,n.href=r,document.body.appendChild(n),n.click(),document.body.removeChild(n)}},t}(),m={dots:\"dots\",rounded:\"rounded\",square:\"square\"};e.d(r,\"dotTypes\",function(){return m}),e.d(r,\"errorCorrectionLevels\",function(){return d}),e.d(r,\"errorCorrectionPercents\",function(){return f}),e.d(r,\"modes\",function(){return n}),e.d(r,\"qrTypes\",function(){return g});r.default=w}]).default});\n//# sourceMappingURL=qr-code-styling.js.map"
},
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"index": 76,
"index2": 81,
"size": 1985,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 122,
"building": 1761
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "./src/lib/webp.ts",
"loc": "webp"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.WebpMachine = exports.WebpMachineError = void 0;\r\nconst webp_js_1 = require(\"webp-hero/libwebp/dist/webp.js\");\r\nconst relax = () => new Promise(resolve => requestAnimationFrame(resolve));\r\nclass WebpMachineError extends Error {\r\n}\r\nexports.WebpMachineError = WebpMachineError;\r\n/**\r\n * Webp Machine\r\n * - decode and polyfill webp images\r\n * - can only decode images one-at-a-time (otherwise will throw busy error)\r\n */\r\nclass WebpMachine {\r\n constructor() {\r\n this.busy = false;\r\n this.webp = new webp_js_1.Webp();\r\n this.webp.Module.doNotCaptureKeyboard = true;\r\n }\r\n /**\r\n * Decode raw webp data into a png data url\r\n */\r\n decode(webpData) {\r\n if (this.busy)\r\n throw new WebpMachineError(\"cannot decode when already busy\");\r\n this.busy = true;\r\n try {\r\n return relax().then(() => {\r\n const canvas = document.createElement(\"canvas\");\r\n this.webp.setCanvas(canvas);\r\n this.webp.webpToSdl(webpData, webpData.length);\r\n this.busy = false;\r\n return new Promise((resolve, reject) => {\r\n canvas.toBlob(blob => {\r\n let reader = new FileReader();\r\n reader.onload = (event) => {\r\n resolve(new Uint8Array(event.target.result));\r\n };\r\n reader.onerror = reject;\r\n reader.readAsArrayBuffer(blob);\r\n }, 'image/png', 1);\r\n });\r\n });\r\n }\r\n catch (error) {\r\n this.busy = false;\r\n error.name = WebpMachineError.name;\r\n error.message = `failed to decode webp image: ${error.message}`;\r\n throw error;\r\n }\r\n }\r\n}\r\nexports.WebpMachine = WebpMachine;\r\nwindow.WebpMachine = WebpMachine;\r\n"
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"index": 77,
"index2": 80,
"size": 373419,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
2
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"issuerId": 74,
"issuerName": "./src/lib/webp.ts",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
}
],
"profile": {
"factory": 74,
"building": 621
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 74,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"module": "./src/lib/webp.ts",
"moduleName": "./src/lib/webp.ts",
"type": "cjs require",
"userRequest": "webp-hero/libwebp/dist/webp.js",
"loc": "4:18-59"
}
],
"usedExports": true,
"providedExports": [
"Webp"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module uses injected variables (setImmediate)"
],
"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<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);ret=convertReturnValue(ret);if(stack!==0)stackRestore(stack);return ret}function cwrap(ident,returnType,argTypes,opts){argTypes=argTypes||[];var numericArgs=argTypes.every(function(type){return type===\"number\"});var numericRet=returnType!==\"string\";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}function setValue(ptr,value,type,noSafe){type=type||\"i8\";if(type.charAt(type.length-1)===\"*\")type=\"i32\";switch(type){case\"i1\":HEAP8[ptr>>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<endPtr){var u0=u8Array[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|u8Array[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>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<str.length;++i){var u=str.charCodeAt(i);if(u>=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<str.length;++i){var u=str.charCodeAt(i);if(u>=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<str.length;++i){HEAP8[buffer++>>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<TOTAL_STACK)err(\"TOTAL_MEMORY should be larger than TOTAL_STACK, was \"+INITIAL_TOTAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\");if(Module[\"buffer\"]){buffer=Module[\"buffer\"]}else{{buffer=new ArrayBuffer(INITIAL_TOTAL_MEMORY)}}updateGlobalBufferViews();HEAP32[DYNAMICTOP_PTR>>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<arr.length;start++){if(arr[start]!==\"\")break}var end=arr.length-1;for(;end>=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;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push(\"..\")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join(\"/\")}};function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method=\"timeout\"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method=\"rAF\"}else if(mode==2){if(typeof setImmediate===\"undefined\"){var setImmediates=[];var emscriptenMainLoopMessageId=\"setimmediate\";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener(\"message\",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module[\"setImmediates\"]===undefined)Module[\"setImmediates\"]=[];Module[\"setImmediates\"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,\"*\")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method=\"immediate\"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){Module[\"noExitRuntime\"]=true;assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var browserIterationFunc;if(typeof arg!==\"undefined\"){browserIterationFunc=function(){Module[\"dynCall_vi\"](func,arg)}}else{browserIterationFunc=function(){Module[\"dynCall_v\"](func)}}var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){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(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;setTimeout(Browser.mainLoop.runner,0);return}if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&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(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;if(typeof SDL===\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0)_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<expected){Module[\"setStatus\"](message+\" (\"+(expected-remaining)+\"/\"+expected+\")\")}else{Module[\"setStatus\"](message)}}else{Module[\"setStatus\"](\"\")}}},runIter:function(func){if(ABORT)return;if(Module[\"preMainLoop\"]){var preRet=Module[\"preMainLoop\"]();if(preRet===false){return}}try{func()}catch(e){if(e instanceof ExitStatus){return}else{if(e&&typeof e===\"object\"&&e.stack)err(\"exception thrown: \"+[e,e.stack]);throw e}}if(Module[\"postMainLoop\"])Module[\"postMainLoop\"]()}},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(!Module[\"preloadPlugins\"])Module[\"preloadPlugins\"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;console.log(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder!=\"undefined\"?MozBlobBuilder:typeof WebKitBlobBuilder!=\"undefined\"?WebKitBlobBuilder:!Browser.hasBlobConstructor?console.log(\"warning: no BlobBuilder\"):null;Browser.URLObject=typeof window!=\"undefined\"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject===\"undefined\"){console.log(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\");Module.noImageDecoding=true}var imagePlugin={};imagePlugin[\"canHandle\"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin[\"handle\"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([new Uint8Array(byteArray).buffer],{type:Browser.getMimetype(name)})}}catch(e){warnOnce(\"Blob constructor present but fails: \"+e+\"; falling back to blob builder\")}}if(!b){var bb=new Browser.BlobBuilder;bb.append(new Uint8Array(byteArray).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);var img=new Image;img.onload=function img_onload(){assert(img.complete,\"Image \"+name+\" could not be decoded\");var canvas=document.createElement(\"canvas\");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext(\"2d\");ctx.drawImage(img,0,0);Module[\"preloadedImages\"][name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=function img_onerror(event){console.log(\"Image \"+url+\" could not be decoded\");if(onerror)onerror()};img.src=url};Module[\"preloadPlugins\"].push(imagePlugin);var audioPlugin={};audioPlugin[\"canHandle\"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}};audioPlugin[\"handle\"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;Module[\"preloadedAudios\"][name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;Module[\"preloadedAudios\"][name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);var audio=new Audio;audio.addEventListener(\"canplaythrough\",function(){finish(audio)},false);audio.onerror=function audio_onerror(event){if(done)return;console.log(\"warning: browser could not fully decode audio \"+name+\", trying slower base64 approach\");function encode64(data){var BASE=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";var PAD=\"=\";var ret=\"\";var leftchar=0;var leftbits=0;for(var i=0;i<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=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/h<Module[\"forcedAspectRatio\"]){w=Math.round(h*Module[\"forcedAspectRatio\"])}else{h=Math.round(w/Module[\"forcedAspectRatio\"])}}if((document[\"fullscreenElement\"]||document[\"mozFullScreenElement\"]||document[\"msFullscreenElement\"]||document[\"webkitFullscreenElement\"]||document[\"webkitCurrentFullScreenElement\"])===canvas.parentNode&&typeof screen!=\"undefined\"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!=\"undefined\"){canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!=\"undefined\"){if(w!=wNative||h!=hNative){canvas.style.setProperty(\"width\",w+\"px\",\"important\");canvas.style.setProperty(\"height\",h+\"px\",\"important\")}else{canvas.style.removeProperty(\"width\");canvas.style.removeProperty(\"height\")}}}},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var handle=Browser.nextWgetRequestHandle;Browser.nextWgetRequestHandle++;return handle}};function _SDL_GetTicks(){return Date.now()-SDL.startTime|0}function _SDL_LockSurface(surf){var surfData=SDL.surfaces[surf];surfData.locked++;if(surfData.locked>1)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<num/4;i++){data[i*4+3]=255}}if(SDL.defaults.copyOnLock&&!SDL.defaults.discardOnLock){if(surfData.isFlagSet(2097152)){throw\"CopyOnLock is not supported for SDL_LockSurface with SDL_HWPALETTE flag set\"+(new Error).stack}else{HEAPU8.set(surfData.image.data,surfData.buffer)}}return 0}var SDL={defaults:{width:320,height:200,copyOnLock:true,discardOnLock:false,opaqueFrontBuffer:true},version:null,surfaces:{},canvasPool:[],events:[],fonts:[null],audios:[null],rwops:[null],music:{audio:null,volume:1},mixerFrequency:22050,mixerFormat:32784,mixerNumChannels:2,mixerChunkSize:1024,channelMinimumNumber:0,GL:false,glAttributes:{0:3,1:3,2:2,3:0,4:0,5:1,6:16,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:1,16:0,17:0,18:0},keyboardState:null,keyboardMap:{},canRequestFullscreen:false,isRequestingFullscreen:false,textInput:false,startTime:null,initFlags:0,buttonState:0,modState:0,DOMButtons:[0,0,0],DOMEventToSDLEvent:{},TOUCH_DEFAULT_ID:0,eventHandler:null,eventHandlerContext:null,eventHandlerTemp:0,keyCodes:{16:1249,17:1248,18:1250,20:1081,33:1099,34:1102,35:1101,36:1098,37:1104,38:1106,39:1103,40:1105,44:316,45:1097,46:127,91:1251,93:1125,96:1122,97:1113,98:1114,99:1115,100:1116,101:1117,102:1118,103:1119,104:1120,105:1121,106:1109,107:1111,109:1110,110:1123,111:1108,112:1082,113:1083,114:1084,115:1085,116:1086,117:1087,118:1088,119:1089,120:1090,121:1091,122:1092,123:1093,124:1128,125:1129,126:1130,127:1131,128:1132,129:1133,130:1134,131:1135,132:1136,133:1137,134:1138,135:1139,144:1107,160:94,161:33,162:34,163:35,164:36,165:37,166:38,167:95,168:40,169:41,170:42,171:43,172:124,173:45,174:123,175:125,176:126,181:127,182:129,183:128,188:44,190:46,191:47,192:96,219:91,220:92,221:93,222:39,224:1251},scanCodes:{8:42,9:43,13:40,27:41,32:44,35:204,39:53,44:54,46:55,47:56,48:39,49:30,50:31,51:32,52:33,53:34,54:35,55:36,56:37,57:38,58:203,59:51,61:46,91:47,92:49,93:48,96:52,97:4,98:5,99:6,100:7,101:8,102:9,103:10,104:11,105:12,106:13,107:14,108:15,109:16,110:17,111:18,112:19,113:20,114:21,115:22,116:23,117:24,118:25,119:26,120:27,121:28,122:29,127:76,305:224,308:226,316:70},loadRect:function(rect){return{x:HEAP32[rect+0>>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<endY;++y){var base=y*fullWidth;for(var x=startX;x<endX;++x){data32[base+x]=colors32[HEAPU8[buffer+base+x>>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;i<event.touches.length;i++){var touch=event.touches[i];if(SDL.downFingers[touch.identifier]!=true){SDL.downFingers[touch.identifier]=true;touches.push(touch)}}}else{touches=event.touches}var firstTouch=touches[0];if(firstTouch){if(event.type==\"touchstart\"){SDL.DOMButtons[0]=1}var mouseEventType;switch(event.type){case\"touchstart\":mouseEventType=\"mousedown\";break;case\"touchmove\":mouseEventType=\"mousemove\";break}var mouseEvent={type:mouseEventType,button:0,pageX:firstTouch.clientX,pageY:firstTouch.clientY};SDL.events.push(mouseEvent)}for(var i=0;i<touches.length;i++){var touch=touches[i];SDL.events.push({type:event.type,touch:touch})}break}case\"touchend\":{event.preventDefault();for(var i=0;i<event.changedTouches.length;i++){var touch=event.changedTouches[i];if(SDL.downFingers[touch.identifier]===true){delete SDL.downFingers[touch.identifier]}}var mouseEvent={type:\"mouseup\",button:0,pageX:event.changedTouches[0].clientX,pageY:event.changedTouches[0].clientY};SDL.DOMButtons[0]=0;SDL.events.push(mouseEvent);for(var i=0;i<event.changedTouches.length;i++){var touch=event.changedTouches[i];SDL.events.push({type:\"touchend\",touch:touch})}break}case\"DOMMouseScroll\":case\"mousewheel\":case\"wheel\":var delta=-Browser.getMouseWheelDelta(event);delta=delta==0?0:delta>0?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<<event.button}else if(event.type==\"mouseup\"){SDL.buttonState&=~(1<<event.button)}case\"mousemove\":{Browser.calculateMouseEvent(event);break}}},flushEventsToHandler:function(){if(!SDL.eventHandler)return;while(SDL.pollEvent(SDL.eventHandlerTemp)){Module[\"dynCall_iii\"](SDL.eventHandler,SDL.eventHandlerContext,SDL.eventHandlerTemp)}},pollEvent:function(ptr){if(SDL.initFlags&512&&SDL.joystickEventState){SDL.queryJoysticks()}if(ptr){while(SDL.events.length>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<cStr.length;++i){HEAP8[ptr+(8+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<num;i++){SDL.channels[i]={audio:null,volume:1}}},setGetVolume:function(info,volume){if(!info)return 0;var ret=info.volume*128;if(volume!=-1){info.volume=Math.min(Math.max(volume,0),128)/128;if(info.audio){try{info.audio.volume=info.volume;if(info.audio.webAudioGainNode)info.audio.webAudioGainNode[\"gain\"][\"value\"]=info.volume}catch(e){err(\"setGetVolume failed to set audio volume: \"+e)}}}return ret},setPannerPosition:function(info,x,y,z){if(!info)return;if(info.audio){if(info.audio.webAudioPannerNode){info.audio.webAudioPannerNode[\"setPosition\"](x,y,z)}}},playWebAudio:function(audio){if(!audio)return;if(audio.webAudioNode)return;if(!SDL.webAudioAvailable())return;try{var webAudio=audio.resource.webAudio;audio.paused=false;if(!webAudio.decodedBuffer){if(webAudio.onDecodeComplete===undefined)abort(\"Cannot play back audio object that was not loaded\");webAudio.onDecodeComplete.push(function(){if(!audio.paused)SDL.playWebAudio(audio)});return}audio.webAudioNode=SDL.audioContext[\"createBufferSource\"]();audio.webAudioNode[\"buffer\"]=webAudio.decodedBuffer;audio.webAudioNode[\"loop\"]=audio.loop;audio.webAudioNode[\"onended\"]=function(){audio[\"onended\"]()};audio.webAudioPannerNode=SDL.audioContext[\"createPanner\"]();audio.webAudioPannerNode[\"setPosition\"](0,0,-.5);audio.webAudioPannerNode[\"panningModel\"]=\"equalpower\";audio.webAudioGainNode=SDL.audioContext[\"createGain\"]();audio.webAudioGainNode[\"gain\"][\"value\"]=audio.volume;audio.webAudioNode[\"connect\"](audio.webAudioPannerNode);audio.webAudioPannerNode[\"connect\"](audio.webAudioGainNode);audio.webAudioGainNode[\"connect\"](SDL.audioContext[\"destination\"]);audio.webAudioNode[\"start\"](0,audio.currentPosition);audio.startTime=SDL.audioContext[\"currentTime\"]-audio.currentPosition}catch(e){err(\"playWebAudio failed: \"+e)}},pauseWebAudio:function(audio){if(!audio)return;if(audio.webAudioNode){try{audio.currentPosition=(SDL.audioContext[\"currentTime\"]-audio.startTime)%audio.resource.webAudio.decodedBuffer.duration;audio.webAudioNode[\"onended\"]=undefined;audio.webAudioNode.stop(0);audio.webAudioNode=undefined}catch(e){err(\"pauseWebAudio failed: \"+e)}}audio.paused=true},openAudioContext:function(){if(!SDL.audioContext){if(typeof AudioContext!==\"undefined\")SDL.audioContext=new AudioContext;else if(typeof webkitAudioContext!==\"undefined\")SDL.audioContext=new webkitAudioContext}},webAudioAvailable:function(){return!!SDL.audioContext},fillWebAudioBufferFromHeap:function(heapPtr,sizeSamplesPerChannel,dstAudioBuffer){var numChannels=SDL.audio.channels;for(var c=0;c<numChannels;++c){var channelData=dstAudioBuffer[\"getChannelData\"](c);if(channelData.length!=sizeSamplesPerChannel){throw\"Web Audio output buffer length mismatch! Destination size: \"+channelData.length+\" samples vs expected \"+sizeSamplesPerChannel+\" samples!\"}if(SDL.audio.format==32784){for(var j=0;j<sizeSamplesPerChannel;++j){channelData[j]=HEAP16[heapPtr+(j*numChannels+c)*2>>1]/32768}}else if(SDL.audio.format==8){for(var j=0;j<sizeSamplesPerChannel;++j){var v=HEAP8[heapPtr+(j*numChannels+c)>>0];channelData[j]=(v>=0?v-128:v+128)/128}}else if(SDL.audio.format==33056){for(var j=0;j<sizeSamplesPerChannel;++j){channelData[j]=HEAPF32[heapPtr+(j*numChannels+c)*4>>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;i<num;i++){console.log(\" diagonal \"+i+\":\"+[data[i*surfData.width*4+i*4+0],data[i*surfData.width*4+i*4+1],data[i*surfData.width*4+i*4+2],data[i*surfData.width*4+i*4+3]])}},joystickEventState:1,lastJoystickState:{},joystickNamePool:{},recordJoystickState:function(joystick,state){var buttons=new Array(state.buttons.length);for(var i=0;i<state.buttons.length;i++){buttons[i]=SDL.getJoystickButtonState(state.buttons[i])}SDL.lastJoystickState[joystick]={buttons:buttons,axes:state.axes.slice(0),timestamp:state.timestamp,index:state.index,id:state.id}},getJoystickButtonState:function(button){if(typeof button===\"object\"){return button[\"pressed\"]}else{return button>0}},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;i<state.buttons.length;i++){var buttonState=SDL.getJoystickButtonState(state.buttons[i]);if(buttonState!==prevState.buttons[i]){SDL.events.push({type:buttonState?\"joystick_button_down\":\"joystick_button_up\",joystick:joystick,index:joystick-1,button:i})}}for(i=0;i<state.axes.length;i++){if(state.axes[i]!==prevState.axes[i]){SDL.events.push({type:\"joystick_axis_motion\",joystick:joystick,index:joystick-1,axis:i,value:state.axes[i]})}}SDL.recordJoystickState(joystick,state)}}},joystickAxisValueConversion:function(value){value=Math.min(1,Math.max(value,-1));return Math.ceil((value+1)*32767.5-32768)},getGamepads:function(){var fcn=navigator.getGamepads||navigator.webkitGamepads||navigator.mozGamepads||navigator.gamepads||navigator.webkitGetGamepads;if(fcn!==undefined){return fcn.apply(navigator)}else{return[]}},getGamepad:function(deviceIndex){var gamepads=SDL.getGamepads();if(gamepads.length>deviceIndex&&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<GL.MINI_TEMP_BUFFER_SIZE;i++){GL.miniTempBufferViews[i]=GL.miniTempBuffer.subarray(0,i+1)}},recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i<ret;i++){table[i]=null}return ret},MINI_TEMP_BUFFER_SIZE:256,miniTempBuffer:null,miniTempBufferViews:[0],getSource:function(shader,count,string,length){var source=\"\";for(var i=0;i<count;++i){var len=length?HEAP32[length+i*4>>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;i<numUniforms;++i){var u=GLctx.getActiveUniform(p,i);var name=u.name;ptable.maxUniformLength=Math.max(ptable.maxUniformLength,name.length+1);if(name.slice(-1)==\"]\"){name=name.slice(0,name.lastIndexOf(\"[\"))}var loc=GLctx.getUniformLocation(p,name);if(loc){var id=GL.getNewId(GL.uniforms);utable[name]=[u.size,id];GL.uniforms[id]=loc;for(var j=1;j<u.size;++j){var n=name+\"[\"+j+\"]\";loc=GLctx.getUniformLocation(p,n);id=GL.getNewId(GL.uniforms);GL.uniforms[id]=loc}}}}};function _SDL_SetVideoMode(width,height,depth,flags){[\"touchstart\",\"touchend\",\"touchmove\",\"mousedown\",\"mouseup\",\"mousemove\",\"DOMMouseScroll\",\"mousewheel\",\"wheel\",\"mouseout\"].forEach(function(event){Module[\"canvas\"].addEventListener(event,SDL.receiveEvent,true)});var canvas=Module[\"canvas\"];if(width==0&&height==0){width=canvas.width;height=canvas.height}if(!SDL.addedResizeListener){SDL.addedResizeListener=true;Browser.resizeListeners.push(function(w,h){if(!SDL.settingVideoMode){SDL.receiveEvent({type:\"resize\",w:w,h:h})}})}SDL.settingVideoMode=true;Browser.setCanvasSize(width,height);SDL.settingVideoMode=false;if(SDL.screen){SDL.freeSurface(SDL.screen);assert(!SDL.screen)}if(SDL.GL)flags=flags|67108864;SDL.screen=SDL.makeSurface(width,height,flags,true,\"screen\");return SDL.screen}function _SDL_UnlockSurface(surf){assert(!SDL.GL);var surfData=SDL.surfaces[surf];if(!surfData.locked||--surfData.locked>0){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<num){var val=HEAP32[src];data[dst]=val&255;data[dst+1]=val>>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<j){data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0;data8[i]=255;i=i+4|0}}else{while(i<j){data8[i]=255;i=i+4|0}}}else{data32.set(HEAP32.subarray(src,src+data32.length))}}}else{var width=Module[\"canvas\"].width;var height=Module[\"canvas\"].height;var s=surfData.buffer;var data=surfData.image.data;var colors=surfData.colors;for(var y=0;y<height;y++){var base=y*width*4;for(var x=0;x<width;x++){var val=HEAPU8[s++>>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<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j<len;j++){SYSCALLS.printChar(stream,HEAPU8[ptr+j])}ret+=len}return ret}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS===\"undefined\"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _emscripten_get_heap_size(){return HEAP8.length}function abortOnCannotGrowMemory(requestedSize){abort(\"OOM\")}function emscripten_realloc_buffer(size){try{var newBuffer=new ArrayBuffer(size);if(newBuffer.byteLength!=size)return false;new Int8Array(newBuffer).set(HEAP8)}catch(e){return false}Module[\"_emscripten_replace_memory\"](newBuffer);HEAP8=new Int8Array(newBuffer);HEAP16=new Int16Array(newBuffer);HEAP32=new Int32Array(newBuffer);HEAPU8=new Uint8Array(newBuffer);HEAPU16=new Uint16Array(newBuffer);HEAPU32=new Uint32Array(newBuffer);HEAPF32=new Float32Array(newBuffer);HEAPF64=new Float64Array(newBuffer);buffer=newBuffer;return newBuffer}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=16777216;var LIMIT=2147483648-PAGE_MULTIPLE;if(requestedSize>LIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize<requestedSize){if(newSize<=536870912){newSize=alignUp(2*newSize,PAGE_MULTIPLE)}else{newSize=Math.min(alignUp((3*newSize+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=emscripten_realloc_buffer(newSize);if(!replacement||replacement.byteLength!=newSize){return false}updateGlobalBufferViews();return true}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest)}function _pthread_cond_destroy(){return 0}function _pthread_cond_init(){return 0}function _pthread_cond_signal(){return 0}function _pthread_cond_wait(){return 0}function _pthread_create(){return 11}function _pthread_join(){}function ___setErrNo(value){if(Module[\"___errno_location\"])HEAP32[Module[\"___errno_location\"]()>>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;i<array.length;i++){var chr=array[i];if(chr>255){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<input.length);return output};function intArrayFromBase64(s){try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error(\"Converting base64 string to bytes failed.\")}}function tryParseAsDataURI(filename){if(!isDataURI(filename)){return}return intArrayFromBase64(filename.slice(dataURIPrefix.length))}var asmGlobalArg={\"Math\":Math,\"Int8Array\":Int8Array,\"Int16Array\":Int16Array,\"Int32Array\":Int32Array,\"Uint8Array\":Uint8Array,\"Uint16Array\":Uint16Array,\"Float32Array\":Float32Array,\"Float64Array\":Float64Array};var asmLibraryArg={\"a\":abort,\"b\":setTempRet0,\"c\":getTempRet0,\"d\":_SDL_CreateRGBSurface,\"e\":_SDL_Flip,\"f\":_SDL_FreeSurface,\"g\":_SDL_GetTicks,\"h\":_SDL_Init,\"i\":_SDL_LockSurface,\"j\":_SDL_SetVideoMode,\"k\":_SDL_UnlockSurface,\"l\":_SDL_UpperBlit,\"m\":___setErrNo,\"n\":___syscall140,\"o\":___syscall146,\"p\":___syscall6,\"q\":_emscripten_get_heap_size,\"r\":_emscripten_get_now,\"s\":_emscripten_memcpy_big,\"t\":_emscripten_resize_heap,\"u\":_emscripten_set_main_loop,\"v\":_emscripten_set_main_loop_timing,\"w\":_pthread_cond_destroy,\"x\":_pthread_cond_init,\"y\":_pthread_cond_signal,\"z\":_pthread_cond_wait,\"A\":_pthread_create,\"B\":_pthread_join,\"C\":abortOnCannotGrowMemory,\"D\":emscripten_realloc_buffer,\"E\":flush_NO_FILESYSTEM,\"F\":tempDoublePtr,\"G\":DYNAMICTOP_PTR};// EMSCRIPTEN_START_ASM\nvar asm=(/** @suppress {uselessCode} */ function(global,env,buffer) {\n\"almost asm\";var a=new global.Int8Array(buffer),b=new global.Int16Array(buffer),c=new global.Int32Array(buffer),d=new global.Uint8Array(buffer),e=new global.Uint16Array(buffer),f=new global.Float32Array(buffer),g=new global.Float64Array(buffer),h=env.F|0,i=env.G|0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=global.Math.imul,s=global.Math.clz32,t=env.a,u=env.b,v=env.c,w=env.d,x=env.e,y=env.f,z=env.g,A=env.h,B=env.i,C=env.j,D=env.k,E=env.l,F=env.m,G=env.n,H=env.o,I=env.p,J=env.q,K=env.r,L=env.s,M=env.t,N=env.u,O=env.v,P=env.w,Q=env.x,R=env.y,S=env.z,T=env.A,U=env.B,V=env.C,W=env.D,X=env.E,Y=11056,Z=5253936,_=0.0;function $(newBuffer){a=new Int8Array(newBuffer);d=new Uint8Array(newBuffer);b=new Int16Array(newBuffer);e=new Uint16Array(newBuffer);c=new Int32Array(newBuffer);f=new Float32Array(newBuffer);g=new Float64Array(newBuffer);buffer=newBuffer;return true}\n// EMSCRIPTEN_START_FUNCS\nfunction ja(a){a=a|0;var b=0;b=Y;Y=Y+a|0;Y=Y+15&-16;return b|0}function ka(){return Y|0}function la(a){a=a|0;Y=a}function ma(a,b){a=a|0;b=b|0;Y=a;Z=b}function na(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;d=Y;Y=Y+224|0;e=d+16|0;f=d+8|0;g=d;h=d+24|0;i=h+40|0;if(!(Ne(h,520)|0)){zf(8544,26,1,c[2043]|0)|0;j=0;Y=d;return j|0}if(!(c[2484]|0)){A(32)|0;c[2484]=1}do if(!(me(a,b,h,520)|0)){k=h+4|0;l=C(c[h>>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<c>>>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<c>>>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)<<S)|0;S=o;ba=R;ca=c[y>>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)<<ia)|0;if((ma+1|0)>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<W>>>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<W>>>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)<<aa)|0;aa=p;Ya=ca;Za=c[aa>>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)<<ma)|0;if((eb+1|0)>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<ha>>>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<ma>>>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<ma>>>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<W>>>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<t>>>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<s>>>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<<c[b+8>>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;q=p+-1|0;o=p+v|0;v=n?o>>>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;p=q+-1|0;u=k&0-q;t=k-u|0;s=p+k|0;n=v?s>>>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<x>>>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)|0;p=r(o?n>>>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<<p)+-1|0;p=(1<<l)+-1|0;if(!((e|0)>(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<<o)+-1|0;o=(1<<b)+-1|0;if(!((e|0)>(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<<i)+-1|0;i=(1<<j)+-1|0;if(!((e|0)<(f|0)&(k|0)>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<<x;if(y&z|0){u=73;break a}c[q>>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<<x)+-1|0;C=B+(c[z>>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)|0;z=G?x>>>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)+-1|0;H=E+t|0;G=F?H>>>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<<I;if(E){z=(H|0)>-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<<I;if(!(db(i+124|0,I)|0)){c[i>>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<<f)+-1|0;D=H+t|0;c[i+156>>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<<b;e=va(d,((d|0)<0)<<31>>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<<f;n=k;o=n+64|0;do{c[n>>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<<l+-1;G=u;H=p;I=A;do{J=d+(G<<2)|0;K=(e[i+(H<<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<<l;l=1<<p;if((p|0)>=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<<pa-f;a[d+(L<<2)>>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<z>>>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<R>>>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<f>>>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<H>>>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<<I)|0;c[b>>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<<F)+-1|0;c[q>>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<<O);P=J-D|0}else P=D+1|0;D=(s(P|0)|0)^24;c[t>>2]=O-D;c[q>>2]=(P<<D)+-1;Q=E?3:2}else{E=d[y>>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<<S);T=J-H|0}else T=H+1|0;H=(s(T|0)|0)^24;c[t>>2]=S-H;c[q>>2]=(T<<H)+-1;Q=G&1}C=Q&255}a[B+(z*800|0)+798>>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<<W);X=H-J|0}else X=J+1|0;J=(s(X|0)|0)^24;D=W-J|0;c[t>>2]=D;F=(X<<J)+-1|0;c[q>>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<<Y)|0;c[b>>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<<H)+-1|0;c[q>>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<<aa)|0;c[b>>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<<F)+-1|0;c[q>>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<<ea);fa=E-D|0}else fa=D+1|0;D=(s(fa|0)|0)^24;c[t>>2]=ea-D;c[q>>2]=(fa<<D)+-1;ga=G?1:3}else{do if(F){G=c[v>>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<<ia);ja=E-F|0}else ja=F+1|0;F=(s(ja|0)|0)^24;c[t>>2]=ia-F;c[q>>2]=(ja<<F)+-1;ga=H?2:0}H=ga&255;a[B+(z*800|0)+769>>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<<qa)|0;c[b>>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<<na)+-1|0;c[q>>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<<Aa)|0;c[b>>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<<ya)+-1|0;c[q>>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<<Ga)|0;c[b>>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<<F)+-1|0;c[q>>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<<Ka)|0;c[b>>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<<H)+-1|0;c[q>>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<<Oa);Pa=F-D|0}else Pa=D+1|0;D=(s(Pa|0)|0)^24;c[t>>2]=Oa-D;c[q>>2]=(Pa<<D)+-1;Qa=E?1:3}else Qa=2}else Qa=0;a[B+(z*800|0)+785>>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<<t);u=n-r|0}else u=r+1|0;r=(s(u|0)|0)^24;b=t-r|0;c[g>>2]=b;n=(u<<r)+-1|0;c[f>>2]=n;r=(q&1)<<m|l;if((o|0)<=1){e=r;break}else l=r}return e|0}function Ge(a,b){a=a|0;b=b|0;var c=0;c=Fe(a,b)|0;b=(Fe(a,1)|0)==0;return (b?c:0-c|0)|0}function He(b){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,r=0,s=0;f=b+12|0;g=Fe(f,7)|0;if(!(Fe(f,1)|0))h=0;else h=Ge(f,4)|0;if(!(Fe(f,1)|0))i=0;else i=Ge(f,4)|0;if(!(Fe(f,1)|0))j=0;else j=Ge(f,4)|0;if(!(Fe(f,1)|0))k=0;else k=Ge(f,4)|0;if(!(Fe(f,1)|0))l=0;else l=Ge(f,4)|0;f=b+112|0;m=b+776|0;n=(c[b+104>>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<<t);u=n-p|0}else u=p+1|0;p=(s(u|0)|0)^24;c[g>>2]=t-p;c[f>>2]=(u<<p)+-1;if(q)v=Fe(b,8)|0;else v=d[6144+(j*264|0)+(k*33|0)+l>>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<<y);z=p-n|0}else z=n+1|0;n=(s(z|0)|0)^24;c[g>>2]=y-n;c[f>>2]=(z<<n)+-1;if(m)A=Fe(b,8)|0;else A=d[6144+(j*264|0)+(k*33|0)+11+l>>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<<B);C=n-p|0}else C=p+1|0;p=(s(C|0)|0)^24;c[g>>2]=B-p;c[f>>2]=(C<<p)+-1;if(q)D=Fe(b,8)|0;else D=d[6144+(j*264|0)+(k*33|0)+22+l>>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<<v)|0;c[a>>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<<t)+-1|0;c[k>>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<<G)|0;c[a>>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<<E)+-1|0;c[k>>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<<O);P=L-q|0}else P=q+1|0;q=(s(P|0)|0)^24;D=O-q|0;c[l>>2]=D;c[k>>2]=(P<<q)+-1;if(B){B=Ke(a,w)|0;Q=B;R=C+22|0;S=c[l>>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)<<T);w=(r((B^Q)-B|0,c[g+(((t|0)>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<<n)|0;c[b>>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<<j)+-1|0;c[g>>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<<t)|0;c[b>>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<<q)+-1|0;c[g>>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<<y);z=t-o|0}else z=o+1|0;o=(s(z|0)|0)^24;c[i>>2]=y-o;c[g>>2]=(z<<o)+-1;w=l?4:3;return w|0}l=d[e+6>>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<<B)|0;c[b>>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<<A)+-1|0;c[g>>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<<F)|0;c[b>>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<<E)+-1|0;c[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<<J)|0;c[b>>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<<I)+-1|0;c[g>>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<<O)|0;c[b>>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<<C)+-1|0;c[g>>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<<I|3)|0;return w|0}I=d[e+7>>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<<S)|0;c[b>>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<<R)+-1|0;c[g>>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<<W);X=S-D|0}else X=D+1|0;D=(s(X|0)|0)^24;c[i>>2]=W-D;c[g>>2]=(X<<D)+-1;w=T?6:5;return w|0}do if(R){T=b+12|0;D=c[T>>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<<Z)|0;c[b>>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=(_<<Y)+-1|0;c[g>>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<<ba);ca=Z-$|0}else ca=$+1|0;$=(s(ca|0)|0)^24;c[i>>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<<i);else{c[n+12>>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<<f;n=h<<f&(i|0-i);i=(n&0-n)+-1|0;n=(12?i>>>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<<j);c[2550]=i;p=i}else{c[n+12>>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<<h;if(!(p&i)){c[2550]=p|i;q=k;r=k+8|0}else{i=k+8|0;q=c[i>>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<n>>>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<<k);break}}else{k=s+16|0;c[((c[k>>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<<s;if(!(u&g)){c[2550]=u|g;D=k;E=k+8|0}else{u=k+8|0;D=c[u>>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<<z;v=k+520192|0;A=(16?v>>>16:v)&4;v=k<<A;k=v+245760|0;H=(16?k>>>16:k)&2;k=v<<H;v=14-(A|z|H)+(15?k>>>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<H>>>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<<G;s=(v|0-v)&u;if(!s){F=f;break}v=(s&0-s)+-1|0;s=(12?v>>>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<h>>>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<<n);c[2551]=s;da=s;break}}else{s=h+16|0;c[((c[s>>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<<h;if(!(s&n)){c[2550]=s|n;ea=u;fa=u+8|0}else{n=u+8|0;ea=c[n>>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<<s;u=n+520192|0;h=(16?u>>>16:u)&4;u=n<<h;n=u+245760|0;g=(16?n>>>16:n)&2;n=u<<g;u=14-(h|s|g)+(15?n>>>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<<ga;if(!(da&n)){c[2551]=da|n;c[u>>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<ja>>>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<<ha);break}else{c[ga+12>>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<<ha;if(!(ea&g)){c[2550]=ea|g;za=X;Aa=X+8|0}else{g=X+8|0;za=c[g>>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<<ea;ha=g+520192|0;_=(16?ha>>>16:ha)&4;ha=g<<_;g=ha+245760|0;fa=(16?g>>>16:g)&2;g=ha<<fa;ha=14-(_|ea|fa)+(15?g>>>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<<Ba;if(!(ia&ha)){c[2551]=ia|ha;c[X>>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<oa>>>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<Ea>>>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<<X;if(!(W&ha)){c[2550]=W|ha;Fa=na;Ga=na+8|0}else{ha=na+8|0;Fa=c[ha>>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<<W;na=ha+520192|0;X=(16?na>>>16:na)&4;na=ha<<X;ha=na+245760|0;ga=(16?ha>>>16:ha)&2;ha=na<<ga;na=14-(X|W|ga)+(15?ha>>>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<<Ha;if(!(ha&ga)){c[2551]=ha|ga;c[na>>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<ga>>>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<d>>>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<<k);l=h;m=i;n=h;break}else{c[g+12>>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<<j);l=h;m=i;n=h;break}}else{j=g+16|0;c[((c[j>>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<<x);break}else{c[w+12>>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<<t);break}}else{t=w+16|0;c[((c[t>>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<<m;if(!(a&b)){c[2550]=a|b;E=n;F=n+8|0}else{b=n+8|0;E=c[b>>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<<F;n=E+520192|0;b=(16?n>>>16:n)&4;n=E<<b;E=n+245760|0;a=(16?E>>>16:E)&2;E=n<<a;n=14-(b|F|a)+(15?E>>>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<<G;a:do if(!(E&a)){c[2551]=E|a;c[n>>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<<y&75913|0)==0){J=0;K=w;L=x}else{w=0;C=y;y=x;while(1){x=1<<C|w;E=y+1|0;c[k>>2]=E;F=a[E>>0]|0;C=(F<<24>>24)+-32|0;if(C>>>0>31|(1<<C&75913|0)==0){J=x;K=F;L=E;break}else{w=x;y=E}}}if(K<<24>>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<L>>>0){V=(1<<U)+-1|0;S=U?1e9>>>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<L>>>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<fa>>>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<D>>>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<L>>>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<L>>>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<q>>>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<ta>>>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<ta>>>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<I>>>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<I>>>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<d>>>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<f>>>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<a>>>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<<r;y=i>>>(q>>>0)&t;z=0;A=g<<r;break}if(!f){n=0;o=0;return (u(n|0),o)|0}c[f>>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<<p|g>>>(t>>>0))&D;y=D&i>>>(t>>>0);z=g<<q&B;A=(i<<q|g>>>(C>>>0))&B|g<<p&t-33>>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<<p|g>>>(t>>>0);y=i>>>(t>>>0);z=0;A=g<<p;break}if(!f){n=0;o=0;return (u(n|0),o)|0}c[f>>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)-1)<<32-c}u(0);return b>>>c-32|0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){u(b<<c|(a&(1<<c)-1<<32-c)>>>32-c|0);return a<<c}u(a<<c-32|0);return 0}function Kf(a){a=a|0;return (a&255)<<24|(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": 76,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"name": "./node_modules/timers-browserify/main.js",
"index": 78,
"index2": 79,
"size": 2022,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"issuerId": 75,
"issuerName": "./node_modules/webp-hero/libwebp/dist/webp.js",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"profile": {
"factory": 74,
"building": 621
}
}
],
"profile": {
"factory": 1419,
"building": 72
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 75,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"module": "./node_modules/webp-hero/libwebp/dist/webp.js",
"moduleName": "./node_modules/webp-hero/libwebp/dist/webp.js",
"type": "cjs require",
"userRequest": "setImmediate",
"loc": "1:0-47"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n"
},
{
"id": 77,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"name": "./node_modules/setimmediate/setImmediate.js",
"index": 80,
"index2": 78,
"size": 6475,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"issuerId": 76,
"issuerName": "./node_modules/timers-browserify/main.js",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"profile": {
"factory": 74,
"building": 621
}
},
{
"id": 76,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"name": "./node_modules/timers-browserify/main.js",
"profile": {
"factory": 1419,
"building": 72
}
}
],
"profile": {
"factory": 1949,
"building": 1141,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 76,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"module": "./node_modules/timers-browserify/main.js",
"moduleName": "./node_modules/timers-browserify/main.js",
"type": "cjs require",
"userRequest": "setimmediate",
"loc": "54:0-23"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n"
},
{
"id": 78,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\process\\browser.js",
"name": "./node_modules/process/browser.js",
"index": 81,
"index2": 77,
"size": 5418,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
3
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"issuerId": 77,
"issuerName": "./node_modules/setimmediate/setImmediate.js",
"issuerPath": [
{
"id": 74,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\webp.ts",
"name": "./src/lib/webp.ts",
"profile": {
"factory": 122,
"building": 1761
}
},
{
"id": 75,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webp-hero\\libwebp\\dist\\webp.js",
"name": "./node_modules/webp-hero/libwebp/dist/webp.js",
"profile": {
"factory": 74,
"building": 621
}
},
{
"id": 76,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\timers-browserify\\main.js",
"name": "./node_modules/timers-browserify/main.js",
"profile": {
"factory": 1419,
"building": 72
}
},
{
"id": 77,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"name": "./node_modules/setimmediate/setImmediate.js",
"profile": {
"factory": 1949,
"building": 1141,
"dependencies": 0
}
}
],
"profile": {
"factory": 88,
"building": 298
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 77,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\setimmediate\\setImmediate.js",
"module": "./node_modules/setimmediate/setImmediate.js",
"moduleName": "./node_modules/setimmediate/setImmediate.js",
"type": "cjs require",
"userRequest": "process",
"loc": "1:0-34"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n"
},
{
"id": "",
"identifier": "css E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss 0",
"name": "css ./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"index": 2,
"index2": 0,
"size": 3696,
"built": false,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"issuerId": 53,
"issuerName": "./src/materialize.scss",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 53,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"name": "./src/materialize.scss",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 0,
"building": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 53,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"module": "./src/materialize.scss",
"moduleName": "./src/materialize.scss"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2
},
{
"id": "",
"identifier": "css E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss 0",
"name": "css ./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"index": 4,
"index2": 2,
"size": 91114,
"built": false,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"issuerId": 54,
"issuerName": "./src/scss/style.scss",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 54,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"name": "./src/scss/style.scss",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 0,
"building": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 54,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"module": "./src/scss/style.scss",
"moduleName": "./src/scss/style.scss"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2
},
{
"id": "",
"identifier": "css E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss 0",
"name": "css ./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"index": 6,
"index2": 4,
"size": 4945,
"built": false,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"issuerId": 55,
"issuerName": "./src/scss/tgico.scss",
"issuerPath": [
{
"id": 52,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\index.ts",
"name": "./src/index.ts",
"profile": {
"factory": 19,
"building": 1832
}
},
{
"id": 55,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"name": "./src/scss/tgico.scss",
"profile": {
"factory": 763,
"building": 6394,
"dependencies": 445
}
}
],
"profile": {
"factory": 1,
"building": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 55,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\mini-css-extract-plugin\\dist\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"module": "./src/scss/tgico.scss",
"moduleName": "./src/scss/tgico.scss"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2
}
],
"filteredModules": 0,
"logging": {
"webpack.buildChunkGraph.visitModules": {
"entries": [],
"filteredEntries": 2,
"debug": false
}
},
"children": [
{
"errors": [],
"warnings": [],
"publicPath": "",
"outputPath": "E:\\projects\\TWEB\\tweb\\public",
"assetsByChunkName": {},
"assets": [
{
"name": "index.html",
"size": 173329,
"chunks": [
0
],
"chunkNames": [],
"info": {},
"emitted": false
}
],
"filteredAssets": 0,
"entrypoints": {
"undefined": {
"chunks": [
0
],
"assets": [
"index.html"
],
"children": {},
"childAssets": {}
}
},
"namedChunkGroups": {
"undefined": {
"chunks": [
0
],
"assets": [
"index.html"
],
"children": {},
"childAssets": {}
}
},
"chunks": [
{
"id": 0,
"rendered": true,
"initial": true,
"entry": true,
"size": 167761,
"names": [],
"files": [
"index.html"
],
"hash": "7ac54493fb8c7bf12689",
"siblings": [],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\utils.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/utils.js",
"index": 4,
"index2": 0,
"size": 10309,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./utils",
"loc": "9:13-31"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\logger.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/logger.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/logger.js",
"type": "cjs require",
"userRequest": "./utils",
"loc": "5:13-31"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/utils",
"loc": "27:23-52"
},
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\block-helper-missing.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "5:13-32"
},
{
"moduleId": 11,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\each.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:13-32"
},
{
"moduleId": 13,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\if.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:13-32"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\with.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:13-32"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators\\inline.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "5:13-32"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\create-new-lookup-object.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "6:13-32"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./utils",
"loc": "18:13-31"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.extend = extend;\nexports.indexOf = indexOf;\nexports.escapeExpression = escapeExpression;\nexports.isEmpty = isEmpty;\nexports.createFrame = createFrame;\nexports.blockParams = blockParams;\nexports.appendContextPath = appendContextPath;\nvar escape = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#x27;',\n '`': '&#x60;',\n '=': '&#x3D;'\n};\n\nvar badChars = /[&<>\"'`=]/g,\n possible = /[&<>\"'`=]/;\n\nfunction escapeChar(chr) {\n return escape[chr];\n}\n\nfunction extend(obj /* , ...source */) {\n for (var i = 1; i < arguments.length; i++) {\n for (var key in arguments[i]) {\n if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {\n obj[key] = arguments[i][key];\n }\n }\n }\n\n return obj;\n}\n\nvar toString = Object.prototype.toString;\n\nexports.toString = toString;\n// Sourced from lodash\n// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\n/* eslint-disable func-style */\nvar isFunction = function isFunction(value) {\n return typeof value === 'function';\n};\n// fallback for older versions of Chrome and Safari\n/* istanbul ignore next */\nif (isFunction(/x/)) {\n exports.isFunction = isFunction = function (value) {\n return typeof value === 'function' && toString.call(value) === '[object Function]';\n };\n}\nexports.isFunction = isFunction;\n\n/* eslint-enable func-style */\n\n/* istanbul ignore next */\nvar isArray = Array.isArray || function (value) {\n return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;\n};\n\nexports.isArray = isArray;\n// Older IE versions do not directly support indexOf so we must implement our own, sadly.\n\nfunction indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}\n\nfunction escapeExpression(string) {\n if (typeof string !== 'string') {\n // don't escape SafeStrings, since they're already safe\n if (string && string.toHTML) {\n return string.toHTML();\n } else if (string == null) {\n return '';\n } else if (!string) {\n return string + '';\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = '' + string;\n }\n\n if (!possible.test(string)) {\n return string;\n }\n return string.replace(badChars, escapeChar);\n}\n\nfunction isEmpty(value) {\n if (!value && value !== 0) {\n return true;\n } else if (isArray(value) && value.length === 0) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction createFrame(object) {\n var frame = extend({}, object);\n frame._parent = object;\n return frame;\n}\n\nfunction blockParams(params, ids) {\n params.path = ids;\n return params;\n}\n\nfunction appendContextPath(contextPath, id) {\n return (contextPath ? contextPath + '.' : '') + id;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxJQUFNLE1BQU0sR0FBRztBQUNiLEtBQUcsRUFBRSxPQUFPO0FBQ1osS0FBRyxFQUFFLE1BQU07QUFDWCxLQUFHLEVBQUUsTUFBTTtBQUNYLEtBQUcsRUFBRSxRQUFRO0FBQ2IsS0FBRyxFQUFFLFFBQVE7QUFDYixLQUFHLEVBQUUsUUFBUTtBQUNiLEtBQUcsRUFBRSxRQUFRO0NBQ2QsQ0FBQzs7QUFFRixJQUFNLFFBQVEsR0FBRyxZQUFZO0lBQzNCLFFBQVEsR0FBRyxXQUFXLENBQUM7O0FBRXpCLFNBQVMsVUFBVSxDQUFDLEdBQUcsRUFBRTtBQUN2QixTQUFPLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUNwQjs7QUFFTSxTQUFTLE1BQU0sQ0FBQyxHQUFHLG9CQUFvQjtBQUM1QyxPQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUN6QyxTQUFLLElBQUksR0FBRyxJQUFJLFNBQVMsQ0FBQyxDQUFDLENBQUMsRUFBRTtBQUM1QixVQUFJLE1BQU0sQ0FBQyxTQUFTLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLEVBQUUsR0FBRyxDQUFDLEVBQUU7QUFDM0QsV0FBRyxDQUFDLEdBQUcsQ0FBQyxHQUFHLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQztPQUM5QjtLQUNGO0dBQ0Y7O0FBRUQsU0FBTyxHQUFHLENBQUM7Q0FDWjs7QUFFTSxJQUFJLFFBQVEsR0FBRyxNQUFNLENBQUMsU0FBUyxDQUFDLFFBQVEsQ0FBQzs7Ozs7O0FBS2hELElBQUksVUFBVSxHQUFHLG9CQUFTLEtBQUssRUFBRTtBQUMvQixTQUFPLE9BQU8sS0FBSyxLQUFLLFVBQVUsQ0FBQztDQUNwQyxDQUFDOzs7QUFHRixJQUFJLFVBQVUsQ0FBQyxHQUFHLENBQUMsRUFBRTtBQUNuQixVQU9PLFVBQVUsR0FQakIsVUFBVSxHQUFHLFVBQVMsS0FBSyxFQUFFO0FBQzNCLFdBQ0UsT0FBTyxLQUFLLEtBQUssVUFBVSxJQUMzQixRQUFRLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLG1CQUFtQixDQUM1QztHQUNILENBQUM7Q0FDSDtRQUNRLFVBQVUsR0FBVixVQUFVOzs7OztBQUlaLElBQU0sT0FBTyxHQUNsQixLQUFLLENBQUMsT0FBTyxJQUNiLFVBQVMsS0FBSyxFQUFFO0FBQ2QsU0FBTyxLQUFLLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxHQUNyQyxRQUFRLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLGdCQUFnQixHQUN6QyxLQUFLLENBQUM7Q0FDWCxDQUFDOzs7OztBQUdHLFNBQVMsT0FBTyxDQUFDLEtBQUssRUFBRSxLQUFLLEVBQUU7QUFDcEMsT0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsR0FBRyxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLEdBQUcsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUNoRCxRQUFJLEtBQUssQ0FBQyxDQUFDLENBQUMsS0FBSyxLQUFLLEVBQUU7QUFDdEIsYUFBTyxDQUFDLENBQUM7S0FDVjtHQUNGO0FBQ0QsU0FBTyxDQUFDLENBQUMsQ0FBQztDQUNYOztBQUVNLFNBQVMsZ0JBQWdCLENBQUMsTUFBTSxFQUFFO0FBQ3ZDLE1BQUksT0FBTyxNQUFNLEtBQUssUUFBUSxFQUFFOztBQUU5QixRQUFJLE1BQU0sSUFBSSxNQUFNLENBQUMsTUFBTSxFQUFFO0FBQzNCLGFBQU8sTUFBTSxDQUFDLE1BQU0sRUFBRSxDQUFDO0tBQ3hCLE1BQU0sSUFBSSxNQUFNLElBQUksSUFBSSxFQUFFO0FBQ3pCLGFBQU8sRUFBRSxDQUFDO0tBQ1gsTUFBTSxJQUFJLENBQUMsTUFBTSxFQUFFO0FBQ2xCLGFBQU8sTUFBTSxHQUFHLEVBQUUsQ0FBQztLQUNwQjs7Ozs7QUFLRCxVQUFNLEdBQUcsRUFBRSxHQUFHLE1BQU0sQ0FBQztHQUN0Qjs7QUFFRCxNQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsRUFBRTtBQUMxQixXQUFPLE1BQU0sQ0FBQztHQUNmO0FBQ0QsU0FBTyxNQUFNLENBQUMsT0FBTyxDQUFDLFFBQVEsRUFBRSxVQUFVLENBQUMsQ0FBQztDQUM3Qzs7QUFFTSxTQUFTLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDN0IsTUFBSSxDQUFDLEtBQUssSUFBSSxLQUFLLEtBQUssQ0FBQyxFQUFFO0FBQ3pCLFdBQU8sSUFBSSxDQUFDO0dBQ2IsTUFBTSxJQUFJLE9BQU8sQ0FBQyxLQUFLLENBQUMsSUFBSSxLQUFLLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtBQUMvQyxXQUFPLElBQUksQ0FBQztHQUNiLE1BQU07QUFDTCxXQUFPLEtBQUssQ0FBQztHQUNkO0NBQ0Y7O0FBRU0sU0FBUyxXQUFXLENBQUMsTUFBTSxFQUFFO0FBQ2xDLE1BQUksS0FBSyxHQUFHLE1BQU0sQ0FBQyxFQUFFLEVBQUUsTUFBTSxDQUFDLENBQUM7QUFDL0IsT0FBSyxDQUFDLE9BQU8sR0FBRyxNQUFNLENBQUM7QUFDdkIsU0FBTyxLQUFLLENBQUM7Q0FDZDs7QUFFTSxTQUFTLFdBQVcsQ0FBQyxNQUFNLEVBQUUsR0FBRyxFQUFFO0FBQ3ZDLFFBQU0sQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFDO0FBQ2xCLFNBQU8sTUFBTSxDQUFDO0NBQ2Y7O0FBRU0sU0FBUyxpQkFBaUIsQ0FBQyxXQUFXLEVBQUUsRUFBRSxFQUFFO0FBQ2pELFNBQU8sQ0FBQyxXQUFXLEdBQUcsV0FBVyxHQUFHLEdBQUcsR0FBRyxFQUFFLENBQUEsR0FBSSxFQUFFLENBQUM7Q0FDcEQiLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBlc2NhcGUgPSB7XG4gICcmJzogJyZhbXA7JyxcbiAgJzwnOiAnJmx0OycsXG4gICc+JzogJyZndDsnLFxuICAnXCInOiAnJnF1b3Q7JyxcbiAgXCInXCI6ICcmI3gyNzsnLFxuICAnYCc6ICcmI3g2MDsnLFxuICAnPSc6ICcmI3gzRDsnXG59O1xuXG5jb25zdCBiYWRDaGFycyA9IC9bJjw+XCInYD1dL2csXG4gIHBvc3NpYmxlID0gL1smPD5cIidgPV0vO1xuXG5mdW5jdGlvbiBlc2NhcGVDaGFyKGNocikge1xuICByZXR1cm4gZXNjYXBlW2Nocl07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBleHRlbmQob2JqIC8qICwgLi4uc291cmNlICovKSB7XG4gIGZvciAobGV0IGkgPSAxOyBpIDwgYXJndW1lbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgZm9yIChsZXQga2V5IGluIGFyZ3VtZW50c1tpXSkge1xuICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChhcmd1bWVudHNbaV0sIGtleSkpIHtcbiAgICAgICAgb2JqW2tleV0gPSBhcmd1bWVudHNbaV1ba2V5XTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gb2JqO1xufVxuXG5leHBvcnQgbGV0IHRvU3RyaW5nID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZztcblxuLy8gU291cmNlZCBmcm9tIGxvZGFzaFxuLy8gaHR0cHM6Ly9naXRodWIuY29tL2Jlc3RpZWpzL2xvZGFzaC9ibG9iL21hc3Rlci9MSUNFTlNFLnR4dFxuLyogZXNsaW50LWRpc2FibGUgZnVuYy1zdHlsZSAqL1xubGV0IGlzRnVuY3Rpb24gPSBmdW5jdGlvbih2YWx1ZSkge1xuICByZXR1cm4gdHlwZW9mIHZhbHVlID09PSAnZnVuY3Rpb24nO1xufTtcbi8vIGZhbGxiYWNrIGZvciBvbGRlciB2ZXJzaW9ucyBvZiBDaHJvbWUgYW5kIFNhZmFyaVxuLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbmlmIChpc0Z1bmN0aW9uKC94LykpIHtcbiAgaXNGdW5jdGlvbiA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIHR5cGVvZiB2YWx1ZSA9PT0gJ2Z1bmN0aW9uJyAmJlxuICAgICAgdG9TdHJpbmcuY2FsbCh2YWx1ZSkgPT09ICdbb2JqZWN0IEZ1bmN0aW9uXSdcbiAgICApO1xuICB9O1xufVxuZXhwb3J0IHsgaXNGdW5jdGlvbiB9O1xuLyogZXNsaW50LWVuYWJsZSBmdW5jLXN0eWxlICovXG5cbi8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG5leHBvcnQgY29uc3QgaXNBcnJheSA9XG4gIEFycmF5LmlzQXJyYXkgfHxcbiAgZnVuY3Rpb24odmFsdWUpIHtcbiAgICByZXR1cm4gdmFsdWUgJiYgdHlwZW9mIHZhbHVlID09PSAnb2JqZWN0J1xuICAgICAgPyB0b1N0cmluZy5jYWxsKHZhbHVlKSA9PT0gJ1tvYmplY3QgQXJyYXldJ1xuICAgICAgOiBmYWxzZTtcbiAgfTtcblxuLy8gT2xkZXIgSUUgdmVyc2lvbnMgZG8gbm90IGRpcmVjdGx5IHN1cHBvcnQgaW5kZXhPZiBzbyB3ZSBtdXN0IGltcGxlbWVudCBvdXIgb3duLCBzYWRseS5cbmV4cG9ydCBmdW5jdGlvbiBpbmRleE9mKGFycmF5LCB2YWx1ZSkge1xuICBmb3IgKGxldCBpID0gMCwgbGVuID0gYXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBpZiAoYXJyYXlbaV0gPT09IHZhbHVlKSB7XG4gICAgICByZXR1cm4gaTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIC0xO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZXNjYXBlRXhwcmVzc2lvbihzdHJpbmcpIHtcbiAgaWYgKHR5cGVvZiBzdHJpbmcgIT09ICdzdHJpbmcnKSB7XG4gICAgLy8gZG9uJ3QgZXNjYXBlIFNhZmVTdHJpbmdzLCBzaW5jZSB0aGV5J3JlIGFscmVhZHkgc2FmZVxuICAgIGlmIChzdHJpbmcgJiYgc3RyaW5nLnRvSFRNTCkge1xuICAgICAgcmV0dXJuIHN0cmluZy50b0hUTUwoKTtcbiAgICB9IGVsc2UgaWYgKHN0cmluZyA9PSBudWxsKSB7XG4gICAgICByZXR1cm4gJyc7XG4gICAgfSBlbHNlIGlmICghc3RyaW5nKSB7XG4gICAgICByZXR1cm4gc3RyaW5nICsgJyc7XG4gICAgfVxuXG4gICAgLy8gRm9yY2UgYSBzdHJpbmcgY29udmVyc2lvbiBhcyB0aGlzIHdpbGwgYmUgZG9uZSBieSB0aGUgYXBwZW5kIHJlZ2FyZGxlc3MgYW5kXG4gICAgLy8gdGhlIHJlZ2V4IHRlc3Qgd2lsbCBkbyB0aGlzIHRyYW5zcGFyZW50bHkgYmVoaW5kIHRoZSBzY2VuZXMsIGNhdXNpbmcgaXNzdWVzIGlmXG4gICAgLy8gYW4gb2JqZWN0J3MgdG8gc3RyaW5nIGhhcyBlc2NhcGVkIGNoYXJhY3RlcnMgaW4gaXQuXG4gICAgc3RyaW5nID0gJycgKyBzdHJpbmc7XG4gIH1cblxuICBpZiAoIXBvc3NpYmxlLnRlc3Qoc3RyaW5nKSkge1xuICAgIHJldHVybiBzdHJpbmc7XG4gIH1cbiAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKGJhZENoYXJzLCBlc2NhcGVDaGFyKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzRW1wdHkodmFsdWUpIHtcbiAgaWYgKCF2YWx1ZSAmJiB2YWx1ZSAhPT0gMCkge1xuICAgIHJldHVybiB0cnVlO1xuICB9IGVsc2UgaWYgKGlzQXJyYXkodmFsdWUpICYmIHZhbHVlLmxlbmd0aCA9PT0gMCkge1xuICAgIHJldHVybiB0cnVlO1xuICB9IGVsc2Uge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlRnJhbWUob2JqZWN0KSB7XG4gIGxldCBmcmFtZSA9IGV4dGVuZCh7fSwgb2JqZWN0KTtcbiAgZnJhbWUuX3BhcmVudCA9IG9iamVjdDtcbiAgcmV0dXJuIGZyYW1lO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYmxvY2tQYXJhbXMocGFyYW1zLCBpZHMpIHtcbiAgcGFyYW1zLnBhdGggPSBpZHM7XG4gIHJldHVybiBwYXJhbXM7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcHBlbmRDb250ZXh0UGF0aChjb250ZXh0UGF0aCwgaWQpIHtcbiAgcmV0dXJuIChjb250ZXh0UGF0aCA/IGNvbnRleHRQYXRoICsgJy4nIDogJycpICsgaWQ7XG59XG4iXX0=\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\exception.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/exception.js",
"index": 5,
"index2": 1,
"size": 5950,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./exception",
"loc": "11:17-39"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/exception",
"loc": "23:27-60"
},
{
"moduleId": 11,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\each.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"type": "cjs require",
"userRequest": "../exception",
"loc": "10:17-40"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\helper-missing.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js",
"type": "cjs require",
"userRequest": "../exception",
"loc": "8:17-40"
},
{
"moduleId": 13,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\if.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"type": "cjs require",
"userRequest": "../exception",
"loc": "10:17-40"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\with.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"type": "cjs require",
"userRequest": "../exception",
"loc": "10:17-40"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./exception",
"loc": "22:17-39"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\nvar errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack'];\n\nfunction Exception(message, node) {\n var loc = node && node.loc,\n line = undefined,\n endLineNumber = undefined,\n column = undefined,\n endColumn = undefined;\n\n if (loc) {\n line = loc.start.line;\n endLineNumber = loc.end.line;\n column = loc.start.column;\n endColumn = loc.end.column;\n\n message += ' - ' + line + ':' + column;\n }\n\n var tmp = Error.prototype.constructor.call(this, message);\n\n // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.\n for (var idx = 0; idx < errorProps.length; idx++) {\n this[errorProps[idx]] = tmp[errorProps[idx]];\n }\n\n /* istanbul ignore else */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, Exception);\n }\n\n try {\n if (loc) {\n this.lineNumber = line;\n this.endLineNumber = endLineNumber;\n\n // Work around issue under safari where we can't directly set the column value\n /* istanbul ignore next */\n if (Object.defineProperty) {\n Object.defineProperty(this, 'column', {\n value: column,\n enumerable: true\n });\n Object.defineProperty(this, 'endColumn', {\n value: endColumn,\n enumerable: true\n });\n } else {\n this.column = column;\n this.endColumn = endColumn;\n }\n }\n } catch (nop) {\n /* Ignore if the browser is very particular */\n }\n}\n\nException.prototype = new Error();\n\nexports['default'] = Exception;\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxJQUFNLFVBQVUsR0FBRyxDQUNqQixhQUFhLEVBQ2IsVUFBVSxFQUNWLFlBQVksRUFDWixlQUFlLEVBQ2YsU0FBUyxFQUNULE1BQU0sRUFDTixRQUFRLEVBQ1IsT0FBTyxDQUNSLENBQUM7O0FBRUYsU0FBUyxTQUFTLENBQUMsT0FBTyxFQUFFLElBQUksRUFBRTtBQUNoQyxNQUFJLEdBQUcsR0FBRyxJQUFJLElBQUksSUFBSSxDQUFDLEdBQUc7TUFDeEIsSUFBSSxZQUFBO01BQ0osYUFBYSxZQUFBO01BQ2IsTUFBTSxZQUFBO01BQ04sU0FBUyxZQUFBLENBQUM7O0FBRVosTUFBSSxHQUFHLEVBQUU7QUFDUCxRQUFJLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUM7QUFDdEIsaUJBQWEsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQztBQUM3QixVQUFNLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUM7QUFDMUIsYUFBUyxHQUFHLEdBQUcsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDOztBQUUzQixXQUFPLElBQUksS0FBSyxHQUFHLElBQUksR0FBRyxHQUFHLEdBQUcsTUFBTSxDQUFDO0dBQ3hDOztBQUVELE1BQUksR0FBRyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLENBQUM7OztBQUcxRCxPQUFLLElBQUksR0FBRyxHQUFHLENBQUMsRUFBRSxHQUFHLEdBQUcsVUFBVSxDQUFDLE1BQU0sRUFBRSxHQUFHLEVBQUUsRUFBRTtBQUNoRCxRQUFJLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEdBQUcsR0FBRyxDQUFDLFVBQVUsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO0dBQzlDOzs7QUFHRCxNQUFJLEtBQUssQ0FBQyxpQkFBaUIsRUFBRTtBQUMzQixTQUFLLENBQUMsaUJBQWlCLENBQUMsSUFBSSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0dBQzFDOztBQUVELE1BQUk7QUFDRixRQUFJLEdBQUcsRUFBRTtBQUNQLFVBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFDO0FBQ3ZCLFVBQUksQ0FBQyxhQUFhLEdBQUcsYUFBYSxDQUFDOzs7O0FBSW5DLFVBQUksTUFBTSxDQUFDLGNBQWMsRUFBRTtBQUN6QixjQUFNLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxRQUFRLEVBQUU7QUFDcEMsZUFBSyxFQUFFLE1BQU07QUFDYixvQkFBVSxFQUFFLElBQUk7U0FDakIsQ0FBQyxDQUFDO0FBQ0gsY0FBTSxDQUFDLGNBQWMsQ0FBQyxJQUFJLEVBQUUsV0FBVyxFQUFFO0FBQ3ZDLGVBQUssRUFBRSxTQUFTO0FBQ2hCLG9CQUFVLEVBQUUsSUFBSTtTQUNqQixDQUFDLENBQUM7T0FDSixNQUFNO0FBQ0wsWUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7QUFDckIsWUFBSSxDQUFDLFNBQVMsR0FBRyxTQUFTLENBQUM7T0FDNUI7S0FDRjtHQUNGLENBQUMsT0FBTyxHQUFHLEVBQUU7O0dBRWI7Q0FDRjs7QUFFRCxTQUFTLENBQUMsU0FBUyxHQUFHLElBQUksS0FBSyxFQUFFLENBQUM7O3FCQUVuQixTQUFTIiwiZmlsZSI6ImV4Y2VwdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IGVycm9yUHJvcHMgPSBbXG4gICdkZXNjcmlwdGlvbicsXG4gICdmaWxlTmFtZScsXG4gICdsaW5lTnVtYmVyJyxcbiAgJ2VuZExpbmVOdW1iZXInLFxuICAnbWVzc2FnZScsXG4gICduYW1lJyxcbiAgJ251bWJlcicsXG4gICdzdGFjaydcbl07XG5cbmZ1bmN0aW9uIEV4Y2VwdGlvbihtZXNzYWdlLCBub2RlKSB7XG4gIGxldCBsb2MgPSBub2RlICYmIG5vZGUubG9jLFxuICAgIGxpbmUsXG4gICAgZW5kTGluZU51bWJlcixcbiAgICBjb2x1bW4sXG4gICAgZW5kQ29sdW1uO1xuXG4gIGlmIChsb2MpIHtcbiAgICBsaW5lID0gbG9jLnN0YXJ0LmxpbmU7XG4gICAgZW5kTGluZU51bWJlciA9IGxvYy5lbmQubGluZTtcbiAgICBjb2x1bW4gPSBsb2Muc3RhcnQuY29sdW1uO1xuICAgIGVuZENvbHVtbiA9IGxvYy5lbmQuY29sdW1uO1xuXG4gICAgbWVzc2FnZSArPSAnIC0gJyArIGxpbmUgKyAnOicgKyBjb2x1bW47XG4gIH1cblxuICBsZXQgdG1wID0gRXJyb3IucHJvdG90eXBlLmNvbnN0cnVjdG9yLmNhbGwodGhpcywgbWVzc2FnZSk7XG5cbiAgLy8gVW5mb3J0dW5hdGVseSBlcnJvcnMgYXJlIG5vdCBlbnVtZXJhYmxlIGluIENocm9tZSAoYXQgbGVhc3QpLCBzbyBgZm9yIHByb3AgaW4gdG1wYCBkb2Vzbid0IHdvcmsuXG4gIGZvciAobGV0IGlkeCA9IDA7IGlkeCA8IGVycm9yUHJvcHMubGVuZ3RoOyBpZHgrKykge1xuICAgIHRoaXNbZXJyb3JQcm9wc1tpZHhdXSA9IHRtcFtlcnJvclByb3BzW2lkeF1dO1xuICB9XG5cbiAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgaWYgKEVycm9yLmNhcHR1cmVTdGFja1RyYWNlKSB7XG4gICAgRXJyb3IuY2FwdHVyZVN0YWNrVHJhY2UodGhpcywgRXhjZXB0aW9uKTtcbiAgfVxuXG4gIHRyeSB7XG4gICAgaWYgKGxvYykge1xuICAgICAgdGhpcy5saW5lTnVtYmVyID0gbGluZTtcbiAgICAgIHRoaXMuZW5kTGluZU51bWJlciA9IGVuZExpbmVOdW1iZXI7XG5cbiAgICAgIC8vIFdvcmsgYXJvdW5kIGlzc3VlIHVuZGVyIHNhZmFyaSB3aGVyZSB3ZSBjYW4ndCBkaXJlY3RseSBzZXQgdGhlIGNvbHVtbiB2YWx1ZVxuICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgIGlmIChPYmplY3QuZGVmaW5lUHJvcGVydHkpIHtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRoaXMsICdjb2x1bW4nLCB7XG4gICAgICAgICAgdmFsdWU6IGNvbHVtbixcbiAgICAgICAgICBlbnVtZXJhYmxlOiB0cnVlXG4gICAgICAgIH0pO1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGhpcywgJ2VuZENvbHVtbicsIHtcbiAgICAgICAgICB2YWx1ZTogZW5kQ29sdW1uLFxuICAgICAgICAgIGVudW1lcmFibGU6IHRydWVcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgdGhpcy5lbmRDb2x1bW4gPSBlbmRDb2x1bW47XG4gICAgICB9XG4gICAgfVxuICB9IGNhdGNoIChub3ApIHtcbiAgICAvKiBJZ25vcmUgaWYgdGhlIGJyb3dzZXIgaXMgdmVyeSBwYXJ0aWN1bGFyICovXG4gIH1cbn1cblxuRXhjZXB0aW9uLnByb3RvdHlwZSA9IG5ldyBFcnJvcigpO1xuXG5leHBvcnQgZGVmYXVsdCBFeGNlcHRpb247XG4iXX0=\n"
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"index": 3,
"index2": 16,
"size": 9636,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/base",
"loc": "12:22-50"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./base",
"loc": "26:12-29"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.HandlebarsEnvironment = HandlebarsEnvironment;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utils = require('./utils');\n\nvar _exception = require('./exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nvar _helpers = require('./helpers');\n\nvar _decorators = require('./decorators');\n\nvar _logger = require('./logger');\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _internalProtoAccess = require('./internal/proto-access');\n\nvar VERSION = '4.7.6';\nexports.VERSION = VERSION;\nvar COMPILER_REVISION = 8;\nexports.COMPILER_REVISION = COMPILER_REVISION;\nvar LAST_COMPATIBLE_COMPILER_REVISION = 7;\n\nexports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;\nvar REVISION_CHANGES = {\n 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it\n 2: '== 1.0.0-rc.3',\n 3: '== 1.0.0-rc.4',\n 4: '== 1.x.x',\n 5: '== 2.0.0-alpha.x',\n 6: '>= 2.0.0-beta.1',\n 7: '>= 4.0.0 <4.3.0',\n 8: '>= 4.3.0'\n};\n\nexports.REVISION_CHANGES = REVISION_CHANGES;\nvar objectType = '[object Object]';\n\nfunction HandlebarsEnvironment(helpers, partials, decorators) {\n this.helpers = helpers || {};\n this.partials = partials || {};\n this.decorators = decorators || {};\n\n _helpers.registerDefaultHelpers(this);\n _decorators.registerDefaultDecorators(this);\n}\n\nHandlebarsEnvironment.prototype = {\n constructor: HandlebarsEnvironment,\n\n logger: _logger2['default'],\n log: _logger2['default'].log,\n\n registerHelper: function registerHelper(name, fn) {\n if (_utils.toString.call(name) === objectType) {\n if (fn) {\n throw new _exception2['default']('Arg not supported with multiple helpers');\n }\n _utils.extend(this.helpers, name);\n } else {\n this.helpers[name] = fn;\n }\n },\n unregisterHelper: function unregisterHelper(name) {\n delete this.helpers[name];\n },\n\n registerPartial: function registerPartial(name, partial) {\n if (_utils.toString.call(name) === objectType) {\n _utils.extend(this.partials, name);\n } else {\n if (typeof partial === 'undefined') {\n throw new _exception2['default']('Attempting to register a partial called \"' + name + '\" as undefined');\n }\n this.partials[name] = partial;\n }\n },\n unregisterPartial: function unregisterPartial(name) {\n delete this.partials[name];\n },\n\n registerDecorator: function registerDecorator(name, fn) {\n if (_utils.toString.call(name) === objectType) {\n if (fn) {\n throw new _exception2['default']('Arg not supported with multiple decorators');\n }\n _utils.extend(this.decorators, name);\n } else {\n this.decorators[name] = fn;\n }\n },\n unregisterDecorator: function unregisterDecorator(name) {\n delete this.decorators[name];\n },\n /**\n * Reset the memory of illegal property accesses that have already been logged.\n * @deprecated should only be used in handlebars test-cases\n */\n resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {\n _internalProtoAccess.resetLoggedProperties();\n }\n};\n\nvar log = _logger2['default'].log;\n\nexports.log = log;\nexports.createFrame = _utils.createFrame;\nexports.logger = _logger2['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7cUJBQThDLFNBQVM7O3lCQUNqQyxhQUFhOzs7O3VCQUNJLFdBQVc7OzBCQUNSLGNBQWM7O3NCQUNyQyxVQUFVOzs7O21DQUNTLHlCQUF5Qjs7QUFFeEQsSUFBTSxPQUFPLEdBQUcsT0FBTyxDQUFDOztBQUN4QixJQUFNLGlCQUFpQixHQUFHLENBQUMsQ0FBQzs7QUFDNUIsSUFBTSxpQ0FBaUMsR0FBRyxDQUFDLENBQUM7OztBQUU1QyxJQUFNLGdCQUFnQixHQUFHO0FBQzlCLEdBQUMsRUFBRSxhQUFhO0FBQ2hCLEdBQUMsRUFBRSxlQUFlO0FBQ2xCLEdBQUMsRUFBRSxlQUFlO0FBQ2xCLEdBQUMsRUFBRSxVQUFVO0FBQ2IsR0FBQyxFQUFFLGtCQUFrQjtBQUNyQixHQUFDLEVBQUUsaUJBQWlCO0FBQ3BCLEdBQUMsRUFBRSxpQkFBaUI7QUFDcEIsR0FBQyxFQUFFLFVBQVU7Q0FDZCxDQUFDOzs7QUFFRixJQUFNLFVBQVUsR0FBRyxpQkFBaUIsQ0FBQzs7QUFFOUIsU0FBUyxxQkFBcUIsQ0FBQyxPQUFPLEVBQUUsUUFBUSxFQUFFLFVBQVUsRUFBRTtBQUNuRSxNQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sSUFBSSxFQUFFLENBQUM7QUFDN0IsTUFBSSxDQUFDLFFBQVEsR0FBRyxRQUFRLElBQUksRUFBRSxDQUFDO0FBQy9CLE1BQUksQ0FBQyxVQUFVLEdBQUcsVUFBVSxJQUFJLEVBQUUsQ0FBQzs7QUFFbkMsa0NBQXVCLElBQUksQ0FBQyxDQUFDO0FBQzdCLHdDQUEwQixJQUFJLENBQUMsQ0FBQztDQUNqQzs7QUFFRCxxQkFBcUIsQ0FBQyxTQUFTLEdBQUc7QUFDaEMsYUFBVyxFQUFFLHFCQUFxQjs7QUFFbEMsUUFBTSxxQkFBUTtBQUNkLEtBQUcsRUFBRSxvQkFBTyxHQUFHOztBQUVmLGdCQUFjLEVBQUUsd0JBQVMsSUFBSSxFQUFFLEVBQUUsRUFBRTtBQUNqQyxRQUFJLGdCQUFTLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxVQUFVLEVBQUU7QUFDdEMsVUFBSSxFQUFFLEVBQUU7QUFDTixjQUFNLDJCQUFjLHlDQUF5QyxDQUFDLENBQUM7T0FDaEU7QUFDRCxvQkFBTyxJQUFJLENBQUMsT0FBTyxFQUFFLElBQUksQ0FBQyxDQUFDO0tBQzVCLE1BQU07QUFDTCxVQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQztLQUN6QjtHQUNGO0FBQ0Qsa0JBQWdCLEVBQUUsMEJBQVMsSUFBSSxFQUFFO0FBQy9CLFdBQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztHQUMzQjs7QUFFRCxpQkFBZSxFQUFFLHlCQUFTLElBQUksRUFBRSxPQUFPLEVBQUU7QUFDdkMsUUFBSSxnQkFBUyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssVUFBVSxFQUFFO0FBQ3RDLG9CQUFPLElBQUksQ0FBQyxRQUFRLEVBQUUsSUFBSSxDQUFDLENBQUM7S0FDN0IsTUFBTTtBQUNMLFVBQUksT0FBTyxPQUFPLEtBQUssV0FBVyxFQUFFO0FBQ2xDLGNBQU0seUVBQ3dDLElBQUksb0JBQ2pELENBQUM7T0FDSDtBQUNELFVBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLEdBQUcsT0FBTyxDQUFDO0tBQy9CO0dBQ0Y7QUFDRCxtQkFBaUIsRUFBRSwyQkFBUyxJQUFJLEVBQUU7QUFDaEMsV0FBTyxJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDO0dBQzVCOztBQUVELG1CQUFpQixFQUFFLDJCQUFTLElBQUksRUFBRSxFQUFFLEVBQUU7QUFDcEMsUUFBSSxnQkFBUyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssVUFBVSxFQUFFO0FBQ3RDLFVBQUksRUFBRSxFQUFFO0FBQ04sY0FBTSwyQkFBYyw0Q0FBNEMsQ0FBQyxDQUFDO09BQ25FO0FBQ0Qsb0JBQU8sSUFBSSxDQUFDLFVBQVUsRUFBRSxJQUFJLENBQUMsQ0FBQztLQUMvQixNQUFNO0FBQ0wsVUFBSSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUM7S0FDNUI7R0FDRjtBQUNELHFCQUFtQixFQUFFLDZCQUFTLElBQUksRUFBRTtBQUNsQyxXQUFPLElBQUksQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUM7R0FDOUI7Ozs7O0FBS0QsNkJBQTJCLEVBQUEsdUNBQUc7QUFDNUIsZ0RBQXVCLENBQUM7R0FDekI7Q0FDRixDQUFDOztBQUVLLElBQUksR0FBRyxHQUFHLG9CQUFPLEdBQUcsQ0FBQzs7O1FBRW5CLFdBQVc7UUFBRSxNQUFNIiwiZmlsZSI6ImJhc2UuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjcmVhdGVGcmFtZSwgZXh0ZW5kLCB0b1N0cmluZyB9IGZyb20gJy4vdXRpbHMnO1xuaW1wb3J0IEV4Y2VwdGlvbiBmcm9tICcuL2V4Y2VwdGlvbic7XG5pbXBvcnQgeyByZWdpc3RlckRlZmF1bHRIZWxwZXJzIH0gZnJvbSAnLi9oZWxwZXJzJztcbmltcG9ydCB7IHJlZ2lzdGVyRGVmYXVsdERlY29yYXRvcnMgfSBmcm9tICcuL2RlY29yYXRvcnMnO1xuaW1wb3J0IGxvZ2dlciBmcm9tICcuL2xvZ2dlcic7XG5pbXBvcnQgeyByZXNldExvZ2dlZFByb3BlcnRpZXMgfSBmcm9tICcuL2ludGVybmFsL3Byb3RvLWFjY2Vzcyc7XG5cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuNy42JztcbmV4cG9ydCBjb25zdCBDT01QSUxFUl9SRVZJU0lPTiA9IDg7XG5leHBvcnQgY29uc3QgTEFTVF9DT01QQVRJQkxFX0NPTVBJTEVSX1JFVklTSU9OID0gNztcblxuZXhwb3J0IGNvbnN0IFJFVklTSU9OX0NIQU5HRVMgPSB7XG4gIDE6ICc8PSAxLjAucmMuMicsIC8vIDEuMC5yYy4yIGlzIGFjdHVhbGx5IHJldjIgYnV0IGRvZXNuJ3QgcmVwb3J0IGl0XG4gIDI6ICc9PSAxLjAuMC1yYy4zJyxcbiAgMzogJz09IDEuMC4wLXJjLjQnLFxuICA0OiAnPT0gMS54LngnLFxuICA1OiAnPT0gMi4wLjAtYWxwaGEueCcsXG4gIDY6ICc+PSAyLjAuMC1iZXRhLjEnLFxuICA3OiAnPj0gNC4wLjAgPDQuMy4wJyxcbiAgODogJz49IDQuMy4wJ1xufTtcblxuY29uc3Qgb2JqZWN0VHlwZSA9ICdbb2JqZWN0IE9iamVjdF0nO1xuXG5leHBvcnQgZnVuY3Rpb24gSGFuZGxlYmFyc0Vudmlyb25tZW50KGhlbHBlcnMsIHBhcnRpYWxzLCBkZWNvcmF0b3JzKSB7XG4gIHRoaXMuaGVscGVycyA9IGhlbHBlcnMgfHwge307XG4gIHRoaXMucGFydGlhbHMgPSBwYXJ0aWFscyB8fCB7fTtcbiAgdGhpcy5kZWNvcmF0b3JzID0gZGVjb3JhdG9ycyB8fCB7fTtcblxuICByZWdpc3RlckRlZmF1bHRIZWxwZXJzKHRoaXMpO1xuICByZWdpc3RlckRlZmF1bHREZWNvcmF0b3JzKHRoaXMpO1xufVxuXG5IYW5kbGViYXJzRW52aXJvbm1lbnQucHJvdG90eXBlID0ge1xuICBjb25zdHJ1Y3RvcjogSGFuZGxlYmFyc0Vudmlyb25tZW50LFxuXG4gIGxvZ2dlcjogbG9nZ2VyLFxuICBsb2c6IGxvZ2dlci5sb2csXG5cbiAgcmVnaXN0ZXJIZWxwZXI6IGZ1bmN0aW9uKG5hbWUsIGZuKSB7XG4gICAgaWYgKHRvU3RyaW5nLmNhbGwobmFtZSkgPT09IG9iamVjdFR5cGUpIHtcbiAgICAgIGlmIChmbikge1xuICAgICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCdBcmcgbm90IHN1cHBvcnRlZCB3aXRoIG11bHRpcGxlIGhlbHBlcnMnKTtcbiAgICAgIH1cbiAgICAgIGV4dGVuZCh0aGlzLmhlbHBlcnMsIG5hbWUpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLmhlbHBlcnNbbmFtZV0gPSBmbjtcbiAgICB9XG4gIH0sXG4gIHVucmVnaXN0ZXJIZWxwZXI6IGZ1bmN0aW9uKG5hbWUpIHtcbiAgICBkZWxldGUgdGhpcy5oZWxwZXJzW25hbWVdO1xuICB9LFxuXG4gIHJlZ2lzdGVyUGFydGlhbDogZnVuY3Rpb24obmFtZSwgcGFydGlhbCkge1xuICAgIGlmICh0b1N0cmluZy5jYWxsKG5hbWUpID09PSBvYmplY3RUeXBlKSB7XG4gICAgICBleHRlbmQodGhpcy5wYXJ0aWFscywgbmFtZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGlmICh0eXBlb2YgcGFydGlhbCA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihcbiAgICAgICAgICBgQXR0ZW1wdGluZyB0byByZWdpc3RlciBhIHBhcnRpYWwgY2FsbGVkIFwiJHtuYW1lfVwiIGFzIHVuZGVmaW5lZGBcbiAgICAgICAgKTtcbiAgICAgIH1cbiAgICAgIHRoaXMucGFydGlhbHNbbmFtZV0gPSBwYXJ0aWFsO1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlclBhcnRpYWw6IGZ1bmN0aW9uKG5hbWUpIHtcbiAgICBkZWxldGUgdGhpcy5wYXJ0aWFsc1tuYW1lXTtcbiAgfSxcblxuICByZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSwgZm4pIHtcbiAgICBpZiAodG9TdHJpbmcuY2FsbChuYW1lKSA9PT0gb2JqZWN0VHlwZSkge1xuICAgICAgaWYgKGZuKSB7XG4gICAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ0FyZyBub3Qgc3VwcG9ydGVkIHdpdGggbXVsdGlwbGUgZGVjb3JhdG9ycycpO1xuICAgICAgfVxuICAgICAgZXh0ZW5kKHRoaXMuZGVjb3JhdG9ycywgbmFtZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuZGVjb3JhdG9yc1tuYW1lXSA9IGZuO1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSkge1xuICAgIGRlbGV0ZSB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH0sXG4gIC8qKlxuICAgKiBSZXNldCB0aGUgbWVtb3J5IG9mIGlsbGVnYWwgcHJvcGVydHkgYWNjZXNzZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBsb2dnZWQuXG4gICAqIEBkZXByZWNhdGVkIHNob3VsZCBvbmx5IGJlIHVzZWQgaW4gaGFuZGxlYmFycyB0ZXN0LWNhc2VzXG4gICAqL1xuICByZXNldExvZ2dlZFByb3BlcnR5QWNjZXNzZXMoKSB7XG4gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19\n"
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"index": 6,
"index2": 10,
"size": 3909,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"issuerId": 2,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./helpers",
"loc": "15:15-35"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./helpers",
"loc": "28:15-35"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.registerDefaultHelpers = registerDefaultHelpers;\nexports.moveHelperToHooks = moveHelperToHooks;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _helpersBlockHelperMissing = require('./helpers/block-helper-missing');\n\nvar _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);\n\nvar _helpersEach = require('./helpers/each');\n\nvar _helpersEach2 = _interopRequireDefault(_helpersEach);\n\nvar _helpersHelperMissing = require('./helpers/helper-missing');\n\nvar _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);\n\nvar _helpersIf = require('./helpers/if');\n\nvar _helpersIf2 = _interopRequireDefault(_helpersIf);\n\nvar _helpersLog = require('./helpers/log');\n\nvar _helpersLog2 = _interopRequireDefault(_helpersLog);\n\nvar _helpersLookup = require('./helpers/lookup');\n\nvar _helpersLookup2 = _interopRequireDefault(_helpersLookup);\n\nvar _helpersWith = require('./helpers/with');\n\nvar _helpersWith2 = _interopRequireDefault(_helpersWith);\n\nfunction registerDefaultHelpers(instance) {\n _helpersBlockHelperMissing2['default'](instance);\n _helpersEach2['default'](instance);\n _helpersHelperMissing2['default'](instance);\n _helpersIf2['default'](instance);\n _helpersLog2['default'](instance);\n _helpersLookup2['default'](instance);\n _helpersWith2['default'](instance);\n}\n\nfunction moveHelperToHooks(instance, helperName, keepHelper) {\n if (instance.helpers[helperName]) {\n instance.hooks[helperName] = instance.helpers[helperName];\n if (!keepHelper) {\n delete instance.helpers[helperName];\n }\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O3lDQUF1QyxnQ0FBZ0M7Ozs7MkJBQzlDLGdCQUFnQjs7OztvQ0FDUCwwQkFBMEI7Ozs7eUJBQ3JDLGNBQWM7Ozs7MEJBQ2IsZUFBZTs7Ozs2QkFDWixrQkFBa0I7Ozs7MkJBQ3BCLGdCQUFnQjs7OztBQUVsQyxTQUFTLHNCQUFzQixDQUFDLFFBQVEsRUFBRTtBQUMvQyx5Q0FBMkIsUUFBUSxDQUFDLENBQUM7QUFDckMsMkJBQWEsUUFBUSxDQUFDLENBQUM7QUFDdkIsb0NBQXNCLFFBQVEsQ0FBQyxDQUFDO0FBQ2hDLHlCQUFXLFFBQVEsQ0FBQyxDQUFDO0FBQ3JCLDBCQUFZLFFBQVEsQ0FBQyxDQUFDO0FBQ3RCLDZCQUFlLFFBQVEsQ0FBQyxDQUFDO0FBQ3pCLDJCQUFhLFFBQVEsQ0FBQyxDQUFDO0NBQ3hCOztBQUVNLFNBQVMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUU7QUFDbEUsTUFBSSxRQUFRLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLEdBQUcsUUFBUSxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQztBQUMxRCxRQUFJLENBQUMsVUFBVSxFQUFFO0FBQ2YsYUFBTyxRQUFRLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0tBQ3JDO0dBQ0Y7Q0FDRiIsImZpbGUiOiJoZWxwZXJzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVyQmxvY2tIZWxwZXJNaXNzaW5nIGZyb20gJy4vaGVscGVycy9ibG9jay1oZWxwZXItbWlzc2luZyc7XG5pbXBvcnQgcmVnaXN0ZXJFYWNoIGZyb20gJy4vaGVscGVycy9lYWNoJztcbmltcG9ydCByZWdpc3RlckhlbHBlck1pc3NpbmcgZnJvbSAnLi9oZWxwZXJzL2hlbHBlci1taXNzaW5nJztcbmltcG9ydCByZWdpc3RlcklmIGZyb20gJy4vaGVscGVycy9pZic7XG5pbXBvcnQgcmVnaXN0ZXJMb2cgZnJvbSAnLi9oZWxwZXJzL2xvZyc7XG5pbXBvcnQgcmVnaXN0ZXJMb29rdXAgZnJvbSAnLi9oZWxwZXJzL2xvb2t1cCc7XG5pbXBvcnQgcmVnaXN0ZXJXaXRoIGZyb20gJy4vaGVscGVycy93aXRoJztcblxuZXhwb3J0IGZ1bmN0aW9uIHJlZ2lzdGVyRGVmYXVsdEhlbHBlcnMoaW5zdGFuY2UpIHtcbiAgcmVnaXN0ZXJCbG9ja0hlbHBlck1pc3NpbmcoaW5zdGFuY2UpO1xuICByZWdpc3RlckVhY2goaW5zdGFuY2UpO1xuICByZWdpc3RlckhlbHBlck1pc3NpbmcoaW5zdGFuY2UpO1xuICByZWdpc3RlcklmKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJMb2coaW5zdGFuY2UpO1xuICByZWdpc3Rlckxvb2t1cChpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyV2l0aChpbnN0YW5jZSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBtb3ZlSGVscGVyVG9Ib29rcyhpbnN0YW5jZSwgaGVscGVyTmFtZSwga2VlcEhlbHBlcikge1xuICBpZiAoaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXSkge1xuICAgIGluc3RhbmNlLmhvb2tzW2hlbHBlck5hbWVdID0gaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXTtcbiAgICBpZiAoIWtlZXBIZWxwZXIpIHtcbiAgICAgIGRlbGV0ZSBpbnN0YW5jZS5oZWxwZXJzW2hlbHBlck5hbWVdO1xuICAgIH1cbiAgfVxufVxuIl19\n"
},
{
"id": 4,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webpack\\buildin\\global.js",
"name": "(webpack)/buildin/global.js",
"index": 9,
"index2": 3,
"size": 472,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js",
"issuerId": 23,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 0,
"building": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 11,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\each.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-53"
},
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-50"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n"
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\logger.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/logger.js",
"index": 17,
"index2": 13,
"size": 3883,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"issuerId": 2,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./logger",
"loc": "19:14-33"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"type": "cjs require",
"userRequest": "../logger",
"loc": "13:14-34"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\n\nvar _utils = require('./utils');\n\nvar logger = {\n methodMap: ['debug', 'info', 'warn', 'error'],\n level: 'info',\n\n // Maps a given level value to the `methodMap` indexes above.\n lookupLevel: function lookupLevel(level) {\n if (typeof level === 'string') {\n var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());\n if (levelMap >= 0) {\n level = levelMap;\n } else {\n level = parseInt(level, 10);\n }\n }\n\n return level;\n },\n\n // Can be overridden in the host environment\n log: function log(level) {\n level = logger.lookupLevel(level);\n\n if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {\n var method = logger.methodMap[level];\n // eslint-disable-next-line no-console\n if (!console[method]) {\n method = 'log';\n }\n\n for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n message[_key - 1] = arguments[_key];\n }\n\n console[method].apply(console, message); // eslint-disable-line no-console\n }\n }\n};\n\nexports['default'] = logger;\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O3FCQUF3QixTQUFTOztBQUVqQyxJQUFJLE1BQU0sR0FBRztBQUNYLFdBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxPQUFLLEVBQUUsTUFBTTs7O0FBR2IsYUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMzQixRQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBRTtBQUM3QixVQUFJLFFBQVEsR0FBRyxlQUFRLE1BQU0sQ0FBQyxTQUFTLEVBQUUsS0FBSyxDQUFDLFdBQVcsRUFBRSxDQUFDLENBQUM7QUFDOUQsVUFBSSxRQUFRLElBQUksQ0FBQyxFQUFFO0FBQ2pCLGFBQUssR0FBRyxRQUFRLENBQUM7T0FDbEIsTUFBTTtBQUNMLGFBQUssR0FBRyxRQUFRLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDO09BQzdCO0tBQ0Y7O0FBRUQsV0FBTyxLQUFLLENBQUM7R0FDZDs7O0FBR0QsS0FBRyxFQUFFLGFBQVMsS0FBSyxFQUFjO0FBQy9CLFNBQUssR0FBRyxNQUFNLENBQUMsV0FBVyxDQUFDLEtBQUssQ0FBQyxDQUFDOztBQUVsQyxRQUNFLE9BQU8sT0FBTyxLQUFLLFdBQVcsSUFDOUIsTUFBTSxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLElBQUksS0FBSyxFQUN6QztBQUNBLFVBQUksTUFBTSxHQUFHLE1BQU0sQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLENBQUM7O0FBRXJDLFVBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLEVBQUU7QUFDcEIsY0FBTSxHQUFHLEtBQUssQ0FBQztPQUNoQjs7d0NBWG1CLE9BQU87QUFBUCxlQUFPOzs7QUFZM0IsYUFBTyxDQUFDLE1BQU0sT0FBQyxDQUFmLE9BQU8sRUFBWSxPQUFPLENBQUMsQ0FBQztLQUM3QjtHQUNGO0NBQ0YsQ0FBQzs7cUJBRWEsTUFBTSIsImZpbGUiOiJsb2dnZXIuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBpbmRleE9mIH0gZnJvbSAnLi91dGlscyc7XG5cbmxldCBsb2dnZXIgPSB7XG4gIG1ldGhvZE1hcDogWydkZWJ1ZycsICdpbmZvJywgJ3dhcm4nLCAnZXJyb3InXSxcbiAgbGV2ZWw6ICdpbmZvJyxcblxuICAvLyBNYXBzIGEgZ2l2ZW4gbGV2ZWwgdmFsdWUgdG8gdGhlIGBtZXRob2RNYXBgIGluZGV4ZXMgYWJvdmUuXG4gIGxvb2t1cExldmVsOiBmdW5jdGlvbihsZXZlbCkge1xuICAgIGlmICh0eXBlb2YgbGV2ZWwgPT09ICdzdHJpbmcnKSB7XG4gICAgICBsZXQgbGV2ZWxNYXAgPSBpbmRleE9mKGxvZ2dlci5tZXRob2RNYXAsIGxldmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgaWYgKGxldmVsTWFwID49IDApIHtcbiAgICAgICAgbGV2ZWwgPSBsZXZlbE1hcDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGxldmVsID0gcGFyc2VJbnQobGV2ZWwsIDEwKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbGV2ZWw7XG4gIH0sXG5cbiAgLy8gQ2FuIGJlIG92ZXJyaWRkZW4gaW4gdGhlIGhvc3QgZW52aXJvbm1lbnRcbiAgbG9nOiBmdW5jdGlvbihsZXZlbCwgLi4ubWVzc2FnZSkge1xuICAgIGxldmVsID0gbG9nZ2VyLmxvb2t1cExldmVsKGxldmVsKTtcblxuICAgIGlmIChcbiAgICAgIHR5cGVvZiBjb25zb2xlICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgbG9nZ2VyLmxvb2t1cExldmVsKGxvZ2dlci5sZXZlbCkgPD0gbGV2ZWxcbiAgICApIHtcbiAgICAgIGxldCBtZXRob2QgPSBsb2dnZXIubWV0aG9kTWFwW2xldmVsXTtcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlXG4gICAgICBpZiAoIWNvbnNvbGVbbWV0aG9kXSkge1xuICAgICAgICBtZXRob2QgPSAnbG9nJztcbiAgICAgIH1cbiAgICAgIGNvbnNvbGVbbWV0aG9kXSguLi5tZXNzYWdlKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgfVxuICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBsb2dnZXI7XG4iXX0=\n"
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"index": 18,
"index2": 15,
"size": 8678,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"issuerId": 2,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./internal/proto-access",
"loc": "23:27-61"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./internal/proto-access",
"loc": "32:27-61"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.createProtoAccessControl = createProtoAccessControl;\nexports.resultIsAllowed = resultIsAllowed;\nexports.resetLoggedProperties = resetLoggedProperties;\n// istanbul ignore next\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\nvar _createNewLookupObject = require('./create-new-lookup-object');\n\nvar _logger = require('../logger');\n\nvar logger = _interopRequireWildcard(_logger);\n\nvar loggedProperties = Object.create(null);\n\nfunction createProtoAccessControl(runtimeOptions) {\n var defaultMethodWhiteList = Object.create(null);\n defaultMethodWhiteList['constructor'] = false;\n defaultMethodWhiteList['__defineGetter__'] = false;\n defaultMethodWhiteList['__defineSetter__'] = false;\n defaultMethodWhiteList['__lookupGetter__'] = false;\n\n var defaultPropertyWhiteList = Object.create(null);\n // eslint-disable-next-line no-proto\n defaultPropertyWhiteList['__proto__'] = false;\n\n return {\n properties: {\n whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),\n defaultValue: runtimeOptions.allowProtoPropertiesByDefault\n },\n methods: {\n whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),\n defaultValue: runtimeOptions.allowProtoMethodsByDefault\n }\n };\n}\n\nfunction resultIsAllowed(result, protoAccessControl, propertyName) {\n if (typeof result === 'function') {\n return checkWhiteList(protoAccessControl.methods, propertyName);\n } else {\n return checkWhiteList(protoAccessControl.properties, propertyName);\n }\n}\n\nfunction checkWhiteList(protoAccessControlForType, propertyName) {\n if (protoAccessControlForType.whitelist[propertyName] !== undefined) {\n return protoAccessControlForType.whitelist[propertyName] === true;\n }\n if (protoAccessControlForType.defaultValue !== undefined) {\n return protoAccessControlForType.defaultValue;\n }\n logUnexpecedPropertyAccessOnce(propertyName);\n return false;\n}\n\nfunction logUnexpecedPropertyAccessOnce(propertyName) {\n if (loggedProperties[propertyName] !== true) {\n loggedProperties[propertyName] = true;\n logger.log('error', 'Handlebars: Access has been denied to resolve the property \"' + propertyName + '\" because it is not an \"own property\" of its parent.\\n' + 'You can add a runtime option to disable the check or this warning:\\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details');\n }\n}\n\nfunction resetLoggedProperties() {\n Object.keys(loggedProperties).forEach(function (propertyName) {\n delete loggedProperties[propertyName];\n });\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3Byb3RvLWFjY2Vzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O3FDQUFzQyw0QkFBNEI7O3NCQUMxQyxXQUFXOztJQUF2QixNQUFNOztBQUVsQixJQUFNLGdCQUFnQixHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7O0FBRXRDLFNBQVMsd0JBQXdCLENBQUMsY0FBYyxFQUFFO0FBQ3ZELE1BQUksc0JBQXNCLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNqRCx3QkFBc0IsQ0FBQyxhQUFhLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDOUMsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDbkQsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDbkQsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0FBRyxLQUFLLENBQUM7O0FBRW5ELE1BQUksd0JBQXdCLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQzs7QUFFbkQsMEJBQXdCLENBQUMsV0FBVyxDQUFDLEdBQUcsS0FBSyxDQUFDOztBQUU5QyxTQUFPO0FBQ0wsY0FBVSxFQUFFO0FBQ1YsZUFBUyxFQUFFLDZDQUNULHdCQUF3QixFQUN4QixjQUFjLENBQUMsc0JBQXNCLENBQ3RDO0FBQ0Qsa0JBQVksRUFBRSxjQUFjLENBQUMsNkJBQTZCO0tBQzNEO0FBQ0QsV0FBTyxFQUFFO0FBQ1AsZUFBUyxFQUFFLDZDQUNULHNCQUFzQixFQUN0QixjQUFjLENBQUMsbUJBQW1CLENBQ25DO0FBQ0Qsa0JBQVksRUFBRSxjQUFjLENBQUMsMEJBQTBCO0tBQ3hEO0dBQ0YsQ0FBQztDQUNIOztBQUVNLFNBQVMsZUFBZSxDQUFDLE1BQU0sRUFBRSxrQkFBa0IsRUFBRSxZQUFZLEVBQUU7QUFDeEUsTUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLEVBQUU7QUFDaEMsV0FBTyxjQUFjLENBQUMsa0JBQWtCLENBQUMsT0FBTyxFQUFFLFlBQVksQ0FBQyxDQUFDO0dBQ2pFLE1BQU07QUFDTCxXQUFPLGNBQWMsQ0FBQyxrQkFBa0IsQ0FBQyxVQUFVLEVBQUUsWUFBWSxDQUFDLENBQUM7R0FDcEU7Q0FDRjs7QUFFRCxTQUFTLGNBQWMsQ0FBQyx5QkFBeUIsRUFBRSxZQUFZLEVBQUU7QUFDL0QsTUFBSSx5QkFBeUIsQ0FBQyxTQUFTLENBQUMsWUFBWSxDQUFDLEtBQUssU0FBUyxFQUFFO0FBQ25FLFdBQU8seUJBQXlCLENBQUMsU0FBUyxDQUFDLFlBQVksQ0FBQyxLQUFLLElBQUksQ0FBQztHQUNuRTtBQUNELE1BQUkseUJBQXlCLENBQUMsWUFBWSxLQUFLLFNBQVMsRUFBRTtBQUN4RCxXQUFPLHlCQUF5QixDQUFDLFlBQVksQ0FBQztHQUMvQztBQUNELGdDQUE4QixDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQzdDLFNBQU8sS0FBSyxDQUFDO0NBQ2Q7O0FBRUQsU0FBUyw4QkFBOEIsQ0FBQyxZQUFZLEVBQUU7QUFDcEQsTUFBSSxnQkFBZ0IsQ0FBQyxZQUFZLENBQUMsS0FBSyxJQUFJLEVBQUU7QUFDM0Msb0JBQWdCLENBQUMsWUFBWSxDQUFDLEdBQUcsSUFBSSxDQUFDO0FBQ3RDLFVBQU0sQ0FBQyxHQUFHLENBQ1IsT0FBTyxFQUNQLGlFQUErRCxZQUFZLG9JQUNILG9IQUMyQyxDQUNwSCxDQUFDO0dBQ0g7Q0FDRjs7QUFFTSxTQUFTLHFCQUFxQixHQUFHO0FBQ3RDLFFBQU0sQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQSxZQUFZLEVBQUk7QUFDcEQsV0FBTyxnQkFBZ0IsQ0FBQyxZQUFZLENBQUMsQ0FBQztHQUN2QyxDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJwcm90by1hY2Nlc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjcmVhdGVOZXdMb29rdXBPYmplY3QgfSBmcm9tICcuL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdCc7XG5pbXBvcnQgKiBhcyBsb2dnZXIgZnJvbSAnLi4vbG9nZ2VyJztcblxuY29uc3QgbG9nZ2VkUHJvcGVydGllcyA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVQcm90b0FjY2Vzc0NvbnRyb2wocnVudGltZU9wdGlvbnMpIHtcbiAgbGV0IGRlZmF1bHRNZXRob2RXaGl0ZUxpc3QgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICBkZWZhdWx0TWV0aG9kV2hpdGVMaXN0Wydjb25zdHJ1Y3RvciddID0gZmFsc2U7XG4gIGRlZmF1bHRNZXRob2RXaGl0ZUxpc3RbJ19fZGVmaW5lR2V0dGVyX18nXSA9IGZhbHNlO1xuICBkZWZhdWx0TWV0aG9kV2hpdGVMaXN0WydfX2RlZmluZVNldHRlcl9fJ10gPSBmYWxzZTtcbiAgZGVmYXVsdE1ldGhvZFdoaXRlTGlzdFsnX19sb29rdXBHZXR0ZXJfXyddID0gZmFsc2U7XG5cbiAgbGV0IGRlZmF1bHRQcm9wZXJ0eVdoaXRlTGlzdCA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1wcm90b1xuICBkZWZhdWx0UHJvcGVydHlXaGl0ZUxpc3RbJ19fcHJvdG9fXyddID0gZmFsc2U7XG5cbiAgcmV0dXJuIHtcbiAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICB3aGl0ZWxpc3Q6IGNyZWF0ZU5ld0xvb2t1cE9iamVjdChcbiAgICAgICAgZGVmYXVsdFByb3BlcnR5V2hpdGVMaXN0LFxuICAgICAgICBydW50aW1lT3B0aW9ucy5hbGxvd2VkUHJvdG9Qcm9wZXJ0aWVzXG4gICAgICApLFxuICAgICAgZGVmYXVsdFZhbHVlOiBydW50aW1lT3B0aW9ucy5hbGxvd1Byb3RvUHJvcGVydGllc0J5RGVmYXVsdFxuICAgIH0sXG4gICAgbWV0aG9kczoge1xuICAgICAgd2hpdGVsaXN0OiBjcmVhdGVOZXdMb29rdXBPYmplY3QoXG4gICAgICAgIGRlZmF1bHRNZXRob2RXaGl0ZUxpc3QsXG4gICAgICAgIHJ1bnRpbWVPcHRpb25zLmFsbG93ZWRQcm90b01ldGhvZHNcbiAgICAgICksXG4gICAgICBkZWZhdWx0VmFsdWU6IHJ1bnRpbWVPcHRpb25zLmFsbG93UHJvdG9NZXRob2RzQnlEZWZhdWx0XG4gICAgfVxuICB9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gcmVzdWx0SXNBbGxvd2VkKHJlc3VsdCwgcHJvdG9BY2Nlc3NDb250cm9sLCBwcm9wZXJ0eU5hbWUpIHtcbiAgaWYgKHR5cGVvZiByZXN1bHQgPT09ICdmdW5jdGlvbicpIHtcbiAgICByZXR1cm4gY2hlY2tXaGl0ZUxpc3QocHJvdG9BY2Nlc3NDb250cm9sLm1ldGhvZHMsIHByb3BlcnR5TmFtZSk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIGNoZWNrV2hpdGVMaXN0KHByb3RvQWNjZXNzQ29udHJvbC5wcm9wZXJ0aWVzLCBwcm9wZXJ0eU5hbWUpO1xuICB9XG59XG5cbmZ1bmN0aW9uIGNoZWNrV2hpdGVMaXN0KHByb3RvQWNjZXNzQ29udHJvbEZvclR5cGUsIHByb3BlcnR5TmFtZSkge1xuICBpZiAocHJvdG9BY2Nlc3NDb250cm9sRm9yVHlwZS53aGl0ZWxpc3RbcHJvcGVydHlOYW1lXSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgcmV0dXJuIHByb3RvQWNjZXNzQ29udHJvbEZvclR5cGUud2hpdGVsaXN0W3Byb3BlcnR5TmFtZV0gPT09IHRydWU7XG4gIH1cbiAgaWYgKHByb3RvQWNjZXNzQ29udHJvbEZvclR5cGUuZGVmYXVsdFZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICByZXR1cm4gcHJvdG9BY2Nlc3NDb250cm9sRm9yVHlwZS5kZWZhdWx0VmFsdWU7XG4gIH1cbiAgbG9nVW5leHBlY2VkUHJvcGVydHlBY2Nlc3NPbmNlKHByb3BlcnR5TmFtZSk7XG4gIHJldHVybiBmYWxzZTtcbn1cblxuZnVuY3Rpb24gbG9nVW5leHBlY2VkUHJvcGVydHlBY2Nlc3NPbmNlKHByb3BlcnR5TmFtZSkge1xuICBpZiAobG9nZ2VkUHJvcGVydGllc1twcm9wZXJ0eU5hbWVdICE9PSB0cnVlKSB7XG4gICAgbG9nZ2VkUHJvcGVydGllc1twcm9wZXJ0eU5hbWVdID0gdHJ1ZTtcbiAgICBsb2dnZXIubG9nKFxuICAgICAgJ2Vycm9yJyxcbiAgICAgIGBIYW5kbGViYXJzOiBBY2Nlc3MgaGFzIGJlZW4gZGVuaWVkIHRvIHJlc29sdmUgdGhlIHByb3BlcnR5IFwiJHtwcm9wZXJ0eU5hbWV9XCIgYmVjYXVzZSBpdCBpcyBub3QgYW4gXCJvd24gcHJvcGVydHlcIiBvZiBpdHMgcGFyZW50LlxcbmAgK1xuICAgICAgICBgWW91IGNhbiBhZGQgYSBydW50aW1lIG9wdGlvbiB0byBkaXNhYmxlIHRoZSBjaGVjayBvciB0aGlzIHdhcm5pbmc6XFxuYCArXG4gICAgICAgIGBTZWUgaHR0cHM6Ly9oYW5kbGViYXJzanMuY29tL2FwaS1yZWZlcmVuY2UvcnVudGltZS1vcHRpb25zLmh0bWwjb3B0aW9ucy10by1jb250cm9sLXByb3RvdHlwZS1hY2Nlc3MgZm9yIGRldGFpbHNgXG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCkge1xuICBPYmplY3Qua2V5cyhsb2dnZWRQcm9wZXJ0aWVzKS5mb3JFYWNoKHByb3BlcnR5TmFtZSA9PiB7XG4gICAgZGVsZXRlIGxvZ2dlZFByb3BlcnRpZXNbcHJvcGVydHlOYW1lXTtcbiAgfSk7XG59XG4iXX0=\n"
},
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"index": 0,
"index2": 23,
"size": 37396,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 128,
"building": 2466
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"source": "var Handlebars = require(\"../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" <link rel=\\\"stylesheet\\\" href=\\\"\"\n + container.escapeExpression(container.lambda(depth0, depth0))\n + \"\\\">\\r\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \" <link rel=\\\"stylesheet\\\" href=\\\"\"\n + alias2(alias1((depth0 != null ? lookupProperty(depth0,\"file\") : depth0), depth0))\n + \"\\\" media=\\\"\"\n + alias2(alias1((depth0 != null ? lookupProperty(depth0,\"query\") : depth0), depth0))\n + \"\\\">\\r\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \" <script src=\\\"\"\n + container.escapeExpression(container.lambda(depth0, depth0))\n + \"\\\"></script>\\r\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \" <script src=\\\"\"\n + container.escapeExpression(container.lambda((depth0 != null ? lookupProperty(depth0,\"file\") : depth0), depth0))\n + \"\\\"></script>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<!DOCTYPE html>\\r\\n<html class=\\\"no-js\\\" lang=\\\"en\\\">\\r\\n\\r\\n<head>\\r\\n <meta charset=\\\"utf-8\\\">\\r\\n <title>Telegram Web</title>\\r\\n <meta name=\\\"description\\\" content=\\\"\\\">\\r\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\">\\r\\n\\r\\n <link rel=\\\"apple-touch-icon\\\" sizes=\\\"180x180\\\" href=\\\"assets/img/apple-touch-icon.png\\\">\\r\\n <link rel=\\\"icon\\\" type=\\\"image/png\\\" sizes=\\\"32x32\\\" href=\\\"assets/img/favicon-32x32.png\\\">\\r\\n <link rel=\\\"icon\\\" type=\\\"image/png\\\" sizes=\\\"16x16\\\" href=\\\"assets/img/favicon-16x16.png\\\">\\r\\n <link rel=\\\"manifest\\\" href=\\\"site.webmanifest\\\">\\r\\n <link rel=\\\"mask-icon\\\" href=\\\"assets/img/safari-pinned-tab.svg\\\" color=\\\"#64a3f0\\\">\\r\\n <meta name=\\\"msapplication-TileColor\\\" content=\\\"#da532c\\\">\\r\\n <meta name=\\\"theme-color\\\" content=\\\"#fafafa\\\">\\r\\n\"\n + ((stack1 = lookupProperty(helpers,\"each\").call(alias1,((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"htmlWebpackPlugin\") : depth0)) != null ? lookupProperty(stack1,\"files\") : stack1)) != null ? lookupProperty(stack1,\"css\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":17,\"column\":2},\"end\":{\"line\":19,\"column\":13}}})) != null ? stack1 : \"\")\n + ((stack1 = lookupProperty(helpers,\"each\").call(alias1,((stack1 = ((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"htmlWebpackPlugin\") : depth0)) != null ? lookupProperty(stack1,\"files\") : stack1)) != null ? lookupProperty(stack1,\"extracted\") : stack1)) != null ? lookupProperty(stack1,\"css\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":20,\"column\":2},\"end\":{\"line\":22,\"column\":13}}})) != null ? stack1 : \"\")\n + \"</head>\\r\\n\\r\\n<body>\\r\\n <!--[if IE]>\\r\\n <p class=\\\"browserupgrade\\\">You are using an <strong>outdated</strong> browser. Please <a href=\\\"https://browsehappy.com/\\\">upgrade your browser</a> to improve your experience and security.</p>\\r\\n <![endif]-->\\r\\n \\r\\n <div class=\\\"whole\\\" id=\\\"auth-pages\\\" style=\\\"display: none;\\\">\\r\\n <div class=\\\"tabs-container auth-pages__container\\\">\\r\\n <div class=\\\"page-sign\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image\\\">\\r\\n <svg class=\\\"sign-logo\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"160\\\" height=\\\"160\\\" viewBox=\\\"0 0 160 160\\\">\\r\\n <use href=\\\"#logo\\\" />\\r\\n </svg>\\r\\n </div>\\r\\n <h4>Sign in to Telegram</h4>\\r\\n <p class=\\\"subtitle\\\">Please confirm your country and<br> enter your phone number.</p>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field input-select\\\">\\r\\n <input type=\\\"text\\\" name=\\\"countryCode\\\" id=\\\"countryCode\\\" autocomplete=\\\"rrRandomRR\\\" required />\\r\\n <label for=\\\"countryCode\\\">Country</label>\\r\\n <span class=\\\"arrow arrow-down\\\"></span>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"tel\\\" name=\\\"phone\\\" id=\\\"phone\\\" autocomplete=\\\"rr55RandomRR55\\\" required />\\r\\n <label for=\\\"phone\\\">Phone Number</label>\\r\\n </div>\\r\\n <label class=\\\"checkbox-field\\\">\\r\\n <input type=\\\"checkbox\\\" id=\\\"keepSigned\\\" checked=\\\"checked\\\">\\r\\n <span>Keep me signed in</span>\\r\\n </label>\\r\\n <button class=\\\"btn-primary rp\\\" style=\\\"visibility: hidden;\\\">NEXT</button>\\r\\n <div class=\\\"qr\\\"><a href=\\\"#\\\" class=\\\"a-qr\\\">Quick log in using QR code</a></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"page-signQR\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image\\\">\\r\\n <canvas id=\\\"qr-code\\\"></canvas>\\r\\n </div>\\r\\n <h4>Scan from mobile Telegram</h4>\\r\\n <p class=\\\"qr-description\\\">1. Open Telegram on your phone<br>2. Go to settings > Devices > Scan QR<br>3. Scan this image to Log in</p>\\r\\n <div class=\\\"qr\\\"><a href=\\\"#\\\" class=\\\"a-qr\\\">Or log in using your phone number</a></div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"page-authCode\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image\\\"></div>\\r\\n <div class=\\\"phone-wrapper\\\">\\r\\n <h4 class=\\\"phone\\\"></h4>\\r\\n <span class=\\\"phone-edit tgico-edit\\\"></span>\\r\\n </div>\\r\\n <p class=\\\"subtitle sent-type\\\"></p>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"code\\\" id=\\\"code\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"code\\\">Code</label>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"page-password\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image\\\"></div>\\r\\n <h4 class=\\\"phone\\\">Enter a password</h4>\\r\\n <p class=\\\"subtitle\\\">Your account is protected with<br>an additional password</p>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"password\\\" name=\\\"password\\\" id=\\\"password\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"password\\\">Password</label>\\r\\n <span class=\\\"toggle-visible tgico-eye1\\\"></span>\\r\\n </div>\\r\\n <button class=\\\"btn-primary rp\\\">NEXT</button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"page-signUp\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image avatar-edit\\\">\\r\\n <canvas class=\\\"avatar-edit-canvas\\\" id=\\\"canvas-avatar\\\"></canvas>\\r\\n <span class=\\\"tgico tgico-cameraadd\\\"></span>\\r\\n </div>\\r\\n <h4 class=\\\"fullName\\\">Your Name</h4>\\r\\n <p class=\\\"subtitle\\\">Enter your name and add<br>a profile picture</p>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"name\\\" id=\\\"name\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"name\\\">Name</label>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"lastName\\\" id=\\\"lastName\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"lastName\\\">Last Name (optional)</label>\\r\\n </div>\\r\\n <button class=\\\"btn-primary rp\\\" id=\\\"signUp\\\">START MESSAGING</button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"popup popup-avatar hide\\\" id=\\\"popup-avatar\\\" style=\\\"display: none;\\\">\\r\\n <div class=\\\"popup-container z-depth-1\\\">\\r\\n <div class=\\\"popup-header\\\">\\r\\n <span class=\\\"popup-close tgico-close\\\"></span>\\r\\n <h6>Drag to Reposition</h6>\\r\\n </div>\\r\\n <div class=\\\"crop\\\"></div>\\r\\n <button class=\\\"btn-primary rp btn-circle btn-crop btn-icon tgico-check z-depth-1\\\"></button>\\r\\n <input type=\\\"file\\\" style=\\\"display: none;\\\" />\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"whole page-chats\\\" style=\\\"display: none;\\\" id=\\\"page-chats\\\">\\r\\n <svg style=\\\"position: absolute; top: -10000px; left: -10000px;\\\">\\r\\n <defs id=\\\"svg-defs\\\">\\r\\n <path id=\\\"message-tail\\\" d=\\\"M1.00002881,1.03679295e-14 L7,0 L7,17 C6.8069969,14.1607017 6.12380234,11.2332513 4.95041634,8.21764872 C4.04604748,5.89342034 2.50413132,3.73337411 0.324667862,1.73751004 L0.324652538,1.73752677 C-0.0826597201,1.36452676 -0.110475289,0.731958677 0.262524727,0.324646419 C0.451952959,0.117792698 0.719544377,1.0985861e-14 1.00002881,1.04360964e-14 Z\\\"></path>\\r\\n <path id=\\\"logo\\\" fill=\\\"#50A2E9\\\" fill-rule=\\\"evenodd\\\" d=\\\"M80,0 C124.18278,0 160,35.81722 160,80 C160,124.18278 124.18278,160 80,160 C35.81722,160 0,124.18278 0,80 C0,35.81722 35.81722,0 80,0 Z M114.262551,46.4516129 L114.123923,46.4516129 C111.089589,46.5056249 106.482806,48.0771432 85.1289541,56.93769 L81.4133571,58.4849956 C72.8664779,62.0684477 57.2607933,68.7965125 34.5963033,78.66919 C30.6591745,80.2345564 28.5967328,81.765936 28.4089783,83.2633288 C28.0626453,86.0254269 31.8703852,86.959903 36.7890378,88.5302703 L38.2642674,89.0045258 C42.3926354,90.314406 47.5534685,91.7248852 50.3250916,91.7847532 C52.9151948,91.8407003 55.7944784,90.8162976 58.9629426,88.7115451 L70.5121776,80.9327422 C85.6657026,70.7535853 93.6285785,65.5352892 94.4008055,65.277854 L94.6777873,65.216416 C95.1594319,65.1213105 95.7366278,65.0717596 96.1481181,65.4374337 C96.6344248,65.8695939 96.5866185,66.6880224 96.5351057,66.9075859 C96.127514,68.6448691 75.2839361,87.6143392 73.6629144,89.2417998 L73.312196,89.6016896 C68.7645143,94.2254793 63.9030972,97.1721503 71.5637945,102.355193 L73.3593638,103.544598 C79.0660342,107.334968 82.9483395,110.083813 88.8107882,113.958377 L90.3875424,114.996094 C95.0654739,118.061953 98.7330313,121.697601 103.562866,121.253237 C105.740839,121.052855 107.989107,119.042224 109.175465,113.09692 L109.246762,112.727987 C112.002037,98.0012935 117.417883,66.09303 118.669527,52.9443975 C118.779187,51.7924073 118.641237,50.318088 118.530455,49.6708963 L118.474159,49.3781963 C118.341081,48.7651315 118.067967,48.0040758 117.346762,47.4189793 C116.412565,46.6610871 115.002114,46.4638844 114.262551,46.4516129 Z\\\"/>\\r\\n <path id=\\\"poll-line\\\" d=\\\"M4.47,5.33v13.6c0,4.97,4.03,9,9,9h458.16\\\"/>\\r\\n </defs>\\r\\n </svg>\\r\\n <div class=\\\"media-viewer-whole\\\">\\r\\n <div class=\\\"overlays\\\">\\r\\n <div class=\\\"media-viewer\\\">\\r\\n <div class=\\\"media-viewer-author\\\">\\r\\n <avatar-element class=\\\"media-viewer-userpic\\\"></avatar-element>\\r\\n <div class=\\\"media-viewer-name\\\"></div>\\r\\n <div class=\\\"media-viewer-date\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"media-viewer-buttons\\\">\\r\\n <div class=\\\"btn-icon tgico-delete menu-delete rp\\\"></div>\\r\\n <div class=\\\"btn-icon tgico-forward menu-forward rp\\\"></div>\\r\\n <div class=\\\"btn-icon tgico-download menu-download rp\\\"></div>\\r\\n <div class=\\\"btn-icon tgico-close menu-close rp\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"media-viewer-content\\\">\\r\\n <div class=\\\"media-viewer-stub\\\"></div>\\r\\n <div class=\\\"media-viewer-container\\\">\\r\\n <div class=\\\"media-viewer-media\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"media-viewer-caption\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"media-viewer-switchers\\\">\\r\\n <div class=\\\"media-viewer-switcher-left menu-prev\\\"><span class=\\\"tgico-down media-viewer-prev-button\\\"></span></div>\\r\\n <div class=\\\"media-viewer-switcher-right menu-next\\\"><span class=\\\"tgico-down media-viewer-next-button\\\"></span></div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"popup popup-send-photo\\\">\\r\\n <div class=\\\"popup-container z-depth-1\\\">\\r\\n <div class=\\\"popup-header\\\">\\r\\n <span class=\\\"btn-icon popup-close tgico-close\\\"></span>\\r\\n <div class=\\\"popup-title\\\">Send Photo</div>\\r\\n <button class=\\\"btn-primary rp\\\">SEND</button>\\r\\n </div>\\r\\n <div class=\\\"popup-photo\\\"></div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"photo-caption\\\" id=\\\"photo-caption\\\" placeholder=\\\"Add a caption...\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"photo-caption\\\">Caption</label>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div id=\\\"main-columns\\\" class=\\\"tabs-container\\\">\\r\\n <div class=\\\"chats-container sidebar sidebar-left main-column\\\" id=\\\"column-left\\\">\\r\\n <div class=\\\"sidebar-slider tabs-container\\\">\\r\\n <div class=\\\"sidebar-slider-item item-main\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <div class=\\\"sidebar-header__btn-container\\\">\\r\\n <div class=\\\"btn-icon tgico-menu btn-menu-toggle rp sidebar-tools-button active\\\">\\r\\n <div class=\\\"btn-menu bottom-right\\\">\\r\\n <div class=\\\"btn-menu-item menu-newGroup tgico-newgroup rp\\\">New Group</div>\\r\\n <div class=\\\"btn-menu-item menu-contacts tgico-user rp\\\">Contacts</div>\\r\\n <div class=\\\"btn-menu-item menu-archived tgico-archive rp\\\">Archived <span class=\\\"archived-count\\\"></span></div>\\r\\n <div class=\\\"btn-menu-item menu-saved tgico-savedmessages rp\\\">Saved</div>\\r\\n <div class=\\\"btn-menu-item menu-settings tgico-settings rp\\\">Settings</div>\\r\\n <div class=\\\"btn-menu-item menu-help tgico-help rp\\\">Help</div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"btn-icon tgico-back rp sidebar-back-button\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"input-search\\\">\\r\\n <input type=\\\"text\\\" placeholder=\\\"Telegram Search\\\" id=\\\"global-search\\\" />\\r\\n <span class=\\\"tgico tgico-search\\\"></span>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div id=\\\"chats-container\\\">\\r\\n <ul id=\\\"dialogs\\\"></ul>\\r\\n </div>\\r\\n <div class=\\\"sidebar-search hide\\\" id=\\\"search-container\\\"></div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-newchat_filled btn-menu-toggle\\\" id=\\\"new-menu\\\">\\r\\n <div class=\\\"btn-menu top-left\\\">\\r\\n <div class=\\\"btn-menu-item menu-channel tgico-newchannel rp\\\">New Channel</div>\\r\\n <div class=\\\"btn-menu-item menu-group tgico-newgroup rp\\\">New Group</div>\\r\\n <div class=\\\"btn-menu-item menu-privateChat tgico-newprivate rp\\\">New Private Chat</div>\\r\\n </div>\\r\\n </button>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Archived Chats</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div id=\\\"chats-archived-container\\\">\\r\\n <ul id=\\\"dialogs-archived\\\"></ul>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item\\\" id=\\\"contacts-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"input-search\\\">\\r\\n <input type=\\\"text\\\" placeholder=\\\"Search\\\" id=\\\"contacts-search\\\" autocomplete=\\\"ASKLXmQQr52\\\" />\\r\\n <span class=\\\"tgico tgico-search\\\"></span>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div>\\r\\n <ul id=\\\"contacts\\\" class=\\\"contacts-container\\\"></ul>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item new-channel-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">New Channel</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"avatar-edit\\\">\\r\\n <canvas class=\\\"avatar-edit-canvas\\\"></canvas>\\r\\n <span class=\\\"tgico tgico-cameraadd\\\"></span>\\r\\n </div>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"name\\\" class=\\\"new-channel-name\\\" autocomplete=\\\"xxDDqqOX\\\" required=\\\"\\\">\\r\\n <label for=\\\"name\\\">Channel Name</label>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"description\\\" class=\\\"new-channel-description\\\" autocomplete=\\\"aintsofunnow\\\" required=\\\"\\\">\\r\\n <label for=\\\"lastName\\\">Description (optional)</label>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"caption\\\">You can provide an optional description for your channel.</div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-next\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item addmembers-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Add Members</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-next\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item new-group-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">New Group</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"avatar-edit\\\">\\r\\n <canvas class=\\\"avatar-edit-canvas\\\"></canvas>\\r\\n <span class=\\\"tgico tgico-cameraadd\\\"></span>\\r\\n </div>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"name\\\" class=\\\"new-group-name\\\" autocomplete=\\\"feellikeamonster2112\\\" required=\\\"\\\">\\r\\n <label for=\\\"name\\\">Group Name</label>\\r\\n </div>\\r\\n </div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-next\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item settings-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Settings</div>\\r\\n <div class=\\\"btn-icon tgico-more rp btn-menu-toggle\\\">\\r\\n <div class=\\\"btn-menu bottom-left\\\">\\r\\n <div class=\\\"btn-menu-item menu-logout tgico-logout rp\\\">Log Out</div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"profile-content-wrapper scrollable scrollable-y\\\">\\r\\n <avatar-element class=\\\"profile-avatar\\\"></avatar-element>\\r\\n <div class=\\\"profile-name\\\"></div>\\r\\n <div class=\\\"profile-subtitle\\\"></div>\\r\\n <div class=\\\"profile-buttons\\\">\\r\\n <div class=\\\"profile-button menu-edit tgico-edit rp\\\"><p>Edit Profile</p></div>\\r\\n <div class=\\\"profile-button menu-general tgico-settings rp\\\"><p>General Settings</p></div>\\r\\n <div class=\\\"profile-button menu-notifications tgico-unmute rp\\\"><p>Notifications</p></div>\\r\\n <div class=\\\"profile-button menu-privacy tgico-lock rp\\\"><p>Privacy and Security</p></div>\\r\\n <div class=\\\"profile-button menu-language tgico-language rp\\\"><p>Language</p></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item edit-profile-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Edit Profile</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"scroll-wrapper\\\">\\r\\n <div class=\\\"avatar-edit\\\">\\r\\n <canvas class=\\\"avatar-edit-canvas\\\"></canvas>\\r\\n <span class=\\\"tgico tgico-cameraadd\\\"></span>\\r\\n </div>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"name\\\" class=\\\"firstname\\\" autocomplete=\\\"xxDDqqOXJXC\\\" required=\\\"\\\">\\r\\n <label for=\\\"name\\\">Name</label>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"lastname\\\" class=\\\"lastname\\\" autocomplete=\\\"aintsofunnowzXCFF\\\" required=\\\"\\\">\\r\\n <label for=\\\"lastname\\\">Last Name</label>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"bio\\\" class=\\\"bio\\\" autocomplete=\\\"aintsofunnowhHQ\\\" required=\\\"\\\">\\r\\n <label for=\\\"bio\\\">Bio (optional)</label>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"caption\\\">Any details such as age, occupation or city. Example:<br>23 y.o. designer from San Francisco.</div>\\r\\n <hr/>\\r\\n <div class=\\\"sidebar-left-h2\\\">Username</div>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"username\\\" class=\\\"username\\\" autocomplete=\\\"xxDDqqOXffEER\\\" required=\\\"\\\">\\r\\n <label for=\\\"username\\\">Username (optional)</label>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"caption\\\">You can choose a username on Telegram. If you do, other people will be able to find you by this username and contact you without knowing your phone number.<br><br>You can use a-z, 0-9 and underscores. Minimum length is 5 characters.<br><br><div class=\\\"profile-url-container\\\">This link opens a chat with you:\\r\\n <br><a class=\\\"profile-url\\\" href=\\\"#\\\" target=\\\"_blank\\\"></a></div>\\r\\n </div>\\r\\n </div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-check\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"btn-menu\\\" id=\\\"dialogs-contextmenu\\\">\\r\\n <div class=\\\"btn-menu-item menu-unread tgico rp\\\"></div>\\r\\n <div class=\\\"btn-menu-item menu-pin tgico rp\\\"></div>\\r\\n <div class=\\\"btn-menu-item menu-mute tgico rp\\\"></div>\\r\\n <div class=\\\"btn-menu-item menu-archive tgico rp\\\"></div>\\r\\n <div class=\\\"btn-menu-item menu-delete tgico-delete danger rp\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"chat-container main-column\\\" id=\\\"column-center\\\">\\r\\n <canvas id=\\\"chat-background-canvas\\\"></canvas>\\r\\n <div id=\\\"topbar\\\" style=\\\"display: none;\\\" class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"chat-info\\\">\\r\\n <div class=\\\"person\\\">\\r\\n <avatar-element id=\\\"im-avatar\\\" dialog=\\\"1\\\"></avatar-element>\\r\\n <div class=\\\"content\\\">\\r\\n <div class=\\\"top\\\">\\r\\n <div class=\\\"user-title\\\" id=\\\"im-title\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"bottom\\\">\\r\\n <div class=\\\"info\\\" id=\\\"im-subtitle\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"pinned-message\\\">\\r\\n <div class=\\\"pinned-message-border\\\"></div>\\r\\n <div class=\\\"pinned-message-content\\\">\\r\\n <div class=\\\"pinned-message-title\\\">Pinned Message</div>\\r\\n <div class=\\\"pinned-message-subtitle\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"btn-icon rp chat-mute-button\\\" style=\\\"display: none;\\\"></div>\\r\\n <div class=\\\"btn-icon rp tgico-search chat-search-button\\\"></div>\\r\\n <div class=\\\"btn-icon btn-menu-toggle rp tgico-more chat-more-button\\\">\\r\\n <div class=\\\"btn-menu bottom-left\\\">\\r\\n <div class=\\\"btn-menu-item menu-mute rp\\\">Mute</div>\\r\\n <div class=\\\"btn-menu-item menu-delete tgico-delete danger rp\\\">Delete and Leave</div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div id=\\\"bubbles\\\" class=\\\"scrolled-down\\\">\\r\\n <div id=\\\"bubbles-inner\\\"></div>\\r\\n <div id=\\\"bubbles-go-down\\\" class=\\\"tgico-down z-depth-1 rp\\\" style=\\\"display: none;\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"btn-menu\\\" id=\\\"bubble-contextmenu\\\">\\r\\n <div class=\\\"btn-menu-item menu-reply tgico-reply rp\\\">Reply</div>\\r\\n <div class=\\\"btn-menu-item menu-edit tgico-edit rp\\\">Edit</div>\\r\\n <div class=\\\"btn-menu-item menu-copy tgico-copy rp\\\">Copy</div>\\r\\n <div class=\\\"btn-menu-item menu-pin tgico-pin rp\\\">Pin</div>\\r\\n <div class=\\\"btn-menu-item menu-forward tgico-forward rp\\\">Forward</div>\\r\\n <div class=\\\"btn-menu-item menu-delete tgico-delete danger rp\\\">Delete</div>\\r\\n </div>\\r\\n <div id=\\\"chat-input\\\" style=\\\"display: none;\\\">\\r\\n <!-- <div id=\\\"chat-input\\\"> -->\\r\\n <div class=\\\"emoji-dropdown\\\">\\r\\n <nav class=\\\"emoji-tabs menu-horizontal\\\">\\r\\n <ul>\\r\\n <li class=\\\"emoji-tabs-emoji rp\\\"><span>Emoji</span></li>\\r\\n <li class=\\\"emoji-tabs-stickers rp\\\"><span>Stickers</span></li>\\r\\n <li class=\\\"emoji-tabs-gifs rp\\\"><span>GIFs</span></li>\\r\\n </ul>\\r\\n </nav>\\r\\n <div class=\\\"emoji-container\\\">\\r\\n <div class=\\\"tabs-container\\\">\\r\\n <div class=\\\"emoji-padding\\\">\\r\\n <div id=\\\"content-emoji\\\"></div>\\r\\n <nav class=\\\"menu-horizontal\\\">\\r\\n <ul class=\\\"justify-start\\\">\\r\\n <li class=\\\"btn-icon tgico-recent rp\\\"></li>\\r\\n <li class=\\\"active btn-icon tgico-smile rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-animals rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-eats rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-car rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-sport rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-lamp rp\\\"></li>\\r\\n <!-- <li class=\\\"btn-icon tgico-info rp\\\"></li> -->\\r\\n <li class=\\\"btn-icon tgico-flag rp\\\"></li>\\r\\n </ul>\\r\\n </nav>\\r\\n </div>\\r\\n <div class=\\\"stickers-padding\\\">\\r\\n <div id=\\\"content-stickers\\\"></div>\\r\\n <div class=\\\"menu-wrapper\\\">\\r\\n <nav class=\\\"menu-horizontal\\\">\\r\\n <ul class=\\\"justify-start\\\">\\r\\n <li class=\\\"btn-icon tgico-recent active\\\"></li>\\r\\n </ul>\\r\\n </nav>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"gifs-padding\\\">\\r\\n <div id=\\\"content-gifs\\\">\\r\\n <div class=\\\"gifs-masonry\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"input-message\\\">\\r\\n <div class=\\\"reply-wrapper\\\">\\r\\n <button class=\\\"btn-icon rp tgico-close reply-cancel\\\"></button>\\r\\n <div class=\\\"reply\\\">\\r\\n <div class=\\\"reply-border\\\"></div>\\r\\n <div class=\\\"reply-content\\\">\\r\\n <div class=\\\"reply-title\\\"></div>\\r\\n <div class=\\\"reply-subtitle\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"new-message-wrapper\\\">\\r\\n <button class=\\\"btn-icon rp tgico-smile toggle-emoticons\\\"></button>\\r\\n <!-- <textarea type=\\\"text\\\" id=\\\"input-message\\\" placeholder=\\\"Message\\\" contenteditable=\\\"true\\\"></textarea> -->\\r\\n <div class=\\\"input-message-container\\\">\\r\\n <div id=\\\"input-message\\\" contenteditable=\\\"true\\\" data-placeholder=\\\"Message\\\"></div>\\r\\n </div>\\r\\n <button class=\\\"btn-icon rp tgico-attach btn-menu-toggle\\\" id=\\\"attach-file\\\">\\r\\n <div class=\\\"btn-menu top-left\\\">\\r\\n <div class=\\\"btn-menu-item menu-media tgico-photo rp\\\">Photo or Video</div>\\r\\n <div class=\\\"btn-menu-item menu-document tgico-document rp\\\">Document</div>\\r\\n <div class=\\\"btn-menu-item menu-poll tgico-poll rp\\\">Poll</div>\\r\\n </div>\\r\\n </button>\\r\\n <div class=\\\"record-time\\\"></div>\\r\\n <input type=\\\"file\\\" id=\\\"input-file\\\" style=\\\"display: none;\\\" multiple />\\r\\n </div>\\r\\n </div>\\r\\n <button class=\\\"btn-circle z-depth-1 btn-icon tgico-delete danger\\\" id=\\\"btn-record-cancel\\\"></button>\\r\\n <div class=\\\"btn-send-container\\\">\\r\\n <div class=\\\"record-ripple\\\"></div>\\r\\n <button class=\\\"btn-circle z-depth-1 btn-icon tgico-microphone2\\\" id=\\\"btn-send\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar sidebar-right main-column\\\" id=\\\"column-right\\\">\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"profile-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-close sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Info</div>\\r\\n \\r\\n <!-- <button class=\\\"btn-icon rp tgico-edit sidebar-edit-button\\\"></button> -->\\r\\n \\r\\n <div class=\\\"btn-icon tgico-more rp\\\"></div>\\r\\n <!-- <div class=\\\"btn-icon tgico-more rp btn-menu-toggle\\\">\\r\\n <div class=\\\"btn-menu bottom-left\\\"> -->\\r\\n <!-- <div class=\\\"btn-menu-item menu-mute rp\\\">Mute</div>\\r\\n <div class=\\\"btn-menu-item menu-delete tgico-delete danger rp\\\">Delete and Leave</div> -->\\r\\n <!-- </div>\\r\\n </div> -->\\r\\n </div>\\r\\n <div class=\\\"profile-content\\\">\\r\\n <div class=\\\"profile-content-wrapper\\\">\\r\\n <avatar-element class=\\\"profile-avatar\\\" dialog=\\\"1\\\"></avatar-element>\\r\\n <div class=\\\"profile-name\\\"></div>\\r\\n <div class=\\\"profile-subtitle\\\"></div>\\r\\n \\r\\n <div class=\\\"profile-row profile-row-bio tgico-info\\\">\\r\\n <p></p>\\r\\n <p class=\\\"profile-row-label\\\">Bio</p>\\r\\n </div>\\r\\n <div class=\\\"profile-row profile-row-username tgico-username\\\">\\r\\n <p></p>\\r\\n <p class=\\\"profile-row-label\\\">Username</p>\\r\\n </div>\\r\\n <div class=\\\"profile-row profile-row-phone tgico-phone\\\">\\r\\n <p></p>\\r\\n <p class=\\\"profile-row-label\\\">Phone</p>\\r\\n </div>\\r\\n <div class=\\\"profile-row profile-row-notifications\\\">\\r\\n <label>\\r\\n <input type=\\\"checkbox\\\" id=\\\"profile-notifications\\\" checked=\\\"checked\\\">\\r\\n <span>Notifications</span>\\r\\n </label>\\r\\n <p class=\\\"profile-row-label\\\">Enabled</p>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"content-container\\\">\\r\\n <nav class=\\\"profile-tabs menu-horizontal\\\">\\r\\n <ul>\\r\\n <li class=\\\"profile-tabs-members rp\\\" style=\\\"display: none;\\\"><span>Members</span></li>\\r\\n <li class=\\\"profile-tabs-media rp\\\"><span>Media</span></li>\\r\\n <li class=\\\"profile-tabs-docs rp\\\"><span>Docs</span></li>\\r\\n <li class=\\\"profile-tabs-links rp\\\"><span>Links</span></li>\\r\\n <li class=\\\"profile-tabs-audio rp\\\"><span>Audio</span></li>\\r\\n </ul>\\r\\n </nav>\\r\\n <div class=\\\"profile-tabs-content tabs-container\\\">\\r\\n <div class=\\\"content-members-container\\\"><div id=\\\"content-members\\\"></div></div>\\r\\n <div class=\\\"content-media-container\\\"><div id=\\\"content-media\\\"></div></div>\\r\\n <div class=\\\"content-docs-container\\\"><div id=\\\"content-docs\\\"></div></div>\\r\\n <div class=\\\"content-links-container\\\"><div id=\\\"content-links\\\"></div></div>\\r\\n <div class=\\\"content-audio-container\\\"><div id=\\\"content-audio\\\"></div></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-search chats-container\\\" id=\\\"search-private-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-close sidebar-close-button\\\"></button>\\r\\n <div class=\\\"input-search\\\">\\r\\n <input type=\\\"text\\\" placeholder=\\\"Search\\\" id=\\\"private-search\\\" />\\r\\n <span class=\\\"tgico tgico-search\\\"></span>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"chats-container\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-search\\\" id=\\\"forward-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-close sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Forward</div>\\r\\n </div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-send\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n\"\n + ((stack1 = lookupProperty(helpers,\"each\").call(alias1,((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"htmlWebpackPlugin\") : depth0)) != null ? lookupProperty(stack1,\"files\") : stack1)) != null ? lookupProperty(stack1,\"js\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":584,\"column\":2},\"end\":{\"line\":586,\"column\":12}}})) != null ? stack1 : \"\")\n + ((stack1 = lookupProperty(helpers,\"each\").call(alias1,((stack1 = ((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"htmlWebpackPlugin\") : depth0)) != null ? lookupProperty(stack1,\"files\") : stack1)) != null ? lookupProperty(stack1,\"extracted\") : stack1)) != null ? lookupProperty(stack1,\"js\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":587,\"column\":2},\"end\":{\"line\":589,\"column\":12}}})) != null ? stack1 : \"\")\n + \"</html>\\r\\n\";\n},\"useData\":true});"
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"index": 1,
"index2": 22,
"size": 167,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"issuerId": 7,
"issuerName": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
}
],
"profile": {
"factory": 1473,
"building": 12
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"module": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"moduleName": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"type": "cjs require",
"userRequest": "../node_modules/handlebars/runtime.js",
"loc": "1:17-65"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "// Create a simple path alias to allow browserify to resolve\n// the runtime on a supported path.\nmodule.exports = require('./dist/cjs/handlebars.runtime')['default'];\n"
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"index": 2,
"index2": 21,
"size": 4606,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"issuerId": 8,
"issuerName": "./node_modules/handlebars/runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
}
],
"profile": {
"factory": 1891,
"building": 413
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./dist/cjs/handlebars.runtime",
"loc": "3:17-57"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n// istanbul ignore next\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\nvar _handlebarsBase = require('./handlebars/base');\n\nvar base = _interopRequireWildcard(_handlebarsBase);\n\n// Each of these augment the Handlebars object. No need to setup here.\n// (This is done to easily share code between commonjs and browse envs)\n\nvar _handlebarsSafeString = require('./handlebars/safe-string');\n\nvar _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);\n\nvar _handlebarsException = require('./handlebars/exception');\n\nvar _handlebarsException2 = _interopRequireDefault(_handlebarsException);\n\nvar _handlebarsUtils = require('./handlebars/utils');\n\nvar Utils = _interopRequireWildcard(_handlebarsUtils);\n\nvar _handlebarsRuntime = require('./handlebars/runtime');\n\nvar runtime = _interopRequireWildcard(_handlebarsRuntime);\n\nvar _handlebarsNoConflict = require('./handlebars/no-conflict');\n\nvar _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);\n\n// For compatibility and usage outside of module systems, make the Handlebars object a namespace\nfunction create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}\n\nvar inst = create();\ninst.create = create;\n\n_handlebarsNoConflict2['default'](inst);\n\ninst['default'] = inst;\n\nexports['default'] = inst;\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OEJBQXNCLG1CQUFtQjs7SUFBN0IsSUFBSTs7Ozs7b0NBSU8sMEJBQTBCOzs7O21DQUMzQix3QkFBd0I7Ozs7K0JBQ3ZCLG9CQUFvQjs7SUFBL0IsS0FBSzs7aUNBQ1Esc0JBQXNCOztJQUFuQyxPQUFPOztvQ0FFSSwwQkFBMEI7Ozs7O0FBR2pELFNBQVMsTUFBTSxHQUFHO0FBQ2hCLE1BQUksRUFBRSxHQUFHLElBQUksSUFBSSxDQUFDLHFCQUFxQixFQUFFLENBQUM7O0FBRTFDLE9BQUssQ0FBQyxNQUFNLENBQUMsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQ3ZCLElBQUUsQ0FBQyxVQUFVLG9DQUFhLENBQUM7QUFDM0IsSUFBRSxDQUFDLFNBQVMsbUNBQVksQ0FBQztBQUN6QixJQUFFLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQztBQUNqQixJQUFFLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDLGdCQUFnQixDQUFDOztBQUU3QyxJQUFFLENBQUMsRUFBRSxHQUFHLE9BQU8sQ0FBQztBQUNoQixJQUFFLENBQUMsUUFBUSxHQUFHLFVBQVMsSUFBSSxFQUFFO0FBQzNCLFdBQU8sT0FBTyxDQUFDLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLENBQUM7R0FDbkMsQ0FBQzs7QUFFRixTQUFPLEVBQUUsQ0FBQztDQUNYOztBQUVELElBQUksSUFBSSxHQUFHLE1BQU0sRUFBRSxDQUFDO0FBQ3BCLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDOztBQUVyQixrQ0FBVyxJQUFJLENBQUMsQ0FBQzs7QUFFakIsSUFBSSxDQUFDLFNBQVMsQ0FBQyxHQUFHLElBQUksQ0FBQzs7cUJBRVIsSUFBSSIsImZpbGUiOiJoYW5kbGViYXJzLnJ1bnRpbWUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBiYXNlIGZyb20gJy4vaGFuZGxlYmFycy9iYXNlJztcblxuLy8gRWFjaCBvZiB0aGVzZSBhdWdtZW50IHRoZSBIYW5kbGViYXJzIG9iamVjdC4gTm8gbmVlZCB0byBzZXR1cCBoZXJlLlxuLy8gKFRoaXMgaXMgZG9uZSB0byBlYXNpbHkgc2hhcmUgY29kZSBiZXR3ZWVuIGNvbW1vbmpzIGFuZCBicm93c2UgZW52cylcbmltcG9ydCBTYWZlU3RyaW5nIGZyb20gJy4vaGFuZGxlYmFycy9zYWZlLXN0cmluZyc7XG5pbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4vaGFuZGxlYmFycy9leGNlcHRpb24nO1xuaW1wb3J0ICogYXMgVXRpbHMgZnJvbSAnLi9oYW5kbGViYXJzL3V0aWxzJztcbmltcG9ydCAqIGFzIHJ1bnRpbWUgZnJvbSAnLi9oYW5kbGViYXJzL3J1bnRpbWUnO1xuXG5pbXBvcnQgbm9Db25mbGljdCBmcm9tICcuL2hhbmRsZWJhcnMvbm8tY29uZmxpY3QnO1xuXG4vLyBGb3IgY29tcGF0aWJpbGl0eSBhbmQgdXNhZ2Ugb3V0c2lkZSBvZiBtb2R1bGUgc3lzdGVtcywgbWFrZSB0aGUgSGFuZGxlYmFycyBvYmplY3QgYSBuYW1lc3BhY2VcbmZ1bmN0aW9uIGNyZWF0ZSgpIHtcbiAgbGV0IGhiID0gbmV3IGJhc2UuSGFuZGxlYmFyc0Vudmlyb25tZW50KCk7XG5cbiAgVXRpbHMuZXh0ZW5kKGhiLCBiYXNlKTtcbiAgaGIuU2FmZVN0cmluZyA9IFNhZmVTdHJpbmc7XG4gIGhiLkV4Y2VwdGlvbiA9IEV4Y2VwdGlvbjtcbiAgaGIuVXRpbHMgPSBVdGlscztcbiAgaGIuZXNjYXBlRXhwcmVzc2lvbiA9IFV0aWxzLmVzY2FwZUV4cHJlc3Npb247XG5cbiAgaGIuVk0gPSBydW50aW1lO1xuICBoYi50ZW1wbGF0ZSA9IGZ1bmN0aW9uKHNwZWMpIHtcbiAgICByZXR1cm4gcnVudGltZS50ZW1wbGF0ZShzcGVjLCBoYik7XG4gIH07XG5cbiAgcmV0dXJuIGhiO1xufVxuXG5sZXQgaW5zdCA9IGNyZWF0ZSgpO1xuaW5zdC5jcmVhdGUgPSBjcmVhdGU7XG5cbm5vQ29uZmxpY3QoaW5zdCk7XG5cbmluc3RbJ2RlZmF1bHQnXSA9IGluc3Q7XG5cbmV4cG9ydCBkZWZhdWx0IGluc3Q7XG4iXX0=\n"
},
{
"id": 10,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\block-helper-missing.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js",
"index": 7,
"index2": 2,
"size": 3831,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/block-helper-missing",
"loc": "10:33-74"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n\nvar _utils = require('../utils');\n\nexports['default'] = function (instance) {\n instance.registerHelper('blockHelperMissing', function (context, options) {\n var inverse = options.inverse,\n fn = options.fn;\n\n if (context === true) {\n return fn(this);\n } else if (context === false || context == null) {\n return inverse(this);\n } else if (_utils.isArray(context)) {\n if (context.length > 0) {\n if (options.ids) {\n options.ids = [options.name];\n }\n\n return instance.helpers.each(context, options);\n } else {\n return inverse(this);\n }\n } else {\n if (options.data && options.ids) {\n var data = _utils.createFrame(options.data);\n data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);\n options = { data: data };\n }\n\n return fn(context, options);\n }\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztxQkFBd0QsVUFBVTs7cUJBRW5ELFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFFBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1FBQzNCLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVsQixRQUFJLE9BQU8sS0FBSyxJQUFJLEVBQUU7QUFDcEIsYUFBTyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDakIsTUFBTSxJQUFJLE9BQU8sS0FBSyxLQUFLLElBQUksT0FBTyxJQUFJLElBQUksRUFBRTtBQUMvQyxhQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN0QixNQUFNLElBQUksZUFBUSxPQUFPLENBQUMsRUFBRTtBQUMzQixVQUFJLE9BQU8sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFO0FBQ3RCLFlBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUNmLGlCQUFPLENBQUMsR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO1NBQzlCOztBQUVELGVBQU8sUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO09BQ2hELE1BQU07QUFDTCxlQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztPQUN0QjtLQUNGLE1BQU07QUFDTCxVQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixZQUFJLElBQUksR0FBRyxtQkFBWSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDckMsWUFBSSxDQUFDLFdBQVcsR0FBRyx5QkFDakIsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQ3hCLE9BQU8sQ0FBQyxJQUFJLENBQ2IsQ0FBQztBQUNGLGVBQU8sR0FBRyxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsQ0FBQztPQUMxQjs7QUFFRCxhQUFPLEVBQUUsQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7S0FDN0I7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJibG9jay1oZWxwZXItbWlzc2luZy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGFwcGVuZENvbnRleHRQYXRoLCBjcmVhdGVGcmFtZSwgaXNBcnJheSB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2Jsb2NrSGVscGVyTWlzc2luZycsIGZ1bmN0aW9uKGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgICBsZXQgaW52ZXJzZSA9IG9wdGlvbnMuaW52ZXJzZSxcbiAgICAgIGZuID0gb3B0aW9ucy5mbjtcblxuICAgIGlmIChjb250ZXh0ID09PSB0cnVlKSB7XG4gICAgICByZXR1cm4gZm4odGhpcyk7XG4gICAgfSBlbHNlIGlmIChjb250ZXh0ID09PSBmYWxzZSB8fCBjb250ZXh0ID09IG51bGwpIHtcbiAgICAgIHJldHVybiBpbnZlcnNlKHRoaXMpO1xuICAgIH0gZWxzZSBpZiAoaXNBcnJheShjb250ZXh0KSkge1xuICAgICAgaWYgKGNvbnRleHQubGVuZ3RoID4gMCkge1xuICAgICAgICBpZiAob3B0aW9ucy5pZHMpIHtcbiAgICAgICAgICBvcHRpb25zLmlkcyA9IFtvcHRpb25zLm5hbWVdO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGluc3RhbmNlLmhlbHBlcnMuZWFjaChjb250ZXh0LCBvcHRpb25zKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBpbnZlcnNlKHRoaXMpO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuaWRzKSB7XG4gICAgICAgIGxldCBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGFwcGVuZENvbnRleHRQYXRoKFxuICAgICAgICAgIG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCxcbiAgICAgICAgICBvcHRpb25zLm5hbWVcbiAgICAgICAgKTtcbiAgICAgICAgb3B0aW9ucyA9IHsgZGF0YTogZGF0YSB9O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwgb3B0aW9ucyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 11,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\each.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"index": 8,
"index2": 4,
"size": 9894,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/each",
"loc": "14:19-44"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utils = require('../utils');\n\nvar _exception = require('../exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nexports['default'] = function (instance) {\n instance.registerHelper('each', function (context, options) {\n if (!options) {\n throw new _exception2['default']('Must pass iterator to #each');\n }\n\n var fn = options.fn,\n inverse = options.inverse,\n i = 0,\n ret = '',\n data = undefined,\n contextPath = undefined;\n\n if (options.data && options.ids) {\n contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';\n }\n\n if (_utils.isFunction(context)) {\n context = context.call(this);\n }\n\n if (options.data) {\n data = _utils.createFrame(options.data);\n }\n\n function execIteration(field, index, last) {\n if (data) {\n data.key = field;\n data.index = index;\n data.first = index === 0;\n data.last = !!last;\n\n if (contextPath) {\n data.contextPath = contextPath + field;\n }\n }\n\n ret = ret + fn(context[field], {\n data: data,\n blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])\n });\n }\n\n if (context && typeof context === 'object') {\n if (_utils.isArray(context)) {\n for (var j = context.length; i < j; i++) {\n if (i in context) {\n execIteration(i, i, i === context.length - 1);\n }\n }\n } else if (global.Symbol && context[global.Symbol.iterator]) {\n var newContext = [];\n var iterator = context[global.Symbol.iterator]();\n for (var it = iterator.next(); !it.done; it = iterator.next()) {\n newContext.push(it.value);\n }\n context = newContext;\n for (var j = context.length; i < j; i++) {\n execIteration(i, i, i === context.length - 1);\n }\n } else {\n (function () {\n var priorKey = undefined;\n\n Object.keys(context).forEach(function (key) {\n // We're running the iterations one step out of sync so we can detect\n // the last iteration without have to scan the object twice and create\n // an itermediate keys array.\n if (priorKey !== undefined) {\n execIteration(priorKey, i - 1);\n }\n priorKey = key;\n i++;\n });\n if (priorKey !== undefined) {\n execIteration(priorKey, i - 1, true);\n }\n })();\n }\n }\n\n if (i === 0) {\n ret = inverse(this);\n }\n\n return ret;\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvZWFjaC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3FCQU1PLFVBQVU7O3lCQUNLLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsTUFBTSxFQUFFLFVBQVMsT0FBTyxFQUFFLE9BQU8sRUFBRTtBQUN6RCxRQUFJLENBQUMsT0FBTyxFQUFFO0FBQ1osWUFBTSwyQkFBYyw2QkFBNkIsQ0FBQyxDQUFDO0tBQ3BEOztBQUVELFFBQUksRUFBRSxHQUFHLE9BQU8sQ0FBQyxFQUFFO1FBQ2pCLE9BQU8sR0FBRyxPQUFPLENBQUMsT0FBTztRQUN6QixDQUFDLEdBQUcsQ0FBQztRQUNMLEdBQUcsR0FBRyxFQUFFO1FBQ1IsSUFBSSxZQUFBO1FBQ0osV0FBVyxZQUFBLENBQUM7O0FBRWQsUUFBSSxPQUFPLENBQUMsSUFBSSxJQUFJLE9BQU8sQ0FBQyxHQUFHLEVBQUU7QUFDL0IsaUJBQVcsR0FDVCx5QkFBa0IsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLEdBQUcsQ0FBQztLQUNyRTs7QUFFRCxRQUFJLGtCQUFXLE9BQU8sQ0FBQyxFQUFFO0FBQ3ZCLGFBQU8sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQzlCOztBQUVELFFBQUksT0FBTyxDQUFDLElBQUksRUFBRTtBQUNoQixVQUFJLEdBQUcsbUJBQVksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQ2xDOztBQUVELGFBQVMsYUFBYSxDQUFDLEtBQUssRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFO0FBQ3pDLFVBQUksSUFBSSxFQUFFO0FBQ1IsWUFBSSxDQUFDLEdBQUcsR0FBRyxLQUFLLENBQUM7QUFDakIsWUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7QUFDbkIsWUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLEtBQUssQ0FBQyxDQUFDO0FBQ3pCLFlBQUksQ0FBQyxJQUFJLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQzs7QUFFbkIsWUFBSSxXQUFXLEVBQUU7QUFDZixjQUFJLENBQUMsV0FBVyxHQUFHLFdBQVcsR0FBRyxLQUFLLENBQUM7U0FDeEM7T0FDRjs7QUFFRCxTQUFHLEdBQ0QsR0FBRyxHQUNILEVBQUUsQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUU7QUFDakIsWUFBSSxFQUFFLElBQUk7QUFDVixtQkFBVyxFQUFFLG1CQUNYLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxFQUFFLEtBQUssQ0FBQyxFQUN2QixDQUFDLFdBQVcsR0FBRyxLQUFLLEVBQUUsSUFBSSxDQUFDLENBQzVCO09BQ0YsQ0FBQyxDQUFDO0tBQ047O0FBRUQsUUFBSSxPQUFPLElBQUksT0FBTyxPQUFPLEtBQUssUUFBUSxFQUFFO0FBQzFDLFVBQUksZUFBUSxPQUFPLENBQUMsRUFBRTtBQUNwQixhQUFLLElBQUksQ0FBQyxHQUFHLE9BQU8sQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUN2QyxjQUFJLENBQUMsSUFBSSxPQUFPLEVBQUU7QUFDaEIseUJBQWEsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsS0FBSyxPQUFPLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO1dBQy9DO1NBQ0Y7T0FDRixNQUFNLElBQUksTUFBTSxDQUFDLE1BQU0sSUFBSSxPQUFPLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsRUFBRTtBQUMzRCxZQUFNLFVBQVUsR0FBRyxFQUFFLENBQUM7QUFDdEIsWUFBTSxRQUFRLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQztBQUNuRCxhQUFLLElBQUksRUFBRSxHQUFHLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLEVBQUUsQ0FBQyxJQUFJLEVBQUUsRUFBRSxHQUFHLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRTtBQUM3RCxvQkFBVSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsS0FBSyxDQUFDLENBQUM7U0FDM0I7QUFDRCxlQUFPLEdBQUcsVUFBVSxDQUFDO0FBQ3JCLGFBQUssSUFBSSxDQUFDLEdBQUcsT0FBTyxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQ3ZDLHVCQUFhLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEtBQUssT0FBTyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztTQUMvQztPQUNGLE1BQU07O0FBQ0wsY0FBSSxRQUFRLFlBQUEsQ0FBQzs7QUFFYixnQkFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQSxHQUFHLEVBQUk7Ozs7QUFJbEMsZ0JBQUksUUFBUSxLQUFLLFNBQVMsRUFBRTtBQUMxQiwyQkFBYSxDQUFDLFFBQVEsRUFBRSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7YUFDaEM7QUFDRCxvQkFBUSxHQUFHLEdBQUcsQ0FBQztBQUNmLGFBQUMsRUFBRSxDQUFDO1dBQ0wsQ0FBQyxDQUFDO0FBQ0gsY0FBSSxRQUFRLEtBQUssU0FBUyxFQUFFO0FBQzFCLHlCQUFhLENBQUMsUUFBUSxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsSUFBSSxDQUFDLENBQUM7V0FDdEM7O09BQ0Y7S0FDRjs7QUFFRCxRQUFJLENBQUMsS0FBSyxDQUFDLEVBQUU7QUFDWCxTQUFHLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQ3JCOztBQUVELFdBQU8sR0FBRyxDQUFDO0dBQ1osQ0FBQyxDQUFDO0NBQ0oiLCJmaWxlIjoiZWFjaC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIGFwcGVuZENvbnRleHRQYXRoLFxuICBibG9ja1BhcmFtcyxcbiAgY3JlYXRlRnJhbWUsXG4gIGlzQXJyYXksXG4gIGlzRnVuY3Rpb25cbn0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IEV4Y2VwdGlvbiBmcm9tICcuLi9leGNlcHRpb24nO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihpbnN0YW5jZSkge1xuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcignZWFjaCcsIGZ1bmN0aW9uKGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgICBpZiAoIW9wdGlvbnMpIHtcbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ011c3QgcGFzcyBpdGVyYXRvciB0byAjZWFjaCcpO1xuICAgIH1cblxuICAgIGxldCBmbiA9IG9wdGlvbnMuZm4sXG4gICAgICBpbnZlcnNlID0gb3B0aW9ucy5pbnZlcnNlLFxuICAgICAgaSA9IDAsXG4gICAgICByZXQgPSAnJyxcbiAgICAgIGRhdGEsXG4gICAgICBjb250ZXh0UGF0aDtcblxuICAgIGlmIChvcHRpb25zLmRhdGEgJiYgb3B0aW9ucy5pZHMpIHtcbiAgICAgIGNvbnRleHRQYXRoID1cbiAgICAgICAgYXBwZW5kQ29udGV4dFBhdGgob3B0aW9ucy5kYXRhLmNvbnRleHRQYXRoLCBvcHRpb25zLmlkc1swXSkgKyAnLic7XG4gICAgfVxuXG4gICAgaWYgKGlzRnVuY3Rpb24oY29udGV4dCkpIHtcbiAgICAgIGNvbnRleHQgPSBjb250ZXh0LmNhbGwodGhpcyk7XG4gICAgfVxuXG4gICAgaWYgKG9wdGlvbnMuZGF0YSkge1xuICAgICAgZGF0YSA9IGNyZWF0ZUZyYW1lKG9wdGlvbnMuZGF0YSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZXhlY0l0ZXJhdGlvbihmaWVsZCwgaW5kZXgsIGxhc3QpIHtcbiAgICAgIGlmIChkYXRhKSB7XG4gICAgICAgIGRhdGEua2V5ID0gZmllbGQ7XG4gICAgICAgIGRhdGEuaW5kZXggPSBpbmRleDtcbiAgICAgICAgZGF0YS5maXJzdCA9IGluZGV4ID09PSAwO1xuICAgICAgICBkYXRhLmxhc3QgPSAhIWxhc3Q7XG5cbiAgICAgICAgaWYgKGNvbnRleHRQYXRoKSB7XG4gICAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGNvbnRleHRQYXRoICsgZmllbGQ7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmV0ID1cbiAgICAgICAgcmV0ICtcbiAgICAgICAgZm4oY29udGV4dFtmaWVsZF0sIHtcbiAgICAgICAgICBkYXRhOiBkYXRhLFxuICAgICAgICAgIGJsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhcbiAgICAgICAgICAgIFtjb250ZXh0W2ZpZWxkXSwgZmllbGRdLFxuICAgICAgICAgICAgW2NvbnRleHRQYXRoICsgZmllbGQsIG51bGxdXG4gICAgICAgICAgKVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAoY29udGV4dCAmJiB0eXBlb2YgY29udGV4dCA9PT0gJ29iamVjdCcpIHtcbiAgICAgIGlmIChpc0FycmF5KGNvbnRleHQpKSB7XG4gICAgICAgIGZvciAobGV0IGogPSBjb250ZXh0Lmxlbmd0aDsgaSA8IGo7IGkrKykge1xuICAgICAgICAgIGlmIChpIGluIGNvbnRleHQpIHtcbiAgICAgICAgICAgIGV4ZWNJdGVyYXRpb24oaSwgaSwgaSA9PT0gY29udGV4dC5sZW5ndGggLSAxKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoZ2xvYmFsLlN5bWJvbCAmJiBjb250ZXh0W2dsb2JhbC5TeW1ib2wuaXRlcmF0b3JdKSB7XG4gICAgICAgIGNvbnN0IG5ld0NvbnRleHQgPSBbXTtcbiAgICAgICAgY29uc3QgaXRlcmF0b3IgPSBjb250ZXh0W2dsb2JhbC5TeW1ib2wuaXRlcmF0b3JdKCk7XG4gICAgICAgIGZvciAobGV0IGl0ID0gaXRlcmF0b3IubmV4dCgpOyAhaXQuZG9uZTsgaXQgPSBpdGVyYXRvci5uZXh0KCkpIHtcbiAgICAgICAgICBuZXdDb250ZXh0LnB1c2goaXQudmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnRleHQgPSBuZXdDb250ZXh0O1xuICAgICAgICBmb3IgKGxldCBqID0gY29udGV4dC5sZW5ndGg7IGkgPCBqOyBpKyspIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKGksIGksIGkgPT09IGNvbnRleHQubGVuZ3RoIC0gMSk7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGxldCBwcmlvcktleTtcblxuICAgICAgICBPYmplY3Qua2V5cyhjb250ZXh0KS5mb3JFYWNoKGtleSA9PiB7XG4gICAgICAgICAgLy8gV2UncmUgcnVubmluZyB0aGUgaXRlcmF0aW9ucyBvbmUgc3RlcCBvdXQgb2Ygc3luYyBzbyB3ZSBjYW4gZGV0ZWN0XG4gICAgICAgICAgLy8gdGhlIGxhc3QgaXRlcmF0aW9uIHdpdGhvdXQgaGF2ZSB0byBzY2FuIHRoZSBvYmplY3QgdHdpY2UgYW5kIGNyZWF0ZVxuICAgICAgICAgIC8vIGFuIGl0ZXJtZWRpYXRlIGtleXMgYXJyYXkuXG4gICAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGV4ZWNJdGVyYXRpb24ocHJpb3JLZXksIGkgLSAxKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcHJpb3JLZXkgPSBrZXk7XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9KTtcbiAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgcmV0ID0gaW52ZXJzZSh0aGlzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\helper-missing.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js",
"index": 10,
"index2": 5,
"size": 2013,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/helper-missing",
"loc": "18:28-63"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _exception = require('../exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nexports['default'] = function (instance) {\n instance.registerHelper('helperMissing', function () /* [args, ]options */{\n if (arguments.length === 1) {\n // A missing field in a {{foo}} construct.\n return undefined;\n } else {\n // Someone is actually trying to call something, blow up.\n throw new _exception2['default']('Missing helper: \"' + arguments[arguments.length - 1].name + '\"');\n }\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozt5QkFBc0IsY0FBYzs7OztxQkFFckIsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxlQUFlLEVBQUUsaUNBQWdDO0FBQ3ZFLFFBQUksU0FBUyxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7O0FBRTFCLGFBQU8sU0FBUyxDQUFDO0tBQ2xCLE1BQU07O0FBRUwsWUFBTSwyQkFDSixtQkFBbUIsR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUNqRSxDQUFDO0tBQ0g7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJoZWxwZXItbWlzc2luZy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBFeGNlcHRpb24gZnJvbSAnLi4vZXhjZXB0aW9uJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2hlbHBlck1pc3NpbmcnLCBmdW5jdGlvbigvKiBbYXJncywgXW9wdGlvbnMgKi8pIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgLy8gQSBtaXNzaW5nIGZpZWxkIGluIGEge3tmb299fSBjb25zdHJ1Y3QuXG4gICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBTb21lb25lIGlzIGFjdHVhbGx5IHRyeWluZyB0byBjYWxsIHNvbWV0aGluZywgYmxvdyB1cC5cbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oXG4gICAgICAgICdNaXNzaW5nIGhlbHBlcjogXCInICsgYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXS5uYW1lICsgJ1wiJ1xuICAgICAgKTtcbiAgICB9XG4gIH0pO1xufVxuIl19\n"
},
{
"id": 13,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\if.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"index": 11,
"index2": 6,
"size": 4458,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/if",
"loc": "22:17-40"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utils = require('../utils');\n\nvar _exception = require('../exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nexports['default'] = function (instance) {\n instance.registerHelper('if', function (conditional, options) {\n if (arguments.length != 2) {\n throw new _exception2['default']('#if requires exactly one argument');\n }\n if (_utils.isFunction(conditional)) {\n conditional = conditional.call(this);\n }\n\n // Default behavior is to render the positive path if the value is truthy and not empty.\n // The `includeZero` option may be set to treat the condtional as purely not empty based on the\n // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.\n if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {\n return options.inverse(this);\n } else {\n return options.fn(this);\n }\n });\n\n instance.registerHelper('unless', function (conditional, options) {\n if (arguments.length != 2) {\n throw new _exception2['default']('#unless requires exactly one argument');\n }\n return instance.helpers['if'].call(this, conditional, {\n fn: options.inverse,\n inverse: options.fn,\n hash: options.hash\n });\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztxQkFBb0MsVUFBVTs7eUJBQ3hCLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyxFQUFFLE9BQU8sRUFBRTtBQUMzRCxRQUFJLFNBQVMsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3pCLFlBQU0sMkJBQWMsbUNBQW1DLENBQUMsQ0FBQztLQUMxRDtBQUNELFFBQUksa0JBQVcsV0FBVyxDQUFDLEVBQUU7QUFDM0IsaUJBQVcsR0FBRyxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQ3RDOzs7OztBQUtELFFBQUksQUFBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLENBQUMsV0FBVyxJQUFLLGVBQVEsV0FBVyxDQUFDLEVBQUU7QUFDdkUsYUFBTyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQzlCLE1BQU07QUFDTCxhQUFPLE9BQU8sQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDekI7R0FDRixDQUFDLENBQUM7O0FBRUgsVUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxXQUFXLEVBQUUsT0FBTyxFQUFFO0FBQy9ELFFBQUksU0FBUyxDQUFDLE1BQU0sSUFBSSxDQUFDLEVBQUU7QUFDekIsWUFBTSwyQkFBYyx1Q0FBdUMsQ0FBQyxDQUFDO0tBQzlEO0FBQ0QsV0FBTyxRQUFRLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsV0FBVyxFQUFFO0FBQ3BELFFBQUUsRUFBRSxPQUFPLENBQUMsT0FBTztBQUNuQixhQUFPLEVBQUUsT0FBTyxDQUFDLEVBQUU7QUFDbkIsVUFBSSxFQUFFLE9BQU8sQ0FBQyxJQUFJO0tBQ25CLENBQUMsQ0FBQztHQUNKLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6ImlmLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgaXNFbXB0eSwgaXNGdW5jdGlvbiB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCBFeGNlcHRpb24gZnJvbSAnLi4vZXhjZXB0aW9uJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2lmJywgZnVuY3Rpb24oY29uZGl0aW9uYWwsIG9wdGlvbnMpIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCAhPSAyKSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCcjaWYgcmVxdWlyZXMgZXhhY3RseSBvbmUgYXJndW1lbnQnKTtcbiAgICB9XG4gICAgaWYgKGlzRnVuY3Rpb24oY29uZGl0aW9uYWwpKSB7XG4gICAgICBjb25kaXRpb25hbCA9IGNvbmRpdGlvbmFsLmNhbGwodGhpcyk7XG4gICAgfVxuXG4gICAgLy8gRGVmYXVsdCBiZWhhdmlvciBpcyB0byByZW5kZXIgdGhlIHBvc2l0aXZlIHBhdGggaWYgdGhlIHZhbHVlIGlzIHRydXRoeSBhbmQgbm90IGVtcHR5LlxuICAgIC8vIFRoZSBgaW5jbHVkZVplcm9gIG9wdGlvbiBtYXkgYmUgc2V0IHRvIHRyZWF0IHRoZSBjb25kdGlvbmFsIGFzIHB1cmVseSBub3QgZW1wdHkgYmFzZWQgb24gdGhlXG4gICAgLy8gYmVoYXZpb3Igb2YgaXNFbXB0eS4gRWZmZWN0aXZlbHkgdGhpcyBkZXRlcm1pbmVzIGlmIDAgaXMgaGFuZGxlZCBieSB0aGUgcG9zaXRpdmUgcGF0aCBvciBuZWdhdGl2ZS5cbiAgICBpZiAoKCFvcHRpb25zLmhhc2guaW5jbHVkZVplcm8gJiYgIWNvbmRpdGlvbmFsKSB8fCBpc0VtcHR5KGNvbmRpdGlvbmFsKSkge1xuICAgICAgcmV0dXJuIG9wdGlvbnMuaW52ZXJzZSh0aGlzKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG9wdGlvbnMuZm4odGhpcyk7XG4gICAgfVxuICB9KTtcblxuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcigndW5sZXNzJywgZnVuY3Rpb24oY29uZGl0aW9uYWwsIG9wdGlvbnMpIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCAhPSAyKSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCcjdW5sZXNzIHJlcXVpcmVzIGV4YWN0bHkgb25lIGFyZ3VtZW50Jyk7XG4gICAgfVxuICAgIHJldHVybiBpbnN0YW5jZS5oZWxwZXJzWydpZiddLmNhbGwodGhpcywgY29uZGl0aW9uYWwsIHtcbiAgICAgIGZuOiBvcHRpb25zLmludmVyc2UsXG4gICAgICBpbnZlcnNlOiBvcHRpb25zLmZuLFxuICAgICAgaGFzaDogb3B0aW9ucy5oYXNoXG4gICAgfSk7XG4gIH0pO1xufVxuIl19\n"
},
{
"id": 14,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\log.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/log.js",
"index": 12,
"index2": 7,
"size": 2507,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/log",
"loc": "26:18-42"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n\nexports['default'] = function (instance) {\n instance.registerHelper('log', function () /* message, options */{\n var args = [undefined],\n options = arguments[arguments.length - 1];\n for (var i = 0; i < arguments.length - 1; i++) {\n args.push(arguments[i]);\n }\n\n var level = 1;\n if (options.hash.level != null) {\n level = options.hash.level;\n } else if (options.data && options.data.level != null) {\n level = options.data.level;\n }\n args[0] = level;\n\n instance.log.apply(instance, args);\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxLQUFLLEVBQUUsa0NBQWlDO0FBQzlELFFBQUksSUFBSSxHQUFHLENBQUMsU0FBUyxDQUFDO1FBQ3BCLE9BQU8sR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztBQUM1QyxTQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7QUFDN0MsVUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztLQUN6Qjs7QUFFRCxRQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7QUFDZCxRQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxJQUFJLElBQUksRUFBRTtBQUM5QixXQUFLLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUM7S0FDNUIsTUFBTSxJQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLElBQUksSUFBSSxFQUFFO0FBQ3JELFdBQUssR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztLQUM1QjtBQUNELFFBQUksQ0FBQyxDQUFDLENBQUMsR0FBRyxLQUFLLENBQUM7O0FBRWhCLFlBQVEsQ0FBQyxHQUFHLE1BQUEsQ0FBWixRQUFRLEVBQVEsSUFBSSxDQUFDLENBQUM7R0FDdkIsQ0FBQyxDQUFDO0NBQ0oiLCJmaWxlIjoibG9nLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2xvZycsIGZ1bmN0aW9uKC8qIG1lc3NhZ2UsIG9wdGlvbnMgKi8pIHtcbiAgICBsZXQgYXJncyA9IFt1bmRlZmluZWRdLFxuICAgICAgb3B0aW9ucyA9IGFyZ3VtZW50c1thcmd1bWVudHMubGVuZ3RoIC0gMV07XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcmd1bWVudHMubGVuZ3RoIC0gMTsgaSsrKSB7XG4gICAgICBhcmdzLnB1c2goYXJndW1lbnRzW2ldKTtcbiAgICB9XG5cbiAgICBsZXQgbGV2ZWwgPSAxO1xuICAgIGlmIChvcHRpb25zLmhhc2gubGV2ZWwgIT0gbnVsbCkge1xuICAgICAgbGV2ZWwgPSBvcHRpb25zLmhhc2gubGV2ZWw7XG4gICAgfSBlbHNlIGlmIChvcHRpb25zLmRhdGEgJiYgb3B0aW9ucy5kYXRhLmxldmVsICE9IG51bGwpIHtcbiAgICAgIGxldmVsID0gb3B0aW9ucy5kYXRhLmxldmVsO1xuICAgIH1cbiAgICBhcmdzWzBdID0gbGV2ZWw7XG5cbiAgICBpbnN0YW5jZS5sb2coLi4uYXJncyk7XG4gIH0pO1xufVxuIl19\n"
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\lookup.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js",
"index": 13,
"index2": 8,
"size": 1244,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/lookup",
"loc": "30:21-48"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n\nexports['default'] = function (instance) {\n instance.registerHelper('lookup', function (obj, field, options) {\n if (!obj) {\n // Note for 5.0: Change to \"obj == null\" in 5.0\n return obj;\n }\n return options.lookupProperty(obj, field);\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxHQUFHLEVBQUUsS0FBSyxFQUFFLE9BQU8sRUFBRTtBQUM5RCxRQUFJLENBQUMsR0FBRyxFQUFFOztBQUVSLGFBQU8sR0FBRyxDQUFDO0tBQ1o7QUFDRCxXQUFPLE9BQU8sQ0FBQyxjQUFjLENBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFDO0dBQzNDLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6Imxvb2t1cC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdsb29rdXAnLCBmdW5jdGlvbihvYmosIGZpZWxkLCBvcHRpb25zKSB7XG4gICAgaWYgKCFvYmopIHtcbiAgICAgIC8vIE5vdGUgZm9yIDUuMDogQ2hhbmdlIHRvIFwib2JqID09IG51bGxcIiBpbiA1LjBcbiAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIHJldHVybiBvcHRpb25zLmxvb2t1cFByb3BlcnR5KG9iaiwgZmllbGQpO1xuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 16,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\with.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"index": 14,
"index2": 9,
"size": 3759,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/with",
"loc": "34:19-44"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utils = require('../utils');\n\nvar _exception = require('../exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nexports['default'] = function (instance) {\n instance.registerHelper('with', function (context, options) {\n if (arguments.length != 2) {\n throw new _exception2['default']('#with requires exactly one argument');\n }\n if (_utils.isFunction(context)) {\n context = context.call(this);\n }\n\n var fn = options.fn;\n\n if (!_utils.isEmpty(context)) {\n var data = options.data;\n if (options.data && options.ids) {\n data = _utils.createFrame(options.data);\n data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);\n }\n\n return fn(context, {\n data: data,\n blockParams: _utils.blockParams([context], [data && data.contextPath])\n });\n } else {\n return options.inverse(this);\n }\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3FCQU1PLFVBQVU7O3lCQUNLLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsTUFBTSxFQUFFLFVBQVMsT0FBTyxFQUFFLE9BQU8sRUFBRTtBQUN6RCxRQUFJLFNBQVMsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3pCLFlBQU0sMkJBQWMscUNBQXFDLENBQUMsQ0FBQztLQUM1RDtBQUNELFFBQUksa0JBQVcsT0FBTyxDQUFDLEVBQUU7QUFDdkIsYUFBTyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDOUI7O0FBRUQsUUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEVBQUUsQ0FBQzs7QUFFcEIsUUFBSSxDQUFDLGVBQVEsT0FBTyxDQUFDLEVBQUU7QUFDckIsVUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztBQUN4QixVQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixZQUFJLEdBQUcsbUJBQVksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2pDLFlBQUksQ0FBQyxXQUFXLEdBQUcseUJBQ2pCLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUN4QixPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUNmLENBQUM7T0FDSDs7QUFFRCxhQUFPLEVBQUUsQ0FBQyxPQUFPLEVBQUU7QUFDakIsWUFBSSxFQUFFLElBQUk7QUFDVixtQkFBVyxFQUFFLG1CQUFZLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxJQUFJLElBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFDO09BQ2hFLENBQUMsQ0FBQztLQUNKLE1BQU07QUFDTCxhQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDOUI7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJ3aXRoLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgYXBwZW5kQ29udGV4dFBhdGgsXG4gIGJsb2NrUGFyYW1zLFxuICBjcmVhdGVGcmFtZSxcbiAgaXNFbXB0eSxcbiAgaXNGdW5jdGlvblxufSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCd3aXRoJywgZnVuY3Rpb24oY29udGV4dCwgb3B0aW9ucykge1xuICAgIGlmIChhcmd1bWVudHMubGVuZ3RoICE9IDIpIHtcbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJyN3aXRoIHJlcXVpcmVzIGV4YWN0bHkgb25lIGFyZ3VtZW50Jyk7XG4gICAgfVxuICAgIGlmIChpc0Z1bmN0aW9uKGNvbnRleHQpKSB7XG4gICAgICBjb250ZXh0ID0gY29udGV4dC5jYWxsKHRoaXMpO1xuICAgIH1cblxuICAgIGxldCBmbiA9IG9wdGlvbnMuZm47XG5cbiAgICBpZiAoIWlzRW1wdHkoY29udGV4dCkpIHtcbiAgICAgIGxldCBkYXRhID0gb3B0aW9ucy5kYXRhO1xuICAgICAgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmlkcykge1xuICAgICAgICBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGFwcGVuZENvbnRleHRQYXRoKFxuICAgICAgICAgIG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCxcbiAgICAgICAgICBvcHRpb25zLmlkc1swXVxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwge1xuICAgICAgICBkYXRhOiBkYXRhLFxuICAgICAgICBibG9ja1BhcmFtczogYmxvY2tQYXJhbXMoW2NvbnRleHRdLCBbZGF0YSAmJiBkYXRhLmNvbnRleHRQYXRoXSlcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gb3B0aW9ucy5pbnZlcnNlKHRoaXMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0=\n"
},
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"index": 15,
"index2": 12,
"size": 1000,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"issuerId": 2,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./decorators",
"loc": "17:18-41"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.registerDefaultDecorators = registerDefaultDecorators;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _decoratorsInline = require('./decorators/inline');\n\nvar _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);\n\nfunction registerDefaultDecorators(instance) {\n _decoratorsInline2['default'](instance);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Z0NBQTJCLHFCQUFxQjs7OztBQUV6QyxTQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCxnQ0FBZSxRQUFRLENBQUMsQ0FBQztDQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG4iXX0=\n"
},
{
"id": 18,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators\\inline.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js",
"index": 16,
"index2": 11,
"size": 2696,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js",
"issuerId": 17,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 513,
"building": 19,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"type": "cjs require",
"userRequest": "./decorators/inline",
"loc": "9:24-54"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n\nvar _utils = require('../utils');\n\nexports['default'] = function (instance) {\n instance.registerDecorator('inline', function (fn, props, container, options) {\n var ret = fn;\n if (!props.partials) {\n props.partials = {};\n ret = function (context, options) {\n // Create a new partials stack frame prior to exec.\n var original = container.partials;\n container.partials = _utils.extend({}, original, props.partials);\n var ret = fn(context, options);\n container.partials = original;\n return ret;\n };\n }\n\n props.partials[options.args[0]] = options.fn;\n\n return ret;\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQXVCLFVBQVU7O3FCQUVsQixVQUFTLFFBQVEsRUFBRTtBQUNoQyxVQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFFBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFFBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLFdBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFNBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLFlBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsaUJBQVMsQ0FBQyxRQUFRLEdBQUcsY0FBTyxFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxZQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLGlCQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQztBQUM5QixlQUFPLEdBQUcsQ0FBQztPQUNaLENBQUM7S0FDSDs7QUFFRCxTQUFLLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUU3QyxXQUFPLEdBQUcsQ0FBQztHQUNaLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6ImlubGluZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGV4dGVuZCB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJEZWNvcmF0b3IoJ2lubGluZScsIGZ1bmN0aW9uKGZuLCBwcm9wcywgY29udGFpbmVyLCBvcHRpb25zKSB7XG4gICAgbGV0IHJldCA9IGZuO1xuICAgIGlmICghcHJvcHMucGFydGlhbHMpIHtcbiAgICAgIHByb3BzLnBhcnRpYWxzID0ge307XG4gICAgICByZXQgPSBmdW5jdGlvbihjb250ZXh0LCBvcHRpb25zKSB7XG4gICAgICAgIC8vIENyZWF0ZSBhIG5ldyBwYXJ0aWFscyBzdGFjayBmcmFtZSBwcmlvciB0byBleGVjLlxuICAgICAgICBsZXQgb3JpZ2luYWwgPSBjb250YWluZXIucGFydGlhbHM7XG4gICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyA9IGV4dGVuZCh7fSwgb3JpZ2luYWwsIHByb3BzLnBhcnRpYWxzKTtcbiAgICAgICAgbGV0IHJldCA9IGZuKGNvbnRleHQsIG9wdGlvbnMpO1xuICAgICAgICBjb250YWluZXIucGFydGlhbHMgPSBvcmlnaW5hbDtcbiAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgIH07XG4gICAgfVxuXG4gICAgcHJvcHMucGFydGlhbHNbb3B0aW9ucy5hcmdzWzBdXSA9IG9wdGlvbnMuZm47XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 19,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\create-new-lookup-object.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js",
"index": 19,
"index2": 14,
"size": 1783,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"issuerId": 6,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 521,
"building": 17,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"type": "cjs require",
"userRequest": "./create-new-lookup-object",
"loc": "11:29-66"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.createNewLookupObject = createNewLookupObject;\n\nvar _utils = require('../utils');\n\n/**\n * Create a new object with \"null\"-prototype to avoid truthy results on prototype properties.\n * The resulting object can be used with \"object[property]\" to check if a property exists\n * @param {...object} sources a varargs parameter of source objects that will be merged\n * @returns {object}\n */\n\nfunction createNewLookupObject() {\n for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n return _utils.extend.apply(undefined, [Object.create(null)].concat(sources));\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztxQkFBdUIsVUFBVTs7Ozs7Ozs7O0FBUTFCLFNBQVMscUJBQXFCLEdBQWE7b0NBQVQsT0FBTztBQUFQLFdBQU87OztBQUM5QyxTQUFPLGdDQUFPLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQUssT0FBTyxFQUFDLENBQUM7Q0FDaEQiLCJmaWxlIjoiY3JlYXRlLW5ldy1sb29rdXAtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZXh0ZW5kIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vKipcbiAqIENyZWF0ZSBhIG5ldyBvYmplY3Qgd2l0aCBcIm51bGxcIi1wcm90b3R5cGUgdG8gYXZvaWQgdHJ1dGh5IHJlc3VsdHMgb24gcHJvdG90eXBlIHByb3BlcnRpZXMuXG4gKiBUaGUgcmVzdWx0aW5nIG9iamVjdCBjYW4gYmUgdXNlZCB3aXRoIFwib2JqZWN0W3Byb3BlcnR5XVwiIHRvIGNoZWNrIGlmIGEgcHJvcGVydHkgZXhpc3RzXG4gKiBAcGFyYW0gey4uLm9iamVjdH0gc291cmNlcyBhIHZhcmFyZ3MgcGFyYW1ldGVyIG9mIHNvdXJjZSBvYmplY3RzIHRoYXQgd2lsbCBiZSBtZXJnZWRcbiAqIEByZXR1cm5zIHtvYmplY3R9XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVOZXdMb29rdXBPYmplY3QoLi4uc291cmNlcykge1xuICByZXR1cm4gZXh0ZW5kKE9iamVjdC5jcmVhdGUobnVsbCksIC4uLnNvdXJjZXMpO1xufVxuIl19\n"
},
{
"id": 20,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\safe-string.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/safe-string.js",
"index": 20,
"index2": 17,
"size": 1164,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/safe-string",
"loc": "19:28-63"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "// Build out our basic SafeString type\n'use strict';\n\nexports.__esModule = true;\nfunction SafeString(string) {\n this.string = string;\n}\n\nSafeString.prototype.toString = SafeString.prototype.toHTML = function () {\n return '' + this.string;\n};\n\nexports['default'] = SafeString;\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsTUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7Q0FDdEI7O0FBRUQsVUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxTQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0NBQ3pCLENBQUM7O3FCQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ==\n"
},
{
"id": 21,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"index": 21,
"index2": 19,
"size": 44682,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/runtime",
"loc": "31:25-56"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.checkRevision = checkRevision;\nexports.template = template;\nexports.wrapProgram = wrapProgram;\nexports.resolvePartial = resolvePartial;\nexports.invokePartial = invokePartial;\nexports.noop = noop;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n// istanbul ignore next\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\nvar _utils = require('./utils');\n\nvar Utils = _interopRequireWildcard(_utils);\n\nvar _exception = require('./exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nvar _base = require('./base');\n\nvar _helpers = require('./helpers');\n\nvar _internalWrapHelper = require('./internal/wrapHelper');\n\nvar _internalProtoAccess = require('./internal/proto-access');\n\nfunction checkRevision(compilerInfo) {\n var compilerRevision = compilerInfo && compilerInfo[0] || 1,\n currentRevision = _base.COMPILER_REVISION;\n\n if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {\n return;\n }\n\n if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {\n var runtimeVersions = _base.REVISION_CHANGES[currentRevision],\n compilerVersions = _base.REVISION_CHANGES[compilerRevision];\n throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');\n } else {\n // Use the embedded version info since the runtime doesn't know about this revision yet\n throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');\n }\n}\n\nfunction template(templateSpec, env) {\n /* istanbul ignore next */\n if (!env) {\n throw new _exception2['default']('No environment passed to template');\n }\n if (!templateSpec || !templateSpec.main) {\n throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);\n }\n\n templateSpec.main.decorator = templateSpec.main_d;\n\n // Note: Using env.VM references rather than local var references throughout this section to allow\n // for external users to override these as pseudo-supported APIs.\n env.VM.checkRevision(templateSpec.compiler);\n\n // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)\n var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;\n\n function invokePartialWrapper(partial, context, options) {\n if (options.hash) {\n context = Utils.extend({}, context, options.hash);\n if (options.ids) {\n options.ids[0] = true;\n }\n }\n partial = env.VM.resolvePartial.call(this, partial, context, options);\n\n var extendedOptions = Utils.extend({}, options, {\n hooks: this.hooks,\n protoAccessControl: this.protoAccessControl\n });\n\n var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);\n\n if (result == null && env.compile) {\n options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);\n result = options.partials[options.name](context, extendedOptions);\n }\n if (result != null) {\n if (options.indent) {\n var lines = result.split('\\n');\n for (var i = 0, l = lines.length; i < l; i++) {\n if (!lines[i] && i + 1 === l) {\n break;\n }\n\n lines[i] = options.indent + lines[i];\n }\n result = lines.join('\\n');\n }\n return result;\n } else {\n throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');\n }\n }\n\n // Just add water\n var container = {\n strict: function strict(obj, name, loc) {\n if (!obj || !(name in obj)) {\n throw new _exception2['default']('\"' + name + '\" not defined in ' + obj, {\n loc: loc\n });\n }\n return obj[name];\n },\n lookupProperty: function lookupProperty(parent, propertyName) {\n var result = parent[propertyName];\n if (result == null) {\n return result;\n }\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return result;\n }\n\n if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {\n return result;\n }\n return undefined;\n },\n lookup: function lookup(depths, name) {\n var len = depths.length;\n for (var i = 0; i < len; i++) {\n var result = depths[i] && container.lookupProperty(depths[i], name);\n if (result != null) {\n return depths[i][name];\n }\n }\n },\n lambda: function lambda(current, context) {\n return typeof current === 'function' ? current.call(context) : current;\n },\n\n escapeExpression: Utils.escapeExpression,\n invokePartial: invokePartialWrapper,\n\n fn: function fn(i) {\n var ret = templateSpec[i];\n ret.decorator = templateSpec[i + '_d'];\n return ret;\n },\n\n programs: [],\n program: function program(i, data, declaredBlockParams, blockParams, depths) {\n var programWrapper = this.programs[i],\n fn = this.fn(i);\n if (data || depths || blockParams || declaredBlockParams) {\n programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);\n } else if (!programWrapper) {\n programWrapper = this.programs[i] = wrapProgram(this, i, fn);\n }\n return programWrapper;\n },\n\n data: function data(value, depth) {\n while (value && depth--) {\n value = value._parent;\n }\n return value;\n },\n mergeIfNeeded: function mergeIfNeeded(param, common) {\n var obj = param || common;\n\n if (param && common && param !== common) {\n obj = Utils.extend({}, common, param);\n }\n\n return obj;\n },\n // An empty object to use as replacement for null-contexts\n nullContext: Object.seal({}),\n\n noop: env.VM.noop,\n compilerInfo: templateSpec.compiler\n };\n\n function ret(context) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n var data = options.data;\n\n ret._setup(options);\n if (!options.partial && templateSpec.useData) {\n data = initData(context, data);\n }\n var depths = undefined,\n blockParams = templateSpec.useBlockParams ? [] : undefined;\n if (templateSpec.useDepths) {\n if (options.depths) {\n depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;\n } else {\n depths = [context];\n }\n }\n\n function main(context /*, options*/) {\n return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);\n }\n\n main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);\n return main(context, options);\n }\n\n ret.isTop = true;\n\n ret._setup = function (options) {\n if (!options.partial) {\n var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);\n wrapHelpersToPassLookupProperty(mergedHelpers, container);\n container.helpers = mergedHelpers;\n\n if (templateSpec.usePartial) {\n // Use mergeIfNeeded here to prevent compiling global partials multiple times\n container.partials = container.mergeIfNeeded(options.partials, env.partials);\n }\n if (templateSpec.usePartial || templateSpec.useDecorators) {\n container.decorators = Utils.extend({}, env.decorators, options.decorators);\n }\n\n container.hooks = {};\n container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);\n\n var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;\n _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);\n _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);\n } else {\n container.protoAccessControl = options.protoAccessControl; // internal option\n container.helpers = options.helpers;\n container.partials = options.partials;\n container.decorators = options.decorators;\n container.hooks = options.hooks;\n }\n };\n\n ret._child = function (i, data, blockParams, depths) {\n if (templateSpec.useBlockParams && !blockParams) {\n throw new _exception2['default']('must pass block params');\n }\n if (templateSpec.useDepths && !depths) {\n throw new _exception2['default']('must pass parent depths');\n }\n\n return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);\n };\n return ret;\n}\n\nfunction wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {\n function prog(context) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n var currentDepths = depths;\n if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {\n currentDepths = [context].concat(depths);\n }\n\n return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);\n }\n\n prog = executeDecorators(fn, prog, container, depths, data, blockParams);\n\n prog.program = i;\n prog.depth = depths ? depths.length : 0;\n prog.blockParams = declaredBlockParams || 0;\n return prog;\n}\n\n/**\n * This is currently part of the official API, therefore implementation details should not be changed.\n */\n\nfunction resolvePartial(partial, context, options) {\n if (!partial) {\n if (options.name === '@partial-block') {\n partial = options.data['partial-block'];\n } else {\n partial = options.partials[options.name];\n }\n } else if (!partial.call && !options.name) {\n // This is a dynamic partial that returned a string\n options.name = partial;\n partial = options.partials[partial];\n }\n return partial;\n}\n\nfunction invokePartial(partial, context, options) {\n // Use the current closure context to save the partial-block if this partial\n var currentPartialBlock = options.data && options.data['partial-block'];\n options.partial = true;\n if (options.ids) {\n options.data.contextPath = options.ids[0] || options.data.contextPath;\n }\n\n var partialBlock = undefined;\n if (options.fn && options.fn !== noop) {\n (function () {\n options.data = _base.createFrame(options.data);\n // Wrapper function to get access to currentPartialBlock from the closure\n var fn = options.fn;\n partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n // Restore the partial-block from the closure for the execution of the block\n // i.e. the part inside the block of the partial call.\n options.data = _base.createFrame(options.data);\n options.data['partial-block'] = currentPartialBlock;\n return fn(context, options);\n };\n if (fn.partials) {\n options.partials = Utils.extend({}, options.partials, fn.partials);\n }\n })();\n }\n\n if (partial === undefined && partialBlock) {\n partial = partialBlock;\n }\n\n if (partial === undefined) {\n throw new _exception2['default']('The partial ' + options.name + ' could not be found');\n } else if (partial instanceof Function) {\n return partial(context, options);\n }\n}\n\nfunction noop() {\n return '';\n}\n\nfunction initData(context, data) {\n if (!data || !('root' in data)) {\n data = data ? _base.createFrame(data) : {};\n data.root = context;\n }\n return data;\n}\n\nfunction executeDecorators(fn, prog, container, depths, data, blockParams) {\n if (fn.decorator) {\n var props = {};\n prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);\n Utils.extend(prog, props);\n }\n return prog;\n}\n\nfunction wrapHelpersToPassLookupProperty(mergedHelpers, container) {\n Object.keys(mergedHelpers).forEach(function (helperName) {\n var helper = mergedHelpers[helperName];\n mergedHelpers[helperName] = passLookupPropertyOption(helper, container);\n });\n}\n\nfunction passLookupPropertyOption(helper, container) {\n var lookupProperty = container.lookupProperty;\n return _internalWrapHelper.wrapHelper(helper, function (options) {\n return Utils.extend({ lookupProperty: lookupProperty }, options);\n });\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7cUJBQXVCLFNBQVM7O0lBQXBCLEtBQUs7O3lCQUNLLGFBQWE7Ozs7b0JBTTVCLFFBQVE7O3VCQUNtQixXQUFXOztrQ0FDbEIsdUJBQXVCOzttQ0FJM0MseUJBQXlCOztBQUV6QixTQUFTLGFBQWEsQ0FBQyxZQUFZLEVBQUU7QUFDMUMsTUFBTSxnQkFBZ0IsR0FBRyxBQUFDLFlBQVksSUFBSSxZQUFZLENBQUMsQ0FBQyxDQUFDLElBQUssQ0FBQztNQUM3RCxlQUFlLDBCQUFvQixDQUFDOztBQUV0QyxNQUNFLGdCQUFnQiwyQ0FBcUMsSUFDckQsZ0JBQWdCLDJCQUFxQixFQUNyQztBQUNBLFdBQU87R0FDUjs7QUFFRCxNQUFJLGdCQUFnQiwwQ0FBb0MsRUFBRTtBQUN4RCxRQUFNLGVBQWUsR0FBRyx1QkFBaUIsZUFBZSxDQUFDO1FBQ3ZELGdCQUFnQixHQUFHLHVCQUFpQixnQkFBZ0IsQ0FBQyxDQUFDO0FBQ3hELFVBQU0sMkJBQ0oseUZBQXlGLEdBQ3ZGLHFEQUFxRCxHQUNyRCxlQUFlLEdBQ2YsbURBQW1ELEdBQ25ELGdCQUFnQixHQUNoQixJQUFJLENBQ1AsQ0FBQztHQUNILE1BQU07O0FBRUwsVUFBTSwyQkFDSix3RkFBd0YsR0FDdEYsaURBQWlELEdBQ2pELFlBQVksQ0FBQyxDQUFDLENBQUMsR0FDZixJQUFJLENBQ1AsQ0FBQztHQUNIO0NBQ0Y7O0FBRU0sU0FBUyxRQUFRLENBQUMsWUFBWSxFQUFFLEdBQUcsRUFBRTs7QUFFMUMsTUFBSSxDQUFDLEdBQUcsRUFBRTtBQUNSLFVBQU0sMkJBQWMsbUNBQW1DLENBQUMsQ0FBQztHQUMxRDtBQUNELE1BQUksQ0FBQyxZQUFZLElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxFQUFFO0FBQ3ZDLFVBQU0sMkJBQWMsMkJBQTJCLEdBQUcsT0FBTyxZQUFZLENBQUMsQ0FBQztHQUN4RTs7QUFFRCxjQUFZLENBQUMsSUFBSSxDQUFDLFNBQVMsR0FBRyxZQUFZLENBQUMsTUFBTSxDQUFDOzs7O0FBSWxELEtBQUcsQ0FBQyxFQUFFLENBQUMsYUFBYSxDQUFDLFlBQVksQ0FBQyxRQUFRLENBQUMsQ0FBQzs7O0FBRzVDLE1BQU0sb0NBQW9DLEdBQ3hDLFlBQVksQ0FBQyxRQUFRLElBQUksWUFBWSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUM7O0FBRTFELFdBQVMsb0JBQW9CLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUU7QUFDdkQsUUFBSSxPQUFPLENBQUMsSUFBSSxFQUFFO0FBQ2hCLGFBQU8sR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxPQUFPLEVBQUUsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2xELFVBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUNmLGVBQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDO09BQ3ZCO0tBQ0Y7QUFDRCxXQUFPLEdBQUcsR0FBRyxDQUFDLEVBQUUsQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLElBQUksRUFBRSxPQUFPLEVBQUUsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDOztBQUV0RSxRQUFJLGVBQWUsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxPQUFPLEVBQUU7QUFDOUMsV0FBSyxFQUFFLElBQUksQ0FBQyxLQUFLO0FBQ2pCLHdCQUFrQixFQUFFLElBQUksQ0FBQyxrQkFBa0I7S0FDNUMsQ0FBQyxDQUFDOztBQUVILFFBQUksTUFBTSxHQUFHLEdBQUcsQ0FBQyxFQUFFLENBQUMsYUFBYSxDQUFDLElBQUksQ0FDcEMsSUFBSSxFQUNKLE9BQU8sRUFDUCxPQUFPLEVBQ1AsZUFBZSxDQUNoQixDQUFDOztBQUVGLFFBQUksTUFBTSxJQUFJLElBQUksSUFBSSxHQUFHLENBQUMsT0FBTyxFQUFFO0FBQ2pDLGFBQU8sQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxHQUFHLEdBQUcsQ0FBQyxPQUFPLENBQzFDLE9BQU8sRUFDUCxZQUFZLENBQUMsZUFBZSxFQUM1QixHQUFHLENBQ0osQ0FBQztBQUNGLFlBQU0sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxPQUFPLEVBQUUsZUFBZSxDQUFDLENBQUM7S0FDbkU7QUFDRCxRQUFJLE1BQU0sSUFBSSxJQUFJLEVBQUU7QUFDbEIsVUFBSSxPQUFPLENBQUMsTUFBTSxFQUFFO0FBQ2xCLFlBQUksS0FBSyxHQUFHLE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDL0IsYUFBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUM1QyxjQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxFQUFFO0FBQzVCLGtCQUFNO1dBQ1A7O0FBRUQsZUFBSyxDQUFDLENBQUMsQ0FBQyxHQUFHLE9BQU8sQ0FBQyxNQUFNLEdBQUcsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQ3RDO0FBQ0QsY0FBTSxHQUFHLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7T0FDM0I7QUFDRCxhQUFPLE1BQU0sQ0FBQztLQUNmLE1BQU07QUFDTCxZQUFNLDJCQUNKLGNBQWMsR0FDWixPQUFPLENBQUMsSUFBSSxHQUNaLDBEQUEwRCxDQUM3RCxDQUFDO0tBQ0g7R0FDRjs7O0FBR0QsTUFBSSxTQUFTLEdBQUc7QUFDZCxVQUFNLEVBQUUsZ0JBQVMsR0FBRyxFQUFFLElBQUksRUFBRSxHQUFHLEVBQUU7QUFDL0IsVUFBSSxDQUFDLEdBQUcsSUFBSSxFQUFFLElBQUksSUFBSSxHQUFHLENBQUEsQUFBQyxFQUFFO0FBQzFCLGNBQU0sMkJBQWMsR0FBRyxHQUFHLElBQUksR0FBRyxtQkFBbUIsR0FBRyxHQUFHLEVBQUU7QUFDMUQsYUFBRyxFQUFFLEdBQUc7U0FDVCxDQUFDLENBQUM7T0FDSjtBQUNELGFBQU8sR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQ2xCO0FBQ0Qsa0JBQWMsRUFBRSx3QkFBUyxNQUFNLEVBQUUsWUFBWSxFQUFFO0FBQzdDLFVBQUksTUFBTSxHQUFHLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBQztBQUNsQyxVQUFJLE1BQU0sSUFBSSxJQUFJLEVBQUU7QUFDbEIsZUFBTyxNQUFNLENBQUM7T0FDZjtBQUNELFVBQUksTUFBTSxDQUFDLFNBQVMsQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxZQUFZLENBQUMsRUFBRTtBQUM5RCxlQUFPLE1BQU0sQ0FBQztPQUNmOztBQUVELFVBQUkscUNBQWdCLE1BQU0sRUFBRSxTQUFTLENBQUMsa0JBQWtCLEVBQUUsWUFBWSxDQUFDLEVBQUU7QUFDdkUsZUFBTyxNQUFNLENBQUM7T0FDZjtBQUNELGFBQU8sU0FBUyxDQUFDO0tBQ2xCO0FBQ0QsVUFBTSxFQUFFLGdCQUFTLE1BQU0sRUFBRSxJQUFJLEVBQUU7QUFDN0IsVUFBTSxHQUFHLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQztBQUMxQixXQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsR0FBRyxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQzVCLFlBQUksTUFBTSxHQUFHLE1BQU0sQ0FBQyxDQUFDLENBQUMsSUFBSSxTQUFTLENBQUMsY0FBYyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUMsQ0FBQztBQUNwRSxZQUFJLE1BQU0sSUFBSSxJQUFJLEVBQUU7QUFDbEIsaUJBQU8sTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDO1NBQ3hCO09BQ0Y7S0FDRjtBQUNELFVBQU0sRUFBRSxnQkFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ2pDLGFBQU8sT0FBTyxPQUFPLEtBQUssVUFBVSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsT0FBTyxDQUFDO0tBQ3hFOztBQUVELG9CQUFnQixFQUFFLEtBQUssQ0FBQyxnQkFBZ0I7QUFDeEMsaUJBQWEsRUFBRSxvQkFBb0I7O0FBRW5DLE1BQUUsRUFBRSxZQUFTLENBQUMsRUFBRTtBQUNkLFVBQUksR0FBRyxHQUFHLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUMxQixTQUFHLENBQUMsU0FBUyxHQUFHLFlBQVksQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUM7QUFDdkMsYUFBTyxHQUFHLENBQUM7S0FDWjs7QUFFRCxZQUFRLEVBQUUsRUFBRTtBQUNaLFdBQU8sRUFBRSxpQkFBUyxDQUFDLEVBQUUsSUFBSSxFQUFFLG1CQUFtQixFQUFFLFdBQVcsRUFBRSxNQUFNLEVBQUU7QUFDbkUsVUFBSSxjQUFjLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7VUFDbkMsRUFBRSxHQUFHLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDbEIsVUFBSSxJQUFJLElBQUksTUFBTSxJQUFJLFdBQVcsSUFBSSxtQkFBbUIsRUFBRTtBQUN4RCxzQkFBYyxHQUFHLFdBQVcsQ0FDMUIsSUFBSSxFQUNKLENBQUMsRUFDRCxFQUFFLEVBQ0YsSUFBSSxFQUNKLG1CQUFtQixFQUNuQixXQUFXLEVBQ1gsTUFBTSxDQUNQLENBQUM7T0FDSCxNQUFNLElBQUksQ0FBQyxjQUFjLEVBQUU7QUFDMUIsc0JBQWMsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxHQUFHLFdBQVcsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDO09BQzlEO0FBQ0QsYUFBTyxjQUFjLENBQUM7S0FDdkI7O0FBRUQsUUFBSSxFQUFFLGNBQVMsS0FBSyxFQUFFLEtBQUssRUFBRTtBQUMzQixhQUFPLEtBQUssSUFBSSxLQUFLLEVBQUUsRUFBRTtBQUN2QixhQUFLLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQztPQUN2QjtBQUNELGFBQU8sS0FBSyxDQUFDO0tBQ2Q7QUFDRCxpQkFBYSxFQUFFLHVCQUFTLEtBQUssRUFBRSxNQUFNLEVBQUU7QUFDckMsVUFBSSxHQUFHLEdBQUcsS0FBSyxJQUFJLE1BQU0sQ0FBQzs7QUFFMUIsVUFBSSxLQUFLLElBQUksTUFBTSxJQUFJLEtBQUssS0FBSyxNQUFNLEVBQUU7QUFDdkMsV0FBRyxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUMsRUFBRSxFQUFFLE1BQU0sRUFBRSxLQUFLLENBQUMsQ0FBQztPQUN2Qzs7QUFFRCxhQUFPLEdBQUcsQ0FBQztLQUNaOztBQUVELGVBQVcsRUFBRSxNQUFNLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQzs7QUFFNUIsUUFBSSxFQUFFLEdBQUcsQ0FBQyxFQUFFLENBQUMsSUFBSTtBQUNqQixnQkFBWSxFQUFFLFlBQVksQ0FBQyxRQUFRO0dBQ3BDLENBQUM7O0FBRUYsV0FBUyxHQUFHLENBQUMsT0FBTyxFQUFnQjtRQUFkLE9BQU8seURBQUcsRUFBRTs7QUFDaEMsUUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQzs7QUFFeEIsT0FBRyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNwQixRQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sSUFBSSxZQUFZLENBQUMsT0FBTyxFQUFFO0FBQzVDLFVBQUksR0FBRyxRQUFRLENBQUMsT0FBTyxFQUFFLElBQUksQ0FBQyxDQUFDO0tBQ2hDO0FBQ0QsUUFBSSxNQUFNLFlBQUE7UUFDUixXQUFXLEdBQUcsWUFBWSxDQUFDLGNBQWMsR0FBRyxFQUFFLEdBQUcsU0FBUyxDQUFDO0FBQzdELFFBQUksWUFBWSxDQUFDLFNBQVMsRUFBRTtBQUMxQixVQUFJLE9BQU8sQ0FBQyxNQUFNLEVBQUU7QUFDbEIsY0FBTSxHQUNKLE9BQU8sSUFBSSxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxHQUN4QixDQUFDLE9BQU8sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLEdBQ2hDLE9BQU8sQ0FBQyxNQUFNLENBQUM7T0FDdEIsTUFBTTtBQUNMLGNBQU0sR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDO09BQ3BCO0tBQ0Y7O0FBRUQsYUFBUyxJQUFJLENBQUMsT0FBTyxnQkFBZ0I7QUFDbkMsYUFDRSxFQUFFLEdBQ0YsWUFBWSxDQUFDLElBQUksQ0FDZixTQUFTLEVBQ1QsT0FBTyxFQUNQLFNBQVMsQ0FBQyxPQUFPLEVBQ2pCLFNBQVMsQ0FBQyxRQUFRLEVBQ2xCLElBQUksRUFDSixXQUFXLEVBQ1gsTUFBTSxDQUNQLENBQ0Q7S0FDSDs7QUFFRCxRQUFJLEdBQUcsaUJBQWlCLENBQ3RCLFlBQVksQ0FBQyxJQUFJLEVBQ2pCLElBQUksRUFDSixTQUFTLEVBQ1QsT0FBTyxDQUFDLE1BQU0sSUFBSSxFQUFFLEVBQ3BCLElBQUksRUFDSixXQUFXLENBQ1osQ0FBQztBQUNGLFdBQU8sSUFBSSxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQztHQUMvQjs7QUFFRCxLQUFHLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQzs7QUFFakIsS0FBRyxDQUFDLE1BQU0sR0FBRyxVQUFTLE9BQU8sRUFBRTtBQUM3QixRQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sRUFBRTtBQUNwQixVQUFJLGFBQWEsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxHQUFHLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNuRSxxQ0FBK0IsQ0FBQyxhQUFhLEVBQUUsU0FBUyxDQUFDLENBQUM7QUFDMUQsZUFBUyxDQUFDLE9BQU8sR0FBRyxhQUFhLENBQUM7O0FBRWxDLFVBQUksWUFBWSxDQUFDLFVBQVUsRUFBRTs7QUFFM0IsaUJBQVMsQ0FBQyxRQUFRLEdBQUcsU0FBUyxDQUFDLGFBQWEsQ0FDMUMsT0FBTyxDQUFDLFFBQVEsRUFDaEIsR0FBRyxDQUFDLFFBQVEsQ0FDYixDQUFDO09BQ0g7QUFDRCxVQUFJLFlBQVksQ0FBQyxVQUFVLElBQUksWUFBWSxDQUFDLGFBQWEsRUFBRTtBQUN6RCxpQkFBUyxDQUFDLFVBQVUsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUNqQyxFQUFFLEVBQ0YsR0FBRyxDQUFDLFVBQVUsRUFDZCxPQUFPLENBQUMsVUFBVSxDQUNuQixDQUFDO09BQ0g7O0FBRUQsZUFBUyxDQUFDLEtBQUssR0FBRyxFQUFFLENBQUM7QUFDckIsZUFBUyxDQUFDLGtCQUFrQixHQUFHLDhDQUF5QixPQUFPLENBQUMsQ0FBQzs7QUFFakUsVUFBSSxtQkFBbUIsR0FDckIsT0FBTyxDQUFDLHlCQUF5QixJQUNqQyxvQ0FBb0MsQ0FBQztBQUN2QyxpQ0FBa0IsU0FBUyxFQUFFLGVBQWUsRUFBRSxtQkFBbUIsQ0FBQyxDQUFDO0FBQ25FLGlDQUFrQixTQUFTLEVBQUUsb0JBQW9CLEVBQUUsbUJBQW1CLENBQUMsQ0FBQztLQUN6RSxNQUFNO0FBQ0wsZUFBUyxDQUFDLGtCQUFrQixHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQztBQUMxRCxlQUFTLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUM7QUFDcEMsZUFBUyxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDO0FBQ3RDLGVBQVMsQ0FBQyxVQUFVLEdBQUcsT0FBTyxDQUFDLFVBQVUsQ0FBQztBQUMxQyxlQUFTLENBQUMsS0FBSyxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUM7S0FDakM7R0FDRixDQUFDOztBQUVGLEtBQUcsQ0FBQyxNQUFNLEdBQUcsVUFBUyxDQUFDLEVBQUUsSUFBSSxFQUFFLFdBQVcsRUFBRSxNQUFNLEVBQUU7QUFDbEQsUUFBSSxZQUFZLENBQUMsY0FBYyxJQUFJLENBQUMsV0FBVyxFQUFFO0FBQy9DLFlBQU0sMkJBQWMsd0JBQXdCLENBQUMsQ0FBQztLQUMvQztBQUNELFFBQUksWUFBWSxDQUFDLFNBQVMsSUFBSSxDQUFDLE1BQU0sRUFBRTtBQUNyQyxZQUFNLDJCQUFjLHlCQUF5QixDQUFDLENBQUM7S0FDaEQ7O0FBRUQsV0FBTyxXQUFXLENBQ2hCLFNBQVMsRUFDVCxDQUFDLEVBQ0QsWUFBWSxDQUFDLENBQUMsQ0FBQyxFQUNmLElBQUksRUFDSixDQUFDLEVBQ0QsV0FBVyxFQUNYLE1BQU0sQ0FDUCxDQUFDO0dBQ0gsQ0FBQztBQUNGLFNBQU8sR0FBRyxDQUFDO0NBQ1o7O0FBRU0sU0FBUyxXQUFXLENBQ3pCLFNBQVMsRUFDVCxDQUFDLEVBQ0QsRUFBRSxFQUNGLElBQUksRUFDSixtQkFBbUIsRUFDbkIsV0FBVyxFQUNYLE1BQU0sRUFDTjtBQUNBLFdBQVMsSUFBSSxDQUFDLE9BQU8sRUFBZ0I7UUFBZCxPQUFPLHlEQUFHLEVBQUU7O0FBQ2pDLFFBQUksYUFBYSxHQUFHLE1BQU0sQ0FBQztBQUMzQixRQUNFLE1BQU0sSUFDTixPQUFPLElBQUksTUFBTSxDQUFDLENBQUMsQ0FBQyxJQUNwQixFQUFFLE9BQU8sS0FBSyxTQUFTLENBQUMsV0FBVyxJQUFJLE1BQU0sQ0FBQyxDQUFDLENBQUMsS0FBSyxJQUFJLENBQUEsQUFBQyxFQUMxRDtBQUNBLG1CQUFhLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7S0FDMUM7O0FBRUQsV0FBTyxFQUFFLENBQ1AsU0FBUyxFQUNULE9BQU8sRUFDUCxTQUFTLENBQUMsT0FBTyxFQUNqQixTQUFTLENBQUMsUUFBUSxFQUNsQixPQUFPLENBQUMsSUFBSSxJQUFJLElBQUksRUFDcEIsV0FBVyxJQUFJLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsRUFDeEQsYUFBYSxDQUNkLENBQUM7R0FDSDs7QUFFRCxNQUFJLEdBQUcsaUJBQWlCLENBQUMsRUFBRSxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBRSxXQUFXLENBQUMsQ0FBQzs7QUFFekUsTUFBSSxDQUFDLE9BQU8sR0FBRyxDQUFDLENBQUM7QUFDakIsTUFBSSxDQUFDLEtBQUssR0FBRyxNQUFNLEdBQUcsTUFBTSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUM7QUFDeEMsTUFBSSxDQUFDLFdBQVcsR0FBRyxtQkFBbUIsSUFBSSxDQUFDLENBQUM7QUFDNUMsU0FBTyxJQUFJLENBQUM7Q0FDYjs7Ozs7O0FBS00sU0FBUyxjQUFjLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUU7QUFDeEQsTUFBSSxDQUFDLE9BQU8sRUFBRTtBQUNaLFFBQUksT0FBTyxDQUFDLElBQUksS0FBSyxnQkFBZ0IsRUFBRTtBQUNyQyxhQUFPLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQztLQUN6QyxNQUFNO0FBQ0wsYUFBTyxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQzFDO0dBQ0YsTUFBTSxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLEVBQUU7O0FBRXpDLFdBQU8sQ0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDO0FBQ3ZCLFdBQU8sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0dBQ3JDO0FBQ0QsU0FBTyxPQUFPLENBQUM7Q0FDaEI7O0FBRU0sU0FBUyxhQUFhLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRXZELE1BQU0sbUJBQW1CLEdBQUcsT0FBTyxDQUFDLElBQUksSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxDQUFDO0FBQzFFLFNBQU8sQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDO0FBQ3ZCLE1BQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUNmLFdBQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUM7R0FDdkU7O0FBRUQsTUFBSSxZQUFZLFlBQUEsQ0FBQztBQUNqQixNQUFJLE9BQU8sQ0FBQyxFQUFFLElBQUksT0FBTyxDQUFDLEVBQUUsS0FBSyxJQUFJLEVBQUU7O0FBQ3JDLGFBQU8sQ0FBQyxJQUFJLEdBQUcsa0JBQVksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDOztBQUV6QyxVQUFJLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDO0FBQ3BCLGtCQUFZLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsR0FBRyxTQUFTLG1CQUFtQixDQUN6RSxPQUFPLEVBRVA7WUFEQSxPQUFPLHlEQUFHLEVBQUU7Ozs7QUFJWixlQUFPLENBQUMsSUFBSSxHQUFHLGtCQUFZLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUN6QyxlQUFPLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLG1CQUFtQixDQUFDO0FBQ3BELGVBQU8sRUFBRSxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQztPQUM3QixDQUFDO0FBQ0YsVUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFO0FBQ2YsZUFBTyxDQUFDLFFBQVEsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsUUFBUSxFQUFFLEVBQUUsQ0FBQyxRQUFRLENBQUMsQ0FBQztPQUNwRTs7R0FDRjs7QUFFRCxNQUFJLE9BQU8sS0FBSyxTQUFTLElBQUksWUFBWSxFQUFFO0FBQ3pDLFdBQU8sR0FBRyxZQUFZLENBQUM7R0FDeEI7O0FBRUQsTUFBSSxPQUFPLEtBQUssU0FBUyxFQUFFO0FBQ3pCLFVBQU0sMkJBQWMsY0FBYyxHQUFHLE9BQU8sQ0FBQyxJQUFJLEdBQUcscUJBQXFCLENBQUMsQ0FBQztHQUM1RSxNQUFNLElBQUksT0FBTyxZQUFZLFFBQVEsRUFBRTtBQUN0QyxXQUFPLE9BQU8sQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7R0FDbEM7Q0FDRjs7QUFFTSxTQUFTLElBQUksR0FBRztBQUNyQixTQUFPLEVBQUUsQ0FBQztDQUNYOztBQUVELFNBQVMsUUFBUSxDQUFDLE9BQU8sRUFBRSxJQUFJLEVBQUU7QUFDL0IsTUFBSSxDQUFDLElBQUksSUFBSSxFQUFFLE1BQU0sSUFBSSxJQUFJLENBQUEsQUFBQyxFQUFFO0FBQzlCLFFBQUksR0FBRyxJQUFJLEdBQUcsa0JBQVksSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQ3JDLFFBQUksQ0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDO0dBQ3JCO0FBQ0QsU0FBTyxJQUFJLENBQUM7Q0FDYjs7QUFFRCxTQUFTLGlCQUFpQixDQUFDLEVBQUUsRUFBRSxJQUFJLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsV0FBVyxFQUFFO0FBQ3pFLE1BQUksRUFBRSxDQUFDLFNBQVMsRUFBRTtBQUNoQixRQUFJLEtBQUssR0FBRyxFQUFFLENBQUM7QUFDZixRQUFJLEdBQUcsRUFBRSxDQUFDLFNBQVMsQ0FDakIsSUFBSSxFQUNKLEtBQUssRUFDTCxTQUFTLEVBQ1QsTUFBTSxJQUFJLE1BQU0sQ0FBQyxDQUFDLENBQUMsRUFDbkIsSUFBSSxFQUNKLFdBQVcsRUFDWCxNQUFNLENBQ1AsQ0FBQztBQUNGLFNBQUssQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDO0dBQzNCO0FBQ0QsU0FBTyxJQUFJLENBQUM7Q0FDYjs7QUFFRCxTQUFTLCtCQUErQixDQUFDLGFBQWEsRUFBRSxTQUFTLEVBQUU7QUFDakUsUUFBTSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQSxVQUFVLEVBQUk7QUFDL0MsUUFBSSxNQUFNLEdBQUcsYUFBYSxDQUFDLFVBQVUsQ0FBQyxDQUFDO0FBQ3ZDLGlCQUFhLENBQUMsVUFBVSxDQUFDLEdBQUcsd0JBQXdCLENBQUMsTUFBTSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0dBQ3pFLENBQUMsQ0FBQztDQUNKOztBQUVELFNBQVMsd0JBQXdCLENBQUMsTUFBTSxFQUFFLFNBQVMsRUFBRTtBQUNuRCxNQUFNLGNBQWMsR0FBRyxTQUFTLENBQUMsY0FBYyxDQUFDO0FBQ2hELFNBQU8sK0JBQVcsTUFBTSxFQUFFLFVBQUEsT0FBTyxFQUFJO0FBQ25DLFdBQU8sS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFFLGNBQWMsRUFBZCxjQUFjLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQztHQUNsRCxDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJydW50aW1lLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgVXRpbHMgZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4vZXhjZXB0aW9uJztcbmltcG9ydCB7XG4gIENPTVBJTEVSX1JFVklTSU9OLFxuICBjcmVhdGVGcmFtZSxcbiAgTEFTVF9DT01QQVRJQkxFX0NPTVBJTEVSX1JFVklTSU9OLFxuICBSRVZJU0lPTl9DSEFOR0VTXG59IGZyb20gJy4vYmFzZSc7XG5pbXBvcnQgeyBtb3ZlSGVscGVyVG9Ib29rcyB9IGZyb20gJy4vaGVscGVycyc7XG5pbXBvcnQgeyB3cmFwSGVscGVyIH0gZnJvbSAnLi9pbnRlcm5hbC93cmFwSGVscGVyJztcbmltcG9ydCB7XG4gIGNyZWF0ZVByb3RvQWNjZXNzQ29udHJvbCxcbiAgcmVzdWx0SXNBbGxvd2VkXG59IGZyb20gJy4vaW50ZXJuYWwvcHJvdG8tYWNjZXNzJztcblxuZXhwb3J0IGZ1bmN0aW9uIGNoZWNrUmV2aXNpb24oY29tcGlsZXJJbmZvKSB7XG4gIGNvbnN0IGNvbXBpbGVyUmV2aXNpb24gPSAoY29tcGlsZXJJbmZvICYmIGNvbXBpbGVySW5mb1swXSkgfHwgMSxcbiAgICBjdXJyZW50UmV2aXNpb24gPSBDT01QSUxFUl9SRVZJU0lPTjtcblxuICBpZiAoXG4gICAgY29tcGlsZXJSZXZpc2lvbiA+PSBMQVNUX0NPTVBBVElCTEVfQ09NUElMRVJfUkVWSVNJT04gJiZcbiAgICBjb21waWxlclJldmlzaW9uIDw9IENPTVBJTEVSX1JFVklTSU9OXG4gICkge1xuICAgIHJldHVybjtcbiAgfVxuXG4gIGlmIChjb21waWxlclJldmlzaW9uIDwgTEFTVF9DT01QQVRJQkxFX0NPTVBJTEVSX1JFVklTSU9OKSB7XG4gICAgY29uc3QgcnVudGltZVZlcnNpb25zID0gUkVWSVNJT05fQ0hBTkdFU1tjdXJyZW50UmV2aXNpb25dLFxuICAgICAgY29tcGlsZXJWZXJzaW9ucyA9IFJFVklTSU9OX0NIQU5HRVNbY29tcGlsZXJSZXZpc2lvbl07XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihcbiAgICAgICdUZW1wbGF0ZSB3YXMgcHJlY29tcGlsZWQgd2l0aCBhbiBvbGRlciB2ZXJzaW9uIG9mIEhhbmRsZWJhcnMgdGhhbiB0aGUgY3VycmVudCBydW50aW1lLiAnICtcbiAgICAgICAgJ1BsZWFzZSB1cGRhdGUgeW91ciBwcmVjb21waWxlciB0byBhIG5ld2VyIHZlcnNpb24gKCcgK1xuICAgICAgICBydW50aW1lVmVyc2lvbnMgK1xuICAgICAgICAnKSBvciBkb3duZ3JhZGUgeW91ciBydW50aW1lIHRvIGFuIG9sZGVyIHZlcnNpb24gKCcgK1xuICAgICAgICBjb21waWxlclZlcnNpb25zICtcbiAgICAgICAgJykuJ1xuICAgICk7XG4gIH0gZWxzZSB7XG4gICAgLy8gVXNlIHRoZSBlbWJlZGRlZCB2ZXJzaW9uIGluZm8gc2luY2UgdGhlIHJ1bnRpbWUgZG9lc24ndCBrbm93IGFib3V0IHRoaXMgcmV2aXNpb24geWV0XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihcbiAgICAgICdUZW1wbGF0ZSB3YXMgcHJlY29tcGlsZWQgd2l0aCBhIG5ld2VyIHZlcnNpb24gb2YgSGFuZGxlYmFycyB0aGFuIHRoZSBjdXJyZW50IHJ1bnRpbWUuICcgK1xuICAgICAgICAnUGxlYXNlIHVwZGF0ZSB5b3VyIHJ1bnRpbWUgdG8gYSBuZXdlciB2ZXJzaW9uICgnICtcbiAgICAgICAgY29tcGlsZXJJbmZvWzFdICtcbiAgICAgICAgJykuJ1xuICAgICk7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHRlbXBsYXRlKHRlbXBsYXRlU3BlYywgZW52KSB7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIGlmICghZW52KSB7XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignTm8gZW52aXJvbm1lbnQgcGFzc2VkIHRvIHRlbXBsYXRlJyk7XG4gIH1cbiAgaWYgKCF0ZW1wbGF0ZVNwZWMgfHwgIXRlbXBsYXRlU3BlYy5tYWluKSB7XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignVW5rbm93biB0ZW1wbGF0ZSBvYmplY3Q6ICcgKyB0eXBlb2YgdGVtcGxhdGVTcGVjKTtcbiAgfVxuXG4gIHRlbXBsYXRlU3BlYy5tYWluLmRlY29yYXRvciA9IHRlbXBsYXRlU3BlYy5tYWluX2Q7XG5cbiAgLy8gTm90ZTogVXNpbmcgZW52LlZNIHJlZmVyZW5jZXMgcmF0aGVyIHRoYW4gbG9jYWwgdmFyIHJlZmVyZW5jZXMgdGhyb3VnaG91dCB0aGlzIHNlY3Rpb24gdG8gYWxsb3dcbiAgLy8gZm9yIGV4dGVybmFsIHVzZXJzIHRvIG92ZXJyaWRlIHRoZXNlIGFzIHBzZXVkby1zdXBwb3J0ZWQgQVBJcy5cbiAgZW52LlZNLmNoZWNrUmV2aXNpb24odGVtcGxhdGVTcGVjLmNvbXBpbGVyKTtcblxuICAvLyBiYWNrd2FyZHMgY29tcGF0aWJpbGl0eSBmb3IgcHJlY29tcGlsZWQgdGVtcGxhdGVzIHdpdGggY29tcGlsZXItdmVyc2lvbiA3ICg8NC4zLjApXG4gIGNvbnN0IHRlbXBsYXRlV2FzUHJlY29tcGlsZWRXaXRoQ29tcGlsZXJWNyA9XG4gICAgdGVtcGxhdGVTcGVjLmNvbXBpbGVyICYmIHRlbXBsYXRlU3BlYy5jb21waWxlclswXSA9PT0gNztcblxuICBmdW5jdGlvbiBpbnZva2VQYXJ0aWFsV3JhcHBlcihwYXJ0aWFsLCBjb250ZXh0LCBvcHRpb25zKSB7XG4gICAgaWYgKG9wdGlvbnMuaGFzaCkge1xuICAgICAgY29udGV4dCA9IFV0aWxzLmV4dGVuZCh7fSwgY29udGV4dCwgb3B0aW9ucy5oYXNoKTtcbiAgICAgIGlmIChvcHRpb25zLmlkcykge1xuICAgICAgICBvcHRpb25zLmlkc1swXSA9IHRydWU7XG4gICAgICB9XG4gICAgfVxuICAgIHBhcnRpYWwgPSBlbnYuVk0ucmVzb2x2ZVBhcnRpYWwuY2FsbCh0aGlzLCBwYXJ0aWFsLCBjb250ZXh0LCBvcHRpb25zKTtcblxuICAgIGxldCBleHRlbmRlZE9wdGlvbnMgPSBVdGlscy5leHRlbmQoe30sIG9wdGlvbnMsIHtcbiAgICAgIGhvb2tzOiB0aGlzLmhvb2tzLFxuICAgICAgcHJvdG9BY2Nlc3NDb250cm9sOiB0aGlzLnByb3RvQWNjZXNzQ29udHJvbFxuICAgIH0pO1xuXG4gICAgbGV0IHJlc3VsdCA9IGVudi5WTS5pbnZva2VQYXJ0aWFsLmNhbGwoXG4gICAgICB0aGlzLFxuICAgICAgcGFydGlhbCxcbiAgICAgIGNvbnRleHQsXG4gICAgICBleHRlbmRlZE9wdGlvbnNcbiAgICApO1xuXG4gICAgaWYgKHJlc3VsdCA9PSBudWxsICYmIGVudi5jb21waWxlKSB7XG4gICAgICBvcHRpb25zLnBhcnRpYWxzW29wdGlvbnMubmFtZV0gPSBlbnYuY29tcGlsZShcbiAgICAgICAgcGFydGlhbCxcbiAgICAgICAgdGVtcGxhdGVTcGVjLmNvbXBpbGVyT3B0aW9ucyxcbiAgICAgICAgZW52XG4gICAgICApO1xuICAgICAgcmVzdWx0ID0gb3B0aW9ucy5wYXJ0aWFsc1tvcHRpb25zLm5hbWVdKGNvbnRleHQsIGV4dGVuZGVkT3B0aW9ucyk7XG4gICAgfVxuICAgIGlmIChyZXN1bHQgIT0gbnVsbCkge1xuICAgICAgaWYgKG9wdGlvbnMuaW5kZW50KSB7XG4gICAgICAgIGxldCBsaW5lcyA9IHJlc3VsdC5zcGxpdCgnXFxuJyk7XG4gICAgICAgIGZvciAobGV0IGkgPSAwLCBsID0gbGluZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgaWYgKCFsaW5lc1tpXSAmJiBpICsgMSA9PT0gbCkge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgbGluZXNbaV0gPSBvcHRpb25zLmluZGVudCArIGxpbmVzW2ldO1xuICAgICAgICB9XG4gICAgICAgIHJlc3VsdCA9IGxpbmVzLmpvaW4oJ1xcbicpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihcbiAgICAgICAgJ1RoZSBwYXJ0aWFsICcgK1xuICAgICAgICAgIG9wdGlvbnMubmFtZSArXG4gICAgICAgICAgJyBjb3VsZCBub3QgYmUgY29tcGlsZWQgd2hlbiBydW5uaW5nIGluIHJ1bnRpbWUtb25seSBtb2RlJ1xuICAgICAgKTtcbiAgICB9XG4gIH1cblxuICAvLyBKdXN0IGFkZCB3YXRlclxuICBsZXQgY29udGFpbmVyID0ge1xuICAgIHN0cmljdDogZnVuY3Rpb24ob2JqLCBuYW1lLCBsb2MpIHtcbiAgICAgIGlmICghb2JqIHx8ICEobmFtZSBpbiBvYmopKSB7XG4gICAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ1wiJyArIG5hbWUgKyAnXCIgbm90IGRlZmluZWQgaW4gJyArIG9iaiwge1xuICAgICAgICAgIGxvYzogbG9jXG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgcmV0dXJuIG9ialtuYW1lXTtcbiAgICB9LFxuICAgIGxvb2t1cFByb3BlcnR5OiBmdW5jdGlvbihwYXJlbnQsIHByb3BlcnR5TmFtZSkge1xuICAgICAgbGV0IHJlc3VsdCA9IHBhcmVudFtwcm9wZXJ0eU5hbWVdO1xuICAgICAgaWYgKHJlc3VsdCA9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG4gICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHBhcmVudCwgcHJvcGVydHlOYW1lKSkge1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfVxuXG4gICAgICBpZiAocmVzdWx0SXNBbGxvd2VkKHJlc3VsdCwgY29udGFpbmVyLnByb3RvQWNjZXNzQ29udHJvbCwgcHJvcGVydHlOYW1lKSkge1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfVxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9LFxuICAgIGxvb2t1cDogZnVuY3Rpb24oZGVwdGhzLCBuYW1lKSB7XG4gICAgICBjb25zdCBsZW4gPSBkZXB0aHMubGVuZ3RoO1xuICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW47IGkrKykge1xuICAgICAgICBsZXQgcmVzdWx0ID0gZGVwdGhzW2ldICYmIGNvbnRhaW5lci5sb29rdXBQcm9wZXJ0eShkZXB0aHNbaV0sIG5hbWUpO1xuICAgICAgICBpZiAocmVzdWx0ICE9IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gZGVwdGhzW2ldW25hbWVdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcbiAgICBsYW1iZGE6IGZ1bmN0aW9uKGN1cnJlbnQsIGNvbnRleHQpIHtcbiAgICAgIHJldHVybiB0eXBlb2YgY3VycmVudCA9PT0gJ2Z1bmN0aW9uJyA/IGN1cnJlbnQuY2FsbChjb250ZXh0KSA6IGN1cnJlbnQ7XG4gICAgfSxcblxuICAgIGVzY2FwZUV4cHJlc3Npb246IFV0aWxzLmVzY2FwZUV4cHJlc3Npb24sXG4gICAgaW52b2tlUGFydGlhbDogaW52b2tlUGFydGlhbFdyYXBwZXIsXG5cbiAgICBmbjogZnVuY3Rpb24oaSkge1xuICAgICAgbGV0IHJldCA9IHRlbXBsYXRlU3BlY1tpXTtcbiAgICAgIHJldC5kZWNvcmF0b3IgPSB0ZW1wbGF0ZVNwZWNbaSArICdfZCddO1xuICAgICAgcmV0dXJuIHJldDtcbiAgICB9LFxuXG4gICAgcHJvZ3JhbXM6IFtdLFxuICAgIHByb2dyYW06IGZ1bmN0aW9uKGksIGRhdGEsIGRlY2xhcmVkQmxvY2tQYXJhbXMsIGJsb2NrUGFyYW1zLCBkZXB0aHMpIHtcbiAgICAgIGxldCBwcm9ncmFtV3JhcHBlciA9IHRoaXMucHJvZ3JhbXNbaV0sXG4gICAgICAgIGZuID0gdGhpcy5mbihpKTtcbiAgICAgIGlmIChkYXRhIHx8IGRlcHRocyB8fCBibG9ja1BhcmFtcyB8fCBkZWNsYXJlZEJsb2NrUGFyYW1zKSB7XG4gICAgICAgIHByb2dyYW1XcmFwcGVyID0gd3JhcFByb2dyYW0oXG4gICAgICAgICAgdGhpcyxcbiAgICAgICAgICBpLFxuICAgICAgICAgIGZuLFxuICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgZGVjbGFyZWRCbG9ja1BhcmFtcyxcbiAgICAgICAgICBibG9ja1BhcmFtcyxcbiAgICAgICAgICBkZXB0aHNcbiAgICAgICAgKTtcbiAgICAgIH0gZWxzZSBpZiAoIXByb2dyYW1XcmFwcGVyKSB7XG4gICAgICAgIHByb2dyYW1XcmFwcGVyID0gdGhpcy5wcm9ncmFtc1tpXSA9IHdyYXBQcm9ncmFtKHRoaXMsIGksIGZuKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBwcm9ncmFtV3JhcHBlcjtcbiAgICB9LFxuXG4gICAgZGF0YTogZnVuY3Rpb24odmFsdWUsIGRlcHRoKSB7XG4gICAgICB3aGlsZSAodmFsdWUgJiYgZGVwdGgtLSkge1xuICAgICAgICB2YWx1ZSA9IHZhbHVlLl9wYXJlbnQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gdmFsdWU7XG4gICAgfSxcbiAgICBtZXJnZUlmTmVlZGVkOiBmdW5jdGlvbihwYXJhbSwgY29tbW9uKSB7XG4gICAgICBsZXQgb2JqID0gcGFyYW0gfHwgY29tbW9uO1xuXG4gICAgICBpZiAocGFyYW0gJiYgY29tbW9uICYmIHBhcmFtICE9PSBjb21tb24pIHtcbiAgICAgICAgb2JqID0gVXRpbHMuZXh0ZW5kKHt9LCBjb21tb24sIHBhcmFtKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG9iajtcbiAgICB9LFxuICAgIC8vIEFuIGVtcHR5IG9iamVjdCB0byB1c2UgYXMgcmVwbGFjZW1lbnQgZm9yIG51bGwtY29udGV4dHNcbiAgICBudWxsQ29udGV4dDogT2JqZWN0LnNlYWwoe30pLFxuXG4gICAgbm9vcDogZW52LlZNLm5vb3AsXG4gICAgY29tcGlsZXJJbmZvOiB0ZW1wbGF0ZVNwZWMuY29tcGlsZXJcbiAgfTtcblxuICBmdW5jdGlvbiByZXQoY29udGV4dCwgb3B0aW9ucyA9IHt9KSB7XG4gICAgbGV0IGRhdGEgPSBvcHRpb25zLmRhdGE7XG5cbiAgICByZXQuX3NldHVwKG9wdGlvbnMpO1xuICAgIGlmICghb3B0aW9ucy5wYXJ0aWFsICYmIHRlbXBsYXRlU3BlYy51c2VEYXRhKSB7XG4gICAgICBkYXRhID0gaW5pdERhdGEoY29udGV4dCwgZGF0YSk7XG4gICAgfVxuICAgIGxldCBkZXB0aHMsXG4gICAgICBibG9ja1BhcmFtcyA9IHRlbXBsYXRlU3BlYy51c2VCbG9ja1BhcmFtcyA/IFtdIDogdW5kZWZpbmVkO1xuICAgIGlmICh0ZW1wbGF0ZVNwZWMudXNlRGVwdGhzKSB7XG4gICAgICBpZiAob3B0aW9ucy5kZXB0aHMpIHtcbiAgICAgICAgZGVwdGhzID1cbiAgICAgICAgICBjb250ZXh0ICE9IG9wdGlvbnMuZGVwdGhzWzBdXG4gICAgICAgICAgICA/IFtjb250ZXh0XS5jb25jYXQob3B0aW9ucy5kZXB0aHMpXG4gICAgICAgICAgICA6IG9wdGlvbnMuZGVwdGhzO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVwdGhzID0gW2NvbnRleHRdO1xuICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIG1haW4oY29udGV4dCAvKiwgb3B0aW9ucyovKSB7XG4gICAgICByZXR1cm4gKFxuICAgICAgICAnJyArXG4gICAgICAgIHRlbXBsYXRlU3BlYy5tYWluKFxuICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICBjb250ZXh0LFxuICAgICAgICAgIGNvbnRhaW5lci5oZWxwZXJzLFxuICAgICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyxcbiAgICAgICAgICBkYXRhLFxuICAgICAgICAgIGJsb2NrUGFyYW1zLFxuICAgICAgICAgIGRlcHRoc1xuICAgICAgICApXG4gICAgICApO1xuICAgIH1cblxuICAgIG1haW4gPSBleGVjdXRlRGVjb3JhdG9ycyhcbiAgICAgIHRlbXBsYXRlU3BlYy5tYWluLFxuICAgICAgbWFpbixcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIG9wdGlvbnMuZGVwdGhzIHx8IFtdLFxuICAgICAgZGF0YSxcbiAgICAgIGJsb2NrUGFyYW1zXG4gICAgKTtcbiAgICByZXR1cm4gbWFpbihjb250ZXh0LCBvcHRpb25zKTtcbiAgfVxuXG4gIHJldC5pc1RvcCA9IHRydWU7XG5cbiAgcmV0Ll9zZXR1cCA9IGZ1bmN0aW9uKG9wdGlvbnMpIHtcbiAgICBpZiAoIW9wdGlvbnMucGFydGlhbCkge1xuICAgICAgbGV0IG1lcmdlZEhlbHBlcnMgPSBVdGlscy5leHRlbmQoe30sIGVudi5oZWxwZXJzLCBvcHRpb25zLmhlbHBlcnMpO1xuICAgICAgd3JhcEhlbHBlcnNUb1Bhc3NMb29rdXBQcm9wZXJ0eShtZXJnZWRIZWxwZXJzLCBjb250YWluZXIpO1xuICAgICAgY29udGFpbmVyLmhlbHBlcnMgPSBtZXJnZWRIZWxwZXJzO1xuXG4gICAgICBpZiAodGVtcGxhdGVTcGVjLnVzZVBhcnRpYWwpIHtcbiAgICAgICAgLy8gVXNlIG1lcmdlSWZOZWVkZWQgaGVyZSB0byBwcmV2ZW50IGNvbXBpbGluZyBnbG9iYWwgcGFydGlhbHMgbXVsdGlwbGUgdGltZXNcbiAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gY29udGFpbmVyLm1lcmdlSWZOZWVkZWQoXG4gICAgICAgICAgb3B0aW9ucy5wYXJ0aWFscyxcbiAgICAgICAgICBlbnYucGFydGlhbHNcbiAgICAgICAgKTtcbiAgICAgIH1cbiAgICAgIGlmICh0ZW1wbGF0ZVNwZWMudXNlUGFydGlhbCB8fCB0ZW1wbGF0ZVNwZWMudXNlRGVjb3JhdG9ycykge1xuICAgICAgICBjb250YWluZXIuZGVjb3JhdG9ycyA9IFV0aWxzLmV4dGVuZChcbiAgICAgICAgICB7fSxcbiAgICAgICAgICBlbnYuZGVjb3JhdG9ycyxcbiAgICAgICAgICBvcHRpb25zLmRlY29yYXRvcnNcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29udGFpbmVyLmhvb2tzID0ge307XG4gICAgICBjb250YWluZXIucHJvdG9BY2Nlc3NDb250cm9sID0gY3JlYXRlUHJvdG9BY2Nlc3NDb250cm9sKG9wdGlvbnMpO1xuXG4gICAgICBsZXQga2VlcEhlbHBlckluSGVscGVycyA9XG4gICAgICAgIG9wdGlvbnMuYWxsb3dDYWxsc1RvSGVscGVyTWlzc2luZyB8fFxuICAgICAgICB0ZW1wbGF0ZVdhc1ByZWNvbXBpbGVkV2l0aENvbXBpbGVyVjc7XG4gICAgICBtb3ZlSGVscGVyVG9Ib29rcyhjb250YWluZXIsICdoZWxwZXJNaXNzaW5nJywga2VlcEhlbHBlckluSGVscGVycyk7XG4gICAgICBtb3ZlSGVscGVyVG9Ib29rcyhjb250YWluZXIsICdibG9ja0hlbHBlck1pc3NpbmcnLCBrZWVwSGVscGVySW5IZWxwZXJzKTtcbiAgICB9IGVsc2Uge1xuICAgICAgY29udGFpbmVyLnByb3RvQWNjZXNzQ29udHJvbCA9IG9wdGlvbnMucHJvdG9BY2Nlc3NDb250cm9sOyAvLyBpbnRlcm5hbCBvcHRpb25cbiAgICAgIGNvbnRhaW5lci5oZWxwZXJzID0gb3B0aW9ucy5oZWxwZXJzO1xuICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gb3B0aW9ucy5wYXJ0aWFscztcbiAgICAgIGNvbnRhaW5lci5kZWNvcmF0b3JzID0gb3B0aW9ucy5kZWNvcmF0b3JzO1xuICAgICAgY29udGFpbmVyLmhvb2tzID0gb3B0aW9ucy5ob29rcztcbiAgICB9XG4gIH07XG5cbiAgcmV0Ll9jaGlsZCA9IGZ1bmN0aW9uKGksIGRhdGEsIGJsb2NrUGFyYW1zLCBkZXB0aHMpIHtcbiAgICBpZiAodGVtcGxhdGVTcGVjLnVzZUJsb2NrUGFyYW1zICYmICFibG9ja1BhcmFtcykge1xuICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignbXVzdCBwYXNzIGJsb2NrIHBhcmFtcycpO1xuICAgIH1cbiAgICBpZiAodGVtcGxhdGVTcGVjLnVzZURlcHRocyAmJiAhZGVwdGhzKSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCdtdXN0IHBhc3MgcGFyZW50IGRlcHRocycpO1xuICAgIH1cblxuICAgIHJldHVybiB3cmFwUHJvZ3JhbShcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIGksXG4gICAgICB0ZW1wbGF0ZVNwZWNbaV0sXG4gICAgICBkYXRhLFxuICAgICAgMCxcbiAgICAgIGJsb2NrUGFyYW1zLFxuICAgICAgZGVwdGhzXG4gICAgKTtcbiAgfTtcbiAgcmV0dXJuIHJldDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHdyYXBQcm9ncmFtKFxuICBjb250YWluZXIsXG4gIGksXG4gIGZuLFxuICBkYXRhLFxuICBkZWNsYXJlZEJsb2NrUGFyYW1zLFxuICBibG9ja1BhcmFtcyxcbiAgZGVwdGhzXG4pIHtcbiAgZnVuY3Rpb24gcHJvZyhjb250ZXh0LCBvcHRpb25zID0ge30pIHtcbiAgICBsZXQgY3VycmVudERlcHRocyA9IGRlcHRocztcbiAgICBpZiAoXG4gICAgICBkZXB0aHMgJiZcbiAgICAgIGNvbnRleHQgIT0gZGVwdGhzWzBdICYmXG4gICAgICAhKGNvbnRleHQgPT09IGNvbnRhaW5lci5udWxsQ29udGV4dCAmJiBkZXB0aHNbMF0gPT09IG51bGwpXG4gICAgKSB7XG4gICAgICBjdXJyZW50RGVwdGhzID0gW2NvbnRleHRdLmNvbmNhdChkZXB0aHMpO1xuICAgIH1cblxuICAgIHJldHVybiBmbihcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIGNvbnRleHQsXG4gICAgICBjb250YWluZXIuaGVscGVycyxcbiAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyxcbiAgICAgIG9wdGlvbnMuZGF0YSB8fCBkYXRhLFxuICAgICAgYmxvY2tQYXJhbXMgJiYgW29wdGlvbnMuYmxvY2tQYXJhbXNdLmNvbmNhdChibG9ja1BhcmFtcyksXG4gICAgICBjdXJyZW50RGVwdGhzXG4gICAgKTtcbiAgfVxuXG4gIHByb2cgPSBleGVjdXRlRGVjb3JhdG9ycyhmbiwgcHJvZywgY29udGFpbmVyLCBkZXB0aHMsIGRhdGEsIGJsb2NrUGFyYW1zKTtcblxuICBwcm9nLnByb2dyYW0gPSBpO1xuICBwcm9nLmRlcHRoID0gZGVwdGhzID8gZGVwdGhzLmxlbmd0aCA6IDA7XG4gIHByb2cuYmxvY2tQYXJhbXMgPSBkZWNsYXJlZEJsb2NrUGFyYW1zIHx8IDA7XG4gIHJldHVybiBwcm9nO1xufVxuXG4vKipcbiAqIFRoaXMgaXMgY3VycmVudGx5IHBhcnQgb2YgdGhlIG9mZmljaWFsIEFQSSwgdGhlcmVmb3JlIGltcGxlbWVudGF0aW9uIGRldGFpbHMgc2hvdWxkIG5vdCBiZSBjaGFuZ2VkLlxuICovXG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZVBhcnRpYWwocGFydGlhbCwgY29udGV4dCwgb3B0aW9ucykge1xuICBpZiAoIXBhcnRpYWwpIHtcbiAgICBpZiAob3B0aW9ucy5uYW1lID09PSAnQHBhcnRpYWwtYmxvY2snKSB7XG4gICAgICBwYXJ0aWFsID0gb3B0aW9ucy5kYXRhWydwYXJ0aWFsLWJsb2NrJ107XG4gICAgfSBlbHNlIHtcbiAgICAgIHBhcnRpYWwgPSBvcHRpb25zLnBhcnRpYWxzW29wdGlvbnMubmFtZV07XG4gICAgfVxuICB9IGVsc2UgaWYgKCFwYXJ0aWFsLmNhbGwgJiYgIW9wdGlvbnMubmFtZSkge1xuICAgIC8vIFRoaXMgaXMgYSBkeW5hbWljIHBhcnRpYWwgdGhhdCByZXR1cm5lZCBhIHN0cmluZ1xuICAgIG9wdGlvbnMubmFtZSA9IHBhcnRpYWw7XG4gICAgcGFydGlhbCA9IG9wdGlvbnMucGFydGlhbHNbcGFydGlhbF07XG4gIH1cbiAgcmV0dXJuIHBhcnRpYWw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpbnZva2VQYXJ0aWFsKHBhcnRpYWwsIGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgLy8gVXNlIHRoZSBjdXJyZW50IGNsb3N1cmUgY29udGV4dCB0byBzYXZlIHRoZSBwYXJ0aWFsLWJsb2NrIGlmIHRoaXMgcGFydGlhbFxuICBjb25zdCBjdXJyZW50UGFydGlhbEJsb2NrID0gb3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuZGF0YVsncGFydGlhbC1ibG9jayddO1xuICBvcHRpb25zLnBhcnRpYWwgPSB0cnVlO1xuICBpZiAob3B0aW9ucy5pZHMpIHtcbiAgICBvcHRpb25zLmRhdGEuY29udGV4dFBhdGggPSBvcHRpb25zLmlkc1swXSB8fCBvcHRpb25zLmRhdGEuY29udGV4dFBhdGg7XG4gIH1cblxuICBsZXQgcGFydGlhbEJsb2NrO1xuICBpZiAob3B0aW9ucy5mbiAmJiBvcHRpb25zLmZuICE9PSBub29wKSB7XG4gICAgb3B0aW9ucy5kYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAvLyBXcmFwcGVyIGZ1bmN0aW9uIHRvIGdldCBhY2Nlc3MgdG8gY3VycmVudFBhcnRpYWxCbG9jayBmcm9tIHRoZSBjbG9zdXJlXG4gICAgbGV0IGZuID0gb3B0aW9ucy5mbjtcbiAgICBwYXJ0aWFsQmxvY2sgPSBvcHRpb25zLmRhdGFbJ3BhcnRpYWwtYmxvY2snXSA9IGZ1bmN0aW9uIHBhcnRpYWxCbG9ja1dyYXBwZXIoXG4gICAgICBjb250ZXh0LFxuICAgICAgb3B0aW9ucyA9IHt9XG4gICAgKSB7XG4gICAgICAvLyBSZXN0b3JlIHRoZSBwYXJ0aWFsLWJsb2NrIGZyb20gdGhlIGNsb3N1cmUgZm9yIHRoZSBleGVjdXRpb24gb2YgdGhlIGJsb2NrXG4gICAgICAvLyBpLmUuIHRoZSBwYXJ0IGluc2lkZSB0aGUgYmxvY2sgb2YgdGhlIHBhcnRpYWwgY2FsbC5cbiAgICAgIG9wdGlvbnMuZGF0YSA9IGNyZWF0ZUZyYW1lKG9wdGlvbnMuZGF0YSk7XG4gICAgICBvcHRpb25zLmRhdGFbJ3BhcnRpYWwtYmxvY2snXSA9IGN1cnJlbnRQYXJ0aWFsQmxvY2s7XG4gICAgICByZXR1cm4gZm4oY29udGV4dCwgb3B0aW9ucyk7XG4gICAgfTtcbiAgICBpZiAoZm4ucGFydGlhbHMpIHtcbiAgICAgIG9wdGlvbnMucGFydGlhbHMgPSBVdGlscy5leHRlbmQoe30sIG9wdGlvbnMucGFydGlhbHMsIGZuLnBhcnRpYWxzKTtcbiAgICB9XG4gIH1cblxuICBpZiAocGFydGlhbCA9PT0gdW5kZWZpbmVkICYmIHBhcnRpYWxCbG9jaykge1xuICAgIHBhcnRpYWwgPSBwYXJ0aWFsQmxvY2s7XG4gIH1cblxuICBpZiAocGFydGlhbCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignVGhlIHBhcnRpYWwgJyArIG9wdGlvbnMubmFtZSArICcgY291bGQgbm90IGJlIGZvdW5kJyk7XG4gIH0gZWxzZSBpZiAocGFydGlhbCBpbnN0YW5jZW9mIEZ1bmN0aW9uKSB7XG4gICAgcmV0dXJuIHBhcnRpYWwoY29udGV4dCwgb3B0aW9ucyk7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vb3AoKSB7XG4gIHJldHVybiAnJztcbn1cblxuZnVuY3Rpb24gaW5pdERhdGEoY29udGV4dCwgZGF0YSkge1xuICBpZiAoIWRhdGEgfHwgISgncm9vdCcgaW4gZGF0YSkpIHtcbiAgICBkYXRhID0gZGF0YSA/IGNyZWF0ZUZyYW1lKGRhdGEpIDoge307XG4gICAgZGF0YS5yb290ID0gY29udGV4dDtcbiAgfVxuICByZXR1cm4gZGF0YTtcbn1cblxuZnVuY3Rpb24gZXhlY3V0ZURlY29yYXRvcnMoZm4sIHByb2csIGNvbnRhaW5lciwgZGVwdGhzLCBkYXRhLCBibG9ja1BhcmFtcykge1xuICBpZiAoZm4uZGVjb3JhdG9yKSB7XG4gICAgbGV0IHByb3BzID0ge307XG4gICAgcHJvZyA9IGZuLmRlY29yYXRvcihcbiAgICAgIHByb2csXG4gICAgICBwcm9wcyxcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIGRlcHRocyAmJiBkZXB0aHNbMF0sXG4gICAgICBkYXRhLFxuICAgICAgYmxvY2tQYXJhbXMsXG4gICAgICBkZXB0aHNcbiAgICApO1xuICAgIFV0aWxzLmV4dGVuZChwcm9nLCBwcm9wcyk7XG4gIH1cbiAgcmV0dXJuIHByb2c7XG59XG5cbmZ1bmN0aW9uIHdyYXBIZWxwZXJzVG9QYXNzTG9va3VwUHJvcGVydHkobWVyZ2VkSGVscGVycywgY29udGFpbmVyKSB7XG4gIE9iamVjdC5rZXlzKG1lcmdlZEhlbHBlcnMpLmZvckVhY2goaGVscGVyTmFtZSA9PiB7XG4gICAgbGV0IGhlbHBlciA9IG1lcmdlZEhlbHBlcnNbaGVscGVyTmFtZV07XG4gICAgbWVyZ2VkSGVscGVyc1toZWxwZXJOYW1lXSA9IHBhc3NMb29rdXBQcm9wZXJ0eU9wdGlvbihoZWxwZXIsIGNvbnRhaW5lcik7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBwYXNzTG9va3VwUHJvcGVydHlPcHRpb24oaGVscGVyLCBjb250YWluZXIpIHtcbiAgY29uc3QgbG9va3VwUHJvcGVydHkgPSBjb250YWluZXIubG9va3VwUHJvcGVydHk7XG4gIHJldHVybiB3cmFwSGVscGVyKGhlbHBlciwgb3B0aW9ucyA9PiB7XG4gICAgcmV0dXJuIFV0aWxzLmV4dGVuZCh7IGxvb2t1cFByb3BlcnR5IH0sIG9wdGlvbnMpO1xuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\wrapHelper.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js",
"index": 22,
"index2": 18,
"size": 2192,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"issuerId": 21,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 21,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 491,
"building": 8
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./internal/wrapHelper",
"loc": "30:26-58"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.wrapHelper = wrapHelper;\n\nfunction wrapHelper(helper, transformOptionsFn) {\n if (typeof helper !== 'function') {\n // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639\n // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.\n return helper;\n }\n var wrapper = function wrapper() /* dynamic arguments */{\n var options = arguments[arguments.length - 1];\n arguments[arguments.length - 1] = transformOptionsFn(options);\n return helper.apply(this, arguments);\n };\n return wrapper;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3dyYXBIZWxwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBTyxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUUsa0JBQWtCLEVBQUU7QUFDckQsTUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLEVBQUU7OztBQUdoQyxXQUFPLE1BQU0sQ0FBQztHQUNmO0FBQ0QsTUFBSSxPQUFPLEdBQUcsU0FBVixPQUFPLDBCQUFxQztBQUM5QyxRQUFNLE9BQU8sR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztBQUNoRCxhQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsR0FBRyxrQkFBa0IsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUM5RCxXQUFPLE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0dBQ3RDLENBQUM7QUFDRixTQUFPLE9BQU8sQ0FBQztDQUNoQiIsImZpbGUiOiJ3cmFwSGVscGVyLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIHdyYXBIZWxwZXIoaGVscGVyLCB0cmFuc2Zvcm1PcHRpb25zRm4pIHtcbiAgaWYgKHR5cGVvZiBoZWxwZXIgIT09ICdmdW5jdGlvbicpIHtcbiAgICAvLyBUaGlzIHNob3VsZCBub3QgaGFwcGVuLCBidXQgYXBwYXJlbnRseSBpdCBkb2VzIGluIGh0dHBzOi8vZ2l0aHViLmNvbS93eWNhdHMvaGFuZGxlYmFycy5qcy9pc3N1ZXMvMTYzOVxuICAgIC8vIFdlIHRyeSB0byBtYWtlIHRoZSB3cmFwcGVyIGxlYXN0LWludmFzaXZlIGJ5IG5vdCB3cmFwcGluZyBpdCwgaWYgdGhlIGhlbHBlciBpcyBub3QgYSBmdW5jdGlvbi5cbiAgICByZXR1cm4gaGVscGVyO1xuICB9XG4gIGxldCB3cmFwcGVyID0gZnVuY3Rpb24oLyogZHluYW1pYyBhcmd1bWVudHMgKi8pIHtcbiAgICBjb25zdCBvcHRpb25zID0gYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXTtcbiAgICBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDFdID0gdHJhbnNmb3JtT3B0aW9uc0ZuKG9wdGlvbnMpO1xuICAgIHJldHVybiBoZWxwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgfTtcbiAgcmV0dXJuIHdyYXBwZXI7XG59XG4iXX0=\n"
},
{
"id": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"index": 23,
"index2": 20,
"size": 1532,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/no-conflict",
"loc": "35:28-63"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\n\nexports['default'] = function (Handlebars) {\n /* istanbul ignore next */\n var root = typeof global !== 'undefined' ? global : window,\n $Handlebars = root.Handlebars;\n /* istanbul ignore next */\n Handlebars.noConflict = function () {\n if (root.Handlebars === Handlebars) {\n root.Handlebars = $Handlebars;\n }\n return Handlebars;\n };\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxVQUFVLEVBQUU7O0FBRWxDLE1BQUksSUFBSSxHQUFHLE9BQU8sTUFBTSxLQUFLLFdBQVcsR0FBRyxNQUFNLEdBQUcsTUFBTTtNQUN4RCxXQUFXLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQzs7QUFFaEMsWUFBVSxDQUFDLFVBQVUsR0FBRyxZQUFXO0FBQ2pDLFFBQUksSUFBSSxDQUFDLFVBQVUsS0FBSyxVQUFVLEVBQUU7QUFDbEMsVUFBSSxDQUFDLFVBQVUsR0FBRyxXQUFXLENBQUM7S0FDL0I7QUFDRCxXQUFPLFVBQVUsQ0FBQztHQUNuQixDQUFDO0NBQ0giLCJmaWxlIjoibm8tY29uZmxpY3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihIYW5kbGViYXJzKSB7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIGxldCByb290ID0gdHlwZW9mIGdsb2JhbCAhPT0gJ3VuZGVmaW5lZCcgPyBnbG9iYWwgOiB3aW5kb3csXG4gICAgJEhhbmRsZWJhcnMgPSByb290LkhhbmRsZWJhcnM7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIEhhbmRsZWJhcnMubm9Db25mbGljdCA9IGZ1bmN0aW9uKCkge1xuICAgIGlmIChyb290LkhhbmRsZWJhcnMgPT09IEhhbmRsZWJhcnMpIHtcbiAgICAgIHJvb3QuSGFuZGxlYmFycyA9ICRIYW5kbGViYXJzO1xuICAgIH1cbiAgICByZXR1cm4gSGFuZGxlYmFycztcbiAgfTtcbn1cbiJdfQ==\n"
}
],
"filteredModules": 0,
"origins": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "",
"request": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"reasons": []
}
]
}
],
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\utils.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/utils.js",
"index": 4,
"index2": 0,
"size": 10309,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./utils",
"loc": "9:13-31"
},
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\logger.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/logger.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/logger.js",
"type": "cjs require",
"userRequest": "./utils",
"loc": "5:13-31"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/utils",
"loc": "27:23-52"
},
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\block-helper-missing.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "5:13-32"
},
{
"moduleId": 11,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\each.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:13-32"
},
{
"moduleId": 13,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\if.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:13-32"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\with.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "8:13-32"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators\\inline.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "5:13-32"
},
{
"moduleId": 19,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\create-new-lookup-object.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js",
"type": "cjs require",
"userRequest": "../utils",
"loc": "6:13-32"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./utils",
"loc": "18:13-31"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.extend = extend;\nexports.indexOf = indexOf;\nexports.escapeExpression = escapeExpression;\nexports.isEmpty = isEmpty;\nexports.createFrame = createFrame;\nexports.blockParams = blockParams;\nexports.appendContextPath = appendContextPath;\nvar escape = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#x27;',\n '`': '&#x60;',\n '=': '&#x3D;'\n};\n\nvar badChars = /[&<>\"'`=]/g,\n possible = /[&<>\"'`=]/;\n\nfunction escapeChar(chr) {\n return escape[chr];\n}\n\nfunction extend(obj /* , ...source */) {\n for (var i = 1; i < arguments.length; i++) {\n for (var key in arguments[i]) {\n if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {\n obj[key] = arguments[i][key];\n }\n }\n }\n\n return obj;\n}\n\nvar toString = Object.prototype.toString;\n\nexports.toString = toString;\n// Sourced from lodash\n// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\n/* eslint-disable func-style */\nvar isFunction = function isFunction(value) {\n return typeof value === 'function';\n};\n// fallback for older versions of Chrome and Safari\n/* istanbul ignore next */\nif (isFunction(/x/)) {\n exports.isFunction = isFunction = function (value) {\n return typeof value === 'function' && toString.call(value) === '[object Function]';\n };\n}\nexports.isFunction = isFunction;\n\n/* eslint-enable func-style */\n\n/* istanbul ignore next */\nvar isArray = Array.isArray || function (value) {\n return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;\n};\n\nexports.isArray = isArray;\n// Older IE versions do not directly support indexOf so we must implement our own, sadly.\n\nfunction indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}\n\nfunction escapeExpression(string) {\n if (typeof string !== 'string') {\n // don't escape SafeStrings, since they're already safe\n if (string && string.toHTML) {\n return string.toHTML();\n } else if (string == null) {\n return '';\n } else if (!string) {\n return string + '';\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = '' + string;\n }\n\n if (!possible.test(string)) {\n return string;\n }\n return string.replace(badChars, escapeChar);\n}\n\nfunction isEmpty(value) {\n if (!value && value !== 0) {\n return true;\n } else if (isArray(value) && value.length === 0) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction createFrame(object) {\n var frame = extend({}, object);\n frame._parent = object;\n return frame;\n}\n\nfunction blockParams(params, ids) {\n params.path = ids;\n return params;\n}\n\nfunction appendContextPath(contextPath, id) {\n return (contextPath ? contextPath + '.' : '') + id;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxJQUFNLE1BQU0sR0FBRztBQUNiLEtBQUcsRUFBRSxPQUFPO0FBQ1osS0FBRyxFQUFFLE1BQU07QUFDWCxLQUFHLEVBQUUsTUFBTTtBQUNYLEtBQUcsRUFBRSxRQUFRO0FBQ2IsS0FBRyxFQUFFLFFBQVE7QUFDYixLQUFHLEVBQUUsUUFBUTtBQUNiLEtBQUcsRUFBRSxRQUFRO0NBQ2QsQ0FBQzs7QUFFRixJQUFNLFFBQVEsR0FBRyxZQUFZO0lBQzNCLFFBQVEsR0FBRyxXQUFXLENBQUM7O0FBRXpCLFNBQVMsVUFBVSxDQUFDLEdBQUcsRUFBRTtBQUN2QixTQUFPLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUNwQjs7QUFFTSxTQUFTLE1BQU0sQ0FBQyxHQUFHLG9CQUFvQjtBQUM1QyxPQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUN6QyxTQUFLLElBQUksR0FBRyxJQUFJLFNBQVMsQ0FBQyxDQUFDLENBQUMsRUFBRTtBQUM1QixVQUFJLE1BQU0sQ0FBQyxTQUFTLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLEVBQUUsR0FBRyxDQUFDLEVBQUU7QUFDM0QsV0FBRyxDQUFDLEdBQUcsQ0FBQyxHQUFHLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQztPQUM5QjtLQUNGO0dBQ0Y7O0FBRUQsU0FBTyxHQUFHLENBQUM7Q0FDWjs7QUFFTSxJQUFJLFFBQVEsR0FBRyxNQUFNLENBQUMsU0FBUyxDQUFDLFFBQVEsQ0FBQzs7Ozs7O0FBS2hELElBQUksVUFBVSxHQUFHLG9CQUFTLEtBQUssRUFBRTtBQUMvQixTQUFPLE9BQU8sS0FBSyxLQUFLLFVBQVUsQ0FBQztDQUNwQyxDQUFDOzs7QUFHRixJQUFJLFVBQVUsQ0FBQyxHQUFHLENBQUMsRUFBRTtBQUNuQixVQU9PLFVBQVUsR0FQakIsVUFBVSxHQUFHLFVBQVMsS0FBSyxFQUFFO0FBQzNCLFdBQ0UsT0FBTyxLQUFLLEtBQUssVUFBVSxJQUMzQixRQUFRLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLG1CQUFtQixDQUM1QztHQUNILENBQUM7Q0FDSDtRQUNRLFVBQVUsR0FBVixVQUFVOzs7OztBQUlaLElBQU0sT0FBTyxHQUNsQixLQUFLLENBQUMsT0FBTyxJQUNiLFVBQVMsS0FBSyxFQUFFO0FBQ2QsU0FBTyxLQUFLLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxHQUNyQyxRQUFRLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLGdCQUFnQixHQUN6QyxLQUFLLENBQUM7Q0FDWCxDQUFDOzs7OztBQUdHLFNBQVMsT0FBTyxDQUFDLEtBQUssRUFBRSxLQUFLLEVBQUU7QUFDcEMsT0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsR0FBRyxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLEdBQUcsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUNoRCxRQUFJLEtBQUssQ0FBQyxDQUFDLENBQUMsS0FBSyxLQUFLLEVBQUU7QUFDdEIsYUFBTyxDQUFDLENBQUM7S0FDVjtHQUNGO0FBQ0QsU0FBTyxDQUFDLENBQUMsQ0FBQztDQUNYOztBQUVNLFNBQVMsZ0JBQWdCLENBQUMsTUFBTSxFQUFFO0FBQ3ZDLE1BQUksT0FBTyxNQUFNLEtBQUssUUFBUSxFQUFFOztBQUU5QixRQUFJLE1BQU0sSUFBSSxNQUFNLENBQUMsTUFBTSxFQUFFO0FBQzNCLGFBQU8sTUFBTSxDQUFDLE1BQU0sRUFBRSxDQUFDO0tBQ3hCLE1BQU0sSUFBSSxNQUFNLElBQUksSUFBSSxFQUFFO0FBQ3pCLGFBQU8sRUFBRSxDQUFDO0tBQ1gsTUFBTSxJQUFJLENBQUMsTUFBTSxFQUFFO0FBQ2xCLGFBQU8sTUFBTSxHQUFHLEVBQUUsQ0FBQztLQUNwQjs7Ozs7QUFLRCxVQUFNLEdBQUcsRUFBRSxHQUFHLE1BQU0sQ0FBQztHQUN0Qjs7QUFFRCxNQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsRUFBRTtBQUMxQixXQUFPLE1BQU0sQ0FBQztHQUNmO0FBQ0QsU0FBTyxNQUFNLENBQUMsT0FBTyxDQUFDLFFBQVEsRUFBRSxVQUFVLENBQUMsQ0FBQztDQUM3Qzs7QUFFTSxTQUFTLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDN0IsTUFBSSxDQUFDLEtBQUssSUFBSSxLQUFLLEtBQUssQ0FBQyxFQUFFO0FBQ3pCLFdBQU8sSUFBSSxDQUFDO0dBQ2IsTUFBTSxJQUFJLE9BQU8sQ0FBQyxLQUFLLENBQUMsSUFBSSxLQUFLLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtBQUMvQyxXQUFPLElBQUksQ0FBQztHQUNiLE1BQU07QUFDTCxXQUFPLEtBQUssQ0FBQztHQUNkO0NBQ0Y7O0FBRU0sU0FBUyxXQUFXLENBQUMsTUFBTSxFQUFFO0FBQ2xDLE1BQUksS0FBSyxHQUFHLE1BQU0sQ0FBQyxFQUFFLEVBQUUsTUFBTSxDQUFDLENBQUM7QUFDL0IsT0FBSyxDQUFDLE9BQU8sR0FBRyxNQUFNLENBQUM7QUFDdkIsU0FBTyxLQUFLLENBQUM7Q0FDZDs7QUFFTSxTQUFTLFdBQVcsQ0FBQyxNQUFNLEVBQUUsR0FBRyxFQUFFO0FBQ3ZDLFFBQU0sQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFDO0FBQ2xCLFNBQU8sTUFBTSxDQUFDO0NBQ2Y7O0FBRU0sU0FBUyxpQkFBaUIsQ0FBQyxXQUFXLEVBQUUsRUFBRSxFQUFFO0FBQ2pELFNBQU8sQ0FBQyxXQUFXLEdBQUcsV0FBVyxHQUFHLEdBQUcsR0FBRyxFQUFFLENBQUEsR0FBSSxFQUFFLENBQUM7Q0FDcEQiLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBlc2NhcGUgPSB7XG4gICcmJzogJyZhbXA7JyxcbiAgJzwnOiAnJmx0OycsXG4gICc+JzogJyZndDsnLFxuICAnXCInOiAnJnF1b3Q7JyxcbiAgXCInXCI6ICcmI3gyNzsnLFxuICAnYCc6ICcmI3g2MDsnLFxuICAnPSc6ICcmI3gzRDsnXG59O1xuXG5jb25zdCBiYWRDaGFycyA9IC9bJjw+XCInYD1dL2csXG4gIHBvc3NpYmxlID0gL1smPD5cIidgPV0vO1xuXG5mdW5jdGlvbiBlc2NhcGVDaGFyKGNocikge1xuICByZXR1cm4gZXNjYXBlW2Nocl07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBleHRlbmQob2JqIC8qICwgLi4uc291cmNlICovKSB7XG4gIGZvciAobGV0IGkgPSAxOyBpIDwgYXJndW1lbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgZm9yIChsZXQga2V5IGluIGFyZ3VtZW50c1tpXSkge1xuICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChhcmd1bWVudHNbaV0sIGtleSkpIHtcbiAgICAgICAgb2JqW2tleV0gPSBhcmd1bWVudHNbaV1ba2V5XTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gb2JqO1xufVxuXG5leHBvcnQgbGV0IHRvU3RyaW5nID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZztcblxuLy8gU291cmNlZCBmcm9tIGxvZGFzaFxuLy8gaHR0cHM6Ly9naXRodWIuY29tL2Jlc3RpZWpzL2xvZGFzaC9ibG9iL21hc3Rlci9MSUNFTlNFLnR4dFxuLyogZXNsaW50LWRpc2FibGUgZnVuYy1zdHlsZSAqL1xubGV0IGlzRnVuY3Rpb24gPSBmdW5jdGlvbih2YWx1ZSkge1xuICByZXR1cm4gdHlwZW9mIHZhbHVlID09PSAnZnVuY3Rpb24nO1xufTtcbi8vIGZhbGxiYWNrIGZvciBvbGRlciB2ZXJzaW9ucyBvZiBDaHJvbWUgYW5kIFNhZmFyaVxuLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbmlmIChpc0Z1bmN0aW9uKC94LykpIHtcbiAgaXNGdW5jdGlvbiA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIHR5cGVvZiB2YWx1ZSA9PT0gJ2Z1bmN0aW9uJyAmJlxuICAgICAgdG9TdHJpbmcuY2FsbCh2YWx1ZSkgPT09ICdbb2JqZWN0IEZ1bmN0aW9uXSdcbiAgICApO1xuICB9O1xufVxuZXhwb3J0IHsgaXNGdW5jdGlvbiB9O1xuLyogZXNsaW50LWVuYWJsZSBmdW5jLXN0eWxlICovXG5cbi8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG5leHBvcnQgY29uc3QgaXNBcnJheSA9XG4gIEFycmF5LmlzQXJyYXkgfHxcbiAgZnVuY3Rpb24odmFsdWUpIHtcbiAgICByZXR1cm4gdmFsdWUgJiYgdHlwZW9mIHZhbHVlID09PSAnb2JqZWN0J1xuICAgICAgPyB0b1N0cmluZy5jYWxsKHZhbHVlKSA9PT0gJ1tvYmplY3QgQXJyYXldJ1xuICAgICAgOiBmYWxzZTtcbiAgfTtcblxuLy8gT2xkZXIgSUUgdmVyc2lvbnMgZG8gbm90IGRpcmVjdGx5IHN1cHBvcnQgaW5kZXhPZiBzbyB3ZSBtdXN0IGltcGxlbWVudCBvdXIgb3duLCBzYWRseS5cbmV4cG9ydCBmdW5jdGlvbiBpbmRleE9mKGFycmF5LCB2YWx1ZSkge1xuICBmb3IgKGxldCBpID0gMCwgbGVuID0gYXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBpZiAoYXJyYXlbaV0gPT09IHZhbHVlKSB7XG4gICAgICByZXR1cm4gaTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIC0xO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZXNjYXBlRXhwcmVzc2lvbihzdHJpbmcpIHtcbiAgaWYgKHR5cGVvZiBzdHJpbmcgIT09ICdzdHJpbmcnKSB7XG4gICAgLy8gZG9uJ3QgZXNjYXBlIFNhZmVTdHJpbmdzLCBzaW5jZSB0aGV5J3JlIGFscmVhZHkgc2FmZVxuICAgIGlmIChzdHJpbmcgJiYgc3RyaW5nLnRvSFRNTCkge1xuICAgICAgcmV0dXJuIHN0cmluZy50b0hUTUwoKTtcbiAgICB9IGVsc2UgaWYgKHN0cmluZyA9PSBudWxsKSB7XG4gICAgICByZXR1cm4gJyc7XG4gICAgfSBlbHNlIGlmICghc3RyaW5nKSB7XG4gICAgICByZXR1cm4gc3RyaW5nICsgJyc7XG4gICAgfVxuXG4gICAgLy8gRm9yY2UgYSBzdHJpbmcgY29udmVyc2lvbiBhcyB0aGlzIHdpbGwgYmUgZG9uZSBieSB0aGUgYXBwZW5kIHJlZ2FyZGxlc3MgYW5kXG4gICAgLy8gdGhlIHJlZ2V4IHRlc3Qgd2lsbCBkbyB0aGlzIHRyYW5zcGFyZW50bHkgYmVoaW5kIHRoZSBzY2VuZXMsIGNhdXNpbmcgaXNzdWVzIGlmXG4gICAgLy8gYW4gb2JqZWN0J3MgdG8gc3RyaW5nIGhhcyBlc2NhcGVkIGNoYXJhY3RlcnMgaW4gaXQuXG4gICAgc3RyaW5nID0gJycgKyBzdHJpbmc7XG4gIH1cblxuICBpZiAoIXBvc3NpYmxlLnRlc3Qoc3RyaW5nKSkge1xuICAgIHJldHVybiBzdHJpbmc7XG4gIH1cbiAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKGJhZENoYXJzLCBlc2NhcGVDaGFyKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzRW1wdHkodmFsdWUpIHtcbiAgaWYgKCF2YWx1ZSAmJiB2YWx1ZSAhPT0gMCkge1xuICAgIHJldHVybiB0cnVlO1xuICB9IGVsc2UgaWYgKGlzQXJyYXkodmFsdWUpICYmIHZhbHVlLmxlbmd0aCA9PT0gMCkge1xuICAgIHJldHVybiB0cnVlO1xuICB9IGVsc2Uge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlRnJhbWUob2JqZWN0KSB7XG4gIGxldCBmcmFtZSA9IGV4dGVuZCh7fSwgb2JqZWN0KTtcbiAgZnJhbWUuX3BhcmVudCA9IG9iamVjdDtcbiAgcmV0dXJuIGZyYW1lO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYmxvY2tQYXJhbXMocGFyYW1zLCBpZHMpIHtcbiAgcGFyYW1zLnBhdGggPSBpZHM7XG4gIHJldHVybiBwYXJhbXM7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcHBlbmRDb250ZXh0UGF0aChjb250ZXh0UGF0aCwgaWQpIHtcbiAgcmV0dXJuIChjb250ZXh0UGF0aCA/IGNvbnRleHRQYXRoICsgJy4nIDogJycpICsgaWQ7XG59XG4iXX0=\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\exception.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/exception.js",
"index": 5,
"index2": 1,
"size": 5950,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./exception",
"loc": "11:17-39"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/exception",
"loc": "23:27-60"
},
{
"moduleId": 11,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\each.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"type": "cjs require",
"userRequest": "../exception",
"loc": "10:17-40"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\helper-missing.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js",
"type": "cjs require",
"userRequest": "../exception",
"loc": "8:17-40"
},
{
"moduleId": 13,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\if.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"type": "cjs require",
"userRequest": "../exception",
"loc": "10:17-40"
},
{
"moduleId": 16,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\with.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"type": "cjs require",
"userRequest": "../exception",
"loc": "10:17-40"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./exception",
"loc": "22:17-39"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\nvar errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack'];\n\nfunction Exception(message, node) {\n var loc = node && node.loc,\n line = undefined,\n endLineNumber = undefined,\n column = undefined,\n endColumn = undefined;\n\n if (loc) {\n line = loc.start.line;\n endLineNumber = loc.end.line;\n column = loc.start.column;\n endColumn = loc.end.column;\n\n message += ' - ' + line + ':' + column;\n }\n\n var tmp = Error.prototype.constructor.call(this, message);\n\n // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.\n for (var idx = 0; idx < errorProps.length; idx++) {\n this[errorProps[idx]] = tmp[errorProps[idx]];\n }\n\n /* istanbul ignore else */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, Exception);\n }\n\n try {\n if (loc) {\n this.lineNumber = line;\n this.endLineNumber = endLineNumber;\n\n // Work around issue under safari where we can't directly set the column value\n /* istanbul ignore next */\n if (Object.defineProperty) {\n Object.defineProperty(this, 'column', {\n value: column,\n enumerable: true\n });\n Object.defineProperty(this, 'endColumn', {\n value: endColumn,\n enumerable: true\n });\n } else {\n this.column = column;\n this.endColumn = endColumn;\n }\n }\n } catch (nop) {\n /* Ignore if the browser is very particular */\n }\n}\n\nException.prototype = new Error();\n\nexports['default'] = Exception;\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxJQUFNLFVBQVUsR0FBRyxDQUNqQixhQUFhLEVBQ2IsVUFBVSxFQUNWLFlBQVksRUFDWixlQUFlLEVBQ2YsU0FBUyxFQUNULE1BQU0sRUFDTixRQUFRLEVBQ1IsT0FBTyxDQUNSLENBQUM7O0FBRUYsU0FBUyxTQUFTLENBQUMsT0FBTyxFQUFFLElBQUksRUFBRTtBQUNoQyxNQUFJLEdBQUcsR0FBRyxJQUFJLElBQUksSUFBSSxDQUFDLEdBQUc7TUFDeEIsSUFBSSxZQUFBO01BQ0osYUFBYSxZQUFBO01BQ2IsTUFBTSxZQUFBO01BQ04sU0FBUyxZQUFBLENBQUM7O0FBRVosTUFBSSxHQUFHLEVBQUU7QUFDUCxRQUFJLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUM7QUFDdEIsaUJBQWEsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQztBQUM3QixVQUFNLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUM7QUFDMUIsYUFBUyxHQUFHLEdBQUcsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDOztBQUUzQixXQUFPLElBQUksS0FBSyxHQUFHLElBQUksR0FBRyxHQUFHLEdBQUcsTUFBTSxDQUFDO0dBQ3hDOztBQUVELE1BQUksR0FBRyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLENBQUM7OztBQUcxRCxPQUFLLElBQUksR0FBRyxHQUFHLENBQUMsRUFBRSxHQUFHLEdBQUcsVUFBVSxDQUFDLE1BQU0sRUFBRSxHQUFHLEVBQUUsRUFBRTtBQUNoRCxRQUFJLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEdBQUcsR0FBRyxDQUFDLFVBQVUsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO0dBQzlDOzs7QUFHRCxNQUFJLEtBQUssQ0FBQyxpQkFBaUIsRUFBRTtBQUMzQixTQUFLLENBQUMsaUJBQWlCLENBQUMsSUFBSSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0dBQzFDOztBQUVELE1BQUk7QUFDRixRQUFJLEdBQUcsRUFBRTtBQUNQLFVBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFDO0FBQ3ZCLFVBQUksQ0FBQyxhQUFhLEdBQUcsYUFBYSxDQUFDOzs7O0FBSW5DLFVBQUksTUFBTSxDQUFDLGNBQWMsRUFBRTtBQUN6QixjQUFNLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxRQUFRLEVBQUU7QUFDcEMsZUFBSyxFQUFFLE1BQU07QUFDYixvQkFBVSxFQUFFLElBQUk7U0FDakIsQ0FBQyxDQUFDO0FBQ0gsY0FBTSxDQUFDLGNBQWMsQ0FBQyxJQUFJLEVBQUUsV0FBVyxFQUFFO0FBQ3ZDLGVBQUssRUFBRSxTQUFTO0FBQ2hCLG9CQUFVLEVBQUUsSUFBSTtTQUNqQixDQUFDLENBQUM7T0FDSixNQUFNO0FBQ0wsWUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7QUFDckIsWUFBSSxDQUFDLFNBQVMsR0FBRyxTQUFTLENBQUM7T0FDNUI7S0FDRjtHQUNGLENBQUMsT0FBTyxHQUFHLEVBQUU7O0dBRWI7Q0FDRjs7QUFFRCxTQUFTLENBQUMsU0FBUyxHQUFHLElBQUksS0FBSyxFQUFFLENBQUM7O3FCQUVuQixTQUFTIiwiZmlsZSI6ImV4Y2VwdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IGVycm9yUHJvcHMgPSBbXG4gICdkZXNjcmlwdGlvbicsXG4gICdmaWxlTmFtZScsXG4gICdsaW5lTnVtYmVyJyxcbiAgJ2VuZExpbmVOdW1iZXInLFxuICAnbWVzc2FnZScsXG4gICduYW1lJyxcbiAgJ251bWJlcicsXG4gICdzdGFjaydcbl07XG5cbmZ1bmN0aW9uIEV4Y2VwdGlvbihtZXNzYWdlLCBub2RlKSB7XG4gIGxldCBsb2MgPSBub2RlICYmIG5vZGUubG9jLFxuICAgIGxpbmUsXG4gICAgZW5kTGluZU51bWJlcixcbiAgICBjb2x1bW4sXG4gICAgZW5kQ29sdW1uO1xuXG4gIGlmIChsb2MpIHtcbiAgICBsaW5lID0gbG9jLnN0YXJ0LmxpbmU7XG4gICAgZW5kTGluZU51bWJlciA9IGxvYy5lbmQubGluZTtcbiAgICBjb2x1bW4gPSBsb2Muc3RhcnQuY29sdW1uO1xuICAgIGVuZENvbHVtbiA9IGxvYy5lbmQuY29sdW1uO1xuXG4gICAgbWVzc2FnZSArPSAnIC0gJyArIGxpbmUgKyAnOicgKyBjb2x1bW47XG4gIH1cblxuICBsZXQgdG1wID0gRXJyb3IucHJvdG90eXBlLmNvbnN0cnVjdG9yLmNhbGwodGhpcywgbWVzc2FnZSk7XG5cbiAgLy8gVW5mb3J0dW5hdGVseSBlcnJvcnMgYXJlIG5vdCBlbnVtZXJhYmxlIGluIENocm9tZSAoYXQgbGVhc3QpLCBzbyBgZm9yIHByb3AgaW4gdG1wYCBkb2Vzbid0IHdvcmsuXG4gIGZvciAobGV0IGlkeCA9IDA7IGlkeCA8IGVycm9yUHJvcHMubGVuZ3RoOyBpZHgrKykge1xuICAgIHRoaXNbZXJyb3JQcm9wc1tpZHhdXSA9IHRtcFtlcnJvclByb3BzW2lkeF1dO1xuICB9XG5cbiAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgaWYgKEVycm9yLmNhcHR1cmVTdGFja1RyYWNlKSB7XG4gICAgRXJyb3IuY2FwdHVyZVN0YWNrVHJhY2UodGhpcywgRXhjZXB0aW9uKTtcbiAgfVxuXG4gIHRyeSB7XG4gICAgaWYgKGxvYykge1xuICAgICAgdGhpcy5saW5lTnVtYmVyID0gbGluZTtcbiAgICAgIHRoaXMuZW5kTGluZU51bWJlciA9IGVuZExpbmVOdW1iZXI7XG5cbiAgICAgIC8vIFdvcmsgYXJvdW5kIGlzc3VlIHVuZGVyIHNhZmFyaSB3aGVyZSB3ZSBjYW4ndCBkaXJlY3RseSBzZXQgdGhlIGNvbHVtbiB2YWx1ZVxuICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgIGlmIChPYmplY3QuZGVmaW5lUHJvcGVydHkpIHtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRoaXMsICdjb2x1bW4nLCB7XG4gICAgICAgICAgdmFsdWU6IGNvbHVtbixcbiAgICAgICAgICBlbnVtZXJhYmxlOiB0cnVlXG4gICAgICAgIH0pO1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGhpcywgJ2VuZENvbHVtbicsIHtcbiAgICAgICAgICB2YWx1ZTogZW5kQ29sdW1uLFxuICAgICAgICAgIGVudW1lcmFibGU6IHRydWVcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgdGhpcy5lbmRDb2x1bW4gPSBlbmRDb2x1bW47XG4gICAgICB9XG4gICAgfVxuICB9IGNhdGNoIChub3ApIHtcbiAgICAvKiBJZ25vcmUgaWYgdGhlIGJyb3dzZXIgaXMgdmVyeSBwYXJ0aWN1bGFyICovXG4gIH1cbn1cblxuRXhjZXB0aW9uLnByb3RvdHlwZSA9IG5ldyBFcnJvcigpO1xuXG5leHBvcnQgZGVmYXVsdCBFeGNlcHRpb247XG4iXX0=\n"
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"index": 3,
"index2": 16,
"size": 9636,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/base",
"loc": "12:22-50"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./base",
"loc": "26:12-29"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.HandlebarsEnvironment = HandlebarsEnvironment;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utils = require('./utils');\n\nvar _exception = require('./exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nvar _helpers = require('./helpers');\n\nvar _decorators = require('./decorators');\n\nvar _logger = require('./logger');\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _internalProtoAccess = require('./internal/proto-access');\n\nvar VERSION = '4.7.6';\nexports.VERSION = VERSION;\nvar COMPILER_REVISION = 8;\nexports.COMPILER_REVISION = COMPILER_REVISION;\nvar LAST_COMPATIBLE_COMPILER_REVISION = 7;\n\nexports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;\nvar REVISION_CHANGES = {\n 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it\n 2: '== 1.0.0-rc.3',\n 3: '== 1.0.0-rc.4',\n 4: '== 1.x.x',\n 5: '== 2.0.0-alpha.x',\n 6: '>= 2.0.0-beta.1',\n 7: '>= 4.0.0 <4.3.0',\n 8: '>= 4.3.0'\n};\n\nexports.REVISION_CHANGES = REVISION_CHANGES;\nvar objectType = '[object Object]';\n\nfunction HandlebarsEnvironment(helpers, partials, decorators) {\n this.helpers = helpers || {};\n this.partials = partials || {};\n this.decorators = decorators || {};\n\n _helpers.registerDefaultHelpers(this);\n _decorators.registerDefaultDecorators(this);\n}\n\nHandlebarsEnvironment.prototype = {\n constructor: HandlebarsEnvironment,\n\n logger: _logger2['default'],\n log: _logger2['default'].log,\n\n registerHelper: function registerHelper(name, fn) {\n if (_utils.toString.call(name) === objectType) {\n if (fn) {\n throw new _exception2['default']('Arg not supported with multiple helpers');\n }\n _utils.extend(this.helpers, name);\n } else {\n this.helpers[name] = fn;\n }\n },\n unregisterHelper: function unregisterHelper(name) {\n delete this.helpers[name];\n },\n\n registerPartial: function registerPartial(name, partial) {\n if (_utils.toString.call(name) === objectType) {\n _utils.extend(this.partials, name);\n } else {\n if (typeof partial === 'undefined') {\n throw new _exception2['default']('Attempting to register a partial called \"' + name + '\" as undefined');\n }\n this.partials[name] = partial;\n }\n },\n unregisterPartial: function unregisterPartial(name) {\n delete this.partials[name];\n },\n\n registerDecorator: function registerDecorator(name, fn) {\n if (_utils.toString.call(name) === objectType) {\n if (fn) {\n throw new _exception2['default']('Arg not supported with multiple decorators');\n }\n _utils.extend(this.decorators, name);\n } else {\n this.decorators[name] = fn;\n }\n },\n unregisterDecorator: function unregisterDecorator(name) {\n delete this.decorators[name];\n },\n /**\n * Reset the memory of illegal property accesses that have already been logged.\n * @deprecated should only be used in handlebars test-cases\n */\n resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {\n _internalProtoAccess.resetLoggedProperties();\n }\n};\n\nvar log = _logger2['default'].log;\n\nexports.log = log;\nexports.createFrame = _utils.createFrame;\nexports.logger = _logger2['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7cUJBQThDLFNBQVM7O3lCQUNqQyxhQUFhOzs7O3VCQUNJLFdBQVc7OzBCQUNSLGNBQWM7O3NCQUNyQyxVQUFVOzs7O21DQUNTLHlCQUF5Qjs7QUFFeEQsSUFBTSxPQUFPLEdBQUcsT0FBTyxDQUFDOztBQUN4QixJQUFNLGlCQUFpQixHQUFHLENBQUMsQ0FBQzs7QUFDNUIsSUFBTSxpQ0FBaUMsR0FBRyxDQUFDLENBQUM7OztBQUU1QyxJQUFNLGdCQUFnQixHQUFHO0FBQzlCLEdBQUMsRUFBRSxhQUFhO0FBQ2hCLEdBQUMsRUFBRSxlQUFlO0FBQ2xCLEdBQUMsRUFBRSxlQUFlO0FBQ2xCLEdBQUMsRUFBRSxVQUFVO0FBQ2IsR0FBQyxFQUFFLGtCQUFrQjtBQUNyQixHQUFDLEVBQUUsaUJBQWlCO0FBQ3BCLEdBQUMsRUFBRSxpQkFBaUI7QUFDcEIsR0FBQyxFQUFFLFVBQVU7Q0FDZCxDQUFDOzs7QUFFRixJQUFNLFVBQVUsR0FBRyxpQkFBaUIsQ0FBQzs7QUFFOUIsU0FBUyxxQkFBcUIsQ0FBQyxPQUFPLEVBQUUsUUFBUSxFQUFFLFVBQVUsRUFBRTtBQUNuRSxNQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sSUFBSSxFQUFFLENBQUM7QUFDN0IsTUFBSSxDQUFDLFFBQVEsR0FBRyxRQUFRLElBQUksRUFBRSxDQUFDO0FBQy9CLE1BQUksQ0FBQyxVQUFVLEdBQUcsVUFBVSxJQUFJLEVBQUUsQ0FBQzs7QUFFbkMsa0NBQXVCLElBQUksQ0FBQyxDQUFDO0FBQzdCLHdDQUEwQixJQUFJLENBQUMsQ0FBQztDQUNqQzs7QUFFRCxxQkFBcUIsQ0FBQyxTQUFTLEdBQUc7QUFDaEMsYUFBVyxFQUFFLHFCQUFxQjs7QUFFbEMsUUFBTSxxQkFBUTtBQUNkLEtBQUcsRUFBRSxvQkFBTyxHQUFHOztBQUVmLGdCQUFjLEVBQUUsd0JBQVMsSUFBSSxFQUFFLEVBQUUsRUFBRTtBQUNqQyxRQUFJLGdCQUFTLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxVQUFVLEVBQUU7QUFDdEMsVUFBSSxFQUFFLEVBQUU7QUFDTixjQUFNLDJCQUFjLHlDQUF5QyxDQUFDLENBQUM7T0FDaEU7QUFDRCxvQkFBTyxJQUFJLENBQUMsT0FBTyxFQUFFLElBQUksQ0FBQyxDQUFDO0tBQzVCLE1BQU07QUFDTCxVQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQztLQUN6QjtHQUNGO0FBQ0Qsa0JBQWdCLEVBQUUsMEJBQVMsSUFBSSxFQUFFO0FBQy9CLFdBQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztHQUMzQjs7QUFFRCxpQkFBZSxFQUFFLHlCQUFTLElBQUksRUFBRSxPQUFPLEVBQUU7QUFDdkMsUUFBSSxnQkFBUyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssVUFBVSxFQUFFO0FBQ3RDLG9CQUFPLElBQUksQ0FBQyxRQUFRLEVBQUUsSUFBSSxDQUFDLENBQUM7S0FDN0IsTUFBTTtBQUNMLFVBQUksT0FBTyxPQUFPLEtBQUssV0FBVyxFQUFFO0FBQ2xDLGNBQU0seUVBQ3dDLElBQUksb0JBQ2pELENBQUM7T0FDSDtBQUNELFVBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLEdBQUcsT0FBTyxDQUFDO0tBQy9CO0dBQ0Y7QUFDRCxtQkFBaUIsRUFBRSwyQkFBUyxJQUFJLEVBQUU7QUFDaEMsV0FBTyxJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDO0dBQzVCOztBQUVELG1CQUFpQixFQUFFLDJCQUFTLElBQUksRUFBRSxFQUFFLEVBQUU7QUFDcEMsUUFBSSxnQkFBUyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssVUFBVSxFQUFFO0FBQ3RDLFVBQUksRUFBRSxFQUFFO0FBQ04sY0FBTSwyQkFBYyw0Q0FBNEMsQ0FBQyxDQUFDO09BQ25FO0FBQ0Qsb0JBQU8sSUFBSSxDQUFDLFVBQVUsRUFBRSxJQUFJLENBQUMsQ0FBQztLQUMvQixNQUFNO0FBQ0wsVUFBSSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUM7S0FDNUI7R0FDRjtBQUNELHFCQUFtQixFQUFFLDZCQUFTLElBQUksRUFBRTtBQUNsQyxXQUFPLElBQUksQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUM7R0FDOUI7Ozs7O0FBS0QsNkJBQTJCLEVBQUEsdUNBQUc7QUFDNUIsZ0RBQXVCLENBQUM7R0FDekI7Q0FDRixDQUFDOztBQUVLLElBQUksR0FBRyxHQUFHLG9CQUFPLEdBQUcsQ0FBQzs7O1FBRW5CLFdBQVc7UUFBRSxNQUFNIiwiZmlsZSI6ImJhc2UuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjcmVhdGVGcmFtZSwgZXh0ZW5kLCB0b1N0cmluZyB9IGZyb20gJy4vdXRpbHMnO1xuaW1wb3J0IEV4Y2VwdGlvbiBmcm9tICcuL2V4Y2VwdGlvbic7XG5pbXBvcnQgeyByZWdpc3RlckRlZmF1bHRIZWxwZXJzIH0gZnJvbSAnLi9oZWxwZXJzJztcbmltcG9ydCB7IHJlZ2lzdGVyRGVmYXVsdERlY29yYXRvcnMgfSBmcm9tICcuL2RlY29yYXRvcnMnO1xuaW1wb3J0IGxvZ2dlciBmcm9tICcuL2xvZ2dlcic7XG5pbXBvcnQgeyByZXNldExvZ2dlZFByb3BlcnRpZXMgfSBmcm9tICcuL2ludGVybmFsL3Byb3RvLWFjY2Vzcyc7XG5cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuNy42JztcbmV4cG9ydCBjb25zdCBDT01QSUxFUl9SRVZJU0lPTiA9IDg7XG5leHBvcnQgY29uc3QgTEFTVF9DT01QQVRJQkxFX0NPTVBJTEVSX1JFVklTSU9OID0gNztcblxuZXhwb3J0IGNvbnN0IFJFVklTSU9OX0NIQU5HRVMgPSB7XG4gIDE6ICc8PSAxLjAucmMuMicsIC8vIDEuMC5yYy4yIGlzIGFjdHVhbGx5IHJldjIgYnV0IGRvZXNuJ3QgcmVwb3J0IGl0XG4gIDI6ICc9PSAxLjAuMC1yYy4zJyxcbiAgMzogJz09IDEuMC4wLXJjLjQnLFxuICA0OiAnPT0gMS54LngnLFxuICA1OiAnPT0gMi4wLjAtYWxwaGEueCcsXG4gIDY6ICc+PSAyLjAuMC1iZXRhLjEnLFxuICA3OiAnPj0gNC4wLjAgPDQuMy4wJyxcbiAgODogJz49IDQuMy4wJ1xufTtcblxuY29uc3Qgb2JqZWN0VHlwZSA9ICdbb2JqZWN0IE9iamVjdF0nO1xuXG5leHBvcnQgZnVuY3Rpb24gSGFuZGxlYmFyc0Vudmlyb25tZW50KGhlbHBlcnMsIHBhcnRpYWxzLCBkZWNvcmF0b3JzKSB7XG4gIHRoaXMuaGVscGVycyA9IGhlbHBlcnMgfHwge307XG4gIHRoaXMucGFydGlhbHMgPSBwYXJ0aWFscyB8fCB7fTtcbiAgdGhpcy5kZWNvcmF0b3JzID0gZGVjb3JhdG9ycyB8fCB7fTtcblxuICByZWdpc3RlckRlZmF1bHRIZWxwZXJzKHRoaXMpO1xuICByZWdpc3RlckRlZmF1bHREZWNvcmF0b3JzKHRoaXMpO1xufVxuXG5IYW5kbGViYXJzRW52aXJvbm1lbnQucHJvdG90eXBlID0ge1xuICBjb25zdHJ1Y3RvcjogSGFuZGxlYmFyc0Vudmlyb25tZW50LFxuXG4gIGxvZ2dlcjogbG9nZ2VyLFxuICBsb2c6IGxvZ2dlci5sb2csXG5cbiAgcmVnaXN0ZXJIZWxwZXI6IGZ1bmN0aW9uKG5hbWUsIGZuKSB7XG4gICAgaWYgKHRvU3RyaW5nLmNhbGwobmFtZSkgPT09IG9iamVjdFR5cGUpIHtcbiAgICAgIGlmIChmbikge1xuICAgICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCdBcmcgbm90IHN1cHBvcnRlZCB3aXRoIG11bHRpcGxlIGhlbHBlcnMnKTtcbiAgICAgIH1cbiAgICAgIGV4dGVuZCh0aGlzLmhlbHBlcnMsIG5hbWUpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLmhlbHBlcnNbbmFtZV0gPSBmbjtcbiAgICB9XG4gIH0sXG4gIHVucmVnaXN0ZXJIZWxwZXI6IGZ1bmN0aW9uKG5hbWUpIHtcbiAgICBkZWxldGUgdGhpcy5oZWxwZXJzW25hbWVdO1xuICB9LFxuXG4gIHJlZ2lzdGVyUGFydGlhbDogZnVuY3Rpb24obmFtZSwgcGFydGlhbCkge1xuICAgIGlmICh0b1N0cmluZy5jYWxsKG5hbWUpID09PSBvYmplY3RUeXBlKSB7XG4gICAgICBleHRlbmQodGhpcy5wYXJ0aWFscywgbmFtZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGlmICh0eXBlb2YgcGFydGlhbCA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihcbiAgICAgICAgICBgQXR0ZW1wdGluZyB0byByZWdpc3RlciBhIHBhcnRpYWwgY2FsbGVkIFwiJHtuYW1lfVwiIGFzIHVuZGVmaW5lZGBcbiAgICAgICAgKTtcbiAgICAgIH1cbiAgICAgIHRoaXMucGFydGlhbHNbbmFtZV0gPSBwYXJ0aWFsO1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlclBhcnRpYWw6IGZ1bmN0aW9uKG5hbWUpIHtcbiAgICBkZWxldGUgdGhpcy5wYXJ0aWFsc1tuYW1lXTtcbiAgfSxcblxuICByZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSwgZm4pIHtcbiAgICBpZiAodG9TdHJpbmcuY2FsbChuYW1lKSA9PT0gb2JqZWN0VHlwZSkge1xuICAgICAgaWYgKGZuKSB7XG4gICAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ0FyZyBub3Qgc3VwcG9ydGVkIHdpdGggbXVsdGlwbGUgZGVjb3JhdG9ycycpO1xuICAgICAgfVxuICAgICAgZXh0ZW5kKHRoaXMuZGVjb3JhdG9ycywgbmFtZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuZGVjb3JhdG9yc1tuYW1lXSA9IGZuO1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSkge1xuICAgIGRlbGV0ZSB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH0sXG4gIC8qKlxuICAgKiBSZXNldCB0aGUgbWVtb3J5IG9mIGlsbGVnYWwgcHJvcGVydHkgYWNjZXNzZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBsb2dnZWQuXG4gICAqIEBkZXByZWNhdGVkIHNob3VsZCBvbmx5IGJlIHVzZWQgaW4gaGFuZGxlYmFycyB0ZXN0LWNhc2VzXG4gICAqL1xuICByZXNldExvZ2dlZFByb3BlcnR5QWNjZXNzZXMoKSB7XG4gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19\n"
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"index": 6,
"index2": 10,
"size": 3909,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"issuerId": 2,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./helpers",
"loc": "15:15-35"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./helpers",
"loc": "28:15-35"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.registerDefaultHelpers = registerDefaultHelpers;\nexports.moveHelperToHooks = moveHelperToHooks;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _helpersBlockHelperMissing = require('./helpers/block-helper-missing');\n\nvar _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);\n\nvar _helpersEach = require('./helpers/each');\n\nvar _helpersEach2 = _interopRequireDefault(_helpersEach);\n\nvar _helpersHelperMissing = require('./helpers/helper-missing');\n\nvar _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);\n\nvar _helpersIf = require('./helpers/if');\n\nvar _helpersIf2 = _interopRequireDefault(_helpersIf);\n\nvar _helpersLog = require('./helpers/log');\n\nvar _helpersLog2 = _interopRequireDefault(_helpersLog);\n\nvar _helpersLookup = require('./helpers/lookup');\n\nvar _helpersLookup2 = _interopRequireDefault(_helpersLookup);\n\nvar _helpersWith = require('./helpers/with');\n\nvar _helpersWith2 = _interopRequireDefault(_helpersWith);\n\nfunction registerDefaultHelpers(instance) {\n _helpersBlockHelperMissing2['default'](instance);\n _helpersEach2['default'](instance);\n _helpersHelperMissing2['default'](instance);\n _helpersIf2['default'](instance);\n _helpersLog2['default'](instance);\n _helpersLookup2['default'](instance);\n _helpersWith2['default'](instance);\n}\n\nfunction moveHelperToHooks(instance, helperName, keepHelper) {\n if (instance.helpers[helperName]) {\n instance.hooks[helperName] = instance.helpers[helperName];\n if (!keepHelper) {\n delete instance.helpers[helperName];\n }\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O3lDQUF1QyxnQ0FBZ0M7Ozs7MkJBQzlDLGdCQUFnQjs7OztvQ0FDUCwwQkFBMEI7Ozs7eUJBQ3JDLGNBQWM7Ozs7MEJBQ2IsZUFBZTs7Ozs2QkFDWixrQkFBa0I7Ozs7MkJBQ3BCLGdCQUFnQjs7OztBQUVsQyxTQUFTLHNCQUFzQixDQUFDLFFBQVEsRUFBRTtBQUMvQyx5Q0FBMkIsUUFBUSxDQUFDLENBQUM7QUFDckMsMkJBQWEsUUFBUSxDQUFDLENBQUM7QUFDdkIsb0NBQXNCLFFBQVEsQ0FBQyxDQUFDO0FBQ2hDLHlCQUFXLFFBQVEsQ0FBQyxDQUFDO0FBQ3JCLDBCQUFZLFFBQVEsQ0FBQyxDQUFDO0FBQ3RCLDZCQUFlLFFBQVEsQ0FBQyxDQUFDO0FBQ3pCLDJCQUFhLFFBQVEsQ0FBQyxDQUFDO0NBQ3hCOztBQUVNLFNBQVMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUU7QUFDbEUsTUFBSSxRQUFRLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLEdBQUcsUUFBUSxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQztBQUMxRCxRQUFJLENBQUMsVUFBVSxFQUFFO0FBQ2YsYUFBTyxRQUFRLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0tBQ3JDO0dBQ0Y7Q0FDRiIsImZpbGUiOiJoZWxwZXJzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVyQmxvY2tIZWxwZXJNaXNzaW5nIGZyb20gJy4vaGVscGVycy9ibG9jay1oZWxwZXItbWlzc2luZyc7XG5pbXBvcnQgcmVnaXN0ZXJFYWNoIGZyb20gJy4vaGVscGVycy9lYWNoJztcbmltcG9ydCByZWdpc3RlckhlbHBlck1pc3NpbmcgZnJvbSAnLi9oZWxwZXJzL2hlbHBlci1taXNzaW5nJztcbmltcG9ydCByZWdpc3RlcklmIGZyb20gJy4vaGVscGVycy9pZic7XG5pbXBvcnQgcmVnaXN0ZXJMb2cgZnJvbSAnLi9oZWxwZXJzL2xvZyc7XG5pbXBvcnQgcmVnaXN0ZXJMb29rdXAgZnJvbSAnLi9oZWxwZXJzL2xvb2t1cCc7XG5pbXBvcnQgcmVnaXN0ZXJXaXRoIGZyb20gJy4vaGVscGVycy93aXRoJztcblxuZXhwb3J0IGZ1bmN0aW9uIHJlZ2lzdGVyRGVmYXVsdEhlbHBlcnMoaW5zdGFuY2UpIHtcbiAgcmVnaXN0ZXJCbG9ja0hlbHBlck1pc3NpbmcoaW5zdGFuY2UpO1xuICByZWdpc3RlckVhY2goaW5zdGFuY2UpO1xuICByZWdpc3RlckhlbHBlck1pc3NpbmcoaW5zdGFuY2UpO1xuICByZWdpc3RlcklmKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJMb2coaW5zdGFuY2UpO1xuICByZWdpc3Rlckxvb2t1cChpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyV2l0aChpbnN0YW5jZSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBtb3ZlSGVscGVyVG9Ib29rcyhpbnN0YW5jZSwgaGVscGVyTmFtZSwga2VlcEhlbHBlcikge1xuICBpZiAoaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXSkge1xuICAgIGluc3RhbmNlLmhvb2tzW2hlbHBlck5hbWVdID0gaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXTtcbiAgICBpZiAoIWtlZXBIZWxwZXIpIHtcbiAgICAgIGRlbGV0ZSBpbnN0YW5jZS5oZWxwZXJzW2hlbHBlck5hbWVdO1xuICAgIH1cbiAgfVxufVxuIl19\n"
},
{
"id": 4,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\webpack\\buildin\\global.js",
"name": "(webpack)/buildin/global.js",
"index": 9,
"index2": 3,
"size": 472,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js",
"issuerId": 23,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 0,
"building": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 11,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\each.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-53"
},
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-50"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n"
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\logger.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/logger.js",
"index": 17,
"index2": 13,
"size": 3883,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"issuerId": 2,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./logger",
"loc": "19:14-33"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"type": "cjs require",
"userRequest": "../logger",
"loc": "13:14-34"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\n\nvar _utils = require('./utils');\n\nvar logger = {\n methodMap: ['debug', 'info', 'warn', 'error'],\n level: 'info',\n\n // Maps a given level value to the `methodMap` indexes above.\n lookupLevel: function lookupLevel(level) {\n if (typeof level === 'string') {\n var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());\n if (levelMap >= 0) {\n level = levelMap;\n } else {\n level = parseInt(level, 10);\n }\n }\n\n return level;\n },\n\n // Can be overridden in the host environment\n log: function log(level) {\n level = logger.lookupLevel(level);\n\n if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {\n var method = logger.methodMap[level];\n // eslint-disable-next-line no-console\n if (!console[method]) {\n method = 'log';\n }\n\n for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n message[_key - 1] = arguments[_key];\n }\n\n console[method].apply(console, message); // eslint-disable-line no-console\n }\n }\n};\n\nexports['default'] = logger;\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O3FCQUF3QixTQUFTOztBQUVqQyxJQUFJLE1BQU0sR0FBRztBQUNYLFdBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxPQUFLLEVBQUUsTUFBTTs7O0FBR2IsYUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMzQixRQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBRTtBQUM3QixVQUFJLFFBQVEsR0FBRyxlQUFRLE1BQU0sQ0FBQyxTQUFTLEVBQUUsS0FBSyxDQUFDLFdBQVcsRUFBRSxDQUFDLENBQUM7QUFDOUQsVUFBSSxRQUFRLElBQUksQ0FBQyxFQUFFO0FBQ2pCLGFBQUssR0FBRyxRQUFRLENBQUM7T0FDbEIsTUFBTTtBQUNMLGFBQUssR0FBRyxRQUFRLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDO09BQzdCO0tBQ0Y7O0FBRUQsV0FBTyxLQUFLLENBQUM7R0FDZDs7O0FBR0QsS0FBRyxFQUFFLGFBQVMsS0FBSyxFQUFjO0FBQy9CLFNBQUssR0FBRyxNQUFNLENBQUMsV0FBVyxDQUFDLEtBQUssQ0FBQyxDQUFDOztBQUVsQyxRQUNFLE9BQU8sT0FBTyxLQUFLLFdBQVcsSUFDOUIsTUFBTSxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLElBQUksS0FBSyxFQUN6QztBQUNBLFVBQUksTUFBTSxHQUFHLE1BQU0sQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLENBQUM7O0FBRXJDLFVBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLEVBQUU7QUFDcEIsY0FBTSxHQUFHLEtBQUssQ0FBQztPQUNoQjs7d0NBWG1CLE9BQU87QUFBUCxlQUFPOzs7QUFZM0IsYUFBTyxDQUFDLE1BQU0sT0FBQyxDQUFmLE9BQU8sRUFBWSxPQUFPLENBQUMsQ0FBQztLQUM3QjtHQUNGO0NBQ0YsQ0FBQzs7cUJBRWEsTUFBTSIsImZpbGUiOiJsb2dnZXIuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBpbmRleE9mIH0gZnJvbSAnLi91dGlscyc7XG5cbmxldCBsb2dnZXIgPSB7XG4gIG1ldGhvZE1hcDogWydkZWJ1ZycsICdpbmZvJywgJ3dhcm4nLCAnZXJyb3InXSxcbiAgbGV2ZWw6ICdpbmZvJyxcblxuICAvLyBNYXBzIGEgZ2l2ZW4gbGV2ZWwgdmFsdWUgdG8gdGhlIGBtZXRob2RNYXBgIGluZGV4ZXMgYWJvdmUuXG4gIGxvb2t1cExldmVsOiBmdW5jdGlvbihsZXZlbCkge1xuICAgIGlmICh0eXBlb2YgbGV2ZWwgPT09ICdzdHJpbmcnKSB7XG4gICAgICBsZXQgbGV2ZWxNYXAgPSBpbmRleE9mKGxvZ2dlci5tZXRob2RNYXAsIGxldmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgaWYgKGxldmVsTWFwID49IDApIHtcbiAgICAgICAgbGV2ZWwgPSBsZXZlbE1hcDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGxldmVsID0gcGFyc2VJbnQobGV2ZWwsIDEwKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbGV2ZWw7XG4gIH0sXG5cbiAgLy8gQ2FuIGJlIG92ZXJyaWRkZW4gaW4gdGhlIGhvc3QgZW52aXJvbm1lbnRcbiAgbG9nOiBmdW5jdGlvbihsZXZlbCwgLi4ubWVzc2FnZSkge1xuICAgIGxldmVsID0gbG9nZ2VyLmxvb2t1cExldmVsKGxldmVsKTtcblxuICAgIGlmIChcbiAgICAgIHR5cGVvZiBjb25zb2xlICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgbG9nZ2VyLmxvb2t1cExldmVsKGxvZ2dlci5sZXZlbCkgPD0gbGV2ZWxcbiAgICApIHtcbiAgICAgIGxldCBtZXRob2QgPSBsb2dnZXIubWV0aG9kTWFwW2xldmVsXTtcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlXG4gICAgICBpZiAoIWNvbnNvbGVbbWV0aG9kXSkge1xuICAgICAgICBtZXRob2QgPSAnbG9nJztcbiAgICAgIH1cbiAgICAgIGNvbnNvbGVbbWV0aG9kXSguLi5tZXNzYWdlKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgfVxuICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBsb2dnZXI7XG4iXX0=\n"
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"index": 18,
"index2": 15,
"size": 8678,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"issuerId": 2,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./internal/proto-access",
"loc": "23:27-61"
},
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./internal/proto-access",
"loc": "32:27-61"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.createProtoAccessControl = createProtoAccessControl;\nexports.resultIsAllowed = resultIsAllowed;\nexports.resetLoggedProperties = resetLoggedProperties;\n// istanbul ignore next\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\nvar _createNewLookupObject = require('./create-new-lookup-object');\n\nvar _logger = require('../logger');\n\nvar logger = _interopRequireWildcard(_logger);\n\nvar loggedProperties = Object.create(null);\n\nfunction createProtoAccessControl(runtimeOptions) {\n var defaultMethodWhiteList = Object.create(null);\n defaultMethodWhiteList['constructor'] = false;\n defaultMethodWhiteList['__defineGetter__'] = false;\n defaultMethodWhiteList['__defineSetter__'] = false;\n defaultMethodWhiteList['__lookupGetter__'] = false;\n\n var defaultPropertyWhiteList = Object.create(null);\n // eslint-disable-next-line no-proto\n defaultPropertyWhiteList['__proto__'] = false;\n\n return {\n properties: {\n whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),\n defaultValue: runtimeOptions.allowProtoPropertiesByDefault\n },\n methods: {\n whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),\n defaultValue: runtimeOptions.allowProtoMethodsByDefault\n }\n };\n}\n\nfunction resultIsAllowed(result, protoAccessControl, propertyName) {\n if (typeof result === 'function') {\n return checkWhiteList(protoAccessControl.methods, propertyName);\n } else {\n return checkWhiteList(protoAccessControl.properties, propertyName);\n }\n}\n\nfunction checkWhiteList(protoAccessControlForType, propertyName) {\n if (protoAccessControlForType.whitelist[propertyName] !== undefined) {\n return protoAccessControlForType.whitelist[propertyName] === true;\n }\n if (protoAccessControlForType.defaultValue !== undefined) {\n return protoAccessControlForType.defaultValue;\n }\n logUnexpecedPropertyAccessOnce(propertyName);\n return false;\n}\n\nfunction logUnexpecedPropertyAccessOnce(propertyName) {\n if (loggedProperties[propertyName] !== true) {\n loggedProperties[propertyName] = true;\n logger.log('error', 'Handlebars: Access has been denied to resolve the property \"' + propertyName + '\" because it is not an \"own property\" of its parent.\\n' + 'You can add a runtime option to disable the check or this warning:\\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details');\n }\n}\n\nfunction resetLoggedProperties() {\n Object.keys(loggedProperties).forEach(function (propertyName) {\n delete loggedProperties[propertyName];\n });\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3Byb3RvLWFjY2Vzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O3FDQUFzQyw0QkFBNEI7O3NCQUMxQyxXQUFXOztJQUF2QixNQUFNOztBQUVsQixJQUFNLGdCQUFnQixHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7O0FBRXRDLFNBQVMsd0JBQXdCLENBQUMsY0FBYyxFQUFFO0FBQ3ZELE1BQUksc0JBQXNCLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNqRCx3QkFBc0IsQ0FBQyxhQUFhLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDOUMsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDbkQsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDbkQsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0FBRyxLQUFLLENBQUM7O0FBRW5ELE1BQUksd0JBQXdCLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQzs7QUFFbkQsMEJBQXdCLENBQUMsV0FBVyxDQUFDLEdBQUcsS0FBSyxDQUFDOztBQUU5QyxTQUFPO0FBQ0wsY0FBVSxFQUFFO0FBQ1YsZUFBUyxFQUFFLDZDQUNULHdCQUF3QixFQUN4QixjQUFjLENBQUMsc0JBQXNCLENBQ3RDO0FBQ0Qsa0JBQVksRUFBRSxjQUFjLENBQUMsNkJBQTZCO0tBQzNEO0FBQ0QsV0FBTyxFQUFFO0FBQ1AsZUFBUyxFQUFFLDZDQUNULHNCQUFzQixFQUN0QixjQUFjLENBQUMsbUJBQW1CLENBQ25DO0FBQ0Qsa0JBQVksRUFBRSxjQUFjLENBQUMsMEJBQTBCO0tBQ3hEO0dBQ0YsQ0FBQztDQUNIOztBQUVNLFNBQVMsZUFBZSxDQUFDLE1BQU0sRUFBRSxrQkFBa0IsRUFBRSxZQUFZLEVBQUU7QUFDeEUsTUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLEVBQUU7QUFDaEMsV0FBTyxjQUFjLENBQUMsa0JBQWtCLENBQUMsT0FBTyxFQUFFLFlBQVksQ0FBQyxDQUFDO0dBQ2pFLE1BQU07QUFDTCxXQUFPLGNBQWMsQ0FBQyxrQkFBa0IsQ0FBQyxVQUFVLEVBQUUsWUFBWSxDQUFDLENBQUM7R0FDcEU7Q0FDRjs7QUFFRCxTQUFTLGNBQWMsQ0FBQyx5QkFBeUIsRUFBRSxZQUFZLEVBQUU7QUFDL0QsTUFBSSx5QkFBeUIsQ0FBQyxTQUFTLENBQUMsWUFBWSxDQUFDLEtBQUssU0FBUyxFQUFFO0FBQ25FLFdBQU8seUJBQXlCLENBQUMsU0FBUyxDQUFDLFlBQVksQ0FBQyxLQUFLLElBQUksQ0FBQztHQUNuRTtBQUNELE1BQUkseUJBQXlCLENBQUMsWUFBWSxLQUFLLFNBQVMsRUFBRTtBQUN4RCxXQUFPLHlCQUF5QixDQUFDLFlBQVksQ0FBQztHQUMvQztBQUNELGdDQUE4QixDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQzdDLFNBQU8sS0FBSyxDQUFDO0NBQ2Q7O0FBRUQsU0FBUyw4QkFBOEIsQ0FBQyxZQUFZLEVBQUU7QUFDcEQsTUFBSSxnQkFBZ0IsQ0FBQyxZQUFZLENBQUMsS0FBSyxJQUFJLEVBQUU7QUFDM0Msb0JBQWdCLENBQUMsWUFBWSxDQUFDLEdBQUcsSUFBSSxDQUFDO0FBQ3RDLFVBQU0sQ0FBQyxHQUFHLENBQ1IsT0FBTyxFQUNQLGlFQUErRCxZQUFZLG9JQUNILG9IQUMyQyxDQUNwSCxDQUFDO0dBQ0g7Q0FDRjs7QUFFTSxTQUFTLHFCQUFxQixHQUFHO0FBQ3RDLFFBQU0sQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQSxZQUFZLEVBQUk7QUFDcEQsV0FBTyxnQkFBZ0IsQ0FBQyxZQUFZLENBQUMsQ0FBQztHQUN2QyxDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJwcm90by1hY2Nlc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjcmVhdGVOZXdMb29rdXBPYmplY3QgfSBmcm9tICcuL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdCc7XG5pbXBvcnQgKiBhcyBsb2dnZXIgZnJvbSAnLi4vbG9nZ2VyJztcblxuY29uc3QgbG9nZ2VkUHJvcGVydGllcyA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVQcm90b0FjY2Vzc0NvbnRyb2wocnVudGltZU9wdGlvbnMpIHtcbiAgbGV0IGRlZmF1bHRNZXRob2RXaGl0ZUxpc3QgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICBkZWZhdWx0TWV0aG9kV2hpdGVMaXN0Wydjb25zdHJ1Y3RvciddID0gZmFsc2U7XG4gIGRlZmF1bHRNZXRob2RXaGl0ZUxpc3RbJ19fZGVmaW5lR2V0dGVyX18nXSA9IGZhbHNlO1xuICBkZWZhdWx0TWV0aG9kV2hpdGVMaXN0WydfX2RlZmluZVNldHRlcl9fJ10gPSBmYWxzZTtcbiAgZGVmYXVsdE1ldGhvZFdoaXRlTGlzdFsnX19sb29rdXBHZXR0ZXJfXyddID0gZmFsc2U7XG5cbiAgbGV0IGRlZmF1bHRQcm9wZXJ0eVdoaXRlTGlzdCA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1wcm90b1xuICBkZWZhdWx0UHJvcGVydHlXaGl0ZUxpc3RbJ19fcHJvdG9fXyddID0gZmFsc2U7XG5cbiAgcmV0dXJuIHtcbiAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICB3aGl0ZWxpc3Q6IGNyZWF0ZU5ld0xvb2t1cE9iamVjdChcbiAgICAgICAgZGVmYXVsdFByb3BlcnR5V2hpdGVMaXN0LFxuICAgICAgICBydW50aW1lT3B0aW9ucy5hbGxvd2VkUHJvdG9Qcm9wZXJ0aWVzXG4gICAgICApLFxuICAgICAgZGVmYXVsdFZhbHVlOiBydW50aW1lT3B0aW9ucy5hbGxvd1Byb3RvUHJvcGVydGllc0J5RGVmYXVsdFxuICAgIH0sXG4gICAgbWV0aG9kczoge1xuICAgICAgd2hpdGVsaXN0OiBjcmVhdGVOZXdMb29rdXBPYmplY3QoXG4gICAgICAgIGRlZmF1bHRNZXRob2RXaGl0ZUxpc3QsXG4gICAgICAgIHJ1bnRpbWVPcHRpb25zLmFsbG93ZWRQcm90b01ldGhvZHNcbiAgICAgICksXG4gICAgICBkZWZhdWx0VmFsdWU6IHJ1bnRpbWVPcHRpb25zLmFsbG93UHJvdG9NZXRob2RzQnlEZWZhdWx0XG4gICAgfVxuICB9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gcmVzdWx0SXNBbGxvd2VkKHJlc3VsdCwgcHJvdG9BY2Nlc3NDb250cm9sLCBwcm9wZXJ0eU5hbWUpIHtcbiAgaWYgKHR5cGVvZiByZXN1bHQgPT09ICdmdW5jdGlvbicpIHtcbiAgICByZXR1cm4gY2hlY2tXaGl0ZUxpc3QocHJvdG9BY2Nlc3NDb250cm9sLm1ldGhvZHMsIHByb3BlcnR5TmFtZSk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIGNoZWNrV2hpdGVMaXN0KHByb3RvQWNjZXNzQ29udHJvbC5wcm9wZXJ0aWVzLCBwcm9wZXJ0eU5hbWUpO1xuICB9XG59XG5cbmZ1bmN0aW9uIGNoZWNrV2hpdGVMaXN0KHByb3RvQWNjZXNzQ29udHJvbEZvclR5cGUsIHByb3BlcnR5TmFtZSkge1xuICBpZiAocHJvdG9BY2Nlc3NDb250cm9sRm9yVHlwZS53aGl0ZWxpc3RbcHJvcGVydHlOYW1lXSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgcmV0dXJuIHByb3RvQWNjZXNzQ29udHJvbEZvclR5cGUud2hpdGVsaXN0W3Byb3BlcnR5TmFtZV0gPT09IHRydWU7XG4gIH1cbiAgaWYgKHByb3RvQWNjZXNzQ29udHJvbEZvclR5cGUuZGVmYXVsdFZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICByZXR1cm4gcHJvdG9BY2Nlc3NDb250cm9sRm9yVHlwZS5kZWZhdWx0VmFsdWU7XG4gIH1cbiAgbG9nVW5leHBlY2VkUHJvcGVydHlBY2Nlc3NPbmNlKHByb3BlcnR5TmFtZSk7XG4gIHJldHVybiBmYWxzZTtcbn1cblxuZnVuY3Rpb24gbG9nVW5leHBlY2VkUHJvcGVydHlBY2Nlc3NPbmNlKHByb3BlcnR5TmFtZSkge1xuICBpZiAobG9nZ2VkUHJvcGVydGllc1twcm9wZXJ0eU5hbWVdICE9PSB0cnVlKSB7XG4gICAgbG9nZ2VkUHJvcGVydGllc1twcm9wZXJ0eU5hbWVdID0gdHJ1ZTtcbiAgICBsb2dnZXIubG9nKFxuICAgICAgJ2Vycm9yJyxcbiAgICAgIGBIYW5kbGViYXJzOiBBY2Nlc3MgaGFzIGJlZW4gZGVuaWVkIHRvIHJlc29sdmUgdGhlIHByb3BlcnR5IFwiJHtwcm9wZXJ0eU5hbWV9XCIgYmVjYXVzZSBpdCBpcyBub3QgYW4gXCJvd24gcHJvcGVydHlcIiBvZiBpdHMgcGFyZW50LlxcbmAgK1xuICAgICAgICBgWW91IGNhbiBhZGQgYSBydW50aW1lIG9wdGlvbiB0byBkaXNhYmxlIHRoZSBjaGVjayBvciB0aGlzIHdhcm5pbmc6XFxuYCArXG4gICAgICAgIGBTZWUgaHR0cHM6Ly9oYW5kbGViYXJzanMuY29tL2FwaS1yZWZlcmVuY2UvcnVudGltZS1vcHRpb25zLmh0bWwjb3B0aW9ucy10by1jb250cm9sLXByb3RvdHlwZS1hY2Nlc3MgZm9yIGRldGFpbHNgXG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCkge1xuICBPYmplY3Qua2V5cyhsb2dnZWRQcm9wZXJ0aWVzKS5mb3JFYWNoKHByb3BlcnR5TmFtZSA9PiB7XG4gICAgZGVsZXRlIGxvZ2dlZFByb3BlcnRpZXNbcHJvcGVydHlOYW1lXTtcbiAgfSk7XG59XG4iXX0=\n"
},
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"index": 0,
"index2": 23,
"size": 37396,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 128,
"building": 2466
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"source": "var Handlebars = require(\"../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" <link rel=\\\"stylesheet\\\" href=\\\"\"\n + container.escapeExpression(container.lambda(depth0, depth0))\n + \"\\\">\\r\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \" <link rel=\\\"stylesheet\\\" href=\\\"\"\n + alias2(alias1((depth0 != null ? lookupProperty(depth0,\"file\") : depth0), depth0))\n + \"\\\" media=\\\"\"\n + alias2(alias1((depth0 != null ? lookupProperty(depth0,\"query\") : depth0), depth0))\n + \"\\\">\\r\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \" <script src=\\\"\"\n + container.escapeExpression(container.lambda(depth0, depth0))\n + \"\\\"></script>\\r\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \" <script src=\\\"\"\n + container.escapeExpression(container.lambda((depth0 != null ? lookupProperty(depth0,\"file\") : depth0), depth0))\n + \"\\\"></script>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<!DOCTYPE html>\\r\\n<html class=\\\"no-js\\\" lang=\\\"en\\\">\\r\\n\\r\\n<head>\\r\\n <meta charset=\\\"utf-8\\\">\\r\\n <title>Telegram Web</title>\\r\\n <meta name=\\\"description\\\" content=\\\"\\\">\\r\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\">\\r\\n\\r\\n <link rel=\\\"apple-touch-icon\\\" sizes=\\\"180x180\\\" href=\\\"assets/img/apple-touch-icon.png\\\">\\r\\n <link rel=\\\"icon\\\" type=\\\"image/png\\\" sizes=\\\"32x32\\\" href=\\\"assets/img/favicon-32x32.png\\\">\\r\\n <link rel=\\\"icon\\\" type=\\\"image/png\\\" sizes=\\\"16x16\\\" href=\\\"assets/img/favicon-16x16.png\\\">\\r\\n <link rel=\\\"manifest\\\" href=\\\"site.webmanifest\\\">\\r\\n <link rel=\\\"mask-icon\\\" href=\\\"assets/img/safari-pinned-tab.svg\\\" color=\\\"#64a3f0\\\">\\r\\n <meta name=\\\"msapplication-TileColor\\\" content=\\\"#da532c\\\">\\r\\n <meta name=\\\"theme-color\\\" content=\\\"#fafafa\\\">\\r\\n\"\n + ((stack1 = lookupProperty(helpers,\"each\").call(alias1,((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"htmlWebpackPlugin\") : depth0)) != null ? lookupProperty(stack1,\"files\") : stack1)) != null ? lookupProperty(stack1,\"css\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":17,\"column\":2},\"end\":{\"line\":19,\"column\":13}}})) != null ? stack1 : \"\")\n + ((stack1 = lookupProperty(helpers,\"each\").call(alias1,((stack1 = ((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"htmlWebpackPlugin\") : depth0)) != null ? lookupProperty(stack1,\"files\") : stack1)) != null ? lookupProperty(stack1,\"extracted\") : stack1)) != null ? lookupProperty(stack1,\"css\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":20,\"column\":2},\"end\":{\"line\":22,\"column\":13}}})) != null ? stack1 : \"\")\n + \"</head>\\r\\n\\r\\n<body>\\r\\n <!--[if IE]>\\r\\n <p class=\\\"browserupgrade\\\">You are using an <strong>outdated</strong> browser. Please <a href=\\\"https://browsehappy.com/\\\">upgrade your browser</a> to improve your experience and security.</p>\\r\\n <![endif]-->\\r\\n \\r\\n <div class=\\\"whole\\\" id=\\\"auth-pages\\\" style=\\\"display: none;\\\">\\r\\n <div class=\\\"tabs-container auth-pages__container\\\">\\r\\n <div class=\\\"page-sign\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image\\\">\\r\\n <svg class=\\\"sign-logo\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"160\\\" height=\\\"160\\\" viewBox=\\\"0 0 160 160\\\">\\r\\n <use href=\\\"#logo\\\" />\\r\\n </svg>\\r\\n </div>\\r\\n <h4>Sign in to Telegram</h4>\\r\\n <p class=\\\"subtitle\\\">Please confirm your country and<br> enter your phone number.</p>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field input-select\\\">\\r\\n <input type=\\\"text\\\" name=\\\"countryCode\\\" id=\\\"countryCode\\\" autocomplete=\\\"rrRandomRR\\\" required />\\r\\n <label for=\\\"countryCode\\\">Country</label>\\r\\n <span class=\\\"arrow arrow-down\\\"></span>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"tel\\\" name=\\\"phone\\\" id=\\\"phone\\\" autocomplete=\\\"rr55RandomRR55\\\" required />\\r\\n <label for=\\\"phone\\\">Phone Number</label>\\r\\n </div>\\r\\n <label class=\\\"checkbox-field\\\">\\r\\n <input type=\\\"checkbox\\\" id=\\\"keepSigned\\\" checked=\\\"checked\\\">\\r\\n <span>Keep me signed in</span>\\r\\n </label>\\r\\n <button class=\\\"btn-primary rp\\\" style=\\\"visibility: hidden;\\\">NEXT</button>\\r\\n <div class=\\\"qr\\\"><a href=\\\"#\\\" class=\\\"a-qr\\\">Quick log in using QR code</a></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"page-signQR\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image\\\">\\r\\n <canvas id=\\\"qr-code\\\"></canvas>\\r\\n </div>\\r\\n <h4>Scan from mobile Telegram</h4>\\r\\n <p class=\\\"qr-description\\\">1. Open Telegram on your phone<br>2. Go to settings > Devices > Scan QR<br>3. Scan this image to Log in</p>\\r\\n <div class=\\\"qr\\\"><a href=\\\"#\\\" class=\\\"a-qr\\\">Or log in using your phone number</a></div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"page-authCode\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image\\\"></div>\\r\\n <div class=\\\"phone-wrapper\\\">\\r\\n <h4 class=\\\"phone\\\"></h4>\\r\\n <span class=\\\"phone-edit tgico-edit\\\"></span>\\r\\n </div>\\r\\n <p class=\\\"subtitle sent-type\\\"></p>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"code\\\" id=\\\"code\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"code\\\">Code</label>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"page-password\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image\\\"></div>\\r\\n <h4 class=\\\"phone\\\">Enter a password</h4>\\r\\n <p class=\\\"subtitle\\\">Your account is protected with<br>an additional password</p>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"password\\\" name=\\\"password\\\" id=\\\"password\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"password\\\">Password</label>\\r\\n <span class=\\\"toggle-visible tgico-eye1\\\"></span>\\r\\n </div>\\r\\n <button class=\\\"btn-primary rp\\\">NEXT</button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"page-signUp\\\">\\r\\n <div class=\\\"container center-align\\\">\\r\\n <div class=\\\"auth-image avatar-edit\\\">\\r\\n <canvas class=\\\"avatar-edit-canvas\\\" id=\\\"canvas-avatar\\\"></canvas>\\r\\n <span class=\\\"tgico tgico-cameraadd\\\"></span>\\r\\n </div>\\r\\n <h4 class=\\\"fullName\\\">Your Name</h4>\\r\\n <p class=\\\"subtitle\\\">Enter your name and add<br>a profile picture</p>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"name\\\" id=\\\"name\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"name\\\">Name</label>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"lastName\\\" id=\\\"lastName\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"lastName\\\">Last Name (optional)</label>\\r\\n </div>\\r\\n <button class=\\\"btn-primary rp\\\" id=\\\"signUp\\\">START MESSAGING</button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"popup popup-avatar hide\\\" id=\\\"popup-avatar\\\" style=\\\"display: none;\\\">\\r\\n <div class=\\\"popup-container z-depth-1\\\">\\r\\n <div class=\\\"popup-header\\\">\\r\\n <span class=\\\"popup-close tgico-close\\\"></span>\\r\\n <h6>Drag to Reposition</h6>\\r\\n </div>\\r\\n <div class=\\\"crop\\\"></div>\\r\\n <button class=\\\"btn-primary rp btn-circle btn-crop btn-icon tgico-check z-depth-1\\\"></button>\\r\\n <input type=\\\"file\\\" style=\\\"display: none;\\\" />\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"whole page-chats\\\" style=\\\"display: none;\\\" id=\\\"page-chats\\\">\\r\\n <svg style=\\\"position: absolute; top: -10000px; left: -10000px;\\\">\\r\\n <defs id=\\\"svg-defs\\\">\\r\\n <path id=\\\"message-tail\\\" d=\\\"M1.00002881,1.03679295e-14 L7,0 L7,17 C6.8069969,14.1607017 6.12380234,11.2332513 4.95041634,8.21764872 C4.04604748,5.89342034 2.50413132,3.73337411 0.324667862,1.73751004 L0.324652538,1.73752677 C-0.0826597201,1.36452676 -0.110475289,0.731958677 0.262524727,0.324646419 C0.451952959,0.117792698 0.719544377,1.0985861e-14 1.00002881,1.04360964e-14 Z\\\"></path>\\r\\n <path id=\\\"logo\\\" fill=\\\"#50A2E9\\\" fill-rule=\\\"evenodd\\\" d=\\\"M80,0 C124.18278,0 160,35.81722 160,80 C160,124.18278 124.18278,160 80,160 C35.81722,160 0,124.18278 0,80 C0,35.81722 35.81722,0 80,0 Z M114.262551,46.4516129 L114.123923,46.4516129 C111.089589,46.5056249 106.482806,48.0771432 85.1289541,56.93769 L81.4133571,58.4849956 C72.8664779,62.0684477 57.2607933,68.7965125 34.5963033,78.66919 C30.6591745,80.2345564 28.5967328,81.765936 28.4089783,83.2633288 C28.0626453,86.0254269 31.8703852,86.959903 36.7890378,88.5302703 L38.2642674,89.0045258 C42.3926354,90.314406 47.5534685,91.7248852 50.3250916,91.7847532 C52.9151948,91.8407003 55.7944784,90.8162976 58.9629426,88.7115451 L70.5121776,80.9327422 C85.6657026,70.7535853 93.6285785,65.5352892 94.4008055,65.277854 L94.6777873,65.216416 C95.1594319,65.1213105 95.7366278,65.0717596 96.1481181,65.4374337 C96.6344248,65.8695939 96.5866185,66.6880224 96.5351057,66.9075859 C96.127514,68.6448691 75.2839361,87.6143392 73.6629144,89.2417998 L73.312196,89.6016896 C68.7645143,94.2254793 63.9030972,97.1721503 71.5637945,102.355193 L73.3593638,103.544598 C79.0660342,107.334968 82.9483395,110.083813 88.8107882,113.958377 L90.3875424,114.996094 C95.0654739,118.061953 98.7330313,121.697601 103.562866,121.253237 C105.740839,121.052855 107.989107,119.042224 109.175465,113.09692 L109.246762,112.727987 C112.002037,98.0012935 117.417883,66.09303 118.669527,52.9443975 C118.779187,51.7924073 118.641237,50.318088 118.530455,49.6708963 L118.474159,49.3781963 C118.341081,48.7651315 118.067967,48.0040758 117.346762,47.4189793 C116.412565,46.6610871 115.002114,46.4638844 114.262551,46.4516129 Z\\\"/>\\r\\n <path id=\\\"poll-line\\\" d=\\\"M4.47,5.33v13.6c0,4.97,4.03,9,9,9h458.16\\\"/>\\r\\n </defs>\\r\\n </svg>\\r\\n <div class=\\\"media-viewer-whole\\\">\\r\\n <div class=\\\"overlays\\\">\\r\\n <div class=\\\"media-viewer\\\">\\r\\n <div class=\\\"media-viewer-author\\\">\\r\\n <avatar-element class=\\\"media-viewer-userpic\\\"></avatar-element>\\r\\n <div class=\\\"media-viewer-name\\\"></div>\\r\\n <div class=\\\"media-viewer-date\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"media-viewer-buttons\\\">\\r\\n <div class=\\\"btn-icon tgico-delete menu-delete rp\\\"></div>\\r\\n <div class=\\\"btn-icon tgico-forward menu-forward rp\\\"></div>\\r\\n <div class=\\\"btn-icon tgico-download menu-download rp\\\"></div>\\r\\n <div class=\\\"btn-icon tgico-close menu-close rp\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"media-viewer-content\\\">\\r\\n <div class=\\\"media-viewer-stub\\\"></div>\\r\\n <div class=\\\"media-viewer-container\\\">\\r\\n <div class=\\\"media-viewer-media\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"media-viewer-caption\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"media-viewer-switchers\\\">\\r\\n <div class=\\\"media-viewer-switcher-left menu-prev\\\"><span class=\\\"tgico-down media-viewer-prev-button\\\"></span></div>\\r\\n <div class=\\\"media-viewer-switcher-right menu-next\\\"><span class=\\\"tgico-down media-viewer-next-button\\\"></span></div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"popup popup-send-photo\\\">\\r\\n <div class=\\\"popup-container z-depth-1\\\">\\r\\n <div class=\\\"popup-header\\\">\\r\\n <span class=\\\"btn-icon popup-close tgico-close\\\"></span>\\r\\n <div class=\\\"popup-title\\\">Send Photo</div>\\r\\n <button class=\\\"btn-primary rp\\\">SEND</button>\\r\\n </div>\\r\\n <div class=\\\"popup-photo\\\"></div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"photo-caption\\\" id=\\\"photo-caption\\\" placeholder=\\\"Add a caption...\\\" autocomplete=\\\"off\\\" required />\\r\\n <label for=\\\"photo-caption\\\">Caption</label>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div id=\\\"main-columns\\\" class=\\\"tabs-container\\\">\\r\\n <div class=\\\"chats-container sidebar sidebar-left main-column\\\" id=\\\"column-left\\\">\\r\\n <div class=\\\"sidebar-slider tabs-container\\\">\\r\\n <div class=\\\"sidebar-slider-item item-main\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <div class=\\\"sidebar-header__btn-container\\\">\\r\\n <div class=\\\"btn-icon tgico-menu btn-menu-toggle rp sidebar-tools-button active\\\">\\r\\n <div class=\\\"btn-menu bottom-right\\\">\\r\\n <div class=\\\"btn-menu-item menu-newGroup tgico-newgroup rp\\\">New Group</div>\\r\\n <div class=\\\"btn-menu-item menu-contacts tgico-user rp\\\">Contacts</div>\\r\\n <div class=\\\"btn-menu-item menu-archived tgico-archive rp\\\">Archived <span class=\\\"archived-count\\\"></span></div>\\r\\n <div class=\\\"btn-menu-item menu-saved tgico-savedmessages rp\\\">Saved</div>\\r\\n <div class=\\\"btn-menu-item menu-settings tgico-settings rp\\\">Settings</div>\\r\\n <div class=\\\"btn-menu-item menu-help tgico-help rp\\\">Help</div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"btn-icon tgico-back rp sidebar-back-button\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"input-search\\\">\\r\\n <input type=\\\"text\\\" placeholder=\\\"Telegram Search\\\" id=\\\"global-search\\\" />\\r\\n <span class=\\\"tgico tgico-search\\\"></span>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div id=\\\"chats-container\\\">\\r\\n <ul id=\\\"dialogs\\\"></ul>\\r\\n </div>\\r\\n <div class=\\\"sidebar-search hide\\\" id=\\\"search-container\\\"></div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-newchat_filled btn-menu-toggle\\\" id=\\\"new-menu\\\">\\r\\n <div class=\\\"btn-menu top-left\\\">\\r\\n <div class=\\\"btn-menu-item menu-channel tgico-newchannel rp\\\">New Channel</div>\\r\\n <div class=\\\"btn-menu-item menu-group tgico-newgroup rp\\\">New Group</div>\\r\\n <div class=\\\"btn-menu-item menu-privateChat tgico-newprivate rp\\\">New Private Chat</div>\\r\\n </div>\\r\\n </button>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Archived Chats</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div id=\\\"chats-archived-container\\\">\\r\\n <ul id=\\\"dialogs-archived\\\"></ul>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item\\\" id=\\\"contacts-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"input-search\\\">\\r\\n <input type=\\\"text\\\" placeholder=\\\"Search\\\" id=\\\"contacts-search\\\" autocomplete=\\\"ASKLXmQQr52\\\" />\\r\\n <span class=\\\"tgico tgico-search\\\"></span>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div>\\r\\n <ul id=\\\"contacts\\\" class=\\\"contacts-container\\\"></ul>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item new-channel-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">New Channel</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"avatar-edit\\\">\\r\\n <canvas class=\\\"avatar-edit-canvas\\\"></canvas>\\r\\n <span class=\\\"tgico tgico-cameraadd\\\"></span>\\r\\n </div>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"name\\\" class=\\\"new-channel-name\\\" autocomplete=\\\"xxDDqqOX\\\" required=\\\"\\\">\\r\\n <label for=\\\"name\\\">Channel Name</label>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"description\\\" class=\\\"new-channel-description\\\" autocomplete=\\\"aintsofunnow\\\" required=\\\"\\\">\\r\\n <label for=\\\"lastName\\\">Description (optional)</label>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"caption\\\">You can provide an optional description for your channel.</div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-next\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item addmembers-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Add Members</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-next\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item new-group-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">New Group</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"avatar-edit\\\">\\r\\n <canvas class=\\\"avatar-edit-canvas\\\"></canvas>\\r\\n <span class=\\\"tgico tgico-cameraadd\\\"></span>\\r\\n </div>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"name\\\" class=\\\"new-group-name\\\" autocomplete=\\\"feellikeamonster2112\\\" required=\\\"\\\">\\r\\n <label for=\\\"name\\\">Group Name</label>\\r\\n </div>\\r\\n </div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-next\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item settings-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Settings</div>\\r\\n <div class=\\\"btn-icon tgico-more rp btn-menu-toggle\\\">\\r\\n <div class=\\\"btn-menu bottom-left\\\">\\r\\n <div class=\\\"btn-menu-item menu-logout tgico-logout rp\\\">Log Out</div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"profile-content-wrapper scrollable scrollable-y\\\">\\r\\n <avatar-element class=\\\"profile-avatar\\\"></avatar-element>\\r\\n <div class=\\\"profile-name\\\"></div>\\r\\n <div class=\\\"profile-subtitle\\\"></div>\\r\\n <div class=\\\"profile-buttons\\\">\\r\\n <div class=\\\"profile-button menu-edit tgico-edit rp\\\"><p>Edit Profile</p></div>\\r\\n <div class=\\\"profile-button menu-general tgico-settings rp\\\"><p>General Settings</p></div>\\r\\n <div class=\\\"profile-button menu-notifications tgico-unmute rp\\\"><p>Notifications</p></div>\\r\\n <div class=\\\"profile-button menu-privacy tgico-lock rp\\\"><p>Privacy and Security</p></div>\\r\\n <div class=\\\"profile-button menu-language tgico-language rp\\\"><p>Language</p></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-slider-item edit-profile-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Edit Profile</div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"scroll-wrapper\\\">\\r\\n <div class=\\\"avatar-edit\\\">\\r\\n <canvas class=\\\"avatar-edit-canvas\\\"></canvas>\\r\\n <span class=\\\"tgico tgico-cameraadd\\\"></span>\\r\\n </div>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"name\\\" class=\\\"firstname\\\" autocomplete=\\\"xxDDqqOXJXC\\\" required=\\\"\\\">\\r\\n <label for=\\\"name\\\">Name</label>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"lastname\\\" class=\\\"lastname\\\" autocomplete=\\\"aintsofunnowzXCFF\\\" required=\\\"\\\">\\r\\n <label for=\\\"lastname\\\">Last Name</label>\\r\\n </div>\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"bio\\\" class=\\\"bio\\\" autocomplete=\\\"aintsofunnowhHQ\\\" required=\\\"\\\">\\r\\n <label for=\\\"bio\\\">Bio (optional)</label>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"caption\\\">Any details such as age, occupation or city. Example:<br>23 y.o. designer from San Francisco.</div>\\r\\n <hr/>\\r\\n <div class=\\\"sidebar-left-h2\\\">Username</div>\\r\\n <div class=\\\"input-wrapper\\\">\\r\\n <div class=\\\"input-field\\\">\\r\\n <input type=\\\"text\\\" name=\\\"username\\\" class=\\\"username\\\" autocomplete=\\\"xxDDqqOXffEER\\\" required=\\\"\\\">\\r\\n <label for=\\\"username\\\">Username (optional)</label>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"caption\\\">You can choose a username on Telegram. If you do, other people will be able to find you by this username and contact you without knowing your phone number.<br><br>You can use a-z, 0-9 and underscores. Minimum length is 5 characters.<br><br><div class=\\\"profile-url-container\\\">This link opens a chat with you:\\r\\n <br><a class=\\\"profile-url\\\" href=\\\"#\\\" target=\\\"_blank\\\"></a></div>\\r\\n </div>\\r\\n </div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-check\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"btn-menu\\\" id=\\\"dialogs-contextmenu\\\">\\r\\n <div class=\\\"btn-menu-item menu-unread tgico rp\\\"></div>\\r\\n <div class=\\\"btn-menu-item menu-pin tgico rp\\\"></div>\\r\\n <div class=\\\"btn-menu-item menu-mute tgico rp\\\"></div>\\r\\n <div class=\\\"btn-menu-item menu-archive tgico rp\\\"></div>\\r\\n <div class=\\\"btn-menu-item menu-delete tgico-delete danger rp\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"chat-container main-column\\\" id=\\\"column-center\\\">\\r\\n <canvas id=\\\"chat-background-canvas\\\"></canvas>\\r\\n <div id=\\\"topbar\\\" style=\\\"display: none;\\\" class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-back sidebar-close-button\\\"></button>\\r\\n <div class=\\\"chat-info\\\">\\r\\n <div class=\\\"person\\\">\\r\\n <avatar-element id=\\\"im-avatar\\\" dialog=\\\"1\\\"></avatar-element>\\r\\n <div class=\\\"content\\\">\\r\\n <div class=\\\"top\\\">\\r\\n <div class=\\\"user-title\\\" id=\\\"im-title\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"bottom\\\">\\r\\n <div class=\\\"info\\\" id=\\\"im-subtitle\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"pinned-message\\\">\\r\\n <div class=\\\"pinned-message-border\\\"></div>\\r\\n <div class=\\\"pinned-message-content\\\">\\r\\n <div class=\\\"pinned-message-title\\\">Pinned Message</div>\\r\\n <div class=\\\"pinned-message-subtitle\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"btn-icon rp chat-mute-button\\\" style=\\\"display: none;\\\"></div>\\r\\n <div class=\\\"btn-icon rp tgico-search chat-search-button\\\"></div>\\r\\n <div class=\\\"btn-icon btn-menu-toggle rp tgico-more chat-more-button\\\">\\r\\n <div class=\\\"btn-menu bottom-left\\\">\\r\\n <div class=\\\"btn-menu-item menu-mute rp\\\">Mute</div>\\r\\n <div class=\\\"btn-menu-item menu-delete tgico-delete danger rp\\\">Delete and Leave</div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div id=\\\"bubbles\\\" class=\\\"scrolled-down\\\">\\r\\n <div id=\\\"bubbles-inner\\\"></div>\\r\\n <div id=\\\"bubbles-go-down\\\" class=\\\"tgico-down z-depth-1 rp\\\" style=\\\"display: none;\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"btn-menu\\\" id=\\\"bubble-contextmenu\\\">\\r\\n <div class=\\\"btn-menu-item menu-reply tgico-reply rp\\\">Reply</div>\\r\\n <div class=\\\"btn-menu-item menu-edit tgico-edit rp\\\">Edit</div>\\r\\n <div class=\\\"btn-menu-item menu-copy tgico-copy rp\\\">Copy</div>\\r\\n <div class=\\\"btn-menu-item menu-pin tgico-pin rp\\\">Pin</div>\\r\\n <div class=\\\"btn-menu-item menu-forward tgico-forward rp\\\">Forward</div>\\r\\n <div class=\\\"btn-menu-item menu-delete tgico-delete danger rp\\\">Delete</div>\\r\\n </div>\\r\\n <div id=\\\"chat-input\\\" style=\\\"display: none;\\\">\\r\\n <!-- <div id=\\\"chat-input\\\"> -->\\r\\n <div class=\\\"emoji-dropdown\\\">\\r\\n <nav class=\\\"emoji-tabs menu-horizontal\\\">\\r\\n <ul>\\r\\n <li class=\\\"emoji-tabs-emoji rp\\\"><span>Emoji</span></li>\\r\\n <li class=\\\"emoji-tabs-stickers rp\\\"><span>Stickers</span></li>\\r\\n <li class=\\\"emoji-tabs-gifs rp\\\"><span>GIFs</span></li>\\r\\n </ul>\\r\\n </nav>\\r\\n <div class=\\\"emoji-container\\\">\\r\\n <div class=\\\"tabs-container\\\">\\r\\n <div class=\\\"emoji-padding\\\">\\r\\n <div id=\\\"content-emoji\\\"></div>\\r\\n <nav class=\\\"menu-horizontal\\\">\\r\\n <ul class=\\\"justify-start\\\">\\r\\n <li class=\\\"btn-icon tgico-recent rp\\\"></li>\\r\\n <li class=\\\"active btn-icon tgico-smile rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-animals rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-eats rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-car rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-sport rp\\\"></li>\\r\\n <li class=\\\"btn-icon tgico-lamp rp\\\"></li>\\r\\n <!-- <li class=\\\"btn-icon tgico-info rp\\\"></li> -->\\r\\n <li class=\\\"btn-icon tgico-flag rp\\\"></li>\\r\\n </ul>\\r\\n </nav>\\r\\n </div>\\r\\n <div class=\\\"stickers-padding\\\">\\r\\n <div id=\\\"content-stickers\\\"></div>\\r\\n <div class=\\\"menu-wrapper\\\">\\r\\n <nav class=\\\"menu-horizontal\\\">\\r\\n <ul class=\\\"justify-start\\\">\\r\\n <li class=\\\"btn-icon tgico-recent active\\\"></li>\\r\\n </ul>\\r\\n </nav>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"gifs-padding\\\">\\r\\n <div id=\\\"content-gifs\\\">\\r\\n <div class=\\\"gifs-masonry\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"input-message\\\">\\r\\n <div class=\\\"reply-wrapper\\\">\\r\\n <button class=\\\"btn-icon rp tgico-close reply-cancel\\\"></button>\\r\\n <div class=\\\"reply\\\">\\r\\n <div class=\\\"reply-border\\\"></div>\\r\\n <div class=\\\"reply-content\\\">\\r\\n <div class=\\\"reply-title\\\"></div>\\r\\n <div class=\\\"reply-subtitle\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"new-message-wrapper\\\">\\r\\n <button class=\\\"btn-icon rp tgico-smile toggle-emoticons\\\"></button>\\r\\n <!-- <textarea type=\\\"text\\\" id=\\\"input-message\\\" placeholder=\\\"Message\\\" contenteditable=\\\"true\\\"></textarea> -->\\r\\n <div class=\\\"input-message-container\\\">\\r\\n <div id=\\\"input-message\\\" contenteditable=\\\"true\\\" data-placeholder=\\\"Message\\\"></div>\\r\\n </div>\\r\\n <button class=\\\"btn-icon rp tgico-attach btn-menu-toggle\\\" id=\\\"attach-file\\\">\\r\\n <div class=\\\"btn-menu top-left\\\">\\r\\n <div class=\\\"btn-menu-item menu-media tgico-photo rp\\\">Photo or Video</div>\\r\\n <div class=\\\"btn-menu-item menu-document tgico-document rp\\\">Document</div>\\r\\n <div class=\\\"btn-menu-item menu-poll tgico-poll rp\\\">Poll</div>\\r\\n </div>\\r\\n </button>\\r\\n <div class=\\\"record-time\\\"></div>\\r\\n <input type=\\\"file\\\" id=\\\"input-file\\\" style=\\\"display: none;\\\" multiple />\\r\\n </div>\\r\\n </div>\\r\\n <button class=\\\"btn-circle z-depth-1 btn-icon tgico-delete danger\\\" id=\\\"btn-record-cancel\\\"></button>\\r\\n <div class=\\\"btn-send-container\\\">\\r\\n <div class=\\\"record-ripple\\\"></div>\\r\\n <button class=\\\"btn-circle z-depth-1 btn-icon tgico-microphone2\\\" id=\\\"btn-send\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar sidebar-right main-column\\\" id=\\\"column-right\\\">\\r\\n <div class=\\\"sidebar-content\\\">\\r\\n <div class=\\\"profile-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-close sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Info</div>\\r\\n \\r\\n <!-- <button class=\\\"btn-icon rp tgico-edit sidebar-edit-button\\\"></button> -->\\r\\n \\r\\n <div class=\\\"btn-icon tgico-more rp\\\"></div>\\r\\n <!-- <div class=\\\"btn-icon tgico-more rp btn-menu-toggle\\\">\\r\\n <div class=\\\"btn-menu bottom-left\\\"> -->\\r\\n <!-- <div class=\\\"btn-menu-item menu-mute rp\\\">Mute</div>\\r\\n <div class=\\\"btn-menu-item menu-delete tgico-delete danger rp\\\">Delete and Leave</div> -->\\r\\n <!-- </div>\\r\\n </div> -->\\r\\n </div>\\r\\n <div class=\\\"profile-content\\\">\\r\\n <div class=\\\"profile-content-wrapper\\\">\\r\\n <avatar-element class=\\\"profile-avatar\\\" dialog=\\\"1\\\"></avatar-element>\\r\\n <div class=\\\"profile-name\\\"></div>\\r\\n <div class=\\\"profile-subtitle\\\"></div>\\r\\n \\r\\n <div class=\\\"profile-row profile-row-bio tgico-info\\\">\\r\\n <p></p>\\r\\n <p class=\\\"profile-row-label\\\">Bio</p>\\r\\n </div>\\r\\n <div class=\\\"profile-row profile-row-username tgico-username\\\">\\r\\n <p></p>\\r\\n <p class=\\\"profile-row-label\\\">Username</p>\\r\\n </div>\\r\\n <div class=\\\"profile-row profile-row-phone tgico-phone\\\">\\r\\n <p></p>\\r\\n <p class=\\\"profile-row-label\\\">Phone</p>\\r\\n </div>\\r\\n <div class=\\\"profile-row profile-row-notifications\\\">\\r\\n <label>\\r\\n <input type=\\\"checkbox\\\" id=\\\"profile-notifications\\\" checked=\\\"checked\\\">\\r\\n <span>Notifications</span>\\r\\n </label>\\r\\n <p class=\\\"profile-row-label\\\">Enabled</p>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"content-container\\\">\\r\\n <nav class=\\\"profile-tabs menu-horizontal\\\">\\r\\n <ul>\\r\\n <li class=\\\"profile-tabs-members rp\\\" style=\\\"display: none;\\\"><span>Members</span></li>\\r\\n <li class=\\\"profile-tabs-media rp\\\"><span>Media</span></li>\\r\\n <li class=\\\"profile-tabs-docs rp\\\"><span>Docs</span></li>\\r\\n <li class=\\\"profile-tabs-links rp\\\"><span>Links</span></li>\\r\\n <li class=\\\"profile-tabs-audio rp\\\"><span>Audio</span></li>\\r\\n </ul>\\r\\n </nav>\\r\\n <div class=\\\"profile-tabs-content tabs-container\\\">\\r\\n <div class=\\\"content-members-container\\\"><div id=\\\"content-members\\\"></div></div>\\r\\n <div class=\\\"content-media-container\\\"><div id=\\\"content-media\\\"></div></div>\\r\\n <div class=\\\"content-docs-container\\\"><div id=\\\"content-docs\\\"></div></div>\\r\\n <div class=\\\"content-links-container\\\"><div id=\\\"content-links\\\"></div></div>\\r\\n <div class=\\\"content-audio-container\\\"><div id=\\\"content-audio\\\"></div></div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-search chats-container\\\" id=\\\"search-private-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-close sidebar-close-button\\\"></button>\\r\\n <div class=\\\"input-search\\\">\\r\\n <input type=\\\"text\\\" placeholder=\\\"Search\\\" id=\\\"private-search\\\" />\\r\\n <span class=\\\"tgico tgico-search\\\"></span>\\r\\n </div>\\r\\n </div>\\r\\n <div class=\\\"chats-container\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"sidebar-search\\\" id=\\\"forward-container\\\">\\r\\n <div class=\\\"sidebar-header\\\">\\r\\n <button class=\\\"btn-icon rp tgico-close sidebar-close-button\\\"></button>\\r\\n <div class=\\\"sidebar-header__title\\\">Forward</div>\\r\\n </div>\\r\\n <button class=\\\"btn-primary btn-circle btn-icon rp btn-corner tgico-send\\\"></button>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n\"\n + ((stack1 = lookupProperty(helpers,\"each\").call(alias1,((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"htmlWebpackPlugin\") : depth0)) != null ? lookupProperty(stack1,\"files\") : stack1)) != null ? lookupProperty(stack1,\"js\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":584,\"column\":2},\"end\":{\"line\":586,\"column\":12}}})) != null ? stack1 : \"\")\n + ((stack1 = lookupProperty(helpers,\"each\").call(alias1,((stack1 = ((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"htmlWebpackPlugin\") : depth0)) != null ? lookupProperty(stack1,\"files\") : stack1)) != null ? lookupProperty(stack1,\"extracted\") : stack1)) != null ? lookupProperty(stack1,\"js\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":587,\"column\":2},\"end\":{\"line\":589,\"column\":12}}})) != null ? stack1 : \"\")\n + \"</html>\\r\\n\";\n},\"useData\":true});"
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"index": 1,
"index2": 22,
"size": 167,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"issuerId": 7,
"issuerName": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
}
],
"profile": {
"factory": 1473,
"building": 12
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"module": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"moduleName": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"type": "cjs require",
"userRequest": "../node_modules/handlebars/runtime.js",
"loc": "1:17-65"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "// Create a simple path alias to allow browserify to resolve\n// the runtime on a supported path.\nmodule.exports = require('./dist/cjs/handlebars.runtime')['default'];\n"
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"index": 2,
"index2": 21,
"size": 4606,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"issuerId": 8,
"issuerName": "./node_modules/handlebars/runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
}
],
"profile": {
"factory": 1891,
"building": 413
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./dist/cjs/handlebars.runtime",
"loc": "3:17-57"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n// istanbul ignore next\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\nvar _handlebarsBase = require('./handlebars/base');\n\nvar base = _interopRequireWildcard(_handlebarsBase);\n\n// Each of these augment the Handlebars object. No need to setup here.\n// (This is done to easily share code between commonjs and browse envs)\n\nvar _handlebarsSafeString = require('./handlebars/safe-string');\n\nvar _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);\n\nvar _handlebarsException = require('./handlebars/exception');\n\nvar _handlebarsException2 = _interopRequireDefault(_handlebarsException);\n\nvar _handlebarsUtils = require('./handlebars/utils');\n\nvar Utils = _interopRequireWildcard(_handlebarsUtils);\n\nvar _handlebarsRuntime = require('./handlebars/runtime');\n\nvar runtime = _interopRequireWildcard(_handlebarsRuntime);\n\nvar _handlebarsNoConflict = require('./handlebars/no-conflict');\n\nvar _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);\n\n// For compatibility and usage outside of module systems, make the Handlebars object a namespace\nfunction create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}\n\nvar inst = create();\ninst.create = create;\n\n_handlebarsNoConflict2['default'](inst);\n\ninst['default'] = inst;\n\nexports['default'] = inst;\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OEJBQXNCLG1CQUFtQjs7SUFBN0IsSUFBSTs7Ozs7b0NBSU8sMEJBQTBCOzs7O21DQUMzQix3QkFBd0I7Ozs7K0JBQ3ZCLG9CQUFvQjs7SUFBL0IsS0FBSzs7aUNBQ1Esc0JBQXNCOztJQUFuQyxPQUFPOztvQ0FFSSwwQkFBMEI7Ozs7O0FBR2pELFNBQVMsTUFBTSxHQUFHO0FBQ2hCLE1BQUksRUFBRSxHQUFHLElBQUksSUFBSSxDQUFDLHFCQUFxQixFQUFFLENBQUM7O0FBRTFDLE9BQUssQ0FBQyxNQUFNLENBQUMsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQ3ZCLElBQUUsQ0FBQyxVQUFVLG9DQUFhLENBQUM7QUFDM0IsSUFBRSxDQUFDLFNBQVMsbUNBQVksQ0FBQztBQUN6QixJQUFFLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQztBQUNqQixJQUFFLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDLGdCQUFnQixDQUFDOztBQUU3QyxJQUFFLENBQUMsRUFBRSxHQUFHLE9BQU8sQ0FBQztBQUNoQixJQUFFLENBQUMsUUFBUSxHQUFHLFVBQVMsSUFBSSxFQUFFO0FBQzNCLFdBQU8sT0FBTyxDQUFDLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLENBQUM7R0FDbkMsQ0FBQzs7QUFFRixTQUFPLEVBQUUsQ0FBQztDQUNYOztBQUVELElBQUksSUFBSSxHQUFHLE1BQU0sRUFBRSxDQUFDO0FBQ3BCLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDOztBQUVyQixrQ0FBVyxJQUFJLENBQUMsQ0FBQzs7QUFFakIsSUFBSSxDQUFDLFNBQVMsQ0FBQyxHQUFHLElBQUksQ0FBQzs7cUJBRVIsSUFBSSIsImZpbGUiOiJoYW5kbGViYXJzLnJ1bnRpbWUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBiYXNlIGZyb20gJy4vaGFuZGxlYmFycy9iYXNlJztcblxuLy8gRWFjaCBvZiB0aGVzZSBhdWdtZW50IHRoZSBIYW5kbGViYXJzIG9iamVjdC4gTm8gbmVlZCB0byBzZXR1cCBoZXJlLlxuLy8gKFRoaXMgaXMgZG9uZSB0byBlYXNpbHkgc2hhcmUgY29kZSBiZXR3ZWVuIGNvbW1vbmpzIGFuZCBicm93c2UgZW52cylcbmltcG9ydCBTYWZlU3RyaW5nIGZyb20gJy4vaGFuZGxlYmFycy9zYWZlLXN0cmluZyc7XG5pbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4vaGFuZGxlYmFycy9leGNlcHRpb24nO1xuaW1wb3J0ICogYXMgVXRpbHMgZnJvbSAnLi9oYW5kbGViYXJzL3V0aWxzJztcbmltcG9ydCAqIGFzIHJ1bnRpbWUgZnJvbSAnLi9oYW5kbGViYXJzL3J1bnRpbWUnO1xuXG5pbXBvcnQgbm9Db25mbGljdCBmcm9tICcuL2hhbmRsZWJhcnMvbm8tY29uZmxpY3QnO1xuXG4vLyBGb3IgY29tcGF0aWJpbGl0eSBhbmQgdXNhZ2Ugb3V0c2lkZSBvZiBtb2R1bGUgc3lzdGVtcywgbWFrZSB0aGUgSGFuZGxlYmFycyBvYmplY3QgYSBuYW1lc3BhY2VcbmZ1bmN0aW9uIGNyZWF0ZSgpIHtcbiAgbGV0IGhiID0gbmV3IGJhc2UuSGFuZGxlYmFyc0Vudmlyb25tZW50KCk7XG5cbiAgVXRpbHMuZXh0ZW5kKGhiLCBiYXNlKTtcbiAgaGIuU2FmZVN0cmluZyA9IFNhZmVTdHJpbmc7XG4gIGhiLkV4Y2VwdGlvbiA9IEV4Y2VwdGlvbjtcbiAgaGIuVXRpbHMgPSBVdGlscztcbiAgaGIuZXNjYXBlRXhwcmVzc2lvbiA9IFV0aWxzLmVzY2FwZUV4cHJlc3Npb247XG5cbiAgaGIuVk0gPSBydW50aW1lO1xuICBoYi50ZW1wbGF0ZSA9IGZ1bmN0aW9uKHNwZWMpIHtcbiAgICByZXR1cm4gcnVudGltZS50ZW1wbGF0ZShzcGVjLCBoYik7XG4gIH07XG5cbiAgcmV0dXJuIGhiO1xufVxuXG5sZXQgaW5zdCA9IGNyZWF0ZSgpO1xuaW5zdC5jcmVhdGUgPSBjcmVhdGU7XG5cbm5vQ29uZmxpY3QoaW5zdCk7XG5cbmluc3RbJ2RlZmF1bHQnXSA9IGluc3Q7XG5cbmV4cG9ydCBkZWZhdWx0IGluc3Q7XG4iXX0=\n"
},
{
"id": 10,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\block-helper-missing.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js",
"index": 7,
"index2": 2,
"size": 3831,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/block-helper-missing",
"loc": "10:33-74"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n\nvar _utils = require('../utils');\n\nexports['default'] = function (instance) {\n instance.registerHelper('blockHelperMissing', function (context, options) {\n var inverse = options.inverse,\n fn = options.fn;\n\n if (context === true) {\n return fn(this);\n } else if (context === false || context == null) {\n return inverse(this);\n } else if (_utils.isArray(context)) {\n if (context.length > 0) {\n if (options.ids) {\n options.ids = [options.name];\n }\n\n return instance.helpers.each(context, options);\n } else {\n return inverse(this);\n }\n } else {\n if (options.data && options.ids) {\n var data = _utils.createFrame(options.data);\n data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);\n options = { data: data };\n }\n\n return fn(context, options);\n }\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztxQkFBd0QsVUFBVTs7cUJBRW5ELFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFFBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1FBQzNCLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVsQixRQUFJLE9BQU8sS0FBSyxJQUFJLEVBQUU7QUFDcEIsYUFBTyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDakIsTUFBTSxJQUFJLE9BQU8sS0FBSyxLQUFLLElBQUksT0FBTyxJQUFJLElBQUksRUFBRTtBQUMvQyxhQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN0QixNQUFNLElBQUksZUFBUSxPQUFPLENBQUMsRUFBRTtBQUMzQixVQUFJLE9BQU8sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFO0FBQ3RCLFlBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUNmLGlCQUFPLENBQUMsR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO1NBQzlCOztBQUVELGVBQU8sUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO09BQ2hELE1BQU07QUFDTCxlQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztPQUN0QjtLQUNGLE1BQU07QUFDTCxVQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixZQUFJLElBQUksR0FBRyxtQkFBWSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDckMsWUFBSSxDQUFDLFdBQVcsR0FBRyx5QkFDakIsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQ3hCLE9BQU8sQ0FBQyxJQUFJLENBQ2IsQ0FBQztBQUNGLGVBQU8sR0FBRyxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsQ0FBQztPQUMxQjs7QUFFRCxhQUFPLEVBQUUsQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7S0FDN0I7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJibG9jay1oZWxwZXItbWlzc2luZy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGFwcGVuZENvbnRleHRQYXRoLCBjcmVhdGVGcmFtZSwgaXNBcnJheSB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2Jsb2NrSGVscGVyTWlzc2luZycsIGZ1bmN0aW9uKGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgICBsZXQgaW52ZXJzZSA9IG9wdGlvbnMuaW52ZXJzZSxcbiAgICAgIGZuID0gb3B0aW9ucy5mbjtcblxuICAgIGlmIChjb250ZXh0ID09PSB0cnVlKSB7XG4gICAgICByZXR1cm4gZm4odGhpcyk7XG4gICAgfSBlbHNlIGlmIChjb250ZXh0ID09PSBmYWxzZSB8fCBjb250ZXh0ID09IG51bGwpIHtcbiAgICAgIHJldHVybiBpbnZlcnNlKHRoaXMpO1xuICAgIH0gZWxzZSBpZiAoaXNBcnJheShjb250ZXh0KSkge1xuICAgICAgaWYgKGNvbnRleHQubGVuZ3RoID4gMCkge1xuICAgICAgICBpZiAob3B0aW9ucy5pZHMpIHtcbiAgICAgICAgICBvcHRpb25zLmlkcyA9IFtvcHRpb25zLm5hbWVdO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGluc3RhbmNlLmhlbHBlcnMuZWFjaChjb250ZXh0LCBvcHRpb25zKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBpbnZlcnNlKHRoaXMpO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuaWRzKSB7XG4gICAgICAgIGxldCBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGFwcGVuZENvbnRleHRQYXRoKFxuICAgICAgICAgIG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCxcbiAgICAgICAgICBvcHRpb25zLm5hbWVcbiAgICAgICAgKTtcbiAgICAgICAgb3B0aW9ucyA9IHsgZGF0YTogZGF0YSB9O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwgb3B0aW9ucyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 11,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\each.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/each.js",
"index": 8,
"index2": 4,
"size": 9894,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/each",
"loc": "14:19-44"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utils = require('../utils');\n\nvar _exception = require('../exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nexports['default'] = function (instance) {\n instance.registerHelper('each', function (context, options) {\n if (!options) {\n throw new _exception2['default']('Must pass iterator to #each');\n }\n\n var fn = options.fn,\n inverse = options.inverse,\n i = 0,\n ret = '',\n data = undefined,\n contextPath = undefined;\n\n if (options.data && options.ids) {\n contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';\n }\n\n if (_utils.isFunction(context)) {\n context = context.call(this);\n }\n\n if (options.data) {\n data = _utils.createFrame(options.data);\n }\n\n function execIteration(field, index, last) {\n if (data) {\n data.key = field;\n data.index = index;\n data.first = index === 0;\n data.last = !!last;\n\n if (contextPath) {\n data.contextPath = contextPath + field;\n }\n }\n\n ret = ret + fn(context[field], {\n data: data,\n blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])\n });\n }\n\n if (context && typeof context === 'object') {\n if (_utils.isArray(context)) {\n for (var j = context.length; i < j; i++) {\n if (i in context) {\n execIteration(i, i, i === context.length - 1);\n }\n }\n } else if (global.Symbol && context[global.Symbol.iterator]) {\n var newContext = [];\n var iterator = context[global.Symbol.iterator]();\n for (var it = iterator.next(); !it.done; it = iterator.next()) {\n newContext.push(it.value);\n }\n context = newContext;\n for (var j = context.length; i < j; i++) {\n execIteration(i, i, i === context.length - 1);\n }\n } else {\n (function () {\n var priorKey = undefined;\n\n Object.keys(context).forEach(function (key) {\n // We're running the iterations one step out of sync so we can detect\n // the last iteration without have to scan the object twice and create\n // an itermediate keys array.\n if (priorKey !== undefined) {\n execIteration(priorKey, i - 1);\n }\n priorKey = key;\n i++;\n });\n if (priorKey !== undefined) {\n execIteration(priorKey, i - 1, true);\n }\n })();\n }\n }\n\n if (i === 0) {\n ret = inverse(this);\n }\n\n return ret;\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvZWFjaC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3FCQU1PLFVBQVU7O3lCQUNLLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsTUFBTSxFQUFFLFVBQVMsT0FBTyxFQUFFLE9BQU8sRUFBRTtBQUN6RCxRQUFJLENBQUMsT0FBTyxFQUFFO0FBQ1osWUFBTSwyQkFBYyw2QkFBNkIsQ0FBQyxDQUFDO0tBQ3BEOztBQUVELFFBQUksRUFBRSxHQUFHLE9BQU8sQ0FBQyxFQUFFO1FBQ2pCLE9BQU8sR0FBRyxPQUFPLENBQUMsT0FBTztRQUN6QixDQUFDLEdBQUcsQ0FBQztRQUNMLEdBQUcsR0FBRyxFQUFFO1FBQ1IsSUFBSSxZQUFBO1FBQ0osV0FBVyxZQUFBLENBQUM7O0FBRWQsUUFBSSxPQUFPLENBQUMsSUFBSSxJQUFJLE9BQU8sQ0FBQyxHQUFHLEVBQUU7QUFDL0IsaUJBQVcsR0FDVCx5QkFBa0IsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLEdBQUcsQ0FBQztLQUNyRTs7QUFFRCxRQUFJLGtCQUFXLE9BQU8sQ0FBQyxFQUFFO0FBQ3ZCLGFBQU8sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQzlCOztBQUVELFFBQUksT0FBTyxDQUFDLElBQUksRUFBRTtBQUNoQixVQUFJLEdBQUcsbUJBQVksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQ2xDOztBQUVELGFBQVMsYUFBYSxDQUFDLEtBQUssRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFO0FBQ3pDLFVBQUksSUFBSSxFQUFFO0FBQ1IsWUFBSSxDQUFDLEdBQUcsR0FBRyxLQUFLLENBQUM7QUFDakIsWUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7QUFDbkIsWUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLEtBQUssQ0FBQyxDQUFDO0FBQ3pCLFlBQUksQ0FBQyxJQUFJLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQzs7QUFFbkIsWUFBSSxXQUFXLEVBQUU7QUFDZixjQUFJLENBQUMsV0FBVyxHQUFHLFdBQVcsR0FBRyxLQUFLLENBQUM7U0FDeEM7T0FDRjs7QUFFRCxTQUFHLEdBQ0QsR0FBRyxHQUNILEVBQUUsQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUU7QUFDakIsWUFBSSxFQUFFLElBQUk7QUFDVixtQkFBVyxFQUFFLG1CQUNYLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxFQUFFLEtBQUssQ0FBQyxFQUN2QixDQUFDLFdBQVcsR0FBRyxLQUFLLEVBQUUsSUFBSSxDQUFDLENBQzVCO09BQ0YsQ0FBQyxDQUFDO0tBQ047O0FBRUQsUUFBSSxPQUFPLElBQUksT0FBTyxPQUFPLEtBQUssUUFBUSxFQUFFO0FBQzFDLFVBQUksZUFBUSxPQUFPLENBQUMsRUFBRTtBQUNwQixhQUFLLElBQUksQ0FBQyxHQUFHLE9BQU8sQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUN2QyxjQUFJLENBQUMsSUFBSSxPQUFPLEVBQUU7QUFDaEIseUJBQWEsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsS0FBSyxPQUFPLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO1dBQy9DO1NBQ0Y7T0FDRixNQUFNLElBQUksTUFBTSxDQUFDLE1BQU0sSUFBSSxPQUFPLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsRUFBRTtBQUMzRCxZQUFNLFVBQVUsR0FBRyxFQUFFLENBQUM7QUFDdEIsWUFBTSxRQUFRLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQztBQUNuRCxhQUFLLElBQUksRUFBRSxHQUFHLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLEVBQUUsQ0FBQyxJQUFJLEVBQUUsRUFBRSxHQUFHLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRTtBQUM3RCxvQkFBVSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsS0FBSyxDQUFDLENBQUM7U0FDM0I7QUFDRCxlQUFPLEdBQUcsVUFBVSxDQUFDO0FBQ3JCLGFBQUssSUFBSSxDQUFDLEdBQUcsT0FBTyxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQ3ZDLHVCQUFhLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEtBQUssT0FBTyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztTQUMvQztPQUNGLE1BQU07O0FBQ0wsY0FBSSxRQUFRLFlBQUEsQ0FBQzs7QUFFYixnQkFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQSxHQUFHLEVBQUk7Ozs7QUFJbEMsZ0JBQUksUUFBUSxLQUFLLFNBQVMsRUFBRTtBQUMxQiwyQkFBYSxDQUFDLFFBQVEsRUFBRSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7YUFDaEM7QUFDRCxvQkFBUSxHQUFHLEdBQUcsQ0FBQztBQUNmLGFBQUMsRUFBRSxDQUFDO1dBQ0wsQ0FBQyxDQUFDO0FBQ0gsY0FBSSxRQUFRLEtBQUssU0FBUyxFQUFFO0FBQzFCLHlCQUFhLENBQUMsUUFBUSxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsSUFBSSxDQUFDLENBQUM7V0FDdEM7O09BQ0Y7S0FDRjs7QUFFRCxRQUFJLENBQUMsS0FBSyxDQUFDLEVBQUU7QUFDWCxTQUFHLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQ3JCOztBQUVELFdBQU8sR0FBRyxDQUFDO0dBQ1osQ0FBQyxDQUFDO0NBQ0oiLCJmaWxlIjoiZWFjaC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIGFwcGVuZENvbnRleHRQYXRoLFxuICBibG9ja1BhcmFtcyxcbiAgY3JlYXRlRnJhbWUsXG4gIGlzQXJyYXksXG4gIGlzRnVuY3Rpb25cbn0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IEV4Y2VwdGlvbiBmcm9tICcuLi9leGNlcHRpb24nO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihpbnN0YW5jZSkge1xuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcignZWFjaCcsIGZ1bmN0aW9uKGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgICBpZiAoIW9wdGlvbnMpIHtcbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ011c3QgcGFzcyBpdGVyYXRvciB0byAjZWFjaCcpO1xuICAgIH1cblxuICAgIGxldCBmbiA9IG9wdGlvbnMuZm4sXG4gICAgICBpbnZlcnNlID0gb3B0aW9ucy5pbnZlcnNlLFxuICAgICAgaSA9IDAsXG4gICAgICByZXQgPSAnJyxcbiAgICAgIGRhdGEsXG4gICAgICBjb250ZXh0UGF0aDtcblxuICAgIGlmIChvcHRpb25zLmRhdGEgJiYgb3B0aW9ucy5pZHMpIHtcbiAgICAgIGNvbnRleHRQYXRoID1cbiAgICAgICAgYXBwZW5kQ29udGV4dFBhdGgob3B0aW9ucy5kYXRhLmNvbnRleHRQYXRoLCBvcHRpb25zLmlkc1swXSkgKyAnLic7XG4gICAgfVxuXG4gICAgaWYgKGlzRnVuY3Rpb24oY29udGV4dCkpIHtcbiAgICAgIGNvbnRleHQgPSBjb250ZXh0LmNhbGwodGhpcyk7XG4gICAgfVxuXG4gICAgaWYgKG9wdGlvbnMuZGF0YSkge1xuICAgICAgZGF0YSA9IGNyZWF0ZUZyYW1lKG9wdGlvbnMuZGF0YSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZXhlY0l0ZXJhdGlvbihmaWVsZCwgaW5kZXgsIGxhc3QpIHtcbiAgICAgIGlmIChkYXRhKSB7XG4gICAgICAgIGRhdGEua2V5ID0gZmllbGQ7XG4gICAgICAgIGRhdGEuaW5kZXggPSBpbmRleDtcbiAgICAgICAgZGF0YS5maXJzdCA9IGluZGV4ID09PSAwO1xuICAgICAgICBkYXRhLmxhc3QgPSAhIWxhc3Q7XG5cbiAgICAgICAgaWYgKGNvbnRleHRQYXRoKSB7XG4gICAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGNvbnRleHRQYXRoICsgZmllbGQ7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmV0ID1cbiAgICAgICAgcmV0ICtcbiAgICAgICAgZm4oY29udGV4dFtmaWVsZF0sIHtcbiAgICAgICAgICBkYXRhOiBkYXRhLFxuICAgICAgICAgIGJsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhcbiAgICAgICAgICAgIFtjb250ZXh0W2ZpZWxkXSwgZmllbGRdLFxuICAgICAgICAgICAgW2NvbnRleHRQYXRoICsgZmllbGQsIG51bGxdXG4gICAgICAgICAgKVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAoY29udGV4dCAmJiB0eXBlb2YgY29udGV4dCA9PT0gJ29iamVjdCcpIHtcbiAgICAgIGlmIChpc0FycmF5KGNvbnRleHQpKSB7XG4gICAgICAgIGZvciAobGV0IGogPSBjb250ZXh0Lmxlbmd0aDsgaSA8IGo7IGkrKykge1xuICAgICAgICAgIGlmIChpIGluIGNvbnRleHQpIHtcbiAgICAgICAgICAgIGV4ZWNJdGVyYXRpb24oaSwgaSwgaSA9PT0gY29udGV4dC5sZW5ndGggLSAxKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoZ2xvYmFsLlN5bWJvbCAmJiBjb250ZXh0W2dsb2JhbC5TeW1ib2wuaXRlcmF0b3JdKSB7XG4gICAgICAgIGNvbnN0IG5ld0NvbnRleHQgPSBbXTtcbiAgICAgICAgY29uc3QgaXRlcmF0b3IgPSBjb250ZXh0W2dsb2JhbC5TeW1ib2wuaXRlcmF0b3JdKCk7XG4gICAgICAgIGZvciAobGV0IGl0ID0gaXRlcmF0b3IubmV4dCgpOyAhaXQuZG9uZTsgaXQgPSBpdGVyYXRvci5uZXh0KCkpIHtcbiAgICAgICAgICBuZXdDb250ZXh0LnB1c2goaXQudmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnRleHQgPSBuZXdDb250ZXh0O1xuICAgICAgICBmb3IgKGxldCBqID0gY29udGV4dC5sZW5ndGg7IGkgPCBqOyBpKyspIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKGksIGksIGkgPT09IGNvbnRleHQubGVuZ3RoIC0gMSk7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGxldCBwcmlvcktleTtcblxuICAgICAgICBPYmplY3Qua2V5cyhjb250ZXh0KS5mb3JFYWNoKGtleSA9PiB7XG4gICAgICAgICAgLy8gV2UncmUgcnVubmluZyB0aGUgaXRlcmF0aW9ucyBvbmUgc3RlcCBvdXQgb2Ygc3luYyBzbyB3ZSBjYW4gZGV0ZWN0XG4gICAgICAgICAgLy8gdGhlIGxhc3QgaXRlcmF0aW9uIHdpdGhvdXQgaGF2ZSB0byBzY2FuIHRoZSBvYmplY3QgdHdpY2UgYW5kIGNyZWF0ZVxuICAgICAgICAgIC8vIGFuIGl0ZXJtZWRpYXRlIGtleXMgYXJyYXkuXG4gICAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGV4ZWNJdGVyYXRpb24ocHJpb3JLZXksIGkgLSAxKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcHJpb3JLZXkgPSBrZXk7XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9KTtcbiAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgcmV0ID0gaW52ZXJzZSh0aGlzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\helper-missing.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js",
"index": 10,
"index2": 5,
"size": 2013,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/helper-missing",
"loc": "18:28-63"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _exception = require('../exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nexports['default'] = function (instance) {\n instance.registerHelper('helperMissing', function () /* [args, ]options */{\n if (arguments.length === 1) {\n // A missing field in a {{foo}} construct.\n return undefined;\n } else {\n // Someone is actually trying to call something, blow up.\n throw new _exception2['default']('Missing helper: \"' + arguments[arguments.length - 1].name + '\"');\n }\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozt5QkFBc0IsY0FBYzs7OztxQkFFckIsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxlQUFlLEVBQUUsaUNBQWdDO0FBQ3ZFLFFBQUksU0FBUyxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7O0FBRTFCLGFBQU8sU0FBUyxDQUFDO0tBQ2xCLE1BQU07O0FBRUwsWUFBTSwyQkFDSixtQkFBbUIsR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUNqRSxDQUFDO0tBQ0g7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJoZWxwZXItbWlzc2luZy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBFeGNlcHRpb24gZnJvbSAnLi4vZXhjZXB0aW9uJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2hlbHBlck1pc3NpbmcnLCBmdW5jdGlvbigvKiBbYXJncywgXW9wdGlvbnMgKi8pIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgLy8gQSBtaXNzaW5nIGZpZWxkIGluIGEge3tmb299fSBjb25zdHJ1Y3QuXG4gICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBTb21lb25lIGlzIGFjdHVhbGx5IHRyeWluZyB0byBjYWxsIHNvbWV0aGluZywgYmxvdyB1cC5cbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oXG4gICAgICAgICdNaXNzaW5nIGhlbHBlcjogXCInICsgYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXS5uYW1lICsgJ1wiJ1xuICAgICAgKTtcbiAgICB9XG4gIH0pO1xufVxuIl19\n"
},
{
"id": 13,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\if.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/if.js",
"index": 11,
"index2": 6,
"size": 4458,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/if",
"loc": "22:17-40"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utils = require('../utils');\n\nvar _exception = require('../exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nexports['default'] = function (instance) {\n instance.registerHelper('if', function (conditional, options) {\n if (arguments.length != 2) {\n throw new _exception2['default']('#if requires exactly one argument');\n }\n if (_utils.isFunction(conditional)) {\n conditional = conditional.call(this);\n }\n\n // Default behavior is to render the positive path if the value is truthy and not empty.\n // The `includeZero` option may be set to treat the condtional as purely not empty based on the\n // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.\n if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {\n return options.inverse(this);\n } else {\n return options.fn(this);\n }\n });\n\n instance.registerHelper('unless', function (conditional, options) {\n if (arguments.length != 2) {\n throw new _exception2['default']('#unless requires exactly one argument');\n }\n return instance.helpers['if'].call(this, conditional, {\n fn: options.inverse,\n inverse: options.fn,\n hash: options.hash\n });\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztxQkFBb0MsVUFBVTs7eUJBQ3hCLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyxFQUFFLE9BQU8sRUFBRTtBQUMzRCxRQUFJLFNBQVMsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3pCLFlBQU0sMkJBQWMsbUNBQW1DLENBQUMsQ0FBQztLQUMxRDtBQUNELFFBQUksa0JBQVcsV0FBVyxDQUFDLEVBQUU7QUFDM0IsaUJBQVcsR0FBRyxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQ3RDOzs7OztBQUtELFFBQUksQUFBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLENBQUMsV0FBVyxJQUFLLGVBQVEsV0FBVyxDQUFDLEVBQUU7QUFDdkUsYUFBTyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQzlCLE1BQU07QUFDTCxhQUFPLE9BQU8sQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDekI7R0FDRixDQUFDLENBQUM7O0FBRUgsVUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxXQUFXLEVBQUUsT0FBTyxFQUFFO0FBQy9ELFFBQUksU0FBUyxDQUFDLE1BQU0sSUFBSSxDQUFDLEVBQUU7QUFDekIsWUFBTSwyQkFBYyx1Q0FBdUMsQ0FBQyxDQUFDO0tBQzlEO0FBQ0QsV0FBTyxRQUFRLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsV0FBVyxFQUFFO0FBQ3BELFFBQUUsRUFBRSxPQUFPLENBQUMsT0FBTztBQUNuQixhQUFPLEVBQUUsT0FBTyxDQUFDLEVBQUU7QUFDbkIsVUFBSSxFQUFFLE9BQU8sQ0FBQyxJQUFJO0tBQ25CLENBQUMsQ0FBQztHQUNKLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6ImlmLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgaXNFbXB0eSwgaXNGdW5jdGlvbiB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCBFeGNlcHRpb24gZnJvbSAnLi4vZXhjZXB0aW9uJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2lmJywgZnVuY3Rpb24oY29uZGl0aW9uYWwsIG9wdGlvbnMpIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCAhPSAyKSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCcjaWYgcmVxdWlyZXMgZXhhY3RseSBvbmUgYXJndW1lbnQnKTtcbiAgICB9XG4gICAgaWYgKGlzRnVuY3Rpb24oY29uZGl0aW9uYWwpKSB7XG4gICAgICBjb25kaXRpb25hbCA9IGNvbmRpdGlvbmFsLmNhbGwodGhpcyk7XG4gICAgfVxuXG4gICAgLy8gRGVmYXVsdCBiZWhhdmlvciBpcyB0byByZW5kZXIgdGhlIHBvc2l0aXZlIHBhdGggaWYgdGhlIHZhbHVlIGlzIHRydXRoeSBhbmQgbm90IGVtcHR5LlxuICAgIC8vIFRoZSBgaW5jbHVkZVplcm9gIG9wdGlvbiBtYXkgYmUgc2V0IHRvIHRyZWF0IHRoZSBjb25kdGlvbmFsIGFzIHB1cmVseSBub3QgZW1wdHkgYmFzZWQgb24gdGhlXG4gICAgLy8gYmVoYXZpb3Igb2YgaXNFbXB0eS4gRWZmZWN0aXZlbHkgdGhpcyBkZXRlcm1pbmVzIGlmIDAgaXMgaGFuZGxlZCBieSB0aGUgcG9zaXRpdmUgcGF0aCBvciBuZWdhdGl2ZS5cbiAgICBpZiAoKCFvcHRpb25zLmhhc2guaW5jbHVkZVplcm8gJiYgIWNvbmRpdGlvbmFsKSB8fCBpc0VtcHR5KGNvbmRpdGlvbmFsKSkge1xuICAgICAgcmV0dXJuIG9wdGlvbnMuaW52ZXJzZSh0aGlzKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG9wdGlvbnMuZm4odGhpcyk7XG4gICAgfVxuICB9KTtcblxuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcigndW5sZXNzJywgZnVuY3Rpb24oY29uZGl0aW9uYWwsIG9wdGlvbnMpIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCAhPSAyKSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCcjdW5sZXNzIHJlcXVpcmVzIGV4YWN0bHkgb25lIGFyZ3VtZW50Jyk7XG4gICAgfVxuICAgIHJldHVybiBpbnN0YW5jZS5oZWxwZXJzWydpZiddLmNhbGwodGhpcywgY29uZGl0aW9uYWwsIHtcbiAgICAgIGZuOiBvcHRpb25zLmludmVyc2UsXG4gICAgICBpbnZlcnNlOiBvcHRpb25zLmZuLFxuICAgICAgaGFzaDogb3B0aW9ucy5oYXNoXG4gICAgfSk7XG4gIH0pO1xufVxuIl19\n"
},
{
"id": 14,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\log.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/log.js",
"index": 12,
"index2": 7,
"size": 2507,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/log",
"loc": "26:18-42"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n\nexports['default'] = function (instance) {\n instance.registerHelper('log', function () /* message, options */{\n var args = [undefined],\n options = arguments[arguments.length - 1];\n for (var i = 0; i < arguments.length - 1; i++) {\n args.push(arguments[i]);\n }\n\n var level = 1;\n if (options.hash.level != null) {\n level = options.hash.level;\n } else if (options.data && options.data.level != null) {\n level = options.data.level;\n }\n args[0] = level;\n\n instance.log.apply(instance, args);\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxLQUFLLEVBQUUsa0NBQWlDO0FBQzlELFFBQUksSUFBSSxHQUFHLENBQUMsU0FBUyxDQUFDO1FBQ3BCLE9BQU8sR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztBQUM1QyxTQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7QUFDN0MsVUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztLQUN6Qjs7QUFFRCxRQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7QUFDZCxRQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxJQUFJLElBQUksRUFBRTtBQUM5QixXQUFLLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUM7S0FDNUIsTUFBTSxJQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLElBQUksSUFBSSxFQUFFO0FBQ3JELFdBQUssR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztLQUM1QjtBQUNELFFBQUksQ0FBQyxDQUFDLENBQUMsR0FBRyxLQUFLLENBQUM7O0FBRWhCLFlBQVEsQ0FBQyxHQUFHLE1BQUEsQ0FBWixRQUFRLEVBQVEsSUFBSSxDQUFDLENBQUM7R0FDdkIsQ0FBQyxDQUFDO0NBQ0oiLCJmaWxlIjoibG9nLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2xvZycsIGZ1bmN0aW9uKC8qIG1lc3NhZ2UsIG9wdGlvbnMgKi8pIHtcbiAgICBsZXQgYXJncyA9IFt1bmRlZmluZWRdLFxuICAgICAgb3B0aW9ucyA9IGFyZ3VtZW50c1thcmd1bWVudHMubGVuZ3RoIC0gMV07XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcmd1bWVudHMubGVuZ3RoIC0gMTsgaSsrKSB7XG4gICAgICBhcmdzLnB1c2goYXJndW1lbnRzW2ldKTtcbiAgICB9XG5cbiAgICBsZXQgbGV2ZWwgPSAxO1xuICAgIGlmIChvcHRpb25zLmhhc2gubGV2ZWwgIT0gbnVsbCkge1xuICAgICAgbGV2ZWwgPSBvcHRpb25zLmhhc2gubGV2ZWw7XG4gICAgfSBlbHNlIGlmIChvcHRpb25zLmRhdGEgJiYgb3B0aW9ucy5kYXRhLmxldmVsICE9IG51bGwpIHtcbiAgICAgIGxldmVsID0gb3B0aW9ucy5kYXRhLmxldmVsO1xuICAgIH1cbiAgICBhcmdzWzBdID0gbGV2ZWw7XG5cbiAgICBpbnN0YW5jZS5sb2coLi4uYXJncyk7XG4gIH0pO1xufVxuIl19\n"
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\lookup.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js",
"index": 13,
"index2": 8,
"size": 1244,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/lookup",
"loc": "30:21-48"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n\nexports['default'] = function (instance) {\n instance.registerHelper('lookup', function (obj, field, options) {\n if (!obj) {\n // Note for 5.0: Change to \"obj == null\" in 5.0\n return obj;\n }\n return options.lookupProperty(obj, field);\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxHQUFHLEVBQUUsS0FBSyxFQUFFLE9BQU8sRUFBRTtBQUM5RCxRQUFJLENBQUMsR0FBRyxFQUFFOztBQUVSLGFBQU8sR0FBRyxDQUFDO0tBQ1o7QUFDRCxXQUFPLE9BQU8sQ0FBQyxjQUFjLENBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFDO0dBQzNDLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6Imxvb2t1cC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdsb29rdXAnLCBmdW5jdGlvbihvYmosIGZpZWxkLCBvcHRpb25zKSB7XG4gICAgaWYgKCFvYmopIHtcbiAgICAgIC8vIE5vdGUgZm9yIDUuMDogQ2hhbmdlIHRvIFwib2JqID09IG51bGxcIiBpbiA1LjBcbiAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIHJldHVybiBvcHRpb25zLmxvb2t1cFByb3BlcnR5KG9iaiwgZmllbGQpO1xuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 16,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers\\with.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers/with.js",
"index": 14,
"index2": 9,
"size": 3759,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"issuerId": 3,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 514,
"building": 18,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 3,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\helpers.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/helpers.js",
"type": "cjs require",
"userRequest": "./helpers/with",
"loc": "34:19-44"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utils = require('../utils');\n\nvar _exception = require('../exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nexports['default'] = function (instance) {\n instance.registerHelper('with', function (context, options) {\n if (arguments.length != 2) {\n throw new _exception2['default']('#with requires exactly one argument');\n }\n if (_utils.isFunction(context)) {\n context = context.call(this);\n }\n\n var fn = options.fn;\n\n if (!_utils.isEmpty(context)) {\n var data = options.data;\n if (options.data && options.ids) {\n data = _utils.createFrame(options.data);\n data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);\n }\n\n return fn(context, {\n data: data,\n blockParams: _utils.blockParams([context], [data && data.contextPath])\n });\n } else {\n return options.inverse(this);\n }\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3FCQU1PLFVBQVU7O3lCQUNLLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsTUFBTSxFQUFFLFVBQVMsT0FBTyxFQUFFLE9BQU8sRUFBRTtBQUN6RCxRQUFJLFNBQVMsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3pCLFlBQU0sMkJBQWMscUNBQXFDLENBQUMsQ0FBQztLQUM1RDtBQUNELFFBQUksa0JBQVcsT0FBTyxDQUFDLEVBQUU7QUFDdkIsYUFBTyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDOUI7O0FBRUQsUUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEVBQUUsQ0FBQzs7QUFFcEIsUUFBSSxDQUFDLGVBQVEsT0FBTyxDQUFDLEVBQUU7QUFDckIsVUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztBQUN4QixVQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixZQUFJLEdBQUcsbUJBQVksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2pDLFlBQUksQ0FBQyxXQUFXLEdBQUcseUJBQ2pCLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUN4QixPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUNmLENBQUM7T0FDSDs7QUFFRCxhQUFPLEVBQUUsQ0FBQyxPQUFPLEVBQUU7QUFDakIsWUFBSSxFQUFFLElBQUk7QUFDVixtQkFBVyxFQUFFLG1CQUFZLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxJQUFJLElBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFDO09BQ2hFLENBQUMsQ0FBQztLQUNKLE1BQU07QUFDTCxhQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDOUI7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJ3aXRoLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgYXBwZW5kQ29udGV4dFBhdGgsXG4gIGJsb2NrUGFyYW1zLFxuICBjcmVhdGVGcmFtZSxcbiAgaXNFbXB0eSxcbiAgaXNGdW5jdGlvblxufSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCd3aXRoJywgZnVuY3Rpb24oY29udGV4dCwgb3B0aW9ucykge1xuICAgIGlmIChhcmd1bWVudHMubGVuZ3RoICE9IDIpIHtcbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJyN3aXRoIHJlcXVpcmVzIGV4YWN0bHkgb25lIGFyZ3VtZW50Jyk7XG4gICAgfVxuICAgIGlmIChpc0Z1bmN0aW9uKGNvbnRleHQpKSB7XG4gICAgICBjb250ZXh0ID0gY29udGV4dC5jYWxsKHRoaXMpO1xuICAgIH1cblxuICAgIGxldCBmbiA9IG9wdGlvbnMuZm47XG5cbiAgICBpZiAoIWlzRW1wdHkoY29udGV4dCkpIHtcbiAgICAgIGxldCBkYXRhID0gb3B0aW9ucy5kYXRhO1xuICAgICAgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmlkcykge1xuICAgICAgICBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGFwcGVuZENvbnRleHRQYXRoKFxuICAgICAgICAgIG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCxcbiAgICAgICAgICBvcHRpb25zLmlkc1swXVxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwge1xuICAgICAgICBkYXRhOiBkYXRhLFxuICAgICAgICBibG9ja1BhcmFtczogYmxvY2tQYXJhbXMoW2NvbnRleHRdLCBbZGF0YSAmJiBkYXRhLmNvbnRleHRQYXRoXSlcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gb3B0aW9ucy5pbnZlcnNlKHRoaXMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0=\n"
},
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"index": 15,
"index2": 12,
"size": 1000,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"issuerId": 2,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"type": "cjs require",
"userRequest": "./decorators",
"loc": "17:18-41"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.registerDefaultDecorators = registerDefaultDecorators;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _decoratorsInline = require('./decorators/inline');\n\nvar _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);\n\nfunction registerDefaultDecorators(instance) {\n _decoratorsInline2['default'](instance);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Z0NBQTJCLHFCQUFxQjs7OztBQUV6QyxTQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCxnQ0FBZSxRQUFRLENBQUMsQ0FBQztDQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG4iXX0=\n"
},
{
"id": 18,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators\\inline.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js",
"index": 16,
"index2": 11,
"size": 2696,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js",
"issuerId": 17,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 513,
"building": 19,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\decorators.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/decorators.js",
"type": "cjs require",
"userRequest": "./decorators/inline",
"loc": "9:24-54"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\n\nvar _utils = require('../utils');\n\nexports['default'] = function (instance) {\n instance.registerDecorator('inline', function (fn, props, container, options) {\n var ret = fn;\n if (!props.partials) {\n props.partials = {};\n ret = function (context, options) {\n // Create a new partials stack frame prior to exec.\n var original = container.partials;\n container.partials = _utils.extend({}, original, props.partials);\n var ret = fn(context, options);\n container.partials = original;\n return ret;\n };\n }\n\n props.partials[options.args[0]] = options.fn;\n\n return ret;\n });\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQXVCLFVBQVU7O3FCQUVsQixVQUFTLFFBQVEsRUFBRTtBQUNoQyxVQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFFBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFFBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLFdBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFNBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLFlBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsaUJBQVMsQ0FBQyxRQUFRLEdBQUcsY0FBTyxFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxZQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLGlCQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQztBQUM5QixlQUFPLEdBQUcsQ0FBQztPQUNaLENBQUM7S0FDSDs7QUFFRCxTQUFLLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUU3QyxXQUFPLEdBQUcsQ0FBQztHQUNaLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6ImlubGluZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGV4dGVuZCB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJEZWNvcmF0b3IoJ2lubGluZScsIGZ1bmN0aW9uKGZuLCBwcm9wcywgY29udGFpbmVyLCBvcHRpb25zKSB7XG4gICAgbGV0IHJldCA9IGZuO1xuICAgIGlmICghcHJvcHMucGFydGlhbHMpIHtcbiAgICAgIHByb3BzLnBhcnRpYWxzID0ge307XG4gICAgICByZXQgPSBmdW5jdGlvbihjb250ZXh0LCBvcHRpb25zKSB7XG4gICAgICAgIC8vIENyZWF0ZSBhIG5ldyBwYXJ0aWFscyBzdGFjayBmcmFtZSBwcmlvciB0byBleGVjLlxuICAgICAgICBsZXQgb3JpZ2luYWwgPSBjb250YWluZXIucGFydGlhbHM7XG4gICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyA9IGV4dGVuZCh7fSwgb3JpZ2luYWwsIHByb3BzLnBhcnRpYWxzKTtcbiAgICAgICAgbGV0IHJldCA9IGZuKGNvbnRleHQsIG9wdGlvbnMpO1xuICAgICAgICBjb250YWluZXIucGFydGlhbHMgPSBvcmlnaW5hbDtcbiAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgIH07XG4gICAgfVxuXG4gICAgcHJvcHMucGFydGlhbHNbb3B0aW9ucy5hcmdzWzBdXSA9IG9wdGlvbnMuZm47XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 19,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\create-new-lookup-object.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js",
"index": 19,
"index2": 14,
"size": 1783,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"issuerId": 6,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\base.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/base.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"profile": {
"factory": 497,
"building": 6,
"dependencies": 1
}
}
],
"profile": {
"factory": 521,
"building": 17,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\proto-access.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js",
"type": "cjs require",
"userRequest": "./create-new-lookup-object",
"loc": "11:29-66"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 5,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.createNewLookupObject = createNewLookupObject;\n\nvar _utils = require('../utils');\n\n/**\n * Create a new object with \"null\"-prototype to avoid truthy results on prototype properties.\n * The resulting object can be used with \"object[property]\" to check if a property exists\n * @param {...object} sources a varargs parameter of source objects that will be merged\n * @returns {object}\n */\n\nfunction createNewLookupObject() {\n for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n return _utils.extend.apply(undefined, [Object.create(null)].concat(sources));\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztxQkFBdUIsVUFBVTs7Ozs7Ozs7O0FBUTFCLFNBQVMscUJBQXFCLEdBQWE7b0NBQVQsT0FBTztBQUFQLFdBQU87OztBQUM5QyxTQUFPLGdDQUFPLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQUssT0FBTyxFQUFDLENBQUM7Q0FDaEQiLCJmaWxlIjoiY3JlYXRlLW5ldy1sb29rdXAtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZXh0ZW5kIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vKipcbiAqIENyZWF0ZSBhIG5ldyBvYmplY3Qgd2l0aCBcIm51bGxcIi1wcm90b3R5cGUgdG8gYXZvaWQgdHJ1dGh5IHJlc3VsdHMgb24gcHJvdG90eXBlIHByb3BlcnRpZXMuXG4gKiBUaGUgcmVzdWx0aW5nIG9iamVjdCBjYW4gYmUgdXNlZCB3aXRoIFwib2JqZWN0W3Byb3BlcnR5XVwiIHRvIGNoZWNrIGlmIGEgcHJvcGVydHkgZXhpc3RzXG4gKiBAcGFyYW0gey4uLm9iamVjdH0gc291cmNlcyBhIHZhcmFyZ3MgcGFyYW1ldGVyIG9mIHNvdXJjZSBvYmplY3RzIHRoYXQgd2lsbCBiZSBtZXJnZWRcbiAqIEByZXR1cm5zIHtvYmplY3R9XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVOZXdMb29rdXBPYmplY3QoLi4uc291cmNlcykge1xuICByZXR1cm4gZXh0ZW5kKE9iamVjdC5jcmVhdGUobnVsbCksIC4uLnNvdXJjZXMpO1xufVxuIl19\n"
},
{
"id": 20,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\safe-string.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/safe-string.js",
"index": 20,
"index2": 17,
"size": 1164,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/safe-string",
"loc": "19:28-63"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "// Build out our basic SafeString type\n'use strict';\n\nexports.__esModule = true;\nfunction SafeString(string) {\n this.string = string;\n}\n\nSafeString.prototype.toString = SafeString.prototype.toHTML = function () {\n return '' + this.string;\n};\n\nexports['default'] = SafeString;\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsTUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7Q0FDdEI7O0FBRUQsVUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxTQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0NBQ3pCLENBQUM7O3FCQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ==\n"
},
{
"id": 21,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"index": 21,
"index2": 19,
"size": 44682,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/runtime",
"loc": "31:25-56"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.checkRevision = checkRevision;\nexports.template = template;\nexports.wrapProgram = wrapProgram;\nexports.resolvePartial = resolvePartial;\nexports.invokePartial = invokePartial;\nexports.noop = noop;\n// istanbul ignore next\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n// istanbul ignore next\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\nvar _utils = require('./utils');\n\nvar Utils = _interopRequireWildcard(_utils);\n\nvar _exception = require('./exception');\n\nvar _exception2 = _interopRequireDefault(_exception);\n\nvar _base = require('./base');\n\nvar _helpers = require('./helpers');\n\nvar _internalWrapHelper = require('./internal/wrapHelper');\n\nvar _internalProtoAccess = require('./internal/proto-access');\n\nfunction checkRevision(compilerInfo) {\n var compilerRevision = compilerInfo && compilerInfo[0] || 1,\n currentRevision = _base.COMPILER_REVISION;\n\n if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {\n return;\n }\n\n if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {\n var runtimeVersions = _base.REVISION_CHANGES[currentRevision],\n compilerVersions = _base.REVISION_CHANGES[compilerRevision];\n throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');\n } else {\n // Use the embedded version info since the runtime doesn't know about this revision yet\n throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');\n }\n}\n\nfunction template(templateSpec, env) {\n /* istanbul ignore next */\n if (!env) {\n throw new _exception2['default']('No environment passed to template');\n }\n if (!templateSpec || !templateSpec.main) {\n throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);\n }\n\n templateSpec.main.decorator = templateSpec.main_d;\n\n // Note: Using env.VM references rather than local var references throughout this section to allow\n // for external users to override these as pseudo-supported APIs.\n env.VM.checkRevision(templateSpec.compiler);\n\n // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)\n var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;\n\n function invokePartialWrapper(partial, context, options) {\n if (options.hash) {\n context = Utils.extend({}, context, options.hash);\n if (options.ids) {\n options.ids[0] = true;\n }\n }\n partial = env.VM.resolvePartial.call(this, partial, context, options);\n\n var extendedOptions = Utils.extend({}, options, {\n hooks: this.hooks,\n protoAccessControl: this.protoAccessControl\n });\n\n var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);\n\n if (result == null && env.compile) {\n options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);\n result = options.partials[options.name](context, extendedOptions);\n }\n if (result != null) {\n if (options.indent) {\n var lines = result.split('\\n');\n for (var i = 0, l = lines.length; i < l; i++) {\n if (!lines[i] && i + 1 === l) {\n break;\n }\n\n lines[i] = options.indent + lines[i];\n }\n result = lines.join('\\n');\n }\n return result;\n } else {\n throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');\n }\n }\n\n // Just add water\n var container = {\n strict: function strict(obj, name, loc) {\n if (!obj || !(name in obj)) {\n throw new _exception2['default']('\"' + name + '\" not defined in ' + obj, {\n loc: loc\n });\n }\n return obj[name];\n },\n lookupProperty: function lookupProperty(parent, propertyName) {\n var result = parent[propertyName];\n if (result == null) {\n return result;\n }\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return result;\n }\n\n if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {\n return result;\n }\n return undefined;\n },\n lookup: function lookup(depths, name) {\n var len = depths.length;\n for (var i = 0; i < len; i++) {\n var result = depths[i] && container.lookupProperty(depths[i], name);\n if (result != null) {\n return depths[i][name];\n }\n }\n },\n lambda: function lambda(current, context) {\n return typeof current === 'function' ? current.call(context) : current;\n },\n\n escapeExpression: Utils.escapeExpression,\n invokePartial: invokePartialWrapper,\n\n fn: function fn(i) {\n var ret = templateSpec[i];\n ret.decorator = templateSpec[i + '_d'];\n return ret;\n },\n\n programs: [],\n program: function program(i, data, declaredBlockParams, blockParams, depths) {\n var programWrapper = this.programs[i],\n fn = this.fn(i);\n if (data || depths || blockParams || declaredBlockParams) {\n programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);\n } else if (!programWrapper) {\n programWrapper = this.programs[i] = wrapProgram(this, i, fn);\n }\n return programWrapper;\n },\n\n data: function data(value, depth) {\n while (value && depth--) {\n value = value._parent;\n }\n return value;\n },\n mergeIfNeeded: function mergeIfNeeded(param, common) {\n var obj = param || common;\n\n if (param && common && param !== common) {\n obj = Utils.extend({}, common, param);\n }\n\n return obj;\n },\n // An empty object to use as replacement for null-contexts\n nullContext: Object.seal({}),\n\n noop: env.VM.noop,\n compilerInfo: templateSpec.compiler\n };\n\n function ret(context) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n var data = options.data;\n\n ret._setup(options);\n if (!options.partial && templateSpec.useData) {\n data = initData(context, data);\n }\n var depths = undefined,\n blockParams = templateSpec.useBlockParams ? [] : undefined;\n if (templateSpec.useDepths) {\n if (options.depths) {\n depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;\n } else {\n depths = [context];\n }\n }\n\n function main(context /*, options*/) {\n return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);\n }\n\n main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);\n return main(context, options);\n }\n\n ret.isTop = true;\n\n ret._setup = function (options) {\n if (!options.partial) {\n var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);\n wrapHelpersToPassLookupProperty(mergedHelpers, container);\n container.helpers = mergedHelpers;\n\n if (templateSpec.usePartial) {\n // Use mergeIfNeeded here to prevent compiling global partials multiple times\n container.partials = container.mergeIfNeeded(options.partials, env.partials);\n }\n if (templateSpec.usePartial || templateSpec.useDecorators) {\n container.decorators = Utils.extend({}, env.decorators, options.decorators);\n }\n\n container.hooks = {};\n container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);\n\n var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;\n _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);\n _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);\n } else {\n container.protoAccessControl = options.protoAccessControl; // internal option\n container.helpers = options.helpers;\n container.partials = options.partials;\n container.decorators = options.decorators;\n container.hooks = options.hooks;\n }\n };\n\n ret._child = function (i, data, blockParams, depths) {\n if (templateSpec.useBlockParams && !blockParams) {\n throw new _exception2['default']('must pass block params');\n }\n if (templateSpec.useDepths && !depths) {\n throw new _exception2['default']('must pass parent depths');\n }\n\n return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);\n };\n return ret;\n}\n\nfunction wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {\n function prog(context) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n var currentDepths = depths;\n if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {\n currentDepths = [context].concat(depths);\n }\n\n return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);\n }\n\n prog = executeDecorators(fn, prog, container, depths, data, blockParams);\n\n prog.program = i;\n prog.depth = depths ? depths.length : 0;\n prog.blockParams = declaredBlockParams || 0;\n return prog;\n}\n\n/**\n * This is currently part of the official API, therefore implementation details should not be changed.\n */\n\nfunction resolvePartial(partial, context, options) {\n if (!partial) {\n if (options.name === '@partial-block') {\n partial = options.data['partial-block'];\n } else {\n partial = options.partials[options.name];\n }\n } else if (!partial.call && !options.name) {\n // This is a dynamic partial that returned a string\n options.name = partial;\n partial = options.partials[partial];\n }\n return partial;\n}\n\nfunction invokePartial(partial, context, options) {\n // Use the current closure context to save the partial-block if this partial\n var currentPartialBlock = options.data && options.data['partial-block'];\n options.partial = true;\n if (options.ids) {\n options.data.contextPath = options.ids[0] || options.data.contextPath;\n }\n\n var partialBlock = undefined;\n if (options.fn && options.fn !== noop) {\n (function () {\n options.data = _base.createFrame(options.data);\n // Wrapper function to get access to currentPartialBlock from the closure\n var fn = options.fn;\n partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n // Restore the partial-block from the closure for the execution of the block\n // i.e. the part inside the block of the partial call.\n options.data = _base.createFrame(options.data);\n options.data['partial-block'] = currentPartialBlock;\n return fn(context, options);\n };\n if (fn.partials) {\n options.partials = Utils.extend({}, options.partials, fn.partials);\n }\n })();\n }\n\n if (partial === undefined && partialBlock) {\n partial = partialBlock;\n }\n\n if (partial === undefined) {\n throw new _exception2['default']('The partial ' + options.name + ' could not be found');\n } else if (partial instanceof Function) {\n return partial(context, options);\n }\n}\n\nfunction noop() {\n return '';\n}\n\nfunction initData(context, data) {\n if (!data || !('root' in data)) {\n data = data ? _base.createFrame(data) : {};\n data.root = context;\n }\n return data;\n}\n\nfunction executeDecorators(fn, prog, container, depths, data, blockParams) {\n if (fn.decorator) {\n var props = {};\n prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);\n Utils.extend(prog, props);\n }\n return prog;\n}\n\nfunction wrapHelpersToPassLookupProperty(mergedHelpers, container) {\n Object.keys(mergedHelpers).forEach(function (helperName) {\n var helper = mergedHelpers[helperName];\n mergedHelpers[helperName] = passLookupPropertyOption(helper, container);\n });\n}\n\nfunction passLookupPropertyOption(helper, container) {\n var lookupProperty = container.lookupProperty;\n return _internalWrapHelper.wrapHelper(helper, function (options) {\n return Utils.extend({ lookupProperty: lookupProperty }, options);\n });\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7cUJBQXVCLFNBQVM7O0lBQXBCLEtBQUs7O3lCQUNLLGFBQWE7Ozs7b0JBTTVCLFFBQVE7O3VCQUNtQixXQUFXOztrQ0FDbEIsdUJBQXVCOzttQ0FJM0MseUJBQXlCOztBQUV6QixTQUFTLGFBQWEsQ0FBQyxZQUFZLEVBQUU7QUFDMUMsTUFBTSxnQkFBZ0IsR0FBRyxBQUFDLFlBQVksSUFBSSxZQUFZLENBQUMsQ0FBQyxDQUFDLElBQUssQ0FBQztNQUM3RCxlQUFlLDBCQUFvQixDQUFDOztBQUV0QyxNQUNFLGdCQUFnQiwyQ0FBcUMsSUFDckQsZ0JBQWdCLDJCQUFxQixFQUNyQztBQUNBLFdBQU87R0FDUjs7QUFFRCxNQUFJLGdCQUFnQiwwQ0FBb0MsRUFBRTtBQUN4RCxRQUFNLGVBQWUsR0FBRyx1QkFBaUIsZUFBZSxDQUFDO1FBQ3ZELGdCQUFnQixHQUFHLHVCQUFpQixnQkFBZ0IsQ0FBQyxDQUFDO0FBQ3hELFVBQU0sMkJBQ0oseUZBQXlGLEdBQ3ZGLHFEQUFxRCxHQUNyRCxlQUFlLEdBQ2YsbURBQW1ELEdBQ25ELGdCQUFnQixHQUNoQixJQUFJLENBQ1AsQ0FBQztHQUNILE1BQU07O0FBRUwsVUFBTSwyQkFDSix3RkFBd0YsR0FDdEYsaURBQWlELEdBQ2pELFlBQVksQ0FBQyxDQUFDLENBQUMsR0FDZixJQUFJLENBQ1AsQ0FBQztHQUNIO0NBQ0Y7O0FBRU0sU0FBUyxRQUFRLENBQUMsWUFBWSxFQUFFLEdBQUcsRUFBRTs7QUFFMUMsTUFBSSxDQUFDLEdBQUcsRUFBRTtBQUNSLFVBQU0sMkJBQWMsbUNBQW1DLENBQUMsQ0FBQztHQUMxRDtBQUNELE1BQUksQ0FBQyxZQUFZLElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxFQUFFO0FBQ3ZDLFVBQU0sMkJBQWMsMkJBQTJCLEdBQUcsT0FBTyxZQUFZLENBQUMsQ0FBQztHQUN4RTs7QUFFRCxjQUFZLENBQUMsSUFBSSxDQUFDLFNBQVMsR0FBRyxZQUFZLENBQUMsTUFBTSxDQUFDOzs7O0FBSWxELEtBQUcsQ0FBQyxFQUFFLENBQUMsYUFBYSxDQUFDLFlBQVksQ0FBQyxRQUFRLENBQUMsQ0FBQzs7O0FBRzVDLE1BQU0sb0NBQW9DLEdBQ3hDLFlBQVksQ0FBQyxRQUFRLElBQUksWUFBWSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUM7O0FBRTFELFdBQVMsb0JBQW9CLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUU7QUFDdkQsUUFBSSxPQUFPLENBQUMsSUFBSSxFQUFFO0FBQ2hCLGFBQU8sR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxPQUFPLEVBQUUsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2xELFVBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUNmLGVBQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDO09BQ3ZCO0tBQ0Y7QUFDRCxXQUFPLEdBQUcsR0FBRyxDQUFDLEVBQUUsQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLElBQUksRUFBRSxPQUFPLEVBQUUsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDOztBQUV0RSxRQUFJLGVBQWUsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxPQUFPLEVBQUU7QUFDOUMsV0FBSyxFQUFFLElBQUksQ0FBQyxLQUFLO0FBQ2pCLHdCQUFrQixFQUFFLElBQUksQ0FBQyxrQkFBa0I7S0FDNUMsQ0FBQyxDQUFDOztBQUVILFFBQUksTUFBTSxHQUFHLEdBQUcsQ0FBQyxFQUFFLENBQUMsYUFBYSxDQUFDLElBQUksQ0FDcEMsSUFBSSxFQUNKLE9BQU8sRUFDUCxPQUFPLEVBQ1AsZUFBZSxDQUNoQixDQUFDOztBQUVGLFFBQUksTUFBTSxJQUFJLElBQUksSUFBSSxHQUFHLENBQUMsT0FBTyxFQUFFO0FBQ2pDLGFBQU8sQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxHQUFHLEdBQUcsQ0FBQyxPQUFPLENBQzFDLE9BQU8sRUFDUCxZQUFZLENBQUMsZUFBZSxFQUM1QixHQUFHLENBQ0osQ0FBQztBQUNGLFlBQU0sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxPQUFPLEVBQUUsZUFBZSxDQUFDLENBQUM7S0FDbkU7QUFDRCxRQUFJLE1BQU0sSUFBSSxJQUFJLEVBQUU7QUFDbEIsVUFBSSxPQUFPLENBQUMsTUFBTSxFQUFFO0FBQ2xCLFlBQUksS0FBSyxHQUFHLE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDL0IsYUFBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUM1QyxjQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxFQUFFO0FBQzVCLGtCQUFNO1dBQ1A7O0FBRUQsZUFBSyxDQUFDLENBQUMsQ0FBQyxHQUFHLE9BQU8sQ0FBQyxNQUFNLEdBQUcsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQ3RDO0FBQ0QsY0FBTSxHQUFHLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7T0FDM0I7QUFDRCxhQUFPLE1BQU0sQ0FBQztLQUNmLE1BQU07QUFDTCxZQUFNLDJCQUNKLGNBQWMsR0FDWixPQUFPLENBQUMsSUFBSSxHQUNaLDBEQUEwRCxDQUM3RCxDQUFDO0tBQ0g7R0FDRjs7O0FBR0QsTUFBSSxTQUFTLEdBQUc7QUFDZCxVQUFNLEVBQUUsZ0JBQVMsR0FBRyxFQUFFLElBQUksRUFBRSxHQUFHLEVBQUU7QUFDL0IsVUFBSSxDQUFDLEdBQUcsSUFBSSxFQUFFLElBQUksSUFBSSxHQUFHLENBQUEsQUFBQyxFQUFFO0FBQzFCLGNBQU0sMkJBQWMsR0FBRyxHQUFHLElBQUksR0FBRyxtQkFBbUIsR0FBRyxHQUFHLEVBQUU7QUFDMUQsYUFBRyxFQUFFLEdBQUc7U0FDVCxDQUFDLENBQUM7T0FDSjtBQUNELGFBQU8sR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQ2xCO0FBQ0Qsa0JBQWMsRUFBRSx3QkFBUyxNQUFNLEVBQUUsWUFBWSxFQUFFO0FBQzdDLFVBQUksTUFBTSxHQUFHLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBQztBQUNsQyxVQUFJLE1BQU0sSUFBSSxJQUFJLEVBQUU7QUFDbEIsZUFBTyxNQUFNLENBQUM7T0FDZjtBQUNELFVBQUksTUFBTSxDQUFDLFNBQVMsQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxZQUFZLENBQUMsRUFBRTtBQUM5RCxlQUFPLE1BQU0sQ0FBQztPQUNmOztBQUVELFVBQUkscUNBQWdCLE1BQU0sRUFBRSxTQUFTLENBQUMsa0JBQWtCLEVBQUUsWUFBWSxDQUFDLEVBQUU7QUFDdkUsZUFBTyxNQUFNLENBQUM7T0FDZjtBQUNELGFBQU8sU0FBUyxDQUFDO0tBQ2xCO0FBQ0QsVUFBTSxFQUFFLGdCQUFTLE1BQU0sRUFBRSxJQUFJLEVBQUU7QUFDN0IsVUFBTSxHQUFHLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQztBQUMxQixXQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsR0FBRyxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQzVCLFlBQUksTUFBTSxHQUFHLE1BQU0sQ0FBQyxDQUFDLENBQUMsSUFBSSxTQUFTLENBQUMsY0FBYyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUMsQ0FBQztBQUNwRSxZQUFJLE1BQU0sSUFBSSxJQUFJLEVBQUU7QUFDbEIsaUJBQU8sTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDO1NBQ3hCO09BQ0Y7S0FDRjtBQUNELFVBQU0sRUFBRSxnQkFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ2pDLGFBQU8sT0FBTyxPQUFPLEtBQUssVUFBVSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsT0FBTyxDQUFDO0tBQ3hFOztBQUVELG9CQUFnQixFQUFFLEtBQUssQ0FBQyxnQkFBZ0I7QUFDeEMsaUJBQWEsRUFBRSxvQkFBb0I7O0FBRW5DLE1BQUUsRUFBRSxZQUFTLENBQUMsRUFBRTtBQUNkLFVBQUksR0FBRyxHQUFHLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUMxQixTQUFHLENBQUMsU0FBUyxHQUFHLFlBQVksQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUM7QUFDdkMsYUFBTyxHQUFHLENBQUM7S0FDWjs7QUFFRCxZQUFRLEVBQUUsRUFBRTtBQUNaLFdBQU8sRUFBRSxpQkFBUyxDQUFDLEVBQUUsSUFBSSxFQUFFLG1CQUFtQixFQUFFLFdBQVcsRUFBRSxNQUFNLEVBQUU7QUFDbkUsVUFBSSxjQUFjLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7VUFDbkMsRUFBRSxHQUFHLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDbEIsVUFBSSxJQUFJLElBQUksTUFBTSxJQUFJLFdBQVcsSUFBSSxtQkFBbUIsRUFBRTtBQUN4RCxzQkFBYyxHQUFHLFdBQVcsQ0FDMUIsSUFBSSxFQUNKLENBQUMsRUFDRCxFQUFFLEVBQ0YsSUFBSSxFQUNKLG1CQUFtQixFQUNuQixXQUFXLEVBQ1gsTUFBTSxDQUNQLENBQUM7T0FDSCxNQUFNLElBQUksQ0FBQyxjQUFjLEVBQUU7QUFDMUIsc0JBQWMsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxHQUFHLFdBQVcsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDO09BQzlEO0FBQ0QsYUFBTyxjQUFjLENBQUM7S0FDdkI7O0FBRUQsUUFBSSxFQUFFLGNBQVMsS0FBSyxFQUFFLEtBQUssRUFBRTtBQUMzQixhQUFPLEtBQUssSUFBSSxLQUFLLEVBQUUsRUFBRTtBQUN2QixhQUFLLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQztPQUN2QjtBQUNELGFBQU8sS0FBSyxDQUFDO0tBQ2Q7QUFDRCxpQkFBYSxFQUFFLHVCQUFTLEtBQUssRUFBRSxNQUFNLEVBQUU7QUFDckMsVUFBSSxHQUFHLEdBQUcsS0FBSyxJQUFJLE1BQU0sQ0FBQzs7QUFFMUIsVUFBSSxLQUFLLElBQUksTUFBTSxJQUFJLEtBQUssS0FBSyxNQUFNLEVBQUU7QUFDdkMsV0FBRyxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUMsRUFBRSxFQUFFLE1BQU0sRUFBRSxLQUFLLENBQUMsQ0FBQztPQUN2Qzs7QUFFRCxhQUFPLEdBQUcsQ0FBQztLQUNaOztBQUVELGVBQVcsRUFBRSxNQUFNLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQzs7QUFFNUIsUUFBSSxFQUFFLEdBQUcsQ0FBQyxFQUFFLENBQUMsSUFBSTtBQUNqQixnQkFBWSxFQUFFLFlBQVksQ0FBQyxRQUFRO0dBQ3BDLENBQUM7O0FBRUYsV0FBUyxHQUFHLENBQUMsT0FBTyxFQUFnQjtRQUFkLE9BQU8seURBQUcsRUFBRTs7QUFDaEMsUUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQzs7QUFFeEIsT0FBRyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNwQixRQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sSUFBSSxZQUFZLENBQUMsT0FBTyxFQUFFO0FBQzVDLFVBQUksR0FBRyxRQUFRLENBQUMsT0FBTyxFQUFFLElBQUksQ0FBQyxDQUFDO0tBQ2hDO0FBQ0QsUUFBSSxNQUFNLFlBQUE7UUFDUixXQUFXLEdBQUcsWUFBWSxDQUFDLGNBQWMsR0FBRyxFQUFFLEdBQUcsU0FBUyxDQUFDO0FBQzdELFFBQUksWUFBWSxDQUFDLFNBQVMsRUFBRTtBQUMxQixVQUFJLE9BQU8sQ0FBQyxNQUFNLEVBQUU7QUFDbEIsY0FBTSxHQUNKLE9BQU8sSUFBSSxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxHQUN4QixDQUFDLE9BQU8sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLEdBQ2hDLE9BQU8sQ0FBQyxNQUFNLENBQUM7T0FDdEIsTUFBTTtBQUNMLGNBQU0sR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDO09BQ3BCO0tBQ0Y7O0FBRUQsYUFBUyxJQUFJLENBQUMsT0FBTyxnQkFBZ0I7QUFDbkMsYUFDRSxFQUFFLEdBQ0YsWUFBWSxDQUFDLElBQUksQ0FDZixTQUFTLEVBQ1QsT0FBTyxFQUNQLFNBQVMsQ0FBQyxPQUFPLEVBQ2pCLFNBQVMsQ0FBQyxRQUFRLEVBQ2xCLElBQUksRUFDSixXQUFXLEVBQ1gsTUFBTSxDQUNQLENBQ0Q7S0FDSDs7QUFFRCxRQUFJLEdBQUcsaUJBQWlCLENBQ3RCLFlBQVksQ0FBQyxJQUFJLEVBQ2pCLElBQUksRUFDSixTQUFTLEVBQ1QsT0FBTyxDQUFDLE1BQU0sSUFBSSxFQUFFLEVBQ3BCLElBQUksRUFDSixXQUFXLENBQ1osQ0FBQztBQUNGLFdBQU8sSUFBSSxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQztHQUMvQjs7QUFFRCxLQUFHLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQzs7QUFFakIsS0FBRyxDQUFDLE1BQU0sR0FBRyxVQUFTLE9BQU8sRUFBRTtBQUM3QixRQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sRUFBRTtBQUNwQixVQUFJLGFBQWEsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxHQUFHLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNuRSxxQ0FBK0IsQ0FBQyxhQUFhLEVBQUUsU0FBUyxDQUFDLENBQUM7QUFDMUQsZUFBUyxDQUFDLE9BQU8sR0FBRyxhQUFhLENBQUM7O0FBRWxDLFVBQUksWUFBWSxDQUFDLFVBQVUsRUFBRTs7QUFFM0IsaUJBQVMsQ0FBQyxRQUFRLEdBQUcsU0FBUyxDQUFDLGFBQWEsQ0FDMUMsT0FBTyxDQUFDLFFBQVEsRUFDaEIsR0FBRyxDQUFDLFFBQVEsQ0FDYixDQUFDO09BQ0g7QUFDRCxVQUFJLFlBQVksQ0FBQyxVQUFVLElBQUksWUFBWSxDQUFDLGFBQWEsRUFBRTtBQUN6RCxpQkFBUyxDQUFDLFVBQVUsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUNqQyxFQUFFLEVBQ0YsR0FBRyxDQUFDLFVBQVUsRUFDZCxPQUFPLENBQUMsVUFBVSxDQUNuQixDQUFDO09BQ0g7O0FBRUQsZUFBUyxDQUFDLEtBQUssR0FBRyxFQUFFLENBQUM7QUFDckIsZUFBUyxDQUFDLGtCQUFrQixHQUFHLDhDQUF5QixPQUFPLENBQUMsQ0FBQzs7QUFFakUsVUFBSSxtQkFBbUIsR0FDckIsT0FBTyxDQUFDLHlCQUF5QixJQUNqQyxvQ0FBb0MsQ0FBQztBQUN2QyxpQ0FBa0IsU0FBUyxFQUFFLGVBQWUsRUFBRSxtQkFBbUIsQ0FBQyxDQUFDO0FBQ25FLGlDQUFrQixTQUFTLEVBQUUsb0JBQW9CLEVBQUUsbUJBQW1CLENBQUMsQ0FBQztLQUN6RSxNQUFNO0FBQ0wsZUFBUyxDQUFDLGtCQUFrQixHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQztBQUMxRCxlQUFTLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUM7QUFDcEMsZUFBUyxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDO0FBQ3RDLGVBQVMsQ0FBQyxVQUFVLEdBQUcsT0FBTyxDQUFDLFVBQVUsQ0FBQztBQUMxQyxlQUFTLENBQUMsS0FBSyxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUM7S0FDakM7R0FDRixDQUFDOztBQUVGLEtBQUcsQ0FBQyxNQUFNLEdBQUcsVUFBUyxDQUFDLEVBQUUsSUFBSSxFQUFFLFdBQVcsRUFBRSxNQUFNLEVBQUU7QUFDbEQsUUFBSSxZQUFZLENBQUMsY0FBYyxJQUFJLENBQUMsV0FBVyxFQUFFO0FBQy9DLFlBQU0sMkJBQWMsd0JBQXdCLENBQUMsQ0FBQztLQUMvQztBQUNELFFBQUksWUFBWSxDQUFDLFNBQVMsSUFBSSxDQUFDLE1BQU0sRUFBRTtBQUNyQyxZQUFNLDJCQUFjLHlCQUF5QixDQUFDLENBQUM7S0FDaEQ7O0FBRUQsV0FBTyxXQUFXLENBQ2hCLFNBQVMsRUFDVCxDQUFDLEVBQ0QsWUFBWSxDQUFDLENBQUMsQ0FBQyxFQUNmLElBQUksRUFDSixDQUFDLEVBQ0QsV0FBVyxFQUNYLE1BQU0sQ0FDUCxDQUFDO0dBQ0gsQ0FBQztBQUNGLFNBQU8sR0FBRyxDQUFDO0NBQ1o7O0FBRU0sU0FBUyxXQUFXLENBQ3pCLFNBQVMsRUFDVCxDQUFDLEVBQ0QsRUFBRSxFQUNGLElBQUksRUFDSixtQkFBbUIsRUFDbkIsV0FBVyxFQUNYLE1BQU0sRUFDTjtBQUNBLFdBQVMsSUFBSSxDQUFDLE9BQU8sRUFBZ0I7UUFBZCxPQUFPLHlEQUFHLEVBQUU7O0FBQ2pDLFFBQUksYUFBYSxHQUFHLE1BQU0sQ0FBQztBQUMzQixRQUNFLE1BQU0sSUFDTixPQUFPLElBQUksTUFBTSxDQUFDLENBQUMsQ0FBQyxJQUNwQixFQUFFLE9BQU8sS0FBSyxTQUFTLENBQUMsV0FBVyxJQUFJLE1BQU0sQ0FBQyxDQUFDLENBQUMsS0FBSyxJQUFJLENBQUEsQUFBQyxFQUMxRDtBQUNBLG1CQUFhLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7S0FDMUM7O0FBRUQsV0FBTyxFQUFFLENBQ1AsU0FBUyxFQUNULE9BQU8sRUFDUCxTQUFTLENBQUMsT0FBTyxFQUNqQixTQUFTLENBQUMsUUFBUSxFQUNsQixPQUFPLENBQUMsSUFBSSxJQUFJLElBQUksRUFDcEIsV0FBVyxJQUFJLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsRUFDeEQsYUFBYSxDQUNkLENBQUM7R0FDSDs7QUFFRCxNQUFJLEdBQUcsaUJBQWlCLENBQUMsRUFBRSxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBRSxXQUFXLENBQUMsQ0FBQzs7QUFFekUsTUFBSSxDQUFDLE9BQU8sR0FBRyxDQUFDLENBQUM7QUFDakIsTUFBSSxDQUFDLEtBQUssR0FBRyxNQUFNLEdBQUcsTUFBTSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUM7QUFDeEMsTUFBSSxDQUFDLFdBQVcsR0FBRyxtQkFBbUIsSUFBSSxDQUFDLENBQUM7QUFDNUMsU0FBTyxJQUFJLENBQUM7Q0FDYjs7Ozs7O0FBS00sU0FBUyxjQUFjLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUU7QUFDeEQsTUFBSSxDQUFDLE9BQU8sRUFBRTtBQUNaLFFBQUksT0FBTyxDQUFDLElBQUksS0FBSyxnQkFBZ0IsRUFBRTtBQUNyQyxhQUFPLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQztLQUN6QyxNQUFNO0FBQ0wsYUFBTyxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQzFDO0dBQ0YsTUFBTSxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLEVBQUU7O0FBRXpDLFdBQU8sQ0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDO0FBQ3ZCLFdBQU8sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0dBQ3JDO0FBQ0QsU0FBTyxPQUFPLENBQUM7Q0FDaEI7O0FBRU0sU0FBUyxhQUFhLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRXZELE1BQU0sbUJBQW1CLEdBQUcsT0FBTyxDQUFDLElBQUksSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxDQUFDO0FBQzFFLFNBQU8sQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDO0FBQ3ZCLE1BQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUNmLFdBQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUM7R0FDdkU7O0FBRUQsTUFBSSxZQUFZLFlBQUEsQ0FBQztBQUNqQixNQUFJLE9BQU8sQ0FBQyxFQUFFLElBQUksT0FBTyxDQUFDLEVBQUUsS0FBSyxJQUFJLEVBQUU7O0FBQ3JDLGFBQU8sQ0FBQyxJQUFJLEdBQUcsa0JBQVksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDOztBQUV6QyxVQUFJLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDO0FBQ3BCLGtCQUFZLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsR0FBRyxTQUFTLG1CQUFtQixDQUN6RSxPQUFPLEVBRVA7WUFEQSxPQUFPLHlEQUFHLEVBQUU7Ozs7QUFJWixlQUFPLENBQUMsSUFBSSxHQUFHLGtCQUFZLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUN6QyxlQUFPLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLG1CQUFtQixDQUFDO0FBQ3BELGVBQU8sRUFBRSxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQztPQUM3QixDQUFDO0FBQ0YsVUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFO0FBQ2YsZUFBTyxDQUFDLFFBQVEsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsUUFBUSxFQUFFLEVBQUUsQ0FBQyxRQUFRLENBQUMsQ0FBQztPQUNwRTs7R0FDRjs7QUFFRCxNQUFJLE9BQU8sS0FBSyxTQUFTLElBQUksWUFBWSxFQUFFO0FBQ3pDLFdBQU8sR0FBRyxZQUFZLENBQUM7R0FDeEI7O0FBRUQsTUFBSSxPQUFPLEtBQUssU0FBUyxFQUFFO0FBQ3pCLFVBQU0sMkJBQWMsY0FBYyxHQUFHLE9BQU8sQ0FBQyxJQUFJLEdBQUcscUJBQXFCLENBQUMsQ0FBQztHQUM1RSxNQUFNLElBQUksT0FBTyxZQUFZLFFBQVEsRUFBRTtBQUN0QyxXQUFPLE9BQU8sQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7R0FDbEM7Q0FDRjs7QUFFTSxTQUFTLElBQUksR0FBRztBQUNyQixTQUFPLEVBQUUsQ0FBQztDQUNYOztBQUVELFNBQVMsUUFBUSxDQUFDLE9BQU8sRUFBRSxJQUFJLEVBQUU7QUFDL0IsTUFBSSxDQUFDLElBQUksSUFBSSxFQUFFLE1BQU0sSUFBSSxJQUFJLENBQUEsQUFBQyxFQUFFO0FBQzlCLFFBQUksR0FBRyxJQUFJLEdBQUcsa0JBQVksSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQ3JDLFFBQUksQ0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDO0dBQ3JCO0FBQ0QsU0FBTyxJQUFJLENBQUM7Q0FDYjs7QUFFRCxTQUFTLGlCQUFpQixDQUFDLEVBQUUsRUFBRSxJQUFJLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsV0FBVyxFQUFFO0FBQ3pFLE1BQUksRUFBRSxDQUFDLFNBQVMsRUFBRTtBQUNoQixRQUFJLEtBQUssR0FBRyxFQUFFLENBQUM7QUFDZixRQUFJLEdBQUcsRUFBRSxDQUFDLFNBQVMsQ0FDakIsSUFBSSxFQUNKLEtBQUssRUFDTCxTQUFTLEVBQ1QsTUFBTSxJQUFJLE1BQU0sQ0FBQyxDQUFDLENBQUMsRUFDbkIsSUFBSSxFQUNKLFdBQVcsRUFDWCxNQUFNLENBQ1AsQ0FBQztBQUNGLFNBQUssQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDO0dBQzNCO0FBQ0QsU0FBTyxJQUFJLENBQUM7Q0FDYjs7QUFFRCxTQUFTLCtCQUErQixDQUFDLGFBQWEsRUFBRSxTQUFTLEVBQUU7QUFDakUsUUFBTSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQSxVQUFVLEVBQUk7QUFDL0MsUUFBSSxNQUFNLEdBQUcsYUFBYSxDQUFDLFVBQVUsQ0FBQyxDQUFDO0FBQ3ZDLGlCQUFhLENBQUMsVUFBVSxDQUFDLEdBQUcsd0JBQXdCLENBQUMsTUFBTSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0dBQ3pFLENBQUMsQ0FBQztDQUNKOztBQUVELFNBQVMsd0JBQXdCLENBQUMsTUFBTSxFQUFFLFNBQVMsRUFBRTtBQUNuRCxNQUFNLGNBQWMsR0FBRyxTQUFTLENBQUMsY0FBYyxDQUFDO0FBQ2hELFNBQU8sK0JBQVcsTUFBTSxFQUFFLFVBQUEsT0FBTyxFQUFJO0FBQ25DLFdBQU8sS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFFLGNBQWMsRUFBZCxjQUFjLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQztHQUNsRCxDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJydW50aW1lLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgVXRpbHMgZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4vZXhjZXB0aW9uJztcbmltcG9ydCB7XG4gIENPTVBJTEVSX1JFVklTSU9OLFxuICBjcmVhdGVGcmFtZSxcbiAgTEFTVF9DT01QQVRJQkxFX0NPTVBJTEVSX1JFVklTSU9OLFxuICBSRVZJU0lPTl9DSEFOR0VTXG59IGZyb20gJy4vYmFzZSc7XG5pbXBvcnQgeyBtb3ZlSGVscGVyVG9Ib29rcyB9IGZyb20gJy4vaGVscGVycyc7XG5pbXBvcnQgeyB3cmFwSGVscGVyIH0gZnJvbSAnLi9pbnRlcm5hbC93cmFwSGVscGVyJztcbmltcG9ydCB7XG4gIGNyZWF0ZVByb3RvQWNjZXNzQ29udHJvbCxcbiAgcmVzdWx0SXNBbGxvd2VkXG59IGZyb20gJy4vaW50ZXJuYWwvcHJvdG8tYWNjZXNzJztcblxuZXhwb3J0IGZ1bmN0aW9uIGNoZWNrUmV2aXNpb24oY29tcGlsZXJJbmZvKSB7XG4gIGNvbnN0IGNvbXBpbGVyUmV2aXNpb24gPSAoY29tcGlsZXJJbmZvICYmIGNvbXBpbGVySW5mb1swXSkgfHwgMSxcbiAgICBjdXJyZW50UmV2aXNpb24gPSBDT01QSUxFUl9SRVZJU0lPTjtcblxuICBpZiAoXG4gICAgY29tcGlsZXJSZXZpc2lvbiA+PSBMQVNUX0NPTVBBVElCTEVfQ09NUElMRVJfUkVWSVNJT04gJiZcbiAgICBjb21waWxlclJldmlzaW9uIDw9IENPTVBJTEVSX1JFVklTSU9OXG4gICkge1xuICAgIHJldHVybjtcbiAgfVxuXG4gIGlmIChjb21waWxlclJldmlzaW9uIDwgTEFTVF9DT01QQVRJQkxFX0NPTVBJTEVSX1JFVklTSU9OKSB7XG4gICAgY29uc3QgcnVudGltZVZlcnNpb25zID0gUkVWSVNJT05fQ0hBTkdFU1tjdXJyZW50UmV2aXNpb25dLFxuICAgICAgY29tcGlsZXJWZXJzaW9ucyA9IFJFVklTSU9OX0NIQU5HRVNbY29tcGlsZXJSZXZpc2lvbl07XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihcbiAgICAgICdUZW1wbGF0ZSB3YXMgcHJlY29tcGlsZWQgd2l0aCBhbiBvbGRlciB2ZXJzaW9uIG9mIEhhbmRsZWJhcnMgdGhhbiB0aGUgY3VycmVudCBydW50aW1lLiAnICtcbiAgICAgICAgJ1BsZWFzZSB1cGRhdGUgeW91ciBwcmVjb21waWxlciB0byBhIG5ld2VyIHZlcnNpb24gKCcgK1xuICAgICAgICBydW50aW1lVmVyc2lvbnMgK1xuICAgICAgICAnKSBvciBkb3duZ3JhZGUgeW91ciBydW50aW1lIHRvIGFuIG9sZGVyIHZlcnNpb24gKCcgK1xuICAgICAgICBjb21waWxlclZlcnNpb25zICtcbiAgICAgICAgJykuJ1xuICAgICk7XG4gIH0gZWxzZSB7XG4gICAgLy8gVXNlIHRoZSBlbWJlZGRlZCB2ZXJzaW9uIGluZm8gc2luY2UgdGhlIHJ1bnRpbWUgZG9lc24ndCBrbm93IGFib3V0IHRoaXMgcmV2aXNpb24geWV0XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihcbiAgICAgICdUZW1wbGF0ZSB3YXMgcHJlY29tcGlsZWQgd2l0aCBhIG5ld2VyIHZlcnNpb24gb2YgSGFuZGxlYmFycyB0aGFuIHRoZSBjdXJyZW50IHJ1bnRpbWUuICcgK1xuICAgICAgICAnUGxlYXNlIHVwZGF0ZSB5b3VyIHJ1bnRpbWUgdG8gYSBuZXdlciB2ZXJzaW9uICgnICtcbiAgICAgICAgY29tcGlsZXJJbmZvWzFdICtcbiAgICAgICAgJykuJ1xuICAgICk7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHRlbXBsYXRlKHRlbXBsYXRlU3BlYywgZW52KSB7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIGlmICghZW52KSB7XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignTm8gZW52aXJvbm1lbnQgcGFzc2VkIHRvIHRlbXBsYXRlJyk7XG4gIH1cbiAgaWYgKCF0ZW1wbGF0ZVNwZWMgfHwgIXRlbXBsYXRlU3BlYy5tYWluKSB7XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignVW5rbm93biB0ZW1wbGF0ZSBvYmplY3Q6ICcgKyB0eXBlb2YgdGVtcGxhdGVTcGVjKTtcbiAgfVxuXG4gIHRlbXBsYXRlU3BlYy5tYWluLmRlY29yYXRvciA9IHRlbXBsYXRlU3BlYy5tYWluX2Q7XG5cbiAgLy8gTm90ZTogVXNpbmcgZW52LlZNIHJlZmVyZW5jZXMgcmF0aGVyIHRoYW4gbG9jYWwgdmFyIHJlZmVyZW5jZXMgdGhyb3VnaG91dCB0aGlzIHNlY3Rpb24gdG8gYWxsb3dcbiAgLy8gZm9yIGV4dGVybmFsIHVzZXJzIHRvIG92ZXJyaWRlIHRoZXNlIGFzIHBzZXVkby1zdXBwb3J0ZWQgQVBJcy5cbiAgZW52LlZNLmNoZWNrUmV2aXNpb24odGVtcGxhdGVTcGVjLmNvbXBpbGVyKTtcblxuICAvLyBiYWNrd2FyZHMgY29tcGF0aWJpbGl0eSBmb3IgcHJlY29tcGlsZWQgdGVtcGxhdGVzIHdpdGggY29tcGlsZXItdmVyc2lvbiA3ICg8NC4zLjApXG4gIGNvbnN0IHRlbXBsYXRlV2FzUHJlY29tcGlsZWRXaXRoQ29tcGlsZXJWNyA9XG4gICAgdGVtcGxhdGVTcGVjLmNvbXBpbGVyICYmIHRlbXBsYXRlU3BlYy5jb21waWxlclswXSA9PT0gNztcblxuICBmdW5jdGlvbiBpbnZva2VQYXJ0aWFsV3JhcHBlcihwYXJ0aWFsLCBjb250ZXh0LCBvcHRpb25zKSB7XG4gICAgaWYgKG9wdGlvbnMuaGFzaCkge1xuICAgICAgY29udGV4dCA9IFV0aWxzLmV4dGVuZCh7fSwgY29udGV4dCwgb3B0aW9ucy5oYXNoKTtcbiAgICAgIGlmIChvcHRpb25zLmlkcykge1xuICAgICAgICBvcHRpb25zLmlkc1swXSA9IHRydWU7XG4gICAgICB9XG4gICAgfVxuICAgIHBhcnRpYWwgPSBlbnYuVk0ucmVzb2x2ZVBhcnRpYWwuY2FsbCh0aGlzLCBwYXJ0aWFsLCBjb250ZXh0LCBvcHRpb25zKTtcblxuICAgIGxldCBleHRlbmRlZE9wdGlvbnMgPSBVdGlscy5leHRlbmQoe30sIG9wdGlvbnMsIHtcbiAgICAgIGhvb2tzOiB0aGlzLmhvb2tzLFxuICAgICAgcHJvdG9BY2Nlc3NDb250cm9sOiB0aGlzLnByb3RvQWNjZXNzQ29udHJvbFxuICAgIH0pO1xuXG4gICAgbGV0IHJlc3VsdCA9IGVudi5WTS5pbnZva2VQYXJ0aWFsLmNhbGwoXG4gICAgICB0aGlzLFxuICAgICAgcGFydGlhbCxcbiAgICAgIGNvbnRleHQsXG4gICAgICBleHRlbmRlZE9wdGlvbnNcbiAgICApO1xuXG4gICAgaWYgKHJlc3VsdCA9PSBudWxsICYmIGVudi5jb21waWxlKSB7XG4gICAgICBvcHRpb25zLnBhcnRpYWxzW29wdGlvbnMubmFtZV0gPSBlbnYuY29tcGlsZShcbiAgICAgICAgcGFydGlhbCxcbiAgICAgICAgdGVtcGxhdGVTcGVjLmNvbXBpbGVyT3B0aW9ucyxcbiAgICAgICAgZW52XG4gICAgICApO1xuICAgICAgcmVzdWx0ID0gb3B0aW9ucy5wYXJ0aWFsc1tvcHRpb25zLm5hbWVdKGNvbnRleHQsIGV4dGVuZGVkT3B0aW9ucyk7XG4gICAgfVxuICAgIGlmIChyZXN1bHQgIT0gbnVsbCkge1xuICAgICAgaWYgKG9wdGlvbnMuaW5kZW50KSB7XG4gICAgICAgIGxldCBsaW5lcyA9IHJlc3VsdC5zcGxpdCgnXFxuJyk7XG4gICAgICAgIGZvciAobGV0IGkgPSAwLCBsID0gbGluZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgaWYgKCFsaW5lc1tpXSAmJiBpICsgMSA9PT0gbCkge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgbGluZXNbaV0gPSBvcHRpb25zLmluZGVudCArIGxpbmVzW2ldO1xuICAgICAgICB9XG4gICAgICAgIHJlc3VsdCA9IGxpbmVzLmpvaW4oJ1xcbicpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihcbiAgICAgICAgJ1RoZSBwYXJ0aWFsICcgK1xuICAgICAgICAgIG9wdGlvbnMubmFtZSArXG4gICAgICAgICAgJyBjb3VsZCBub3QgYmUgY29tcGlsZWQgd2hlbiBydW5uaW5nIGluIHJ1bnRpbWUtb25seSBtb2RlJ1xuICAgICAgKTtcbiAgICB9XG4gIH1cblxuICAvLyBKdXN0IGFkZCB3YXRlclxuICBsZXQgY29udGFpbmVyID0ge1xuICAgIHN0cmljdDogZnVuY3Rpb24ob2JqLCBuYW1lLCBsb2MpIHtcbiAgICAgIGlmICghb2JqIHx8ICEobmFtZSBpbiBvYmopKSB7XG4gICAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ1wiJyArIG5hbWUgKyAnXCIgbm90IGRlZmluZWQgaW4gJyArIG9iaiwge1xuICAgICAgICAgIGxvYzogbG9jXG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgcmV0dXJuIG9ialtuYW1lXTtcbiAgICB9LFxuICAgIGxvb2t1cFByb3BlcnR5OiBmdW5jdGlvbihwYXJlbnQsIHByb3BlcnR5TmFtZSkge1xuICAgICAgbGV0IHJlc3VsdCA9IHBhcmVudFtwcm9wZXJ0eU5hbWVdO1xuICAgICAgaWYgKHJlc3VsdCA9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG4gICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHBhcmVudCwgcHJvcGVydHlOYW1lKSkge1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfVxuXG4gICAgICBpZiAocmVzdWx0SXNBbGxvd2VkKHJlc3VsdCwgY29udGFpbmVyLnByb3RvQWNjZXNzQ29udHJvbCwgcHJvcGVydHlOYW1lKSkge1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfVxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9LFxuICAgIGxvb2t1cDogZnVuY3Rpb24oZGVwdGhzLCBuYW1lKSB7XG4gICAgICBjb25zdCBsZW4gPSBkZXB0aHMubGVuZ3RoO1xuICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW47IGkrKykge1xuICAgICAgICBsZXQgcmVzdWx0ID0gZGVwdGhzW2ldICYmIGNvbnRhaW5lci5sb29rdXBQcm9wZXJ0eShkZXB0aHNbaV0sIG5hbWUpO1xuICAgICAgICBpZiAocmVzdWx0ICE9IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gZGVwdGhzW2ldW25hbWVdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcbiAgICBsYW1iZGE6IGZ1bmN0aW9uKGN1cnJlbnQsIGNvbnRleHQpIHtcbiAgICAgIHJldHVybiB0eXBlb2YgY3VycmVudCA9PT0gJ2Z1bmN0aW9uJyA/IGN1cnJlbnQuY2FsbChjb250ZXh0KSA6IGN1cnJlbnQ7XG4gICAgfSxcblxuICAgIGVzY2FwZUV4cHJlc3Npb246IFV0aWxzLmVzY2FwZUV4cHJlc3Npb24sXG4gICAgaW52b2tlUGFydGlhbDogaW52b2tlUGFydGlhbFdyYXBwZXIsXG5cbiAgICBmbjogZnVuY3Rpb24oaSkge1xuICAgICAgbGV0IHJldCA9IHRlbXBsYXRlU3BlY1tpXTtcbiAgICAgIHJldC5kZWNvcmF0b3IgPSB0ZW1wbGF0ZVNwZWNbaSArICdfZCddO1xuICAgICAgcmV0dXJuIHJldDtcbiAgICB9LFxuXG4gICAgcHJvZ3JhbXM6IFtdLFxuICAgIHByb2dyYW06IGZ1bmN0aW9uKGksIGRhdGEsIGRlY2xhcmVkQmxvY2tQYXJhbXMsIGJsb2NrUGFyYW1zLCBkZXB0aHMpIHtcbiAgICAgIGxldCBwcm9ncmFtV3JhcHBlciA9IHRoaXMucHJvZ3JhbXNbaV0sXG4gICAgICAgIGZuID0gdGhpcy5mbihpKTtcbiAgICAgIGlmIChkYXRhIHx8IGRlcHRocyB8fCBibG9ja1BhcmFtcyB8fCBkZWNsYXJlZEJsb2NrUGFyYW1zKSB7XG4gICAgICAgIHByb2dyYW1XcmFwcGVyID0gd3JhcFByb2dyYW0oXG4gICAgICAgICAgdGhpcyxcbiAgICAgICAgICBpLFxuICAgICAgICAgIGZuLFxuICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgZGVjbGFyZWRCbG9ja1BhcmFtcyxcbiAgICAgICAgICBibG9ja1BhcmFtcyxcbiAgICAgICAgICBkZXB0aHNcbiAgICAgICAgKTtcbiAgICAgIH0gZWxzZSBpZiAoIXByb2dyYW1XcmFwcGVyKSB7XG4gICAgICAgIHByb2dyYW1XcmFwcGVyID0gdGhpcy5wcm9ncmFtc1tpXSA9IHdyYXBQcm9ncmFtKHRoaXMsIGksIGZuKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBwcm9ncmFtV3JhcHBlcjtcbiAgICB9LFxuXG4gICAgZGF0YTogZnVuY3Rpb24odmFsdWUsIGRlcHRoKSB7XG4gICAgICB3aGlsZSAodmFsdWUgJiYgZGVwdGgtLSkge1xuICAgICAgICB2YWx1ZSA9IHZhbHVlLl9wYXJlbnQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gdmFsdWU7XG4gICAgfSxcbiAgICBtZXJnZUlmTmVlZGVkOiBmdW5jdGlvbihwYXJhbSwgY29tbW9uKSB7XG4gICAgICBsZXQgb2JqID0gcGFyYW0gfHwgY29tbW9uO1xuXG4gICAgICBpZiAocGFyYW0gJiYgY29tbW9uICYmIHBhcmFtICE9PSBjb21tb24pIHtcbiAgICAgICAgb2JqID0gVXRpbHMuZXh0ZW5kKHt9LCBjb21tb24sIHBhcmFtKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG9iajtcbiAgICB9LFxuICAgIC8vIEFuIGVtcHR5IG9iamVjdCB0byB1c2UgYXMgcmVwbGFjZW1lbnQgZm9yIG51bGwtY29udGV4dHNcbiAgICBudWxsQ29udGV4dDogT2JqZWN0LnNlYWwoe30pLFxuXG4gICAgbm9vcDogZW52LlZNLm5vb3AsXG4gICAgY29tcGlsZXJJbmZvOiB0ZW1wbGF0ZVNwZWMuY29tcGlsZXJcbiAgfTtcblxuICBmdW5jdGlvbiByZXQoY29udGV4dCwgb3B0aW9ucyA9IHt9KSB7XG4gICAgbGV0IGRhdGEgPSBvcHRpb25zLmRhdGE7XG5cbiAgICByZXQuX3NldHVwKG9wdGlvbnMpO1xuICAgIGlmICghb3B0aW9ucy5wYXJ0aWFsICYmIHRlbXBsYXRlU3BlYy51c2VEYXRhKSB7XG4gICAgICBkYXRhID0gaW5pdERhdGEoY29udGV4dCwgZGF0YSk7XG4gICAgfVxuICAgIGxldCBkZXB0aHMsXG4gICAgICBibG9ja1BhcmFtcyA9IHRlbXBsYXRlU3BlYy51c2VCbG9ja1BhcmFtcyA/IFtdIDogdW5kZWZpbmVkO1xuICAgIGlmICh0ZW1wbGF0ZVNwZWMudXNlRGVwdGhzKSB7XG4gICAgICBpZiAob3B0aW9ucy5kZXB0aHMpIHtcbiAgICAgICAgZGVwdGhzID1cbiAgICAgICAgICBjb250ZXh0ICE9IG9wdGlvbnMuZGVwdGhzWzBdXG4gICAgICAgICAgICA/IFtjb250ZXh0XS5jb25jYXQob3B0aW9ucy5kZXB0aHMpXG4gICAgICAgICAgICA6IG9wdGlvbnMuZGVwdGhzO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVwdGhzID0gW2NvbnRleHRdO1xuICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIG1haW4oY29udGV4dCAvKiwgb3B0aW9ucyovKSB7XG4gICAgICByZXR1cm4gKFxuICAgICAgICAnJyArXG4gICAgICAgIHRlbXBsYXRlU3BlYy5tYWluKFxuICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICBjb250ZXh0LFxuICAgICAgICAgIGNvbnRhaW5lci5oZWxwZXJzLFxuICAgICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyxcbiAgICAgICAgICBkYXRhLFxuICAgICAgICAgIGJsb2NrUGFyYW1zLFxuICAgICAgICAgIGRlcHRoc1xuICAgICAgICApXG4gICAgICApO1xuICAgIH1cblxuICAgIG1haW4gPSBleGVjdXRlRGVjb3JhdG9ycyhcbiAgICAgIHRlbXBsYXRlU3BlYy5tYWluLFxuICAgICAgbWFpbixcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIG9wdGlvbnMuZGVwdGhzIHx8IFtdLFxuICAgICAgZGF0YSxcbiAgICAgIGJsb2NrUGFyYW1zXG4gICAgKTtcbiAgICByZXR1cm4gbWFpbihjb250ZXh0LCBvcHRpb25zKTtcbiAgfVxuXG4gIHJldC5pc1RvcCA9IHRydWU7XG5cbiAgcmV0Ll9zZXR1cCA9IGZ1bmN0aW9uKG9wdGlvbnMpIHtcbiAgICBpZiAoIW9wdGlvbnMucGFydGlhbCkge1xuICAgICAgbGV0IG1lcmdlZEhlbHBlcnMgPSBVdGlscy5leHRlbmQoe30sIGVudi5oZWxwZXJzLCBvcHRpb25zLmhlbHBlcnMpO1xuICAgICAgd3JhcEhlbHBlcnNUb1Bhc3NMb29rdXBQcm9wZXJ0eShtZXJnZWRIZWxwZXJzLCBjb250YWluZXIpO1xuICAgICAgY29udGFpbmVyLmhlbHBlcnMgPSBtZXJnZWRIZWxwZXJzO1xuXG4gICAgICBpZiAodGVtcGxhdGVTcGVjLnVzZVBhcnRpYWwpIHtcbiAgICAgICAgLy8gVXNlIG1lcmdlSWZOZWVkZWQgaGVyZSB0byBwcmV2ZW50IGNvbXBpbGluZyBnbG9iYWwgcGFydGlhbHMgbXVsdGlwbGUgdGltZXNcbiAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gY29udGFpbmVyLm1lcmdlSWZOZWVkZWQoXG4gICAgICAgICAgb3B0aW9ucy5wYXJ0aWFscyxcbiAgICAgICAgICBlbnYucGFydGlhbHNcbiAgICAgICAgKTtcbiAgICAgIH1cbiAgICAgIGlmICh0ZW1wbGF0ZVNwZWMudXNlUGFydGlhbCB8fCB0ZW1wbGF0ZVNwZWMudXNlRGVjb3JhdG9ycykge1xuICAgICAgICBjb250YWluZXIuZGVjb3JhdG9ycyA9IFV0aWxzLmV4dGVuZChcbiAgICAgICAgICB7fSxcbiAgICAgICAgICBlbnYuZGVjb3JhdG9ycyxcbiAgICAgICAgICBvcHRpb25zLmRlY29yYXRvcnNcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29udGFpbmVyLmhvb2tzID0ge307XG4gICAgICBjb250YWluZXIucHJvdG9BY2Nlc3NDb250cm9sID0gY3JlYXRlUHJvdG9BY2Nlc3NDb250cm9sKG9wdGlvbnMpO1xuXG4gICAgICBsZXQga2VlcEhlbHBlckluSGVscGVycyA9XG4gICAgICAgIG9wdGlvbnMuYWxsb3dDYWxsc1RvSGVscGVyTWlzc2luZyB8fFxuICAgICAgICB0ZW1wbGF0ZVdhc1ByZWNvbXBpbGVkV2l0aENvbXBpbGVyVjc7XG4gICAgICBtb3ZlSGVscGVyVG9Ib29rcyhjb250YWluZXIsICdoZWxwZXJNaXNzaW5nJywga2VlcEhlbHBlckluSGVscGVycyk7XG4gICAgICBtb3ZlSGVscGVyVG9Ib29rcyhjb250YWluZXIsICdibG9ja0hlbHBlck1pc3NpbmcnLCBrZWVwSGVscGVySW5IZWxwZXJzKTtcbiAgICB9IGVsc2Uge1xuICAgICAgY29udGFpbmVyLnByb3RvQWNjZXNzQ29udHJvbCA9IG9wdGlvbnMucHJvdG9BY2Nlc3NDb250cm9sOyAvLyBpbnRlcm5hbCBvcHRpb25cbiAgICAgIGNvbnRhaW5lci5oZWxwZXJzID0gb3B0aW9ucy5oZWxwZXJzO1xuICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gb3B0aW9ucy5wYXJ0aWFscztcbiAgICAgIGNvbnRhaW5lci5kZWNvcmF0b3JzID0gb3B0aW9ucy5kZWNvcmF0b3JzO1xuICAgICAgY29udGFpbmVyLmhvb2tzID0gb3B0aW9ucy5ob29rcztcbiAgICB9XG4gIH07XG5cbiAgcmV0Ll9jaGlsZCA9IGZ1bmN0aW9uKGksIGRhdGEsIGJsb2NrUGFyYW1zLCBkZXB0aHMpIHtcbiAgICBpZiAodGVtcGxhdGVTcGVjLnVzZUJsb2NrUGFyYW1zICYmICFibG9ja1BhcmFtcykge1xuICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignbXVzdCBwYXNzIGJsb2NrIHBhcmFtcycpO1xuICAgIH1cbiAgICBpZiAodGVtcGxhdGVTcGVjLnVzZURlcHRocyAmJiAhZGVwdGhzKSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCdtdXN0IHBhc3MgcGFyZW50IGRlcHRocycpO1xuICAgIH1cblxuICAgIHJldHVybiB3cmFwUHJvZ3JhbShcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIGksXG4gICAgICB0ZW1wbGF0ZVNwZWNbaV0sXG4gICAgICBkYXRhLFxuICAgICAgMCxcbiAgICAgIGJsb2NrUGFyYW1zLFxuICAgICAgZGVwdGhzXG4gICAgKTtcbiAgfTtcbiAgcmV0dXJuIHJldDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHdyYXBQcm9ncmFtKFxuICBjb250YWluZXIsXG4gIGksXG4gIGZuLFxuICBkYXRhLFxuICBkZWNsYXJlZEJsb2NrUGFyYW1zLFxuICBibG9ja1BhcmFtcyxcbiAgZGVwdGhzXG4pIHtcbiAgZnVuY3Rpb24gcHJvZyhjb250ZXh0LCBvcHRpb25zID0ge30pIHtcbiAgICBsZXQgY3VycmVudERlcHRocyA9IGRlcHRocztcbiAgICBpZiAoXG4gICAgICBkZXB0aHMgJiZcbiAgICAgIGNvbnRleHQgIT0gZGVwdGhzWzBdICYmXG4gICAgICAhKGNvbnRleHQgPT09IGNvbnRhaW5lci5udWxsQ29udGV4dCAmJiBkZXB0aHNbMF0gPT09IG51bGwpXG4gICAgKSB7XG4gICAgICBjdXJyZW50RGVwdGhzID0gW2NvbnRleHRdLmNvbmNhdChkZXB0aHMpO1xuICAgIH1cblxuICAgIHJldHVybiBmbihcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIGNvbnRleHQsXG4gICAgICBjb250YWluZXIuaGVscGVycyxcbiAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyxcbiAgICAgIG9wdGlvbnMuZGF0YSB8fCBkYXRhLFxuICAgICAgYmxvY2tQYXJhbXMgJiYgW29wdGlvbnMuYmxvY2tQYXJhbXNdLmNvbmNhdChibG9ja1BhcmFtcyksXG4gICAgICBjdXJyZW50RGVwdGhzXG4gICAgKTtcbiAgfVxuXG4gIHByb2cgPSBleGVjdXRlRGVjb3JhdG9ycyhmbiwgcHJvZywgY29udGFpbmVyLCBkZXB0aHMsIGRhdGEsIGJsb2NrUGFyYW1zKTtcblxuICBwcm9nLnByb2dyYW0gPSBpO1xuICBwcm9nLmRlcHRoID0gZGVwdGhzID8gZGVwdGhzLmxlbmd0aCA6IDA7XG4gIHByb2cuYmxvY2tQYXJhbXMgPSBkZWNsYXJlZEJsb2NrUGFyYW1zIHx8IDA7XG4gIHJldHVybiBwcm9nO1xufVxuXG4vKipcbiAqIFRoaXMgaXMgY3VycmVudGx5IHBhcnQgb2YgdGhlIG9mZmljaWFsIEFQSSwgdGhlcmVmb3JlIGltcGxlbWVudGF0aW9uIGRldGFpbHMgc2hvdWxkIG5vdCBiZSBjaGFuZ2VkLlxuICovXG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZVBhcnRpYWwocGFydGlhbCwgY29udGV4dCwgb3B0aW9ucykge1xuICBpZiAoIXBhcnRpYWwpIHtcbiAgICBpZiAob3B0aW9ucy5uYW1lID09PSAnQHBhcnRpYWwtYmxvY2snKSB7XG4gICAgICBwYXJ0aWFsID0gb3B0aW9ucy5kYXRhWydwYXJ0aWFsLWJsb2NrJ107XG4gICAgfSBlbHNlIHtcbiAgICAgIHBhcnRpYWwgPSBvcHRpb25zLnBhcnRpYWxzW29wdGlvbnMubmFtZV07XG4gICAgfVxuICB9IGVsc2UgaWYgKCFwYXJ0aWFsLmNhbGwgJiYgIW9wdGlvbnMubmFtZSkge1xuICAgIC8vIFRoaXMgaXMgYSBkeW5hbWljIHBhcnRpYWwgdGhhdCByZXR1cm5lZCBhIHN0cmluZ1xuICAgIG9wdGlvbnMubmFtZSA9IHBhcnRpYWw7XG4gICAgcGFydGlhbCA9IG9wdGlvbnMucGFydGlhbHNbcGFydGlhbF07XG4gIH1cbiAgcmV0dXJuIHBhcnRpYWw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpbnZva2VQYXJ0aWFsKHBhcnRpYWwsIGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgLy8gVXNlIHRoZSBjdXJyZW50IGNsb3N1cmUgY29udGV4dCB0byBzYXZlIHRoZSBwYXJ0aWFsLWJsb2NrIGlmIHRoaXMgcGFydGlhbFxuICBjb25zdCBjdXJyZW50UGFydGlhbEJsb2NrID0gb3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuZGF0YVsncGFydGlhbC1ibG9jayddO1xuICBvcHRpb25zLnBhcnRpYWwgPSB0cnVlO1xuICBpZiAob3B0aW9ucy5pZHMpIHtcbiAgICBvcHRpb25zLmRhdGEuY29udGV4dFBhdGggPSBvcHRpb25zLmlkc1swXSB8fCBvcHRpb25zLmRhdGEuY29udGV4dFBhdGg7XG4gIH1cblxuICBsZXQgcGFydGlhbEJsb2NrO1xuICBpZiAob3B0aW9ucy5mbiAmJiBvcHRpb25zLmZuICE9PSBub29wKSB7XG4gICAgb3B0aW9ucy5kYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAvLyBXcmFwcGVyIGZ1bmN0aW9uIHRvIGdldCBhY2Nlc3MgdG8gY3VycmVudFBhcnRpYWxCbG9jayBmcm9tIHRoZSBjbG9zdXJlXG4gICAgbGV0IGZuID0gb3B0aW9ucy5mbjtcbiAgICBwYXJ0aWFsQmxvY2sgPSBvcHRpb25zLmRhdGFbJ3BhcnRpYWwtYmxvY2snXSA9IGZ1bmN0aW9uIHBhcnRpYWxCbG9ja1dyYXBwZXIoXG4gICAgICBjb250ZXh0LFxuICAgICAgb3B0aW9ucyA9IHt9XG4gICAgKSB7XG4gICAgICAvLyBSZXN0b3JlIHRoZSBwYXJ0aWFsLWJsb2NrIGZyb20gdGhlIGNsb3N1cmUgZm9yIHRoZSBleGVjdXRpb24gb2YgdGhlIGJsb2NrXG4gICAgICAvLyBpLmUuIHRoZSBwYXJ0IGluc2lkZSB0aGUgYmxvY2sgb2YgdGhlIHBhcnRpYWwgY2FsbC5cbiAgICAgIG9wdGlvbnMuZGF0YSA9IGNyZWF0ZUZyYW1lKG9wdGlvbnMuZGF0YSk7XG4gICAgICBvcHRpb25zLmRhdGFbJ3BhcnRpYWwtYmxvY2snXSA9IGN1cnJlbnRQYXJ0aWFsQmxvY2s7XG4gICAgICByZXR1cm4gZm4oY29udGV4dCwgb3B0aW9ucyk7XG4gICAgfTtcbiAgICBpZiAoZm4ucGFydGlhbHMpIHtcbiAgICAgIG9wdGlvbnMucGFydGlhbHMgPSBVdGlscy5leHRlbmQoe30sIG9wdGlvbnMucGFydGlhbHMsIGZuLnBhcnRpYWxzKTtcbiAgICB9XG4gIH1cblxuICBpZiAocGFydGlhbCA9PT0gdW5kZWZpbmVkICYmIHBhcnRpYWxCbG9jaykge1xuICAgIHBhcnRpYWwgPSBwYXJ0aWFsQmxvY2s7XG4gIH1cblxuICBpZiAocGFydGlhbCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignVGhlIHBhcnRpYWwgJyArIG9wdGlvbnMubmFtZSArICcgY291bGQgbm90IGJlIGZvdW5kJyk7XG4gIH0gZWxzZSBpZiAocGFydGlhbCBpbnN0YW5jZW9mIEZ1bmN0aW9uKSB7XG4gICAgcmV0dXJuIHBhcnRpYWwoY29udGV4dCwgb3B0aW9ucyk7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vb3AoKSB7XG4gIHJldHVybiAnJztcbn1cblxuZnVuY3Rpb24gaW5pdERhdGEoY29udGV4dCwgZGF0YSkge1xuICBpZiAoIWRhdGEgfHwgISgncm9vdCcgaW4gZGF0YSkpIHtcbiAgICBkYXRhID0gZGF0YSA/IGNyZWF0ZUZyYW1lKGRhdGEpIDoge307XG4gICAgZGF0YS5yb290ID0gY29udGV4dDtcbiAgfVxuICByZXR1cm4gZGF0YTtcbn1cblxuZnVuY3Rpb24gZXhlY3V0ZURlY29yYXRvcnMoZm4sIHByb2csIGNvbnRhaW5lciwgZGVwdGhzLCBkYXRhLCBibG9ja1BhcmFtcykge1xuICBpZiAoZm4uZGVjb3JhdG9yKSB7XG4gICAgbGV0IHByb3BzID0ge307XG4gICAgcHJvZyA9IGZuLmRlY29yYXRvcihcbiAgICAgIHByb2csXG4gICAgICBwcm9wcyxcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIGRlcHRocyAmJiBkZXB0aHNbMF0sXG4gICAgICBkYXRhLFxuICAgICAgYmxvY2tQYXJhbXMsXG4gICAgICBkZXB0aHNcbiAgICApO1xuICAgIFV0aWxzLmV4dGVuZChwcm9nLCBwcm9wcyk7XG4gIH1cbiAgcmV0dXJuIHByb2c7XG59XG5cbmZ1bmN0aW9uIHdyYXBIZWxwZXJzVG9QYXNzTG9va3VwUHJvcGVydHkobWVyZ2VkSGVscGVycywgY29udGFpbmVyKSB7XG4gIE9iamVjdC5rZXlzKG1lcmdlZEhlbHBlcnMpLmZvckVhY2goaGVscGVyTmFtZSA9PiB7XG4gICAgbGV0IGhlbHBlciA9IG1lcmdlZEhlbHBlcnNbaGVscGVyTmFtZV07XG4gICAgbWVyZ2VkSGVscGVyc1toZWxwZXJOYW1lXSA9IHBhc3NMb29rdXBQcm9wZXJ0eU9wdGlvbihoZWxwZXIsIGNvbnRhaW5lcik7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBwYXNzTG9va3VwUHJvcGVydHlPcHRpb24oaGVscGVyLCBjb250YWluZXIpIHtcbiAgY29uc3QgbG9va3VwUHJvcGVydHkgPSBjb250YWluZXIubG9va3VwUHJvcGVydHk7XG4gIHJldHVybiB3cmFwSGVscGVyKGhlbHBlciwgb3B0aW9ucyA9PiB7XG4gICAgcmV0dXJuIFV0aWxzLmV4dGVuZCh7IGxvb2t1cFByb3BlcnR5IH0sIG9wdGlvbnMpO1xuICB9KTtcbn1cbiJdfQ==\n"
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\internal\\wrapHelper.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js",
"index": 22,
"index2": 18,
"size": 2192,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"issuerId": 21,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
},
{
"id": 21,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
}
}
],
"profile": {
"factory": 491,
"building": 8
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 21,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars/runtime.js",
"type": "cjs require",
"userRequest": "./internal/wrapHelper",
"loc": "30:26-58"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "'use strict';\n\nexports.__esModule = true;\nexports.wrapHelper = wrapHelper;\n\nfunction wrapHelper(helper, transformOptionsFn) {\n if (typeof helper !== 'function') {\n // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639\n // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.\n return helper;\n }\n var wrapper = function wrapper() /* dynamic arguments */{\n var options = arguments[arguments.length - 1];\n arguments[arguments.length - 1] = transformOptionsFn(options);\n return helper.apply(this, arguments);\n };\n return wrapper;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3dyYXBIZWxwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBTyxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUUsa0JBQWtCLEVBQUU7QUFDckQsTUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLEVBQUU7OztBQUdoQyxXQUFPLE1BQU0sQ0FBQztHQUNmO0FBQ0QsTUFBSSxPQUFPLEdBQUcsU0FBVixPQUFPLDBCQUFxQztBQUM5QyxRQUFNLE9BQU8sR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztBQUNoRCxhQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsR0FBRyxrQkFBa0IsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUM5RCxXQUFPLE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0dBQ3RDLENBQUM7QUFDRixTQUFPLE9BQU8sQ0FBQztDQUNoQiIsImZpbGUiOiJ3cmFwSGVscGVyLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIHdyYXBIZWxwZXIoaGVscGVyLCB0cmFuc2Zvcm1PcHRpb25zRm4pIHtcbiAgaWYgKHR5cGVvZiBoZWxwZXIgIT09ICdmdW5jdGlvbicpIHtcbiAgICAvLyBUaGlzIHNob3VsZCBub3QgaGFwcGVuLCBidXQgYXBwYXJlbnRseSBpdCBkb2VzIGluIGh0dHBzOi8vZ2l0aHViLmNvbS93eWNhdHMvaGFuZGxlYmFycy5qcy9pc3N1ZXMvMTYzOVxuICAgIC8vIFdlIHRyeSB0byBtYWtlIHRoZSB3cmFwcGVyIGxlYXN0LWludmFzaXZlIGJ5IG5vdCB3cmFwcGluZyBpdCwgaWYgdGhlIGhlbHBlciBpcyBub3QgYSBmdW5jdGlvbi5cbiAgICByZXR1cm4gaGVscGVyO1xuICB9XG4gIGxldCB3cmFwcGVyID0gZnVuY3Rpb24oLyogZHluYW1pYyBhcmd1bWVudHMgKi8pIHtcbiAgICBjb25zdCBvcHRpb25zID0gYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXTtcbiAgICBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDFdID0gdHJhbnNmb3JtT3B0aW9uc0ZuKG9wdGlvbnMpO1xuICAgIHJldHVybiBoZWxwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgfTtcbiAgcmV0dXJuIHdyYXBwZXI7XG59XG4iXX0=\n"
},
{
"id": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars\\no-conflict.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars/no-conflict.js",
"index": 23,
"index2": 20,
"size": 1532,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"issuerId": 9,
"issuerName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"issuerPath": [
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\html-webpack-plugin\\lib\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\handlebars-loader\\index.js!E:\\projects\\TWEB\\tweb\\src\\index.hbs",
"name": "./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs",
"profile": {
"factory": 128,
"building": 2466
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\runtime.js",
"name": "./node_modules/handlebars/runtime.js",
"profile": {
"factory": 1473,
"building": 12
}
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"name": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"profile": {
"factory": 1891,
"building": 413
}
}
],
"profile": {
"factory": 869,
"building": 303,
"dependencies": 490
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\handlebars\\dist\\cjs\\handlebars.runtime.js",
"module": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"moduleName": "./node_modules/handlebars/dist/cjs/handlebars.runtime.js",
"type": "cjs require",
"userRequest": "./handlebars/no-conflict",
"loc": "35:28-63"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "'use strict';\n\nexports.__esModule = true;\n\nexports['default'] = function (Handlebars) {\n /* istanbul ignore next */\n var root = typeof global !== 'undefined' ? global : window,\n $Handlebars = root.Handlebars;\n /* istanbul ignore next */\n Handlebars.noConflict = function () {\n if (root.Handlebars === Handlebars) {\n root.Handlebars = $Handlebars;\n }\n return Handlebars;\n };\n};\n\nmodule.exports = exports['default'];\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxVQUFVLEVBQUU7O0FBRWxDLE1BQUksSUFBSSxHQUFHLE9BQU8sTUFBTSxLQUFLLFdBQVcsR0FBRyxNQUFNLEdBQUcsTUFBTTtNQUN4RCxXQUFXLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQzs7QUFFaEMsWUFBVSxDQUFDLFVBQVUsR0FBRyxZQUFXO0FBQ2pDLFFBQUksSUFBSSxDQUFDLFVBQVUsS0FBSyxVQUFVLEVBQUU7QUFDbEMsVUFBSSxDQUFDLFVBQVUsR0FBRyxXQUFXLENBQUM7S0FDL0I7QUFDRCxXQUFPLFVBQVUsQ0FBQztHQUNuQixDQUFDO0NBQ0giLCJmaWxlIjoibm8tY29uZmxpY3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihIYW5kbGViYXJzKSB7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIGxldCByb290ID0gdHlwZW9mIGdsb2JhbCAhPT0gJ3VuZGVmaW5lZCcgPyBnbG9iYWwgOiB3aW5kb3csXG4gICAgJEhhbmRsZWJhcnMgPSByb290LkhhbmRsZWJhcnM7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIEhhbmRsZWJhcnMubm9Db25mbGljdCA9IGZ1bmN0aW9uKCkge1xuICAgIGlmIChyb290LkhhbmRsZWJhcnMgPT09IEhhbmRsZWJhcnMpIHtcbiAgICAgIHJvb3QuSGFuZGxlYmFycyA9ICRIYW5kbGViYXJzO1xuICAgIH1cbiAgICByZXR1cm4gSGFuZGxlYmFycztcbiAgfTtcbn1cbiJdfQ==\n"
}
],
"filteredModules": 0,
"logging": {
"webpack.buildChunkGraph.visitModules": {
"entries": [],
"filteredEntries": 2,
"debug": false
}
},
"children": [],
"name": "html-webpack-plugin for \"index.html\""
},
{
"errors": [],
"warnings": [],
"publicPath": "",
"outputPath": "E:\\projects\\TWEB\\tweb\\public",
"assetsByChunkName": {},
"assets": [],
"filteredAssets": 0,
"entrypoints": {
"mini-css-extract-plugin": {
"chunks": [
0
],
"assets": [
"*"
],
"children": {},
"childAssets": {}
}
},
"namedChunkGroups": {
"mini-css-extract-plugin": {
"chunks": [
0
],
"assets": [
"*"
],
"children": {},
"childAssets": {}
}
},
"chunks": [
{
"id": 0,
"rendered": true,
"initial": true,
"entry": true,
"size": 6478,
"names": [
"mini-css-extract-plugin"
],
"files": [
"*"
],
"hash": "0de1db9e3079a2e0e2a7",
"siblings": [],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"index": 0,
"index2": 1,
"size": 3961,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 5,
"building": 3760
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"loc": "mini-css-extract-plugin"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"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;-webkit-text-decoration:underline dotted;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}.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)}.hide{display:none !important}.no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.center-align{text-align:center}a{text-decoration:none}html{line-height:1.5;font-weight:normal}h1,h2,h3,h4,h5,h6{line-height:1.3}em{font-style:italic}strong{font-weight:500}small{font-size:75%}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\runtime\\api.js",
"name": "./node_modules/css-loader/dist/runtime/api.js",
"index": 1,
"index2": 0,
"size": 2517,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"issuerId": 0,
"issuerName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"issuerPath": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"profile": {
"factory": 5,
"building": 3760
}
}
],
"profile": {
"factory": 0,
"building": 792
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"module": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"moduleName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"type": "cjs require",
"userRequest": "../node_modules/css-loader/dist/runtime/api.js",
"loc": "2:34-91"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}"
}
],
"filteredModules": 0,
"origins": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "mini-css-extract-plugin",
"request": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"reasons": []
}
]
}
],
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"index": 0,
"index2": 1,
"size": 3961,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 5,
"building": 3760
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"loc": "mini-css-extract-plugin"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"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;-webkit-text-decoration:underline dotted;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}.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)}.hide{display:none !important}.no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.center-align{text-align:center}a{text-decoration:none}html{line-height:1.5;font-weight:normal}h1,h2,h3,h4,h5,h6{line-height:1.3}em{font-style:italic}strong{font-weight:500}small{font-size:75%}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\runtime\\api.js",
"name": "./node_modules/css-loader/dist/runtime/api.js",
"index": 1,
"index2": 0,
"size": 2517,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"issuerId": 0,
"issuerName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"issuerPath": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"profile": {
"factory": 5,
"building": 3760
}
}
],
"profile": {
"factory": 0,
"building": 792
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\materialize.scss",
"module": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"moduleName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/materialize.scss",
"type": "cjs require",
"userRequest": "../node_modules/css-loader/dist/runtime/api.js",
"loc": "2:34-91"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}"
}
],
"filteredModules": 0,
"logging": {
"webpack.buildChunkGraph.visitModules": {
"entries": [],
"filteredEntries": 2,
"debug": false
}
},
"children": [],
"name": "mini-css-extract-plugin node_modules/css-loader/dist/cjs.js?url=false!node_modules/media-query-plugin/src/loader.js!node_modules/postcss-loader/src/index.js??postcss!node_modules/sass-loader/dist/cjs.js??ref--4-4!src/materialize.scss"
},
{
"errors": [],
"warnings": [],
"publicPath": "",
"outputPath": "E:\\projects\\TWEB\\tweb\\public",
"assetsByChunkName": {},
"assets": [],
"filteredAssets": 0,
"entrypoints": {
"mini-css-extract-plugin": {
"chunks": [
0
],
"assets": [
"*"
],
"children": {},
"childAssets": {}
}
},
"namedChunkGroups": {
"mini-css-extract-plugin": {
"chunks": [
0
],
"assets": [
"*"
],
"children": {},
"childAssets": {}
}
},
"chunks": [
{
"id": 0,
"rendered": true,
"initial": true,
"entry": true,
"size": 94029,
"names": [
"mini-css-extract-plugin"
],
"files": [
"*"
],
"hash": "864d329f37b60910701b",
"siblings": [],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"index": 0,
"index2": 1,
"size": 91512,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 198,
"building": 6191
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"loc": "mini-css-extract-plugin"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"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, \".chats-container{position:relative}.chats-container .input-search{position:relative;width:100%;margin-left:22px;margin-right:4px}.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;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;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-bottom:4px;background-color:#fff}.chats-container li>.rp{height:72px;max-height:72px;border-radius:10px;display:flex;align-items:flex-start;flex-direction:row;position:relative;cursor:pointer;padding:9px 8.5px;margin:0px 8px 0px 7px;overflow:hidden}html.no-touch .chats-container li>.rp:hover{background:rgba(112,117,121,0.08)}.chats-container li.active>.rp,.chats-container li.menu-open>.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;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 .dialog-avatar{flex:0 0 auto}.chats-container .user-caption{max-width:100%;max-height:100%;overflow:hidden;color:#707579;flex:1 1 auto;padding:1px 3.5px 1px 9px}.chats-container .user-caption p:last-child{margin-top:-3px}.chats-container .user-title{max-width:82%}.chats-container .user-title img.emoji{vertical-align:top;margin-top:4px;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-title.is-verified:after{content:\\\" \\\";background:url(assets/img/icon-verified.svg);display:inline-block;width:20px;height:20px;vertical-align:text-bottom;margin-left:2px}.chats-container .user-last-message{max-width:86%}.chats-container .user-last-message img.emoji{width:20px;height:20px;margin-top:-3px}.chats-container .user-last-message span.emoji{font-size:1.2rem;margin:0 .125rem;overflow:visible;margin-top:-1.5px}.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:4px;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 23px;padding-bottom:1rem;font-weight:500}.chats-container .search-group-contacts{padding:16px 0 7px}.chats-container .search-group-contacts .search-group__name{padding-bottom:17px}.chats-container .search-group:last-child{border-bottom:none}.contacts-container .dialog-avatar,.search-group-contacts .dialog-avatar{width:48px;height:48px}.contacts-container li,.search-group-contacts li{padding-bottom:4px;padding-top:2px}.contacts-container li>.rp,.search-group-contacts li>.rp{padding:9px 11.5px !important;height:66px}.contacts-container .user-caption,.search-group-contacts .user-caption{padding:1px 3.5px 1px 13px}.contacts-container .user-title,.contacts-container b,.contacts-container .user-last-message b,.search-group-contacts .user-title,.search-group-contacts b,.search-group-contacts .user-last-message b{font-weight:normal}.contacts-container p,.search-group-contacts p{height:24px}.contacts-container span.user-last-message,.search-group-contacts span.user-last-message{font-size:14px}#contacts-container .sidebar-header{margin-bottom:1px}#contacts-container .input-search{margin-left:16px}#bubble-contextmenu>div{padding:0 84px 0 16px}#topbar{width:100%;background-color:#fff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-shadow:0 1px 2px 0 rgba(16,35,47,0.07);min-height:61px;max-height:61px;border-bottom:1px solid #DADCE0}#topbar.is-pinned-shown .pinned-message{display:flex}#topbar .chat-more-button{margin-left:8px}#topbar .chat-more-button .btn-menu{top:calc(100% + 7px)}#topbar .chat-info{flex-grow:1}#topbar .content{flex:1;padding-left:17px;line-height:1.6}#topbar .person{display:flex;align-items:center;cursor:pointer;margin-left:4px}#topbar .person .bottom{font-size:14px;line-height:18px;color:#707579}#topbar .person .bottom .online{color:#50a2e9}#topbar #im-avatar{width:44px;height:44px;line-height:44px}#chat-input{display:flex;align-items:center;width:100%;max-width:696px;padding-top:.35rem;justify-content:space-between;flex:0 0 auto;position:relative}#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-input [contenteditable=true]:empty:before{content:attr(data-placeholder);color:#a2acb4;display:block}#chat-input #btn-record-cancel{visibility:hidden;opacity:0;transition:width .1s .1s, margin-right .1s .1s, visibility 0s .1s, opacity .1s 0s;padding:0;z-index:3}#chat-input .btn-send-container{flex:0 0 auto;position:relative;align-self:flex-end;z-index:2}#chat-input #btn-send{color:#9e9e9e}#chat-input #btn-send.tgico-send{color:#50a2e9}#chat-input #btn-record-cancel,#chat-input #btn-send{font-size:1.5rem;line-height:1.5rem;background-color:#fff}#chat-input .record-time{height:44px;line-height:44px;display:none}#chat-input .record-time:after{content:\\\" \\\";width:10px;height:10px;background-color:#e53935;border-radius:50%;margin:0 .5rem;display:inline-block;-webkit-animation:recordBlink 1.25s infinite;animation:recordBlink 1.25s infinite}#chat-input .record-ripple{border-radius:50%;background-color:rgba(0,0,0,0.2);width:150px;height:150px;transform:scale(0);position:absolute;top:-48px;left:-48px;transition:transform .03s, visibility .1s;visibility:hidden}#chat-input.is-recording #btn-record-cancel{opacity:1;visibility:visible;margin-right:.5rem;transition:width .1s, margin-right .1s, visibility 0s .1s, opacity .1s .1s}#chat-input.is-recording #attach-file{display:none}#chat-input.is-recording .record-time{display:block}#chat-input.is-recording .record-ripple{transition:transform .03s, visibility 0s;visibility:visible}#chat-input:not(.is-recording) #btn-record-cancel{margin-right:0;width:0px}@-webkit-keyframes recordBlink{0%{opacity:1}50%{opacity:.2}100%{opacity:1}}@keyframes recordBlink{0%{opacity:1}50%{opacity:.2}100%{opacity:1}}#im-title{cursor:pointer}#im-title span.emoji{vertical-align:inherit}.chat-container{display:flex;width:100%;align-items:center;flex-direction:column;position:relative;background-image:url(\\\"assets/img/camomile_blurred.jpg\\\");background-size:cover;background-position:center center}.chat-container #chat-background-canvas{display:none}.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;z-index:3}.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(\\\"assets/img/msg-tail-left.svg\\\");transform:scaleX(-1)}.chat-container .input-message #attach-file.menu-open{color:#50a2e9;background-color:transparent}.chat-container .input-message #attach-file .btn-menu{padding:8px 0;right:-8px;bottom:calc(100% + 16px)}.chat-container .input-message #attach-file .btn-menu>div{padding:0 38px 0 16px}.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}html.no-touch .chat-container .pinned-message:hover,html.no-touch .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 i,.chat-container .reply i{font-style:normal;color:#50a2e9}.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}.chat-container .pinned-message{display:none}#bubbles{width:100%;height:100%;max-height:100%;flex:1 1 auto;overflow:hidden;position:relative;padding:0 .5rem}#bubbles>.scrollable{padding:0 .75rem;height:auto;display:block}#bubbles:not(.scrolled-down){-webkit-mask-image:linear-gradient(0deg, transparent 0, #000 20px);mask-image:linear-gradient(0deg, transparent 0, #000 20px)}#bubbles:not(.scrolled-down) #bubbles-go-down{opacity:1}#bubbles .preloader{width:100%;height:100%}#bubbles .preloader svg{width:50px;height:50px}#bubbles .preloader-container .preloader-circular{background-color:rgba(0,0,0,0.35)}#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}#bubbles-inner.is-chat .is-in .bubble__container{margin-left:3rem}#bubbles-inner.is-channel:not(.is-chat) .bubble__container{max-width:100%}#bubbles-inner.is-channel:not(.is-chat):not(.has-rights){padding-bottom:55px}#bubbles-inner:not(.is-channel) .message,#bubbles-inner.is-chat .message{max-width:480px}#bubbles-inner.is-scrolling .is-sticky{opacity:1}#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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}#bubbles-go-down:before{margin-left:.75px}.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;text-transform:uppercase;transition:.2s;border-radius:8px;cursor:pointer;color:#50a2e9}html.no-touch .popup .popup-buttons button:hover{background-color:rgba(112,117,121,0.08)}.popup .popup-buttons button+button{margin-top:.5rem}@-webkit-keyframes bubbleSelected{0%{opacity:0}25%{opacity:1}to{opacity:0}}@keyframes bubbleSelected{0%{opacity:0}25%{opacity:1}to{opacity:0}}.bubbles-date-group{position:relative}.bubbles-date-group .sticky_sentinel--top{height:5px;top:0}.bubble{padding-top:5px;max-width:696px;margin:0 auto;position:relative;z-index:1}.bubble.is-selected:after{position:absolute;left:-50%;top:0;height:100%;content:\\\" \\\";background-color:rgba(0,132,255,0.3);-webkit-animation:bubbleSelected 2s linear;animation:bubbleSelected 2s linear;z-index:1}.bubble.is-selected:not(.is-group-last):after{height:calc(100% + 5px)}.bubble.is-first-unread:before{content:\\\"Unread messages\\\";height:30px;margin-bottom:5px;margin-left:-50%;text-align:center;color:#538BCC;line-height:2.1;font-weight:500;font-size:15px;background-color:rgba(255,255,255,0.95)}.bubble.is-selected:after,.bubble.is-first-unread:before{width:200%;display:block}.bubble.is-date{position:-webkit-sticky;position:sticky;top:5px;z-index:2;pointer-events:none}.bubble.is-date.is-sticky{transition:opacity .3s ease;opacity:0}.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:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;z-index:2}.bubble__container>.user-avatar{position:absolute;left:-3rem;width:40px;height:40px;line-height:40px;bottom:0;font-size:1rem;cursor:pointer}.bubble.service{padding:5px 0}.bubble.service .bubble__container{margin:0 auto;max-width:100%}.bubble .goto-original{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}.bubble.is-group-last{padding-bottom:5px}.bubble:not(.forwarded):not(.is-group-first) .bubble__container>.name{display:none}.bubble:not(.forwarded):not(.is-group-first):not(.is-message-empty):not(.is-reply) .message{padding-top:6px}.bubble:not(.is-group-last) .bubble__container>.user-avatar{display:none}.bubble:not(.hide-name) .audio{margin:4px 0}.bubble .goto-original{opacity:1}.bubble .reply{width:auto}.bubble .reply .reply-content{height:auto;min-height:32px}.bubble.photo .bubble__container,.bubble.video .bubble__container{width:-webkit-min-content;width:-moz-min-content;width:min-content}.bubble.photo .box.web,.bubble.video .box.web{max-width:100%}.bubble.webpage .time{float:none;width:0}.bubble .preview-resizer{display:flex}.bubble img.emoji{height:18px;width:18px;margin:0 .05rem;vertical-align:bottom}.bubble span.emoji{height:auto;width:auto;overflow:visible;vertical-align:unset}.bubble.emoji-big{font-size:0}.bubble.emoji-big .bubble__container{background:none !important;box-shadow:none;line-height:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bubble.emoji-big:not(.sticker) .attachment{padding-top:.5rem;padding-bottom:1.5rem;max-width:-webkit-fit-content !important;max-width:-moz-fit-content !important;max-width:fit-content !important;max-height:-webkit-fit-content !important;max-height:-moz-fit-content !important;max-height:fit-content !important}.bubble.emoji-big:not(.sticker) .attachment span.emoji{height:auto;width:auto}.bubble.emoji-big.sticker .bubble__container{max-width:140px !important;max-height:140px !important}.bubble.emoji-1x .attachment{font-size:96px}.bubble.emoji-1x .attachment img.emoji{height:64px;width:64px}.bubble.emoji-2x .attachment{font-size:64px}.bubble.emoji-2x .attachment img.emoji{height:48px;width:48px}.bubble.emoji-3x .attachment{font-size:52px}.bubble.emoji-3x .attachment img.emoji{height:32px;width:32px}.bubble.sticker .bubble__container,.bubble.round .bubble__container,.bubble.emoji-big .bubble__container{cursor:pointer;background:none !important;box-shadow:none}.bubble.sticker img,.bubble.round img,.bubble.emoji-big img{-o-object-fit:contain;object-fit:contain}.bubble.sticker.is-message-empty .message,.bubble.round.is-message-empty .message,.bubble.emoji-big.is-message-empty .message{background-color:rgba(0,0,0,0.23)}.bubble.sticker .attachment{border-radius:0}.bubble.sticker .bubble__container{max-width:200px !important;max-height:200px !important}.bubble.round .attachment{max-width:200px !important;max-height:200px !important}.bubble.round .attachment img{border-radius:50%}.bubble:not(.is-message-empty) .attachment{border-bottom-left-radius:0;border-bottom-right-radius:0}.bubble:not(.emoji-big) .attachment{font-size:0}.bubble .attachment{max-width:100%;border-radius:inherit;overflow:hidden;display:flex;justify-content:center;position:relative}.bubble .attachment img,.bubble .attachment video{max-width:100%;cursor:pointer;opacity:1;transition:opacity .3s ease}.bubble .attachment .download{position:absolute;left:0;top:0;height:100%;width:100%;cursor:pointer;display:flex;justify-content:center;align-items:center}.bubble .attachment .download span{background-color:rgba(0,0,0,0.35);font-size:23px;color:#fff;text-align:center}.bubble .attachment .download ~ .video-play,.bubble .attachment .preloader-container ~ .video-play{display:none}.bubble:not(.sticker) .attachment{max-width:min(480px, 100%);max-height:min(480px, 100%);width:-webkit-max-content;width:-moz-max-content;width:max-content}.bubble img:not(.emoji),.bubble video{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.bubble.is-album .attachment{max-width:min(451px, 100%);max-height:none}.bubble.is-album .attachment .album-item{background-color:#000;background-size:cover;max-width:100%;cursor:pointer;position:absolute;overflow:hidden}.bubble.is-album .attachment .album-item img,.bubble.is-album .attachment .album-item video{border-radius:inherit}.bubble.round.video .attachment{max-height:200px;max-width:200px}.bubble .box,.bubble .reply{font-size:.95rem;margin:4px 4px 4px 6px;padding:4px;margin-bottom:-5px;border-radius:4px}.bubble .box.web,.bubble .reply.web{margin-top:-6px;max-width:100%;overflow:hidden}.bubble .box.web .preview,.bubble .reply.web .preview{max-height:min(400px, 100%);max-width:min(480px, 100%);border-radius:4px;margin-bottom:3px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative;width:-webkit-max-content;width:-moz-max-content;width:max-content}.bubble .box.web .preview img,.bubble .box.web .preview video,.bubble .reply.web .preview img,.bubble .reply.web .preview video{max-width:100%}.bubble .box.web .title,.bubble .reply.web .title{letter-spacing:-0.2px;line-height:1.2;font-weight:500 !important}.bubble .box.web .name,.bubble .reply.web .name{letter-spacing:-0.3px;display:block}html.no-touch .bubble .box.web .name:hover,html.no-touch .bubble .reply.web .name:hover{text-decoration:underline}.bubble .box.web .text,.bubble .reply.web .text{overflow:hidden;text-overflow:ellipsis;line-height:1.2;letter-spacing:-0.3px;margin-top:2px;font-size:0.965rem}.bubble .box .quote,.bubble .reply .quote{padding-left:0.55rem;max-width:100%;overflow:hidden;width:100%}.bubble .box .text,.bubble .reply .text{line-height:1.2}.bubble .box .name,.bubble .box .reply-title,.bubble .reply .name,.bubble .reply .reply-title{font-weight:500 !important;display:inline !important}.bubble.is-square-photo .bubble__container{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bubble.is-square-photo .box.web .quote{display:flex}.bubble.is-square-photo .box.web .preview-resizer{order:2;flex-shrink:0;max-width:5rem;max-height:5rem}.bubble.is-square-photo .box.web .preview-resizer .preview{max-width:min(5rem, 100%);max-height:min(5rem, 100%)}.bubble.is-square-photo .box.web .quote-text{order:1;padding-right:1rem}.bubble.is-vertical-photo .bubble__container{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bubble .reply{max-width:300px;margin-bottom:6px;margin-top:0;cursor:pointer}.bubble.is-reply.emoji-big .reply,.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}.bubble.is-reply.emoji-big .reply .reply-content,.bubble.is-reply.sticker .reply .reply-content{margin-top:0}.bubble.is-reply .reply-content{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.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}.bubble .message:last-child{padding-top:6px}.bubble .message .emoji{font-size:1.2rem}.bubble .message pre,.bubble .message code{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.bubble .message.audio-message{min-width:275px;max-width:275px !important;padding-top:8px !important;padding-left:8px !important}.bubble .message.audio-message .audio{justify-content:unset;max-width:none}.bubble .message.audio-message .audio-time{padding-bottom:7px}.bubble .message.audio-message .audio-time,.bubble .message.audio-message .audio-subtitle{color:#4fae4e;line-height:1.45;margin-top:0}.bubble .message.audio-message .audio-title{font-weight:500;margin-left:-1px}.bubble .message.audio-message .audio-details{margin-top:8px}.bubble .message.audio-message .audio-ico{font-size:2.15rem}.bubble .message.audio-message .media-progress{width:191px;margin:9px 0 9px}.bubble .message.audio-message .media-progress__filled{background-color:#47aa41;transform-origin:left;height:2px}.bubble .message.audio-message .media-progress__seek{height:2px;overflow:visible !important;background:rgba(124,195,107,0.52)}.bubble .message.audio-message .media-progress__seek::-webkit-slider-thumb{height:12px;width:12px;background:#47aa41}.bubble .message.audio-message .tgico-largeplay:before{content:\\\"\\\";margin-right:-2px}.bubble .message.audio-message .time{width:unset}.bubble .message.contact-message{min-width:200px;padding-left:8px}.bubble .message.contact-message .contact{display:flex;padding:2px 0;cursor:pointer}.bubble .message.contact-message .contact-avatar{color:#fff}.bubble .message.contact-message .contact-details{padding-left:12px;margin-top:8px}.bubble .message.contact-message .contact-name{font-size:1rem;font-weight:500}.bubble .message.contact-message .contact-number{font-size:14px;line-height:1.4}.bubble .message.contact-message .time{width:unset}.bubble .message.document-message{max-width:325px !important}.bubble .message.document-message .time{width:unset}.bubble .message.document-message .document{padding-left:66px;height:58px}.bubble .message.document-message .document-name{line-height:1.4;margin-top:1px;overflow:hidden;text-overflow:ellipsis}.bubble.is-message-empty .message{position:absolute;bottom:.1rem;right:.2rem;border-radius:12px;background-color:rgba(0,0,0,0.35);padding:0 .2rem;z-index:2}.bubble.is-message-empty .message .time{color:#fff;padding:0;display:flex;align-items:center;width:auto}.bubble.is-message-empty .message .time .inner{margin-bottom:0;position:relative;padding:0 2.5px;bottom:0}.bubble .time{font-size:.8rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;float:right;user-select:none;height:20px;line-height:20px}.bubble .time .inner{position:absolute;bottom:0;right:0;font-size:12px;display:flex;align-items:center;line-height:1}.bubble .time .inner i{font-size:1.15rem;margin-right:.4rem;margin-left:.1rem}.bubble .time .inner i.edited{overflow:visible;font-size:.8rem}.bubble span.video-time{position:absolute;top:3px;left:3px;border-radius:12px;background-color:rgba(0,0,0,0.35);padding:0px 6px 0px 6px;z-index:2;font-size:12px;color:white;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bubble span.video-play{background-color:rgba(0,0,0,0.35);color:#fff;text-align:center;font-size:34px;line-height:60px;cursor:pointer}.bubble.is-edited.channel-post .time{min-width:calc(5rem + 46px)}.bubble.channel-post .time{width:5rem}.bubble.is-edited .time{width:78px !important}.bubble.is-edited.emoji-big .time,.bubble.is-edited.sticker .time{width:81px !important}.bubble:not(.forwarded).hide-name .name,.bubble.emoji-big .name{display:none}.bubble .name{cursor:pointer}.bubble__container>.name{padding:5px .6rem 0 .6rem;font-weight:500 !important;color:#50a2e9;font-size:.9rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.bubble:not(.webpage).photo .name,.bubble:not(.webpage).video .name{padding-bottom:6px}.bubble:not(.webpage).photo:not(.is-message-empty) .message,.bubble:not(.webpage).video:not(.is-message-empty) .message{padding-top:6px}.bubble:not(.webpage):not(.is-album):not(.sticker):not(.round):not(.emoji-big) .attachment,.bubble .album-item{background-color:#000}.bubble.hide-name:not(.is-reply):not(.is-message-empty) .message{padding-top:6px}.bubble:not(.sticker):not(.emoji-big).hide-name .reply,.bubble:not(.sticker):not(.emoji-big):not(.is-group-first) .reply,.bubble:not(.sticker):not(.emoji-big).is-out .reply{margin-top:6px}.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 no-repeat;content:'';background-size:11px 20px;background-position-y:1px}.bubble.photo.is-message-empty.is-group-last.is-group-last .bubble__container:after,.bubble.video:not(.round).is-message-empty.is-group-last.is-group-last .bubble__container:after{display:none}.bubble.photo.is-message-empty.is-group-last .attachment,.bubble.video:not(.round).is-message-empty.is-group-last .attachment{overflow:visible}.bubble__media-container{cursor:pointer}.bubble.service{align-self:center}.bubble.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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;text-align:center}.bubble.service .service-msg .name{cursor:pointer;margin-right:5px}.bubble.service .service-msg img.emoji{margin-bottom:3px}.bubble-audio .time{width:unset !important}.bubble.is-in .bubble__container{margin-right:auto;background-color:#ffffff;border-radius:6px 12px 12px 6px}.bubble.is-in.is-group-first .bubble__container{border-radius:12px 12px 12px 6px}.bubble.is-in.is-group-last .bubble__container{border-radius:6px 12px 12px 0px}.bubble.is-in.is-group-last .bubble__container:after{left:-8.4px;background-image:url(\\\"assets/img/msg-tail-left.svg\\\")}.bubble.is-in.is-group-first.is-group-last .bubble__container{border-radius:12px 12px 12px 0px}.bubble.is-in.forwarded .attachment,.bubble.is-in.is-reply .attachment,.bubble.is-in:not(.hide-name).is-message-empty .attachment{border-top-left-radius:0;border-top-right-radius:0}.bubble.is-in a{color:#50a2e9}html.no-touch .bubble.is-in .quote:hover{background-color:rgba(112,117,121,0.08)}.bubble.is-in.is-reply.emoji-big .reply,.bubble.is-in.is-reply.sticker .reply{left:calc(100% + 10px);background-color:#fff}.bubble.is-in .quote{border-left:2px #50a2e9 solid}.bubble.is-in .quote *{overflow:hidden;text-overflow:ellipsis}.bubble.is-in .quote .name,.bubble.is-in .reply-title{color:#50a2e9}.bubble.is-in .time{color:#a3adb6;width:36px}.bubble.is-in .time .inner{padding:0 7px 0 5px;margin-bottom:4px}.bubble.is-in.photo.is-message-empty.is-group-last .attachment,.bubble.is-in.video:not(.round).is-message-empty.is-group-last .attachment{border-bottom-left-radius:0}.bubble.is-in.photo.is-message-empty.is-group-last .attachment .bubble__media-container,.bubble.is-in.video:not(.round).is-message-empty.is-group-last .attachment .bubble__media-container{margin-left:-9px}.bubble.is-in .audio-subtitle,.bubble.is-in .contact-number,.bubble.is-in .audio-time{color:#707579 !important}.bubble.is-in .message.audio-message .media-progress__seek{background:rgba(193,207,220,0.39)}.bubble.is-in .message.audio-message .media-progress__filled{background-color:#0089ff}.bubble.is-in .message.audio-message .media-progress input::-webkit-slider-thumb{background:#63a2e3}.bubble.is-out .bubble__container{margin-left:auto;background-color:#eeffde;border-radius:12px 6px 6px 12px}.bubble.is-out .bubble__container>.user-avatar{left:auto;right:-2.5rem}.bubble.is-out.is-group-first .bubble__container{border-radius:12px 12px 6px 12px}.bubble.is-out.is-group-last .bubble__container{border-radius:12px 6px 0px 12px}.bubble.is-out.is-group-last .bubble__container:after{right:-8.4px;background-image:url(\\\"assets/img/msg-tail-right.svg\\\")}.bubble.is-out.is-group-first.is-group-last .bubble__container{border-radius:12px 12px 0px 12px}.bubble.is-out.forwarded .attachment,.bubble.is-out.is-reply .attachment{border-top-left-radius:0;border-top-right-radius:0}html.no-touch .bubble.is-out .quote:hover{background-color:rgba(77,205,94,0.12)}.bubble.is-out.is-reply.emoji-big .box,.bubble.is-out.is-reply.emoji-big .reply,.bubble.is-out.is-reply.sticker .box,.bubble.is-out.is-reply.sticker .reply{background-color:#eeffde;right:calc(100% + 10px);border-color:rgba(77,205,94,0.12)}.bubble.is-out .quote{border-left:2px #50af4f solid}.bubble.is-out .reply-border{background-color:#50af4f}.bubble.is-out .quote .name,.bubble.is-out .reply-title{color:#50af4f}.bubble.is-out .time{color:#50af4f;width:50px;display:inline-block}.bubble.is-out .time .inner{padding:0 4px 0 4px;bottom:1px}.bubble.is-out .time .tgico:after{font-size:19px;vertical-align:middle;margin-left:1px}.bubble.is-out.forwarded .name{color:#50af4f}.bubble.is-out.is-read .time .tgico:after{content:\\\"\\\"}.bubble.is-out.is-sent .time .tgico:after{content:\\\"\\\"}.bubble.is-out.is-sending .time .tgico:after{content:\\\"\\\"}.bubble.is-out.is-reply .name{display:none}.bubble.is-out.is-edited .time{width:85px}.bubble.is-out .document-ico:after{border-top-color:#eeffde;border-right-color:#eeffde}.bubble.is-out .audio-waveform rect{fill:#B8DDA9}.bubble.is-out .audio-waveform rect.active{fill:#68AB5A}.bubble.is-out .audio-time,.bubble.is-out .audio-subtitle{color:#68AB5A}.bubble.is-out .audio-toggle,.bubble.is-out .audio-download{background-color:#4FAE4E}.bubble.is-out .audio-download:empty{display:none}.bubble.is-out.photo.is-message-empty.is-group-last .attachment,.bubble.is-out.video:not(.round).is-message-empty.is-group-last .attachment{border-bottom-right-radius:0}.bubble.is-out.photo.is-message-empty.is-group-last .attachment .bubble__media-container,.bubble.is-out.video:not(.round).is-message-empty.is-group-last .attachment .bubble__media-container{margin-right:-9px}.bubble.is-out .audio-subtitle,.bubble.is-out .contact-number,.bubble.is-out .document-size{color:#4FAE4E}.bubble.is-out poll-element .poll-desc,.bubble.is-out poll-element .poll-votes-count{color:#50af4f}.bubble.is-out poll-element .poll-line use{stroke:#4fae4e}.bubble.is-out poll-element .poll-answer-selected{background-color:#4fae4e}html.no-touch .bubble.is-out poll-element .poll-answer:hover .animation-ring{background-color:rgba(79,174,78,0.08)}.bubble.is-out poll-element .progress-ring__circle{stroke:#4fae4e}.reply-markup{position:absolute;width:100%}.reply-markup-row{margin-top:5px;overflow:hidden;height:40px;display:flex}.reply-markup-row:last-child{border-bottom-left-radius:12px;border-bottom-right-radius:12px}.reply-markup-button{display:flex;justify-content:center;align-items:center;border-radius:6px;background-color:rgba(0,0,0,0.23);z-index:2;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:center;color:white !important;outline:none;border:none;width:100%;cursor:pointer;position:relative;transition:background-color 0.35s ease}html.no-touch .reply-markup-button:hover{background-color:rgba(0,0,0,0.06)}.reply-markup-button+.reply-markup-button{margin-left:5px}.reply-markup-button.is-link:before{content:\\\"\\\";position:absolute;right:2px;top:2px;display:block;transform:rotate(-45deg)}poll-element{margin-top:-1px;display:block;min-width:280px}poll-element .poll-title{font-weight:500}poll-element .poll-desc{font-size:14px;color:#707579;margin-bottom:7px}poll-element .poll-answer{display:flex;position:relative;padding-bottom:20px;padding-left:34px;cursor:pointer}poll-element .poll-answer-text{margin-top:7px;margin-left:14px}poll-element .poll-answer-percents{position:absolute;left:0;top:0;opacity:0;font-weight:500;margin-top:7px;transition:.34s opacity;margin-left:-3px;text-align:right;width:40px}poll-element .poll-answer-selected{position:absolute;bottom:3px;left:26px;color:#fff;background:#50a2e9;border-radius:50%;height:12px;width:12px;font-size:11px;line-height:15px;opacity:0;-webkit-animation:fadeIn .1s ease forwards;animation:fadeIn .1s ease forwards;animation-direction:reverse;-webkit-animation-delay:.24s;animation-delay:.24s}html.no-touch poll-element .poll-answer:hover .animation-ring{visibility:visible;transform:scale(1)}poll-element .poll-answer.is-voting .progress-ring__circle{stroke-dashoffset:-19.792;-webkit-animation:pollAnswerRotate 0.65s linear infinite;animation:pollAnswerRotate 0.65s linear infinite}poll-element .poll-votes-count{color:#707579;font-size:14px;margin-top:7px}poll-element .poll-line{height:35px;position:absolute;left:17.5px;bottom:2px;transition:stroke-dashoffset .34s linear, stroke-dasharray .34s linear;stroke-dashoffset:0;stroke-dasharray:0, 485.9}poll-element .poll-line use{stroke-width:4px;stroke-linecap:round;stroke:#50a2e9;fill:none}poll-element+.time{height:unset !important;padding-top:0px !important;padding-bottom:7px !important}poll-element .circle-hover{display:flex;justify-content:center;align-items:center;width:34px;height:34px;margin-left:5px;position:absolute;left:0;top:0;transform:scale(1);transition:.1s transform}poll-element .animation-ring{display:block;border-radius:50%;height:34px;width:34px;transition:transform 0.12s;background-color:#f4f4f4;transform:scale(0.1);visibility:hidden}poll-element .progress-ring{height:26px;width:26px;top:unset;left:unset}poll-element .progress-ring__circle{transform-origin:center;transform:rotate(-90deg);transition:stroke-dashoffset 0.15s;stroke-dasharray:56.5487, 56.5487;stroke-dashoffset:0;stroke-opacity:1;stroke-width:2;stroke:#8d969c;fill:transparent}poll-element.is-voted .circle-hover,poll-element.is-voted .animation-ring{transform:scale(0)}poll-element.is-voted .poll-answer-percents{opacity:1}poll-element.is-voted .poll-answer-selected{-webkit-animation-direction:normal;animation-direction:normal}poll-element.is-retracting .circle-hover{transition-delay:.24s}poll-element.is-retracting .animation-ring{transition-delay:.22s}@-webkit-keyframes pollAnswerRotate{to{transform:rotate(270deg)}}@keyframes pollAnswerRotate{to{transform:rotate(270deg)}}.sidebar{background-color:#fff}.sidebar-left{border-right:1px solid #DADCE0}.sidebar-right{border-left:1px solid #DADCE0}.sidebar-header{background-color:#fff;display:flex;align-items:center;justify-content:space-between;padding:7.5px 16px;min-height:60px;flex:0 0 auto}.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;flex:1 1 auto}.sidebar-content>div{width:100%}#column-left{flex-direction:column}#column-left #chats-container{max-height:100%;overflow:hidden;position:relative}#column-left .sidebar-slider{height:100%}#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-left .search-group-people ul{display:flex;flex-direction:row;padding-left:4px;margin-top:-1px;padding-bottom:1px}#column-left .search-group-people li{margin-right:5px;padding:0}#column-left .search-group-people .rp{height:98px;max-height:98px;border-radius:10px;max-width:78px;width:78px;align-items:center;position:relative;display:flex;flex-direction:column;cursor:pointer;padding:12px 0 0 !important;overflow:hidden;margin:0}#column-left .search-group-people .dialog-avatar{width:54px;height:54px}#column-left .search-group-people .user-caption{max-width:65px;padding:2px 0px 9px;font-size:12px}#column-left .search-group-people .user-title{max-width:unset}#column-left .search-group-people .search-group-scrollable{position:relative}#column-left .search-group-people .search-group-scrollable>.scrollable{position:relative}#column-left .item-main .sidebar-content .btn-menu{bottom:calc(100% + 10px)}#column-left .item-main .sidebar-content .btn-corner.menu-open:before{content:\\\"\\\"}#search-container{transition:150ms ease-in-out opacity,150ms ease-in-out transform;transform:scale(1.1, 1.1);opacity:0;display:flex}#search-container.active{transform:scale(1, 1);transform-origin:center;opacity:1}.new-channel-container .sidebar-content,.new-group-container .sidebar-content,.edit-profile-container .sidebar-content{flex-direction:column}.new-channel-container .avatar-edit,.new-group-container .avatar-edit,.edit-profile-container .avatar-edit{width:120px;height:120px;margin:1px auto 32px;flex:0 0 auto}.new-channel-container .input-wrapper,.new-group-container .input-wrapper,.edit-profile-container .input-wrapper{width:380px;margin:0 auto;flex:0 0 auto}.new-channel-container .chats-container,.new-group-container .chats-container,.edit-profile-container .chats-container{flex:1 1 auto}.new-channel-container .caption,.new-group-container .caption,.edit-profile-container .caption{font-size:0.875rem;margin-top:14px;margin-left:23px;color:#707579}.new-group-members{padding:1.5rem 0 0.4375rem}.new-group-members .search-group__name{text-transform:capitalize}.settings-container .profile-button{display:flex;padding:1.125rem 0.625rem;height:3.5rem;line-height:1.4;border-radius:0.625rem;margin:0px 0.5rem 0px 0.4375rem}html.no-touch .settings-container .profile-button:hover{background:rgba(112,117,121,0.08);cursor:pointer}.settings-container .profile-button:before{font-size:24px;color:#707579;margin-left:0.375rem;margin-top:-0.0625rem}.settings-container .profile-button p{padding-left:2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.settings-container .profile-buttons{margin-top:.9375rem;width:100%}.edit-profile-container .caption{margin-top:1.063rem;margin-left:1.438rem;line-height:1.2;padding-bottom:1.438rem}.edit-profile-container .sidebar-left-h2{color:#707579;padding:0 1.438rem;padding-bottom:1.5rem;font-weight:500}.edit-profile-container hr{margin-bottom:1.5rem}.edit-profile-container .scroll-wrapper{width:100%}#column-right{width:0%;position:relative;transition:.2s ease-in-out}@media only screen and (min-width: 721px) and (min-width: 1681px){#column-right .sidebar-content{min-width:calc(1680px / 4 - 1px)}}#column-right .sidebar-header{flex:0 0 auto}#column-right #search-private-container .chats-container{position:relative;flex:1 1 auto}#column-right #forward-container{z-index:5}#column-right .sidebar-search{display:none}#column-right .sidebar-search.active{display:flex}.profile-content{display:flex;flex-direction:column;position:relative;width:100%}.profile-content [type=\\\"checkbox\\\"]+span{padding-left:54px;margin-left:-54px}.profile-content-wrapper{flex:1 1 auto;display:flex;flex-direction:column;margin-bottom:36px}.profile-content .content-container{width:100%;max-width:100%;position:absolute;top:100%;min-height:calc((1vh * 100) - 100% - 60px);min-height:calc((var(--vh, 1vh) * 100) - 100% - 60px);display:flex;flex-direction:column}.profile-container>.scrollable{display:flex;flex-direction:column}.profile-name{text-align:center;font-size:24px;line-height:1.4;font-weight:500}.profile-name span.emoji{vertical-align:inherit;min-width:-webkit-min-content;min-width:-moz-min-content;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;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:#707579 !important;font-size:14px !important}.profile-row-notifications{margin-top:29px;line-height:1.3}.profile-avatar{width:120px;height:120px;margin:1px auto 21px;font-size:4rem !important}.profile-avatar.tgico-avatar_deletedaccount{font-size:6rem}.profile-tabs{position:-webkit-sticky !important;position:sticky !important;top:0;z-index:2;background-color:#fff}.profile-tabs-content{min-height:calc(100% - 49px);grid-template-rows:100%;flex:1 1 auto}.profile-tabs-content>div{position:relative}.profile-tabs-content .preloader{padding:0;position:absolute !important;height:100%}.profile-tabs-content .preloader>svg{height:50px;width:50px}.profile-tabs-content #content-media{width:100%;padding:7.5px;display:grid;grid-template-columns:repeat(3, 1fr);grid-auto-rows:1fr;grid-gap:3.5px}.profile-tabs-content #content-media .media-item{height:0;padding-bottom:100%;overflow:hidden;position:relative;cursor:pointer;background-color:#000}.profile-tabs-content #content-media .video-time{position:absolute;left:5px;top:4px;height:18px;border-radius:4px;background-color:rgba(0,0,0,0.35);padding:0px 6px 0px 5px;z-index:1;font-size:12px;color:white}.profile-tabs-content #content-media .media-image{position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.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:20px 15px 15px 20px}.profile-tabs-content #content-audio>div{min-height:60px}.profile-tabs-content #content-audio .audio{padding-bottom:26px;padding-left:61px;max-width:368px;justify-content:unset}.profile-tabs-content #content-audio .audio-details{height:66px}.profile-tabs-content #content-audio .audio.audio-show-progress .audio-subtitle{overflow:visible}.profile-tabs-content #content-audio .audio-ico{width:48px;height:48px}.profile-tabs-content #content-audio .audio-ico.tgico-largeplay:before{margin-right:-1px}.profile-tabs-content #content-audio .audio-download{border-radius:50%;background-color:#50a2e9;align-items:center}.profile-tabs-content #content-audio .audio-toggle,.profile-tabs-content #content-audio .audio-download{font-size:1.9rem}.profile-tabs-content #content-audio .audio-title{font-size:1rem;color:#000;line-height:1.2;padding-top:5px;margin-top:0;margin-left:-1px}.profile-tabs-content #content-audio .audio-subtitle{font-size:14px;line-height:1.25;color:#707579;margin-left:-1px;margin-top:3px}.profile-tabs-content #content-audio .audio-time{margin-top:1px}.profile-tabs-content #content-audio .audio-title,.profile-tabs-content #content-audio .audio-subtitle{overflow:hidden;text-overflow:ellipsis}.profile-tabs-content #content-audio .media-progress{margin:11px 0 8px}.profile-tabs-content #content-audio .media-progress__filled{background-color:#0089ff;transform-origin:left;height:2px}.profile-tabs-content #content-audio .media-progress__seek{height:2px;background:rgba(193,207,220,0.39)}.profile-tabs-content #content-audio .media-progress__seek::-webkit-slider-thumb{height:12px;width:12px}.media-viewer{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.88);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}html.no-touch .media-viewer-author:hover{color:#fff}.media-viewer-userpic{width:44px;height:44px;position:absolute;top:8px;left:20px}.media-viewer-name{font-weight:500}.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}html.no-touch .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-stub{flex:1}.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-media{visibility:hidden}.media-viewer-caption{flex:1;text-align:center;color:#707579;transition:.2s;max-width:50vw;word-break:break-word;overflow:hidden;text-overflow:ellipsis}html.no-touch .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}html.no-touch .media-viewer-switcher-left:hover>span,html.no-touch .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}.media-viewer-mover .ckin__player{width:100%;height:100%;position:absolute;left:0;top:0}.media-viewer-mover img,.media-viewer-mover video{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-o-object-fit:cover;object-fit:cover;opacity:1}.media-viewer-mover.active{transition:.2s transform}.media-viewer-mover.moving{transition:.35s transform ease}.media-viewer-mover.hiding img,.media-viewer-mover.hiding video{transition:.2s opacity;opacity:0}.media-viewer-aspecter{width:100%;height:100%;transform:scale(1);overflow:hidden;position:absolute}.media-viewer-mover.active .media-viewer-aspecter{transition:.2s all}.media-viewer-whole{top:0;left:0;width:100%;height:100%;position:fixed !important;display:block;z-index:4;visibility:hidden;transition:visibility 0s .2s}.media-viewer-whole.active{visibility:visible;transition-delay:0s}.media-viewer-whole.active .overlays{opacity:1;visibility:visible;transition:opacity .2s 0s,visibility 0s 0s}.media-viewer-switchers{position:relative;width:1680px;height:100%;margin:0 auto}.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;transition:opacity .2s 0s,visibility 0s .2s}.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:flex}.ckin__player.ckin__fullscreen video{max-height:none;max-width:none;-o-object-fit:contain;object-fit:contain}.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-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%;transform:translate(-50%, -50%) scale(1);font-size:64px;transition:all .2s;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==);transition:all .3s;pointer-events:none}.default.is-playing .default__gradient-bottom{transform:translateY(50px)}html.no-touch .default.is-playing:hover .default__gradient-bottom{transform:translateY(0px)}.default.is-playing:before{opacity:0;visibility:hidden;transform:translate(-50%, -50%) scale(1.3)}.default.is-playing .default__button--big{opacity:0;visibility:hidden}.default.is-playing .default__controls{transform:translateY(52px)}html.no-touch .default.is-playing:hover .default__controls{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;-webkit-transition:all 0.4s ease;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 + -4px);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:3;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;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 .category-title{position:-webkit-sticky;position:sticky;top:0;font-size:.85rem;color:#707579;background:linear-gradient(to bottom, #fff 0, rgba(255,255,255,0.9) 60%, rgba(255,255,255,0) 100%);z-index:2;padding:.53333rem 6PX .66667rem;width:100%}.emoji-dropdown .tabs-container .emoji-category{padding-top:1px;position:relative}.emoji-dropdown .tabs-container .emoji-category .category-items{display:grid;grid-column-gap:2.44px;grid-template-columns:repeat(9, 1fr);font-size:2.25rem;line-height:2.25rem}.emoji-dropdown .tabs-container .emoji-category .category-items>*{margin:0;padding:4px 4px;line-height:inherit;border-radius:8px;cursor:pointer;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;width:42px;height:42px}.emoji-dropdown .tabs-container .emoji-category .category-items>* .emoji{width:100%;height:100%}html.no-touch .emoji-dropdown .tabs-container .emoji-category .category-items>*:hover{background-color:rgba(112,117,121,0.08)}.emoji-dropdown .tabs-container .emoji-category:first-child{padding-top:5px}.emoji-dropdown .tabs-container .sticker-category{position:relative}.emoji-dropdown .tabs-container .sticker-category::after{content:\\\"\\\";flex:auto}.emoji-dropdown .tabs-container .sticker-category .category-items{width:100%;display:grid;grid-template-columns:repeat(5, 1fr);grid-column-gap:1px}.emoji-dropdown .tabs-container .sticker-category .category-items>div{width:80px;height:80px;display:flex;align-items:center;cursor:pointer;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;padding:1px 2.5px;justify-content:center;border-radius:12px;padding:0}html.no-touch .emoji-dropdown .tabs-container .sticker-category .category-items>div:hover{background-color:rgba(112,117,121,0.08)}.emoji-dropdown .tabs-container .sticker-category .category-items>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{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}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:absolute;top:0px;left:0px;bottom:0px;right:0px}.scrollable.scrollable-x{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.scrollable.scrollable-y{overflow-y:auto;overflow-y:overlay;scrollbar-width:none;-ms-overflow-style:none}div.scrollable-y::-webkit-scrollbar{width:.375rem}::-webkit-scrollbar-thumb{opacity:0;-webkit-transition:.2s ease-in-out;transition:.2s ease-in-out}div.scrollable:hover::-webkit-scrollbar-thumb{height:200px;border-radius:10px;background-color:rgba(0,0,0,0.2);opacity:1}::-webkit-scrollbar-button{width:0;height:0;display:none}::-webkit-scrollbar-corner{background-color:transparent}.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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:1rem;font-weight:500}.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:grid;grid-template-columns:100%}.tabs-container.animated{transition:.3s transform}.tabs-container>div{width:100%;max-width:100%;transition:transform .2s, -webkit-filter .2s;transition:transform .2s, filter .2s;transition:transform .2s, filter .2s, -webkit-filter .2s;display:none;flex-direction:column;position:relative;grid-row-start:1;grid-column-start:1;background-color:#fff;z-index:1;overflow:hidden}.tabs-container>div.active{display:flex}.tabs-container>div>div:not(.scroll-padding){width:100%;max-width:100%;position:relative}@-webkit-keyframes scaleIn{0%{transform:scale(0.2)}to{transform:scale(1)}}@keyframes scaleIn{0%{transform:scale(0.2)}to{transform:scale(1)}}.selector{height:100%;display:flex;flex-direction:column}.selector-search-container{flex:0 0 auto;position:relative;max-height:132px;overflow:hidden}.selector-search-container .scrollable{position:relative}.selector-search{padding:0 24px 0 24px;display:flex;flex-flow:wrap}.selector-search input{border:none;padding:7px 0px 19px 0px;outline:none;flex:1 1 auto}.selector-user{color:#000;background-color:rgba(112,117,121,0.08);font-size:16px;padding:0 17px 0px 0px;line-height:31px;margin-left:-4px;margin-right:12px;height:32px;margin-bottom:7px;border-radius:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex:0 0 auto;transition:.2s all}html.no-touch .selector-user:hover{background-color:#fae2e3;cursor:pointer}html.no-touch .selector-user:hover .selector-user-avatar:after{opacity:1;transform:scaleX(-1) rotate(-90deg)}.selector-user.scale-in{-webkit-animation:scaleIn .15s ease forwards;animation:scaleIn .15s ease forwards}.selector-user.scale-out{-webkit-animation:scaleIn .1s ease forwards;animation:scaleIn .1s ease forwards;animation-direction:reverse}.selector-user-avatar{height:32px !important;width:32px !important;float:left;margin-right:8px;overflow:hidden;font-size:14px;-webkit-mask-image:-webkit-radial-gradient(circle, white 100%, black 100%)}.selector-user-avatar:after{position:absolute;content:\\\"\\\";left:0;top:0;background-color:#df3f40;height:100%;width:100%;z-index:2;font-size:23px;line-height:32px !important;opacity:0;transition:.2s opacity, .2s transform;transform:scaleX(-1) rotate(0deg)}.selector .chats-container{height:100%;flex:1 1 auto}.selector ul .dialog-avatar{height:48px;width:48px}.selector ul .user-caption{padding:1px 3.5px 1px 12px}.selector ul p{height:24px}.selector ul span.user-title{font-weight:normal}.selector ul span.user-last-message{font-size:14px}.selector ul li{padding-bottom:0}.selector ul li>.rp{margin:0px 9px 0px 8px;padding:12px 8.5px}.selector hr{margin:0 0 8px}.selector [type=\\\"checkbox\\\"]+span{padding-left:calc(9px + 2.25rem)}.selector .checkbox{margin-top:11px;padding-left:11px}.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.3);margin:0;padding:0;box-shadow:none;opacity:0;visibility:hidden;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;transition:opacity 0.3s 0s, visibility 0s 0s}.popup.active .popup-container{transform:translateY(0)}.popup-container{position:relative;border-radius:10px;background-color:#fff;padding:1rem;transform:translateY(-40px);backface-visibility:hidden;-webkit-backface-visibility:hidden;transition-property:transform;transition-duration:0.3s}.popup-close{cursor:pointer;color:#707579;z-index:3;text-align:center;justify-self:center;line-height:1;transition:.2s}html.no-touch .popup-close:hover{color:#000}.popup-header{display:flex;margin-bottom:2rem;align-items:center}.popup-avatar .popup-container{max-width:600px;padding:15px 16px 16px 24px;overflow:hidden;display:flex;flex-direction:column}.popup-avatar .popup-container>button{position:absolute;bottom:20px;right:20px}.popup-avatar .popup-close{font-size:1.5rem;margin-top:4px}.popup-avatar .popup-header{margin-bottom:1px}.popup-avatar h6{font-size:1.25rem;text-align:left;margin:0;margin-left:2rem}.popup-avatar .crop{max-width:100%;max-height:100%;padding:24px 54px 46px 46px;border-radius:8px}.popup-avatar .crop>img{display:none}.popup-avatar .crop img{border-radius:8px}.popup-send-photo .popup-container{width:420px;max-width:420px;overflow:hidden;padding:12px 20px 32.5px}.popup-send-photo .popup-container.is-media:not(.is-album) .popup-photo{max-height:320px;margin:0 auto}.popup-send-photo .popup-container.is-media:not(.is-album) .popup-photo img{-o-object-fit:contain;object-fit:contain}.popup-send-photo .popup-container.is-media:not(.is-album) .popup-photo>div{display:flex;justify-content:center}.popup-send-photo .popup-container.is-album .popup-photo{margin:0 auto;position:relative}.popup-send-photo .popup-container.is-album .popup-photo>div{position:absolute}.popup-send-photo .popup-container.is-document .popup-photo img,.popup-send-photo .popup-container.is-document .popup-photo video,.popup-send-photo .popup-container.is-album .popup-photo img,.popup-send-photo .popup-container.is-album .popup-photo video{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.popup-send-photo .popup-header{justify-content:space-between;align-items:center;margin-bottom:9px}.popup-send-photo .popup-header .btn-primary{width:79px;height:36px;font-size:14px;font-weight:normal;padding:0;padding-top:2px;margin-top:-3px;border-radius:10px}.popup-send-photo .popup-close{font-size:1.5rem;margin:-1px 0 0 -4px}.popup-send-photo .popup-title{flex:1;padding:0 2rem 0 1.5rem;margin:0;margin-top:-3px;font-size:1.25rem;font-weight:500}.popup-send-photo .popup-photo{max-width:380px;overflow:hidden;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-radius:10px}.popup-send-photo .popup-photo .document{max-width:100%;overflow:hidden;cursor:default;padding-left:3.75rem;height:4.5rem}.popup-send-photo .popup-photo .document-name{font-weight:normal;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;line-height:1.5}.popup-send-photo .popup-photo .document-ico{height:48px;width:48px;font-size:16px;font-weight:normal;line-height:11px;letter-spacing:0}.popup-send-photo .input-field{margin-top:1rem}.popup-send-photo .input-field::-moz-placeholder{color:#a2acb4}.popup-send-photo .input-field:-ms-input-placeholder{color:#a2acb4}.popup-send-photo .input-field::-ms-input-placeholder{color:#a2acb4}.popup-send-photo .input-field::placeholder{color:#a2acb4}.popup-send-photo .input-field input{height:54px;font-size:1rem;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}.popup-peer .popup-header{display:flex;margin-bottom:0.4375rem;align-items:center;padding:0.125rem 0.25rem}.popup-peer .popup-container{padding:1rem 1.5rem 0.75rem 1rem}.popup-peer .popup-title{padding-left:0.75rem;font-size:1.25rem;font-weight:500;margin-bottom:0.125rem;text-transform:capitalize}.popup-peer .popup-description{padding:0 0.25rem;margin-top:0;margin-bottom:1.625rem;min-width:15rem;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content}.popup-peer .popup-buttons{margin-right:-0.75rem}.popup-peer .popup-buttons .btn{font-weight:500}.popup-peer .popup-buttons .btn+.btn{margin-top:0.625rem}.popup-peer .peer-avatar{height:2rem;width:2rem}#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%;transform:translateX(0);width: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:7.5rem;height:7.5rem;margin-bottom:1.5rem}.sign-logo{max-width:100%;max-height:100%}.page-sign .qr,.page-signQR .qr{margin-top:1.5rem}.page-sign p.qr-description,.page-signQR p.qr-description{color:#707579;line-height:1.85;text-align:left;margin-left:auto;margin-right:auto}.page-signUp .auth-image{margin-top:10px;margin-bottom:14px}.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}.page-chats{display:flex}.page-chats .avatar-edit .tgico-cameraadd{top:52%}.page-chats>div{position:relative;min-height:100%;height:100%;max-height:100%}.page-chats #main-columns{width:100%;overflow:hidden}.page-chats .preloader{width:50px;height:50px;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}.page-chats .preloader-path{stroke:#4EA4F6}.page-chats #search-container,.page-chats .sidebar-search{flex-direction:column;width:100%;max-height:100%;height:100%;overflow:hidden;position:absolute;left:0;top:0;z-index:3;background:#fff}@media only screen and (min-width: 1681px){.page-chats{border-top-width:0;border-bottom-width:0;border-left-width:1px;border-right-width:1px;border-style:solid;border-color:#DADCE0}}#dialogs-contextmenu .menu-unread:before{content:\\\"\\\"}#dialogs-contextmenu .menu-unread.flip-icon:before{content:\\\"\\\"}#dialogs-contextmenu .menu-pin:before{content:\\\"\\\"}#dialogs-contextmenu .menu-pin.flip-icon:before{content:\\\"\\\"}#dialogs-contextmenu .menu-mute:before{content:\\\"\\\"}#dialogs-contextmenu .menu-mute.flip-icon:before{content:\\\"\\\"}#dialogs-contextmenu .menu-archive:before{content:\\\"\\\"}#dialogs-contextmenu .menu-archive.flip-icon:before{content:\\\"\\\"}.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}html.no-touch .page-password .toggle-visible:hover{color:#000}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:local(\\\"Roboto\\\"),local(\\\"Roboto-Regular\\\"),url(assets/fonts/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2) format(\\\"woff2\\\");unicode-range:U400-45F,U490-491,U4B0-4B1,U2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:local(\\\"Roboto\\\"),local(\\\"Roboto-Regular\\\"),url(assets/fonts/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format(\\\"woff2\\\");unicode-range:U100-24F,U259,U1E00-1EFF,U2020,U20A0-20AB,U20AD-20CF,U2113,U2C60-2C7F,UA720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:local(\\\"Roboto\\\"),local(\\\"Roboto-Regular\\\"),url(assets/fonts/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format(\\\"woff2\\\");unicode-range:U0-0FF,U131,U152-153,U2BB-2BC,U2C6,U2DA,U2DC,U2000-206F,U2074,U20AC,U2122,U2191,U2193,U2212,U2215,UFEFF,UFFFD}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:local(\\\"Roboto Medium\\\"),local(\\\"Roboto-Medium\\\"),url(assets/fonts/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.woff2) format(\\\"woff2\\\");unicode-range:U400-45F,U490-491,U4B0-4B1,U2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:local(\\\"Roboto Medium\\\"),local(\\\"Roboto-Medium\\\"),url(assets/fonts/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2) format(\\\"woff2\\\");unicode-range:U100-24F,U259,U1E00-1EFF,U2020,U20A0-20AB,U20AD-20CF,U2113,U2C60-2C7F,UA720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:local(\\\"Roboto Medium\\\"),local(\\\"Roboto-Medium\\\"),url(assets/fonts/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2) format(\\\"woff2\\\");unicode-range:U0-0FF,U131,U152-153,U2BB-2BC,U2C6,U2DA,U2DC,U2000-206F,U2074,U20AC,U2122,U2191,U2193,U2212,U2215,UFEFF,UFFFD}html,body{height:100%;width:100%}html{font-size:16px;overflow:hidden}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}input,textarea,button,select,a,div{-webkit-tap-highlight-color:rgba(0,0,0,0)}.whole{min-height:100%;width:100%;margin:0 auto;max-width:1680px;height:100%}.disable-hover,.disable-hover *{pointer-events:none !important}.container{margin:0 auto}h1,h2,h3,h4,h5,h6{font-weight:500}body.is-mac *{font-weight:normal !important}h4{font-size:2rem;margin:22px 0 14px;line-height:110%}input{caret-color:#4EA4F6}.subtitle{color:#707579;line-height:1.35}.btn-icon{text-align:center;font-size:1.5rem;line-height:1.5rem;border-radius:50%;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}html.no-touch .btn-icon:hover{background-color:rgba(112,117,121,0.08)}.btn-corner{position:absolute !important;bottom:20px;right:20px;transition:.2s ease;transform:translateY(calc(100% + 20px));z-index:3}.btn-corner.is-visible{transform:translateY(0px)}.danger{color:#E53935 !important}.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:10px;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:auto;top:initial;right:0;bottom:100%;transform-origin:bottom right}.btn-menu.top-right{top:auto;top:initial;left:0;bottom:100%;transform-origin:bottom left}.btn-menu-item{display:flex;position:relative;padding:0 40px 0 20px;height:56px;cursor:pointer !important;pointer-events:all !important;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}html.no-touch .btn-menu-item:hover{background-color:rgba(112,117,121,0.06)}.btn-menu-item:before{color:#707579;font-size:1.5rem;margin-right:32px}.btn-menu-item.danger:before{color:#E53935}#bubble-contextmenu,#dialogs-contextmenu{position:fixed;right:auto;bottom:auto;width:auto;z-index:4}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInFadeOut{0%{opacity:0}10%{opacity:1}50%{opacity:1}to{opacity:0}}@keyframes fadeInFadeOut{0%{opacity:0}10%{opacity:1}50%{opacity:1}to{opacity:0}}.toast{position:fixed;left:50%;top:50%;transform:translate(-50%, -50%);padding:.5rem 1rem;background-color:rgba(0,0,0,0.66);color:#fff;font-size:1rem;border-radius:10px;-webkit-animation:fadeInFadeOut 3s linear forwards;animation:fadeInFadeOut 3s linear forwards}hr{width:100%;border:none;border-bottom:1px solid #DADCE0;margin:0 0 8px}avatar-element{color:#fff;width:54px;height:54px;line-height:54px;border-radius:50%;background-color:#50a2e9;text-align:center;font-size:1.25em;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}avatar-element img{width:100%;height:100%;border-radius:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}avatar-element img.fade-in{-webkit-animation:fadeIn .2s ease forwards;animation:fadeIn .2s ease forwards}avatar-element[class*=\\\" tgico-\\\"]{line-height:52px;font-size:28px}avatar-element path{fill:white}avatar-element.is-online:after{position:absolute;content:\\\" \\\";display:block;border-radius:50%;border:2px solid white;background-color:#0ac630;left:74%;top:73%;width:14px;height:14px}avatar-element.tgico-avatar_deletedaccount{font-size:3rem}.user-title,b{color:#000;font-weight:500}.user-last-message b{font-weight:400}.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;-webkit-mask-image:-webkit-radial-gradient(circle, white 100%, black 100%)}.c-ripple__circle{background-color:rgba(0,0,0,0.08);display:block;position:absolute;transform:scale(0);border-radius:50%;-webkit-animation:ripple-effect .7s forwards;animation:ripple-effect .7s forwards;transition:.35s opacity;overflow:hidden}.c-ripple__circle.hiding{opacity:0}@-webkit-keyframes ripple-effect{0%{transform:scale(0)}to{transform:scale(2)}}@keyframes ripple-effect{0%{transform:scale(0)}to{transform:scale(2)}}.document{padding-left:4.5rem;height:70px}.document-ico{background-color:#50a2e9;border-radius:5px;line-height:10px}.document-ico:after{content:\\\"\\\";display:block;position:absolute;top:0;right:0;width:1.125rem;height:1.125rem;border-bottom-left-radius:.25rem;border-left:0.5625rem solid rgba(0,0,0,0.25);border-bottom:0.5625rem solid rgba(0,0,0,0.25);border-top:.5625rem solid #fff;border-right:.5625rem solid #fff}.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:#50a2e9;border-radius:8px}.document.ext-zip .document-ico,.document.ext-zip .document-download{background-color:#FB8C00}.document.ext-pdf .document-ico,.document.ext-pdf .document-download{background-color:#DF3F40}.document.ext-apk .document-ico,.document.ext-apk .document-download{background-color:#43A047}.document:not(.photo) .document-ico{padding-top:1.5rem}.document.photo .document-ico{background:#000;border-radius:8px}.document.photo .document-ico:after{display:none}.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:1;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}.audio-title,.audio:not(.audio-show-progress) .audio-subtitle{white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}.avatar-edit{position:relative;border-radius:50%;cursor:pointer;overflow:hidden}.avatar-edit-canvas{max-width:100%;max-height:100%;width:100%;height:100%;background-color:#50a2e9}.avatar-edit .tgico-cameraadd{position:absolute;font-size:48px;line-height:48px;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);z-index:2;color:#fff}.avatar-edit .avatar-placeholder{position:absolute;left:0;top:0;width:100%;height:100%;-webkit-filter:brightness(0.7);filter:brightness(0.7)}.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}.input-field input.error+label{color:#E53935 !important}.input-field input.valid{border-color:#26962F}.input-field input.valid+label{color:#26962F !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;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;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;transform:rotateZ(45deg);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;transform:rotateZ(45deg);transform-origin:100% 100%}[type=\\\"checkbox\\\"]:not(:checked)+span:after{background-color:transparent;border-color:#8d969c}[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}html.no-touch .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}::-moz-placeholder{color:#a2acb4;opacity:1}:-ms-input-placeholder{color:#a2acb4;opacity:1}::-ms-input-placeholder{color:#a2acb4;opacity:1}::placeholder{color:#a2acb4;opacity:1}:-ms-input-placeholder{color:#a2acb4}::-ms-input-placeholder{color:#a2acb4}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}html.no-touch .phone-edit:hover{opacity:1}.btn-primary{background:#50a2e9;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}html.no-touch .btn-primary:hover{background:#2c8fe4}.btn-primary svg,.btn-primary use{height:calc(100% - 20px);right:15px;left:auto}.btn-primary.btn-circle .preloader-circular{height:calc(100% - 20px);right:auto;left:auto;margin:0;top:10px}.btn-primary.btn-circle .preloader-circular .preloader-path{stroke:#fff}.btn-menu-toggle{position:relative;overflow:visible !important;font-weight:normal !important;cursor:pointer !important;pointer-events:all !important}.btn-menu-toggle:not(.btn-primary).menu-open{background-color:rgba(112,117,121,0.08)}.preloader-circular{-webkit-animation:rotate 2s linear infinite;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;-webkit-animation:dash 1.5s ease-in-out infinite;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%;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}.preloader-container .preloader-circular{-webkit-animation:none;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;-webkit-animation:dashNew 1.5s ease-in-out infinite;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%}html.no-touch .preloader-container .preloader-close:hover{background:none}@-webkit-keyframes rotate{100%{transform:rotate(360deg)}}@keyframes rotate{100%{transform:rotate(360deg)}}@-webkit-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 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}}@-webkit-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%}}@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}.btn-circle{border-radius:50%;height:54px;width:54px;line-height:54px}.btn-circle path{fill:white}.overlay::-moz-selection{background:transparent}.overlay::selection{background:transparent}.crop-component::-moz-selection{background:transparent}.crop-component::selection{background:transparent}.crop-image,.overlay>img{width:auto;height:auto;display:block;-o-object-fit:contain;object-fit:contain;-o-object-position:center;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%}html.no-touch .overlay:hover,.overlay:active{cursor:move}.overlay>img{position:absolute;display:block}[contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.justify-start{justify-content:flex-start !important}.position-center{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.sticky_sentinel{position:absolute;left:0;right:0;visibility:hidden;pointer-events:none}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\runtime\\api.js",
"name": "./node_modules/css-loader/dist/runtime/api.js",
"index": 1,
"index2": 0,
"size": 2517,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"issuerId": 0,
"issuerName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"issuerPath": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"profile": {
"factory": 198,
"building": 6191
}
}
],
"profile": {
"factory": 1,
"building": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"module": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"moduleName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"type": "cjs require",
"userRequest": "../../node_modules/css-loader/dist/runtime/api.js",
"loc": "2:34-94"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}"
}
],
"filteredModules": 0,
"origins": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "mini-css-extract-plugin",
"request": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"reasons": []
}
]
}
],
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"index": 0,
"index2": 1,
"size": 91512,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 198,
"building": 6191
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"loc": "mini-css-extract-plugin"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"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, \".chats-container{position:relative}.chats-container .input-search{position:relative;width:100%;margin-left:22px;margin-right:4px}.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;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;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-bottom:4px;background-color:#fff}.chats-container li>.rp{height:72px;max-height:72px;border-radius:10px;display:flex;align-items:flex-start;flex-direction:row;position:relative;cursor:pointer;padding:9px 8.5px;margin:0px 8px 0px 7px;overflow:hidden}html.no-touch .chats-container li>.rp:hover{background:rgba(112,117,121,0.08)}.chats-container li.active>.rp,.chats-container li.menu-open>.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;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 .dialog-avatar{flex:0 0 auto}.chats-container .user-caption{max-width:100%;max-height:100%;overflow:hidden;color:#707579;flex:1 1 auto;padding:1px 3.5px 1px 9px}.chats-container .user-caption p:last-child{margin-top:-3px}.chats-container .user-title{max-width:82%}.chats-container .user-title img.emoji{vertical-align:top;margin-top:4px;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-title.is-verified:after{content:\\\" \\\";background:url(assets/img/icon-verified.svg);display:inline-block;width:20px;height:20px;vertical-align:text-bottom;margin-left:2px}.chats-container .user-last-message{max-width:86%}.chats-container .user-last-message img.emoji{width:20px;height:20px;margin-top:-3px}.chats-container .user-last-message span.emoji{font-size:1.2rem;margin:0 .125rem;overflow:visible;margin-top:-1.5px}.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:4px;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 23px;padding-bottom:1rem;font-weight:500}.chats-container .search-group-contacts{padding:16px 0 7px}.chats-container .search-group-contacts .search-group__name{padding-bottom:17px}.chats-container .search-group:last-child{border-bottom:none}.contacts-container .dialog-avatar,.search-group-contacts .dialog-avatar{width:48px;height:48px}.contacts-container li,.search-group-contacts li{padding-bottom:4px;padding-top:2px}.contacts-container li>.rp,.search-group-contacts li>.rp{padding:9px 11.5px !important;height:66px}.contacts-container .user-caption,.search-group-contacts .user-caption{padding:1px 3.5px 1px 13px}.contacts-container .user-title,.contacts-container b,.contacts-container .user-last-message b,.search-group-contacts .user-title,.search-group-contacts b,.search-group-contacts .user-last-message b{font-weight:normal}.contacts-container p,.search-group-contacts p{height:24px}.contacts-container span.user-last-message,.search-group-contacts span.user-last-message{font-size:14px}#contacts-container .sidebar-header{margin-bottom:1px}#contacts-container .input-search{margin-left:16px}#bubble-contextmenu>div{padding:0 84px 0 16px}#topbar{width:100%;background-color:#fff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-shadow:0 1px 2px 0 rgba(16,35,47,0.07);min-height:61px;max-height:61px;border-bottom:1px solid #DADCE0}#topbar.is-pinned-shown .pinned-message{display:flex}#topbar .chat-more-button{margin-left:8px}#topbar .chat-more-button .btn-menu{top:calc(100% + 7px)}#topbar .chat-info{flex-grow:1}#topbar .content{flex:1;padding-left:17px;line-height:1.6}#topbar .person{display:flex;align-items:center;cursor:pointer;margin-left:4px}#topbar .person .bottom{font-size:14px;line-height:18px;color:#707579}#topbar .person .bottom .online{color:#50a2e9}#topbar #im-avatar{width:44px;height:44px;line-height:44px}#chat-input{display:flex;align-items:center;width:100%;max-width:696px;padding-top:.35rem;justify-content:space-between;flex:0 0 auto;position:relative}#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-input [contenteditable=true]:empty:before{content:attr(data-placeholder);color:#a2acb4;display:block}#chat-input #btn-record-cancel{visibility:hidden;opacity:0;transition:width .1s .1s, margin-right .1s .1s, visibility 0s .1s, opacity .1s 0s;padding:0;z-index:3}#chat-input .btn-send-container{flex:0 0 auto;position:relative;align-self:flex-end;z-index:2}#chat-input #btn-send{color:#9e9e9e}#chat-input #btn-send.tgico-send{color:#50a2e9}#chat-input #btn-record-cancel,#chat-input #btn-send{font-size:1.5rem;line-height:1.5rem;background-color:#fff}#chat-input .record-time{height:44px;line-height:44px;display:none}#chat-input .record-time:after{content:\\\" \\\";width:10px;height:10px;background-color:#e53935;border-radius:50%;margin:0 .5rem;display:inline-block;-webkit-animation:recordBlink 1.25s infinite;animation:recordBlink 1.25s infinite}#chat-input .record-ripple{border-radius:50%;background-color:rgba(0,0,0,0.2);width:150px;height:150px;transform:scale(0);position:absolute;top:-48px;left:-48px;transition:transform .03s, visibility .1s;visibility:hidden}#chat-input.is-recording #btn-record-cancel{opacity:1;visibility:visible;margin-right:.5rem;transition:width .1s, margin-right .1s, visibility 0s .1s, opacity .1s .1s}#chat-input.is-recording #attach-file{display:none}#chat-input.is-recording .record-time{display:block}#chat-input.is-recording .record-ripple{transition:transform .03s, visibility 0s;visibility:visible}#chat-input:not(.is-recording) #btn-record-cancel{margin-right:0;width:0px}@-webkit-keyframes recordBlink{0%{opacity:1}50%{opacity:.2}100%{opacity:1}}@keyframes recordBlink{0%{opacity:1}50%{opacity:.2}100%{opacity:1}}#im-title{cursor:pointer}#im-title span.emoji{vertical-align:inherit}.chat-container{display:flex;width:100%;align-items:center;flex-direction:column;position:relative;background-image:url(\\\"assets/img/camomile_blurred.jpg\\\");background-size:cover;background-position:center center}.chat-container #chat-background-canvas{display:none}.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;z-index:3}.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(\\\"assets/img/msg-tail-left.svg\\\");transform:scaleX(-1)}.chat-container .input-message #attach-file.menu-open{color:#50a2e9;background-color:transparent}.chat-container .input-message #attach-file .btn-menu{padding:8px 0;right:-8px;bottom:calc(100% + 16px)}.chat-container .input-message #attach-file .btn-menu>div{padding:0 38px 0 16px}.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}html.no-touch .chat-container .pinned-message:hover,html.no-touch .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 i,.chat-container .reply i{font-style:normal;color:#50a2e9}.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}.chat-container .pinned-message{display:none}#bubbles{width:100%;height:100%;max-height:100%;flex:1 1 auto;overflow:hidden;position:relative;padding:0 .5rem}#bubbles>.scrollable{padding:0 .75rem;height:auto;display:block}#bubbles:not(.scrolled-down){-webkit-mask-image:linear-gradient(0deg, transparent 0, #000 20px);mask-image:linear-gradient(0deg, transparent 0, #000 20px)}#bubbles:not(.scrolled-down) #bubbles-go-down{opacity:1}#bubbles .preloader{width:100%;height:100%}#bubbles .preloader svg{width:50px;height:50px}#bubbles .preloader-container .preloader-circular{background-color:rgba(0,0,0,0.35)}#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}#bubbles-inner.is-chat .is-in .bubble__container{margin-left:3rem}#bubbles-inner.is-channel:not(.is-chat) .bubble__container{max-width:100%}#bubbles-inner.is-channel:not(.is-chat):not(.has-rights){padding-bottom:55px}#bubbles-inner:not(.is-channel) .message,#bubbles-inner.is-chat .message{max-width:480px}#bubbles-inner.is-scrolling .is-sticky{opacity:1}#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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}#bubbles-go-down:before{margin-left:.75px}.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;text-transform:uppercase;transition:.2s;border-radius:8px;cursor:pointer;color:#50a2e9}html.no-touch .popup .popup-buttons button:hover{background-color:rgba(112,117,121,0.08)}.popup .popup-buttons button+button{margin-top:.5rem}@-webkit-keyframes bubbleSelected{0%{opacity:0}25%{opacity:1}to{opacity:0}}@keyframes bubbleSelected{0%{opacity:0}25%{opacity:1}to{opacity:0}}.bubbles-date-group{position:relative}.bubbles-date-group .sticky_sentinel--top{height:5px;top:0}.bubble{padding-top:5px;max-width:696px;margin:0 auto;position:relative;z-index:1}.bubble.is-selected:after{position:absolute;left:-50%;top:0;height:100%;content:\\\" \\\";background-color:rgba(0,132,255,0.3);-webkit-animation:bubbleSelected 2s linear;animation:bubbleSelected 2s linear;z-index:1}.bubble.is-selected:not(.is-group-last):after{height:calc(100% + 5px)}.bubble.is-first-unread:before{content:\\\"Unread messages\\\";height:30px;margin-bottom:5px;margin-left:-50%;text-align:center;color:#538BCC;line-height:2.1;font-weight:500;font-size:15px;background-color:rgba(255,255,255,0.95)}.bubble.is-selected:after,.bubble.is-first-unread:before{width:200%;display:block}.bubble.is-date{position:-webkit-sticky;position:sticky;top:5px;z-index:2;pointer-events:none}.bubble.is-date.is-sticky{transition:opacity .3s ease;opacity:0}.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:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;z-index:2}.bubble__container>.user-avatar{position:absolute;left:-3rem;width:40px;height:40px;line-height:40px;bottom:0;font-size:1rem;cursor:pointer}.bubble.service{padding:5px 0}.bubble.service .bubble__container{margin:0 auto;max-width:100%}.bubble .goto-original{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}.bubble.is-group-last{padding-bottom:5px}.bubble:not(.forwarded):not(.is-group-first) .bubble__container>.name{display:none}.bubble:not(.forwarded):not(.is-group-first):not(.is-message-empty):not(.is-reply) .message{padding-top:6px}.bubble:not(.is-group-last) .bubble__container>.user-avatar{display:none}.bubble:not(.hide-name) .audio{margin:4px 0}.bubble .goto-original{opacity:1}.bubble .reply{width:auto}.bubble .reply .reply-content{height:auto;min-height:32px}.bubble.photo .bubble__container,.bubble.video .bubble__container{width:-webkit-min-content;width:-moz-min-content;width:min-content}.bubble.photo .box.web,.bubble.video .box.web{max-width:100%}.bubble.webpage .time{float:none;width:0}.bubble .preview-resizer{display:flex}.bubble img.emoji{height:18px;width:18px;margin:0 .05rem;vertical-align:bottom}.bubble span.emoji{height:auto;width:auto;overflow:visible;vertical-align:unset}.bubble.emoji-big{font-size:0}.bubble.emoji-big .bubble__container{background:none !important;box-shadow:none;line-height:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bubble.emoji-big:not(.sticker) .attachment{padding-top:.5rem;padding-bottom:1.5rem;max-width:-webkit-fit-content !important;max-width:-moz-fit-content !important;max-width:fit-content !important;max-height:-webkit-fit-content !important;max-height:-moz-fit-content !important;max-height:fit-content !important}.bubble.emoji-big:not(.sticker) .attachment span.emoji{height:auto;width:auto}.bubble.emoji-big.sticker .bubble__container{max-width:140px !important;max-height:140px !important}.bubble.emoji-1x .attachment{font-size:96px}.bubble.emoji-1x .attachment img.emoji{height:64px;width:64px}.bubble.emoji-2x .attachment{font-size:64px}.bubble.emoji-2x .attachment img.emoji{height:48px;width:48px}.bubble.emoji-3x .attachment{font-size:52px}.bubble.emoji-3x .attachment img.emoji{height:32px;width:32px}.bubble.sticker .bubble__container,.bubble.round .bubble__container,.bubble.emoji-big .bubble__container{cursor:pointer;background:none !important;box-shadow:none}.bubble.sticker img,.bubble.round img,.bubble.emoji-big img{-o-object-fit:contain;object-fit:contain}.bubble.sticker.is-message-empty .message,.bubble.round.is-message-empty .message,.bubble.emoji-big.is-message-empty .message{background-color:rgba(0,0,0,0.23)}.bubble.sticker .attachment{border-radius:0}.bubble.sticker .bubble__container{max-width:200px !important;max-height:200px !important}.bubble.round .attachment{max-width:200px !important;max-height:200px !important}.bubble.round .attachment img{border-radius:50%}.bubble:not(.is-message-empty) .attachment{border-bottom-left-radius:0;border-bottom-right-radius:0}.bubble:not(.emoji-big) .attachment{font-size:0}.bubble .attachment{max-width:100%;border-radius:inherit;overflow:hidden;display:flex;justify-content:center;position:relative}.bubble .attachment img,.bubble .attachment video{max-width:100%;cursor:pointer;opacity:1;transition:opacity .3s ease}.bubble .attachment .download{position:absolute;left:0;top:0;height:100%;width:100%;cursor:pointer;display:flex;justify-content:center;align-items:center}.bubble .attachment .download span{background-color:rgba(0,0,0,0.35);font-size:23px;color:#fff;text-align:center}.bubble .attachment .download ~ .video-play,.bubble .attachment .preloader-container ~ .video-play{display:none}.bubble:not(.sticker) .attachment{max-width:min(480px, 100%);max-height:min(480px, 100%);width:-webkit-max-content;width:-moz-max-content;width:max-content}.bubble img:not(.emoji),.bubble video{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.bubble.is-album .attachment{max-width:min(451px, 100%);max-height:none}.bubble.is-album .attachment .album-item{background-color:#000;background-size:cover;max-width:100%;cursor:pointer;position:absolute;overflow:hidden}.bubble.is-album .attachment .album-item img,.bubble.is-album .attachment .album-item video{border-radius:inherit}.bubble.round.video .attachment{max-height:200px;max-width:200px}.bubble .box,.bubble .reply{font-size:.95rem;margin:4px 4px 4px 6px;padding:4px;margin-bottom:-5px;border-radius:4px}.bubble .box.web,.bubble .reply.web{margin-top:-6px;max-width:100%;overflow:hidden}.bubble .box.web .preview,.bubble .reply.web .preview{max-height:min(400px, 100%);max-width:min(480px, 100%);border-radius:4px;margin-bottom:3px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative;width:-webkit-max-content;width:-moz-max-content;width:max-content}.bubble .box.web .preview img,.bubble .box.web .preview video,.bubble .reply.web .preview img,.bubble .reply.web .preview video{max-width:100%}.bubble .box.web .title,.bubble .reply.web .title{letter-spacing:-0.2px;line-height:1.2;font-weight:500 !important}.bubble .box.web .name,.bubble .reply.web .name{letter-spacing:-0.3px;display:block}html.no-touch .bubble .box.web .name:hover,html.no-touch .bubble .reply.web .name:hover{text-decoration:underline}.bubble .box.web .text,.bubble .reply.web .text{overflow:hidden;text-overflow:ellipsis;line-height:1.2;letter-spacing:-0.3px;margin-top:2px;font-size:0.965rem}.bubble .box .quote,.bubble .reply .quote{padding-left:0.55rem;max-width:100%;overflow:hidden;width:100%}.bubble .box .text,.bubble .reply .text{line-height:1.2}.bubble .box .name,.bubble .box .reply-title,.bubble .reply .name,.bubble .reply .reply-title{font-weight:500 !important;display:inline !important}.bubble.is-square-photo .bubble__container{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bubble.is-square-photo .box.web .quote{display:flex}.bubble.is-square-photo .box.web .preview-resizer{order:2;flex-shrink:0;max-width:5rem;max-height:5rem}.bubble.is-square-photo .box.web .preview-resizer .preview{max-width:min(5rem, 100%);max-height:min(5rem, 100%)}.bubble.is-square-photo .box.web .quote-text{order:1;padding-right:1rem}.bubble.is-vertical-photo .bubble__container{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bubble .reply{max-width:300px;margin-bottom:6px;margin-top:0;cursor:pointer}.bubble.is-reply.emoji-big .reply,.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}.bubble.is-reply.emoji-big .reply .reply-content,.bubble.is-reply.sticker .reply .reply-content{margin-top:0}.bubble.is-reply .reply-content{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.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}.bubble .message:last-child{padding-top:6px}.bubble .message .emoji{font-size:1.2rem}.bubble .message pre,.bubble .message code{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.bubble .message.audio-message{min-width:275px;max-width:275px !important;padding-top:8px !important;padding-left:8px !important}.bubble .message.audio-message .audio{justify-content:unset;max-width:none}.bubble .message.audio-message .audio-time{padding-bottom:7px}.bubble .message.audio-message .audio-time,.bubble .message.audio-message .audio-subtitle{color:#4fae4e;line-height:1.45;margin-top:0}.bubble .message.audio-message .audio-title{font-weight:500;margin-left:-1px}.bubble .message.audio-message .audio-details{margin-top:8px}.bubble .message.audio-message .audio-ico{font-size:2.15rem}.bubble .message.audio-message .media-progress{width:191px;margin:9px 0 9px}.bubble .message.audio-message .media-progress__filled{background-color:#47aa41;transform-origin:left;height:2px}.bubble .message.audio-message .media-progress__seek{height:2px;overflow:visible !important;background:rgba(124,195,107,0.52)}.bubble .message.audio-message .media-progress__seek::-webkit-slider-thumb{height:12px;width:12px;background:#47aa41}.bubble .message.audio-message .tgico-largeplay:before{content:\\\"\\\";margin-right:-2px}.bubble .message.audio-message .time{width:unset}.bubble .message.contact-message{min-width:200px;padding-left:8px}.bubble .message.contact-message .contact{display:flex;padding:2px 0;cursor:pointer}.bubble .message.contact-message .contact-avatar{color:#fff}.bubble .message.contact-message .contact-details{padding-left:12px;margin-top:8px}.bubble .message.contact-message .contact-name{font-size:1rem;font-weight:500}.bubble .message.contact-message .contact-number{font-size:14px;line-height:1.4}.bubble .message.contact-message .time{width:unset}.bubble .message.document-message{max-width:325px !important}.bubble .message.document-message .time{width:unset}.bubble .message.document-message .document{padding-left:66px;height:58px}.bubble .message.document-message .document-name{line-height:1.4;margin-top:1px;overflow:hidden;text-overflow:ellipsis}.bubble.is-message-empty .message{position:absolute;bottom:.1rem;right:.2rem;border-radius:12px;background-color:rgba(0,0,0,0.35);padding:0 .2rem;z-index:2}.bubble.is-message-empty .message .time{color:#fff;padding:0;display:flex;align-items:center;width:auto}.bubble.is-message-empty .message .time .inner{margin-bottom:0;position:relative;padding:0 2.5px;bottom:0}.bubble .time{font-size:.8rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;float:right;user-select:none;height:20px;line-height:20px}.bubble .time .inner{position:absolute;bottom:0;right:0;font-size:12px;display:flex;align-items:center;line-height:1}.bubble .time .inner i{font-size:1.15rem;margin-right:.4rem;margin-left:.1rem}.bubble .time .inner i.edited{overflow:visible;font-size:.8rem}.bubble span.video-time{position:absolute;top:3px;left:3px;border-radius:12px;background-color:rgba(0,0,0,0.35);padding:0px 6px 0px 6px;z-index:2;font-size:12px;color:white;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bubble span.video-play{background-color:rgba(0,0,0,0.35);color:#fff;text-align:center;font-size:34px;line-height:60px;cursor:pointer}.bubble.is-edited.channel-post .time{min-width:calc(5rem + 46px)}.bubble.channel-post .time{width:5rem}.bubble.is-edited .time{width:78px !important}.bubble.is-edited.emoji-big .time,.bubble.is-edited.sticker .time{width:81px !important}.bubble:not(.forwarded).hide-name .name,.bubble.emoji-big .name{display:none}.bubble .name{cursor:pointer}.bubble__container>.name{padding:5px .6rem 0 .6rem;font-weight:500 !important;color:#50a2e9;font-size:.9rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.bubble:not(.webpage).photo .name,.bubble:not(.webpage).video .name{padding-bottom:6px}.bubble:not(.webpage).photo:not(.is-message-empty) .message,.bubble:not(.webpage).video:not(.is-message-empty) .message{padding-top:6px}.bubble:not(.webpage):not(.is-album):not(.sticker):not(.round):not(.emoji-big) .attachment,.bubble .album-item{background-color:#000}.bubble.hide-name:not(.is-reply):not(.is-message-empty) .message{padding-top:6px}.bubble:not(.sticker):not(.emoji-big).hide-name .reply,.bubble:not(.sticker):not(.emoji-big):not(.is-group-first) .reply,.bubble:not(.sticker):not(.emoji-big).is-out .reply{margin-top:6px}.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 no-repeat;content:'';background-size:11px 20px;background-position-y:1px}.bubble.photo.is-message-empty.is-group-last.is-group-last .bubble__container:after,.bubble.video:not(.round).is-message-empty.is-group-last.is-group-last .bubble__container:after{display:none}.bubble.photo.is-message-empty.is-group-last .attachment,.bubble.video:not(.round).is-message-empty.is-group-last .attachment{overflow:visible}.bubble__media-container{cursor:pointer}.bubble.service{align-self:center}.bubble.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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;text-align:center}.bubble.service .service-msg .name{cursor:pointer;margin-right:5px}.bubble.service .service-msg img.emoji{margin-bottom:3px}.bubble-audio .time{width:unset !important}.bubble.is-in .bubble__container{margin-right:auto;background-color:#ffffff;border-radius:6px 12px 12px 6px}.bubble.is-in.is-group-first .bubble__container{border-radius:12px 12px 12px 6px}.bubble.is-in.is-group-last .bubble__container{border-radius:6px 12px 12px 0px}.bubble.is-in.is-group-last .bubble__container:after{left:-8.4px;background-image:url(\\\"assets/img/msg-tail-left.svg\\\")}.bubble.is-in.is-group-first.is-group-last .bubble__container{border-radius:12px 12px 12px 0px}.bubble.is-in.forwarded .attachment,.bubble.is-in.is-reply .attachment,.bubble.is-in:not(.hide-name).is-message-empty .attachment{border-top-left-radius:0;border-top-right-radius:0}.bubble.is-in a{color:#50a2e9}html.no-touch .bubble.is-in .quote:hover{background-color:rgba(112,117,121,0.08)}.bubble.is-in.is-reply.emoji-big .reply,.bubble.is-in.is-reply.sticker .reply{left:calc(100% + 10px);background-color:#fff}.bubble.is-in .quote{border-left:2px #50a2e9 solid}.bubble.is-in .quote *{overflow:hidden;text-overflow:ellipsis}.bubble.is-in .quote .name,.bubble.is-in .reply-title{color:#50a2e9}.bubble.is-in .time{color:#a3adb6;width:36px}.bubble.is-in .time .inner{padding:0 7px 0 5px;margin-bottom:4px}.bubble.is-in.photo.is-message-empty.is-group-last .attachment,.bubble.is-in.video:not(.round).is-message-empty.is-group-last .attachment{border-bottom-left-radius:0}.bubble.is-in.photo.is-message-empty.is-group-last .attachment .bubble__media-container,.bubble.is-in.video:not(.round).is-message-empty.is-group-last .attachment .bubble__media-container{margin-left:-9px}.bubble.is-in .audio-subtitle,.bubble.is-in .contact-number,.bubble.is-in .audio-time{color:#707579 !important}.bubble.is-in .message.audio-message .media-progress__seek{background:rgba(193,207,220,0.39)}.bubble.is-in .message.audio-message .media-progress__filled{background-color:#0089ff}.bubble.is-in .message.audio-message .media-progress input::-webkit-slider-thumb{background:#63a2e3}.bubble.is-out .bubble__container{margin-left:auto;background-color:#eeffde;border-radius:12px 6px 6px 12px}.bubble.is-out .bubble__container>.user-avatar{left:auto;right:-2.5rem}.bubble.is-out.is-group-first .bubble__container{border-radius:12px 12px 6px 12px}.bubble.is-out.is-group-last .bubble__container{border-radius:12px 6px 0px 12px}.bubble.is-out.is-group-last .bubble__container:after{right:-8.4px;background-image:url(\\\"assets/img/msg-tail-right.svg\\\")}.bubble.is-out.is-group-first.is-group-last .bubble__container{border-radius:12px 12px 0px 12px}.bubble.is-out.forwarded .attachment,.bubble.is-out.is-reply .attachment{border-top-left-radius:0;border-top-right-radius:0}html.no-touch .bubble.is-out .quote:hover{background-color:rgba(77,205,94,0.12)}.bubble.is-out.is-reply.emoji-big .box,.bubble.is-out.is-reply.emoji-big .reply,.bubble.is-out.is-reply.sticker .box,.bubble.is-out.is-reply.sticker .reply{background-color:#eeffde;right:calc(100% + 10px);border-color:rgba(77,205,94,0.12)}.bubble.is-out .quote{border-left:2px #50af4f solid}.bubble.is-out .reply-border{background-color:#50af4f}.bubble.is-out .quote .name,.bubble.is-out .reply-title{color:#50af4f}.bubble.is-out .time{color:#50af4f;width:50px;display:inline-block}.bubble.is-out .time .inner{padding:0 4px 0 4px;bottom:1px}.bubble.is-out .time .tgico:after{font-size:19px;vertical-align:middle;margin-left:1px}.bubble.is-out.forwarded .name{color:#50af4f}.bubble.is-out.is-read .time .tgico:after{content:\\\"\\\"}.bubble.is-out.is-sent .time .tgico:after{content:\\\"\\\"}.bubble.is-out.is-sending .time .tgico:after{content:\\\"\\\"}.bubble.is-out.is-reply .name{display:none}.bubble.is-out.is-edited .time{width:85px}.bubble.is-out .document-ico:after{border-top-color:#eeffde;border-right-color:#eeffde}.bubble.is-out .audio-waveform rect{fill:#B8DDA9}.bubble.is-out .audio-waveform rect.active{fill:#68AB5A}.bubble.is-out .audio-time,.bubble.is-out .audio-subtitle{color:#68AB5A}.bubble.is-out .audio-toggle,.bubble.is-out .audio-download{background-color:#4FAE4E}.bubble.is-out .audio-download:empty{display:none}.bubble.is-out.photo.is-message-empty.is-group-last .attachment,.bubble.is-out.video:not(.round).is-message-empty.is-group-last .attachment{border-bottom-right-radius:0}.bubble.is-out.photo.is-message-empty.is-group-last .attachment .bubble__media-container,.bubble.is-out.video:not(.round).is-message-empty.is-group-last .attachment .bubble__media-container{margin-right:-9px}.bubble.is-out .audio-subtitle,.bubble.is-out .contact-number,.bubble.is-out .document-size{color:#4FAE4E}.bubble.is-out poll-element .poll-desc,.bubble.is-out poll-element .poll-votes-count{color:#50af4f}.bubble.is-out poll-element .poll-line use{stroke:#4fae4e}.bubble.is-out poll-element .poll-answer-selected{background-color:#4fae4e}html.no-touch .bubble.is-out poll-element .poll-answer:hover .animation-ring{background-color:rgba(79,174,78,0.08)}.bubble.is-out poll-element .progress-ring__circle{stroke:#4fae4e}.reply-markup{position:absolute;width:100%}.reply-markup-row{margin-top:5px;overflow:hidden;height:40px;display:flex}.reply-markup-row:last-child{border-bottom-left-radius:12px;border-bottom-right-radius:12px}.reply-markup-button{display:flex;justify-content:center;align-items:center;border-radius:6px;background-color:rgba(0,0,0,0.23);z-index:2;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:center;color:white !important;outline:none;border:none;width:100%;cursor:pointer;position:relative;transition:background-color 0.35s ease}html.no-touch .reply-markup-button:hover{background-color:rgba(0,0,0,0.06)}.reply-markup-button+.reply-markup-button{margin-left:5px}.reply-markup-button.is-link:before{content:\\\"\\\";position:absolute;right:2px;top:2px;display:block;transform:rotate(-45deg)}poll-element{margin-top:-1px;display:block;min-width:280px}poll-element .poll-title{font-weight:500}poll-element .poll-desc{font-size:14px;color:#707579;margin-bottom:7px}poll-element .poll-answer{display:flex;position:relative;padding-bottom:20px;padding-left:34px;cursor:pointer}poll-element .poll-answer-text{margin-top:7px;margin-left:14px}poll-element .poll-answer-percents{position:absolute;left:0;top:0;opacity:0;font-weight:500;margin-top:7px;transition:.34s opacity;margin-left:-3px;text-align:right;width:40px}poll-element .poll-answer-selected{position:absolute;bottom:3px;left:26px;color:#fff;background:#50a2e9;border-radius:50%;height:12px;width:12px;font-size:11px;line-height:15px;opacity:0;-webkit-animation:fadeIn .1s ease forwards;animation:fadeIn .1s ease forwards;animation-direction:reverse;-webkit-animation-delay:.24s;animation-delay:.24s}html.no-touch poll-element .poll-answer:hover .animation-ring{visibility:visible;transform:scale(1)}poll-element .poll-answer.is-voting .progress-ring__circle{stroke-dashoffset:-19.792;-webkit-animation:pollAnswerRotate 0.65s linear infinite;animation:pollAnswerRotate 0.65s linear infinite}poll-element .poll-votes-count{color:#707579;font-size:14px;margin-top:7px}poll-element .poll-line{height:35px;position:absolute;left:17.5px;bottom:2px;transition:stroke-dashoffset .34s linear, stroke-dasharray .34s linear;stroke-dashoffset:0;stroke-dasharray:0, 485.9}poll-element .poll-line use{stroke-width:4px;stroke-linecap:round;stroke:#50a2e9;fill:none}poll-element+.time{height:unset !important;padding-top:0px !important;padding-bottom:7px !important}poll-element .circle-hover{display:flex;justify-content:center;align-items:center;width:34px;height:34px;margin-left:5px;position:absolute;left:0;top:0;transform:scale(1);transition:.1s transform}poll-element .animation-ring{display:block;border-radius:50%;height:34px;width:34px;transition:transform 0.12s;background-color:#f4f4f4;transform:scale(0.1);visibility:hidden}poll-element .progress-ring{height:26px;width:26px;top:unset;left:unset}poll-element .progress-ring__circle{transform-origin:center;transform:rotate(-90deg);transition:stroke-dashoffset 0.15s;stroke-dasharray:56.5487, 56.5487;stroke-dashoffset:0;stroke-opacity:1;stroke-width:2;stroke:#8d969c;fill:transparent}poll-element.is-voted .circle-hover,poll-element.is-voted .animation-ring{transform:scale(0)}poll-element.is-voted .poll-answer-percents{opacity:1}poll-element.is-voted .poll-answer-selected{-webkit-animation-direction:normal;animation-direction:normal}poll-element.is-retracting .circle-hover{transition-delay:.24s}poll-element.is-retracting .animation-ring{transition-delay:.22s}@-webkit-keyframes pollAnswerRotate{to{transform:rotate(270deg)}}@keyframes pollAnswerRotate{to{transform:rotate(270deg)}}.sidebar{background-color:#fff}.sidebar-left{border-right:1px solid #DADCE0}.sidebar-right{border-left:1px solid #DADCE0}.sidebar-header{background-color:#fff;display:flex;align-items:center;justify-content:space-between;padding:7.5px 16px;min-height:60px;flex:0 0 auto}.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;flex:1 1 auto}.sidebar-content>div{width:100%}#column-left{flex-direction:column}#column-left #chats-container{max-height:100%;overflow:hidden;position:relative}#column-left .sidebar-slider{height:100%}#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-left .search-group-people ul{display:flex;flex-direction:row;padding-left:4px;margin-top:-1px;padding-bottom:1px}#column-left .search-group-people li{margin-right:5px;padding:0}#column-left .search-group-people .rp{height:98px;max-height:98px;border-radius:10px;max-width:78px;width:78px;align-items:center;position:relative;display:flex;flex-direction:column;cursor:pointer;padding:12px 0 0 !important;overflow:hidden;margin:0}#column-left .search-group-people .dialog-avatar{width:54px;height:54px}#column-left .search-group-people .user-caption{max-width:65px;padding:2px 0px 9px;font-size:12px}#column-left .search-group-people .user-title{max-width:unset}#column-left .search-group-people .search-group-scrollable{position:relative}#column-left .search-group-people .search-group-scrollable>.scrollable{position:relative}#column-left .item-main .sidebar-content .btn-menu{bottom:calc(100% + 10px)}#column-left .item-main .sidebar-content .btn-corner.menu-open:before{content:\\\"\\\"}#search-container{transition:150ms ease-in-out opacity,150ms ease-in-out transform;transform:scale(1.1, 1.1);opacity:0;display:flex}#search-container.active{transform:scale(1, 1);transform-origin:center;opacity:1}.new-channel-container .sidebar-content,.new-group-container .sidebar-content,.edit-profile-container .sidebar-content{flex-direction:column}.new-channel-container .avatar-edit,.new-group-container .avatar-edit,.edit-profile-container .avatar-edit{width:120px;height:120px;margin:1px auto 32px;flex:0 0 auto}.new-channel-container .input-wrapper,.new-group-container .input-wrapper,.edit-profile-container .input-wrapper{width:380px;margin:0 auto;flex:0 0 auto}.new-channel-container .chats-container,.new-group-container .chats-container,.edit-profile-container .chats-container{flex:1 1 auto}.new-channel-container .caption,.new-group-container .caption,.edit-profile-container .caption{font-size:0.875rem;margin-top:14px;margin-left:23px;color:#707579}.new-group-members{padding:1.5rem 0 0.4375rem}.new-group-members .search-group__name{text-transform:capitalize}.settings-container .profile-button{display:flex;padding:1.125rem 0.625rem;height:3.5rem;line-height:1.4;border-radius:0.625rem;margin:0px 0.5rem 0px 0.4375rem}html.no-touch .settings-container .profile-button:hover{background:rgba(112,117,121,0.08);cursor:pointer}.settings-container .profile-button:before{font-size:24px;color:#707579;margin-left:0.375rem;margin-top:-0.0625rem}.settings-container .profile-button p{padding-left:2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.settings-container .profile-buttons{margin-top:.9375rem;width:100%}.edit-profile-container .caption{margin-top:1.063rem;margin-left:1.438rem;line-height:1.2;padding-bottom:1.438rem}.edit-profile-container .sidebar-left-h2{color:#707579;padding:0 1.438rem;padding-bottom:1.5rem;font-weight:500}.edit-profile-container hr{margin-bottom:1.5rem}.edit-profile-container .scroll-wrapper{width:100%}#column-right{width:0%;position:relative;transition:.2s ease-in-out}@media only screen and (min-width: 721px) and (min-width: 1681px){#column-right .sidebar-content{min-width:calc(1680px / 4 - 1px)}}#column-right .sidebar-header{flex:0 0 auto}#column-right #search-private-container .chats-container{position:relative;flex:1 1 auto}#column-right #forward-container{z-index:5}#column-right .sidebar-search{display:none}#column-right .sidebar-search.active{display:flex}.profile-content{display:flex;flex-direction:column;position:relative;width:100%}.profile-content [type=\\\"checkbox\\\"]+span{padding-left:54px;margin-left:-54px}.profile-content-wrapper{flex:1 1 auto;display:flex;flex-direction:column;margin-bottom:36px}.profile-content .content-container{width:100%;max-width:100%;position:absolute;top:100%;min-height:calc((1vh * 100) - 100% - 60px);min-height:calc((var(--vh, 1vh) * 100) - 100% - 60px);display:flex;flex-direction:column}.profile-container>.scrollable{display:flex;flex-direction:column}.profile-name{text-align:center;font-size:24px;line-height:1.4;font-weight:500}.profile-name span.emoji{vertical-align:inherit;min-width:-webkit-min-content;min-width:-moz-min-content;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;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:#707579 !important;font-size:14px !important}.profile-row-notifications{margin-top:29px;line-height:1.3}.profile-avatar{width:120px;height:120px;margin:1px auto 21px;font-size:4rem !important}.profile-avatar.tgico-avatar_deletedaccount{font-size:6rem}.profile-tabs{position:-webkit-sticky !important;position:sticky !important;top:0;z-index:2;background-color:#fff}.profile-tabs-content{min-height:calc(100% - 49px);grid-template-rows:100%;flex:1 1 auto}.profile-tabs-content>div{position:relative}.profile-tabs-content .preloader{padding:0;position:absolute !important;height:100%}.profile-tabs-content .preloader>svg{height:50px;width:50px}.profile-tabs-content #content-media{width:100%;padding:7.5px;display:grid;grid-template-columns:repeat(3, 1fr);grid-auto-rows:1fr;grid-gap:3.5px}.profile-tabs-content #content-media .media-item{height:0;padding-bottom:100%;overflow:hidden;position:relative;cursor:pointer;background-color:#000}.profile-tabs-content #content-media .video-time{position:absolute;left:5px;top:4px;height:18px;border-radius:4px;background-color:rgba(0,0,0,0.35);padding:0px 6px 0px 5px;z-index:1;font-size:12px;color:white}.profile-tabs-content #content-media .media-image{position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.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:20px 15px 15px 20px}.profile-tabs-content #content-audio>div{min-height:60px}.profile-tabs-content #content-audio .audio{padding-bottom:26px;padding-left:61px;max-width:368px;justify-content:unset}.profile-tabs-content #content-audio .audio-details{height:66px}.profile-tabs-content #content-audio .audio.audio-show-progress .audio-subtitle{overflow:visible}.profile-tabs-content #content-audio .audio-ico{width:48px;height:48px}.profile-tabs-content #content-audio .audio-ico.tgico-largeplay:before{margin-right:-1px}.profile-tabs-content #content-audio .audio-download{border-radius:50%;background-color:#50a2e9;align-items:center}.profile-tabs-content #content-audio .audio-toggle,.profile-tabs-content #content-audio .audio-download{font-size:1.9rem}.profile-tabs-content #content-audio .audio-title{font-size:1rem;color:#000;line-height:1.2;padding-top:5px;margin-top:0;margin-left:-1px}.profile-tabs-content #content-audio .audio-subtitle{font-size:14px;line-height:1.25;color:#707579;margin-left:-1px;margin-top:3px}.profile-tabs-content #content-audio .audio-time{margin-top:1px}.profile-tabs-content #content-audio .audio-title,.profile-tabs-content #content-audio .audio-subtitle{overflow:hidden;text-overflow:ellipsis}.profile-tabs-content #content-audio .media-progress{margin:11px 0 8px}.profile-tabs-content #content-audio .media-progress__filled{background-color:#0089ff;transform-origin:left;height:2px}.profile-tabs-content #content-audio .media-progress__seek{height:2px;background:rgba(193,207,220,0.39)}.profile-tabs-content #content-audio .media-progress__seek::-webkit-slider-thumb{height:12px;width:12px}.media-viewer{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.88);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}html.no-touch .media-viewer-author:hover{color:#fff}.media-viewer-userpic{width:44px;height:44px;position:absolute;top:8px;left:20px}.media-viewer-name{font-weight:500}.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}html.no-touch .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-stub{flex:1}.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-media{visibility:hidden}.media-viewer-caption{flex:1;text-align:center;color:#707579;transition:.2s;max-width:50vw;word-break:break-word;overflow:hidden;text-overflow:ellipsis}html.no-touch .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}html.no-touch .media-viewer-switcher-left:hover>span,html.no-touch .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}.media-viewer-mover .ckin__player{width:100%;height:100%;position:absolute;left:0;top:0}.media-viewer-mover img,.media-viewer-mover video{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-o-object-fit:cover;object-fit:cover;opacity:1}.media-viewer-mover.active{transition:.2s transform}.media-viewer-mover.moving{transition:.35s transform ease}.media-viewer-mover.hiding img,.media-viewer-mover.hiding video{transition:.2s opacity;opacity:0}.media-viewer-aspecter{width:100%;height:100%;transform:scale(1);overflow:hidden;position:absolute}.media-viewer-mover.active .media-viewer-aspecter{transition:.2s all}.media-viewer-whole{top:0;left:0;width:100%;height:100%;position:fixed !important;display:block;z-index:4;visibility:hidden;transition:visibility 0s .2s}.media-viewer-whole.active{visibility:visible;transition-delay:0s}.media-viewer-whole.active .overlays{opacity:1;visibility:visible;transition:opacity .2s 0s,visibility 0s 0s}.media-viewer-switchers{position:relative;width:1680px;height:100%;margin:0 auto}.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;transition:opacity .2s 0s,visibility 0s .2s}.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:flex}.ckin__player.ckin__fullscreen video{max-height:none;max-width:none;-o-object-fit:contain;object-fit:contain}.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-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%;transform:translate(-50%, -50%) scale(1);font-size:64px;transition:all .2s;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==);transition:all .3s;pointer-events:none}.default.is-playing .default__gradient-bottom{transform:translateY(50px)}html.no-touch .default.is-playing:hover .default__gradient-bottom{transform:translateY(0px)}.default.is-playing:before{opacity:0;visibility:hidden;transform:translate(-50%, -50%) scale(1.3)}.default.is-playing .default__button--big{opacity:0;visibility:hidden}.default.is-playing .default__controls{transform:translateY(52px)}html.no-touch .default.is-playing:hover .default__controls{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;-webkit-transition:all 0.4s ease;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 + -4px);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:3;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;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 .category-title{position:-webkit-sticky;position:sticky;top:0;font-size:.85rem;color:#707579;background:linear-gradient(to bottom, #fff 0, rgba(255,255,255,0.9) 60%, rgba(255,255,255,0) 100%);z-index:2;padding:.53333rem 6PX .66667rem;width:100%}.emoji-dropdown .tabs-container .emoji-category{padding-top:1px;position:relative}.emoji-dropdown .tabs-container .emoji-category .category-items{display:grid;grid-column-gap:2.44px;grid-template-columns:repeat(9, 1fr);font-size:2.25rem;line-height:2.25rem}.emoji-dropdown .tabs-container .emoji-category .category-items>*{margin:0;padding:4px 4px;line-height:inherit;border-radius:8px;cursor:pointer;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;width:42px;height:42px}.emoji-dropdown .tabs-container .emoji-category .category-items>* .emoji{width:100%;height:100%}html.no-touch .emoji-dropdown .tabs-container .emoji-category .category-items>*:hover{background-color:rgba(112,117,121,0.08)}.emoji-dropdown .tabs-container .emoji-category:first-child{padding-top:5px}.emoji-dropdown .tabs-container .sticker-category{position:relative}.emoji-dropdown .tabs-container .sticker-category::after{content:\\\"\\\";flex:auto}.emoji-dropdown .tabs-container .sticker-category .category-items{width:100%;display:grid;grid-template-columns:repeat(5, 1fr);grid-column-gap:1px}.emoji-dropdown .tabs-container .sticker-category .category-items>div{width:80px;height:80px;display:flex;align-items:center;cursor:pointer;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;padding:1px 2.5px;justify-content:center;border-radius:12px;padding:0}html.no-touch .emoji-dropdown .tabs-container .sticker-category .category-items>div:hover{background-color:rgba(112,117,121,0.08)}.emoji-dropdown .tabs-container .sticker-category .category-items>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{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}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:absolute;top:0px;left:0px;bottom:0px;right:0px}.scrollable.scrollable-x{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.scrollable.scrollable-y{overflow-y:auto;overflow-y:overlay;scrollbar-width:none;-ms-overflow-style:none}div.scrollable-y::-webkit-scrollbar{width:.375rem}::-webkit-scrollbar-thumb{opacity:0;-webkit-transition:.2s ease-in-out;transition:.2s ease-in-out}div.scrollable:hover::-webkit-scrollbar-thumb{height:200px;border-radius:10px;background-color:rgba(0,0,0,0.2);opacity:1}::-webkit-scrollbar-button{width:0;height:0;display:none}::-webkit-scrollbar-corner{background-color:transparent}.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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:1rem;font-weight:500}.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:grid;grid-template-columns:100%}.tabs-container.animated{transition:.3s transform}.tabs-container>div{width:100%;max-width:100%;transition:transform .2s, -webkit-filter .2s;transition:transform .2s, filter .2s;transition:transform .2s, filter .2s, -webkit-filter .2s;display:none;flex-direction:column;position:relative;grid-row-start:1;grid-column-start:1;background-color:#fff;z-index:1;overflow:hidden}.tabs-container>div.active{display:flex}.tabs-container>div>div:not(.scroll-padding){width:100%;max-width:100%;position:relative}@-webkit-keyframes scaleIn{0%{transform:scale(0.2)}to{transform:scale(1)}}@keyframes scaleIn{0%{transform:scale(0.2)}to{transform:scale(1)}}.selector{height:100%;display:flex;flex-direction:column}.selector-search-container{flex:0 0 auto;position:relative;max-height:132px;overflow:hidden}.selector-search-container .scrollable{position:relative}.selector-search{padding:0 24px 0 24px;display:flex;flex-flow:wrap}.selector-search input{border:none;padding:7px 0px 19px 0px;outline:none;flex:1 1 auto}.selector-user{color:#000;background-color:rgba(112,117,121,0.08);font-size:16px;padding:0 17px 0px 0px;line-height:31px;margin-left:-4px;margin-right:12px;height:32px;margin-bottom:7px;border-radius:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex:0 0 auto;transition:.2s all}html.no-touch .selector-user:hover{background-color:#fae2e3;cursor:pointer}html.no-touch .selector-user:hover .selector-user-avatar:after{opacity:1;transform:scaleX(-1) rotate(-90deg)}.selector-user.scale-in{-webkit-animation:scaleIn .15s ease forwards;animation:scaleIn .15s ease forwards}.selector-user.scale-out{-webkit-animation:scaleIn .1s ease forwards;animation:scaleIn .1s ease forwards;animation-direction:reverse}.selector-user-avatar{height:32px !important;width:32px !important;float:left;margin-right:8px;overflow:hidden;font-size:14px;-webkit-mask-image:-webkit-radial-gradient(circle, white 100%, black 100%)}.selector-user-avatar:after{position:absolute;content:\\\"\\\";left:0;top:0;background-color:#df3f40;height:100%;width:100%;z-index:2;font-size:23px;line-height:32px !important;opacity:0;transition:.2s opacity, .2s transform;transform:scaleX(-1) rotate(0deg)}.selector .chats-container{height:100%;flex:1 1 auto}.selector ul .dialog-avatar{height:48px;width:48px}.selector ul .user-caption{padding:1px 3.5px 1px 12px}.selector ul p{height:24px}.selector ul span.user-title{font-weight:normal}.selector ul span.user-last-message{font-size:14px}.selector ul li{padding-bottom:0}.selector ul li>.rp{margin:0px 9px 0px 8px;padding:12px 8.5px}.selector hr{margin:0 0 8px}.selector [type=\\\"checkbox\\\"]+span{padding-left:calc(9px + 2.25rem)}.selector .checkbox{margin-top:11px;padding-left:11px}.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.3);margin:0;padding:0;box-shadow:none;opacity:0;visibility:hidden;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;transition:opacity 0.3s 0s, visibility 0s 0s}.popup.active .popup-container{transform:translateY(0)}.popup-container{position:relative;border-radius:10px;background-color:#fff;padding:1rem;transform:translateY(-40px);backface-visibility:hidden;-webkit-backface-visibility:hidden;transition-property:transform;transition-duration:0.3s}.popup-close{cursor:pointer;color:#707579;z-index:3;text-align:center;justify-self:center;line-height:1;transition:.2s}html.no-touch .popup-close:hover{color:#000}.popup-header{display:flex;margin-bottom:2rem;align-items:center}.popup-avatar .popup-container{max-width:600px;padding:15px 16px 16px 24px;overflow:hidden;display:flex;flex-direction:column}.popup-avatar .popup-container>button{position:absolute;bottom:20px;right:20px}.popup-avatar .popup-close{font-size:1.5rem;margin-top:4px}.popup-avatar .popup-header{margin-bottom:1px}.popup-avatar h6{font-size:1.25rem;text-align:left;margin:0;margin-left:2rem}.popup-avatar .crop{max-width:100%;max-height:100%;padding:24px 54px 46px 46px;border-radius:8px}.popup-avatar .crop>img{display:none}.popup-avatar .crop img{border-radius:8px}.popup-send-photo .popup-container{width:420px;max-width:420px;overflow:hidden;padding:12px 20px 32.5px}.popup-send-photo .popup-container.is-media:not(.is-album) .popup-photo{max-height:320px;margin:0 auto}.popup-send-photo .popup-container.is-media:not(.is-album) .popup-photo img{-o-object-fit:contain;object-fit:contain}.popup-send-photo .popup-container.is-media:not(.is-album) .popup-photo>div{display:flex;justify-content:center}.popup-send-photo .popup-container.is-album .popup-photo{margin:0 auto;position:relative}.popup-send-photo .popup-container.is-album .popup-photo>div{position:absolute}.popup-send-photo .popup-container.is-document .popup-photo img,.popup-send-photo .popup-container.is-document .popup-photo video,.popup-send-photo .popup-container.is-album .popup-photo img,.popup-send-photo .popup-container.is-album .popup-photo video{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.popup-send-photo .popup-header{justify-content:space-between;align-items:center;margin-bottom:9px}.popup-send-photo .popup-header .btn-primary{width:79px;height:36px;font-size:14px;font-weight:normal;padding:0;padding-top:2px;margin-top:-3px;border-radius:10px}.popup-send-photo .popup-close{font-size:1.5rem;margin:-1px 0 0 -4px}.popup-send-photo .popup-title{flex:1;padding:0 2rem 0 1.5rem;margin:0;margin-top:-3px;font-size:1.25rem;font-weight:500}.popup-send-photo .popup-photo{max-width:380px;overflow:hidden;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-radius:10px}.popup-send-photo .popup-photo .document{max-width:100%;overflow:hidden;cursor:default;padding-left:3.75rem;height:4.5rem}.popup-send-photo .popup-photo .document-name{font-weight:normal;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;line-height:1.5}.popup-send-photo .popup-photo .document-ico{height:48px;width:48px;font-size:16px;font-weight:normal;line-height:11px;letter-spacing:0}.popup-send-photo .input-field{margin-top:1rem}.popup-send-photo .input-field::-moz-placeholder{color:#a2acb4}.popup-send-photo .input-field:-ms-input-placeholder{color:#a2acb4}.popup-send-photo .input-field::-ms-input-placeholder{color:#a2acb4}.popup-send-photo .input-field::placeholder{color:#a2acb4}.popup-send-photo .input-field input{height:54px;font-size:1rem;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}.popup-peer .popup-header{display:flex;margin-bottom:0.4375rem;align-items:center;padding:0.125rem 0.25rem}.popup-peer .popup-container{padding:1rem 1.5rem 0.75rem 1rem}.popup-peer .popup-title{padding-left:0.75rem;font-size:1.25rem;font-weight:500;margin-bottom:0.125rem;text-transform:capitalize}.popup-peer .popup-description{padding:0 0.25rem;margin-top:0;margin-bottom:1.625rem;min-width:15rem;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content}.popup-peer .popup-buttons{margin-right:-0.75rem}.popup-peer .popup-buttons .btn{font-weight:500}.popup-peer .popup-buttons .btn+.btn{margin-top:0.625rem}.popup-peer .peer-avatar{height:2rem;width:2rem}#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%;transform:translateX(0);width: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:7.5rem;height:7.5rem;margin-bottom:1.5rem}.sign-logo{max-width:100%;max-height:100%}.page-sign .qr,.page-signQR .qr{margin-top:1.5rem}.page-sign p.qr-description,.page-signQR p.qr-description{color:#707579;line-height:1.85;text-align:left;margin-left:auto;margin-right:auto}.page-signUp .auth-image{margin-top:10px;margin-bottom:14px}.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}.page-chats{display:flex}.page-chats .avatar-edit .tgico-cameraadd{top:52%}.page-chats>div{position:relative;min-height:100%;height:100%;max-height:100%}.page-chats #main-columns{width:100%;overflow:hidden}.page-chats .preloader{width:50px;height:50px;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}.page-chats .preloader-path{stroke:#4EA4F6}.page-chats #search-container,.page-chats .sidebar-search{flex-direction:column;width:100%;max-height:100%;height:100%;overflow:hidden;position:absolute;left:0;top:0;z-index:3;background:#fff}@media only screen and (min-width: 1681px){.page-chats{border-top-width:0;border-bottom-width:0;border-left-width:1px;border-right-width:1px;border-style:solid;border-color:#DADCE0}}#dialogs-contextmenu .menu-unread:before{content:\\\"\\\"}#dialogs-contextmenu .menu-unread.flip-icon:before{content:\\\"\\\"}#dialogs-contextmenu .menu-pin:before{content:\\\"\\\"}#dialogs-contextmenu .menu-pin.flip-icon:before{content:\\\"\\\"}#dialogs-contextmenu .menu-mute:before{content:\\\"\\\"}#dialogs-contextmenu .menu-mute.flip-icon:before{content:\\\"\\\"}#dialogs-contextmenu .menu-archive:before{content:\\\"\\\"}#dialogs-contextmenu .menu-archive.flip-icon:before{content:\\\"\\\"}.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}html.no-touch .page-password .toggle-visible:hover{color:#000}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:local(\\\"Roboto\\\"),local(\\\"Roboto-Regular\\\"),url(assets/fonts/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2) format(\\\"woff2\\\");unicode-range:U400-45F,U490-491,U4B0-4B1,U2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:local(\\\"Roboto\\\"),local(\\\"Roboto-Regular\\\"),url(assets/fonts/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format(\\\"woff2\\\");unicode-range:U100-24F,U259,U1E00-1EFF,U2020,U20A0-20AB,U20AD-20CF,U2113,U2C60-2C7F,UA720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:local(\\\"Roboto\\\"),local(\\\"Roboto-Regular\\\"),url(assets/fonts/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format(\\\"woff2\\\");unicode-range:U0-0FF,U131,U152-153,U2BB-2BC,U2C6,U2DA,U2DC,U2000-206F,U2074,U20AC,U2122,U2191,U2193,U2212,U2215,UFEFF,UFFFD}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:local(\\\"Roboto Medium\\\"),local(\\\"Roboto-Medium\\\"),url(assets/fonts/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.woff2) format(\\\"woff2\\\");unicode-range:U400-45F,U490-491,U4B0-4B1,U2116}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:local(\\\"Roboto Medium\\\"),local(\\\"Roboto-Medium\\\"),url(assets/fonts/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2) format(\\\"woff2\\\");unicode-range:U100-24F,U259,U1E00-1EFF,U2020,U20A0-20AB,U20AD-20CF,U2113,U2C60-2C7F,UA720-A7FF}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:local(\\\"Roboto Medium\\\"),local(\\\"Roboto-Medium\\\"),url(assets/fonts/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2) format(\\\"woff2\\\");unicode-range:U0-0FF,U131,U152-153,U2BB-2BC,U2C6,U2DA,U2DC,U2000-206F,U2074,U20AC,U2122,U2191,U2193,U2212,U2215,UFEFF,UFFFD}html,body{height:100%;width:100%}html{font-size:16px;overflow:hidden}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}input,textarea,button,select,a,div{-webkit-tap-highlight-color:rgba(0,0,0,0)}.whole{min-height:100%;width:100%;margin:0 auto;max-width:1680px;height:100%}.disable-hover,.disable-hover *{pointer-events:none !important}.container{margin:0 auto}h1,h2,h3,h4,h5,h6{font-weight:500}body.is-mac *{font-weight:normal !important}h4{font-size:2rem;margin:22px 0 14px;line-height:110%}input{caret-color:#4EA4F6}.subtitle{color:#707579;line-height:1.35}.btn-icon{text-align:center;font-size:1.5rem;line-height:1.5rem;border-radius:50%;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}html.no-touch .btn-icon:hover{background-color:rgba(112,117,121,0.08)}.btn-corner{position:absolute !important;bottom:20px;right:20px;transition:.2s ease;transform:translateY(calc(100% + 20px));z-index:3}.btn-corner.is-visible{transform:translateY(0px)}.danger{color:#E53935 !important}.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:10px;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:auto;top:initial;right:0;bottom:100%;transform-origin:bottom right}.btn-menu.top-right{top:auto;top:initial;left:0;bottom:100%;transform-origin:bottom left}.btn-menu-item{display:flex;position:relative;padding:0 40px 0 20px;height:56px;cursor:pointer !important;pointer-events:all !important;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}html.no-touch .btn-menu-item:hover{background-color:rgba(112,117,121,0.06)}.btn-menu-item:before{color:#707579;font-size:1.5rem;margin-right:32px}.btn-menu-item.danger:before{color:#E53935}#bubble-contextmenu,#dialogs-contextmenu{position:fixed;right:auto;bottom:auto;width:auto;z-index:4}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInFadeOut{0%{opacity:0}10%{opacity:1}50%{opacity:1}to{opacity:0}}@keyframes fadeInFadeOut{0%{opacity:0}10%{opacity:1}50%{opacity:1}to{opacity:0}}.toast{position:fixed;left:50%;top:50%;transform:translate(-50%, -50%);padding:.5rem 1rem;background-color:rgba(0,0,0,0.66);color:#fff;font-size:1rem;border-radius:10px;-webkit-animation:fadeInFadeOut 3s linear forwards;animation:fadeInFadeOut 3s linear forwards}hr{width:100%;border:none;border-bottom:1px solid #DADCE0;margin:0 0 8px}avatar-element{color:#fff;width:54px;height:54px;line-height:54px;border-radius:50%;background-color:#50a2e9;text-align:center;font-size:1.25em;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}avatar-element img{width:100%;height:100%;border-radius:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}avatar-element img.fade-in{-webkit-animation:fadeIn .2s ease forwards;animation:fadeIn .2s ease forwards}avatar-element[class*=\\\" tgico-\\\"]{line-height:52px;font-size:28px}avatar-element path{fill:white}avatar-element.is-online:after{position:absolute;content:\\\" \\\";display:block;border-radius:50%;border:2px solid white;background-color:#0ac630;left:74%;top:73%;width:14px;height:14px}avatar-element.tgico-avatar_deletedaccount{font-size:3rem}.user-title,b{color:#000;font-weight:500}.user-last-message b{font-weight:400}.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;-webkit-mask-image:-webkit-radial-gradient(circle, white 100%, black 100%)}.c-ripple__circle{background-color:rgba(0,0,0,0.08);display:block;position:absolute;transform:scale(0);border-radius:50%;-webkit-animation:ripple-effect .7s forwards;animation:ripple-effect .7s forwards;transition:.35s opacity;overflow:hidden}.c-ripple__circle.hiding{opacity:0}@-webkit-keyframes ripple-effect{0%{transform:scale(0)}to{transform:scale(2)}}@keyframes ripple-effect{0%{transform:scale(0)}to{transform:scale(2)}}.document{padding-left:4.5rem;height:70px}.document-ico{background-color:#50a2e9;border-radius:5px;line-height:10px}.document-ico:after{content:\\\"\\\";display:block;position:absolute;top:0;right:0;width:1.125rem;height:1.125rem;border-bottom-left-radius:.25rem;border-left:0.5625rem solid rgba(0,0,0,0.25);border-bottom:0.5625rem solid rgba(0,0,0,0.25);border-top:.5625rem solid #fff;border-right:.5625rem solid #fff}.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:#50a2e9;border-radius:8px}.document.ext-zip .document-ico,.document.ext-zip .document-download{background-color:#FB8C00}.document.ext-pdf .document-ico,.document.ext-pdf .document-download{background-color:#DF3F40}.document.ext-apk .document-ico,.document.ext-apk .document-download{background-color:#43A047}.document:not(.photo) .document-ico{padding-top:1.5rem}.document.photo .document-ico{background:#000;border-radius:8px}.document.photo .document-ico:after{display:none}.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:1;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}.audio-title,.audio:not(.audio-show-progress) .audio-subtitle{white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}.avatar-edit{position:relative;border-radius:50%;cursor:pointer;overflow:hidden}.avatar-edit-canvas{max-width:100%;max-height:100%;width:100%;height:100%;background-color:#50a2e9}.avatar-edit .tgico-cameraadd{position:absolute;font-size:48px;line-height:48px;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);z-index:2;color:#fff}.avatar-edit .avatar-placeholder{position:absolute;left:0;top:0;width:100%;height:100%;-webkit-filter:brightness(0.7);filter:brightness(0.7)}.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}.input-field input.error+label{color:#E53935 !important}.input-field input.valid{border-color:#26962F}.input-field input.valid+label{color:#26962F !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;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;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;transform:rotateZ(45deg);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;transform:rotateZ(45deg);transform-origin:100% 100%}[type=\\\"checkbox\\\"]:not(:checked)+span:after{background-color:transparent;border-color:#8d969c}[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}html.no-touch .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}::-moz-placeholder{color:#a2acb4;opacity:1}:-ms-input-placeholder{color:#a2acb4;opacity:1}::-ms-input-placeholder{color:#a2acb4;opacity:1}::placeholder{color:#a2acb4;opacity:1}:-ms-input-placeholder{color:#a2acb4}::-ms-input-placeholder{color:#a2acb4}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}html.no-touch .phone-edit:hover{opacity:1}.btn-primary{background:#50a2e9;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}html.no-touch .btn-primary:hover{background:#2c8fe4}.btn-primary svg,.btn-primary use{height:calc(100% - 20px);right:15px;left:auto}.btn-primary.btn-circle .preloader-circular{height:calc(100% - 20px);right:auto;left:auto;margin:0;top:10px}.btn-primary.btn-circle .preloader-circular .preloader-path{stroke:#fff}.btn-menu-toggle{position:relative;overflow:visible !important;font-weight:normal !important;cursor:pointer !important;pointer-events:all !important}.btn-menu-toggle:not(.btn-primary).menu-open{background-color:rgba(112,117,121,0.08)}.preloader-circular{-webkit-animation:rotate 2s linear infinite;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;-webkit-animation:dash 1.5s ease-in-out infinite;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%;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}.preloader-container .preloader-circular{-webkit-animation:none;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;-webkit-animation:dashNew 1.5s ease-in-out infinite;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%}html.no-touch .preloader-container .preloader-close:hover{background:none}@-webkit-keyframes rotate{100%{transform:rotate(360deg)}}@keyframes rotate{100%{transform:rotate(360deg)}}@-webkit-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 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}}@-webkit-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%}}@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}.btn-circle{border-radius:50%;height:54px;width:54px;line-height:54px}.btn-circle path{fill:white}.overlay::-moz-selection{background:transparent}.overlay::selection{background:transparent}.crop-component::-moz-selection{background:transparent}.crop-component::selection{background:transparent}.crop-image,.overlay>img{width:auto;height:auto;display:block;-o-object-fit:contain;object-fit:contain;-o-object-position:center;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%}html.no-touch .overlay:hover,.overlay:active{cursor:move}.overlay>img{position:absolute;display:block}[contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.justify-start{justify-content:flex-start !important}.position-center{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.sticky_sentinel{position:absolute;left:0;right:0;visibility:hidden;pointer-events:none}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\runtime\\api.js",
"name": "./node_modules/css-loader/dist/runtime/api.js",
"index": 1,
"index2": 0,
"size": 2517,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"issuerId": 0,
"issuerName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"issuerPath": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"profile": {
"factory": 198,
"building": 6191
}
}
],
"profile": {
"factory": 1,
"building": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\style.scss",
"module": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"moduleName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/style.scss",
"type": "cjs require",
"userRequest": "../../node_modules/css-loader/dist/runtime/api.js",
"loc": "2:34-94"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}"
}
],
"filteredModules": 0,
"logging": {
"webpack.buildChunkGraph.visitModules": {
"entries": [],
"filteredEntries": 2,
"debug": false
}
},
"children": [],
"name": "mini-css-extract-plugin node_modules/css-loader/dist/cjs.js?url=false!node_modules/media-query-plugin/src/loader.js!node_modules/postcss-loader/src/index.js??postcss!node_modules/sass-loader/dist/cjs.js??ref--4-4!src/scss/style.scss"
},
{
"errors": [],
"warnings": [],
"publicPath": "",
"outputPath": "E:\\projects\\TWEB\\tweb\\public",
"assetsByChunkName": {},
"assets": [],
"filteredAssets": 0,
"entrypoints": {
"mini-css-extract-plugin": {
"chunks": [
0
],
"assets": [
"*"
],
"children": {},
"childAssets": {}
}
},
"namedChunkGroups": {
"mini-css-extract-plugin": {
"chunks": [
0
],
"assets": [
"*"
],
"children": {},
"childAssets": {}
}
},
"chunks": [
{
"id": 0,
"rendered": true,
"initial": true,
"entry": true,
"size": 8076,
"names": [
"mini-css-extract-plugin"
],
"files": [
"*"
],
"hash": "c6cfc03a91aa7e4c732e",
"siblings": [],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"index": 0,
"index2": 1,
"size": 5559,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 198,
"building": 3149
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"loc": "mini-css-extract-plugin"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"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, \"@font-face{font-family:\\\"tgico\\\";src:url(\\\"assets/fonts/tgico.eot?owpifk\\\");src:url(\\\"assets/fonts/tgico.eot?owpifk#iefix\\\") format(\\\"embedded-opentype\\\"),url(\\\"assets/fonts/tgico.ttf?owpifk\\\") format(\\\"truetype\\\"),url(\\\"assets/fonts/tgico.woff?owpifk\\\") format(\\\"woff\\\"),url(\\\"assets/fonts/tgico.svg?owpifk#tgico\\\") 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-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tgico-check:before{content:\\\"\\\"}.tgico-checks:before{content:\\\"\\\"}.tgico-activesessions:before{content:\\\"\\\\e902\\\"}.tgico-add:before{content:\\\"\\\\e903\\\"}.tgico-addmember_filled:before{content:\\\"\\\\e904\\\"}.tgico-adduser:before{content:\\\"\\\\e905\\\"}.tgico-admin:before{content:\\\"\\\\e906\\\"}.tgico-animals:before{content:\\\"\\\\e907\\\"}.tgico-archive:before{content:\\\"\\\"}.tgico-attach:before{content:\\\"\\\\e909\\\"}.tgico-avatar_archivedchats:before{content:\\\"\\\\e90a\\\"}.tgico-avatar_deletedaccount:before{content:\\\"\\\\e90b\\\"}.tgico-avatar_savedmessages:before{content:\\\"\\\\e90c\\\"}.tgico-back:before{content:\\\"\\\\e90d\\\"}.tgico-bots:before{content:\\\"\\\\e90e\\\"}.tgico-calendar:before{content:\\\"\\\\e90f\\\"}.tgico-camera:before{content:\\\"\\\\e910\\\"}.tgico-cameraadd:before{content:\\\"\\\\e911\\\"}.tgico-car:before{content:\\\"\\\\e912\\\"}.tgico-channel:before{content:\\\"\\\\e913\\\"}.tgico-channelviews:before{content:\\\"\\\\e914\\\"}.tgico-chatsplaceholder:before{content:\\\"\\\\e915\\\"}.tgico-check1:before{content:\\\"\\\\e916\\\"}.tgico-checkbox:before{content:\\\"\\\\e917\\\"}.tgico-checkboxblock:before{content:\\\"\\\\e918\\\"}.tgico-checkboxempty:before{content:\\\"\\\\e919\\\"}.tgico-checkboxon:before{content:\\\"\\\\e91a\\\"}.tgico-close:before{content:\\\"\\\"}.tgico-clouddownload:before{content:\\\"\\\\e91c\\\"}.tgico-colorize:before{content:\\\"\\\\e91d\\\"}.tgico-copy:before{content:\\\"\\\\e91e\\\"}.tgico-data:before{content:\\\"\\\\e91f\\\"}.tgico-delete:before{content:\\\"\\\\e920\\\"}.tgico-delete_filled:before{content:\\\"\\\\e921\\\"}.tgico-deleteleft:before{content:\\\"\\\\e922\\\"}.tgico-deleteuser:before{content:\\\"\\\\e923\\\"}.tgico-document:before{content:\\\"\\\\e924\\\"}.tgico-down:before{content:\\\"\\\\e925\\\"}.tgico-download:before{content:\\\"\\\\e926\\\"}.tgico-eats:before{content:\\\"\\\\e927\\\"}.tgico-edit:before{content:\\\"\\\\e928\\\"}.tgico-eye1:before{content:\\\"\\\\e929\\\"}.tgico-eye2:before{content:\\\"\\\\e92a\\\"}.tgico-favourites:before{content:\\\"\\\\e92b\\\"}.tgico-flag:before{content:\\\"\\\\e92c\\\"}.tgico-folder:before{content:\\\"\\\\e92d\\\"}.tgico-forward:before{content:\\\"\\\\e92e\\\"}.tgico-FullScreen:before{content:\\\"\\\\e92f\\\"}.tgico-gifs:before{content:\\\"\\\\e930\\\"}.tgico-group:before{content:\\\"\\\\e931\\\"}.tgico-help:before{content:\\\"\\\\e932\\\"}.tgico-info:before{content:\\\"\\\\e933\\\"}.tgico-info2:before{content:\\\"\\\\e934\\\"}.tgico-keyboard:before{content:\\\"\\\\e935\\\"}.tgico-lamp:before{content:\\\"\\\\e936\\\"}.tgico-language:before{content:\\\"\\\\e937\\\"}.tgico-largepause:before{content:\\\"\\\\e938\\\"}.tgico-largeplay:before{content:\\\"\\\"}.tgico-livelocation:before{content:\\\"\\\\e93a\\\"}.tgico-location:before{content:\\\"\\\\e93b\\\"}.tgico-lock:before{content:\\\"\\\\e93c\\\"}.tgico-logout:before{content:\\\"\\\\e93d\\\"}.tgico-menu:before{content:\\\"\\\\e93e\\\"}.tgico-message:before{content:\\\"\\\\e93f\\\"}.tgico-microphone:before{content:\\\"\\\\e940\\\"}.tgico-microphone2:before{content:\\\"\\\\e941\\\"}.tgico-minus:before{content:\\\"\\\\e942\\\"}.tgico-more:before{content:\\\"\\\\e943\\\"}.tgico-mute:before{content:\\\"\\\"}.tgico-muted:before{content:\\\"\\\\e945\\\"}.tgico-newchannel:before{content:\\\"\\\\e946\\\"}.tgico-newchat_filled:before{content:\\\"\\\\e947\\\"}.tgico-newgroup:before{content:\\\"\\\\e948\\\"}.tgico-newprivate:before{content:\\\"\\\\e949\\\"}.tgico-next:before{content:\\\"\\\"}.tgico-noncontacts:before{content:\\\"\\\\e94b\\\"}.tgico-nosound:before{content:\\\"\\\\e94c\\\"}.tgico-pause:before{content:\\\"\\\\e94d\\\"}.tgico-permissions:before{content:\\\"\\\\e94e\\\"}.tgico-phone:before{content:\\\"\\\\e94f\\\"}.tgico-photo:before{content:\\\"\\\\e950\\\"}.tgico-pin:before{content:\\\"\\\"}.tgico-pinnedchat:before{content:\\\"\\\\e952\\\"}.tgico-play:before{content:\\\"\\\\e953\\\"}.tgico-poll:before{content:\\\"\\\\e954\\\"}.tgico-radiooff:before{content:\\\"\\\\e955\\\"}.tgico-radioon:before{content:\\\"\\\\e956\\\"}.tgico-readchats:before{content:\\\"\\\"}.tgico-recent:before{content:\\\"\\\\e958\\\"}.tgico-reply:before{content:\\\"\\\\e959\\\"}.tgico-revote:before{content:\\\"\\\\e95a\\\"}.tgico-savedmessages:before{content:\\\"\\\\e95b\\\"}.tgico-search:before{content:\\\"\\\\e95c\\\"}.tgico-send:before{content:\\\"\\\\e95d\\\"}.tgico-send2:before{content:\\\"\\\\e95e\\\"}.tgico-sending:before{content:\\\"\\\"}.tgico-sendingerror:before{content:\\\"\\\\e960\\\"}.tgico-settings:before{content:\\\"\\\\e961\\\"}.tgico-smallscreen:before{content:\\\"\\\\e962\\\"}.tgico-smile:before{content:\\\"\\\\e963\\\"}.tgico-sport:before{content:\\\"\\\\e964\\\"}.tgico-stickers:before{content:\\\"\\\\e965\\\"}.tgico-stop:before{content:\\\"\\\\e966\\\"}.tgico-tip:before{content:\\\"\\\\e967\\\"}.tgico-unarchive:before{content:\\\"\\\"}.tgico-unlock:before{content:\\\"\\\\e969\\\"}.tgico-unmute:before{content:\\\"\\\"}.tgico-unpin:before{content:\\\"\\\"}.tgico-unread:before{content:\\\"\\\"}.tgico-up:before{content:\\\"\\\\e96d\\\"}.tgico-user:before{content:\\\"\\\\e96e\\\"}.tgico-username:before{content:\\\"\\\\e96f\\\"}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\runtime\\api.js",
"name": "./node_modules/css-loader/dist/runtime/api.js",
"index": 1,
"index2": 0,
"size": 2517,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"issuerId": 0,
"issuerName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"issuerPath": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"profile": {
"factory": 198,
"building": 3149
}
}
],
"profile": {
"factory": 402,
"building": 805
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"module": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"moduleName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"type": "cjs require",
"userRequest": "../../node_modules/css-loader/dist/runtime/api.js",
"loc": "2:34-94"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}"
}
],
"filteredModules": 0,
"origins": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "mini-css-extract-plugin",
"request": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"reasons": []
}
]
}
],
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"index": 0,
"index2": 1,
"size": 5559,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 198,
"building": 3149
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "!!E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"loc": "mini-css-extract-plugin"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 0,
"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, \"@font-face{font-family:\\\"tgico\\\";src:url(\\\"assets/fonts/tgico.eot?owpifk\\\");src:url(\\\"assets/fonts/tgico.eot?owpifk#iefix\\\") format(\\\"embedded-opentype\\\"),url(\\\"assets/fonts/tgico.ttf?owpifk\\\") format(\\\"truetype\\\"),url(\\\"assets/fonts/tgico.woff?owpifk\\\") format(\\\"woff\\\"),url(\\\"assets/fonts/tgico.svg?owpifk#tgico\\\") 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-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tgico-check:before{content:\\\"\\\"}.tgico-checks:before{content:\\\"\\\"}.tgico-activesessions:before{content:\\\"\\\\e902\\\"}.tgico-add:before{content:\\\"\\\\e903\\\"}.tgico-addmember_filled:before{content:\\\"\\\\e904\\\"}.tgico-adduser:before{content:\\\"\\\\e905\\\"}.tgico-admin:before{content:\\\"\\\\e906\\\"}.tgico-animals:before{content:\\\"\\\\e907\\\"}.tgico-archive:before{content:\\\"\\\"}.tgico-attach:before{content:\\\"\\\\e909\\\"}.tgico-avatar_archivedchats:before{content:\\\"\\\\e90a\\\"}.tgico-avatar_deletedaccount:before{content:\\\"\\\\e90b\\\"}.tgico-avatar_savedmessages:before{content:\\\"\\\\e90c\\\"}.tgico-back:before{content:\\\"\\\\e90d\\\"}.tgico-bots:before{content:\\\"\\\\e90e\\\"}.tgico-calendar:before{content:\\\"\\\\e90f\\\"}.tgico-camera:before{content:\\\"\\\\e910\\\"}.tgico-cameraadd:before{content:\\\"\\\\e911\\\"}.tgico-car:before{content:\\\"\\\\e912\\\"}.tgico-channel:before{content:\\\"\\\\e913\\\"}.tgico-channelviews:before{content:\\\"\\\\e914\\\"}.tgico-chatsplaceholder:before{content:\\\"\\\\e915\\\"}.tgico-check1:before{content:\\\"\\\\e916\\\"}.tgico-checkbox:before{content:\\\"\\\\e917\\\"}.tgico-checkboxblock:before{content:\\\"\\\\e918\\\"}.tgico-checkboxempty:before{content:\\\"\\\\e919\\\"}.tgico-checkboxon:before{content:\\\"\\\\e91a\\\"}.tgico-close:before{content:\\\"\\\"}.tgico-clouddownload:before{content:\\\"\\\\e91c\\\"}.tgico-colorize:before{content:\\\"\\\\e91d\\\"}.tgico-copy:before{content:\\\"\\\\e91e\\\"}.tgico-data:before{content:\\\"\\\\e91f\\\"}.tgico-delete:before{content:\\\"\\\\e920\\\"}.tgico-delete_filled:before{content:\\\"\\\\e921\\\"}.tgico-deleteleft:before{content:\\\"\\\\e922\\\"}.tgico-deleteuser:before{content:\\\"\\\\e923\\\"}.tgico-document:before{content:\\\"\\\\e924\\\"}.tgico-down:before{content:\\\"\\\\e925\\\"}.tgico-download:before{content:\\\"\\\\e926\\\"}.tgico-eats:before{content:\\\"\\\\e927\\\"}.tgico-edit:before{content:\\\"\\\\e928\\\"}.tgico-eye1:before{content:\\\"\\\\e929\\\"}.tgico-eye2:before{content:\\\"\\\\e92a\\\"}.tgico-favourites:before{content:\\\"\\\\e92b\\\"}.tgico-flag:before{content:\\\"\\\\e92c\\\"}.tgico-folder:before{content:\\\"\\\\e92d\\\"}.tgico-forward:before{content:\\\"\\\\e92e\\\"}.tgico-FullScreen:before{content:\\\"\\\\e92f\\\"}.tgico-gifs:before{content:\\\"\\\\e930\\\"}.tgico-group:before{content:\\\"\\\\e931\\\"}.tgico-help:before{content:\\\"\\\\e932\\\"}.tgico-info:before{content:\\\"\\\\e933\\\"}.tgico-info2:before{content:\\\"\\\\e934\\\"}.tgico-keyboard:before{content:\\\"\\\\e935\\\"}.tgico-lamp:before{content:\\\"\\\\e936\\\"}.tgico-language:before{content:\\\"\\\\e937\\\"}.tgico-largepause:before{content:\\\"\\\\e938\\\"}.tgico-largeplay:before{content:\\\"\\\"}.tgico-livelocation:before{content:\\\"\\\\e93a\\\"}.tgico-location:before{content:\\\"\\\\e93b\\\"}.tgico-lock:before{content:\\\"\\\\e93c\\\"}.tgico-logout:before{content:\\\"\\\\e93d\\\"}.tgico-menu:before{content:\\\"\\\\e93e\\\"}.tgico-message:before{content:\\\"\\\\e93f\\\"}.tgico-microphone:before{content:\\\"\\\\e940\\\"}.tgico-microphone2:before{content:\\\"\\\\e941\\\"}.tgico-minus:before{content:\\\"\\\\e942\\\"}.tgico-more:before{content:\\\"\\\\e943\\\"}.tgico-mute:before{content:\\\"\\\"}.tgico-muted:before{content:\\\"\\\\e945\\\"}.tgico-newchannel:before{content:\\\"\\\\e946\\\"}.tgico-newchat_filled:before{content:\\\"\\\\e947\\\"}.tgico-newgroup:before{content:\\\"\\\\e948\\\"}.tgico-newprivate:before{content:\\\"\\\\e949\\\"}.tgico-next:before{content:\\\"\\\"}.tgico-noncontacts:before{content:\\\"\\\\e94b\\\"}.tgico-nosound:before{content:\\\"\\\\e94c\\\"}.tgico-pause:before{content:\\\"\\\\e94d\\\"}.tgico-permissions:before{content:\\\"\\\\e94e\\\"}.tgico-phone:before{content:\\\"\\\\e94f\\\"}.tgico-photo:before{content:\\\"\\\\e950\\\"}.tgico-pin:before{content:\\\"\\\"}.tgico-pinnedchat:before{content:\\\"\\\\e952\\\"}.tgico-play:before{content:\\\"\\\\e953\\\"}.tgico-poll:before{content:\\\"\\\\e954\\\"}.tgico-radiooff:before{content:\\\"\\\\e955\\\"}.tgico-radioon:before{content:\\\"\\\\e956\\\"}.tgico-readchats:before{content:\\\"\\\"}.tgico-recent:before{content:\\\"\\\\e958\\\"}.tgico-reply:before{content:\\\"\\\\e959\\\"}.tgico-revote:before{content:\\\"\\\\e95a\\\"}.tgico-savedmessages:before{content:\\\"\\\\e95b\\\"}.tgico-search:before{content:\\\"\\\\e95c\\\"}.tgico-send:before{content:\\\"\\\\e95d\\\"}.tgico-send2:before{content:\\\"\\\\e95e\\\"}.tgico-sending:before{content:\\\"\\\"}.tgico-sendingerror:before{content:\\\"\\\\e960\\\"}.tgico-settings:before{content:\\\"\\\\e961\\\"}.tgico-smallscreen:before{content:\\\"\\\\e962\\\"}.tgico-smile:before{content:\\\"\\\\e963\\\"}.tgico-sport:before{content:\\\"\\\\e964\\\"}.tgico-stickers:before{content:\\\"\\\\e965\\\"}.tgico-stop:before{content:\\\"\\\\e966\\\"}.tgico-tip:before{content:\\\"\\\\e967\\\"}.tgico-unarchive:before{content:\\\"\\\"}.tgico-unlock:before{content:\\\"\\\\e969\\\"}.tgico-unmute:before{content:\\\"\\\"}.tgico-unpin:before{content:\\\"\\\"}.tgico-unread:before{content:\\\"\\\"}.tgico-up:before{content:\\\"\\\\e96d\\\"}.tgico-user:before{content:\\\"\\\\e96e\\\"}.tgico-username:before{content:\\\"\\\\e96f\\\"}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\runtime\\api.js",
"name": "./node_modules/css-loader/dist/runtime/api.js",
"index": 1,
"index2": 0,
"size": 2517,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"issuerId": 0,
"issuerName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"issuerPath": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"name": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"profile": {
"factory": 198,
"building": 3149
}
}
],
"profile": {
"factory": 402,
"building": 805
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\css-loader\\dist\\cjs.js?url=false!E:\\projects\\TWEB\\tweb\\node_modules\\media-query-plugin\\src\\loader.js!E:\\projects\\TWEB\\tweb\\node_modules\\postcss-loader\\src\\index.js??postcss!E:\\projects\\TWEB\\tweb\\node_modules\\sass-loader\\dist\\cjs.js??ref--4-4!E:\\projects\\TWEB\\tweb\\src\\scss\\tgico.scss",
"module": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"moduleName": "./node_modules/css-loader/dist/cjs.js?url=false!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--4-4!./src/scss/tgico.scss",
"type": "cjs require",
"userRequest": "../../node_modules/css-loader/dist/runtime/api.js",
"loc": "2:34-94"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}"
}
],
"filteredModules": 0,
"logging": {
"webpack.buildChunkGraph.visitModules": {
"entries": [],
"filteredEntries": 2,
"debug": false
}
},
"children": [],
"name": "mini-css-extract-plugin node_modules/css-loader/dist/cjs.js?url=false!node_modules/media-query-plugin/src/loader.js!node_modules/postcss-loader/src/index.js??postcss!node_modules/sass-loader/dist/cjs.js??ref--4-4!src/scss/tgico.scss"
},
{
"errors": [],
"warnings": [],
"publicPath": "",
"outputPath": "E:\\projects\\TWEB\\tweb\\public",
"assetsByChunkName": {
"main": "c37a1e067975b1b72c39.worker.js"
},
"assets": [
{
"name": "c37a1e067975b1b72c39.worker.js",
"size": 346961,
"chunks": [
0
],
"chunkNames": [
"main"
],
"info": {
"immutable": true
},
"emitted": true,
"isOverSizeLimit": true
},
{
"name": "c37a1e067975b1b72c39.worker.js.LICENSE.txt",
"size": 221,
"chunks": [],
"chunkNames": [],
"info": {},
"emitted": true
}
],
"filteredAssets": 0,
"entrypoints": {
"main": {
"chunks": [
0
],
"assets": [
"c37a1e067975b1b72c39.worker.js"
],
"children": {},
"childAssets": {}
}
},
"namedChunkGroups": {
"main": {
"chunks": [
0
],
"assets": [
"c37a1e067975b1b72c39.worker.js"
],
"children": {},
"childAssets": {}
}
},
"chunks": [
{
"id": 0,
"rendered": true,
"initial": true,
"entry": true,
"size": 597189,
"names": [
"main"
],
"files": [
"c37a1e067975b1b72c39.worker.js"
],
"hash": "6f5fa85e0ee7a60b18c4",
"siblings": [],
"parents": [],
"children": [],
"childrenByOrder": {},
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"name": "./src/lib/bin_utils.ts",
"index": 4,
"index2": 3,
"size": 12166,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"module": "./src/lib/crypto/cryptoworker.ts",
"moduleName": "./src/lib/crypto/cryptoworker.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "25:20-43"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "17:20-43"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\tl_utils.ts",
"module": "./src/lib/mtproto/tl_utils.ts",
"moduleName": "./src/lib/mtproto/tl_utils.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "13:20-43"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"module": "./src/lib/polyfill.ts",
"moduleName": "./src/lib/polyfill.ts",
"type": "cjs require",
"userRequest": "./bin_utils",
"loc": "4:20-42"
},
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../../bin_utils",
"loc": "7:20-46"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "24:20-43"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\timeManager.ts",
"module": "./src/lib/mtproto/timeManager.ts",
"moduleName": "./src/lib/mtproto/timeManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "8:20-43"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "16:20-43"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "17:20-43"
},
{
"moduleId": 22,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../bin_utils",
"loc": "3:20-43"
},
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../../bin_utils",
"loc": "13:20-46"
},
{
"moduleId": 24,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\intermediate.ts",
"module": "./src/lib/mtproto/transports/intermediate.ts",
"moduleName": "./src/lib/mtproto/transports/intermediate.ts",
"type": "cjs require",
"userRequest": "../../bin_utils",
"loc": "3:20-46"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "18:20-43"
},
{
"moduleId": 27,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\rsaKeysManager.ts",
"module": "./src/lib/mtproto/rsaKeysManager.ts",
"moduleName": "./src/lib/mtproto/rsaKeysManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "17:20-43"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"module": "./src/lib/mtproto/passwordManager.ts",
"moduleName": "./src/lib/mtproto/passwordManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "17:20-43"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 <igor.beatle@gmail.com>\r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.nextRandomInt = exports.addPadding = exports.longFromInts = exports.longToBytes = exports.bytesToWordss = exports.bytesFromWordss = exports.bytesFromWords = exports.longToInts = exports.bufferConcats = exports.bufferConcat = exports.bytesFromArrayBuffer = exports.convertToByteArray = exports.convertToUint8Array = exports.convertToArrayBuffer = exports.bytesToArrayBuffer = exports.bytesFromBigInt = exports.bytesXor = exports.bytesCmp = exports.blobSafeMimeType = exports.blobConstruct = exports.dataUrlToBlob = exports.base64ToBlob = exports.uint6ToBase64 = exports.bytesToBase64 = exports.bytesFromHex = exports.bytesToHex = exports.bigStringInt = exports.bigint = exports.isObject = exports.dT = void 0;\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\n///////////////////////\r\n/////////////\r\n/////////////////////////////////////////////////\r\n///////////////////////////////////////////////////////////////////////////\r\n/////////////////////////////////////////////////////////////////////////////////\r\n/////////////////////////////////////////////////////////////////////////////////////////////\r\n///////////////////////////////////////////////\r\n//////////////////////////////////////////////////////////////////////////\r\n//////////////////////////////////////////////////////////////\r\n////////////////\r\n//////////\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nexports.dT = dT;\r\nfunction isObject(object) {\r\n return typeof (object) === 'object' && object !== null;\r\n}\r\nexports.isObject = isObject;\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 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 nextRandomInt(maxValue) {\r\n return Math.floor(Math.random() * maxValue);\r\n}\r\nexports.nextRandomInt = nextRandomInt;\r\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"index": 16,
"index2": 13,
"size": 4676,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"issuerId": 17,
"issuerName": "./src/lib/mtproto/mtproto.worker.js",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
}
],
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony side effect evaluation",
"userRequest": "../crypto/cryptoworker",
"loc": "3:0-50"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "../crypto/cryptoworker",
"loc": "25:13-25"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "../crypto/cryptoworker",
"loc": "25:47-59"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../crypto/cryptoworker",
"loc": "19:39-72"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "../crypto/cryptoworker",
"loc": "23:39-72"
},
{
"moduleId": 27,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\rsaKeysManager.ts",
"module": "./src/lib/mtproto/rsaKeysManager.ts",
"moduleName": "./src/lib/mtproto/rsaKeysManager.ts",
"type": "cjs require",
"userRequest": "../crypto/cryptoworker",
"loc": "18:39-72"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"module": "./src/lib/mtproto/passwordManager.ts",
"moduleName": "./src/lib/mtproto/passwordManager.ts",
"type": "cjs require",
"userRequest": "../crypto/cryptoworker",
"loc": "18:39-72"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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 crypto_methods_1 = __importDefault(require(\"./crypto_methods\"));\r\nclass CryptoWorker 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 = false;\r\n this.utils = {};\r\n console.log(bin_utils_1.dT(), 'CW constructor');\r\n //////////////////////////\r\n Promise.all([\r\n Promise.resolve().then(() => __importStar(require('./crypto_utils'))).then(utils => {\r\n Object.assign(this.utils, {\r\n 'sha1-hash': utils.sha1HashSync,\r\n 'sha256-hash': utils.sha256HashSync,\r\n 'pbkdf2': utils.hash_pbkdf2,\r\n 'aes-encrypt': utils.aesEncryptSync,\r\n 'aes-decrypt': utils.aesDecryptSync,\r\n 'rsa-encrypt': utils.rsaEncrypt,\r\n 'factorize': utils.pqPrimeFactorization,\r\n 'mod-pow': utils.bytesModPow,\r\n 'unzip': utils.gzipUncompress\r\n });\r\n }) /* ,\r\n \r\n import('../bin_utils').then(utils => {\r\n this.utils.unzip = utils.gzipUncompress;\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 finalizeTask(taskID, result) {\r\n let deferred = this.awaiting[taskID];\r\n if (deferred !== undefined) {\r\n this.debug && console.log(bin_utils_1.dT(), 'CW done', deferred.taskName, result);\r\n deferred.resolve(result);\r\n delete this.awaiting[taskID];\r\n }\r\n }\r\n performTaskWorker(task, ...args) {\r\n this.debug && console.log(bin_utils_1.dT(), 'CW start', task, args);\r\n //////////////////////////\r\n return Promise.resolve(this.utils[task](...args));\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 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}\r\nconst cryptoWorker = new CryptoWorker();\r\n//(window as any).CryptoWorker = cryptoWorker;\r\nexports.default = cryptoWorker;\r\n"
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"name": "./src/lib/storage.ts",
"index": 2,
"index2": 1,
"size": 6346,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"issuerId": 17,
"issuerName": "./src/lib/mtproto/mtproto.worker.js",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
}
],
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "16:34-55"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\timeManager.ts",
"module": "./src/lib/mtproto/timeManager.ts",
"moduleName": "./src/lib/mtproto/timeManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "7:34-55"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony side effect evaluation",
"userRequest": "../storage",
"loc": "2:0-36"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "../storage",
"loc": "19:4-14"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "20:34-55"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"module": "./src/lib/mtproto/mtproto.ts",
"moduleName": "./src/lib/mtproto/mtproto.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "7:34-55"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 = JSON.stringify(value, (key, value) => {\r\n if (key == 'downloaded' || (key == 'url' && value.indexOf('blob:') === 0))\r\n return undefined;\r\n return value;\r\n });\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<Cache>;\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": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto_config.ts",
"name": "./src/lib/mtproto/mtproto_config.ts",
"index": 3,
"index2": 0,
"size": 606,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"issuerId": 2,
"issuerName": "./src/lib/storage.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"name": "./src/lib/storage.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 0,
"building": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"module": "./src/lib/storage.ts",
"moduleName": "./src/lib/storage.ts",
"type": "cjs require",
"userRequest": "./mtproto/mtproto_config",
"loc": "3:25-60"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "21:25-52"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"module": "./src/lib/mtproto/dcConfigurator.ts",
"moduleName": "./src/lib/mtproto/dcConfigurator.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "9:25-52"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "27:25-52"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"module": "./src/lib/mtproto/mtproto.ts",
"moduleName": "./src/lib/mtproto/mtproto.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "8:25-52"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Modes = exports.App = void 0;\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": 4,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\jsbn\\index.js",
"name": "./node_modules/jsbn/index.js",
"index": 5,
"index2": 2,
"size": 42308,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"issuerId": 0,
"issuerName": "./src/lib/bin_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"name": "./src/lib/bin_utils.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 20,
"building": 10
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"module": "./src/lib/bin_utils.ts",
"moduleName": "./src/lib/bin_utils.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "11:15-30"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"module": "./src/lib/polyfill.ts",
"moduleName": "./src/lib/polyfill.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "6:15-30"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "23:15-30"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "22:15-30"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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<<dbits)-1);\n BigInteger.prototype.DV = (1<<dbits);\n\n var BI_FP = 52;\n BigInteger.prototype.FV = Math.pow(2,BI_FP);\n BigInteger.prototype.F1 = BI_FP-dbits;\n BigInteger.prototype.F2 = 2*dbits-BI_FP;\n\n // Digit conversions\n var BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n var BI_RC = new Array();\n var rr,vv;\n rr = \"0\".charCodeAt(0);\n for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;\n rr = \"a\".charCodeAt(0);\n for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n rr = \"A\".charCodeAt(0);\n for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n\n function int2char(n) { return BI_RM.charAt(n); }\n function intAt(s,i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c==null)?-1:c;\n }\n\n // (protected) copy this to r\n function bnpCopyTo(r) {\n for(var i = this.t-1; i >= 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))<<sh;\n this[this.t++] = (x>>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<<sh;\n sh += k;\n if(sh >= 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)<<sh;\n }\n this.clamp();\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) clamp off excess high words\n function bnpClamp() {\n var c = this.s&this.DM;\n while(this.t > 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<<k)-1, d, m = false, r = \"\", i = this.t;\n var p = this.DB-(i*this.DB)%k;\n if(i-- > 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)-1))<<(k-p);\n d |= this[--i]>>(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<<cbs)-1;\n var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;\n for(i = this.t-1; i >= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<<bs;\n }\n for(i = ds-1; i >= 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)-1;\n r[0] = this[ds]>>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<<cbs;\n r[i-ds] = this[i]>>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;\n r.t = this.t-ds;\n r.clamp();\n }\n\n // (protected) r = this - a\n function bnpSubTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]-a[i];\n r[i++] = c&this.DM;\n c >>= 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<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;\n var i = r.t, j = i-ys, t = (q==null)?nbi():q;\n y.dlShiftTo(j,t);\n if(r.compareTo(t) >= 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<<i)) > 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))<<this.DB)|this[0];\n }\n\n // (public) return value as byte\n function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>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<<t)-1); else x[0] = 0;\n this.fromString(x,256);\n }\n }\n\n // (public) convert to bigendian byte array\n function bnToByteArray() {\n var i = this.t, r = new Array();\n r[0] = this.s;\n var p = this.DB-(i*this.DB)%8, d, k = 0;\n if(i-- > 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)-1))<<(8-p);\n d |= this[--i]>>(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<<n)\n function bnpChangeBit(n,op) {\n var r = BigInteger.ONE.shiftLeft(n);\n this.bitwiseTo(r,op,r);\n return r;\n }\n\n // (public) this | (1<<n)\n function bnSetBit(n) { return this.changeBit(n,op_or); }\n\n // (public) this & ~(1<<n)\n function bnClearBit(n) { return this.changeBit(n,op_andnot); }\n\n // (public) this ^ (1<<n)\n function bnFlipBit(n) { return this.changeBit(n,op_xor); }\n\n // (protected) r = this + a\n function bnpAddTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]+a[i];\n r[i++] = c&this.DM;\n c >>= 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<<k)-1;\n g[1] = z.convert(this);\n if(k > 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<<i)) == 0) {\n z.sqrTo(r,r2); t = r; r = r2; r2 = t;\n if(--i < 0) { i = this.DB-1; --j; }\n }\n }\n return z.revert(r);\n }\n\n // (public) gcd(this,a) (HAC 14.54)\n function bnGCD(a) {\n var x = (this.s<0)?this.negate():this.clone();\n var y = (a.s<0)?a.negate():a.clone();\n if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }\n var i = x.getLowestSetBit(), g = y.getLowestSetBit();\n if(g < 0) return x;\n if(i < g) g = i;\n if(g > 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 // <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>\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"
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"name": "./src/lib/mtproto/networkerFactory.ts",
"index": 6,
"index2": 22,
"size": 704,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"issuerId": 17,
"issuerName": "./src/lib/mtproto/mtproto.worker.js",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
}
],
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./networkerFactory",
"loc": "18:43-72"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony side effect evaluation",
"userRequest": "./networkerFactory",
"loc": "4:0-50"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "./networkerFactory",
"loc": "11:0-16"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./networkerFactory",
"loc": "23:43-72"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.NetworkerFactory = void 0;\r\nconst networker_1 = require(\"./networker\");\r\nclass NetworkerFactory {\r\n constructor() {\r\n this.updatesProcessor = null;\r\n }\r\n setUpdatesProcessor(callback) {\r\n this.updatesProcessor = callback;\r\n }\r\n getNetworker(dcID, authKey, authKeyID, serverSalt, options) {\r\n //console.log(dT(), 'NetworkerFactory: creating new instance of MTPNetworker:', dcID, options);\r\n return new networker_1.MTPNetworker(dcID, authKey, authKeyID, serverSalt, options);\r\n }\r\n}\r\nexports.NetworkerFactory = NetworkerFactory;\r\nexports.default = new NetworkerFactory();\r\n"
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"index": 1,
"index2": 27,
"size": 15145,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"issuerId": 17,
"issuerName": "./src/lib/mtproto/mtproto.worker.js",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
}
],
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony side effect evaluation",
"userRequest": "./apiManager",
"loc": "1:0-38"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "./apiManager",
"loc": "31:21-31"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "./apiManager",
"loc": "31:51-61"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"module": "./src/lib/mtproto/passwordManager.ts",
"moduleName": "./src/lib/mtproto/passwordManager.ts",
"type": "cjs require",
"userRequest": "./apiManager",
"loc": "16:37-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"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\nexports.ApiManager = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\r\nconst mtproto_1 = require(\"./mtproto\");\r\nconst authorizer_1 = __importDefault(require(\"./authorizer\"));\r\nconst mtproto_config_1 = require(\"./mtproto_config\");\r\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\r\nconst http_1 = __importDefault(require(\"./transports/http\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst passwordManager_1 = __importDefault(require(\"./passwordManager\"));\r\n///////////////////////\r\n//////////////////////////////////////\r\n//////////\r\n//console.error('apiManager included!');\r\nclass ApiManager {\r\n constructor() {\r\n //MtpSingleInstanceService.start();\r\n this.cachedNetworkers = {};\r\n this.cachedUploadNetworkers = {};\r\n this.cachedExportPromise = {};\r\n this.gettingNetworkers = {};\r\n this.baseDcID = 0;\r\n this.telegramMeNotified = false;\r\n this.log = polyfill_1.logger('API');\r\n /* AppStorage.get<number>('dc').then((dcID) => {\r\n if(dcID) {\r\n this.baseDcID = dcID;\r\n }\r\n }); */\r\n }\r\n telegramMeNotify(newValue) {\r\n if (this.telegramMeNotified !== newValue) {\r\n this.telegramMeNotified = newValue;\r\n mtproto_1.telegramMeWebService.setAuthorized(this.telegramMeNotified);\r\n }\r\n }\r\n // mtpSetUserAuth\r\n setUserAuth(userAuth) {\r\n var fullUserAuth = Object.assign({ dcID: this.baseDcID }, userAuth);\r\n storage_1.default.set({\r\n dc: this.baseDcID,\r\n user_auth: fullUserAuth\r\n });\r\n this.telegramMeNotify(true);\r\n ///////////////////////////\r\n /////////////////////////////////////////////////////\r\n //////////////\r\n }\r\n setBaseDcID(dcID) {\r\n this.baseDcID = dcID;\r\n }\r\n // mtpLogOut\r\n logOut() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let storageKeys = [];\r\n let prefix = mtproto_config_1.Modes.test ? 't_dc' : 'dc';\r\n for (let dcID = 1; dcID <= 5; dcID++) {\r\n storageKeys.push(prefix + dcID + '_auth_key');\r\n //storageKeys.push(prefix + dcID + '_auth_keyID');\r\n }\r\n // WebPushApiManager.forceUnsubscribe(); // WARNING\r\n let storageResult = yield storage_1.default.get(storageKeys);\r\n let logoutPromises = [];\r\n for (let i = 0; i < storageResult.length; i++) {\r\n if (storageResult[i]) {\r\n logoutPromises.push(this.invokeApi('auth.logOut', {}, { dcID: i + 1, ignoreErrors: true }));\r\n }\r\n }\r\n return Promise.all(logoutPromises).then(() => {\r\n storage_1.default.remove('dc', 'user_auth', 'stickerSets');\r\n this.baseDcID = 0;\r\n this.telegramMeNotify(false);\r\n this.mtpClearStorage();\r\n }, (error) => {\r\n storageKeys.push('dc', 'user_auth', 'stickerSets');\r\n storage_1.default.remove(storageKeys);\r\n this.baseDcID = 0;\r\n error.handled = true;\r\n this.telegramMeNotify(false);\r\n this.mtpClearStorage();\r\n }) /* .then(() => {\r\n location.pathname = '/';\r\n }) */;\r\n });\r\n }\r\n mtpClearStorage() {\r\n var saveKeys = ['user_auth', 't_user_auth', 'dc', 't_dc'];\r\n for (var dcID = 1; dcID <= 5; dcID++) {\r\n saveKeys.push('dc' + dcID + '_auth_key');\r\n saveKeys.push('dc' + dcID + '_auth_keyID');\r\n saveKeys.push('dc' + dcID + '_server_salt'); // new\r\n saveKeys.push('t_dc' + dcID + '_auth_key');\r\n saveKeys.push('t_dc' + dcID + '_auth_keyID');\r\n saveKeys.push('t_dc' + dcID + '_server_salt'); // new\r\n }\r\n storage_1.default.noPrefix();\r\n storage_1.default.get(saveKeys).then((values) => {\r\n storage_1.default.clear().then(() => {\r\n var restoreObj = {};\r\n saveKeys.forEach((key, i) => {\r\n var value = values[i];\r\n if (value !== false && value !== undefined) {\r\n restoreObj[key] = value;\r\n }\r\n });\r\n storage_1.default.noPrefix();\r\n return storage_1.default.set(restoreObj);\r\n });\r\n });\r\n }\r\n // mtpGetNetworker\r\n getNetworker(dcID, options = {}) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let upload = (options.fileUpload || options.fileDownload)\r\n && (dcConfigurator_1.default.chooseServer(dcID, true) instanceof http_1.default || mtproto_config_1.Modes.multipleConnections);\r\n let cache = upload ? this.cachedUploadNetworkers : this.cachedNetworkers;\r\n if (!dcID) {\r\n throw new Error('get Networker without dcID');\r\n }\r\n if (cache[dcID] !== undefined) {\r\n return cache[dcID];\r\n }\r\n let getKey = dcID + '-' + +upload;\r\n if (this.gettingNetworkers[getKey]) {\r\n return this.gettingNetworkers[getKey];\r\n }\r\n return this.gettingNetworkers[getKey] = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\r\n var ak = 'dc' + dcID + '_auth_key';\r\n var akID = 'dc' + dcID + '_auth_keyID';\r\n var ss = 'dc' + dcID + '_server_salt';\r\n let result = yield storage_1.default.get([ak, akID, ss]);\r\n let [authKeyHex, authKeyIDHex, serverSaltHex] = result;\r\n if (authKeyHex && !authKeyIDHex && serverSaltHex) {\r\n this.log.warn('Updating to new version (+akID)');\r\n yield storage_1.default.remove(ak, akID, ss);\r\n authKeyHex = serverSaltHex = '';\r\n }\r\n if (authKeyHex && authKeyHex.length == 512) {\r\n if (!serverSaltHex || serverSaltHex.length != 16) {\r\n serverSaltHex = 'AAAAAAAAAAAAAAAA';\r\n }\r\n var authKey = bin_utils_1.bytesFromHex(authKeyHex);\r\n var authKeyID = new Uint8Array(bin_utils_1.bytesFromHex(authKeyIDHex));\r\n var serverSalt = bin_utils_1.bytesFromHex(serverSaltHex);\r\n resolve(cache[dcID] = networkerFactory_1.default.getNetworker(dcID, authKey, authKeyID, serverSalt, options));\r\n }\r\n else\r\n try {\r\n let auth = yield authorizer_1.default.auth(dcID);\r\n let storeObj = {\r\n [ak]: bin_utils_1.bytesToHex(auth.authKey),\r\n [akID]: auth.authKeyID.hex,\r\n [ss]: bin_utils_1.bytesToHex(auth.serverSalt)\r\n };\r\n storage_1.default.set(storeObj);\r\n resolve(cache[dcID] = networkerFactory_1.default.getNetworker(dcID, auth.authKey, auth.authKeyID, auth.serverSalt, options));\r\n }\r\n catch (error) {\r\n this.log('Get networker error', error, error.stack);\r\n reject(error);\r\n }\r\n delete this.gettingNetworkers[getKey];\r\n }));\r\n });\r\n }\r\n // mtpInvokeApi\r\n invokeApi(method, params = {}, options = {}) {\r\n ///////this.log('Invoke api', method, params, options);\r\n return new Promise((resolve, reject) => {\r\n let rejectPromise = (error) => {\r\n if (!error) {\r\n error = { type: 'ERROR_EMPTY' };\r\n }\r\n else if (!bin_utils_1.isObject(error)) {\r\n error = { message: error };\r\n }\r\n reject(error);\r\n if (options.ignoreErrors) {\r\n return;\r\n }\r\n if (error.code == 406) {\r\n error.handled = true;\r\n }\r\n if (!options.noErrorBox) {\r\n error.input = method;\r\n error.stack = stack || (error.originalError && error.originalError.stack) || error.stack || (new Error()).stack;\r\n setTimeout(() => {\r\n if (!error.handled) {\r\n if (error.code == 401) {\r\n this.logOut();\r\n }\r\n else {\r\n // ErrorService.show({error: error}); // WARNING\r\n }\r\n error.handled = true;\r\n }\r\n }, 100);\r\n }\r\n };\r\n var dcID;\r\n var cachedNetworker;\r\n var stack = (new Error()).stack || 'empty stack';\r\n var performRequest = (networker) => {\r\n return (cachedNetworker = networker)\r\n .wrapApiCall(method, params, options)\r\n .then(resolve, (error) => {\r\n this.log.error('Error', error.code, error.type, this.baseDcID, dcID);\r\n if (error.code == 401 && this.baseDcID == dcID) {\r\n storage_1.default.remove('dc', 'user_auth');\r\n this.telegramMeNotify(false);\r\n rejectPromise(error);\r\n }\r\n else if (error.code == 401 && this.baseDcID && dcID != this.baseDcID) {\r\n if (this.cachedExportPromise[dcID] === undefined) {\r\n let promise = new Promise((exportResolve, exportReject) => {\r\n this.invokeApi('auth.exportAuthorization', { dc_id: dcID }, { noErrorBox: true }).then((exportedAuth) => {\r\n this.invokeApi('auth.importAuthorization', {\r\n id: exportedAuth.id,\r\n bytes: exportedAuth.bytes\r\n }, { dcID: dcID, noErrorBox: true }).then(exportResolve, exportReject);\r\n }, exportReject);\r\n });\r\n this.cachedExportPromise[dcID] = promise;\r\n }\r\n this.cachedExportPromise[dcID].then(() => {\r\n (cachedNetworker = networker).wrapApiCall(method, params, options).then(resolve, rejectPromise);\r\n }, rejectPromise);\r\n }\r\n else if (error.code == 303) {\r\n var newDcID = error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_|USER_MIGRATE_)(\\d+)/)[2];\r\n if (newDcID != dcID) {\r\n if (options.dcID) {\r\n options.dcID = newDcID;\r\n }\r\n else {\r\n storage_1.default.set({ dc: this.baseDcID = newDcID });\r\n }\r\n this.getNetworker(newDcID, options).then((networker) => {\r\n networker.wrapApiCall(method, params, options).then(resolve, rejectPromise);\r\n }, rejectPromise);\r\n }\r\n }\r\n else if (!options.rawError && error.code == 420) {\r\n var waitTime = error.type.match(/^FLOOD_WAIT_(\\d+)/)[1] || 10;\r\n if (waitTime > (options.timeout !== undefined ? options.timeout : 60)) {\r\n return rejectPromise(error);\r\n }\r\n setTimeout(() => {\r\n performRequest(cachedNetworker);\r\n }, (waitTime + 5) * 1000); // 03.02.2020\r\n }\r\n else if (!options.rawError && (error.code == 500 || error.type == 'MSG_WAIT_FAILED')) {\r\n var now = Date.now();\r\n if (options.stopTime) {\r\n if (now >= options.stopTime) {\r\n return rejectPromise(error);\r\n }\r\n }\r\n else {\r\n options.stopTime = now + (options.timeout !== undefined ? options.timeout : 10) * 1000;\r\n }\r\n options.waitTime = options.waitTime ? Math.min(60, options.waitTime * 1.5) : 1;\r\n setTimeout(() => {\r\n performRequest(cachedNetworker);\r\n }, options.waitTime * 1000);\r\n }\r\n else {\r\n rejectPromise(error);\r\n }\r\n });\r\n };\r\n if (dcID = (options.dcID || this.baseDcID)) {\r\n this.getNetworker(dcID, options).then(performRequest, rejectPromise);\r\n }\r\n else {\r\n storage_1.default.get('dc').then((baseDcID) => {\r\n this.getNetworker(this.baseDcID = dcID = baseDcID || mtproto_config_1.App.baseDcID, options).then(performRequest, rejectPromise);\r\n });\r\n }\r\n });\r\n }\r\n // mtpGetUserID\r\n getUserID() {\r\n return storage_1.default.get('user_auth').then((auth) => {\r\n this.telegramMeNotify(auth && auth.id > 0 || false);\r\n return auth.id || 0;\r\n });\r\n }\r\n checkPassword(value) {\r\n return passwordManager_1.default.getState()\r\n .then(state => {\r\n console.log(state);\r\n return passwordManager_1.default.check(state, value);\r\n });\r\n }\r\n}\r\nexports.ApiManager = ApiManager;\r\nexports.default = new ApiManager();\r\n"
},
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\tl_utils.ts",
"name": "./src/lib/mtproto/tl_utils.ts",
"index": 8,
"index2": 11,
"size": 25294,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"issuerId": 26,
"issuerName": "./src/lib/mtproto/authorizer.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 26,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"name": "./src/lib/mtproto/authorizer.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 438,
"building": 329,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./tl_utils",
"loc": "18:19-40"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "./tl_utils",
"loc": "16:19-40"
},
{
"moduleId": 27,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "16:19-40"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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 <igor.beatle@gmail.com>\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\nexports.TLSerialization = exports.TLDeserialization = void 0;\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst schema_1 = __importDefault(require(\"./schema\"));\r\n//////////////////////\r\n// @ts-ignore\r\nconst crypto_utils_1 = require(\"../crypto/crypto_utils\");\r\n/////////\r\n/////////////\r\n////////////////////////////////////////////\r\n//////////\r\nconst boolFalse = +schema_1.default.API.constructors.find(c => c.predicate == 'boolFalse').id >>> 0;\r\nconst boolTrue = +schema_1.default.API.constructors.find(c => c.predicate == 'boolTrue').id >>> 0;\r\nconst vector = +schema_1.default.API.constructors.find(c => c.predicate == 'vector').id >>> 0;\r\nconst gzipPacked = +schema_1.default.MTProto.constructors.find(c => c.predicate == 'gzip_packed').id >>> 0;\r\n//console.log('boolFalse', boolFalse == 0xbc799737);\r\nclass TLSerialization {\r\n constructor(options = {}) {\r\n this.maxLength = 2048; // 2Kb\r\n this.offset = 0; // in bytes\r\n this.mtproto = false;\r\n this.debug = false; //Modes.debug;\r\n this.maxLength = options.startMaxLength || 2048; // 2Kb\r\n this.mtproto = options.mtproto || false;\r\n this.createBuffer();\r\n }\r\n createBuffer() {\r\n this.buffer = new ArrayBuffer(this.maxLength);\r\n this.intView = new Int32Array(this.buffer);\r\n this.byteView = new Uint8Array(this.buffer);\r\n }\r\n getArray() {\r\n let resultBuffer = new ArrayBuffer(this.offset);\r\n let resultArray = new Int32Array(resultBuffer);\r\n resultArray.set(this.intView.subarray(0, this.offset / 4));\r\n return resultArray;\r\n }\r\n getBuffer() {\r\n return this.getArray().buffer;\r\n }\r\n getBytes(typed) {\r\n if (typed) {\r\n let resultBuffer = new ArrayBuffer(this.offset);\r\n let resultArray = new Uint8Array(resultBuffer);\r\n resultArray.set(this.byteView.subarray(0, this.offset));\r\n return resultArray;\r\n }\r\n let bytes = [];\r\n for (var i = 0; i < this.offset; i++) {\r\n bytes.push(this.byteView[i]);\r\n }\r\n return bytes;\r\n }\r\n checkLength(needBytes) {\r\n if (this.offset + needBytes < this.maxLength) {\r\n return;\r\n }\r\n ///console.trace('Increase buffer', this.offset, needBytes, this.maxLength);\r\n this.maxLength = Math.ceil(Math.max(this.maxLength * 2, this.offset + needBytes + 16) / 4) * 4;\r\n var previousBuffer = this.buffer;\r\n var previousArray = new Int32Array(previousBuffer);\r\n this.createBuffer();\r\n new Int32Array(this.buffer).set(previousArray);\r\n }\r\n writeInt(i, field) {\r\n this.debug && console.log('>>>', i.toString(16), i, field);\r\n this.checkLength(4);\r\n this.intView[this.offset / 4] = i;\r\n this.offset += 4;\r\n }\r\n storeInt(i, field) {\r\n this.writeInt(i, (field || '') + ':int');\r\n }\r\n storeBool(i, field) {\r\n if (i) {\r\n this.writeInt(boolTrue, (field || '') + ':bool');\r\n }\r\n else {\r\n this.writeInt(boolFalse, (field || '') + ':bool');\r\n }\r\n }\r\n storeLongP(iHigh, iLow, field) {\r\n this.writeInt(iLow, (field || '') + ':long[low]');\r\n this.writeInt(iHigh, (field || '') + ':long[high]');\r\n }\r\n storeLong(sLong, field) {\r\n if (Array.isArray(sLong)) {\r\n if (sLong.length == 2) {\r\n return this.storeLongP(sLong[0], sLong[1], field);\r\n }\r\n else {\r\n return this.storeIntBytes(sLong, 64, field);\r\n }\r\n }\r\n if (typeof sLong != 'string') {\r\n sLong = sLong ? sLong.toString() : '0';\r\n }\r\n var divRem = bin_utils_1.bigStringInt(sLong).divideAndRemainder(bin_utils_1.bigint(0x100000000));\r\n this.writeInt(divRem[1].intValue(), (field || '') + ':long[low]');\r\n this.writeInt(divRem[0].intValue(), (field || '') + ':long[high]');\r\n }\r\n storeDouble(f, field) {\r\n var buffer = new ArrayBuffer(8);\r\n var intView = new Int32Array(buffer);\r\n var doubleView = new Float64Array(buffer);\r\n doubleView[0] = f;\r\n this.writeInt(intView[0], (field || '') + ':double[low]');\r\n this.writeInt(intView[1], (field || '') + ':double[high]');\r\n }\r\n storeString(s, field) {\r\n this.debug && console.log('>>>', s, (field || '') + ':string');\r\n if (s === undefined) {\r\n s = '';\r\n }\r\n var sUTF8 = unescape(encodeURIComponent(s));\r\n this.checkLength(sUTF8.length + 8);\r\n var len = sUTF8.length;\r\n if (len <= 253) {\r\n this.byteView[this.offset++] = len;\r\n }\r\n else {\r\n this.byteView[this.offset++] = 254;\r\n this.byteView[this.offset++] = len & 0xFF;\r\n this.byteView[this.offset++] = (len & 0xFF00) >> 8;\r\n this.byteView[this.offset++] = (len & 0xFF0000) >> 16;\r\n }\r\n for (var i = 0; i < len; i++) {\r\n this.byteView[this.offset++] = sUTF8.charCodeAt(i);\r\n }\r\n // Padding\r\n while (this.offset % 4) {\r\n this.byteView[this.offset++] = 0;\r\n }\r\n }\r\n storeBytes(bytes, field) {\r\n if (bytes instanceof ArrayBuffer) {\r\n bytes = new Uint8Array(bytes);\r\n }\r\n else if (bytes === undefined) {\r\n bytes = [];\r\n }\r\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || '') + ':bytes');\r\n // if uint8array were json.stringified, then will be: {'0': 123, '1': 123}\r\n var len = bytes.byteLength || bytes.length;\r\n this.checkLength(len + 8);\r\n if (len <= 253) {\r\n this.byteView[this.offset++] = len;\r\n }\r\n else {\r\n this.byteView[this.offset++] = 254;\r\n this.byteView[this.offset++] = len & 0xFF;\r\n this.byteView[this.offset++] = (len & 0xFF00) >> 8;\r\n this.byteView[this.offset++] = (len & 0xFF0000) >> 16;\r\n }\r\n this.byteView.set(bytes, this.offset);\r\n this.offset += len;\r\n // Padding\r\n while (this.offset % 4) {\r\n this.byteView[this.offset++] = 0;\r\n }\r\n }\r\n storeIntBytes(bytes, bits, field) {\r\n if (bytes instanceof ArrayBuffer) {\r\n bytes = new Uint8Array(bytes);\r\n }\r\n var len = bytes.length;\r\n if ((bits % 32) || (len * 8) != bits) {\r\n throw new Error('Invalid bits: ' + bits + ', ' + bytes.length);\r\n }\r\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || '') + ':int' + bits);\r\n this.checkLength(len);\r\n this.byteView.set(bytes, this.offset);\r\n this.offset += len;\r\n }\r\n storeRawBytes(bytes, field) {\r\n if (bytes instanceof ArrayBuffer) {\r\n bytes = new Uint8Array(bytes);\r\n }\r\n var len = bytes.length;\r\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || ''));\r\n this.checkLength(len);\r\n this.byteView.set(bytes, this.offset);\r\n this.offset += len;\r\n }\r\n storeMethod(methodName, params) {\r\n var schema = this.mtproto ? schema_1.default.MTProto : schema_1.default.API;\r\n var methodData = false, i;\r\n for (i = 0; i < schema.methods.length; i++) {\r\n if (schema.methods[i].method == methodName) {\r\n methodData = schema.methods[i];\r\n break;\r\n }\r\n }\r\n if (!methodData) {\r\n throw new Error('No method ' + methodName + ' found');\r\n }\r\n this.storeInt(methodData.id, methodName + '[id]');\r\n var param, type;\r\n var i, condType;\r\n var fieldBit;\r\n var len = methodData.params.length;\r\n //console.log('storeMethod', len, methodData);\r\n for (i = 0; i < len; i++) {\r\n param = methodData.params[i];\r\n type = param.type;\r\n if (type.indexOf('?') !== -1) {\r\n condType = type.split('?');\r\n fieldBit = condType[0].split('.');\r\n if (!(params[fieldBit[0]] & (1 << fieldBit[1]))) {\r\n continue;\r\n }\r\n type = condType[1];\r\n }\r\n this.storeObject(params[param.name], type, methodName + '[' + param.name + ']');\r\n }\r\n return methodData.type;\r\n }\r\n storeObject(obj, type, field) {\r\n //console.log('storeObject', obj, type, field, this.offset, this.getBytes(true).hex);\r\n switch (type) {\r\n case '#':\r\n case 'int':\r\n return this.storeInt(obj, field);\r\n case 'long':\r\n return this.storeLong(obj, field);\r\n case 'int128':\r\n return this.storeIntBytes(obj, 128, field);\r\n case 'int256':\r\n return this.storeIntBytes(obj, 256, field);\r\n case 'int512':\r\n return this.storeIntBytes(obj, 512, field);\r\n case 'string':\r\n return this.storeString(obj, field);\r\n case 'bytes':\r\n return this.storeBytes(obj, field);\r\n case 'double':\r\n return this.storeDouble(obj, field);\r\n case 'Bool':\r\n return this.storeBool(obj, field);\r\n case 'true':\r\n return;\r\n }\r\n if (Array.isArray(obj)) {\r\n if (type.substr(0, 6) == 'Vector') {\r\n this.writeInt(vector, field + '[id]');\r\n }\r\n else if (type.substr(0, 6) != 'vector') {\r\n throw new Error('Invalid vector type ' + type);\r\n }\r\n var itemType = type.substr(7, type.length - 8); // for \"Vector<itemType>\"\r\n this.writeInt(obj.length, field + '[count]');\r\n for (var i = 0; i < obj.length; i++) {\r\n this.storeObject(obj[i], itemType, field + '[' + i + ']');\r\n }\r\n return true;\r\n }\r\n else if (type.substr(0, 6).toLowerCase() == 'vector') {\r\n throw new Error('Invalid vector object');\r\n }\r\n if (!bin_utils_1.isObject(obj)) {\r\n throw new Error('Invalid object for type ' + type);\r\n }\r\n var schema = this.mtproto ? schema_1.default.MTProto : schema_1.default.API;\r\n var predicate = obj['_'];\r\n var isBare = false;\r\n var constructorData = false;\r\n if (isBare = (type.charAt(0) == '%')) {\r\n type = type.substr(1);\r\n }\r\n for (i = 0; i < schema.constructors.length; i++) {\r\n if (schema.constructors[i].predicate == predicate) {\r\n constructorData = schema.constructors[i];\r\n break;\r\n }\r\n }\r\n if (!constructorData) {\r\n throw new Error('No predicate ' + predicate + ' found');\r\n }\r\n if (predicate == type) {\r\n isBare = true;\r\n }\r\n if (!isBare) {\r\n this.writeInt(constructorData.id, field + '[' + predicate + '][id]');\r\n }\r\n var param, type;\r\n var condType;\r\n var fieldBit;\r\n var len = constructorData.params.length;\r\n //console.log('storeObject', len, constructorData);\r\n for (i = 0; i < len; i++) {\r\n param = constructorData.params[i];\r\n type = param.type;\r\n //console.log('storeObject', param, type);\r\n if (type.indexOf('?') !== -1) {\r\n condType = type.split('?');\r\n fieldBit = condType[0].split('.');\r\n //console.log('storeObject fieldBit', fieldBit, obj[fieldBit[0]]);\r\n if (!(obj[fieldBit[0]] & (1 << +fieldBit[1]))) {\r\n continue;\r\n }\r\n type = condType[1];\r\n }\r\n //console.log('storeObject', param, type);\r\n this.storeObject(obj[param.name], type, field + '[' + predicate + '][' + param.name + ']');\r\n }\r\n return constructorData.type;\r\n }\r\n}\r\nexports.TLSerialization = TLSerialization;\r\nclass TLDeserialization {\r\n constructor(buffer, options = {}) {\r\n this.offset = 0; // in bytes\r\n // this.debug = \r\n this.mtproto = false;\r\n //buffer = addPadding(buffer, 4, true); // fix 21.01.2020 for wss\r\n if (buffer instanceof ArrayBuffer) {\r\n this.buffer = buffer;\r\n this.byteView = new Uint8Array(this.buffer);\r\n }\r\n else {\r\n this.buffer = buffer.buffer;\r\n this.byteView = buffer;\r\n }\r\n //console.log(\"TCL: TLDeserialization -> constructor -> buffer\", buffer, this.byteView, this.byteView.hex);\r\n /* this.buffer = buffer;\r\n //this.intView = new Uint32Array(this.buffer);\r\n this.byteView = new Uint8Array(this.buffer); */\r\n //console.log(this.intView);\r\n this.override = 'override' in options ? options.override : {};\r\n this.mtproto = 'mtproto' in options ? options.mtproto : false;\r\n this.debug = options.debug !== undefined ? options.debug : /* Modes.debug */ false;\r\n }\r\n readInt(field) {\r\n //if(this.offset >= this.intView.length * 4) {\r\n if ((this.byteView.length - this.offset) < 4) {\r\n console.error(this.byteView, this.offset);\r\n throw new Error('Nothing to fetch: ' + field);\r\n }\r\n //var i = this.intView[this.offset / 4];\r\n let i = new Uint32Array(this.byteView.buffer.slice(this.offset, this.offset + 4))[0];\r\n this.debug /* || field.includes('[dialog][read_outbox_max_id]') */\r\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);\r\n this.offset += 4;\r\n return i;\r\n }\r\n fetchInt(field) {\r\n return this.readInt((field || '') + ':int');\r\n }\r\n fetchDouble(field) {\r\n var buffer = new ArrayBuffer(8);\r\n var intView = new Int32Array(buffer);\r\n var doubleView = new Float64Array(buffer);\r\n intView[0] = this.readInt((field || '') + ':double[low]'),\r\n intView[1] = this.readInt((field || '') + ':double[high]');\r\n return doubleView[0];\r\n }\r\n fetchLong(field) {\r\n var iLow = this.readInt((field || '') + ':long[low]');\r\n var iHigh = this.readInt((field || '') + ':long[high]');\r\n var longDec = bin_utils_1.bigint(iHigh).shiftLeft(32).add(bin_utils_1.bigint(iLow)).toString();\r\n return longDec;\r\n }\r\n fetchBool(field) {\r\n var i = this.readInt((field || '') + ':bool');\r\n if (i == boolTrue) {\r\n return true;\r\n }\r\n else if (i == boolFalse) {\r\n return false;\r\n }\r\n this.offset -= 4;\r\n return this.fetchObject('Object', field);\r\n }\r\n fetchString(field) {\r\n var len = this.byteView[this.offset++];\r\n if (len == 254) {\r\n var len = this.byteView[this.offset++] |\r\n (this.byteView[this.offset++] << 8) |\r\n (this.byteView[this.offset++] << 16);\r\n }\r\n var sUTF8 = '';\r\n for (var i = 0; i < len; i++) {\r\n sUTF8 += String.fromCharCode(this.byteView[this.offset++]);\r\n }\r\n // Padding\r\n while (this.offset % 4) {\r\n this.offset++;\r\n }\r\n try {\r\n var s = decodeURIComponent(escape(sUTF8));\r\n }\r\n catch (e) {\r\n var s = sUTF8;\r\n }\r\n this.debug && console.log('<<<', s, (field || '') + ':string');\r\n return s;\r\n }\r\n fetchBytes(field) {\r\n var len = this.byteView[this.offset++];\r\n if (len == 254) {\r\n len = this.byteView[this.offset++] |\r\n (this.byteView[this.offset++] << 8) |\r\n (this.byteView[this.offset++] << 16);\r\n }\r\n var bytes = this.byteView.subarray(this.offset, this.offset + len);\r\n this.offset += len;\r\n // Padding\r\n while (this.offset % 4) {\r\n this.offset++;\r\n }\r\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || '') + ':bytes');\r\n return bytes;\r\n }\r\n fetchIntBytes(bits, typed, field) {\r\n if (bits % 32) {\r\n throw new Error('Invalid bits: ' + bits);\r\n }\r\n var len = bits / 8;\r\n if (typed) {\r\n var result = this.byteView.subarray(this.offset, this.offset + len);\r\n this.offset += len;\r\n return result;\r\n }\r\n var bytes = [];\r\n for (var i = 0; i < len; i++) {\r\n bytes.push(this.byteView[this.offset++]);\r\n }\r\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || '') + ':int' + bits);\r\n return bytes;\r\n }\r\n fetchRawBytes(len, typed, field) {\r\n if (len === false) {\r\n len = this.readInt((field || '') + '_length');\r\n if (len > this.byteView.byteLength) {\r\n throw new Error('Invalid raw bytes length: ' + len + ', buffer len: ' + this.byteView.byteLength);\r\n }\r\n }\r\n if (typed) {\r\n let bytes = new Uint8Array(len);\r\n bytes.set(this.byteView.subarray(this.offset, this.offset + len));\r\n this.offset += len;\r\n return bytes;\r\n }\r\n var bytes = [];\r\n for (var i = 0; i < len; i++) {\r\n bytes.push(this.byteView[this.offset++]);\r\n }\r\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || ''));\r\n return bytes;\r\n }\r\n fetchObject(type, field) {\r\n switch (type) {\r\n case '#':\r\n case 'int':\r\n return this.fetchInt(field);\r\n case 'long':\r\n return this.fetchLong(field);\r\n case 'int128':\r\n return this.fetchIntBytes(128, false, field);\r\n case 'int256':\r\n return this.fetchIntBytes(256, false, field);\r\n case 'int512':\r\n return this.fetchIntBytes(512, false, field);\r\n case 'string':\r\n return this.fetchString(field);\r\n case 'bytes':\r\n return this.fetchBytes(field);\r\n case 'double':\r\n return this.fetchDouble(field);\r\n case 'Bool':\r\n return this.fetchBool(field);\r\n case 'true':\r\n return true;\r\n }\r\n field = field || type || 'Object';\r\n if (type.substr(0, 6) == 'Vector' || type.substr(0, 6) == 'vector') {\r\n if (type.charAt(0) == 'V') {\r\n var constructor = this.readInt(field + '[id]');\r\n var constructorCmp = constructor;\r\n if (constructorCmp == gzipPacked) { // Gzip packed\r\n var compressed = this.fetchBytes(field + '[packed_string]');\r\n var uncompressed = crypto_utils_1.gzipUncompress(compressed);\r\n var newDeserializer = new TLDeserialization(uncompressed);\r\n return newDeserializer.fetchObject(type, field);\r\n }\r\n if (constructorCmp != vector) {\r\n throw new Error('Invalid vector constructor ' + constructor);\r\n }\r\n }\r\n var len = this.readInt(field + '[count]');\r\n var result = [];\r\n if (len > 0) {\r\n var itemType = type.substr(7, type.length - 8); // for \"Vector<itemType>\"\r\n for (var i = 0; i < len; i++) {\r\n result.push(this.fetchObject(itemType, field + '[' + i + ']'));\r\n }\r\n }\r\n return result;\r\n }\r\n var schema = this.mtproto ? schema_1.default.MTProto : schema_1.default.API;\r\n var predicate = false;\r\n var constructorData = false;\r\n if (type.charAt(0) == '%') {\r\n var checkType = type.substr(1);\r\n for (var i = 0; i < schema.constructors.length; i++) {\r\n if (schema.constructors[i].type == checkType) {\r\n constructorData = schema.constructors[i];\r\n break;\r\n }\r\n }\r\n if (!constructorData) {\r\n throw new Error('Constructor not found for type: ' + type);\r\n }\r\n }\r\n else if (type.charAt(0) >= 97 && type.charAt(0) <= 122) {\r\n for (var i = 0; i < schema.constructors.length; i++) {\r\n if (schema.constructors[i].predicate == type) {\r\n constructorData = schema.constructors[i];\r\n break;\r\n }\r\n }\r\n if (!constructorData) {\r\n throw new Error('Constructor not found for predicate: ' + type);\r\n }\r\n }\r\n else {\r\n var constructor = this.readInt(field + '[id]');\r\n var constructorCmp = constructor;\r\n if (constructorCmp == gzipPacked) { // Gzip packed\r\n var compressed = this.fetchBytes(field + '[packed_string]');\r\n var uncompressed = crypto_utils_1.gzipUncompress(compressed);\r\n var newDeserializer = new TLDeserialization(uncompressed);\r\n return newDeserializer.fetchObject(type, field);\r\n }\r\n var index = schema.constructorsIndex;\r\n if (!index) {\r\n schema.constructorsIndex = index = {};\r\n for (var i = 0; i < schema.constructors.length; i++) {\r\n index[schema.constructors[i].id] = i;\r\n }\r\n }\r\n var i = index[constructorCmp];\r\n if (i) {\r\n constructorData = schema.constructors[i];\r\n }\r\n var fallback = false;\r\n if (!constructorData && this.mtproto) {\r\n var schemaFallback = schema_1.default.API;\r\n for (i = 0; i < schemaFallback.constructors.length; i++) {\r\n if (+schemaFallback.constructors[i].id == constructorCmp) {\r\n constructorData = schemaFallback.constructors[i];\r\n delete this.mtproto;\r\n fallback = true;\r\n break;\r\n }\r\n }\r\n }\r\n if (!constructorData) {\r\n throw new Error('Constructor not found: ' + constructor + ' ' + this.fetchInt() + ' ' + this.fetchInt() + ' ' + field);\r\n }\r\n }\r\n predicate = constructorData.predicate;\r\n var result = { '_': predicate };\r\n var overrideKey = (this.mtproto ? 'mt_' : '') + predicate;\r\n var self = this;\r\n if (this.override[overrideKey]) {\r\n this.override[overrideKey].apply(this, [result, field + '[' + predicate + ']']);\r\n }\r\n else {\r\n var i, param;\r\n var type, isCond;\r\n var condType, fieldBit;\r\n var value;\r\n var len = constructorData.params.length;\r\n for (i = 0; i < len; i++) {\r\n param = constructorData.params[i];\r\n type = param.type;\r\n if (type == '#' && result.pFlags === undefined) {\r\n result.pFlags = {};\r\n }\r\n if (isCond = (type.indexOf('?') !== -1)) {\r\n condType = type.split('?');\r\n fieldBit = condType[0].split('.');\r\n if (!(result[fieldBit[0]] & (1 << fieldBit[1]))) {\r\n //console.log('fetchObject bad', constructorData, result[fieldBit[0]], fieldBit);\r\n continue;\r\n }\r\n //console.log('fetchObject good', constructorData, result[fieldBit[0]], fieldBit);\r\n type = condType[1];\r\n }\r\n value = self.fetchObject(type, field + '[' + predicate + '][' + param.name + ']');\r\n if (isCond && type === 'true') {\r\n result.pFlags[param.name] = value;\r\n }\r\n else {\r\n /* if(param.name == 'read_outbox_max_id') {\r\n console.log(result, param.name, value, field + '[' + predicate + '][' + param.name + ']');\r\n } */\r\n result[param.name] = value;\r\n }\r\n }\r\n }\r\n if (fallback) {\r\n this.mtproto = true;\r\n }\r\n return result;\r\n }\r\n getOffset() {\r\n return this.offset;\r\n }\r\n fetchEnd() {\r\n if (this.offset != this.byteView.length) {\r\n throw new Error('Fetch end with non-empty buffer');\r\n }\r\n return true;\r\n }\r\n}\r\nexports.TLDeserialization = TLDeserialization;\r\n"
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"name": "./src/lib/mtproto/dcConfigurator.ts",
"index": 19,
"index2": 20,
"size": 3145,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./dcConfigurator",
"loc": "22:41-68"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./dcConfigurator",
"loc": "24:41-68"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "./dcConfigurator",
"loc": "17:41-68"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.DcConfigurator = void 0;\r\nconst websocket_1 = __importDefault(require(\"./transports/websocket\"));\r\nconst http_1 = __importDefault(require(\"./transports/http\"));\r\nconst mtproto_config_1 = require(\"./mtproto_config\");\r\nclass DcConfigurator {\r\n constructor() {\r\n this.sslSubdomains = ['pluto', 'venus', 'aurora', 'vesta', 'flora'];\r\n this.dcOptions = mtproto_config_1.Modes.test\r\n ? [\r\n { id: 1, host: '149.154.175.10', port: 80 },\r\n { id: 2, host: '149.154.167.40', port: 80 },\r\n { id: 3, host: '149.154.175.117', port: 80 }\r\n ]\r\n : [\r\n { id: 1, host: '149.154.175.50', port: 80 },\r\n { id: 2, host: '149.154.167.50', port: 80 },\r\n { id: 3, host: '149.154.175.100', port: 80 },\r\n { id: 4, host: '149.154.167.91', port: 80 },\r\n { id: 5, host: '149.154.171.5', port: 80 }\r\n ];\r\n this.chosenServers = {\r\n websocket: {},\r\n https: {},\r\n http: {}\r\n };\r\n this.chosenUploadServers = {\r\n websocket: {},\r\n https: {},\r\n http: {}\r\n };\r\n }\r\n chooseServer(dcID, upload, transport = 'websocket') {\r\n let servers = upload && (transport != 'websocket' || mtproto_config_1.Modes.multipleConnections)\r\n ? this.chosenUploadServers[transport]\r\n : this.chosenServers[transport];\r\n if (!(dcID in servers)) {\r\n let chosenServer = '';\r\n if (transport == 'websocket') {\r\n let subdomain = this.sslSubdomains[dcID - 1];\r\n let path = mtproto_config_1.Modes.test ? 'apiws_test' : 'apiws';\r\n chosenServer = 'wss://' + subdomain + '.web.telegram.org/' + path;\r\n return servers[dcID] = new websocket_1.default(dcID, chosenServer);\r\n }\r\n if (mtproto_config_1.Modes.ssl || !mtproto_config_1.Modes.http || transport == 'https') {\r\n let subdomain = this.sslSubdomains[dcID - 1] + (upload ? '-1' : '');\r\n let path = mtproto_config_1.Modes.test ? 'apiw_test1' : 'apiw1';\r\n chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path;\r\n return servers[dcID] = new http_1.default(dcID, chosenServer);\r\n }\r\n for (let dcOption of this.dcOptions) {\r\n if (dcOption.id == dcID) {\r\n chosenServer = 'http://' + dcOption.host + (dcOption.port != 80 ? ':' + dcOption.port : '') + '/apiw1';\r\n return servers[dcID] = new http_1.default(dcID, chosenServer);\r\n }\r\n }\r\n console.error('No chosenServer!', dcID);\r\n return null;\r\n }\r\n return servers[dcID];\r\n }\r\n}\r\nexports.DcConfigurator = DcConfigurator;\r\nexports.default = new DcConfigurator();\r\n"
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"name": "./src/lib/polyfill.ts",
"index": 23,
"index2": 17,
"size": 3188,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "24:19-41"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "26:19-41"
},
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../../polyfill",
"loc": "12:19-44"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.deferredPromise = exports.logger = exports.secureRandom = void 0;\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\nUint8Array.prototype.toJSON = function () {\r\n return [...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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\http.ts",
"name": "./src/lib/mtproto/transports/http.ts",
"index": 24,
"index2": 19,
"size": 1204,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "23:31-59"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"module": "./src/lib/mtproto/dcConfigurator.ts",
"moduleName": "./src/lib/mtproto/dcConfigurator.ts",
"type": "cjs require",
"userRequest": "./transports/http",
"loc": "8:31-59"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./transports/http",
"loc": "25:31-59"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 transport_1 = __importDefault(require(\"./transport\"));\r\nconst bin_utils_1 = require(\"../../bin_utils\");\r\nclass HTTP extends transport_1.default {\r\n constructor(dcID, url) {\r\n super(dcID, url);\r\n this.send = (data) => {\r\n return fetch(this.url, { method: 'POST', body: data }).then(response => {\r\n //console.log('http response', response/* , response.arrayBuffer() */);\r\n if (response.status != 200) {\r\n response.arrayBuffer().then(buffer => {\r\n console.log('not 200', new TextDecoder(\"utf-8\").decode(new Uint8Array(bin_utils_1.bytesFromArrayBuffer(buffer))));\r\n });\r\n throw response;\r\n }\r\n return response.arrayBuffer().then(buffer => {\r\n return new Uint8Array(bin_utils_1.bytesFromArrayBuffer(buffer));\r\n });\r\n });\r\n };\r\n }\r\n}\r\nexports.default = HTTP;\r\n"
},
{
"id": 11,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\schema.ts",
"name": "./src/lib/mtproto/schema.ts",
"index": 9,
"index2": 4,
"size": 258381,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"issuerId": 18,
"issuerName": "./src/lib/mtproto/networker.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"name": "./src/lib/mtproto/networkerFactory.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 18,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"name": "./src/lib/mtproto/networker.ts",
"profile": {
"factory": 12,
"building": 482,
"dependencies": 9
}
}
],
"profile": {
"factory": 13,
"building": 504
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\tl_utils.ts",
"module": "./src/lib/mtproto/tl_utils.ts",
"moduleName": "./src/lib/mtproto/tl_utils.ts",
"type": "cjs require",
"userRequest": "./schema",
"loc": "14:33-52"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./schema",
"loc": "21:33-52"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.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<long>\" }], \"type\": \"ResPQ\" }, { \"id\": 2211011308, \"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\": 2851430293, \"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\": 3504867164, \"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\": 3045658042, \"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\": 2795351554, \"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\": 4082920705, \"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\": 3447252358, \"predicate\": \"rpc_answer_dropped_running\", \"params\": [], \"type\": \"RpcDropAnswer\" }, { \"id\": 2755319991, \"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\": 2924480661, \"predicate\": \"future_salts\", \"params\": [{ \"name\": \"req_msg_id\", \"type\": \"long\" }, { \"name\": \"now\", \"type\": \"int\" }, { \"name\": \"salts\", \"type\": \"vector<future_salt>\" }], \"type\": \"FutureSalts\" }, { \"id\": \"880243653\", \"predicate\": \"pong\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"long\" }, { \"name\": \"ping_id\", \"type\": \"long\" }], \"type\": \"Pong\" }, { \"id\": 2663516424, \"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\": 3764405938, \"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<long>\" }], \"type\": \"MsgsAck\" }, { \"id\": 2817521681, \"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\": 3987424379, \"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<long>\" }], \"type\": \"MsgResendReq\" }, { \"id\": 2249243371, \"predicate\": \"msg_resend_ans_req\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector<long>\" }], \"type\": \"MsgResendReq\" }, { \"id\": 3664378706, \"predicate\": \"msgs_state_req\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector<long>\" }], \"type\": \"MsgsStateReq\" }, { \"id\": \"81704317\", \"predicate\": \"msgs_state_info\", \"params\": [{ \"name\": \"req_msg_id\", \"type\": \"long\" }, { \"name\": \"info\", \"type\": \"bytes\" }], \"type\": \"MsgsStateInfo\" }, { \"id\": 2361446705, \"predicate\": \"msgs_all_info\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector<long>\" }, { \"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\": 2157819615, \"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\": 4133544404, \"predicate\": \"destroy_auth_key_ok\", \"params\": [], \"type\": \"DestroyAuthKeyRes\" }, { \"id\": \"178201177\", \"predicate\": \"destroy_auth_key_none\", \"params\": [], \"type\": \"DestroyAuthKeyRes\" }, { \"id\": 3926956819, \"predicate\": \"destroy_auth_key_fail\", \"params\": [], \"type\": \"DestroyAuthKeyRes\" }, { \"id\": 3793765884, \"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\": 3195965169, \"method\": \"req_pq_multi\", \"params\": [{ \"name\": \"nonce\", \"type\": \"int128\" }], \"type\": \"ResPQ\" }, { \"id\": 3608339646, \"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\": 4110704415, \"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\": 3105996036, \"method\": \"get_future_salts\", \"params\": [{ \"name\": \"num\", \"type\": \"int\" }], \"type\": \"FutureSalts\" }, { \"id\": \"2059302892\", \"method\": \"ping\", \"params\": [{ \"name\": \"ping_id\", \"type\": \"long\" }], \"type\": \"Pong\" }, { \"id\": 4081220492, \"method\": \"ping_delay_disconnect\", \"params\": [{ \"name\": \"ping_id\", \"type\": \"long\" }, { \"name\": \"disconnect_delay\", \"type\": \"int\" }], \"type\": \"Pong\" }, { \"id\": 2459514271, \"method\": \"http_wait\", \"params\": [{ \"name\": \"max_delay\", \"type\": \"int\" }, { \"name\": \"wait_after\", \"type\": \"int\" }, { \"name\": \"max_wait\", \"type\": \"int\" }], \"type\": \"HttpWait\" }, { \"id\": 3510849888, \"method\": \"destroy_auth_key\", \"params\": [], \"type\": \"DestroyAuthKeyRes\" }, { \"id\": 3880853798, \"method\": \"destroy_session\", \"params\": [{ \"name\": \"session_id\", \"type\": \"long\" }], \"type\": \"DestroySessionRes\" }] }, \"API\": { \"constructors\": [{ \"id\": 3162085175, \"predicate\": \"boolFalse\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 2574415285, \"predicate\": \"boolTrue\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 1072550713, \"predicate\": \"true\", \"params\": [], \"type\": \"True\" }, { \"id\": 481674261, \"predicate\": \"vector\", \"params\": [], \"type\": \"Vector t\" }, { \"id\": 3300522427, \"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\": 2072935910, \"predicate\": \"inputPeerUser\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputPeer\" }, { \"id\": 548253432, \"predicate\": \"inputPeerChannel\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputPeer\" }, { \"id\": 398123750, \"predicate\": \"inputPeerUserFromMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"InputPeer\" }, { \"id\": 2627073979, \"predicate\": \"inputPeerChannelFromMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"channel_id\", \"type\": \"int\" }], \"type\": \"InputPeer\" }, { \"id\": 3112732367, \"predicate\": \"inputUserEmpty\", \"params\": [], \"type\": \"InputUser\" }, { \"id\": 4156666175, \"predicate\": \"inputUserSelf\", \"params\": [], \"type\": \"InputUser\" }, { \"id\": 3626575894, \"predicate\": \"inputUser\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputUser\" }, { \"id\": 756118935, \"predicate\": \"inputUserFromMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"InputUser\" }, { \"id\": 4086478836, \"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\": 4113560191, \"predicate\": \"inputFile\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"parts\", \"type\": \"int\" }, { \"name\": \"name\", \"type\": \"string\" }, { \"name\": \"md5_checksum\", \"type\": \"string\" }], \"type\": \"InputFile\" }, { \"id\": 4199484341, \"predicate\": \"inputFileBig\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"parts\", \"type\": \"int\" }, { \"name\": \"name\", \"type\": \"string\" }], \"type\": \"InputFile\" }, { \"id\": 2523198847, \"predicate\": \"inputMediaEmpty\", \"params\": [], \"type\": \"InputMedia\" }, { \"id\": 505969924, \"predicate\": \"inputMediaUploadedPhoto\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"file\", \"type\": \"InputFile\" }, { \"name\": \"stickers\", \"type\": \"flags.0?Vector<InputDocument>\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.1?int\" }], \"type\": \"InputMedia\" }, { \"id\": 3015312949, \"predicate\": \"inputMediaPhoto\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"InputPhoto\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.0?int\" }], \"type\": \"InputMedia\" }, { \"id\": 4190388548, \"predicate\": \"inputMediaGeoPoint\", \"params\": [{ \"name\": \"geo_point\", \"type\": \"InputGeoPoint\" }], \"type\": \"InputMedia\" }, { \"id\": 4171988475, \"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\": 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<DocumentAttribute>\" }, { \"name\": \"stickers\", \"type\": \"flags.0?Vector<InputDocument>\" }, { \"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\": 3242007569, \"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\": 1212395773, \"predicate\": \"inputMediaGifExternal\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"q\", \"type\": \"string\" }], \"type\": \"InputMedia\" }, { \"id\": 3854302746, \"predicate\": \"inputMediaPhotoExternal\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.0?int\" }], \"type\": \"InputMedia\" }, { \"id\": 4216511641, \"predicate\": \"inputMediaDocumentExternal\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.0?int\" }], \"type\": \"InputMedia\" }, { \"id\": 3544138739, \"predicate\": \"inputMediaGame\", \"params\": [{ \"name\": \"id\", \"type\": \"InputGame\" }], \"type\": \"InputMedia\" }, { \"id\": 4108359363, \"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\": 3461251837, \"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\": 261416433, \"predicate\": \"inputMediaPoll\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"poll\", \"type\": \"Poll\" }, { \"name\": \"correct_answers\", \"type\": \"flags.0?Vector<bytes>\" }, { \"name\": \"solution\", \"type\": \"flags.1?string\" }, { \"name\": \"solution_entities\", \"type\": \"flags.1?Vector<MessageEntity>\" }], \"type\": \"InputMedia\" }, { \"id\": 3866083195, \"predicate\": \"inputMediaDice\", \"params\": [{ \"name\": \"emoticon\", \"type\": \"string\" }], \"type\": \"InputMedia\" }, { \"id\": 480546647, \"predicate\": \"inputChatPhotoEmpty\", \"params\": [], \"type\": \"InputChatPhoto\" }, { \"id\": 2457621940, \"predicate\": \"inputChatUploadedPhoto\", \"params\": [{ \"name\": \"file\", \"type\": \"InputFile\" }], \"type\": \"InputChatPhoto\" }, { \"id\": 2303962423, \"predicate\": \"inputChatPhoto\", \"params\": [{ \"name\": \"id\", \"type\": \"InputPhoto\" }], \"type\": \"InputChatPhoto\" }, { \"id\": 3837862870, \"predicate\": \"inputGeoPointEmpty\", \"params\": [], \"type\": \"InputGeoPoint\" }, { \"id\": 4088900809, \"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\": 3755650017, \"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\": 4112735573, \"predicate\": \"inputEncryptedFileLocation\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputFileLocation\" }, { \"id\": 3134223748, \"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\": 3418877480, \"predicate\": \"inputSecureFileLocation\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputFileLocation\" }, { \"id\": 700340377, \"predicate\": \"inputTakeoutFileLocation\", \"params\": [], \"type\": \"InputFileLocation\" }, { \"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\": 3627312883, \"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\": 2645671021, \"predicate\": \"peerUser\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"Peer\" }, { \"id\": 3134252475, \"predicate\": \"peerChat\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"Peer\" }, { \"id\": 3185435954, \"predicate\": \"peerChannel\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }], \"type\": \"Peer\" }, { \"id\": 2861972229, \"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\": 3403786975, \"predicate\": \"storage.fileGif\", \"params\": [], \"type\": \"storage.FileType\" }, { \"id\": 172975040, \"predicate\": \"storage.filePng\", \"params\": [], \"type\": \"storage.FileType\" }, { \"id\": 2921222285, \"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\": 3016663268, \"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\": 2474924225, \"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<RestrictionReason>\" }, { \"name\": \"bot_inline_placeholder\", \"type\": \"flags.19?string\" }, { \"name\": \"lang_code\", \"type\": \"flags.22?string\" }], \"type\": \"User\" }, { \"id\": 1326562017, \"predicate\": \"userProfilePhotoEmpty\", \"params\": [], \"type\": \"UserProfilePhoto\" }, { \"id\": 3973537164, \"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\": 3988339017, \"predicate\": \"userStatusOnline\", \"params\": [{ \"name\": \"expires\", \"type\": \"int\" }], \"type\": \"UserStatus\" }, { \"id\": 9203775, \"predicate\": \"userStatusOffline\", \"params\": [{ \"name\": \"was_online\", \"type\": \"int\" }], \"type\": \"UserStatus\" }, { \"id\": 3798942449, \"predicate\": \"userStatusRecently\", \"params\": [], \"type\": \"UserStatus\" }, { \"id\": 129960444, \"predicate\": \"userStatusLastWeek\", \"params\": [], \"type\": \"UserStatus\" }, { \"id\": 2011940674, \"predicate\": \"userStatusLastMonth\", \"params\": [], \"type\": \"UserStatus\" }, { \"id\": 2611140608, \"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\": 3541734942, \"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<RestrictionReason>\" }, { \"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\": 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<BotInfo>\" }, { \"name\": \"pinned_msg_id\", \"type\": \"flags.6?int\" }, { \"name\": \"folder_id\", \"type\": \"flags.11?int\" }], \"type\": \"ChatFull\" }, { \"id\": 4041631530, \"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<BotInfo>\" }, { \"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\": \"stats_dc\", \"type\": \"flags.12?int\" }, { \"name\": \"pts\", \"type\": \"int\" }], \"type\": \"ChatFull\" }, { \"id\": 3369552190, \"predicate\": \"chatParticipant\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"inviter_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"ChatParticipant\" }, { \"id\": 3658699658, \"predicate\": \"chatParticipantCreator\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"ChatParticipant\" }, { \"id\": 3805733942, \"predicate\": \"chatParticipantAdmin\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"inviter_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"ChatParticipant\" }, { \"id\": 4237298731, \"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<ChatParticipant>\" }, { \"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\": 2212879956, \"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<MessageEntity>\" }, { \"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<RestrictionReason>\" }], \"type\": \"Message\" }, { \"id\": 2652479990, \"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\": 3421653312, \"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\": 2676290718, \"predicate\": \"messageMediaUnsupported\", \"params\": [], \"type\": \"MessageMedia\" }, { \"id\": 2628808919, \"predicate\": \"messageMediaDocument\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"document\", \"type\": \"flags.0?Document\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.2?int\" }], \"type\": \"MessageMedia\" }, { \"id\": 2737690112, \"predicate\": \"messageMediaWebPage\", \"params\": [{ \"name\": \"webpage\", \"type\": \"WebPage\" }], \"type\": \"MessageMedia\" }, { \"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\": 4256272392, \"predicate\": \"messageMediaGame\", \"params\": [{ \"name\": \"game\", \"type\": \"Game\" }], \"type\": \"MessageMedia\" }, { \"id\": 2220168007, \"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\": 2084316681, \"predicate\": \"messageMediaGeoLive\", \"params\": [{ \"name\": \"geo\", \"type\": \"GeoPoint\" }, { \"name\": \"period\", \"type\": \"int\" }], \"type\": \"MessageMedia\" }, { \"id\": 1272375192, \"predicate\": \"messageMediaPoll\", \"params\": [{ \"name\": \"poll\", \"type\": \"Poll\" }, { \"name\": \"results\", \"type\": \"PollResults\" }], \"type\": \"MessageMedia\" }, { \"id\": 1065280907, \"predicate\": \"messageMediaDice\", \"params\": [{ \"name\": \"value\", \"type\": \"int\" }, { \"name\": \"emoticon\", \"type\": \"string\" }], \"type\": \"MessageMedia\" }, { \"id\": 3064919984, \"predicate\": \"messageActionEmpty\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 2791541658, \"predicate\": \"messageActionChatCreate\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"users\", \"type\": \"Vector<int>\" }], \"type\": \"MessageAction\" }, { \"id\": 3047280218, \"predicate\": \"messageActionChatEditTitle\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }], \"type\": \"MessageAction\" }, { \"id\": 2144015272, \"predicate\": \"messageActionChatEditPhoto\", \"params\": [{ \"name\": \"photo\", \"type\": \"Photo\" }], \"type\": \"MessageAction\" }, { \"id\": 2514746351, \"predicate\": \"messageActionChatDeletePhoto\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 1217033015, \"predicate\": \"messageActionChatAddUser\", \"params\": [{ \"name\": \"users\", \"type\": \"Vector<int>\" }], \"type\": \"MessageAction\" }, { \"id\": 2997787404, \"predicate\": \"messageActionChatDeleteUser\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 4171036136, \"predicate\": \"messageActionChatJoinedByLink\", \"params\": [{ \"name\": \"inviter_id\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 2513611922, \"predicate\": \"messageActionChannelCreate\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }], \"type\": \"MessageAction\" }, { \"id\": 1371385889, \"predicate\": \"messageActionChatMigrateTo\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 2958420718, \"predicate\": \"messageActionChannelMigrateFrom\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 2495428845, \"predicate\": \"messageActionPinMessage\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 2679813636, \"predicate\": \"messageActionHistoryClear\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 2460428406, \"predicate\": \"messageActionGameScore\", \"params\": [{ \"name\": \"game_id\", \"type\": \"long\" }, { \"name\": \"score\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 2402399015, \"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\": 1080663248, \"predicate\": \"messageActionPaymentSent\", \"params\": [{ \"name\": \"currency\", \"type\": \"string\" }, { \"name\": \"total_amount\", \"type\": \"long\" }], \"type\": \"MessageAction\" }, { \"id\": 2162236031, \"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\": 1200788123, \"predicate\": \"messageActionScreenshotTaken\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 4209418070, \"predicate\": \"messageActionCustomAction\", \"params\": [{ \"name\": \"message\", \"type\": \"string\" }], \"type\": \"MessageAction\" }, { \"id\": 2884218878, \"predicate\": \"messageActionBotAllowed\", \"params\": [{ \"name\": \"domain\", \"type\": \"string\" }], \"type\": \"MessageAction\" }, { \"id\": 455635795, \"predicate\": \"messageActionSecureValuesSentMe\", \"params\": [{ \"name\": \"values\", \"type\": \"Vector<SecureValue>\" }, { \"name\": \"credentials\", \"type\": \"SecureCredentialsEncrypted\" }], \"type\": \"MessageAction\" }, { \"id\": 3646710100, \"predicate\": \"messageActionSecureValuesSent\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector<SecureValueType>\" }], \"type\": \"MessageAction\" }, { \"id\": 4092747638, \"predicate\": \"messageActionContactSignUp\", \"params\": [], \"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\": 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\": 590459437, \"predicate\": \"photoEmpty\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }], \"type\": \"Photo\" }, { \"id\": 3497329829, \"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<PhotoSize>\" }, { \"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\": 3920049402, \"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\": 3769678894, \"predicate\": \"photoStrippedSize\", \"params\": [{ \"name\": \"type\", \"type\": \"string\" }, { \"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\": 3439659286, \"predicate\": \"auth.authorization\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"tmp_sessions\", \"type\": \"flags.0?int\" }, { \"name\": \"user\", \"type\": \"User\" }], \"type\": \"auth.Authorization\" }, { \"id\": 1148485274, \"predicate\": \"auth.authorizationSignUpRequired\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"terms_of_service\", \"type\": \"flags.0?help.TermsOfService\" }], \"type\": \"auth.Authorization\" }, { \"id\": 3751189549, \"predicate\": \"auth.exportedAuthorization\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"auth.ExportedAuthorization\" }, { \"id\": 3099351820, \"predicate\": \"inputNotifyPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"InputNotifyPeer\" }, { \"id\": 423314455, \"predicate\": \"inputNotifyUsers\", \"params\": [], \"type\": \"InputNotifyPeer\" }, { \"id\": 1251338318, \"predicate\": \"inputNotifyChats\", \"params\": [], \"type\": \"InputNotifyPeer\" }, { \"id\": 2983951486, \"predicate\": \"inputNotifyBroadcasts\", \"params\": [], \"type\": \"InputNotifyPeer\" }, { \"id\": 2621249934, \"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\": 2941295904, \"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\": 2172921549, \"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\": 2755118061, \"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\": 2331249445, \"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\": 1490799288, \"predicate\": \"inputReportReasonSpam\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 505595789, \"predicate\": \"inputReportReasonViolence\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 777640226, \"predicate\": \"inputReportReasonPornography\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 2918469347, \"predicate\": \"inputReportReasonChildAbuse\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 3782503690, \"predicate\": \"inputReportReasonOther\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"ReportReason\" }, { \"id\": 2609510714, \"predicate\": \"inputReportReasonCopyright\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 3688169197, \"predicate\": \"inputReportReasonGeoIrrelevant\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 3992026130, \"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\": 4178692500, \"predicate\": \"contact\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"mutual\", \"type\": \"Bool\" }], \"type\": \"Contact\" }, { \"id\": 3489825848, \"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\": 3546811489, \"predicate\": \"contactStatus\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"status\", \"type\": \"UserStatus\" }], \"type\": \"ContactStatus\" }, { \"id\": 3075189202, \"predicate\": \"contacts.contactsNotModified\", \"params\": [], \"type\": \"contacts.Contacts\" }, { \"id\": 3941105218, \"predicate\": \"contacts.contacts\", \"params\": [{ \"name\": \"contacts\", \"type\": \"Vector<Contact>\" }, { \"name\": \"saved_count\", \"type\": \"int\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.Contacts\" }, { \"id\": 2010127419, \"predicate\": \"contacts.importedContacts\", \"params\": [{ \"name\": \"imported\", \"type\": \"Vector<ImportedContact>\" }, { \"name\": \"popular_invites\", \"type\": \"Vector<PopularContact>\" }, { \"name\": \"retry_contacts\", \"type\": \"Vector<long>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.ImportedContacts\" }, { \"id\": 471043349, \"predicate\": \"contacts.blocked\", \"params\": [{ \"name\": \"blocked\", \"type\": \"Vector<ContactBlocked>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 2416444065, \"predicate\": \"contacts.blockedSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"blocked\", \"type\": \"Vector<ContactBlocked>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 364538944, \"predicate\": \"messages.dialogs\", \"params\": [{ \"name\": \"dialogs\", \"type\": \"Vector<Dialog>\" }, { \"name\": \"messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 1910543603, \"predicate\": \"messages.dialogsSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"dialogs\", \"type\": \"Vector<Dialog>\" }, { \"name\": \"messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 4041467286, \"predicate\": \"messages.dialogsNotModified\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 2356252295, \"predicate\": \"messages.messages\", \"params\": [{ \"name\": \"messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Messages\" }, { \"id\": 3371027998, \"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<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Messages\" }, { \"id\": 2569416247, \"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<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Messages\" }, { \"id\": 1951620897, \"predicate\": \"messages.messagesNotModified\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }], \"type\": \"messages.Messages\" }, { \"id\": 1694474197, \"predicate\": \"messages.chats\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<Chat>\" }], \"type\": \"messages.Chats\" }, { \"id\": 2631405892, \"predicate\": \"messages.chatsSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }], \"type\": \"messages.Chats\" }, { \"id\": 3856126364, \"predicate\": \"messages.chatFull\", \"params\": [{ \"name\": \"full_chat\", \"type\": \"ChatFull\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.ChatFull\" }, { \"id\": 3025955281, \"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\": 2517214492, \"predicate\": \"inputMessagesFilterPhotos\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 2680163941, \"predicate\": \"inputMessagesFilterVideo\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 1458172132, \"predicate\": \"inputMessagesFilterPhotoVideo\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 2665345416, \"predicate\": \"inputMessagesFilterDocument\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 2129714567, \"predicate\": \"inputMessagesFilterUrl\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 4291323271, \"predicate\": \"inputMessagesFilterGif\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 1358283666, \"predicate\": \"inputMessagesFilterVoice\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 928101534, \"predicate\": \"inputMessagesFilterMusic\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 975236280, \"predicate\": \"inputMessagesFilterChatPhotos\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 2160695144, \"predicate\": \"inputMessagesFilterPhoneCalls\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"missed\", \"type\": \"flags.0?true\" }], \"type\": \"MessagesFilter\" }, { \"id\": 2054952868, \"predicate\": \"inputMessagesFilterRoundVoice\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 3041516115, \"predicate\": \"inputMessagesFilterRoundVideo\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 3254314650, \"predicate\": \"inputMessagesFilterMyMentions\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 3875695885, \"predicate\": \"inputMessagesFilterGeo\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 3764575107, \"predicate\": \"inputMessagesFilterContacts\", \"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\": 2718806245, \"predicate\": \"updateDeleteMessages\", \"params\": [{ \"name\": \"messages\", \"type\": \"Vector<int>\" }, { \"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\": 2590370335, \"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\": 2805148531, \"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\": 2503031564, \"predicate\": \"updateUserPhoto\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"photo\", \"type\": \"UserProfilePhoto\" }, { \"name\": \"previous\", \"type\": \"Bool\" }], \"type\": \"Update\" }, { \"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\": 3030575245, \"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\": 3930787420, \"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\": 2388564083, \"predicate\": \"updateDcOptions\", \"params\": [{ \"name\": \"dc_options\", \"type\": \"Vector<DcOption>\" }], \"type\": \"Update\" }, { \"id\": 2163009562, \"predicate\": \"updateUserBlocked\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"blocked\", \"type\": \"Bool\" }], \"type\": \"Update\" }, { \"id\": 3200411887, \"predicate\": \"updateNotifySettings\", \"params\": [{ \"name\": \"peer\", \"type\": \"NotifyPeer\" }, { \"name\": \"notify_settings\", \"type\": \"PeerNotifySettings\" }], \"type\": \"Update\" }, { \"id\": 3957614617, \"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<MessageEntity>\" }], \"type\": \"Update\" }, { \"id\": 3996854058, \"predicate\": \"updatePrivacy\", \"params\": [{ \"name\": \"key\", \"type\": \"PrivacyKey\" }, { \"name\": \"rules\", \"type\": \"Vector<PrivacyRule>\" }], \"type\": \"Update\" }, { \"id\": 314130811, \"predicate\": \"updateUserPhone\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"phone\", \"type\": \"string\" }], \"type\": \"Update\" }, { \"id\": 2627162079, \"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\": 2139689491, \"predicate\": \"updateWebPage\", \"params\": [{ \"name\": \"webpage\", \"type\": \"WebPage\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 1757493555, \"predicate\": \"updateReadMessagesContents\", \"params\": [{ \"name\": \"messages\", \"type\": \"Vector<int>\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3942934523, \"predicate\": \"updateChannelTooLong\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"pts\", \"type\": \"flags.0?int\" }], \"type\": \"Update\" }, { \"id\": 3067369046, \"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\": 3279233481, \"predicate\": \"updateDeleteChannelMessages\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"messages\", \"type\": \"Vector<int>\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 2560699211, \"predicate\": \"updateChannelMessageViews\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"views\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3062896985, \"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\": 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<long>\" }], \"type\": \"Update\" }, { \"id\": 1135492588, \"predicate\": \"updateStickerSets\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2473931806, \"predicate\": \"updateSavedGifs\", \"params\": [], \"type\": \"Update\" }, { \"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\": 457133559, \"predicate\": \"updateEditChannelMessage\", \"params\": [{ \"name\": \"message\", \"type\": \"Message\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 2555978869, \"predicate\": \"updateChannelPinnedMessage\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3879028705, \"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\": 3825430691, \"predicate\": \"updateEditMessage\", \"params\": [{ \"name\": \"message\", \"type\": \"Message\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 4191320666, \"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\": 634833351, \"predicate\": \"updateReadChannelOutbox\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3995842921, \"predicate\": \"updateDraftMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"draft\", \"type\": \"DraftMessage\" }], \"type\": \"Update\" }, { \"id\": 1461528386, \"predicate\": \"updateReadFeaturedStickers\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2588027936, \"predicate\": \"updateRecentStickers\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2720652550, \"predicate\": \"updateConfig\", \"params\": [], \"type\": \"Update\" }, { \"id\": 861169551, \"predicate\": \"updatePtsChanged\", \"params\": [], \"type\": \"Update\" }, { \"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\": 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\": 4195302562, \"predicate\": \"updatePinnedDialogs\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"folder_id\", \"type\": \"flags.1?int\" }, { \"name\": \"order\", \"type\": \"flags.0?Vector<DialogPeer>\" }], \"type\": \"Update\" }, { \"id\": 2199371971, \"predicate\": \"updateBotWebhookJSON\", \"params\": [{ \"name\": \"data\", \"type\": \"DataJSON\" }], \"type\": \"Update\" }, { \"id\": 2610053286, \"predicate\": \"updateBotWebhookJSONQuery\", \"params\": [{ \"name\": \"query_id\", \"type\": \"long\" }, { \"name\": \"data\", \"type\": \"DataJSON\" }, { \"name\": \"timeout\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3771582784, \"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\": 2869914398, \"predicate\": \"updatePhoneCall\", \"params\": [{ \"name\": \"phone_call\", \"type\": \"PhoneCall\" }], \"type\": \"Update\" }, { \"id\": 1180041828, \"predicate\": \"updateLangPackTooLong\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"Update\" }, { \"id\": 1442983757, \"predicate\": \"updateLangPack\", \"params\": [{ \"name\": \"difference\", \"type\": \"LangPackDifference\" }], \"type\": \"Update\" }, { \"id\": 3843135853, \"predicate\": \"updateFavedStickers\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2307472197, \"predicate\": \"updateChannelReadMessagesContents\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"messages\", \"type\": \"Vector<int>\" }], \"type\": \"Update\" }, { \"id\": 1887741886, \"predicate\": \"updateContactsReset\", \"params\": [], \"type\": \"Update\" }, { \"id\": 1893427255, \"predicate\": \"updateChannelAvailableMessages\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"available_min_id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3781450179, \"predicate\": \"updateDialogUnreadMark\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"unread\", \"type\": \"flags.0?true\" }, { \"name\": \"peer\", \"type\": \"DialogPeer\" }], \"type\": \"Update\" }, { \"id\": 1279515160, \"predicate\": \"updateUserPinnedMessage\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3775771465, \"predicate\": \"updateChatPinnedMessage\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"version\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 2896258427, \"predicate\": \"updateMessagePoll\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"poll_id\", \"type\": \"long\" }, { \"name\": \"poll\", \"type\": \"flags.0?Poll\" }, { \"name\": \"results\", \"type\": \"PollResults\" }], \"type\": \"Update\" }, { \"id\": 1421875280, \"predicate\": \"updateChatDefaultBannedRights\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"default_banned_rights\", \"type\": \"ChatBannedRights\" }, { \"name\": \"version\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 422972864, \"predicate\": \"updateFolderPeers\", \"params\": [{ \"name\": \"folder_peers\", \"type\": \"Vector<FolderPeer>\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 1786671974, \"predicate\": \"updatePeerSettings\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"settings\", \"type\": \"PeerSettings\" }], \"type\": \"Update\" }, { \"id\": 3031420848, \"predicate\": \"updatePeerLocated\", \"params\": [{ \"name\": \"peers\", \"type\": \"Vector<PeerLocated>\" }], \"type\": \"Update\" }, { \"id\": 967122427, \"predicate\": \"updateNewScheduledMessage\", \"params\": [{ \"name\": \"message\", \"type\": \"Message\" }], \"type\": \"Update\" }, { \"id\": 2424728814, \"predicate\": \"updateDeleteScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"messages\", \"type\": \"Vector<int>\" }], \"type\": \"Update\" }, { \"id\": 2182544291, \"predicate\": \"updateTheme\", \"params\": [{ \"name\": \"theme\", \"type\": \"Theme\" }], \"type\": \"Update\" }, { \"id\": 2267003193, \"predicate\": \"updateGeoLiveViewed\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 1448076945, \"predicate\": \"updateLoginToken\", \"params\": [], \"type\": \"Update\" }, { \"id\": 1123585836, \"predicate\": \"updateMessagePollVote\", \"params\": [{ \"name\": \"poll_id\", \"type\": \"long\" }, { \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"options\", \"type\": \"Vector<bytes>\" }], \"type\": \"Update\" }, { \"id\": 654302845, \"predicate\": \"updateDialogFilter\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"filter\", \"type\": \"flags.0?DialogFilter\" }], \"type\": \"Update\" }, { \"id\": 2782339333, \"predicate\": \"updateDialogFilterOrder\", \"params\": [{ \"name\": \"order\", \"type\": \"Vector<int>\" }], \"type\": \"Update\" }, { \"id\": 889491791, \"predicate\": \"updateDialogFilters\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2775329342, \"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<Message>\" }, { \"name\": \"new_encrypted_messages\", \"type\": \"Vector<EncryptedMessage>\" }, { \"name\": \"other_updates\", \"type\": \"Vector<Update>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"state\", \"type\": \"updates.State\" }], \"type\": \"updates.Difference\" }, { \"id\": 2835028353, \"predicate\": \"updates.differenceSlice\", \"params\": [{ \"name\": \"new_messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"new_encrypted_messages\", \"type\": \"Vector<EncryptedMessage>\" }, { \"name\": \"other_updates\", \"type\": \"Vector<Update>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"intermediate_state\", \"type\": \"updates.State\" }], \"type\": \"updates.Difference\" }, { \"id\": 1258196845, \"predicate\": \"updates.differenceTooLong\", \"params\": [{ \"name\": \"pts\", \"type\": \"int\" }], \"type\": \"updates.Difference\" }, { \"id\": 3809980286, \"predicate\": \"updatesTooLong\", \"params\": [], \"type\": \"Updates\" }, { \"id\": 2437922577, \"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<MessageEntity>\" }], \"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<MessageEntity>\" }], \"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<Update>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"seq_start\", \"type\": \"int\" }, { \"name\": \"seq\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 1957577280, \"predicate\": \"updates\", \"params\": [{ \"name\": \"updates\", \"type\": \"Vector<Update>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"seq\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"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<MessageEntity>\" }], \"type\": \"Updates\" }, { \"id\": 2378853029, \"predicate\": \"photos.photos\", \"params\": [{ \"name\": \"photos\", \"type\": \"Vector<Photo>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"photos.Photos\" }, { \"id\": 352657236, \"predicate\": \"photos.photosSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"photos\", \"type\": \"Vector<Photo>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"photos.Photos\" }, { \"id\": 539045032, \"predicate\": \"photos.photo\", \"params\": [{ \"name\": \"photo\", \"type\": \"Photo\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"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\": 4052539972, \"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<FileHash>\" }], \"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<DcOption>\" }, { \"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\": 2384074613, \"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<MessageEntity>\" }, { \"name\": \"document\", \"type\": \"flags.1?Document\" }, { \"name\": \"url\", \"type\": \"flags.2?string\" }], \"type\": \"help.AppUpdate\" }, { \"id\": 3294258486, \"predicate\": \"help.noAppUpdate\", \"params\": [], \"type\": \"help.AppUpdate\" }, { \"id\": 415997816, \"predicate\": \"help.inviteText\", \"params\": [{ \"name\": \"message\", \"type\": \"string\" }], \"type\": \"help.InviteText\" }, { \"id\": 2877210784, \"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\": 3363328638, \"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\": 4199992886, \"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\": 4047615457, \"predicate\": \"inputEncryptedChat\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputEncryptedChat\" }, { \"id\": 3256830334, \"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\": 767652808, \"predicate\": \"inputEncryptedFileBigUploaded\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"parts\", \"type\": \"int\" }, { \"name\": \"key_fingerprint\", \"type\": \"int\" }], \"type\": \"InputEncryptedFile\" }, { \"id\": 3977822488, \"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\": 3236054581, \"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\": 2492727090, \"predicate\": \"messages.sentEncryptedFile\", \"params\": [{ \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"file\", \"type\": \"EncryptedFile\" }], \"type\": \"messages.SentEncryptedMessage\" }, { \"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\": 922273905, \"predicate\": \"documentEmpty\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }], \"type\": \"Document\" }, { \"id\": 2611125441, \"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<PhotoSize>\" }, { \"name\": \"dc_id\", \"type\": \"int\" }, { \"name\": \"attributes\", \"type\": \"Vector<DocumentAttribute>\" }], \"type\": \"Document\" }, { \"id\": 398898678, \"predicate\": \"help.support\", \"params\": [{ \"name\": \"phone_number\", \"type\": \"string\" }, { \"name\": \"user\", \"type\": \"User\" }], \"type\": \"help.Support\" }, { \"id\": 2681474008, \"predicate\": \"notifyPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }], \"type\": \"NotifyPeer\" }, { \"id\": 3033021260, \"predicate\": \"notifyUsers\", \"params\": [], \"type\": \"NotifyPeer\" }, { \"id\": 3221737155, \"predicate\": \"notifyChats\", \"params\": [], \"type\": \"NotifyPeer\" }, { \"id\": 3591563503, \"predicate\": \"notifyBroadcasts\", \"params\": [], \"type\": \"NotifyPeer\" }, { \"id\": 381645902, \"predicate\": \"sendMessageTypingAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 4250847477, \"predicate\": \"sendMessageCancelAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 2710034031, \"predicate\": \"sendMessageRecordVideoAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 3916839660, \"predicate\": \"sendMessageUploadVideoAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 3576656887, \"predicate\": \"sendMessageRecordAudioAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 4082227115, \"predicate\": \"sendMessageUploadAudioAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 3520285222, \"predicate\": \"sendMessageUploadPhotoAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 2852968932, \"predicate\": \"sendMessageUploadDocumentAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 393186209, \"predicate\": \"sendMessageGeoLocationAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 1653390447, \"predicate\": \"sendMessageChooseContactAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 3714748232, \"predicate\": \"sendMessageGamePlayAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 2297593788, \"predicate\": \"sendMessageRecordRoundAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 608050278, \"predicate\": \"sendMessageUploadRoundAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 3004386717, \"predicate\": \"contacts.found\", \"params\": [{ \"name\": \"my_results\", \"type\": \"Vector<Peer>\" }, { \"name\": \"results\", \"type\": \"Vector<Peer>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.Found\" }, { \"id\": 1335282456, \"predicate\": \"inputPrivacyKeyStatusTimestamp\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 3187344422, \"predicate\": \"inputPrivacyKeyChatInvite\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 4206550111, \"predicate\": \"inputPrivacyKeyPhoneCall\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 3684593874, \"predicate\": \"inputPrivacyKeyPhoneP2P\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 2765966344, \"predicate\": \"inputPrivacyKeyForwards\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 1461304012, \"predicate\": \"inputPrivacyKeyProfilePhoto\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 55761658, \"predicate\": \"inputPrivacyKeyPhoneNumber\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 3508640733, \"predicate\": \"inputPrivacyKeyAddedByPhone\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 3157175088, \"predicate\": \"privacyKeyStatusTimestamp\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 1343122938, \"predicate\": \"privacyKeyChatInvite\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 1030105979, \"predicate\": \"privacyKeyPhoneCall\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 961092808, \"predicate\": \"privacyKeyPhoneP2P\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 1777096355, \"predicate\": \"privacyKeyForwards\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 2517966829, \"predicate\": \"privacyKeyProfilePhoto\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 3516589165, \"predicate\": \"privacyKeyPhoneNumber\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 1124062251, \"predicate\": \"privacyKeyAddedByPhone\", \"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<InputUser>\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 195371015, \"predicate\": \"inputPrivacyValueDisallowContacts\", \"params\": [], \"type\": \"InputPrivacyRule\" }, { \"id\": 3597362889, \"predicate\": \"inputPrivacyValueDisallowAll\", \"params\": [], \"type\": \"InputPrivacyRule\" }, { \"id\": 2417034343, \"predicate\": \"inputPrivacyValueDisallowUsers\", \"params\": [{ \"name\": \"users\", \"type\": \"Vector<InputUser>\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 1283572154, \"predicate\": \"inputPrivacyValueAllowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<int>\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 3626197935, \"predicate\": \"inputPrivacyValueDisallowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<int>\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 4294843308, \"predicate\": \"privacyValueAllowContacts\", \"params\": [], \"type\": \"PrivacyRule\" }, { \"id\": 1698855810, \"predicate\": \"privacyValueAllowAll\", \"params\": [], \"type\": \"PrivacyRule\" }, { \"id\": 1297858060, \"predicate\": \"privacyValueAllowUsers\", \"params\": [{ \"name\": \"users\", \"type\": \"Vector<int>\" }], \"type\": \"PrivacyRule\" }, { \"id\": 4169726490, \"predicate\": \"privacyValueDisallowContacts\", \"params\": [], \"type\": \"PrivacyRule\" }, { \"id\": 2339628899, \"predicate\": \"privacyValueDisallowAll\", \"params\": [], \"type\": \"PrivacyRule\" }, { \"id\": 209668535, \"predicate\": \"privacyValueDisallowUsers\", \"params\": [{ \"name\": \"users\", \"type\": \"Vector<int>\" }], \"type\": \"PrivacyRule\" }, { \"id\": 415136107, \"predicate\": \"privacyValueAllowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<int>\" }], \"type\": \"PrivacyRule\" }, { \"id\": 2897086096, \"predicate\": \"privacyValueDisallowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<int>\" }], \"type\": \"PrivacyRule\" }, { \"id\": 1352683077, \"predicate\": \"account.privacyRules\", \"params\": [{ \"name\": \"rules\", \"type\": \"Vector<PrivacyRule>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"account.PrivacyRules\" }, { \"id\": 3100684255, \"predicate\": \"accountDaysTTL\", \"params\": [{ \"name\": \"days\", \"type\": \"int\" }], \"type\": \"AccountDaysTTL\" }, { \"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\": 2555574726, \"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\": 2550256375, \"predicate\": \"documentAttributeHasStickers\", \"params\": [], \"type\": \"DocumentAttribute\" }, { \"id\": 4050950690, \"predicate\": \"messages.stickersNotModified\", \"params\": [], \"type\": \"messages.Stickers\" }, { \"id\": 3831077821, \"predicate\": \"messages.stickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"stickers\", \"type\": \"Vector<Document>\" }], \"type\": \"messages.Stickers\" }, { \"id\": 313694676, \"predicate\": \"stickerPack\", \"params\": [{ \"name\": \"emoticon\", \"type\": \"string\" }, { \"name\": \"documents\", \"type\": \"Vector<long>\" }], \"type\": \"StickerPack\" }, { \"id\": 3898999491, \"predicate\": \"messages.allStickersNotModified\", \"params\": [], \"type\": \"messages.AllStickers\" }, { \"id\": 3992797279, \"predicate\": \"messages.allStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"sets\", \"type\": \"Vector<StickerSet>\" }], \"type\": \"messages.AllStickers\" }, { \"id\": 2228326789, \"predicate\": \"messages.affectedMessages\", \"params\": [{ \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"messages.AffectedMessages\" }, { \"id\": 3943987176, \"predicate\": \"webPageEmpty\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }], \"type\": \"WebPage\" }, { \"id\": 3313949212, \"predicate\": \"webPagePending\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"WebPage\" }, { \"id\": 3902555570, \"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<WebPageAttribute>\" }], \"type\": \"WebPage\" }, { \"id\": 1930545681, \"predicate\": \"webPageNotModified\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"cached_page_views\", \"type\": \"flags.0?int\" }], \"type\": \"WebPage\" }, { \"id\": 2902578717, \"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<Authorization>\" }], \"type\": \"account.Authorizations\" }, { \"id\": 2904965624, \"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\": 2589733861, \"predicate\": \"account.passwordSettings\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"email\", \"type\": \"flags.0?string\" }, { \"name\": \"secure_settings\", \"type\": \"flags.1?SecureSecretSettings\" }], \"type\": \"account.PasswordSettings\" }, { \"id\": 3258394569, \"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\": 2743383929, \"predicate\": \"receivedNotifyMessage\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"flags\", \"type\": \"int\" }], \"type\": \"ReceivedNotifyMessage\" }, { \"id\": 1776236393, \"predicate\": \"chatInviteEmpty\", \"params\": [], \"type\": \"ExportedChatInvite\" }, { \"id\": 4230874556, \"predicate\": \"chatInviteExported\", \"params\": [{ \"name\": \"link\", \"type\": \"string\" }], \"type\": \"ExportedChatInvite\" }, { \"id\": 1516793212, \"predicate\": \"chatInviteAlready\", \"params\": [{ \"name\": \"chat\", \"type\": \"Chat\" }], \"type\": \"ChatInvite\" }, { \"id\": 3754096014, \"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<User>\" }], \"type\": \"ChatInvite\" }, { \"id\": 4290128789, \"predicate\": \"inputStickerSetEmpty\", \"params\": [], \"type\": \"InputStickerSet\" }, { \"id\": 2649203305, \"predicate\": \"inputStickerSetID\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputStickerSet\" }, { \"id\": 2250033312, \"predicate\": \"inputStickerSetShortName\", \"params\": [{ \"name\": \"short_name\", \"type\": \"string\" }], \"type\": \"InputStickerSet\" }, { \"id\": 42402760, \"predicate\": \"inputStickerSetAnimatedEmoji\", \"params\": [], \"type\": \"InputStickerSet\" }, { \"id\": 3867103758, \"predicate\": \"inputStickerSetDice\", \"params\": [{ \"name\": \"emoticon\", \"type\": \"string\" }], \"type\": \"InputStickerSet\" }, { \"id\": 4004802343, \"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\": 3054118054, \"predicate\": \"messages.stickerSet\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"packs\", \"type\": \"Vector<StickerPack>\" }, { \"name\": \"documents\", \"type\": \"Vector<Document>\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 3262826695, \"predicate\": \"botCommand\", \"params\": [{ \"name\": \"command\", \"type\": \"string\" }, { \"name\": \"description\", \"type\": \"string\" }], \"type\": \"BotCommand\" }, { \"id\": 2565348666, \"predicate\": \"botInfo\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"description\", \"type\": \"string\" }, { \"name\": \"commands\", \"type\": \"Vector<BotCommand>\" }], \"type\": \"BotInfo\" }, { \"id\": 2734311552, \"predicate\": \"keyboardButton\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"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\": 2976541737, \"predicate\": \"keyboardButtonRequestPhone\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"id\": 4235815743, \"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\": 1358175439, \"predicate\": \"keyboardButtonGame\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"id\": 2950250427, \"predicate\": \"keyboardButtonBuy\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"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\": 3492708308, \"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\": 3150401885, \"predicate\": \"keyboardButtonRequestPoll\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"quiz\", \"type\": \"flags.0?Bool\" }, { \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"id\": 2002815875, \"predicate\": \"keyboardButtonRow\", \"params\": [{ \"name\": \"buttons\", \"type\": \"Vector<KeyboardButton>\" }], \"type\": \"KeyboardButtonRow\" }, { \"id\": 2688441221, \"predicate\": \"replyKeyboardHide\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"selective\", \"type\": \"flags.2?true\" }], \"type\": \"ReplyMarkup\" }, { \"id\": 4094724768, \"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<KeyboardButtonRow>\" }], \"type\": \"ReplyMarkup\" }, { \"id\": 1218642516, \"predicate\": \"replyInlineMarkup\", \"params\": [{ \"name\": \"rows\", \"type\": \"Vector<KeyboardButtonRow>\" }], \"type\": \"ReplyMarkup\" }, { \"id\": 3146955413, \"predicate\": \"messageEntityUnknown\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"MessageEntity\" }, { \"id\": 4194588573, \"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\": 3177253833, \"predicate\": \"messageEntityBold\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"MessageEntity\" }, { \"id\": 2188348256, \"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\": 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\": 2607407947, \"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\": 2622389899, \"predicate\": \"messageEntityUnderline\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"MessageEntity\" }, { \"id\": 3204879316, \"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\": 1981704948, \"predicate\": \"messageEntityBankCard\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"MessageEntity\" }, { \"id\": 4002160262, \"predicate\": \"inputChannelEmpty\", \"params\": [], \"type\": \"InputChannel\" }, { \"id\": 2951442734, \"predicate\": \"inputChannel\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputChannel\" }, { \"id\": 707290417, \"predicate\": \"inputChannelFromMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"channel_id\", \"type\": \"int\" }], \"type\": \"InputChannel\" }, { \"id\": 2131196633, \"predicate\": \"contacts.resolvedPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.ResolvedPeer\" }, { \"id\": 182649427, \"predicate\": \"messageRange\", \"params\": [{ \"name\": \"min_id\", \"type\": \"int\" }, { \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"MessageRange\" }, { \"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\": 2763835134, \"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<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"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<Message>\" }, { \"name\": \"other_updates\", \"type\": \"Vector<Update>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"updates.ChannelDifference\" }, { \"id\": 2496933607, \"predicate\": \"channelMessagesFilterEmpty\", \"params\": [], \"type\": \"ChannelMessagesFilter\" }, { \"id\": 3447183703, \"predicate\": \"channelMessagesFilter\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"exclude_new_messages\", \"type\": \"flags.1?true\" }, { \"name\": \"ranges\", \"type\": \"Vector<MessageRange>\" }], \"type\": \"ChannelMessagesFilter\" }, { \"id\": 367766557, \"predicate\": \"channelParticipant\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"ChannelParticipant\" }, { \"id\": 2737347181, \"predicate\": \"channelParticipantSelf\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"inviter_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"ChannelParticipant\" }, { \"id\": 2156729764, \"predicate\": \"channelParticipantCreator\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"rank\", \"type\": \"flags.0?string\" }], \"type\": \"ChannelParticipant\" }, { \"id\": 3435051951, \"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\": 3728686201, \"predicate\": \"channelParticipantsRecent\", \"params\": [], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 3026225513, \"predicate\": \"channelParticipantsAdmins\", \"params\": [], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 2746567045, \"predicate\": \"channelParticipantsKicked\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 2966521435, \"predicate\": \"channelParticipantsBots\", \"params\": [], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 338142689, \"predicate\": \"channelParticipantsBanned\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 106343499, \"predicate\": \"channelParticipantsSearch\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 3144345741, \"predicate\": \"channelParticipantsContacts\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 4117684904, \"predicate\": \"channels.channelParticipants\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"participants\", \"type\": \"Vector<ChannelParticipant>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"channels.ChannelParticipants\" }, { \"id\": 4028055529, \"predicate\": \"channels.channelParticipantsNotModified\", \"params\": [], \"type\": \"channels.ChannelParticipants\" }, { \"id\": 3503927651, \"predicate\": \"channels.channelParticipant\", \"params\": [{ \"name\": \"participant\", \"type\": \"ChannelParticipant\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"channels.ChannelParticipant\" }, { \"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<MessageEntity>\" }, { \"name\": \"min_age_confirm\", \"type\": \"flags.1?int\" }], \"type\": \"help.TermsOfService\" }, { \"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\": 2624914441, \"predicate\": \"foundGifCached\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"photo\", \"type\": \"Photo\" }, { \"name\": \"document\", \"type\": \"Document\" }], \"type\": \"FoundGif\" }, { \"id\": 1158290442, \"predicate\": \"messages.foundGifs\", \"params\": [{ \"name\": \"next_offset\", \"type\": \"int\" }, { \"name\": \"results\", \"type\": \"Vector<FoundGif>\" }], \"type\": \"messages.FoundGifs\" }, { \"id\": 3892468898, \"predicate\": \"messages.savedGifsNotModified\", \"params\": [], \"type\": \"messages.SavedGifs\" }, { \"id\": 772213157, \"predicate\": \"messages.savedGifs\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"gifs\", \"type\": \"Vector<Document>\" }], \"type\": \"messages.SavedGifs\" }, { \"id\": 864077702, \"predicate\": \"inputBotInlineMessageMediaAuto\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.1?Vector<MessageEntity>\" }, { \"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<MessageEntity>\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"InputBotInlineMessage\" }, { \"id\": 3249626469, \"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\": 2800599037, \"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\": 1262639204, \"predicate\": \"inputBotInlineMessageGame\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"InputBotInlineMessage\" }, { \"id\": 2294256409, \"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\": 2832753831, \"predicate\": \"inputBotInlineResultPhoto\", \"params\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"type\", \"type\": \"string\" }, { \"name\": \"photo\", \"type\": \"InputPhoto\" }, { \"name\": \"send_message\", \"type\": \"InputBotInlineMessage\" }], \"type\": \"InputBotInlineResult\" }, { \"id\": 4294507972, \"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\": 1336154098, \"predicate\": \"inputBotInlineResultGame\", \"params\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"short_name\", \"type\": \"string\" }, { \"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<MessageEntity>\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"BotInlineMessage\" }, { \"id\": 2357159394, \"predicate\": \"botInlineMessageText\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"no_webpage\", \"type\": \"flags.0?true\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.1?Vector<MessageEntity>\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"BotInlineMessage\" }, { \"id\": 3072515685, \"predicate\": \"botInlineMessageMediaGeo\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"geo\", \"type\": \"GeoPoint\" }, { \"name\": \"period\", \"type\": \"int\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"BotInlineMessage\" }, { \"id\": 2324063644, \"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\": 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\": 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\": 2491197512, \"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<BotInlineResult>\" }, { \"name\": \"cache_time\", \"type\": \"int\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.BotResults\" }, { \"id\": 1571494644, \"predicate\": \"exportedMessageLink\", \"params\": [{ \"name\": \"link\", \"type\": \"string\" }, { \"name\": \"html\", \"type\": \"string\" }], \"type\": \"ExportedMessageLink\" }, { \"id\": 893020267, \"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\" }, { \"name\": \"psa_type\", \"type\": \"flags.6?string\" }], \"type\": \"MessageFwdHeader\" }, { \"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\": 3221273506, \"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\": 2869151449, \"predicate\": \"auth.sentCodeTypeFlashCall\", \"params\": [{ \"name\": \"pattern\", \"type\": \"string\" }], \"type\": \"auth.SentCodeType\" }, { \"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\": 649453030, \"predicate\": \"messages.messageEditData\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"caption\", \"type\": \"flags.0?true\" }], \"type\": \"messages.MessageEditData\" }, { \"id\": 2299280777, \"predicate\": \"inputBotInlineMessageID\", \"params\": [{ \"name\": \"dc_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputBotInlineMessageID\" }, { \"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<Dialog>\" }, { \"name\": \"messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"state\", \"type\": \"updates.State\" }], \"type\": \"messages.PeerDialogs\" }, { \"id\": 3989684315, \"predicate\": \"topPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"rating\", \"type\": \"double\" }], \"type\": \"TopPeer\" }, { \"id\": 2875595611, \"predicate\": \"topPeerCategoryBotsPM\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 344356834, \"predicate\": \"topPeerCategoryBotsInline\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 104314861, \"predicate\": \"topPeerCategoryCorrespondents\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 3172442442, \"predicate\": \"topPeerCategoryGroups\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 371037736, \"predicate\": \"topPeerCategoryChannels\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 511092620, \"predicate\": \"topPeerCategoryPhoneCalls\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 2822794409, \"predicate\": \"topPeerCategoryForwardUsers\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 4226728176, \"predicate\": \"topPeerCategoryForwardChats\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 4219683473, \"predicate\": \"topPeerCategoryPeers\", \"params\": [{ \"name\": \"category\", \"type\": \"TopPeerCategory\" }, { \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"peers\", \"type\": \"Vector<TopPeer>\" }], \"type\": \"TopPeerCategoryPeers\" }, { \"id\": 3727060725, \"predicate\": \"contacts.topPeersNotModified\", \"params\": [], \"type\": \"contacts.TopPeers\" }, { \"id\": 1891070632, \"predicate\": \"contacts.topPeers\", \"params\": [{ \"name\": \"categories\", \"type\": \"Vector<TopPeerCategoryPeers>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.TopPeers\" }, { \"id\": 3039597469, \"predicate\": \"contacts.topPeersDisabled\", \"params\": [], \"type\": \"contacts.TopPeers\" }, { \"id\": 453805082, \"predicate\": \"draftMessageEmpty\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"date\", \"type\": \"flags.0?int\" }], \"type\": \"DraftMessage\" }, { \"id\": 4253970719, \"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<MessageEntity>\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"DraftMessage\" }, { \"id\": 3336309862, \"predicate\": \"messages.featuredStickersNotModified\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }], \"type\": \"messages.FeaturedStickers\" }, { \"id\": 3064709953, \"predicate\": \"messages.featuredStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"sets\", \"type\": \"Vector<StickerSetCovered>\" }, { \"name\": \"unread\", \"type\": \"Vector<long>\" }], \"type\": \"messages.FeaturedStickers\" }, { \"id\": 186120336, \"predicate\": \"messages.recentStickersNotModified\", \"params\": [], \"type\": \"messages.RecentStickers\" }, { \"id\": 586395571, \"predicate\": \"messages.recentStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"packs\", \"type\": \"Vector<StickerPack>\" }, { \"name\": \"stickers\", \"type\": \"Vector<Document>\" }, { \"name\": \"dates\", \"type\": \"Vector<int>\" }], \"type\": \"messages.RecentStickers\" }, { \"id\": 1338747336, \"predicate\": \"messages.archivedStickers\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"sets\", \"type\": \"Vector<StickerSetCovered>\" }], \"type\": \"messages.ArchivedStickers\" }, { \"id\": 946083368, \"predicate\": \"messages.stickerSetInstallResultSuccess\", \"params\": [], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 904138920, \"predicate\": \"messages.stickerSetInstallResultArchive\", \"params\": [{ \"name\": \"sets\", \"type\": \"Vector<StickerSetCovered>\" }], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 1678812626, \"predicate\": \"stickerSetCovered\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"cover\", \"type\": \"Document\" }], \"type\": \"StickerSetCovered\" }, { \"id\": 872932635, \"predicate\": \"stickerSetMultiCovered\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"covers\", \"type\": \"Vector<Document>\" }], \"type\": \"StickerSetCovered\" }, { \"id\": 2933316530, \"predicate\": \"maskCoords\", \"params\": [{ \"name\": \"n\", \"type\": \"int\" }, { \"name\": \"x\", \"type\": \"double\" }, { \"name\": \"y\", \"type\": \"double\" }, { \"name\": \"zoom\", \"type\": \"double\" }], \"type\": \"MaskCoords\" }, { \"id\": 1251549527, \"predicate\": \"inputStickeredMediaPhoto\", \"params\": [{ \"name\": \"id\", \"type\": \"InputPhoto\" }], \"type\": \"InputStickeredMedia\" }, { \"id\": 70813275, \"predicate\": \"inputStickeredMediaDocument\", \"params\": [{ \"name\": \"id\", \"type\": \"InputDocument\" }], \"type\": \"InputStickeredMedia\" }, { \"id\": 3187238203, \"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\": 53231223, \"predicate\": \"inputGameID\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputGame\" }, { \"id\": 3274827786, \"predicate\": \"inputGameShortName\", \"params\": [{ \"name\": \"bot_id\", \"type\": \"InputUser\" }, { \"name\": \"short_name\", \"type\": \"string\" }], \"type\": \"InputGame\" }, { \"id\": 1493171408, \"predicate\": \"highScore\", \"params\": [{ \"name\": \"pos\", \"type\": \"int\" }, { \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"score\", \"type\": \"int\" }], \"type\": \"HighScore\" }, { \"id\": 2587622809, \"predicate\": \"messages.highScores\", \"params\": [{ \"name\": \"scores\", \"type\": \"Vector<HighScore>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.HighScores\" }, { \"id\": 3695018575, \"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\": 3641877916, \"predicate\": \"textItalic\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"RichText\" }, { \"id\": 3240501956, \"predicate\": \"textUnderline\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"RichText\" }, { \"id\": 2616769429, \"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\": 3730443734, \"predicate\": \"textEmail\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }, { \"name\": \"email\", \"type\": \"string\" }], \"type\": \"RichText\" }, { \"id\": 2120376535, \"predicate\": \"textConcat\", \"params\": [{ \"name\": \"texts\", \"type\": \"Vector<RichText>\" }], \"type\": \"RichText\" }, { \"id\": 3983181060, \"predicate\": \"textSubscript\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"RichText\" }, { \"id\": 3355139585, \"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\": 894777186, \"predicate\": \"textAnchor\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }, { \"name\": \"name\", \"type\": \"string\" }], \"type\": \"RichText\" }, { \"id\": 324435594, \"predicate\": \"pageBlockUnsupported\", \"params\": [], \"type\": \"PageBlock\" }, { \"id\": 1890305021, \"predicate\": \"pageBlockTitle\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 2415565343, \"predicate\": \"pageBlockSubtitle\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 3132089824, \"predicate\": \"pageBlockAuthorDate\", \"params\": [{ \"name\": \"author\", \"type\": \"RichText\" }, { \"name\": \"published_date\", \"type\": \"int\" }], \"type\": \"PageBlock\" }, { \"id\": 3218105580, \"predicate\": \"pageBlockHeader\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 4046173921, \"predicate\": \"pageBlockSubheader\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 1182402406, \"predicate\": \"pageBlockParagraph\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 3228621118, \"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\": 3676352904, \"predicate\": \"pageBlockDivider\", \"params\": [], \"type\": \"PageBlock\" }, { \"id\": 3456972720, \"predicate\": \"pageBlockAnchor\", \"params\": [{ \"name\": \"name\", \"type\": \"string\" }], \"type\": \"PageBlock\" }, { \"id\": 3840442385, \"predicate\": \"pageBlockList\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector<PageListItem>\" }], \"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\": 2826014149, \"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\": 4065961995, \"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<PageBlock>\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 1705048653, \"predicate\": \"pageBlockCollage\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector<PageBlock>\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 52401552, \"predicate\": \"pageBlockSlideshow\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector<PageBlock>\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 4011282869, \"predicate\": \"pageBlockChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"Chat\" }], \"type\": \"PageBlock\" }, { \"id\": 2151899626, \"predicate\": \"pageBlockAudio\", \"params\": [{ \"name\": \"audio_id\", \"type\": \"long\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 504660880, \"predicate\": \"pageBlockKicker\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 3209554562, \"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<PageTableRow>\" }], \"type\": \"PageBlock\" }, { \"id\": 2592793057, \"predicate\": \"pageBlockOrderedList\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector<PageListOrderedItem>\" }], \"type\": \"PageBlock\" }, { \"id\": 1987480557, \"predicate\": \"pageBlockDetails\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"open\", \"type\": \"flags.0?true\" }, { \"name\": \"blocks\", \"type\": \"Vector<PageBlock>\" }, { \"name\": \"title\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 370236054, \"predicate\": \"pageBlockRelatedArticles\", \"params\": [{ \"name\": \"title\", \"type\": \"RichText\" }, { \"name\": \"articles\", \"type\": \"Vector<PageRelatedArticle>\" }], \"type\": \"PageBlock\" }, { \"id\": 2756656886, \"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\": 2246320897, \"predicate\": \"phoneCallDiscardReasonMissed\", \"params\": [], \"type\": \"PhoneCallDiscardReason\" }, { \"id\": 3767910816, \"predicate\": \"phoneCallDiscardReasonDisconnect\", \"params\": [], \"type\": \"PhoneCallDiscardReason\" }, { \"id\": 1471006352, \"predicate\": \"phoneCallDiscardReasonHangup\", \"params\": [], \"type\": \"PhoneCallDiscardReason\" }, { \"id\": 4210550985, \"predicate\": \"phoneCallDiscardReasonBusy\", \"params\": [], \"type\": \"PhoneCallDiscardReason\" }, { \"id\": 2104790276, \"predicate\": \"dataJSON\", \"params\": [{ \"name\": \"data\", \"type\": \"string\" }], \"type\": \"DataJSON\" }, { \"id\": 3408489464, \"predicate\": \"labeledPrice\", \"params\": [{ \"name\": \"label\", \"type\": \"string\" }, { \"name\": \"amount\", \"type\": \"long\" }], \"type\": \"LabeledPrice\" }, { \"id\": 3272254296, \"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<LabeledPrice>\" }], \"type\": \"Invoice\" }, { \"id\": 3926049406, \"predicate\": \"paymentCharge\", \"params\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"provider_charge_id\", \"type\": \"string\" }], \"type\": \"PaymentCharge\" }, { \"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\": 2426158996, \"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\": 3452074527, \"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<DocumentAttribute>\" }], \"type\": \"WebDocument\" }, { \"id\": 4190682310, \"predicate\": \"webDocumentNoProxy\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"attributes\", \"type\": \"Vector<DocumentAttribute>\" }], \"type\": \"WebDocument\" }, { \"id\": 2616017741, \"predicate\": \"inputWebDocument\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"attributes\", \"type\": \"Vector<DocumentAttribute>\" }], \"type\": \"InputWebDocument\" }, { \"id\": 3258570374, \"predicate\": \"inputWebFileLocation\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputWebFileLocation\" }, { \"id\": 2669814217, \"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\": 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<User>\" }], \"type\": \"payments.PaymentForm\" }, { \"id\": 3510966403, \"predicate\": \"payments.validatedRequestedInfo\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"flags.0?string\" }, { \"name\": \"shipping_options\", \"type\": \"flags.1?Vector<ShippingOption>\" }], \"type\": \"payments.ValidatedRequestedInfo\" }, { \"id\": 1314881805, \"predicate\": \"payments.paymentResult\", \"params\": [{ \"name\": \"updates\", \"type\": \"Updates\" }], \"type\": \"payments.PaymentResult\" }, { \"id\": 3628142905, \"predicate\": \"payments.paymentVerificationNeeded\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"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<User>\" }], \"type\": \"payments.PaymentReceipt\" }, { \"id\": 4220511292, \"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\": 3238965967, \"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\": 178373535, \"predicate\": \"inputPaymentCredentialsApplePay\", \"params\": [{ \"name\": \"payment_data\", \"type\": \"DataJSON\" }], \"type\": \"InputPaymentCredentials\" }, { \"id\": 3389379854, \"predicate\": \"inputPaymentCredentialsAndroidPay\", \"params\": [{ \"name\": \"payment_token\", \"type\": \"DataJSON\" }, { \"name\": \"google_transaction_id\", \"type\": \"string\" }], \"type\": \"InputPaymentCredentials\" }, { \"id\": 3680828724, \"predicate\": \"account.tmpPassword\", \"params\": [{ \"name\": \"tmp_password\", \"type\": \"bytes\" }, { \"name\": \"valid_until\", \"type\": \"int\" }], \"type\": \"account.TmpPassword\" }, { \"id\": 3055631583, \"predicate\": \"shippingOption\", \"params\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"prices\", \"type\": \"Vector<LabeledPrice>\" }], \"type\": \"ShippingOption\" }, { \"id\": 4288717974, \"predicate\": \"inputStickerSetItem\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"document\", \"type\": \"InputDocument\" }, { \"name\": \"emoji\", \"type\": \"string\" }, { \"name\": \"mask_coords\", \"type\": \"flags.0?MaskCoords\" }], \"type\": \"InputStickerSetItem\" }, { \"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\": 2280307539, \"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\": 2575058250, \"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\": 2269294207, \"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<PhoneConnection>\" }, { \"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\": 2639009728, \"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\": 4236742600, \"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\" }, { \"name\": \"library_versions\", \"type\": \"Vector<string>\" }], \"type\": \"PhoneCallProtocol\" }, { \"id\": 3968000320, \"predicate\": \"phone.phoneCall\", \"params\": [{ \"name\": \"phone_call\", \"type\": \"PhoneCall\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"phone.PhoneCall\" }, { \"id\": 4004045934, \"predicate\": \"upload.cdnFileReuploadNeeded\", \"params\": [{ \"name\": \"request_token\", \"type\": \"bytes\" }], \"type\": \"upload.CdnFile\" }, { \"id\": 2845821519, \"predicate\": \"upload.cdnFile\", \"params\": [{ \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"upload.CdnFile\" }, { \"id\": 3380800186, \"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<CdnPublicKey>\" }], \"type\": \"CdnConfig\" }, { \"id\": 3402727926, \"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\": 4085629430, \"predicate\": \"langPackDifference\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }, { \"name\": \"from_version\", \"type\": \"int\" }, { \"name\": \"version\", \"type\": \"int\" }, { \"name\": \"strings\", \"type\": \"Vector<LangPackString>\" }], \"type\": \"LangPackDifference\" }, { \"id\": 4006239459, \"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\": 3873421349, \"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\": 3924306968, \"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\": 4170676210, \"predicate\": \"channelAdminLogEventActionParticipantLeave\", \"params\": [], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 3810276568, \"predicate\": \"channelAdminLogEventActionParticipantInvite\", \"params\": [{ \"name\": \"participant\", \"type\": \"ChannelParticipant\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 3872931198, \"predicate\": \"channelAdminLogEventActionParticipantToggleBan\", \"params\": [{ \"name\": \"prev_participant\", \"type\": \"ChannelParticipant\" }, { \"name\": \"new_participant\", \"type\": \"ChannelParticipant\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 3580323600, \"predicate\": \"channelAdminLogEventActionParticipantToggleAdmin\", \"params\": [{ \"name\": \"prev_participant\", \"type\": \"ChannelParticipant\" }, { \"name\": \"new_participant\", \"type\": \"ChannelParticipant\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 2982398631, \"predicate\": \"channelAdminLogEventActionChangeStickerSet\", \"params\": [{ \"name\": \"prev_stickerset\", \"type\": \"InputStickerSet\" }, { \"name\": \"new_stickerset\", \"type\": \"InputStickerSet\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 1599903217, \"predicate\": \"channelAdminLogEventActionTogglePreHistoryHidden\", \"params\": [{ \"name\": \"new_value\", \"type\": \"Bool\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 771095562, \"predicate\": \"channelAdminLogEventActionDefaultBannedRights\", \"params\": [{ \"name\": \"prev_banned_rights\", \"type\": \"ChatBannedRights\" }, { \"name\": \"new_banned_rights\", \"type\": \"ChatBannedRights\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 2399639107, \"predicate\": \"channelAdminLogEventActionStopPoll\", \"params\": [{ \"name\": \"message\", \"type\": \"Message\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 2725218331, \"predicate\": \"channelAdminLogEventActionChangeLinkedChat\", \"params\": [{ \"name\": \"prev_value\", \"type\": \"int\" }, { \"name\": \"new_value\", \"type\": \"int\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 241923758, \"predicate\": \"channelAdminLogEventActionChangeLocation\", \"params\": [{ \"name\": \"prev_value\", \"type\": \"ChannelLocation\" }, { \"name\": \"new_value\", \"type\": \"ChannelLocation\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 1401984889, \"predicate\": \"channelAdminLogEventActionToggleSlowMode\", \"params\": [{ \"name\": \"prev_value\", \"type\": \"int\" }, { \"name\": \"new_value\", \"type\": \"int\" }], \"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\": 3985307469, \"predicate\": \"channels.adminLogResults\", \"params\": [{ \"name\": \"events\", \"type\": \"Vector<ChannelAdminLogEvent>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"channels.AdminLogResults\" }, { \"id\": 3926948580, \"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\": 1558266229, \"predicate\": \"popularContact\", \"params\": [{ \"name\": \"client_id\", \"type\": \"long\" }, { \"name\": \"importers\", \"type\": \"int\" }], \"type\": \"PopularContact\" }, { \"id\": 2660214483, \"predicate\": \"messages.favedStickersNotModified\", \"params\": [], \"type\": \"messages.FavedStickers\" }, { \"id\": 4085198614, \"predicate\": \"messages.favedStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"packs\", \"type\": \"Vector<StickerPack>\" }, { \"name\": \"stickers\", \"type\": \"Vector<Document>\" }], \"type\": \"messages.FavedStickers\" }, { \"id\": 1189204285, \"predicate\": \"recentMeUrlUnknown\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 2377921334, \"predicate\": \"recentMeUrlUser\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 2686132985, \"predicate\": \"recentMeUrlChat\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 3947431965, \"predicate\": \"recentMeUrlChatInvite\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"chat_invite\", \"type\": \"ChatInvite\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 3154794460, \"predicate\": \"recentMeUrlStickerSet\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"set\", \"type\": \"StickerSetCovered\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 235081943, \"predicate\": \"help.recentMeUrls\", \"params\": [{ \"name\": \"urls\", \"type\": \"Vector<RecentMeUrl>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"help.RecentMeUrls\" }, { \"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<MessageEntity>\" }], \"type\": \"InputSingleMedia\" }, { \"id\": 3402187762, \"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\": 3981887996, \"predicate\": \"account.webAuthorizations\", \"params\": [{ \"name\": \"authorizations\", \"type\": \"Vector<WebAuthorization>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"account.WebAuthorizations\" }, { \"id\": 2792792866, \"predicate\": \"inputMessageID\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }], \"type\": \"InputMessage\" }, { \"id\": 3134751637, \"predicate\": \"inputMessageReplyTo\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }], \"type\": \"InputMessage\" }, { \"id\": 2257003832, \"predicate\": \"inputMessagePinned\", \"params\": [], \"type\": \"InputMessage\" }, { \"id\": 4239064759, \"predicate\": \"inputDialogPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"InputDialogPeer\" }, { \"id\": 1684014375, \"predicate\": \"inputDialogPeerFolder\", \"params\": [{ \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"InputDialogPeer\" }, { \"id\": 3849174789, \"predicate\": \"dialogPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }], \"type\": \"DialogPeer\" }, { \"id\": 1363483106, \"predicate\": \"dialogPeerFolder\", \"params\": [{ \"name\": \"folder_id\", \"type\": \"int\" }], \"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<StickerSetCovered>\" }], \"type\": \"messages.FoundStickerSets\" }, { \"id\": 1648543603, \"predicate\": \"fileHash\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }, { \"name\": \"hash\", \"type\": \"bytes\" }], \"type\": \"FileHash\" }, { \"id\": 1968737087, \"predicate\": \"inputClientProxy\", \"params\": [{ \"name\": \"address\", \"type\": \"string\" }, { \"name\": \"port\", \"type\": \"int\" }], \"type\": \"InputClientProxy\" }, { \"id\": 3811614591, \"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\": 1679398724, \"predicate\": \"secureFileEmpty\", \"params\": [], \"type\": \"SecureFile\" }, { \"id\": 3760683618, \"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\": 2330640067, \"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\": 2636808675, \"predicate\": \"secureValueTypePersonalDetails\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 1034709504, \"predicate\": \"secureValueTypePassport\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 115615172, \"predicate\": \"secureValueTypeDriverLicense\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2698015819, \"predicate\": \"secureValueTypeIdentityCard\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2577698595, \"predicate\": \"secureValueTypeInternalPassport\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 3420659238, \"predicate\": \"secureValueTypeAddress\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 4231435598, \"predicate\": \"secureValueTypeUtilityBill\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2299755533, \"predicate\": \"secureValueTypeBankStatement\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2340959368, \"predicate\": \"secureValueTypeRentalAgreement\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2581823594, \"predicate\": \"secureValueTypePassportRegistration\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 3926060083, \"predicate\": \"secureValueTypeTemporaryRegistration\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 3005262555, \"predicate\": \"secureValueTypePhone\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2386339822, \"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<SecureFile>\" }, { \"name\": \"files\", \"type\": \"flags.4?Vector<SecureFile>\" }, { \"name\": \"plain_data\", \"type\": \"flags.5?SecurePlainData\" }, { \"name\": \"hash\", \"type\": \"bytes\" }], \"type\": \"SecureValue\" }, { \"id\": 3676426407, \"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<InputSecureFile>\" }, { \"name\": \"files\", \"type\": \"flags.4?Vector<InputSecureFile>\" }, { \"name\": \"plain_data\", \"type\": \"flags.5?SecurePlainData\" }], \"type\": \"InputSecureValue\" }, { \"id\": 3978218928, \"predicate\": \"secureValueHash\", \"params\": [{ \"name\": \"type\", \"type\": \"SecureValueType\" }, { \"name\": \"hash\", \"type\": \"bytes\" }], \"type\": \"SecureValueHash\" }, { \"id\": 3903065049, \"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\": 2257201829, \"predicate\": \"secureValueErrorReverseSide\", \"params\": [{ \"name\": \"type\", \"type\": \"SecureValueType\" }, { \"name\": \"file_hash\", \"type\": \"bytes\" }, { \"name\": \"text\", \"type\": \"string\" }], \"type\": \"SecureValueError\" }, { \"id\": 3845639894, \"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<bytes>\" }, { \"name\": \"text\", \"type\": \"string\" }], \"type\": \"SecureValueError\" }, { \"id\": 2258466191, \"predicate\": \"secureValueError\", \"params\": [{ \"name\": \"type\", \"type\": \"SecureValueType\" }, { \"name\": \"hash\", \"type\": \"bytes\" }, { \"name\": \"text\", \"type\": \"string\" }], \"type\": \"SecureValueError\" }, { \"id\": 2702460784, \"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<bytes>\" }, { \"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\": 2905480408, \"predicate\": \"account.authorizationForm\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"required_types\", \"type\": \"Vector<SecureRequiredType>\" }, { \"name\": \"values\", \"type\": \"Vector<SecureValue>\" }, { \"name\": \"errors\", \"type\": \"Vector<SecureValueError>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"privacy_policy_url\", \"type\": \"flags.0?string\" }], \"type\": \"account.AuthorizationForm\" }, { \"id\": 2166326607, \"predicate\": \"account.sentEmailCode\", \"params\": [{ \"name\": \"email_pattern\", \"type\": \"string\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"account.SentEmailCode\" }, { \"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<MessageEntity>\" }], \"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\": 3562713238, \"predicate\": \"passwordKdfAlgoUnknown\", \"params\": [], \"type\": \"PasswordKdfAlgo\" }, { \"id\": 982592842, \"predicate\": \"passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow\", \"params\": [{ \"name\": \"salt1\", \"type\": \"bytes\" }, { \"name\": \"salt2\", \"type\": \"bytes\" }, { \"name\": \"g\", \"type\": \"int\" }, { \"name\": \"p\", \"type\": \"bytes\" }], \"type\": \"PasswordKdfAlgo\" }, { \"id\": 4883767, \"predicate\": \"securePasswordKdfAlgoUnknown\", \"params\": [], \"type\": \"SecurePasswordKdfAlgo\" }, { \"id\": 3153255840, \"predicate\": \"securePasswordKdfAlgoPBKDF2HMACSHA512iter100000\", \"params\": [{ \"name\": \"salt\", \"type\": \"bytes\" }], \"type\": \"SecurePasswordKdfAlgo\" }, { \"id\": 2252807570, \"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\": 2558588504, \"predicate\": \"inputCheckPasswordEmpty\", \"params\": [], \"type\": \"InputCheckPasswordSRP\" }, { \"id\": 3531600002, \"predicate\": \"inputCheckPasswordSRP\", \"params\": [{ \"name\": \"srp_id\", \"type\": \"long\" }, { \"name\": \"A\", \"type\": \"bytes\" }, { \"name\": \"M1\", \"type\": \"bytes\" }], \"type\": \"InputCheckPasswordSRP\" }, { \"id\": 2191366618, \"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<SecureRequiredType>\" }], \"type\": \"SecureRequiredType\" }, { \"id\": 3216634967, \"predicate\": \"help.passportConfigNotModified\", \"params\": [], \"type\": \"help.PassportConfig\" }, { \"id\": 2694370991, \"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\": 3235781593, \"predicate\": \"jsonObjectValue\", \"params\": [{ \"name\": \"key\", \"type\": \"string\" }, { \"name\": \"value\", \"type\": \"JSONValue\" }], \"type\": \"JSONObjectValue\" }, { \"id\": 1064139624, \"predicate\": \"jsonNull\", \"params\": [], \"type\": \"JSONValue\" }, { \"id\": 3342098026, \"predicate\": \"jsonBool\", \"params\": [{ \"name\": \"value\", \"type\": \"Bool\" }], \"type\": \"JSONValue\" }, { \"id\": 736157604, \"predicate\": \"jsonNumber\", \"params\": [{ \"name\": \"value\", \"type\": \"double\" }], \"type\": \"JSONValue\" }, { \"id\": 3072226938, \"predicate\": \"jsonString\", \"params\": [{ \"name\": \"value\", \"type\": \"string\" }], \"type\": \"JSONValue\" }, { \"id\": 4148447075, \"predicate\": \"jsonArray\", \"params\": [{ \"name\": \"value\", \"type\": \"Vector<JSONValue>\" }], \"type\": \"JSONValue\" }, { \"id\": 2579616925, \"predicate\": \"jsonObject\", \"params\": [{ \"name\": \"value\", \"type\": \"Vector<JSONObjectValue>\" }], \"type\": \"JSONValue\" }, { \"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\": 3770729957, \"predicate\": \"pageTableRow\", \"params\": [{ \"name\": \"cells\", \"type\": \"Vector<PageTableCell>\" }], \"type\": \"PageTableRow\" }, { \"id\": 1869903447, \"predicate\": \"pageCaption\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }, { \"name\": \"credit\", \"type\": \"RichText\" }], \"type\": \"PageCaption\" }, { \"id\": 3106911949, \"predicate\": \"pageListItemText\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageListItem\" }, { \"id\": 635466748, \"predicate\": \"pageListItemBlocks\", \"params\": [{ \"name\": \"blocks\", \"type\": \"Vector<PageBlock>\" }], \"type\": \"PageListItem\" }, { \"id\": 1577484359, \"predicate\": \"pageListOrderedItemText\", \"params\": [{ \"name\": \"num\", \"type\": \"string\" }, { \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageListOrderedItem\" }, { \"id\": 2564655414, \"predicate\": \"pageListOrderedItemBlocks\", \"params\": [{ \"name\": \"num\", \"type\": \"string\" }, { \"name\": \"blocks\", \"type\": \"Vector<PageBlock>\" }], \"type\": \"PageListOrderedItem\" }, { \"id\": 3012615176, \"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\": 2556788493, \"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<PageBlock>\" }, { \"name\": \"photos\", \"type\": \"Vector<Photo>\" }, { \"name\": \"documents\", \"type\": \"Vector<Document>\" }, { \"name\": \"views\", \"type\": \"flags.3?int\" }], \"type\": \"Page\" }, { \"id\": 2349199817, \"predicate\": \"help.supportName\", \"params\": [{ \"name\": \"name\", \"type\": \"string\" }], \"type\": \"help.SupportName\" }, { \"id\": 4088278765, \"predicate\": \"help.userInfoEmpty\", \"params\": [], \"type\": \"help.UserInfo\" }, { \"id\": 32192344, \"predicate\": \"help.userInfo\", \"params\": [{ \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"Vector<MessageEntity>\" }, { \"name\": \"author\", \"type\": \"string\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"help.UserInfo\" }, { \"id\": 1823064809, \"predicate\": \"pollAnswer\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }, { \"name\": \"option\", \"type\": \"bytes\" }], \"type\": \"PollAnswer\" }, { \"id\": 2262925665, \"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<PollAnswer>\" }, { \"name\": \"close_period\", \"type\": \"flags.4?int\" }, { \"name\": \"close_date\", \"type\": \"flags.5?int\" }], \"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\": 3135029667, \"predicate\": \"pollResults\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"min\", \"type\": \"flags.0?true\" }, { \"name\": \"results\", \"type\": \"flags.1?Vector<PollAnswerVoters>\" }, { \"name\": \"total_voters\", \"type\": \"flags.2?int\" }, { \"name\": \"recent_voters\", \"type\": \"flags.3?Vector<int>\" }, { \"name\": \"solution\", \"type\": \"flags.4?string\" }, { \"name\": \"solution_entities\", \"type\": \"flags.4?Vector<MessageEntity>\" }], \"type\": \"PollResults\" }, { \"id\": 4030849616, \"predicate\": \"chatOnlines\", \"params\": [{ \"name\": \"onlines\", \"type\": \"int\" }], \"type\": \"ChatOnlines\" }, { \"id\": 1202287072, \"predicate\": \"statsURL\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"type\": \"StatsURL\" }, { \"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\": 2668758040, \"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\": 3861952889, \"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\": 2217196460, \"predicate\": \"inputWallPaperNoFile\", \"params\": [], \"type\": \"InputWallPaper\" }, { \"id\": 471437699, \"predicate\": \"account.wallPapersNotModified\", \"params\": [], \"type\": \"account.WallPapers\" }, { \"id\": 1881892265, \"predicate\": \"account.wallPapers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"wallpapers\", \"type\": \"Vector<WallPaper>\" }], \"type\": \"account.WallPapers\" }, { \"id\": 3737042563, \"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\": 3762434803, \"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\": 3585325561, \"predicate\": \"emojiKeyword\", \"params\": [{ \"name\": \"keyword\", \"type\": \"string\" }, { \"name\": \"emoticons\", \"type\": \"Vector<string>\" }], \"type\": \"EmojiKeyword\" }, { \"id\": 594408994, \"predicate\": \"emojiKeywordDeleted\", \"params\": [{ \"name\": \"keyword\", \"type\": \"string\" }, { \"name\": \"emoticons\", \"type\": \"Vector<string>\" }], \"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<EmojiKeyword>\" }], \"type\": \"EmojiKeywordsDifference\" }, { \"id\": 2775937949, \"predicate\": \"emojiURL\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"type\": \"EmojiURL\" }, { \"id\": 3019592545, \"predicate\": \"emojiLanguage\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"EmojiLanguage\" }, { \"id\": 3162490573, \"predicate\": \"fileLocationToBeDeprecated\", \"params\": [{ \"name\": \"volume_id\", \"type\": \"long\" }, { \"name\": \"local_id\", \"type\": \"int\" }], \"type\": \"FileLocation\" }, { \"id\": 4283715173, \"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\": 4224893590, \"predicate\": \"inputFolderPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"InputFolderPeer\" }, { \"id\": 3921323624, \"predicate\": \"folderPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"FolderPeer\" }, { \"id\": 3896830975, \"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\": 2463316494, \"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\": 2408320590, \"predicate\": \"urlAuthResultAccepted\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"type\": \"UrlAuthResult\" }, { \"id\": 2849430303, \"predicate\": \"urlAuthResultDefault\", \"params\": [], \"type\": \"UrlAuthResult\" }, { \"id\": 3216354699, \"predicate\": \"channelLocationEmpty\", \"params\": [], \"type\": \"ChannelLocation\" }, { \"id\": 547062491, \"predicate\": \"channelLocation\", \"params\": [{ \"name\": \"geo_point\", \"type\": \"GeoPoint\" }, { \"name\": \"address\", \"type\": \"string\" }], \"type\": \"ChannelLocation\" }, { \"id\": 3393592157, \"predicate\": \"peerLocated\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"expires\", \"type\": \"int\" }, { \"name\": \"distance\", \"type\": \"int\" }], \"type\": \"PeerLocated\" }, { \"id\": 4176226379, \"predicate\": \"peerSelfLocated\", \"params\": [{ \"name\": \"expires\", \"type\": \"int\" }], \"type\": \"PeerLocated\" }, { \"id\": 3497176244, \"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\": 4119399921, \"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\": 4095653410, \"predicate\": \"account.themesNotModified\", \"params\": [], \"type\": \"account.Themes\" }, { \"id\": 2137482273, \"predicate\": \"account.themes\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"themes\", \"type\": \"Vector<Theme>\" }], \"type\": \"account.Themes\" }, { \"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\": 2837970629, \"predicate\": \"messages.inactiveChats\", \"params\": [{ \"name\": \"dates\", \"type\": \"Vector<int>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.InactiveChats\" }, { \"id\": 3282117730, \"predicate\": \"baseThemeClassic\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 4225242760, \"predicate\": \"baseThemeDay\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 3081969320, \"predicate\": \"baseThemeNight\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 1834973166, \"predicate\": \"baseThemeTinted\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 1527845466, \"predicate\": \"baseThemeArctic\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 3176168657, \"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\": 2618595402, \"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<Document>\" }, { \"name\": \"settings\", \"type\": \"flags.1?ThemeSettings\" }], \"type\": \"WebPageAttribute\" }, { \"id\": 2727236953, \"predicate\": \"messageUserVote\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"option\", \"type\": \"bytes\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"MessageUserVote\" }, { \"id\": 909603888, \"predicate\": \"messageUserVoteInputOption\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"MessageUserVote\" }, { \"id\": 244310238, \"predicate\": \"messageUserVoteMultiple\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"options\", \"type\": \"Vector<bytes>\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"MessageUserVote\" }, { \"id\": 136574537, \"predicate\": \"messages.votesList\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"votes\", \"type\": \"Vector<MessageUserVote>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"next_offset\", \"type\": \"flags.0?string\" }], \"type\": \"messages.VotesList\" }, { \"id\": 4117234314, \"predicate\": \"bankCardOpenUrl\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"name\", \"type\": \"string\" }], \"type\": \"BankCardOpenUrl\" }, { \"id\": 1042605427, \"predicate\": \"payments.bankCardData\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"open_urls\", \"type\": \"Vector<BankCardOpenUrl>\" }], \"type\": \"payments.BankCardData\" }, { \"id\": 1949890536, \"predicate\": \"dialogFilter\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"contacts\", \"type\": \"flags.0?true\" }, { \"name\": \"non_contacts\", \"type\": \"flags.1?true\" }, { \"name\": \"groups\", \"type\": \"flags.2?true\" }, { \"name\": \"broadcasts\", \"type\": \"flags.3?true\" }, { \"name\": \"bots\", \"type\": \"flags.4?true\" }, { \"name\": \"exclude_muted\", \"type\": \"flags.11?true\" }, { \"name\": \"exclude_read\", \"type\": \"flags.12?true\" }, { \"name\": \"exclude_archived\", \"type\": \"flags.13?true\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"emoticon\", \"type\": \"flags.25?string\" }, { \"name\": \"pinned_peers\", \"type\": \"Vector<InputPeer>\" }, { \"name\": \"include_peers\", \"type\": \"Vector<InputPeer>\" }, { \"name\": \"exclude_peers\", \"type\": \"Vector<InputPeer>\" }], \"type\": \"DialogFilter\" }, { \"id\": 2004110666, \"predicate\": \"dialogFilterSuggested\", \"params\": [{ \"name\": \"filter\", \"type\": \"DialogFilter\" }, { \"name\": \"description\", \"type\": \"string\" }], \"type\": \"DialogFilterSuggested\" }, { \"id\": 3057118639, \"predicate\": \"statsDateRangeDays\", \"params\": [{ \"name\": \"min_date\", \"type\": \"int\" }, { \"name\": \"max_date\", \"type\": \"int\" }], \"type\": \"StatsDateRangeDays\" }, { \"id\": 3410210014, \"predicate\": \"statsAbsValueAndPrev\", \"params\": [{ \"name\": \"current\", \"type\": \"double\" }, { \"name\": \"previous\", \"type\": \"double\" }], \"type\": \"StatsAbsValueAndPrev\" }, { \"id\": 3419287520, \"predicate\": \"statsPercentValue\", \"params\": [{ \"name\": \"part\", \"type\": \"double\" }, { \"name\": \"total\", \"type\": \"double\" }], \"type\": \"StatsPercentValue\" }, { \"id\": 1244130093, \"predicate\": \"statsGraphAsync\", \"params\": [{ \"name\": \"token\", \"type\": \"string\" }], \"type\": \"StatsGraph\" }, { \"id\": 3202127906, \"predicate\": \"statsGraphError\", \"params\": [{ \"name\": \"error\", \"type\": \"string\" }], \"type\": \"StatsGraph\" }, { \"id\": 2393138358, \"predicate\": \"statsGraph\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"json\", \"type\": \"DataJSON\" }, { \"name\": \"zoom_token\", \"type\": \"flags.0?string\" }], \"type\": \"StatsGraph\" }, { \"id\": 2907687357, \"predicate\": \"messageInteractionCounters\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"views\", \"type\": \"int\" }, { \"name\": \"forwards\", \"type\": \"int\" }], \"type\": \"MessageInteractionCounters\" }, { \"id\": 3187114900, \"predicate\": \"stats.broadcastStats\", \"params\": [{ \"name\": \"period\", \"type\": \"StatsDateRangeDays\" }, { \"name\": \"followers\", \"type\": \"StatsAbsValueAndPrev\" }, { \"name\": \"views_per_post\", \"type\": \"StatsAbsValueAndPrev\" }, { \"name\": \"shares_per_post\", \"type\": \"StatsAbsValueAndPrev\" }, { \"name\": \"enabled_notifications\", \"type\": \"StatsPercentValue\" }, { \"name\": \"growth_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"followers_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"mute_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"top_hours_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"interactions_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"iv_interactions_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"views_by_source_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"new_followers_by_source_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"languages_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"recent_message_interactions\", \"type\": \"Vector<MessageInteractionCounters>\" }], \"type\": \"stats.BroadcastStats\" }, { \"id\": 2566302837, \"predicate\": \"help.promoDataEmpty\", \"params\": [{ \"name\": \"expires\", \"type\": \"int\" }], \"type\": \"help.PromoData\" }, { \"id\": 2352576831, \"predicate\": \"help.promoData\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"proxy\", \"type\": \"flags.0?true\" }, { \"name\": \"expires\", \"type\": \"int\" }, { \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"psa_type\", \"type\": \"flags.1?string\" }, { \"name\": \"psa_message\", \"type\": \"flags.2?string\" }], \"type\": \"help.PromoData\" }], \"methods\": [{ \"id\": 3416209197, \"method\": \"invokeAfterMsg\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"long\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 1036301552, \"method\": \"invokeAfterMsgs\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector<long>\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 3251461801, \"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\": \"params\", \"type\": \"flags.1?JSONValue\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 3667594509, \"method\": \"invokeWithLayer\", \"params\": [{ \"name\": \"layer\", \"type\": \"int\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 3214170551, \"method\": \"invokeWithoutUpdates\", \"params\": [{ \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 911373810, \"method\": \"invokeWithMessagesRange\", \"params\": [{ \"name\": \"range\", \"type\": \"MessageRange\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 2896821550, \"method\": \"invokeWithTakeout\", \"params\": [{ \"name\": \"takeout_id\", \"type\": \"long\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 2792825935, \"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\": 2163139623, \"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\": 3168081281, \"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\": 2678787354, \"method\": \"auth.resetAuthorizations\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 3854565325, \"method\": \"auth.exportAuthorization\", \"params\": [{ \"name\": \"dc_id\", \"type\": \"int\" }], \"type\": \"auth.ExportedAuthorization\" }, { \"id\": 3824129555, \"method\": \"auth.importAuthorization\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"auth.Authorization\" }, { \"id\": 3453233669, \"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\": 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\": 3515567382, \"method\": \"auth.checkPassword\", \"params\": [{ \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }], \"type\": \"auth.Authorization\" }, { \"id\": 3633822822, \"method\": \"auth.requestPasswordRecovery\", \"params\": [], \"type\": \"auth.PasswordRecovery\" }, { \"id\": 1319464594, \"method\": \"auth.recoverPassword\", \"params\": [{ \"name\": \"code\", \"type\": \"string\" }], \"type\": \"auth.Authorization\" }, { \"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\": 2387124616, \"method\": \"auth.dropTempAuthKeys\", \"params\": [{ \"name\": \"except_auth_keys\", \"type\": \"Vector<long>\" }], \"type\": \"Bool\" }, { \"id\": 2981369111, \"method\": \"auth.exportLoginToken\", \"params\": [{ \"name\": \"api_id\", \"type\": \"int\" }, { \"name\": \"api_hash\", \"type\": \"string\" }, { \"name\": \"except_ids\", \"type\": \"Vector<int>\" }], \"type\": \"auth.LoginToken\" }, { \"id\": 2511101156, \"method\": \"auth.importLoginToken\", \"params\": [{ \"name\": \"token\", \"type\": \"bytes\" }], \"type\": \"auth.LoginToken\" }, { \"id\": 3902057805, \"method\": \"auth.acceptLoginToken\", \"params\": [{ \"name\": \"token\", \"type\": \"bytes\" }], \"type\": \"Authorization\" }, { \"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<int>\" }], \"type\": \"Bool\" }, { \"id\": 813089983, \"method\": \"account.unregisterDevice\", \"params\": [{ \"name\": \"token_type\", \"type\": \"int\" }, { \"name\": \"token\", \"type\": \"string\" }, { \"name\": \"other_uids\", \"type\": \"Vector<int>\" }], \"type\": \"Bool\" }, { \"id\": 2227067795, \"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\": 3682473799, \"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\": 2864387939, \"method\": \"account.getWallPapers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"account.WallPapers\" }, { \"id\": 2920848735, \"method\": \"account.reportPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"reason\", \"type\": \"ReportReason\" }], \"type\": \"Bool\" }, { \"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\": 3671837008, \"method\": \"account.getPrivacy\", \"params\": [{ \"name\": \"key\", \"type\": \"InputPrivacyKey\" }], \"type\": \"account.PrivacyRules\" }, { \"id\": 3388480744, \"method\": \"account.setPrivacy\", \"params\": [{ \"name\": \"key\", \"type\": \"InputPrivacyKey\" }, { \"name\": \"rules\", \"type\": \"Vector<InputPrivacyRule>\" }], \"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\": 2186758885, \"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\": 954152242, \"method\": \"account.updateDeviceLocked\", \"params\": [{ \"name\": \"period\", \"type\": \"int\" }], \"type\": \"Bool\" }, { \"id\": 3810574680, \"method\": \"account.getAuthorizations\", \"params\": [], \"type\": \"account.Authorizations\" }, { \"id\": 3749180348, \"method\": \"account.resetAuthorization\", \"params\": [{ \"name\": \"hash\", \"type\": \"long\" }], \"type\": \"Bool\" }, { \"id\": 1418342645, \"method\": \"account.getPassword\", \"params\": [], \"type\": \"account.Password\" }, { \"id\": 2631199481, \"method\": \"account.getPasswordSettings\", \"params\": [{ \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }], \"type\": \"account.PasswordSettings\" }, { \"id\": 2778402863, \"method\": \"account.updatePasswordSettings\", \"params\": [{ \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }, { \"name\": \"new_settings\", \"type\": \"account.PasswordInputSettings\" }], \"type\": \"Bool\" }, { \"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\": 1151208273, \"method\": \"account.getTmpPassword\", \"params\": [{ \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }, { \"name\": \"period\", \"type\": \"int\" }], \"type\": \"account.TmpPassword\" }, { \"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\": 2995305597, \"method\": \"account.getAllSecureValues\", \"params\": [], \"type\": \"Vector<SecureValue>\" }, { \"id\": 1936088002, \"method\": \"account.getSecureValue\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector<SecureValueType>\" }], \"type\": \"Vector<SecureValue>\" }, { \"id\": 2308956957, \"method\": \"account.saveSecureValue\", \"params\": [{ \"name\": \"value\", \"type\": \"InputSecureValue\" }, { \"name\": \"secure_secret_id\", \"type\": \"long\" }], \"type\": \"SecureValue\" }, { \"id\": 3095444555, \"method\": \"account.deleteSecureValue\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector<SecureValueType>\" }], \"type\": \"Bool\" }, { \"id\": 3094063329, \"method\": \"account.getAuthorizationForm\", \"params\": [{ \"name\": \"bot_id\", \"type\": \"int\" }, { \"name\": \"scope\", \"type\": \"string\" }, { \"name\": \"public_key\", \"type\": \"string\" }], \"type\": \"account.AuthorizationForm\" }, { \"id\": 3875699860, \"method\": \"account.acceptAuthorization\", \"params\": [{ \"name\": \"bot_id\", \"type\": \"int\" }, { \"name\": \"scope\", \"type\": \"string\" }, { \"name\": \"public_key\", \"type\": \"string\" }, { \"name\": \"value_hashes\", \"type\": \"Vector<SecureValueHash>\" }, { \"name\": \"credentials\", \"type\": \"SecureCredentialsEncrypted\" }], \"type\": \"Bool\" }, { \"id\": 2778945273, \"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\": 3971627483, \"method\": \"account.verifyEmail\", \"params\": [{ \"name\": \"email\", \"type\": \"string\" }, { \"name\": \"code\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 4032514052, \"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\": 2413762848, \"method\": \"account.confirmPasswordEmail\", \"params\": [{ \"name\": \"code\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 2055154197, \"method\": \"account.resendPasswordEmail\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 3251361206, \"method\": \"account.cancelPasswordEmail\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 2668087080, \"method\": \"account.getContactSignUpNotification\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 3488890721, \"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\": 4237155306, \"method\": \"account.getWallPaper\", \"params\": [{ \"name\": \"wallpaper\", \"type\": \"InputWallPaper\" }], \"type\": \"WallPaper\" }, { \"id\": 3716494945, \"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\": 4276967273, \"method\": \"account.installWallPaper\", \"params\": [{ \"name\": \"wallpaper\", \"type\": \"InputWallPaper\" }, { \"name\": \"settings\", \"type\": \"WallPaperSettings\" }], \"type\": \"Bool\" }, { \"id\": 3141244932, \"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\": 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\": 2217919007, \"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\": 4065792108, \"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\": 2375906347, \"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\": 3044323691, \"method\": \"account.setContentSettings\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"sensitive_enabled\", \"type\": \"flags.0?true\" }], \"type\": \"Bool\" }, { \"id\": 2342210990, \"method\": \"account.getContentSettings\", \"params\": [], \"type\": \"account.ContentSettings\" }, { \"id\": 1705865692, \"method\": \"account.getMultiWallPapers\", \"params\": [{ \"name\": \"wallpapers\", \"type\": \"Vector<InputWallPaper>\" }], \"type\": \"Vector<WallPaper>\" }, { \"id\": 227648840, \"method\": \"users.getUsers\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<InputUser>\" }], \"type\": \"Vector<User>\" }, { \"id\": 3392185777, \"method\": \"users.getFullUser\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"UserFull\" }, { \"id\": 2429064373, \"method\": \"users.setSecureValueErrors\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }, { \"name\": \"errors\", \"type\": \"Vector<SecureValueError>\" }], \"type\": \"Bool\" }, { \"id\": 749357634, \"method\": \"contacts.getContactIDs\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"Vector<int>\" }, { \"id\": 3299038190, \"method\": \"contacts.getStatuses\", \"params\": [], \"type\": \"Vector<ContactStatus>\" }, { \"id\": 3223553183, \"method\": \"contacts.getContacts\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"contacts.Contacts\" }, { \"id\": 746589157, \"method\": \"contacts.importContacts\", \"params\": [{ \"name\": \"contacts\", \"type\": \"Vector<InputContact>\" }], \"type\": \"contacts.ImportedContacts\" }, { \"id\": 157945344, \"method\": \"contacts.deleteContacts\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<InputUser>\" }], \"type\": \"Updates\" }, { \"id\": 269745566, \"method\": \"contacts.deleteByPhones\", \"params\": [{ \"name\": \"phones\", \"type\": \"Vector<string>\" }], \"type\": \"Bool\" }, { \"id\": 858475004, \"method\": \"contacts.block\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"Bool\" }, { \"id\": 3846242493, \"method\": \"contacts.unblock\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"Bool\" }, { \"id\": 4118557967, \"method\": \"contacts.getBlocked\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 301470424, \"method\": \"contacts.search\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"contacts.Found\" }, { \"id\": 4181511075, \"method\": \"contacts.resolveUsername\", \"params\": [{ \"name\": \"username\", \"type\": \"string\" }], \"type\": \"contacts.ResolvedPeer\" }, { \"id\": 3566742965, \"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\": 2274703345, \"method\": \"contacts.resetSaved\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 2196890527, \"method\": \"contacts.getSaved\", \"params\": [], \"type\": \"Vector<SavedContact>\" }, { \"id\": 2232729050, \"method\": \"contacts.toggleTopPeers\", \"params\": [{ \"name\": \"enabled\", \"type\": \"Bool\" }], \"type\": \"Bool\" }, { \"id\": 3908330448, \"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\": 4164002319, \"method\": \"contacts.acceptContact\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"Updates\" }, { \"id\": 3544759364, \"method\": \"contacts.getLocated\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"background\", \"type\": \"flags.1?true\" }, { \"name\": \"geo_point\", \"type\": \"InputGeoPoint\" }, { \"name\": \"self_expires\", \"type\": \"flags.0?int\" }], \"type\": \"Updates\" }, { \"id\": 1673946374, \"method\": \"messages.getMessages\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<InputMessage>\" }], \"type\": \"messages.Messages\" }, { \"id\": 2699967347, \"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\": 3703276128, \"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\": 2249518952, \"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\": 3851326930, \"method\": \"messages.deleteMessages\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"revoke\", \"type\": \"flags.0?true\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.AffectedMessages\" }, { \"id\": 94983360, \"method\": \"messages.receivedMessages\", \"params\": [{ \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Vector<ReceivedNotifyMessage>\" }, { \"id\": 2743230032, \"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<MessageEntity>\" }, { \"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<MessageEntity>\" }, { \"name\": \"schedule_date\", \"type\": \"flags.10?int\" }], \"type\": \"Updates\" }, { \"id\": 3657360910, \"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<int>\" }, { \"name\": \"random_id\", \"type\": \"Vector<long>\" }, { \"name\": \"to_peer\", \"type\": \"InputPeer\" }, { \"name\": \"schedule_date\", \"type\": \"flags.10?int\" }], \"type\": \"Updates\" }, { \"id\": 3474297563, \"method\": \"messages.reportSpam\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"Bool\" }, { \"id\": 913498268, \"method\": \"messages.getPeerSettings\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"PeerSettings\" }, { \"id\": 3179460184, \"method\": \"messages.report\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }, { \"name\": \"reason\", \"type\": \"ReportReason\" }], \"type\": \"Bool\" }, { \"id\": 1013621127, \"method\": \"messages.getChats\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.Chats\" }, { \"id\": 998448230, \"method\": \"messages.getFullChat\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"messages.ChatFull\" }, { \"id\": 3695519829, \"method\": \"messages.editChatTitle\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"title\", \"type\": \"string\" }], \"type\": \"Updates\" }, { \"id\": 3394009560, \"method\": \"messages.editChatPhoto\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"photo\", \"type\": \"InputChatPhoto\" }], \"type\": \"Updates\" }, { \"id\": 4188056073, \"method\": \"messages.addChatUser\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }, { \"name\": \"fwd_limit\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 3764461334, \"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<InputUser>\" }, { \"name\": \"title\", \"type\": \"string\" }], \"type\": \"Updates\" }, { \"id\": 651135312, \"method\": \"messages.getDhConfig\", \"params\": [{ \"name\": \"version\", \"type\": \"int\" }, { \"name\": \"random_length\", \"type\": \"int\" }], \"type\": \"messages.DhConfig\" }, { \"id\": 4132286275, \"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\": 3990430661, \"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\": 2843174771, \"method\": \"messages.sendEncrypted\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputEncryptedChat\" }, { \"name\": \"random_id\", \"type\": \"long\" }, { \"name\": \"data\", \"type\": \"bytes\" }], \"type\": \"messages.SentEncryptedMessage\" }, { \"id\": 2593135462, \"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<long>\" }, { \"id\": 1259113487, \"method\": \"messages.reportEncryptedSpam\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputEncryptedChat\" }], \"type\": \"Bool\" }, { \"id\": 916930423, \"method\": \"messages.readMessageContents\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.AffectedMessages\" }, { \"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\": 2338894028, \"method\": \"messages.getWebPagePreview\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.3?Vector<MessageEntity>\" }], \"type\": \"MessageMedia\" }, { \"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\": 3348096096, \"method\": \"messages.installStickerSet\", \"params\": [{ \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }, { \"name\": \"archived\", \"type\": \"Bool\" }], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 4184757726, \"method\": \"messages.uninstallStickerSet\", \"params\": [{ \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }], \"type\": \"Bool\" }, { \"id\": 3873403768, \"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\": 3301483869, \"method\": \"messages.getMessagesViews\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }, { \"name\": \"increment\", \"type\": \"Bool\" }], \"type\": \"Vector<int>\" }, { \"id\": 2850463534, \"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\": 3211928996, \"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<long>\" }], \"type\": \"Bool\" }, { \"id\": 864953444, \"method\": \"messages.getDocumentByHash\", \"params\": [{ \"name\": \"sha256\", \"type\": \"bytes\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }], \"type\": \"Document\" }, { \"id\": 3214571371, \"method\": \"messages.searchGifs\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"messages.FoundGifs\" }, { \"id\": 2210348370, \"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\": 3948847622, \"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<InputBotInlineResult>\" }, { \"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\": 4255550774, \"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<MessageEntity>\" }, { \"name\": \"schedule_date\", \"type\": \"flags.15?int\" }], \"type\": \"Updates\" }, { \"id\": 2203418042, \"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<MessageEntity>\" }], \"type\": \"Bool\" }, { \"id\": 2164957164, \"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\": 3582923530, \"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\": 3832593661, \"method\": \"messages.getPeerDialogs\", \"params\": [{ \"name\": \"peers\", \"type\": \"Vector<InputDialogPeer>\" }], \"type\": \"messages.PeerDialogs\" }, { \"id\": 3157909835, \"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<MessageEntity>\" }], \"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<long>\" }], \"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\": 2308530221, \"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\": 1706608543, \"method\": \"messages.getMaskStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.AllStickers\" }, { \"id\": 3428542412, \"method\": \"messages.getAttachedStickers\", \"params\": [{ \"name\": \"media\", \"type\": \"InputStickeredMedia\" }], \"type\": \"Vector<StickerSetCovered>\" }, { \"id\": 2398678208, \"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\": 3894568093, \"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\": 3953659888, \"method\": \"messages.getAllChats\", \"params\": [{ \"name\": \"except_ids\", \"type\": \"Vector<int>\" }], \"type\": \"messages.Chats\" }, { \"id\": 852135825, \"method\": \"messages.getWebPage\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"WebPage\" }, { \"id\": 2805064279, \"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<InputDialogPeer>\" }], \"type\": \"Bool\" }, { \"id\": 3602468338, \"method\": \"messages.getPinnedDialogs\", \"params\": [{ \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"messages.PeerDialogs\" }, { \"id\": 3858133754, \"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<ShippingOption>\" }], \"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\": 1369162417, \"method\": \"messages.uploadMedia\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"media\", \"type\": \"InputMedia\" }], \"type\": \"MessageMedia\" }, { \"id\": 3380473888, \"method\": \"messages.sendScreenshotNotification\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"reply_to_msg_id\", \"type\": \"int\" }, { \"name\": \"random_id\", \"type\": \"long\" }], \"type\": \"Updates\" }, { \"id\": 567151374, \"method\": \"messages.getFavedStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.FavedStickers\" }, { \"id\": 3120547163, \"method\": \"messages.faveSticker\", \"params\": [{ \"name\": \"id\", \"type\": \"InputDocument\" }, { \"name\": \"unfave\", \"type\": \"Bool\" }], \"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\": 251759059, \"method\": \"messages.readMentions\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"messages.AffectedHistory\" }, { \"id\": 3150207753, \"method\": \"messages.getRecentLocations\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"limit\", \"type\": \"int\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.Messages\" }, { \"id\": 3422621899, \"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<InputSingleMedia>\" }, { \"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\": 3266826379, \"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\": 486505992, \"method\": \"messages.getSplitRanges\", \"params\": [], \"type\": \"Vector<MessageRange>\" }, { \"id\": 3263617423, \"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<DialogPeer>\" }, { \"id\": 2119757468, \"method\": \"messages.clearAllDrafts\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 3534419948, \"method\": \"messages.updatePinnedMessage\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"silent\", \"type\": \"flags.0?true\" }, { \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 283795844, \"method\": \"messages.sendVote\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"options\", \"type\": \"Vector<bytes>\" }], \"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\": 2167155430, \"method\": \"messages.getStatsURL\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"dark\", \"type\": \"flags.0?true\" }, { \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"params\", \"type\": \"string\" }], \"type\": \"StatsURL\" }, { \"id\": 3740665751, \"method\": \"messages.editChatAbout\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"about\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 2777049921, \"method\": \"messages.editChatDefaultBannedRights\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"banned_rights\", \"type\": \"ChatBannedRights\" }], \"type\": \"Updates\" }, { \"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<string>\" }], \"type\": \"Vector<EmojiLanguage>\" }, { \"id\": 3585149990, \"method\": \"messages.getEmojiURL\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"EmojiURL\" }, { \"id\": 1932455680, \"method\": \"messages.getSearchCounters\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"filters\", \"type\": \"Vector<MessagesFilter>\" }], \"type\": \"Vector<messages.SearchCounter>\" }, { \"id\": 3812578835, \"method\": \"messages.requestUrlAuth\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"button_id\", \"type\": \"int\" }], \"type\": \"UrlAuthResult\" }, { \"id\": 4146719384, \"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\": 3804391515, \"method\": \"messages.getScheduledHistory\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.Messages\" }, { \"id\": 3183150180, \"method\": \"messages.getScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.Messages\" }, { \"id\": 3174597898, \"method\": \"messages.sendScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"Updates\" }, { \"id\": 1504586518, \"method\": \"messages.deleteScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"Updates\" }, { \"id\": 3094231054, \"method\": \"messages.getPollVotes\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"option\", \"type\": \"flags.0?bytes\" }, { \"name\": \"offset\", \"type\": \"flags.1?string\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"messages.VotesList\" }, { \"id\": 3037016042, \"method\": \"messages.toggleStickerSets\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"uninstall\", \"type\": \"flags.0?true\" }, { \"name\": \"archive\", \"type\": \"flags.1?true\" }, { \"name\": \"unarchive\", \"type\": \"flags.2?true\" }, { \"name\": \"stickersets\", \"type\": \"Vector<InputStickerSet>\" }], \"type\": \"Bool\" }, { \"id\": 4053719405, \"method\": \"messages.getDialogFilters\", \"params\": [], \"type\": \"Vector<DialogFilter>\" }, { \"id\": 2728186924, \"method\": \"messages.getSuggestedDialogFilters\", \"params\": [], \"type\": \"Vector<DialogFilterSuggested>\" }, { \"id\": 450142282, \"method\": \"messages.updateDialogFilter\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"filter\", \"type\": \"flags.0?DialogFilter\" }], \"type\": \"Bool\" }, { \"id\": 3311649252, \"method\": \"messages.updateDialogFiltersOrder\", \"params\": [{ \"name\": \"order\", \"type\": \"Vector<int>\" }], \"type\": \"Bool\" }, { \"id\": 1608974939, \"method\": \"messages.getOldFeaturedStickers\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.FeaturedStickers\" }, { \"id\": 3990128682, \"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\": 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\": 4038807890, \"method\": \"photos.updateProfilePhoto\", \"params\": [{ \"name\": \"id\", \"type\": \"InputPhoto\" }], \"type\": \"UserProfilePhoto\" }, { \"id\": 1328726168, \"method\": \"photos.uploadProfilePhoto\", \"params\": [{ \"name\": \"file\", \"type\": \"InputFile\" }], \"type\": \"photos.Photo\" }, { \"id\": 2278522671, \"method\": \"photos.deletePhotos\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<InputPhoto>\" }], \"type\": \"Vector<long>\" }, { \"id\": 2446144168, \"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\": 3003426337, \"method\": \"upload.saveFilePart\", \"params\": [{ \"name\": \"file_id\", \"type\": \"long\" }, { \"name\": \"file_part\", \"type\": \"int\" }, { \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"Bool\" }, { \"id\": 2975505148, \"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\": 3732629309, \"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\": 619086221, \"method\": \"upload.getWebFile\", \"params\": [{ \"name\": \"location\", \"type\": \"InputWebFileLocation\" }, { \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"upload.WebFile\" }, { \"id\": 536919235, \"method\": \"upload.getCdnFile\", \"params\": [{ \"name\": \"file_token\", \"type\": \"bytes\" }, { \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"upload.CdnFile\" }, { \"id\": 2603046056, \"method\": \"upload.reuploadCdnFile\", \"params\": [{ \"name\": \"file_token\", \"type\": \"bytes\" }, { \"name\": \"request_token\", \"type\": \"bytes\" }], \"type\": \"Vector<FileHash>\" }, { \"id\": 1302676017, \"method\": \"upload.getCdnFileHashes\", \"params\": [{ \"name\": \"file_token\", \"type\": \"bytes\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"Vector<FileHash>\" }, { \"id\": 3338819889, \"method\": \"upload.getFileHashes\", \"params\": [{ \"name\": \"location\", \"type\": \"InputFileLocation\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"Vector<FileHash>\" }, { \"id\": 3304659051, \"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\": 2631862477, \"method\": \"help.getSupport\", \"params\": [], \"type\": \"help.Support\" }, { \"id\": 2417028975, \"method\": \"help.getAppChangelog\", \"params\": [{ \"name\": \"prev_app_version\", \"type\": \"string\" }], \"type\": \"Updates\" }, { \"id\": 3961704397, \"method\": \"help.setBotUpdatesStatus\", \"params\": [{ \"name\": \"pending_updates_count\", \"type\": \"int\" }, { \"name\": \"message\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 1375900482, \"method\": \"help.getCdnConfig\", \"params\": [], \"type\": \"CdnConfig\" }, { \"id\": 1036054804, \"method\": \"help.getRecentMeUrls\", \"params\": [{ \"name\": \"referer\", \"type\": \"string\" }], \"type\": \"help.RecentMeUrls\" }, { \"id\": 749019089, \"method\": \"help.getTermsOfServiceUpdate\", \"params\": [], \"type\": \"help.TermsOfServiceUpdate\" }, { \"id\": 4000511898, \"method\": \"help.acceptTermsOfService\", \"params\": [{ \"name\": \"id\", \"type\": \"DataJSON\" }], \"type\": \"Bool\" }, { \"id\": 1072547679, \"method\": \"help.getDeepLinkInfo\", \"params\": [{ \"name\": \"path\", \"type\": \"string\" }], \"type\": \"help.DeepLinkInfo\" }, { \"id\": 2559656208, \"method\": \"help.getAppConfig\", \"params\": [], \"type\": \"JSONValue\" }, { \"id\": 1862465352, \"method\": \"help.saveAppLog\", \"params\": [{ \"name\": \"events\", \"type\": \"Vector<InputAppEvent>\" }], \"type\": \"Bool\" }, { \"id\": 3328290056, \"method\": \"help.getPassportConfig\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"help.PassportConfig\" }, { \"id\": 3546343212, \"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<MessageEntity>\" }], \"type\": \"help.UserInfo\" }, { \"id\": 3231151137, \"method\": \"help.getPromoData\", \"params\": [], \"type\": \"help.PromoData\" }, { \"id\": 505748629, \"method\": \"help.hidePromoData\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"Bool\" }, { \"id\": 3423619383, \"method\": \"channels.readHistory\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Bool\" }, { \"id\": 2227305806, \"method\": \"channels.deleteMessages\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.AffectedMessages\" }, { \"id\": 3507345179, \"method\": \"channels.deleteUserHistory\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }], \"type\": \"messages.AffectedHistory\" }, { \"id\": 4261967888, \"method\": \"channels.reportSpam\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"Bool\" }, { \"id\": 2911672867, \"method\": \"channels.getMessages\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"id\", \"type\": \"Vector<InputMessage>\" }], \"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<InputChannel>\" }], \"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\": 3543959810, \"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\": 4046346185, \"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\": 4164332181, \"method\": \"channels.leaveChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }], \"type\": \"Updates\" }, { \"id\": 429865580, \"method\": \"channels.inviteToChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"users\", \"type\": \"Vector<InputUser>\" }], \"type\": \"Updates\" }, { \"id\": 3222347747, \"method\": \"channels.deleteChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }], \"type\": \"Updates\" }, { \"id\": 3468128611, \"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\": 4172297903, \"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\": 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<InputUser>\" }, { \"name\": \"max_id\", \"type\": \"long\" }, { \"name\": \"min_id\", \"type\": \"long\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"channels.AdminLogResults\" }, { \"id\": 3935085817, \"method\": \"channels.setStickers\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }], \"type\": \"Bool\" }, { \"id\": 3937786936, \"method\": \"channels.readMessageContents\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"Bool\" }, { \"id\": 2939592002, \"method\": \"channels.deleteHistory\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Bool\" }, { \"id\": 3938171212, \"method\": \"channels.togglePreHistoryHidden\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"enabled\", \"type\": \"Bool\" }], \"type\": \"Updates\" }, { \"id\": 2202135744, \"method\": \"channels.getLeftChannels\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"messages.Chats\" }, { \"id\": 4124758904, \"method\": \"channels.getGroupsForDiscussion\", \"params\": [], \"type\": \"messages.Chats\" }, { \"id\": 1079520178, \"method\": \"channels.setDiscussionGroup\", \"params\": [{ \"name\": \"broadcast\", \"type\": \"InputChannel\" }, { \"name\": \"group\", \"type\": \"InputChannel\" }], \"type\": \"Bool\" }, { \"id\": 2402864415, \"method\": \"channels.editCreator\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }, { \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }], \"type\": \"Updates\" }, { \"id\": 1491484525, \"method\": \"channels.editLocation\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"geo_point\", \"type\": \"InputGeoPoint\" }, { \"name\": \"address\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 3990134512, \"method\": \"channels.toggleSlowMode\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"seconds\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 300429806, \"method\": \"channels.getInactiveChannels\", \"params\": [], \"type\": \"messages.InactiveChats\" }, { \"id\": 2854709741, \"method\": \"bots.sendCustomRequest\", \"params\": [{ \"name\": \"custom_method\", \"type\": \"string\" }, { \"name\": \"params\", \"type\": \"DataJSON\" }], \"type\": \"DataJSON\" }, { \"id\": 3860938573, \"method\": \"bots.answerWebhookJSONQuery\", \"params\": [{ \"name\": \"query_id\", \"type\": \"long\" }, { \"name\": \"data\", \"type\": \"DataJSON\" }], \"type\": \"Bool\" }, { \"id\": 2153596662, \"method\": \"bots.setBotCommands\", \"params\": [{ \"name\": \"commands\", \"type\": \"Vector<BotCommand>\" }], \"type\": \"Bool\" }, { \"id\": 2582681413, \"method\": \"payments.getPaymentForm\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"int\" }], \"type\": \"payments.PaymentForm\" }, { \"id\": 2693966208, \"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\": 578650699, \"method\": \"payments.getSavedInfo\", \"params\": [], \"type\": \"payments.SavedInfo\" }, { \"id\": 3627905217, \"method\": \"payments.clearSavedInfo\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"credentials\", \"type\": \"flags.0?true\" }, { \"name\": \"info\", \"type\": \"flags.1?true\" }], \"type\": \"Bool\" }, { \"id\": 779736953, \"method\": \"payments.getBankCardData\", \"params\": [{ \"name\": \"number\", \"type\": \"string\" }], \"type\": \"payments.BankCardData\" }, { \"id\": 4043532160, \"method\": \"stickers.createStickerSet\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"masks\", \"type\": \"flags.0?true\" }, { \"name\": \"animated\", \"type\": \"flags.1?true\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }, { \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"short_name\", \"type\": \"string\" }, { \"name\": \"thumb\", \"type\": \"flags.2?InputDocument\" }, { \"name\": \"stickers\", \"type\": \"Vector<InputStickerSetItem>\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 4151709521, \"method\": \"stickers.removeStickerFromSet\", \"params\": [{ \"name\": \"sticker\", \"type\": \"InputDocument\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 4290172106, \"method\": \"stickers.changeStickerPosition\", \"params\": [{ \"name\": \"sticker\", \"type\": \"InputDocument\" }, { \"name\": \"position\", \"type\": \"int\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 2253651646, \"method\": \"stickers.addStickerToSet\", \"params\": [{ \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }, { \"name\": \"sticker\", \"type\": \"InputStickerSetItem\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 2587250224, \"method\": \"stickers.setStickerSetThumb\", \"params\": [{ \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }, { \"name\": \"thumb\", \"type\": \"InputDocument\" }], \"type\": \"messages.StickerSet\" }, { \"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\": 2999697856, \"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\": 4075959050, \"method\": \"langpack.getLangPack\", \"params\": [{ \"name\": \"lang_pack\", \"type\": \"string\" }, { \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"LangPackDifference\" }, { \"id\": 4025104387, \"method\": \"langpack.getStrings\", \"params\": [{ \"name\": \"lang_pack\", \"type\": \"string\" }, { \"name\": \"lang_code\", \"type\": \"string\" }, { \"name\": \"keys\", \"type\": \"Vector<string>\" }], \"type\": \"Vector<LangPackString>\" }, { \"id\": 3449309861, \"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<LangPackLanguage>\" }, { \"id\": 1784243458, \"method\": \"langpack.getLanguage\", \"params\": [{ \"name\": \"lang_pack\", \"type\": \"string\" }, { \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"LangPackLanguage\" }, { \"id\": 1749536939, \"method\": \"folders.editPeerFolders\", \"params\": [{ \"name\": \"folder_peers\", \"type\": \"Vector<InputFolderPeer>\" }], \"type\": \"Updates\" }, { \"id\": 472471681, \"method\": \"folders.deleteFolder\", \"params\": [{ \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 2873246746, \"method\": \"stats.getBroadcastStats\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"dark\", \"type\": \"flags.0?true\" }, { \"name\": \"channel\", \"type\": \"InputChannel\" }], \"type\": \"stats.BroadcastStats\" }, { \"id\": 1646092192, \"method\": \"stats.loadAsyncGraph\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"token\", \"type\": \"string\" }, { \"name\": \"x\", \"type\": \"flags.0?long\" }], \"type\": \"StatsGraph\" }] }, \"layer\": 113 };\r\n"
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"index": 10,
"index2": 10,
"size": 9758,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"issuerId": 1,
"issuerName": "./src/lib/crypto/cryptoworker.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"module": "./src/lib/crypto/cryptoworker.ts",
"moduleName": "./src/lib/crypto/cryptoworker.ts",
"type": "cjs require",
"userRequest": "./crypto_utils",
"loc": "39:54-79"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\tl_utils.ts",
"module": "./src/lib/mtproto/tl_utils.ts",
"moduleName": "./src/lib/mtproto/tl_utils.ts",
"type": "cjs require",
"userRequest": "../crypto/crypto_utils",
"loc": "17:23-56"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.gzipUncompress = exports.bytesModPow = exports.pqPrimeLeemon = exports.pqPrimeFactorization = exports.hash_pbkdf2 = exports.rsaEncrypt = exports.aesDecryptSync = exports.aesEncryptSync = exports.sha256HashSync = exports.sha1HashSync = exports.bytesFromLeemonBigInt = void 0;\r\nconst sha1_1 = __importDefault(require(\"@cryptography/sha1\"));\r\nconst sha256_1 = __importDefault(require(\"@cryptography/sha256\"));\r\nconst aes_1 = require(\"@cryptography/aes\");\r\n// @ts-ignore\r\nconst pako_inflate_min_js_1 = __importDefault(require(\"pako/dist/pako_inflate.min.js\"));\r\nconst index_1 = require(\"leemon/es/index/\"); //from 'leemon';\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nfunction bytesFromLeemonBigInt(bigInt) {\r\n var str = index_1.bigInt2str(bigInt, 16);\r\n return bin_utils_1.bytesFromHex(str);\r\n}\r\nexports.bytesFromLeemonBigInt = bytesFromLeemonBigInt;\r\nfunction sha1HashSync(bytes) {\r\n //console.trace(dT(), 'SHA-1 hash start', bytes);\r\n const hashBytes = [];\r\n let hash = sha1_1.default(String.fromCharCode.apply(null, bytes instanceof Uint8Array ? [...bytes] : [...new Uint8Array(bytes)]));\r\n for (let i = 0; i < hash.length; ++i) {\r\n hashBytes.push(hash.charCodeAt(i));\r\n }\r\n //console.log(dT(), 'SHA-1 hash finish', hashBytes, bytesToHex(hashBytes));\r\n return new Uint8Array(hashBytes);\r\n}\r\nexports.sha1HashSync = sha1HashSync;\r\nfunction sha256HashSync(bytes) {\r\n //console.log(dT(), 'SHA-256 hash start');\r\n let words = bin_utils_1.bytesToWordss(bytes);\r\n let hash = sha256_1.default(words);\r\n //console.log(dT(), 'SHA-256 hash finish');\r\n return bin_utils_1.bytesFromWordss(hash);\r\n}\r\nexports.sha256HashSync = sha256HashSync;\r\nfunction aesEncryptSync(bytes, keyBytes, ivBytes) {\r\n //console.log(dT(), 'AES encrypt start', bytes, keyBytes, ivBytes);\r\n // console.log('aes before padding bytes:', bytesToHex(bytes));\r\n bytes = bin_utils_1.addPadding(bytes);\r\n // console.log('aes after padding bytes:', bytesToHex(bytes));\r\n const cipher = new aes_1.IGE(bin_utils_1.bytesToWordss(keyBytes), bin_utils_1.bytesToWordss(ivBytes));\r\n const encryptedBytes = cipher.encrypt(bin_utils_1.bytesToWordss(bytes));\r\n //console.log(dT(), 'AES encrypt finish');\r\n return bin_utils_1.bytesFromWordss(encryptedBytes);\r\n}\r\nexports.aesEncryptSync = aesEncryptSync;\r\nfunction aesDecryptSync(bytes, keyBytes, ivBytes) {\r\n //console.log(dT(), 'AES decrypt start', bytes, keyBytes, ivBytes);\r\n const cipher = new aes_1.IGE(bin_utils_1.bytesToWordss(keyBytes), bin_utils_1.bytesToWordss(ivBytes));\r\n const decryptedBytes = cipher.decrypt(bin_utils_1.bytesToWordss(bytes));\r\n //console.log(dT(), 'AES decrypt finish');\r\n return bin_utils_1.bytesFromWordss(decryptedBytes);\r\n}\r\nexports.aesDecryptSync = aesDecryptSync;\r\nfunction rsaEncrypt(publicKey, bytes) {\r\n console.log(bin_utils_1.dT(), 'RSA encrypt start', publicKey, bytes);\r\n bytes = bin_utils_1.addPadding(bytes, 255);\r\n var N = index_1.str2bigInt(publicKey.modulus, 16);\r\n var E = index_1.str2bigInt(publicKey.exponent, 16);\r\n var X = index_1.str2bigInt(bin_utils_1.bytesToHex(bytes), 16);\r\n var encryptedBigInt = index_1.powMod(X, E, N);\r\n var encryptedBytes = bin_utils_1.bytesFromHex(index_1.bigInt2str(encryptedBigInt, 16));\r\n console.log(bin_utils_1.dT(), 'RSA encrypt finish');\r\n return encryptedBytes;\r\n}\r\nexports.rsaEncrypt = rsaEncrypt;\r\nfunction hash_pbkdf2(/* hasher: 'string', */ buffer, salt, iterations) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let subtle = typeof (window) !== 'undefined' && 'crypto' in window ? window.crypto.subtle : self.crypto.subtle;\r\n // @ts-ignore\r\n let importKey = yield subtle.importKey(\"raw\", //only \"raw\" is allowed\r\n buffer, //your password\r\n {\r\n name: \"PBKDF2\",\r\n }, false, //whether the key is extractable (i.e. can be used in exportKey)\r\n [\"deriveKey\", \"deriveBits\"] //can be any combination of \"deriveKey\" and \"deriveBits\"\r\n );\r\n /* let deriveKey = */ yield subtle.deriveKey({\r\n \"name\": \"PBKDF2\",\r\n salt: salt,\r\n iterations: iterations,\r\n hash: { name: \"SHA-512\" },\r\n }, importKey, //your key from generateKey or importKey\r\n {\r\n name: \"AES-CTR\",\r\n //the generateKey parameters for that type of algorithm\r\n length: 256,\r\n }, false, //whether the derived key is extractable (i.e. can be used in exportKey)\r\n [\"encrypt\", \"decrypt\"] //limited to the options in that algorithm's importKey\r\n );\r\n let bits = subtle.deriveBits({\r\n \"name\": \"PBKDF2\",\r\n salt: salt,\r\n iterations: iterations,\r\n hash: { name: \"SHA-512\" },\r\n }, importKey, //your key from generateKey or importKey\r\n 512 //the number of bits you want to derive\r\n );\r\n return bits;\r\n });\r\n}\r\nexports.hash_pbkdf2 = hash_pbkdf2;\r\nfunction pqPrimeFactorization(pqBytes) {\r\n var what = new jsbn_1.BigInteger(pqBytes);\r\n var result = false;\r\n console.log(bin_utils_1.dT(), 'PQ start', pqBytes, what.toString(16), what.bitLength());\r\n try {\r\n console.time('PQ leemon');\r\n result = pqPrimeLeemon(index_1.str2bigInt(what.toString(16), 16, Math.ceil(64 / index_1.bpe) + 1));\r\n console.timeEnd('PQ leemon');\r\n }\r\n catch (e) {\r\n console.error('Pq leemon Exception', e);\r\n }\r\n console.log(bin_utils_1.dT(), 'PQ finish');\r\n return result;\r\n}\r\nexports.pqPrimeFactorization = pqPrimeFactorization;\r\nfunction pqPrimeLeemon(what) {\r\n var minBits = 64;\r\n var minLen = Math.ceil(minBits / index_1.bpe) + 1;\r\n var it = 0;\r\n var i, q;\r\n var j, lim;\r\n var P;\r\n var Q;\r\n var a = new Array(minLen);\r\n var b = new Array(minLen);\r\n var c = new Array(minLen);\r\n var g = new Array(minLen);\r\n var z = new Array(minLen);\r\n var x = new Array(minLen);\r\n var y = new Array(minLen);\r\n for (i = 0; i < 3; i++) {\r\n q = (bin_utils_1.nextRandomInt(128) & 15) + 17;\r\n index_1.copyInt_(x, bin_utils_1.nextRandomInt(1000000000) + 1);\r\n index_1.copy_(y, x);\r\n lim = 1 << (i + 18);\r\n for (j = 1; j < lim; j++) {\r\n ++it;\r\n index_1.copy_(a, x);\r\n index_1.copy_(b, x);\r\n index_1.copyInt_(c, q);\r\n while (!index_1.isZero(b)) {\r\n if (b[0] & 1) {\r\n index_1.add_(c, a);\r\n if (index_1.greater(c, what)) {\r\n index_1.sub_(c, what);\r\n }\r\n }\r\n index_1.add_(a, a);\r\n if (index_1.greater(a, what)) {\r\n index_1.sub_(a, what);\r\n }\r\n index_1.rightShift_(b, 1);\r\n }\r\n index_1.copy_(x, c);\r\n if (index_1.greater(x, y)) {\r\n index_1.copy_(z, x);\r\n index_1.sub_(z, y);\r\n }\r\n else {\r\n index_1.copy_(z, y);\r\n index_1.sub_(z, x);\r\n }\r\n index_1.eGCD_(z, what, g, a, b);\r\n if (!index_1.equalsInt(g, 1)) {\r\n break;\r\n }\r\n if ((j & (j - 1)) == 0) {\r\n index_1.copy_(y, x);\r\n }\r\n }\r\n if (index_1.greater(g, index_1.one)) {\r\n break;\r\n }\r\n }\r\n index_1.divide_(what, g, x, y);\r\n if (index_1.greater(g, x)) {\r\n P = x;\r\n Q = g;\r\n }\r\n else {\r\n P = g;\r\n Q = x;\r\n }\r\n // console.log(dT(), 'done', bigInt2str(what, 10), bigInt2str(P, 10), bigInt2str(Q, 10))\r\n return [bytesFromLeemonBigInt(P), bytesFromLeemonBigInt(Q), it];\r\n}\r\nexports.pqPrimeLeemon = pqPrimeLeemon;\r\nfunction bytesModPow(x, y, m) {\r\n try {\r\n var xBigInt = index_1.str2bigInt(bin_utils_1.bytesToHex(x), 16);\r\n var yBigInt = index_1.str2bigInt(bin_utils_1.bytesToHex(y), 16);\r\n var mBigInt = index_1.str2bigInt(bin_utils_1.bytesToHex(m), 16);\r\n var resBigInt = index_1.powMod(xBigInt, yBigInt, mBigInt);\r\n return bin_utils_1.bytesFromHex(index_1.bigInt2str(resBigInt, 16));\r\n }\r\n catch (e) {\r\n console.error('mod pow error', e);\r\n }\r\n return bin_utils_1.bytesFromBigInt(new jsbn_1.BigInteger(x).modPow(new jsbn_1.BigInteger(y), new jsbn_1.BigInteger(m)), 256);\r\n}\r\nexports.bytesModPow = bytesModPow;\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\n"
},
{
"id": 13,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\@cryptography\\aes\\dist\\es\\aes.js",
"name": "./node_modules/@cryptography/aes/dist/es/aes.js",
"index": 13,
"index2": 7,
"size": 11143,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"issuerId": 12,
"issuerName": "./src/lib/crypto/crypto_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
}
}
],
"profile": {
"factory": 897,
"building": 17
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "@cryptography/aes",
"loc": "18:14-42"
},
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "@cryptography/aes",
"loc": "9:14-42"
}
],
"usedExports": true,
"providedExports": [
"default",
"CTR",
"IGE"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/crypto/crypto_utils.ts (referenced with cjs require), ./src/lib/mtproto/transports/websocket.ts (referenced with cjs require)"
],
"depth": 3,
"source": "var S = new Uint8Array(256);\nvar Si = new Uint8Array(256);\nvar T1 = new Uint32Array(256);\nvar T2 = new Uint32Array(256);\nvar T3 = new Uint32Array(256);\nvar T4 = new Uint32Array(256);\nvar T5 = new Uint32Array(256);\nvar T6 = new Uint32Array(256);\nvar T7 = new Uint32Array(256);\nvar T8 = new Uint32Array(256);\nfunction computeTables() {\n var d = new Uint8Array(256);\n var t = new Uint8Array(256);\n var x2;\n var x4;\n var x8;\n var s;\n var tEnc;\n var tDec;\n var x = 0;\n var xInv = 0;\n // Compute double and third tables\n for (var i = 0; i < 256; i++) {\n d[i] = i << 1 ^ (i >> 7) * 283;\n t[d[i] ^ i] = i;\n }\n for (; !S[x]; x ^= x2 || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n S[x] = s;\n Si[s] = x;\n // Compute MixColumns\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n T1[x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n T2[x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n T3[x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n T4[x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n T5[s] = tDec = tDec << 24 ^ tDec >>> 8;\n T6[s] = tDec = tDec << 24 ^ tDec >>> 8;\n T7[s] = tDec = tDec << 24 ^ tDec >>> 8;\n T8[s] = tDec = tDec << 24 ^ tDec >>> 8;\n xInv = t[xInv] || 1;\n }\n}\n\n/**\n * Gets a uint32 from string in big-endian order order\n */\nfunction s2i(str, pos) {\n return (str.charCodeAt(pos) << 24\n ^ str.charCodeAt(pos + 1) << 16\n ^ str.charCodeAt(pos + 2) << 8\n ^ str.charCodeAt(pos + 3));\n}\n\n/* eslint-disable import/prefer-default-export */\n/**\n * Helper function for transforming string key to Uint32Array\n */\nfunction getWords(key) {\n if (key instanceof Uint32Array) {\n return key;\n }\n if (typeof key === 'string') {\n if (key.length % 4 !== 0)\n for (var i = key.length % 4; i <= 4; i++)\n key += '\\0x00';\n var buf = new Uint32Array(key.length / 4);\n for (var i = 0; i < key.length; i += 4)\n buf[i / 4] = s2i(key, i);\n return buf;\n }\n if (key instanceof Uint8Array) {\n var buf = new Uint32Array(key.length / 4);\n for (var i = 0; i < key.length; i += 4) {\n buf[i / 4] = (key[i] << 24\n ^ key[i + 1] << 16\n ^ key[i + 2] << 8\n ^ key[i + 3]);\n }\n return buf;\n }\n throw new Error('Unable to create 32-bit words');\n}\nfunction xor(left, right, to) {\n if (to === void 0) { to = left; }\n for (var i = 0; i < left.length; i++)\n to[i] = left[i] ^ right[i];\n}\n\ncomputeTables();\n/**\n * Low-level AES Cipher\n */\nvar AES = /** @class */ (function () {\n function AES(_key) {\n var key = getWords(_key);\n if (key.length !== 4 && key.length !== 6 && key.length !== 8) {\n throw new Error('Invalid key size');\n }\n this.encKey = new Uint32Array(4 * key.length + 28);\n this.decKey = new Uint32Array(4 * key.length + 28);\n this.encKey.set(key);\n var rcon = 1;\n var i = key.length;\n var tmp;\n // schedule encryption keys\n for (; i < 4 * key.length + 28; i++) {\n tmp = this.encKey[i - 1];\n // apply sbox\n if (i % key.length === 0 || (key.length === 8 && i % key.length === 4)) {\n tmp = S[tmp >>> 24] << 24 ^ S[(tmp >> 16) & 255] << 16 ^ S[(tmp >> 8) & 255] << 8 ^ S[tmp & 255];\n // shift rows and add rcon\n if (i % key.length === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ (rcon << 24);\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n this.encKey[i] = this.encKey[i - key.length] ^ tmp;\n }\n // schedule decryption keys\n for (var j = 0; i; j++, i--) {\n tmp = this.encKey[j & 3 ? i : i - 4];\n if (i <= 4 || j < 4) {\n this.decKey[j] = tmp;\n }\n else {\n this.decKey[j] = (T5[S[tmp >>> 24]]\n ^ T6[S[(tmp >> 16) & 255]]\n ^ T7[S[(tmp >> 8) & 255]]\n ^ T8[S[tmp & 255]]);\n }\n }\n }\n AES.prototype.encrypt = function (_message) {\n var message = getWords(_message);\n var out = new Uint32Array(4);\n var a = message[0] ^ this.encKey[0];\n var b = message[1] ^ this.encKey[1];\n var c = message[2] ^ this.encKey[2];\n var d = message[3] ^ this.encKey[3];\n var rounds = this.encKey.length / 4 - 2;\n var k = 4;\n var a2;\n var b2;\n var c2;\n // Inner rounds. Cribbed from OpenSSL.\n for (var i = 0; i < rounds; i++) {\n a2 = T1[a >>> 24] ^ T2[(b >> 16) & 255] ^ T3[(c >> 8) & 255] ^ T4[d & 255] ^ this.encKey[k];\n b2 = T1[b >>> 24] ^ T2[(c >> 16) & 255] ^ T3[(d >> 8) & 255] ^ T4[a & 255] ^ this.encKey[k + 1];\n c2 = T1[c >>> 24] ^ T2[(d >> 16) & 255] ^ T3[(a >> 8) & 255] ^ T4[b & 255] ^ this.encKey[k + 2];\n d = T1[d >>> 24] ^ T2[(a >> 16) & 255] ^ T3[(b >> 8) & 255] ^ T4[c & 255] ^ this.encKey[k + 3];\n a = a2;\n b = b2;\n c = c2;\n k += 4;\n // console.log(a, b, c, d);\n }\n // Last round.\n for (var i = 0; i < 4; i++) {\n out[i] = (S[a >>> 24] << 24\n ^ S[(b >> 16) & 255] << 16\n ^ S[(c >> 8) & 255] << 8\n ^ S[d & 255]\n ^ this.encKey[k++]);\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n return out;\n };\n AES.prototype.decrypt = function (_message) {\n var message = getWords(_message);\n var out = new Uint32Array(4);\n var a = message[0] ^ this.decKey[0];\n var b = message[3] ^ this.decKey[1];\n var c = message[2] ^ this.decKey[2];\n var d = message[1] ^ this.decKey[3];\n var rounds = this.decKey.length / 4 - 2;\n var a2;\n var b2;\n var c2;\n var k = 4;\n // Inner rounds. Cribbed from OpenSSL.\n for (var i = 0; i < rounds; i++) {\n a2 = T5[a >>> 24] ^ T6[(b >> 16) & 255] ^ T7[(c >> 8) & 255] ^ T8[d & 255] ^ this.decKey[k];\n b2 = T5[b >>> 24] ^ T6[(c >> 16) & 255] ^ T7[(d >> 8) & 255] ^ T8[a & 255] ^ this.decKey[k + 1];\n c2 = T5[c >>> 24] ^ T6[(d >> 16) & 255] ^ T7[(a >> 8) & 255] ^ T8[b & 255] ^ this.decKey[k + 2];\n d = T5[d >>> 24] ^ T6[(a >> 16) & 255] ^ T7[(b >> 8) & 255] ^ T8[c & 255] ^ this.decKey[k + 3];\n a = a2;\n b = b2;\n c = c2;\n k += 4;\n }\n // Last round.\n for (var i = 0; i < 4; i++) {\n out[3 & -i] = (Si[a >>> 24] << 24\n ^ Si[(b >> 16) & 255] << 16\n ^ Si[(c >> 8) & 255] << 8\n ^ Si[d & 255]\n ^ this.decKey[k++]);\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n return out;\n };\n return AES;\n}());\n\n/**\n * AES-IGE mode.\n */\nvar AES_IGE = /** @class */ (function () {\n function AES_IGE(key, iv, blockSize) {\n if (blockSize === void 0) { blockSize = 16; }\n this.key = getWords(key);\n this.iv = getWords(iv);\n this.cipher = new AES(key);\n this.blockSize = blockSize / 4;\n }\n /**\n * Encrypts plain text with AES-IGE mode.\n */\n AES_IGE.prototype.encrypt = function (message, buf) {\n var text = getWords(message);\n var cipherText = buf || new Uint32Array(text.length);\n var prevX = this.iv.subarray(this.blockSize, this.iv.length);\n var prevY = this.iv.subarray(0, this.blockSize);\n var yXOR = new Uint32Array(this.blockSize);\n for (var i = 0; i < text.length; i += this.blockSize) {\n var x = text.subarray(i, i + this.blockSize);\n xor(x, prevY, yXOR);\n var y = this.cipher.encrypt(yXOR);\n xor(y, prevX);\n prevX = x;\n prevY = y;\n for (var j = i, k = 0; j < text.length && k < 4; j++, k++)\n cipherText[j] = y[k];\n }\n return cipherText;\n };\n /**\n * Decrypts cipher text with AES-IGE mode.\n */\n AES_IGE.prototype.decrypt = function (message, buf) {\n var cipherText = getWords(message);\n var text = buf || new Uint32Array(cipherText.length);\n var prevY = this.iv.subarray(this.blockSize, this.iv.length);\n var prevX = this.iv.subarray(0, this.blockSize);\n var yXOR = new Uint32Array(this.blockSize);\n for (var i = 0; i < text.length; i += this.blockSize) {\n var x = cipherText.subarray(i, i + this.blockSize);\n xor(x, prevY, yXOR);\n var y = this.cipher.decrypt(yXOR);\n xor(y, prevX);\n prevX = x;\n prevY = y;\n for (var j = i, k = 0; j < text.length && k < 4; j++, k++)\n text[j] = y[k];\n }\n return text;\n };\n return AES_IGE;\n}());\n\n/**\n * AES-IGE mode.\n */\nvar AES_IGE$1 = /** @class */ (function () {\n function AES_IGE(key, counter, blockSize) {\n if (blockSize === void 0) { blockSize = 16; }\n this.offset = 0;\n this.key = getWords(key);\n this.counter = getWords(counter);\n this.cipher = new AES(key);\n this.blockSize = blockSize / 4;\n if (this.counter.length !== 4) {\n throw new Error('AES-CTR mode counter must be 16 bytes length');\n }\n }\n /**\n * Encrypts plain text with AES-IGE mode.\n */\n AES_IGE.prototype.encrypt = function (message, buf) {\n var text = getWords(message);\n var cipherText = buf || new Uint32Array(text.length);\n var offset = this.offset;\n for (var i = 0; i < text.length; i += this.blockSize) {\n var x = this.cipher.encrypt(this.counter);\n for (var j = i, k = offset; j < text.length && k < this.blockSize; j++, k++)\n cipherText[j] = x[k] ^ text[j];\n if (text.length - i >= this.blockSize)\n this.incrementCounter();\n if (offset) {\n i -= offset;\n offset = 0;\n }\n }\n this.offset = (this.offset + (text.length % 4)) % 4;\n return cipherText;\n };\n /**\n * Decrypts cipher text with AES-IGE mode.\n */\n AES_IGE.prototype.decrypt = function (message, buf) {\n return this.encrypt(message, buf);\n };\n AES_IGE.prototype.incrementCounter = function () {\n // increment counter\n for (var carry = this.counter.length - 1; carry >= 0; carry--) {\n if (++this.counter[carry] < 0xFFFFFFFF)\n break; // If overflowing, it'll be 0 and we'll have to continue propagating the carry\n }\n };\n return AES_IGE;\n}());\n\nexport default AES;\nexport { AES_IGE$1 as CTR, AES_IGE as IGE };\n"
},
{
"id": 14,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\leemon\\es\\index.js",
"name": "./node_modules/leemon/es/index.js",
"index": 15,
"index2": 9,
"size": 57067,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"issuerId": 28,
"issuerName": "./src/lib/mtproto/passwordManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 28,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"name": "./src/lib/mtproto/passwordManager.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 913,
"building": 27
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "leemon/es/index/",
"loc": "21:16-43"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"module": "./src/lib/mtproto/passwordManager.ts",
"moduleName": "./src/lib/mtproto/passwordManager.ts",
"type": "cjs require",
"userRequest": "leemon/es/index/",
"loc": "19:16-43"
}
],
"usedExports": true,
"providedExports": [
"bpe",
"one",
"zero",
"findPrimes",
"millerRabinInt",
"millerRabin",
"bitSize",
"expand",
"randTruePrime",
"randProbPrime",
"randProbPrimeRounds",
"mod",
"addInt",
"mult",
"powMod",
"sub",
"add",
"inverseMod",
"multMod",
"randTruePrime_",
"randBigInt",
"randBigInt_",
"GCD",
"GCD_",
"inverseMod_",
"inverseModInt",
"eGCD_",
"negative",
"greaterShift",
"greater",
"divide_",
"carry_",
"modInt",
"int2bigInt",
"str2bigInt",
"equalsInt",
"equals",
"isZero",
"bigInt2str",
"dup",
"copy_",
"copyInt_",
"addInt_",
"rightShift_",
"halve_",
"leftShift_",
"multInt_",
"divInt_",
"linComb_",
"linCombShift_",
"addShift_",
"subShift_",
"sub_",
"add_",
"mult_",
"mod_",
"multMod_",
"squareMod_",
"trim",
"powMod_",
"mont_"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/crypto/crypto_utils.ts (referenced with cjs require), ./src/lib/mtproto/passwordManager.ts (referenced with cjs require)"
],
"depth": 3,
"source": "'use strict';\n/** * * * * * * * * * *\n * Big Integer Library *\n * Created 2000 *\n * Leemon Baird *\n * www.leemon.com *\n * * * * * * * * * * * */\n////////////////////////////////////////////////////////////////////////////////////////\n// These functions are designed to avoid frequent dynamic memory allocation in the inner loop.\n// For most functions, if it needs a BigInt as a local variable it will actually use\n// a global, and will only allocate to it only when it's not the right size. This ensures\n// that when a function is called repeatedly with same-sized parameters, it only allocates\n// memory on the first call.\n//\n// Note that for cryptographic purposes, the calls to Math.random() must\n// be replaced with calls to a better pseudorandom number generator.\n//\n// In the following, \"bigInt\" means a bigInt with at least one leading zero element,\n// and \"integer\" means a nonnegative integer less than radix. In some cases, integer\n// can be negative. Negative bigInts are 2s complement.\n//\n// The following functions do not modify their inputs.\n// Those returning a bigInt, string, or Array will dynamically allocate memory for that value.\n// Those returning a boolean will return the integer 0 (false) or 1 (true).\n// Those returning boolean or int will not allocate memory except possibly on the first\n// time they're called with a given parameter size.\n//\n// bigInt add(x,y) //return (x+y) for bigInts x and y.\n// bigInt addInt(x,n) //return (x+n) where x is a bigInt and n is an integer.\n// string bigInt2str(x,base) //return a string form of bigInt x in a given base, with 2 <= base <= 95\n// int bitSize(x) //return how many bits long the bigInt x is, not counting leading zeros\n// bigInt dup(x) //return a copy of bigInt x\n// boolean equals(x,y) //is the bigInt x equal to the bigint y?\n// boolean equalsInt(x,y) //is bigint x equal to integer y?\n// bigInt expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed\n// Array findPrimes(n) //return array of all primes less than integer n\n// bigInt GCD(x,y) //return greatest common divisor of bigInts x and y (each with same number of elements).\n// boolean greater(x,y) //is x>y? (x and y are nonnegative bigInts)\n// boolean greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y?\n// bigInt int2bigInt(t,n,m) //return a bigInt equal to integer t, with at least n bits and m array elements\n// bigInt inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null\n// int inverseModInt(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse\n// boolean isZero(x) //is the bigInt x equal to zero?\n// boolean millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime? (b is bigInt, 1<b<x)\n// boolean millerRabinInt(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime? (b is int, 1<b<x)\n// bigInt mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n.\n// int modInt(x,n) //return x mod n for bigInt x and integer n.\n// bigInt mult(x,y) //return x*y for bigInts x and y. This is faster when y<x.\n// bigInt multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.\n// boolean negative(x) //is bigInt x negative?\n// bigInt powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n.\n// bigInt randBigInt(n,s) //return an n-bit random BigInt (n>=1). If s=1, then the most significant of those n bits is set to 1.\n// bigInt randTruePrime(k) //return a new, random, k-bit, true prime bigInt using Maurer's algorithm.\n// bigInt randProbPrime(k) //return a new, random, k-bit, probable prime bigInt (probability it's composite less than 2^-80).\n// bigInt str2bigInt(s,b,n,m) //return a bigInt for number represented in string s in base b with at least n bits and m array elements\n// bigInt sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement\n// bigInt trim(x,k) //return a copy of x with exactly k leading zero elements\n//\n//\n// The following functions each have a non-underscored version, which most users should call instead.\n// These functions each write to a single parameter, and the caller is responsible for ensuring the array\n// passed in is large enough to hold the result.\n//\n// void addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer\n// void add_(x,y) //do x=x+y for bigInts x and y\n// void copy_(x,y) //do x=y on bigInts x and y\n// void copyInt_(x,n) //do x=n on bigInt x and integer n\n// void GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). (This never overflows its array).\n// boolean inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist\n// void mod_(x,n) //do x=x mod n for bigInts x and n. (This never overflows its array).\n// void mult_(x,y) //do x=x*y for bigInts x and y.\n// void multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n.\n// void powMod_(x,y,n) //do x=x**y mod n, where x,y,n are bigInts (n is odd) and ** is exponentiation. 0**0=1.\n// void randBigInt_(b,n,s) //do b = an n-bit random BigInt. if s=1, then nth bit (most significant bit) is set to 1. n>=1.\n// void randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb.\n// void sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement.\n//\n// The following functions do NOT have a non-underscored version.\n// They each write a bigInt result to one or more parameters. The caller is responsible for\n// ensuring the arrays passed in are large enough to hold the results.\n//\n// void addShift_(x,y,ys) //do x=x+(y<<(ys*bpe))\n// void carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits.\n// void divide_(x,y,q,r) //divide x by y giving quotient q and remainder r\n// int divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder. (This never overflows its array).\n// void eGCD_(x,y,d,a,b) //sets a,b,d to positive bigInts such that d = GCD_(x,y) = a*x-b*y\n// void halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement. (This never overflows its array).\n// void leftShift_(x,n) //left shift bigInt x by n bits. n<bpe.\n// void linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b\n// void linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys\n// void mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined)\n// void multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer.\n// void rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. (This never overflows its array).\n// void squareMod_(x,n) //do x=x*x mod n for bigInts x,n\n// void subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement.\n//\n// The following functions are based on algorithms from the _Handbook of Applied Cryptography_\n// powMod_() = algorithm 14.94, Montgomery exponentiation\n// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_\n// GCD_() = algorothm 14.57, Lehmer's algorithm\n// mont_() = algorithm 14.36, Montgomery multiplication\n// divide_() = algorithm 14.20 Multiple-precision division\n// squareMod_() = algorithm 14.16 Multiple-precision squaring\n// randTruePrime_() = algorithm 4.62, Maurer's algorithm\n// millerRabin() = algorithm 4.24, Miller-Rabin algorithm\n//\n// Profiling shows:\n// randTruePrime_() spends:\n// 10% of its time in calls to powMod_()\n// 85% of its time in calls to millerRabin()\n// millerRabin() spends:\n// 99% of its time in calls to powMod_() (always with a base of 2)\n// powMod_() spends:\n// 94% of its time in calls to mont_() (almost always with x==y)\n//\n// This suggests there are several ways to speed up this library slightly:\n// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window)\n// -- this should especially focus on being fast when raising 2 to a power mod n\n// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test\n// - tune the parameters in randTruePrime_(), including c, m, and recLimit\n// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking\n// within the loop when all the parameters are the same length.\n//\n// There are several ideas that look like they wouldn't help much at all:\n// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway)\n// - increase bpe from 15 to 30 (that would help if we had a 32*32->64 multiplier, but not with JavaScript's 32*32->32)\n// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square\n// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that\n// method would be slower. This is unfortunate because the code currently spends almost all of its time\n// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring\n// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded\n// sentences that seem to imply it's faster to do a non-modular square followed by a single\n// Montgomery reduction, but that's obviously wrong.\n////////////////////////////////////////////////////////////////////////////////////////\n\n//globals\nexport var bpe = 0; //bits stored per array element\n\nvar mask = 0; //AND this with an array element to chop it down to bpe bits\n\nvar radix = mask + 1; //equals 2^bpe. A single 1 bit to the left of the last bit of mask.\n//the digits for converting to different bases\n\nvar digitsStr = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\\\\'\"+-'; //initialize the global variables\n//bpe=number of bits in the mantissa on this platform\n\nfor (bpe = 0; 1 << bpe + 1 > 1 << bpe; bpe++) {\n ;\n}\n\nbpe >>= 1; //bpe=number of bits in one element of the array representing the bigInt\n\nmask = (1 << bpe) - 1; //AND the mask with an integer to get its bpe least significant bits\n\nradix = mask + 1; //2^bpe. a single 1 bit to the left of the first bit of mask\n\nexport var one = int2bigInt(1, 1, 1); //constant used in powMod_()\n\nexport var zero = int2bigInt(0, 1, 1); //the following global variables are scratchpad memory to\n//reduce dynamic memory allocation in the inner loop\n\nvar t = new Array(0);\nvar ss = t; //used in mult_()\n\nvar s0 = t; //used in multMod_(), squareMod_()\n// var s1=t; //used in powMod_(), multMod_(), squareMod_()\n// var s2=t; //used in powMod_(), multMod_()\n\nvar s3 = t; //used in powMod_()\n\nvar s4 = t,\n s5 = t; //used in mod_()\n\nvar s6 = t; //used in bigInt2str()\n\nvar s7 = t; //used in powMod_()\n\nvar T = t; //used in GCD_()\n\nvar sa = t; //used in mont_()\n\nvar mr_x1 = t,\n mr_r = t,\n mr_a = t,\n //used in millerRabin()\neg_v = t,\n eg_u = t,\n eg_A = t,\n eg_B = t,\n eg_C = t,\n eg_D = t,\n //used in eGCD_(), inverseMod_()\n//, md_q1=t, md_q2=t, md_q3=t, md_r=t, md_r1=t, md_r2=t, md_tt=t, //used in mod_()\nprimes = t,\n pows = t,\n s_i = t,\n s_i2 = t,\n s_R = t,\n s_rm = t,\n s_q = t,\n s_n1 = t,\n s_a = t,\n s_r2 = t,\n s_n = t,\n s_b = t,\n s_d = t,\n s_x1 = t,\n s_x2 = t,\n s_aa = t,\n //used in randTruePrime_()\nrpprb = t; //used in randProbPrimeRounds() (which also uses \"primes\")\n////////////////////////////////////////////////////////////////////////////////////////\n\nvar k, buff;\n/**\n * return array of all primes less than integer n\n *\n * @param {number} n\n * @returns {number[]}\n */\n\nexport function findPrimes(n) {\n var i, s, p, ans;\n s = new Array(n);\n\n for (i = 0; i < n; i++) {\n s[i] = 0;\n }\n\n s[0] = 2;\n p = 0; //first p elements of s are primes, the rest are a sieve\n\n for (; s[p] < n;) {\n //s[p] is the pth prime\n for (i = s[p] * s[p]; i < n; i += s[p] //mark multiples of s[p]\n ) {\n s[i] = 1;\n }\n\n p++;\n s[p] = s[p - 1] + 1;\n\n for (; s[p] < n && s[s[p]]; s[p]++) {\n ;\n } //find next prime (where s[p]==0)\n\n }\n\n ans = new Array(p);\n\n for (i = 0; i < p; i++) {\n ans[i] = s[i];\n }\n\n return ans;\n}\n/**\n * does a single round of Miller-Rabin base b consider x to be a possible prime?\n *\n * x is a bigInt, and b is an integer, with b<x\n *\n * @export\n * @param {number[]} x\n * @param {number} b\n * @returns {(0 | 1)}\n */\n\nexport function millerRabinInt(x, b) {\n if (mr_x1.length !== x.length) {\n mr_x1 = dup(x);\n mr_r = dup(x);\n mr_a = dup(x);\n }\n\n copyInt_(mr_a, b);\n return millerRabin(x, mr_a);\n}\n/**\n * does a single round of Miller-Rabin base b consider x to be a possible prime?\n *\n * x and b are bigInts with b<x\n *\n * @export\n * @param {number[]} x\n * @param {number[]} b\n * @returns {(0 | 1)}\n */\n\nexport function millerRabin(x, b) {\n var i, j, k, s;\n\n if (mr_x1.length !== x.length) {\n mr_x1 = dup(x);\n mr_r = dup(x);\n mr_a = dup(x);\n }\n\n copy_(mr_a, b);\n copy_(mr_r, x);\n copy_(mr_x1, x);\n addInt_(mr_r, -1);\n addInt_(mr_x1, -1); //s=the highest power of two that divides mr_r\n\n k = 0;\n\n for (i = 0; i < mr_r.length; i++) {\n for (j = 1; j < mask; j <<= 1) {\n if (x[i] & j) {\n s = k < mr_r.length + bpe ? k : 0;\n i = mr_r.length;\n j = mask;\n } else k++;\n }\n }\n\n if (s) rightShift_(mr_r, s);\n powMod_(mr_a, mr_r, x);\n\n if (!equalsInt(mr_a, 1) && !equals(mr_a, mr_x1)) {\n j = 1; //$off\n\n while (j <= s - 1 && !equals(mr_a, mr_x1)) {\n squareMod_(mr_a, x);\n\n if (equalsInt(mr_a, 1)) {\n return 0;\n }\n\n j++;\n }\n\n if (!equals(mr_a, mr_x1)) {\n return 0;\n }\n }\n\n return 1;\n}\n/**\n * returns how many bits long the bigInt is, not counting leading zeros.\n *\n * @param {number[]} x\n * @returns {number}\n */\n\nexport function bitSize(x) {\n var j, z, w;\n\n for (j = x.length - 1; x[j] == 0 && j > 0; j--) {\n ;\n }\n\n for (z = 0, w = x[j]; w; w >>= 1, z++) {\n ;\n }\n\n z += bpe * j;\n return z;\n}\n/**\n * return a copy of x with at least n elements, adding leading zeros if needed\n *\n * @param {number[]} x\n * @param {number} n\n * @returns {number[]}\n */\n\nexport function expand(x, n) {\n var ans = int2bigInt(0, (x.length > n ? x.length : n) * bpe, 0);\n copy_(ans, x);\n return ans;\n}\n/**\n * return a k-bit true random prime using Maurer's algorithm.\n *\n * @export\n * @param {number} k\n * @returns {number[]}\n */\n\nexport function randTruePrime(k) {\n var ans = int2bigInt(0, k, 0);\n randTruePrime_(ans, k);\n return trim(ans, 1);\n}\n/**\n * return a k-bit random probable prime with probability of error < 2^-80\n *\n * @export\n * @param {number} k\n * @returns {number[]}\n */\n\nexport function randProbPrime(k) {\n if (k >= 600) return randProbPrimeRounds(k, 2); //numbers from HAC table 4.3\n\n if (k >= 550) return randProbPrimeRounds(k, 4);\n if (k >= 500) return randProbPrimeRounds(k, 5);\n if (k >= 400) return randProbPrimeRounds(k, 6);\n if (k >= 350) return randProbPrimeRounds(k, 7);\n if (k >= 300) return randProbPrimeRounds(k, 9);\n if (k >= 250) return randProbPrimeRounds(k, 12); //numbers from HAC table 4.4\n\n if (k >= 200) return randProbPrimeRounds(k, 15);\n if (k >= 150) return randProbPrimeRounds(k, 18);\n if (k >= 100) return randProbPrimeRounds(k, 27);\n return randProbPrimeRounds(k, 40); //number from HAC remark 4.26 (only an estimate)\n}\n/**\n * return a k-bit probable random prime using n rounds of Miller Rabin\n * (after trial division with small primes)\n *\n * @export\n * @param {number} k\n * @param {number} n\n * @returns {number[]}\n */\n\nexport function randProbPrimeRounds(k, n) {\n var ans, i, divisible, B;\n B = 30000; //B is largest prime to use in trial division\n\n ans = int2bigInt(0, k, 0); //optimization: try larger and smaller B to find the best limit.\n\n if (primes.length === 0) primes = findPrimes(30000); //check for divisibility by primes <=30000\n\n if (rpprb.length !== ans.length) rpprb = dup(ans);\n\n for (;;) {\n //keep trying random values for ans until one appears to be prime\n //optimization: pick a random number times L=2*3*5*...*p, plus a\n // random element of the list of all numbers in [0,L) not divisible by any prime up to p.\n // This can reduce the amount of random number generation.\n randBigInt_(ans, k, 0); //ans = a random odd number to check\n\n ans[0] |= 1;\n divisible = 0; //check ans for divisibility by small primes up to B\n\n for (i = 0; i < primes.length && primes[i] <= B; i++) {\n if (modInt(ans, primes[i]) === 0 && !equalsInt(ans, primes[i])) {\n divisible = 1;\n break;\n }\n } //optimization: change millerRabin so the base can be bigger than the number being checked, then eliminate the while here.\n //do n rounds of Miller Rabin, with random bases less than ans\n\n\n for (i = 0; i < n && !divisible; i++) {\n randBigInt_(rpprb, k, 0);\n\n while (!greater(ans, rpprb) //pick a random rpprb that's < ans\n ) {\n randBigInt_(rpprb, k, 0);\n }\n\n if (!millerRabin(ans, rpprb)) divisible = 1;\n }\n\n if (!divisible) return ans;\n }\n /*::\n declare var never: empty\n return never\n */\n\n}\n/**\n * return a new bigInt equal to (x mod n) for bigInts x and n.\n *\n * @param {number[]} x\n * @param {number[]} n\n * @returns {number[]}\n */\n\nexport function mod(x, n) {\n var ans = dup(x);\n mod_(ans, n);\n return trim(ans, 1);\n}\n/**\n * return (x+n) where x is a bigInt and n is an integer.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {number[]}\n */\n\nexport function addInt(x, n) {\n var ans = expand(x, x.length + 1);\n addInt_(ans, n);\n return trim(ans, 1);\n}\n/**\n * return x*y for bigInts x and y. This is faster when y<x.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {number[]}\n */\n\nexport function mult(x, y) {\n var ans = expand(x, x.length + y.length);\n mult_(ans, y);\n return trim(ans, 1);\n}\n/**\n * return (x**y mod n) where x,y,n are bigInts and ** is exponentiation.\n *\n * 0**0=1.\n *\n * Faster for odd n.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @returns {number[]}\n */\n\nexport function powMod(x, y, n) {\n var ans = expand(x, n.length);\n powMod_( //this should work without the trim, but doesn't\n ans, trim(y, 2), trim(n, 2));\n return trim(ans, 1);\n}\n/**\n * return (x-y) for bigInts x and y\n *\n * Negative answers will be 2s complement\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {number[]}\n */\n\nexport function sub(x, y) {\n var ans = expand(x, x.length > y.length ? x.length + 1 : y.length + 1);\n sub_(ans, y);\n return trim(ans, 1);\n}\n/**\n * return (x+y) for bigInts x and y\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {number[]}\n */\n\nexport function add(x, y) {\n var ans = expand(x, x.length > y.length ? x.length + 1 : y.length + 1);\n add_(ans, y);\n return trim(ans, 1);\n}\n/**\n * return (x**(-1) mod n) for bigInts x and n.\n *\n * If no inverse exists, it returns null\n *\n * @param {number[]} x\n * @param {number[]} n\n * @returns {(number[] | null)}\n */\n\nexport function inverseMod(x, n) {\n var ans = expand(x, n.length);\n var s = inverseMod_(ans, n);\n return s ? trim(ans, 1) : null;\n}\n/**\n * return (x*y mod n) for bigInts x,y,n.\n *\n * For greater speed, let y<x.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @returns {number[]}\n */\n\nexport function multMod(x, y, n) {\n var ans = expand(x, n.length);\n multMod_(ans, y, n);\n return trim(ans, 1);\n}\n/**\n * generate a k-bit true random prime using Maurer's algorithm, and put it into ans.\n *\n * The bigInt ans must be large enough to hold it.\n *\n * @export\n * @param {number[]} ans\n * @param {number} k\n * @return {void}\n */\n\nexport function randTruePrime_(ans, k) {\n var c, m, pm, dd, j, r, B, divisible, z, zz, recSize;\n var w;\n if (primes.length == 0) primes = findPrimes(30000); //check for divisibility by primes <=30000\n\n if (pows.length == 0) {\n pows = new Array(512);\n\n for (j = 0; j < 512; j++) {\n pows[j] = Math.pow(2, j / 511 - 1);\n }\n } //c and m should be tuned for a particular machine and value of k, to maximize speed\n\n\n c = 0.1; //c=0.1 in HAC\n\n m = 20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits\n\n var recLimit = 20; //stop recursion when k <=recLimit. Must have recLimit >= 2\n\n if (s_i2.length != ans.length) {\n s_i2 = dup(ans);\n s_R = dup(ans);\n s_n1 = dup(ans);\n s_r2 = dup(ans);\n s_d = dup(ans);\n s_x1 = dup(ans); //TODO Seems like a bug in eslint, reports as unused\n\n s_x2 = dup(ans);\n s_b = dup(ans);\n s_n = dup(ans);\n s_i = dup(ans);\n s_rm = dup(ans);\n s_q = dup(ans);\n s_a = dup(ans);\n s_aa = dup(ans);\n }\n\n if (k <= recLimit) {\n //generate small random primes by trial division up to its square root\n pm = (1 << (k + 2 >> 1)) - 1; //pm is binary number with all ones, just over sqrt(2^k)\n\n copyInt_(ans, 0);\n\n for (dd = 1; dd;) {\n dd = 0;\n ans[0] = 1 | 1 << k - 1 | Math.floor(Math.random() * (1 << k)); //random, k-bit, odd integer, with msb 1\n\n for (j = 1; j < primes.length && (primes[j] & pm) == primes[j]; j++) {\n //trial division by all primes 3...sqrt(2^k)\n if (0 == ans[0] % primes[j]) {\n dd = 1;\n break;\n }\n }\n }\n\n carry_(ans);\n return;\n }\n\n B = c * k * k; //try small primes up to B (or all the primes[] array if the largest is less than B).\n\n if (k > 2 * m) //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits\n for (r = 1; k - k * r <= m;) {\n r = pows[Math.floor(Math.random() * 512)];\n } //r=Math.pow(2,Math.random()-1);\n else r = 0.5; //simulation suggests the more complex algorithm using r=.333 is only slightly faster.\n\n recSize = Math.floor(r * k) + 1;\n randTruePrime_(s_q, recSize);\n copyInt_(s_i2, 0);\n s_i2[Math.floor((k - 2) / bpe)] |= 1 << (k - 2) % bpe; //s_i2=2^(k-2)\n\n divide_(s_i2, s_q, s_i, s_rm); //s_i=floor((2^(k-1))/(2q))\n\n z = bitSize(s_i);\n\n for (;;) {\n for (;;) {\n //generate z-bit numbers until one falls in the range [0,s_i-1]\n randBigInt_(s_R, z, 0);\n if (greater(s_i, s_R)) break;\n } //now s_R is in the range [0,s_i-1]\n\n\n addInt_(s_R, 1); //now s_R is in the range [1,s_i]\n\n add_(s_R, s_i); //now s_R is in the range [s_i+1,2*s_i]\n\n copy_(s_n, s_q);\n mult_(s_n, s_R);\n multInt_(s_n, 2);\n addInt_(s_n, 1); //s_n=2*s_R*s_q+1\n\n copy_(s_r2, s_R);\n multInt_(s_r2, 2); //s_r2=2*s_R\n //check s_n for divisibility by small primes up to B\n\n for (divisible = 0, j = 0; j < primes.length && primes[j] < B; j++) {\n if (modInt(s_n, primes[j]) == 0 && !equalsInt(s_n, primes[j])) {\n divisible = 1;\n break;\n }\n }\n\n if (!divisible) if (!millerRabinInt(s_n, 2)) //if it passes small primes check, then try a single Miller-Rabin base 2\n //this line represents 75% of the total runtime for randTruePrime_\n divisible = 1;\n\n if (!divisible) {\n //if it passes that test, continue checking s_n\n addInt_(s_n, -3);\n\n for (j = s_n.length - 1; s_n[j] == 0 && j > 0; j--) {\n ;\n } //strip leading zeros\n\n\n for (zz = 0, w = s_n[j]; w; w >>= 1, zz++) {\n ;\n }\n\n zz += bpe * j; //zz=number of bits in s_n, ignoring leading zeros\n\n for (;;) {\n //generate z-bit numbers until one falls in the range [0,s_n-1]\n randBigInt_(s_a, zz, 0);\n if (greater(s_n, s_a)) break;\n } //now s_a is in the range [0,s_n-1]\n\n\n addInt_(s_n, 3); //now s_a is in the range [0,s_n-4]\n\n addInt_(s_a, 2); //now s_a is in the range [2,s_n-2]\n\n copy_(s_b, s_a);\n copy_(s_n1, s_n);\n addInt_(s_n1, -1);\n powMod_(s_b, s_n1, s_n); //s_b=s_a^(s_n-1) modulo s_n\n\n addInt_(s_b, -1);\n\n if (isZero(s_b)) {\n copy_(s_b, s_a);\n powMod_(s_b, s_r2, s_n);\n addInt_(s_b, -1);\n copy_(s_aa, s_n);\n copy_(s_d, s_b);\n GCD_(s_d, s_n); //if s_b and s_n are relatively prime, then s_n is a prime\n\n if (equalsInt(s_d, 1)) {\n copy_(ans, s_aa);\n return; //if we've made it this far, then s_n is absolutely guaranteed to be prime\n }\n }\n }\n }\n}\n/**\n * Return an n-bit random BigInt (n>=1). If s=1, then the most significant of those n bits is set to 1.\n *\n * @export\n * @param {number} n\n * @param {number} s\n * @returns {number[]}\n */\n\nexport function randBigInt(n, s) {\n var a, b;\n a = Math.floor((n - 1) / bpe) + 2; //# array elements to hold the BigInt with a leading 0 element\n\n b = int2bigInt(0, 0, a);\n randBigInt_(b, n, s);\n return b;\n}\n/**\n * Set b to an n-bit random BigInt. If s=1, then the most significant of those n bits is set to 1.\n *\n * Array b must be big enough to hold the result. Must have n>=1\n *\n * @export\n * @param {number[]} b\n * @param {number} n\n * @param {number} s\n * @return {void}\n */\n\nexport function randBigInt_(b, n, s) {\n var i, a;\n\n for (i = 0; i < b.length; i++) {\n b[i] = 0;\n }\n\n a = Math.floor((n - 1) / bpe) + 1; //# array elements to hold the BigInt\n\n for (i = 0; i < a; i++) {\n b[i] = Math.floor(Math.random() * (1 << bpe - 1));\n }\n\n b[a - 1] &= (2 << (n - 1) % bpe) - 1;\n if (s == 1) b[a - 1] |= 1 << (n - 1) % bpe;\n}\n/**\n * Return the greatest common divisor of bigInts x and y (each with same number of elements).\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {number[]}\n */\n\nexport function GCD(x, y) {\n var xc, yc;\n xc = dup(x);\n yc = dup(y);\n GCD_(xc, yc);\n return xc;\n}\n/**\n * set x to the greatest common divisor of bigInts x and y (each with same number of elements).\n *\n * y is destroyed.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n */\n\nexport function GCD_(x, y) {\n var i, xp, yp, A, B, C, D, q, sing;\n var qp;\n if (T.length !== x.length) T = dup(x);\n sing = 1;\n\n while (sing) {\n //while y has nonzero elements other than y[0]\n sing = 0;\n\n for (i = 1; i < y.length; i++ //check if y has nonzero elements other than 0\n ) {\n if (y[i]) {\n sing = 1;\n break;\n }\n }\n\n if (!sing) break; //quit when y all zero elements except possibly y[0]\n\n for (i = x.length; !x[i] && i >= 0; i--) {\n ;\n } //find most significant element of x\n\n\n xp = x[i];\n yp = y[i];\n A = 1;\n B = 0;\n C = 0;\n D = 1;\n\n while (yp + C && yp + D) {\n q = Math.floor((xp + A) / (yp + C));\n qp = Math.floor((xp + B) / (yp + D));\n if (q != qp) break;\n t = A - q * C;\n A = C;\n C = t; // do (A,B,xp, C,D,yp) = (C,D,yp, A,B,xp) - q*(0,0,0, C,D,yp)\n\n t = B - q * D;\n B = D;\n D = t;\n t = xp - q * yp;\n xp = yp;\n yp = t;\n }\n\n if (B) {\n copy_(T, x);\n linComb_(x, y, A, B); //x=A*x+B*y\n\n linComb_(y, T, D, C); //y=D*y+C*T\n } else {\n mod_(x, y);\n copy_(T, x);\n copy_(x, y);\n copy_(y, T);\n }\n }\n\n if (y[0] === 0) return;\n t = modInt(x, y[0]);\n copyInt_(x, y[0]);\n y[0] = t;\n\n while (y[0]) {\n x[0] %= y[0];\n t = x[0];\n x[0] = y[0];\n y[0] = t;\n }\n}\n/**\n * do x=x**(-1) mod n, for bigInts x and n.\n *\n * If no inverse exists, it sets x to zero and returns 0, else it returns 1.\n * The x array must be at least as large as the n array.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} n\n * @returns {(0 | 1)}\n */\n\nexport function inverseMod_(x, n) {\n var k = 1 + 2 * Math.max(x.length, n.length);\n\n if (!(x[0] & 1) && !(n[0] & 1)) {\n //if both inputs are even, then inverse doesn't exist\n copyInt_(x, 0);\n return 0;\n }\n\n if (eg_u.length != k) {\n eg_u = new Array(k);\n eg_v = new Array(k);\n eg_A = new Array(k);\n eg_B = new Array(k);\n eg_C = new Array(k);\n eg_D = new Array(k);\n }\n\n copy_(eg_u, x);\n copy_(eg_v, n);\n copyInt_(eg_A, 1);\n copyInt_(eg_B, 0);\n copyInt_(eg_C, 0);\n copyInt_(eg_D, 1);\n\n for (;;) {\n while (!(eg_u[0] & 1)) {\n //while eg_u is even\n halve_(eg_u);\n\n if (!(eg_A[0] & 1) && !(eg_B[0] & 1)) {\n //if eg_A==eg_B==0 mod 2\n halve_(eg_A);\n halve_(eg_B);\n } else {\n add_(eg_A, n);\n halve_(eg_A);\n sub_(eg_B, x);\n halve_(eg_B);\n }\n }\n\n while (!(eg_v[0] & 1)) {\n //while eg_v is even\n halve_(eg_v);\n\n if (!(eg_C[0] & 1) && !(eg_D[0] & 1)) {\n //if eg_C==eg_D==0 mod 2\n halve_(eg_C);\n halve_(eg_D);\n } else {\n add_(eg_C, n);\n halve_(eg_C);\n sub_(eg_D, x);\n halve_(eg_D);\n }\n }\n\n if (!greater(eg_v, eg_u)) {\n //eg_v <= eg_u\n sub_(eg_u, eg_v);\n sub_(eg_A, eg_C);\n sub_(eg_B, eg_D);\n } else {\n //eg_v > eg_u\n sub_(eg_v, eg_u);\n sub_(eg_C, eg_A);\n sub_(eg_D, eg_B);\n }\n\n if (equalsInt(eg_u, 0)) {\n while (negative(eg_C) //make sure answer is nonnegative\n ) {\n add_(eg_C, n);\n }\n\n copy_(x, eg_C);\n\n if (!equalsInt(eg_v, 1)) {\n //if GCD_(x,n)!=1, then there is no inverse\n copyInt_(x, 0);\n return 0;\n }\n\n return 1;\n }\n }\n /*::\n declare var never: empty\n return never\n */\n\n}\n/**\n * return x**(-1) mod n, for integers x and n.\n *\n * Return 0 if there is no inverse\n *\n * @param {number} x\n * @param {number} n\n * @returns {number}\n */\n\nexport function inverseModInt(x, n) {\n var a = 1,\n b = 0,\n t;\n\n for (;;) {\n if (x === 1) return a;\n if (x === 0) return 0;\n b -= a * Math.floor(n / x); //$off\n\n n %= x;\n if (n === 1) return b; //to avoid negatives, change this b to n-b, and each -= to +=\n\n if (n === 0) return 0;\n a -= b * Math.floor(x / n); //$off\n\n x %= n;\n }\n /*::\n declare var never: empty\n return never\n */\n\n} //this deprecated function is for backward compatibility only.\n\nfunction inverseModInt_(x, n) {\n return inverseModInt(x, n);\n}\n/**\n * Given positive bigInts x and y, change the bigints v, a, and b to positive bigInts such that:\n *\n * v = GCD_(x,y) = a*x-b*y\n *\n * The bigInts v, a, b, must have exactly as many elements as the larger of x and y.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} v\n * @param {number[]} a\n * @param {number[]} b\n * @return {void}\n */\n\n\nexport function eGCD_(x, y, v, a, b) {\n var g = 0;\n var k = Math.max(x.length, y.length);\n\n if (eg_u.length != k) {\n eg_u = new Array(k);\n eg_A = new Array(k);\n eg_B = new Array(k);\n eg_C = new Array(k);\n eg_D = new Array(k);\n }\n\n while (!(x[0] & 1) && !(y[0] & 1)) {\n //while x and y both even\n halve_(x);\n halve_(y);\n g++;\n }\n\n copy_(eg_u, x);\n copy_(v, y);\n copyInt_(eg_A, 1);\n copyInt_(eg_B, 0);\n copyInt_(eg_C, 0);\n copyInt_(eg_D, 1);\n\n for (;;) {\n while (!(eg_u[0] & 1)) {\n //while u is even\n halve_(eg_u);\n\n if (!(eg_A[0] & 1) && !(eg_B[0] & 1)) {\n //if A==B==0 mod 2\n halve_(eg_A);\n halve_(eg_B);\n } else {\n add_(eg_A, y);\n halve_(eg_A);\n sub_(eg_B, x);\n halve_(eg_B);\n }\n }\n\n while (!(v[0] & 1)) {\n //while v is even\n halve_(v);\n\n if (!(eg_C[0] & 1) && !(eg_D[0] & 1)) {\n //if C==D==0 mod 2\n halve_(eg_C);\n halve_(eg_D);\n } else {\n add_(eg_C, y);\n halve_(eg_C);\n sub_(eg_D, x);\n halve_(eg_D);\n }\n }\n\n if (!greater(v, eg_u)) {\n //v<=u\n sub_(eg_u, v);\n sub_(eg_A, eg_C);\n sub_(eg_B, eg_D);\n } else {\n //v>u\n sub_(v, eg_u);\n sub_(eg_C, eg_A);\n sub_(eg_D, eg_B);\n }\n\n if (equalsInt(eg_u, 0)) {\n while (negative(eg_C)) {\n //make sure a (C) is nonnegative\n add_(eg_C, y);\n sub_(eg_D, x);\n }\n\n multInt_(eg_D, -1); ///make sure b (D) is nonnegative\n\n copy_(a, eg_C);\n copy_(b, eg_D);\n leftShift_(v, g);\n return;\n }\n }\n}\n/**\n * is bigInt x negative?\n *\n * @param {number[]} x\n * @returns {(1 | 0)}\n */\n\nexport function negative(x) {\n //TODO Flow Bool type inference\n return x[x.length - 1] >> bpe - 1 & 1;\n}\n/**\n * is (x << (shift*bpe)) > y?\n *\n * x and y are nonnegative bigInts\n * shift is a nonnegative integer\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} shift\n * @returns {(1 | 0)}\n */\n\nexport function greaterShift(x, y, shift) {\n var i,\n kx = x.length,\n ky = y.length;\n k = kx + shift < ky ? kx + shift : ky;\n\n for (i = ky - 1 - shift; i < kx && i >= 0; i++) {\n if (x[i] > 0) return 1;\n } //if there are nonzeros in x to the left of the first column of y, then x is bigger\n\n\n for (i = kx - 1 + shift; i < ky; i++) {\n if (y[i] > 0) return 0;\n } //if there are nonzeros in y to the left of the first column of x, then x is not bigger\n\n\n for (i = k - 1; i >= shift; i--) {\n if (x[i - shift] > y[i]) return 1;else if (x[i - shift] < y[i]) return 0;\n }\n\n return 0;\n}\n/**\n * is x > y?\n *\n * x and y both nonnegative\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {(1 | 0)}\n */\n\nexport function greater(x, y) {\n var i;\n var k = x.length < y.length ? x.length : y.length;\n\n for (i = x.length; i < y.length; i++) {\n if (y[i]) return 0;\n } //y has more digits\n\n\n for (i = y.length; i < x.length; i++) {\n if (x[i]) return 1;\n } //x has more digits\n\n\n for (i = k - 1; i >= 0; i--) {\n if (x[i] > y[i]) return 1;else if (x[i] < y[i]) return 0;\n }\n\n return 0;\n}\n/**\n * divide x by y giving quotient q and remainder r.\n *\n * q = floor(x/y)\n * r = x mod y\n *\n * All 4 are bigints.\n *\n * * x must have at least one leading zero element.\n * * y must be nonzero.\n * * q and r must be arrays that are exactly the same length as x. (Or q can have more).\n * * Must have x.length >= y.length >= 2.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} q\n * @param {number[]} r\n * @return {void}\n */\n\nexport function divide_(x, y, q, r) {\n var kx, ky;\n var i, j, y1, y2, c, a, b;\n copy_(r, x);\n\n for (ky = y.length; y[ky - 1] === 0; ky--) {\n ;\n } //ky is number of elements in y, not including leading zeros\n //normalize: ensure the most significant element of y has its highest bit set\n\n\n b = y[ky - 1];\n\n for (a = 0; b; a++) {\n b >>= 1;\n }\n\n a = bpe - a; //a is how many bits to shift so that the high order bit of y is leftmost in its array element\n\n leftShift_(y, a); //multiply both by 1<<a now, then divide both by that at the end\n\n leftShift_(r, a); //Rob Visser discovered a bug: the following line was originally just before the normalization.\n\n for (kx = r.length; r[kx - 1] === 0 && kx > ky; kx--) {\n ;\n } //kx is number of elements in normalized x, not including leading zeros\n\n\n copyInt_(q, 0); // q=0\n\n while (!greaterShift(y, r, kx - ky)) {\n // while (leftShift_(y,kx-ky) <= r) {\n subShift_(r, y, kx - ky); // r=r-leftShift_(y,kx-ky)\n\n q[kx - ky]++; // q[kx-ky]++;\n } // }\n\n\n for (i = kx - 1; i >= ky; i--) {\n if (r[i] == y[ky - 1]) q[i - ky] = mask;else q[i - ky] = Math.floor((r[i] * radix + r[i - 1]) / y[ky - 1]); //The following for(;;) loop is equivalent to the commented while loop,\n //except that the uncommented version avoids overflow.\n //The commented loop comes from HAC, which assumes r[-1]==y[-1]==0\n // while (q[i-ky]*(y[ky-1]*radix+y[ky-2]) > r[i]*radix*radix+r[i-1]*radix+r[i-2])\n // q[i-ky]--;\n\n for (;;) {\n y2 = (ky > 1 ? y[ky - 2] : 0) * q[i - ky];\n c = y2 >> bpe;\n y2 = y2 & mask;\n y1 = c + q[i - ky] * y[ky - 1];\n c = y1 >> bpe;\n y1 = y1 & mask;\n if (c == r[i] ? y1 == r[i - 1] ? y2 > (i > 1 ? r[i - 2] : 0) : y1 > r[i - 1] : c > r[i]) q[i - ky]--;else break;\n }\n\n linCombShift_(r, y, -q[i - ky], i - ky); //r=r-q[i-ky]*leftShift_(y,i-ky)\n\n if (negative(r)) {\n addShift_(r, y, i - ky); //r=r+leftShift_(y,i-ky)\n\n q[i - ky]--;\n }\n }\n\n rightShift_(y, a); //undo the normalization step\n\n rightShift_(r, a); //undo the normalization step\n}\n/**\n * do carries and borrows so each element of the bigInt x fits in bpe bits.\n *\n * @param {number[]} x\n */\n\nexport function carry_(x) {\n var i, k, c, b;\n k = x.length;\n c = 0;\n\n for (i = 0; i < k; i++) {\n c += x[i];\n b = 0;\n\n if (c < 0) {\n b = -(c >> bpe);\n c += b * radix;\n }\n\n x[i] = c & mask;\n c = (c >> bpe) - b;\n }\n}\n/**\n * return x mod n for bigInt x and integer n.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {number}\n */\n\nexport function modInt(x, n) {\n var i,\n c = 0;\n\n for (i = x.length - 1; i >= 0; i--) {\n c = (c * radix + x[i]) % n;\n }\n\n return c;\n}\n/**\n * convert the integer t into a bigInt with at least the given number of bits.\n * the returned array stores the bigInt in bpe-bit chunks, little endian (buff[0] is least significant word)\n * Pad the array with leading zeros so that it has at least minSize elements.\n *\n * There will always be at least one leading 0 element.\n *\n * @export\n * @param {number} t\n * @param {number} bits\n * @param {number} minSize\n * @returns {number[]}\n */\n\nexport function int2bigInt(t, bits, minSize) {\n var i, k;\n k = Math.ceil(bits / bpe) + 1;\n k = minSize > k ? minSize : k;\n var buff = new Array(k);\n copyInt_(buff, t);\n return buff;\n}\n/**\n * return the bigInt given a string representation in a given base.\n * Pad the array with leading zeros so that it has at least minSize elements.\n * If base=-1, then it reads in a space-separated list of array elements in decimal.\n *\n * The array will always have at least one leading zero, unless base=-1.\n *\n * @export\n * @param {string} s\n * @param {number} base\n * @param {number} [minSize]\n * @returns {number[]}\n */\n\nexport function str2bigInt(s, base, minSize) {\n var d, i, x, y, kk;\n var k = s.length;\n\n if (base === -1) {\n //comma-separated list of array elements in decimal\n x = new Array(0);\n\n for (;;) {\n y = new Array(x.length + 1);\n\n for (i = 0; i < x.length; i++) {\n y[i + 1] = x[i];\n }\n\n y[0] = parseInt(s, 10); //TODO PERF Should we replace that with ~~ (not not)? https://jsperf.com/number-vs-parseint-vs-plus/7\n\n x = y;\n d = s.indexOf(',', 0);\n if (d < 1) break; //$off\n\n s = s.substring(d + 1);\n if (s.length == 0) break;\n } //$off\n\n\n if (x.length < minSize) {\n //$off\n y = new Array(minSize);\n copy_(y, x);\n return y;\n }\n\n return x;\n }\n\n x = int2bigInt(0, base * k, 0);\n\n for (i = 0; i < k; i++) {\n d = digitsStr.indexOf(s.substring(i, i + 1), 0);\n if (base <= 36 && d >= 36) //convert lowercase to uppercase if base<=36\n d -= 26;\n\n if (d >= base || d < 0) {\n //stop at first illegal character\n break;\n }\n\n multInt_(x, base);\n addInt_(x, d);\n }\n\n for (k = x.length; k > 0 && !x[k - 1]; k--) {\n ;\n } //strip off leading zeros\n //$off\n\n\n k = minSize > k + 1 ? minSize : k + 1; //$off\n\n y = new Array(k); //$off\n\n kk = k < x.length ? k : x.length; //$off\n\n for (i = 0; i < kk; i++) {\n y[i] = x[i];\n } //$off\n\n\n for (; i < k; i++) {\n y[i] = 0;\n }\n\n return y;\n} //return the bigInt given a string representation in a given base.\n//Pad the array with leading zeros so that it has at least minSize elements.\n//If base=-1, then it reads in a space-separated list of array elements in decimal.\n//The array will always have at least one leading zero, unless base=-1.\n// function str2bigInt(s,b,minSize) {\n// var d, i, j, base, str, x, y, kk;\n// if (typeof b === 'string') {\n// base = b.length;\n// str = b;\n// } else {\n// base = b;\n// str = digitsStr;\n// }\n// var k=s.length;\n// if (base==-1) { //comma-separated list of array elements in decimal\n// x=new Array(0);\n// for (;;) {\n// y=new Array(x.length+1);\n// for (i=0;i<x.length;i++)\n// y[i+1]=x[i];\n// y[0]=parseInt(s,10);\n// x=y;\n// d=s.indexOf(',',0);\n// if (d<1)\n// break;\n// s=s.substring(d+1);\n// if (s.length==0)\n// break;\n// }\n// if (x.length<minSize) {\n// y=new Array(minSize);\n// copy_(y,x);\n// return y;\n// }\n// return x;\n// }\n// x=int2bigInt(0,base*k,0);\n// for (i=0;i<k;i++) {\n// d=str.indexOf(s.substring(i,i+1),0);\n// if (base<=36 && d>=36) { //convert lowercase to uppercase if base<=36\n// d-=26;\n// }\n// if (d>=base || d<0) { //ignore illegal characters\n// continue;\n// }\n// multInt_(x,base);\n// addInt_(x,d);\n// }\n// for (k=x.length;k>0 && !x[k-1];k--); //strip off leading zeros\n// k=minSize>k+1 ? minSize : k+1;\n// y=new Array(k);\n// kk=k<x.length ? k : x.length;\n// for (i=0;i<kk;i++)\n// y[i]=x[i];\n// for (;i<k;i++)\n// y[i]=0;\n// return y;\n// }\n\n/**\n * is bigint x equal to integer y?\n *\n * y must have less than bpe bits\n *\n * @export\n * @param {number[]} x\n * @param {number} y\n * @returns {(1 | 0)}\n */\n\nexport function equalsInt(x, y) {\n var i;\n if (x[0] != y) return 0;\n\n for (i = 1; i < x.length; i++) {\n if (x[i]) return 0;\n }\n\n return 1;\n}\n/**\n * are bigints x and y equal?\n *\n * this works even if x and y are different lengths and have arbitrarily many leading zeros\n *\n * @param {number[]} x\n * @param {number[]} y\n * @returns {(1 | 0)}\n */\n\nexport function equals(x, y) {\n var i;\n var k = x.length < y.length ? x.length : y.length;\n\n for (i = 0; i < k; i++) {\n if (x[i] !== y[i]) return 0;\n }\n\n if (x.length > y.length) {\n for (; i < x.length; i++) {\n if (x[i]) return 0;\n }\n } else {\n for (; i < y.length; i++) {\n if (y[i]) return 0;\n }\n }\n\n return 1;\n}\n/**\n * is the bigInt x equal to zero?\n *\n * @export\n * @param {number[]} x\n * @returns {(1 | 0)}\n */\n\nexport function isZero(x) {\n var i;\n\n for (i = 0; i < x.length; i++) {\n if (x[i]) return 0;\n }\n\n return 1;\n}\n/**\n * Convert a bigInt into a string in a given base, from base 2 up to base 95.\n *\n * Base -1 prints the contents of the array representing the number.\n *\n * @export\n * @param {number[]} x\n * @param {number} base\n * @returns {string}\n */\n\nexport function bigInt2str(x, base) {\n var i,\n t,\n s = '';\n if (s6.length !== x.length) s6 = dup(x);else copy_(s6, x);\n\n if (base === -1) {\n //return the list of array contents\n for (i = x.length - 1; i > 0; i--) {\n s += x[i] + ',';\n }\n\n s += x[0];\n } else {\n //return it in the given base\n while (!isZero(s6)) {\n t = divInt_(s6, base); //t=s6 % base; s6=floor(s6/base);\n\n s = digitsStr.substring(t, t + 1) + s;\n }\n }\n\n if (s.length === 0) s = '0';\n return s;\n}\n/**\n * Returns a duplicate of bigInt x\n *\n * @export\n * @param {number[]} x\n * @returns {number[]}\n */\n\nexport function dup(x) {\n var i;\n buff = Array(x.length);\n copy_(buff, x);\n return buff;\n}\n/**\n * do x=y on bigInts x and y.\n *\n * x must be an array at least as big as y (not counting the leading zeros in y).\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {void}\n */\n\nexport function copy_(x, y) {\n var i;\n var k = x.length < y.length ? x.length : y.length;\n\n for (i = 0; i < k; i++) {\n x[i] = y[i];\n }\n\n for (i = k; i < x.length; i++) {\n x[i] = 0;\n }\n}\n/**\n * do x=y on bigInt x and integer y.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {void}\n */\n\nexport function copyInt_(x, n) {\n var i, c;\n var len = x.length; //TODO .length in for loop have perfomance costs. Bench this\n\n for (c = n, i = 0; i < len; i++) {\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x+n where x is a bigInt and n is an integer.\n *\n * x must be large enough to hold the result.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {void}\n */\n\nexport function addInt_(x, n) {\n var i, k, c, b;\n x[0] += n;\n k = x.length;\n c = 0;\n\n for (i = 0; i < k; i++) {\n c += x[i];\n b = 0;\n\n if (c < 0) {\n b = -(c >> bpe);\n c += b * radix;\n }\n\n x[i] = c & mask;\n c = (c >> bpe) - b;\n if (!c) return; //stop carrying as soon as the carry is zero\n }\n}\n/**\n * right shift bigInt x by n bits.\n *\n * 0 <= n < bpe.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n */\n\nexport function rightShift_(x, n) {\n var i;\n var k = Math.floor(n / bpe);\n\n if (k) {\n for (i = 0; i < x.length - k; i++ //right shift x by k elements\n ) {\n x[i] = x[i + k];\n }\n\n for (; i < x.length; i++) {\n x[i] = 0;\n } //$off\n\n\n n %= bpe;\n }\n\n for (i = 0; i < x.length - 1; i++) {\n x[i] = mask & (x[i + 1] << bpe - n | x[i] >> n);\n }\n\n x[i] >>= n;\n}\n/**\n * do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement\n *\n * @param {number[]} x\n * @returns {void}\n */\n\nexport function halve_(x) {\n var i;\n\n for (i = 0; i < x.length - 1; i++) {\n x[i] = mask & (x[i + 1] << bpe - 1 | x[i] >> 1);\n }\n\n x[i] = x[i] >> 1 | x[i] & radix >> 1; //most significant bit stays the same\n}\n/**\n * left shift bigInt x by n bits\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {void}\n */\n\nexport function leftShift_(x, n) {\n var i;\n var k = Math.floor(n / bpe);\n\n if (k) {\n for (i = x.length; i >= k; i-- //left shift x by k elements\n ) {\n x[i] = x[i - k];\n }\n\n for (; i >= 0; i--) {\n x[i] = 0;\n } //$off\n\n\n n %= bpe;\n }\n\n if (!n) return;\n\n for (i = x.length - 1; i > 0; i--) {\n x[i] = mask & (x[i] << n | x[i - 1] >> bpe - n);\n }\n\n x[i] = mask & x[i] << n;\n}\n/**\n * do x=x*n where x is a bigInt and n is an integer.\n *\n * x must be large enough to hold the result.\n *\n * @param {number[]} x\n * @param {number} n\n * @returns {void}\n */\n\nexport function multInt_(x, n) {\n var i, k, c, b;\n if (!n) return;\n k = x.length;\n c = 0;\n\n for (i = 0; i < k; i++) {\n c += x[i] * n;\n b = 0;\n\n if (c < 0) {\n b = -(c >> bpe);\n c += b * radix;\n }\n\n x[i] = c & mask;\n c = (c >> bpe) - b;\n }\n}\n/**\n * do x=floor(x/n) for bigInt x and integer n, and return the remainder\n *\n * @param {number[]} x\n * @param {number} n\n * @returns {number} remainder\n */\n\nexport function divInt_(x, n) {\n var i,\n r = 0,\n s;\n\n for (i = x.length - 1; i >= 0; i--) {\n s = r * radix + x[i];\n x[i] = Math.floor(s / n);\n r = s % n;\n }\n\n return r;\n}\n/**\n * do the linear combination x=a*x+b*y for bigInts x and y, and integers a and b.\n *\n * x must be large enough to hold the answer.\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} a\n * @param {number} b\n * @returns {void}\n */\n\nexport function linComb_(x, y, a, b) {\n var i, c, k, kk;\n k = x.length < y.length ? x.length : y.length;\n kk = x.length;\n\n for (c = 0, i = 0; i < k; i++) {\n c += a * x[i] + b * y[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; i < kk; i++) {\n c += a * x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do the linear combination x=a*x+b*(y<<(ys*bpe)) for bigInts x and y, and integers a, b and ys.\n *\n * x must be large enough to hold the answer.\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} b\n * @param {number} ys\n * @returns {void}\n */\n\nexport function linCombShift_(x, y, b, ys) {\n var i, c, k, kk;\n k = x.length < ys + y.length ? x.length : ys + y.length;\n kk = x.length;\n\n for (c = 0, i = ys; i < k; i++) {\n c += x[i] + b * y[i - ys];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < kk; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x+(y<<(ys*bpe)) for bigInts x and y, and integer ys.\n *\n * x must be large enough to hold the answer.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} ys\n * @return {void}\n */\n\nexport function addShift_(x, y, ys) {\n var i, c, k, kk;\n k = x.length < ys + y.length ? x.length : ys + y.length;\n kk = x.length;\n\n for (c = 0, i = ys; i < k; i++) {\n c += x[i] + y[i - ys];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < kk; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x-(y<<(ys*bpe)) for bigInts x and y, and integer ys\n *\n * x must be large enough to hold the answer\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} ys\n * @return {void}\n */\n\nexport function subShift_(x, y, ys) {\n var i, c, k, kk;\n k = x.length < ys + y.length ? x.length : ys + y.length;\n kk = x.length;\n\n for (c = 0, i = ys; i < k; i++) {\n c += x[i] - y[i - ys];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < kk; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x-y for bigInts x and y\n *\n * x must be large enough to hold the answer\n *\n * negative answers will be 2s complement\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @return {void}\n */\n\nexport function sub_(x, y) {\n var i, c, k, kk;\n k = x.length < y.length ? x.length : y.length;\n\n for (c = 0, i = 0; i < k; i++) {\n c += x[i] - y[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < x.length; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x+y for bigInts x and y\n *\n * x must be large enough to hold the answer\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @return {void}\n */\n\nexport function add_(x, y) {\n var i, c, k, kk;\n k = x.length < y.length ? x.length : y.length;\n\n for (c = 0, i = 0; i < k; i++) {\n c += x[i] + y[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < x.length; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x*y for bigInts x and y.\n *\n * This is faster when y<x.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @return {void}\n */\n\nexport function mult_(x, y) {\n var i;\n if (ss.length != 2 * x.length) ss = new Array(2 * x.length);\n copyInt_(ss, 0);\n\n for (i = 0; i < y.length; i++) {\n if (y[i]) linCombShift_(ss, x, y[i], i);\n } //ss=1*ss+y[i]*(x<<(i*bpe))\n\n\n copy_(x, ss);\n}\n/**\n * do x=x mod n for bigInts x and n\n *\n * @export\n * @param {number[]} x\n * @param {number[]} n\n * @return {void}\n */\n\nexport function mod_(x, n) {\n if (s4.length !== x.length) s4 = dup(x);else copy_(s4, x);\n if (s5.length !== x.length) s5 = dup(x);\n divide_(s4, n, s5, x); //x = remainder of s4 / n\n}\n/**\n * do x=x*y mod n for bigInts x,y,n.\n *\n * for greater speed, let y<x.\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @return {void}\n */\n\nexport function multMod_(x, y, n) {\n var i;\n if (s0.length != 2 * x.length) s0 = new Array(2 * x.length);\n copyInt_(s0, 0);\n\n for (i = 0; i < y.length; i++) {\n if (y[i]) linCombShift_(s0, x, y[i], i);\n } //s0=1*s0+y[i]*(x<<(i*bpe))\n\n\n mod_(s0, n);\n copy_(x, s0);\n}\n/**\n * do x=x*x mod n for bigInts x,n.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} n\n * @return {void}\n */\n\nexport function squareMod_(x, n) {\n var i, j, d, c, kx, kn, k;\n\n for (kx = x.length; kx > 0 && !x[kx - 1]; kx--) {\n ;\n } //ignore leading zeros in x\n\n\n k = kx > n.length ? 2 * kx : 2 * n.length; //k=# elements in the product, which is twice the elements in the larger of x and n\n\n if (s0.length != k) s0 = new Array(k);\n copyInt_(s0, 0);\n\n for (i = 0; i < kx; i++) {\n c = s0[2 * i] + x[i] * x[i];\n s0[2 * i] = c & mask;\n c >>= bpe;\n\n for (j = i + 1; j < kx; j++) {\n c = s0[i + j] + 2 * x[i] * x[j] + c;\n s0[i + j] = c & mask;\n c >>= bpe;\n }\n\n s0[i + kx] = c;\n }\n\n mod_(s0, n);\n copy_(x, s0);\n}\n/**\n * return x with exactly k leading zero elements\n *\n * @export\n * @param {number[]} x\n * @param {number} k\n * @returns {number[]}\n */\n\nexport function trim(x, k) {\n var i, y;\n\n for (i = x.length; i > 0 && !x[i - 1]; i--) {\n ;\n }\n\n y = new Array(i + k);\n copy_(y, x);\n return y;\n}\n/**\n * do `x=x**y mod n`, where x,y,n are bigInts and `**` is exponentiation. `0**0=1`.\n *\n * this is faster when n is odd.\n *\n * x usually needs to have as many elements as n.\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @return {void}\n */\n\nexport function powMod_(x, y, n) {\n var k1, k2, kn, np;\n if (s7.length != n.length) s7 = dup(n); //for even modulus, use a simple square-and-multiply algorithm,\n //rather than using the more complex Montgomery algorithm.\n\n if ((n[0] & 1) == 0) {\n copy_(s7, x);\n copyInt_(x, 1);\n\n while (!equalsInt(y, 0)) {\n if (y[0] & 1) multMod_(x, s7, n);\n divInt_(y, 2);\n squareMod_(s7, n);\n }\n\n return;\n } //calculate np from n for the Montgomery multiplications\n\n\n copyInt_(s7, 0);\n\n for (kn = n.length; kn > 0 && !n[kn - 1]; kn--) {\n ;\n }\n\n np = radix - inverseModInt(modInt(n, radix), radix);\n s7[kn] = 1;\n multMod_(x, s7, n); // x = x * 2**(kn*bp) mod n\n\n if (s3.length != x.length) s3 = dup(x);else copy_(s3, x); //$off\n\n for (k1 = y.length - 1; k1 > 0 & !y[k1]; k1--) {\n ;\n } //k1=first nonzero element of y\n\n\n if (y[k1] == 0) {\n //anything to the 0th power is 1\n copyInt_(x, 1);\n return;\n }\n\n for (k2 = 1 << bpe - 1; k2 && !(y[k1] & k2); k2 >>= 1) {\n ;\n } //k2=position of first 1 bit in y[k1]\n\n\n for (;;) {\n if (!(k2 >>= 1)) {\n //look at next bit of y\n k1--;\n\n if (k1 < 0) {\n mont_(x, one, n, np);\n return;\n }\n\n k2 = 1 << bpe - 1;\n }\n\n mont_(x, x, n, np);\n if (k2 & y[k1]) //if next bit is a 1\n mont_(x, s3, n, np);\n }\n}\n/**\n * do x=x*y*Ri mod n for bigInts x,y,n,\n * where Ri = 2**(-kn*bpe) mod n, and kn is the\n * number of elements in the n array, not\n * counting leading zeros.\n *\n * x array must have at least as many elemnts as the n array\n * It's OK if x and y are the same variable.\n *\n * must have:\n * * x,y < n\n * * n is odd\n * * np = -(n^(-1)) mod radix\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @param {number} np\n * @return {void}\n */\n\nexport function mont_(x, y, n, np) {\n var i, j, c, ui, t, ks;\n var kn = n.length;\n var ky = y.length;\n if (sa.length != kn) sa = new Array(kn);\n copyInt_(sa, 0);\n\n for (; kn > 0 && n[kn - 1] == 0; kn--) {\n ;\n } //ignore leading zeros of n\n\n\n for (; ky > 0 && y[ky - 1] == 0; ky--) {\n ;\n } //ignore leading zeros of y\n\n\n ks = sa.length - 1; //sa will never have more than this many nonzero elements.\n //the following loop consumes 95% of the runtime for randTruePrime_() and powMod_() for large numbers\n\n for (i = 0; i < kn; i++) {\n t = sa[0] + x[i] * y[0];\n ui = (t & mask) * np & mask; //the inner \"& mask\" was needed on Safari (but not MSIE) at one time\n\n c = t + ui * n[0] >> bpe;\n t = x[i]; //do sa=(sa+x[i]*y+ui*n)/b where b=2**bpe. Loop is unrolled 5-fold for speed\n\n j = 1;\n\n for (; j < ky - 4;) {\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n for (; j < ky;) {\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n for (; j < kn - 4;) {\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n for (; j < kn;) {\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n for (; j < ks;) {\n c += sa[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n sa[j - 1] = c & mask;\n }\n\n if (!greater(n, sa)) sub_(sa, n);\n copy_(x, sa);\n}\n//# sourceMappingURL=index.js.map"
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\timeManager.ts",
"name": "./src/lib/mtproto/timeManager.ts",
"index": 18,
"index2": 14,
"size": 1910,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"issuerId": 26,
"issuerName": "./src/lib/mtproto/authorizer.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 26,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"name": "./src/lib/mtproto/authorizer.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 438,
"building": 329,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./timeManager",
"loc": "22:38-62"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "./timeManager",
"loc": "20:38-62"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.TimeManager = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nclass TimeManager {\r\n constructor() {\r\n this.lastMessageID = [0, 0];\r\n this.timeOffset = 0;\r\n storage_1.default.get('server_time_offset').then((to) => {\r\n if (to) {\r\n this.timeOffset = to;\r\n }\r\n });\r\n }\r\n generateID() {\r\n var timeTicks = Date.now(), timeSec = Math.floor(timeTicks / 1000) + this.timeOffset, timeMSec = timeTicks % 1000, random = bin_utils_1.nextRandomInt(0xFFFF);\r\n var messageID = [timeSec, (timeMSec << 21) | (random << 3) | 4];\r\n if (this.lastMessageID[0] > messageID[0] ||\r\n this.lastMessageID[0] == messageID[0] && this.lastMessageID[1] >= messageID[1]) {\r\n messageID = [this.lastMessageID[0], this.lastMessageID[1] + 4];\r\n }\r\n this.lastMessageID = messageID;\r\n // console.log('generated msg id', messageID, timeOffset)\r\n return bin_utils_1.longFromInts(messageID[0], messageID[1]);\r\n }\r\n applyServerTime(serverTime, localTime) {\r\n var newTimeOffset = serverTime - Math.floor((localTime || Date.now()) / 1000);\r\n var changed = Math.abs(this.timeOffset - newTimeOffset) > 10;\r\n storage_1.default.set({\r\n server_time_offset: newTimeOffset\r\n });\r\n this.lastMessageID = [0, 0];\r\n this.timeOffset = newTimeOffset;\r\n console.log(bin_utils_1.dT(), 'Apply server time', serverTime, localTime, newTimeOffset, changed);\r\n return changed;\r\n }\r\n}\r\nexports.TimeManager = TimeManager;\r\nexports.default = new TimeManager();\r\n"
},
{
"id": 16,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\transport.ts",
"name": "./src/lib/mtproto/transports/transport.ts",
"index": 21,
"index2": 15,
"size": 224,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\http.ts",
"issuerId": 10,
"issuerName": "./src/lib/mtproto/transports/http.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 10,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\http.ts",
"name": "./src/lib/mtproto/transports/http.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 8,
"building": 506
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "7:36-58"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass MTTransport {\r\n constructor(dcID, url) {\r\n this.dcID = dcID;\r\n this.url = url;\r\n }\r\n}\r\nexports.default = MTTransport;\r\n"
},
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"index": 0,
"index2": 28,
"size": 1540,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 0,
"building": 393
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "!!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"loc": "main"
}
],
"usedExports": true,
"providedExports": [],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is an entry point"
],
"depth": 0,
"source": "import apiManager from \"./apiManager\";\r\nimport AppStorage from '../storage';\r\nimport cryptoWorker from \"../crypto/cryptoworker\";\r\nimport networkerFactory from \"./networkerFactory\";\r\n\r\n//const ctx: Worker = self as any;\r\nconst ctx = self;\r\n\r\n//console.error('INCLUDE !!!', new Error().stack);\r\n\r\nnetworkerFactory.setUpdatesProcessor((obj, bool) => {\r\n ctx.postMessage({update: {obj, bool}});\r\n});\r\n\r\nctx.onmessage = function(e) {\r\n var taskID = e.data.taskID;\r\n\r\n if(e.data.useLs) {\r\n AppStorage.finishTask(e.data.taskID, e.data.args);\r\n return;\r\n }\r\n\r\n switch(e.data.task) {\r\n case 'unzip':\r\n return cryptoWorker.gzipUncompress.apply(cryptoWorker, e.data.args).then(result => {\r\n ctx.postMessage({taskID: taskID, result: result});\r\n });\r\n\r\n default: {\r\n try {\r\n let result = apiManager[e.data.task].apply(apiManager, e.data.args);\r\n if(result instanceof Promise) {\r\n result.then(result => {\r\n //console.log(e.data.task + ' result:', result, taskID);\r\n ctx.postMessage({taskID: taskID, result: result});\r\n }).catch(err => {\r\n //console.error(e.data.task + ' err:', err, taskID);\r\n ctx.postMessage({taskID: taskID, error: err});\r\n });\r\n } else {\r\n ctx.postMessage({taskID: taskID, result: result});\r\n }\r\n } catch(err) {\r\n ctx.postMessage({taskID: taskID, error: err});\r\n }\r\n\r\n //throw new Error('Unknown task: ' + e.data.task);\r\n }\r\n }\r\n}\r\n\r\nctx.postMessage('ready');\r\n"
},
{
"id": 18,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"name": "./src/lib/mtproto/networker.ts",
"index": 7,
"index2": 21,
"size": 45251,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"issuerId": 5,
"issuerName": "./src/lib/mtproto/networkerFactory.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"name": "./src/lib/mtproto/networkerFactory.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 12,
"building": 482,
"dependencies": 9
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"module": "./src/lib/mtproto/networkerFactory.ts",
"moduleName": "./src/lib/mtproto/networkerFactory.ts",
"type": "cjs require",
"userRequest": "./networker",
"loc": "4:20-42"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.MTPNetworker = void 0;\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst bin_utils_2 = require(\"../bin_utils\");\r\nconst tl_utils_1 = require(\"./tl_utils\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst schema_1 = __importDefault(require(\"./schema\"));\r\nconst timeManager_1 = __importDefault(require(\"./timeManager\"));\r\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\r\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\r\nconst http_1 = __importDefault(require(\"./transports/http\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst mtproto_config_1 = require(\"./mtproto_config\");\r\nclass MTPNetworker {\r\n constructor(dcID, authKey, authKeyID, serverSalt, options = {}) {\r\n this.dcID = dcID;\r\n this.authKey = authKey;\r\n this.authKeyID = authKeyID;\r\n this.serverSalt = serverSalt;\r\n this.options = options;\r\n this.lastServerMessages = [];\r\n this.sentMessages = {};\r\n this.pendingMessages = {};\r\n this.pendingAcks = [];\r\n this.pendingResends = [];\r\n this.connectionInited = false;\r\n //private longPollInt: number;\r\n this.longPollPending = 0;\r\n this.seqNo = 0;\r\n this.prevSessionID = [];\r\n this.sessionID = [];\r\n this.sleepAfter = 0;\r\n this.offline = false;\r\n this.checkConnectionPeriod = 0;\r\n this.nextReq = 0;\r\n this.onOnlineCb = this.checkConnection.bind(this);\r\n this.debug = false;\r\n this.lastResendReq = null;\r\n this.authKeyUint8 = bin_utils_2.convertToUint8Array(this.authKey);\r\n //this.authKeyID = sha1BytesSync(this.authKey).slice(-8);\r\n this.upload = this.options.fileUpload || this.options.fileDownload || false;\r\n this.log = polyfill_1.logger('NET-' + dcID + (this.upload ? '-U' : ''));\r\n this.log('constructor' /* , this.authKey, this.authKeyID, this.serverSalt */);\r\n this.updateSession();\r\n // if(!NetworkerFactory.offlineInited) {\r\n // NetworkerFactory.offlineInited = true;\r\n // /* $rootScope.offline = true\r\n // $rootScope.offlineConnecting = true */\r\n // }\r\n this.transport = dcConfigurator_1.default.chooseServer(this.dcID, this.upload);\r\n if (this.transport instanceof http_1.default) {\r\n /* this.longPollInt = */ window.setInterval(this.checkLongPoll.bind(this), 10000);\r\n this.checkLongPoll();\r\n }\r\n else {\r\n this.transport.networker = this;\r\n }\r\n }\r\n updateSession() {\r\n this.seqNo = 0;\r\n this.prevSessionID = this.sessionID;\r\n this.sessionID = new Array(8);\r\n this.sessionID = [...new Uint8Array(this.sessionID.length).randomize()];\r\n //MTProto.secureRandom.nextBytes(this.sessionID);\r\n }\r\n updateSentMessage(sentMessageID) {\r\n var sentMessage = this.sentMessages[sentMessageID];\r\n if (!sentMessage) {\r\n return false;\r\n }\r\n var self = this;\r\n if (sentMessage.container) {\r\n var newInner = [];\r\n sentMessage.inner.forEach((innerSentMessageID) => {\r\n var innerSentMessage = self.updateSentMessage(innerSentMessageID);\r\n if (innerSentMessage) {\r\n newInner.push(innerSentMessage.msg_id);\r\n }\r\n });\r\n sentMessage.inner = newInner;\r\n }\r\n sentMessage.msg_id = timeManager_1.default.generateID();\r\n sentMessage.seq_no = this.generateSeqNo(sentMessage.notContentRelated ||\r\n sentMessage.container);\r\n this.sentMessages[sentMessage.msg_id] = sentMessage;\r\n delete self.sentMessages[sentMessageID];\r\n return sentMessage;\r\n }\r\n generateSeqNo(notContentRelated) {\r\n var seqNo = this.seqNo * 2;\r\n if (!notContentRelated) {\r\n seqNo++;\r\n this.seqNo++;\r\n }\r\n return seqNo;\r\n }\r\n wrapMtpCall(method, params = {}, options = {}) {\r\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\r\n serializer.storeMethod(method, params);\r\n var messageID = timeManager_1.default.generateID();\r\n var seqNo = this.generateSeqNo();\r\n var message = {\r\n msg_id: messageID,\r\n seq_no: seqNo,\r\n body: serializer.getBytes()\r\n };\r\n if (mtproto_config_1.Modes.debug) {\r\n this.log('MT call', method, params, messageID, seqNo);\r\n }\r\n return this.pushMessage(message, options);\r\n }\r\n wrapMtpMessage(object = {}, options = {}) {\r\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\r\n serializer.storeObject(object, 'Object');\r\n var messageID = timeManager_1.default.generateID();\r\n var seqNo = this.generateSeqNo(options.notContentRelated);\r\n var message = {\r\n msg_id: messageID,\r\n seq_no: seqNo,\r\n body: serializer.getBytes()\r\n };\r\n if (mtproto_config_1.Modes.debug) {\r\n this.log('MT message', object, messageID, seqNo);\r\n }\r\n return this.pushMessage(message, options);\r\n }\r\n wrapApiCall(method, params = {}, options = {}) {\r\n let serializer = new tl_utils_1.TLSerialization(options);\r\n if (!this.connectionInited) { // this will call once for each new session\r\n ///////this.log('Wrap api call !this.connectionInited');\r\n let invokeWithLayer = schema_1.default.API.methods.find(m => m.method == 'invokeWithLayer');\r\n if (!invokeWithLayer)\r\n throw new Error('no invokeWithLayer!');\r\n serializer.storeInt(+invokeWithLayer.id >>> 0, 'invokeWithLayer');\r\n // @ts-ignore\r\n serializer.storeInt(schema_1.default.layer, 'layer');\r\n let initConnection = schema_1.default.API.methods.find(m => m.method == 'initConnection');\r\n if (!initConnection)\r\n throw new Error('no initConnection!');\r\n serializer.storeInt(+initConnection.id >>> 0, 'initConnection');\r\n serializer.storeInt(0x0, 'flags');\r\n serializer.storeInt(mtproto_config_1.App.id, 'api_id');\r\n serializer.storeString(navigator.userAgent || 'Unknown UserAgent', 'device_model');\r\n serializer.storeString(navigator.platform || 'Unknown Platform', 'system_version');\r\n serializer.storeString(mtproto_config_1.App.version, 'app_version');\r\n serializer.storeString(navigator.language || 'en', 'system_lang_code');\r\n serializer.storeString('', 'lang_pack');\r\n serializer.storeString(navigator.language || 'en', 'lang_code');\r\n //serializer.storeInt(0x0, 'proxy');\r\n /* serializer.storeMethod('initConnection', {\r\n 'flags': 0,\r\n 'api_id': App.id,\r\n 'device_model': navigator.userAgent || 'Unknown UserAgent',\r\n 'system_version': navigator.platform || 'Unknown Platform',\r\n 'app_version': App.version,\r\n 'system_lang_code': navigator.language || 'en',\r\n 'lang_pack': '',\r\n 'lang_code': navigator.language || 'en'\r\n }); */\r\n }\r\n if (options.afterMessageID) {\r\n let invokeAfterMsg = schema_1.default.API.methods.find(m => m.method == 'invokeAfterMsg');\r\n if (!invokeAfterMsg)\r\n throw new Error('no invokeAfterMsg!');\r\n this.log('Api call options.afterMessageID!');\r\n serializer.storeInt(+invokeAfterMsg.id >>> 0, 'invokeAfterMsg');\r\n serializer.storeLong(options.afterMessageID, 'msg_id');\r\n }\r\n options.resultType = serializer.storeMethod(method, params);\r\n /* if(method == 'account.updateNotifySettings') {\r\n this.log('api call body:', serializer.getBytes(true));\r\n } */\r\n var messageID = timeManager_1.default.generateID();\r\n var seqNo = this.generateSeqNo();\r\n var message = {\r\n msg_id: messageID,\r\n seq_no: seqNo,\r\n body: serializer.getBytes(true),\r\n isAPI: true\r\n };\r\n if (mtproto_config_1.Modes.debug /* || true */) {\r\n this.log('Api call', method, message, params, options);\r\n }\r\n else {\r\n //////this.log('Api call', method);\r\n }\r\n return this.pushMessage(message, options);\r\n }\r\n checkLongPoll() {\r\n var isClean = this.cleanupSent();\r\n //this.log('Check lp', this.longPollPending, tsNow(), this.dcID, isClean, this);\r\n if ((this.longPollPending && Date.now() < this.longPollPending) ||\r\n this.offline) {\r\n //this.log('No lp this time');\r\n return false;\r\n }\r\n var self = this;\r\n storage_1.default.get('dc').then((baseDcID) => {\r\n if (isClean && (baseDcID != self.dcID ||\r\n self.upload ||\r\n (self.sleepAfter && Date.now() > self.sleepAfter))) {\r\n //console.warn(dT(), 'Send long-poll for DC is delayed', self.dcID, self.sleepAfter);\r\n return;\r\n }\r\n self.sendLongPoll();\r\n });\r\n }\r\n sendLongPoll() {\r\n let maxWait = 25000;\r\n this.longPollPending = Date.now() + maxWait;\r\n //this.log('Set lp', this.longPollPending, tsNow())\r\n this.wrapMtpCall('http_wait', {\r\n max_delay: 500,\r\n wait_after: 150,\r\n max_wait: maxWait\r\n }, {\r\n noResponse: true,\r\n longPoll: true\r\n }).then(() => {\r\n this.longPollPending = 0;\r\n setTimeout(this.checkLongPoll.bind(this), 0);\r\n }, (error) => {\r\n this.log('Long-poll failed', error);\r\n });\r\n }\r\n pushMessage(message, options = {}) {\r\n return new Promise((resolve, reject) => {\r\n this.sentMessages[message.msg_id] = Object.assign(message, options, {\r\n deferred: { resolve, reject }\r\n });\r\n // this.log('Networker pushMessage:', this.sentMessages[message.msg_id]);\r\n this.pendingMessages[message.msg_id] = 0;\r\n if (!options || !options.noSchedule) {\r\n this.scheduleRequest();\r\n }\r\n if (bin_utils_1.isObject(options)) {\r\n options.messageID = message.msg_id;\r\n }\r\n });\r\n }\r\n pushResend(messageID, delay = 0) {\r\n var value = delay ? Date.now() + delay : 0;\r\n var sentMessage = this.sentMessages[messageID];\r\n if (sentMessage.container) {\r\n for (var i = 0; i < sentMessage.inner.length; i++) {\r\n this.pendingMessages[sentMessage.inner[i]] = value;\r\n }\r\n }\r\n else {\r\n this.pendingMessages[messageID] = value;\r\n }\r\n // this.log('Resend due', messageID, this.pendingMessages)\r\n this.scheduleRequest(delay);\r\n }\r\n getMsgKey(dataWithPadding, isOut) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n var authKey = this.authKeyUint8;\r\n var x = isOut ? 0 : 8;\r\n var msgKeyLargePlain = bin_utils_2.bufferConcat(authKey.subarray(88 + x, 88 + x + 32), dataWithPadding);\r\n let msgKeyLarge = yield cryptoworker_1.default.sha256Hash(msgKeyLargePlain);\r\n var msgKey = new Uint8Array(msgKeyLarge).subarray(8, 24);\r\n return msgKey;\r\n });\r\n }\r\n ;\r\n getAesKeyIv(msgKey, isOut) {\r\n var authKey = this.authKeyUint8;\r\n var x = isOut ? 0 : 8;\r\n var sha2aText = new Uint8Array(52);\r\n var sha2bText = new Uint8Array(52);\r\n var promises = [];\r\n sha2aText.set(msgKey, 0);\r\n sha2aText.set(authKey.subarray(x, x + 36), 16);\r\n promises.push(cryptoworker_1.default.sha256Hash(sha2aText));\r\n sha2bText.set(authKey.subarray(40 + x, 40 + x + 36), 0);\r\n sha2bText.set(msgKey, 36);\r\n promises.push(cryptoworker_1.default.sha256Hash(sha2bText));\r\n return Promise.all(promises).then((results) => {\r\n var aesKey = new Uint8Array(32);\r\n var aesIv = new Uint8Array(32);\r\n var sha2a = new Uint8Array(results[0]);\r\n var sha2b = new Uint8Array(results[1]);\r\n aesKey.set(sha2a.subarray(0, 8));\r\n aesKey.set(sha2b.subarray(8, 24), 8);\r\n aesKey.set(sha2a.subarray(24, 32), 24);\r\n aesIv.set(sha2b.subarray(0, 8));\r\n aesIv.set(sha2a.subarray(8, 24), 8);\r\n aesIv.set(sha2b.subarray(24, 32), 24);\r\n return [aesKey, aesIv];\r\n });\r\n }\r\n checkConnection(event) {\r\n /* $rootScope.offlineConnecting = true */\r\n this.log('Check connection', event);\r\n clearTimeout(this.checkConnectionTimeout);\r\n this.checkConnectionTimeout = 0;\r\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\r\n var pingID = [bin_utils_2.nextRandomInt(0xFFFFFFFF), bin_utils_2.nextRandomInt(0xFFFFFFFF)];\r\n serializer.storeMethod('ping', {\r\n ping_id: pingID\r\n });\r\n var pingMessage = {\r\n msg_id: timeManager_1.default.generateID(),\r\n seq_no: this.generateSeqNo(true),\r\n body: serializer.getBytes()\r\n };\r\n var self = this;\r\n this.sendEncryptedRequest(pingMessage, {\r\n timeout: 15000\r\n }).then((result) => {\r\n /* delete $rootScope.offlineConnecting */\r\n self.toggleOffline(false);\r\n }, () => {\r\n this.log('Delay ', self.checkConnectionPeriod * 1000);\r\n self.checkConnectionTimeout = setTimeout(self.checkConnection.bind(self), self.checkConnectionPeriod * 1000 | 0);\r\n self.checkConnectionPeriod = Math.min(60, self.checkConnectionPeriod * 1.5);\r\n /* setTimeout(function() {\r\n delete $rootScope.offlineConnecting\r\n }, 1000); */\r\n });\r\n }\r\n toggleOffline(enabled) {\r\n // this.log('toggle ', enabled, this.dcID, this.iii)\r\n if (this.offline !== undefined && this.offline == enabled) {\r\n return false;\r\n }\r\n this.offline = enabled;\r\n /* $rootScope.offline = enabled;\r\n $rootScope.offlineConnecting = false; */\r\n if (!(this.transport instanceof http_1.default)) {\r\n this.log('toggle ', enabled, this.dcID);\r\n return;\r\n }\r\n if (this.offline) {\r\n clearTimeout(this.nextReqTimeout);\r\n this.nextReqTimeout = 0;\r\n this.nextReq = 0;\r\n if (this.checkConnectionPeriod < 1.5) {\r\n this.checkConnectionPeriod = 0;\r\n }\r\n this.checkConnectionTimeout = setTimeout(this.checkConnection.bind(this), this.checkConnectionPeriod * 1000 | 0);\r\n this.checkConnectionPeriod = Math.min(30, (1 + this.checkConnectionPeriod) * 1.5);\r\n document.body.addEventListener('online', this.onOnlineCb, false);\r\n document.body.addEventListener('focus', this.onOnlineCb, false);\r\n }\r\n else {\r\n this.checkLongPoll();\r\n this.scheduleRequest();\r\n document.body.removeEventListener('online', this.onOnlineCb);\r\n document.body.removeEventListener('focus', this.onOnlineCb);\r\n clearTimeout(this.checkConnectionTimeout);\r\n this.checkConnectionTimeout = 0;\r\n }\r\n }\r\n performScheduledRequest() {\r\n // this.log('scheduled', this.dcID, this.iii)\r\n if (this.offline) {\r\n this.log('Cancel scheduled');\r\n return false;\r\n }\r\n this.nextReq = 0;\r\n if (this.pendingAcks.length) {\r\n var ackMsgIDs = this.pendingAcks.slice();\r\n /* for(var i = 0; i < this.pendingAcks.length; i++) {\r\n ackMsgIDs.push(this.pendingAcks[i]);\r\n } */\r\n // this.log('acking messages', ackMsgIDs)\r\n this.wrapMtpMessage({\r\n _: 'msgs_ack',\r\n msg_ids: ackMsgIDs\r\n }, {\r\n notContentRelated: true,\r\n noSchedule: true\r\n });\r\n }\r\n if (this.pendingResends.length) {\r\n var resendMsgIDs = this.pendingResends.slice();\r\n var resendOpts = {\r\n noSchedule: true,\r\n notContentRelated: true,\r\n messageID: '' // will set in wrapMtpMessage->pushMessage\r\n };\r\n /* for(var i = 0; i < this.pendingResends.length; i++) {\r\n resendMsgIDs.push(this.pendingResends[i]);\r\n } */\r\n // this.log('resendReq messages', resendMsgIDs)\r\n this.wrapMtpMessage({\r\n _: 'msg_resend_req',\r\n msg_ids: resendMsgIDs\r\n }, resendOpts);\r\n this.lastResendReq = {\r\n req_msg_id: resendOpts.messageID,\r\n resend_msg_ids: resendMsgIDs\r\n };\r\n }\r\n var messages = [], message;\r\n var messagesByteLen = 0;\r\n var currentTime = Date.now();\r\n var hasApiCall = false;\r\n var hasHttpWait = false;\r\n var lengthOverflow = false;\r\n var singlesCount = 0;\r\n var self = this;\r\n for (let messageID in this.pendingMessages) {\r\n let value = this.pendingMessages[messageID];\r\n if (!value || value >= currentTime) {\r\n if (message = this.sentMessages[messageID]) {\r\n //this.log('performScheduledRequest message:', message);\r\n var messageByteLength = ( /* message.body.byteLength || */message.body.length) + 32;\r\n if (!message.notContentRelated &&\r\n lengthOverflow) {\r\n continue; // maybe break here\r\n }\r\n if (!message.notContentRelated &&\r\n messagesByteLen &&\r\n messagesByteLen + messageByteLength > 655360) { // 640 Kb\r\n this.log.warn('lengthOverflow', message);\r\n lengthOverflow = true;\r\n continue; // maybe break here\r\n }\r\n if (message.singleInRequest) {\r\n singlesCount++;\r\n if (singlesCount > 1) {\r\n continue; // maybe break here\r\n }\r\n }\r\n messages.push(message);\r\n messagesByteLen += messageByteLength;\r\n if (message.isAPI) {\r\n hasApiCall = true;\r\n }\r\n else if (message.longPoll) {\r\n hasHttpWait = true;\r\n }\r\n }\r\n else {\r\n // this.log(message, messageID)\r\n }\r\n delete self.pendingMessages[messageID];\r\n }\r\n }\r\n if (hasApiCall && !hasHttpWait && this.transport instanceof http_1.default) {\r\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\r\n serializer.storeMethod('http_wait', {\r\n max_delay: 500,\r\n wait_after: 150,\r\n max_wait: 3000\r\n });\r\n messages.push({\r\n msg_id: timeManager_1.default.generateID(),\r\n seq_no: this.generateSeqNo(),\r\n body: serializer.getBytes()\r\n });\r\n }\r\n if (!messages.length) {\r\n // this.log('no scheduled messages')\r\n return;\r\n }\r\n var noResponseMsgs = [];\r\n if (messages.length > 1) {\r\n var container = new tl_utils_1.TLSerialization({\r\n mtproto: true,\r\n startMaxLength: messagesByteLen + 64\r\n });\r\n container.storeInt(0x73f1f8dc, 'CONTAINER[id]');\r\n container.storeInt(messages.length, 'CONTAINER[count]');\r\n var innerMessages = [];\r\n messages.forEach((message, i) => {\r\n container.storeLong(message.msg_id, 'CONTAINER[' + i + '][msg_id]');\r\n innerMessages.push(message.msg_id);\r\n container.storeInt(message.seq_no, 'CONTAINER[' + i + '][seq_no]');\r\n container.storeInt(message.body.length, 'CONTAINER[' + i + '][bytes]');\r\n container.storeRawBytes(message.body, 'CONTAINER[' + i + '][body]');\r\n if (message.noResponse) {\r\n noResponseMsgs.push(message.msg_id);\r\n }\r\n });\r\n var containerSentMessage = {\r\n msg_id: timeManager_1.default.generateID(),\r\n seq_no: this.generateSeqNo(true),\r\n container: true,\r\n inner: innerMessages\r\n };\r\n message = Object.assign({\r\n body: container.getBytes(true)\r\n }, containerSentMessage);\r\n this.sentMessages[message.msg_id] = containerSentMessage;\r\n if (mtproto_config_1.Modes.debug || true) {\r\n this.log('Container', innerMessages, message.msg_id, message.seq_no);\r\n }\r\n }\r\n else {\r\n if (message.noResponse) {\r\n noResponseMsgs.push(message.msg_id);\r\n }\r\n this.sentMessages[message.msg_id] = message;\r\n }\r\n this.pendingAcks = [];\r\n let promise = this.sendEncryptedRequest(message);\r\n if (!(this.transport instanceof http_1.default)) {\r\n if (noResponseMsgs.length)\r\n this.log.error('noResponseMsgs length!', noResponseMsgs);\r\n }\r\n else\r\n promise.then((result) => {\r\n self.toggleOffline(false);\r\n // this.log('parse for', message)\r\n self.parseResponse(result).then((response) => {\r\n if (mtproto_config_1.Modes.debug) {\r\n this.log('Server response', self.dcID, response);\r\n }\r\n self.processMessage(response.response, response.messageID, response.sessionID);\r\n noResponseMsgs.forEach((msgID) => {\r\n if (self.sentMessages[msgID]) {\r\n var deferred = self.sentMessages[msgID].deferred;\r\n delete self.sentMessages[msgID];\r\n deferred.resolve();\r\n }\r\n });\r\n if (self.transport instanceof http_1.default) {\r\n self.checkLongPoll();\r\n this.checkConnectionPeriod = Math.max(1.1, Math.sqrt(this.checkConnectionPeriod));\r\n }\r\n });\r\n }, (error) => {\r\n this.log.error('Encrypted request failed', error, message);\r\n if (message.container) {\r\n message.inner.forEach((msgID) => {\r\n self.pendingMessages[msgID] = 0;\r\n });\r\n delete self.sentMessages[message.msg_id];\r\n }\r\n else {\r\n self.pendingMessages[message.msg_id] = 0;\r\n }\r\n noResponseMsgs.forEach((msgID) => {\r\n if (self.sentMessages[msgID]) {\r\n var deferred = self.sentMessages[msgID].deferred;\r\n delete self.sentMessages[msgID];\r\n delete self.pendingMessages[msgID];\r\n deferred.reject();\r\n }\r\n });\r\n self.toggleOffline(true);\r\n });\r\n if (lengthOverflow || singlesCount > 1) {\r\n this.scheduleRequest();\r\n }\r\n }\r\n getEncryptedMessage(dataWithPadding) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let msgKey = yield this.getMsgKey(dataWithPadding, true);\r\n let keyIv = yield this.getAesKeyIv(msgKey, true);\r\n // this.log('after msg key iv')\r\n let encryptedBytes = yield cryptoworker_1.default.aesEncrypt(dataWithPadding, keyIv[0], keyIv[1]);\r\n // this.log('Finish encrypt')\r\n return {\r\n bytes: encryptedBytes,\r\n msgKey: msgKey\r\n };\r\n });\r\n }\r\n getDecryptedMessage(msgKey, encryptedData) {\r\n // this.log('get decrypted start')\r\n return this.getAesKeyIv(msgKey, false).then((keyIv) => {\r\n // this.log('after msg key iv')\r\n return cryptoworker_1.default.aesDecrypt(encryptedData, keyIv[0], keyIv[1]);\r\n });\r\n }\r\n sendEncryptedRequest(message, options = {}) {\r\n var self = this;\r\n this.debug && this.log('Send encrypted', message, options, this.authKeyID);\r\n // console.trace()\r\n var data = new tl_utils_1.TLSerialization({\r\n startMaxLength: message.body.length + 2048\r\n });\r\n data.storeIntBytes(this.serverSalt, 64, 'salt');\r\n data.storeIntBytes(this.sessionID, 64, 'session_id');\r\n data.storeLong(message.msg_id, 'message_id');\r\n data.storeInt(message.seq_no, 'seq_no');\r\n data.storeInt(message.body.length, 'message_data_length');\r\n data.storeRawBytes(message.body, 'message_data');\r\n var dataBuffer = data.getBuffer();\r\n var paddingLength = (16 - (data.offset % 16)) + 16 * (1 + bin_utils_2.nextRandomInt(5));\r\n var padding = new Array(paddingLength);\r\n padding = [...new Uint8Array(padding.length).randomize()];\r\n //MTProto.secureRandom.nextBytes(padding);\r\n var dataWithPadding = bin_utils_2.bufferConcat(dataBuffer, padding);\r\n // this.log('Adding padding', dataBuffer, padding, dataWithPadding)\r\n // this.log('auth_key_id', bytesToHex(self.authKeyID))\r\n return this.getEncryptedMessage(dataWithPadding).then((encryptedResult) => {\r\n this.debug && this.log('Got encrypted out message', encryptedResult);\r\n let request = new tl_utils_1.TLSerialization({\r\n startMaxLength: encryptedResult.bytes.byteLength + 256\r\n });\r\n request.storeIntBytes(self.authKeyID, 64, 'auth_key_id');\r\n request.storeIntBytes(encryptedResult.msgKey, 128, 'msg_key');\r\n request.storeRawBytes(encryptedResult.bytes, 'encrypted_data');\r\n //var requestData = xhrSendBuffer ? request.getBuffer() : request.getBytes(true) as Uint8Array;\r\n let requestData = request.getBytes(true);\r\n let baseError = {\r\n code: 406,\r\n type: 'NETWORK_BAD_RESPONSE',\r\n transport: this.transport\r\n };\r\n let promise = this.transport.send(requestData);\r\n if (!(this.transport instanceof http_1.default))\r\n return promise;\r\n return promise.then((result) => {\r\n if (!result || !result.byteLength) {\r\n return Promise.reject(baseError);\r\n }\r\n return result;\r\n }, (error) => {\r\n if (!error.message && !error.type) {\r\n error = Object.assign(baseError, {\r\n type: 'NETWORK_BAD_REQUEST',\r\n originalError: error\r\n });\r\n }\r\n return Promise.reject(error);\r\n });\r\n });\r\n }\r\n parseResponse(responseBuffer) {\r\n this.debug && this.log('Start parsing response' /* , responseBuffer */);\r\n let self = this;\r\n let deserializer = new tl_utils_1.TLDeserialization(responseBuffer);\r\n let authKeyID = deserializer.fetchIntBytes(64, true, 'auth_key_id');\r\n if (!bin_utils_2.bytesCmp(authKeyID, this.authKeyID)) {\r\n throw new Error('[MT] Invalid server auth_key_id: ' + authKeyID.hex);\r\n }\r\n let msgKey = deserializer.fetchIntBytes(128, true, 'msg_key');\r\n let encryptedData = deserializer.fetchRawBytes(responseBuffer.byteLength - deserializer.getOffset(), true, 'encrypted_data');\r\n return self.getDecryptedMessage(msgKey, encryptedData).then((dataWithPadding) => {\r\n // this.log('after decrypt')\r\n return self.getMsgKey(dataWithPadding, false).then((calcMsgKey) => {\r\n if (!bin_utils_2.bytesCmp(msgKey, calcMsgKey)) {\r\n this.log.warn('[MT] msg_keys', msgKey, calcMsgKey);\r\n this.updateSession(); // fix 28.01.2020\r\n throw new Error('[MT] server msgKey mismatch, updating session');\r\n }\r\n // this.log('after msgKey check')\r\n let deserializer = new tl_utils_1.TLDeserialization(dataWithPadding, { mtproto: true });\r\n /* let salt = */ deserializer.fetchIntBytes(64, false, 'salt'); // need\r\n let sessionID = deserializer.fetchIntBytes(64, false, 'session_id');\r\n let messageID = deserializer.fetchLong('message_id');\r\n if (!bin_utils_2.bytesCmp(sessionID, self.sessionID) &&\r\n (!self.prevSessionID || !bin_utils_2.bytesCmp(sessionID, self.prevSessionID))) {\r\n this.log.warn('Sessions', sessionID, self.sessionID, self.prevSessionID, dataWithPadding);\r\n //this.updateSession();\r\n //this.sessionID = sessionID;\r\n throw new Error('[MT] Invalid server session_id: ' + bin_utils_2.bytesToHex(sessionID));\r\n }\r\n let seqNo = deserializer.fetchInt('seq_no');\r\n let totalLength = dataWithPadding.byteLength;\r\n let messageBodyLength = deserializer.fetchInt('message_data[length]');\r\n let offset = deserializer.getOffset();\r\n if ((messageBodyLength % 4) ||\r\n messageBodyLength > totalLength - offset) {\r\n throw new Error('[MT] Invalid body length: ' + messageBodyLength);\r\n }\r\n let messageBody = deserializer.fetchRawBytes(messageBodyLength, true, 'message_data');\r\n offset = deserializer.getOffset();\r\n let paddingLength = totalLength - offset;\r\n if (paddingLength < 12 || paddingLength > 1024) {\r\n throw new Error('[MT] Invalid padding length: ' + paddingLength);\r\n }\r\n //let buffer = bytesToArrayBuffer(messageBody);\r\n deserializer = new tl_utils_1.TLDeserialization(/* buffer */ messageBody, { mtproto: true });\r\n // костыль\r\n deserializer.override = {\r\n mt_message: (function (result, field) {\r\n result.msg_id = this.fetchLong(field + '[msg_id]');\r\n result.seqno = this.fetchInt(field + '[seqno]');\r\n result.bytes = this.fetchInt(field + '[bytes]');\r\n var offset = this.getOffset();\r\n //self.log('mt_message!!!!!', result, field);\r\n try {\r\n result.body = this.fetchObject('Object', field + '[body]');\r\n }\r\n catch (e) {\r\n self.log.error('parse error', e.message, e.stack);\r\n result.body = {\r\n _: 'parse_error',\r\n error: e\r\n };\r\n }\r\n if (this.offset != offset + result.bytes) {\r\n // console.warn(dT(), 'set offset', this.offset, offset, result.bytes)\r\n // this.log(result)\r\n this.offset = offset + result.bytes;\r\n }\r\n // this.log('override message', result)\r\n }).bind(deserializer),\r\n mt_rpc_result: (function (result, field) {\r\n result.req_msg_id = this.fetchLong(field + '[req_msg_id]');\r\n var sentMessage = self.sentMessages[result.req_msg_id];\r\n var type = sentMessage && sentMessage.resultType || 'Object';\r\n if (result.req_msg_id && !sentMessage) {\r\n // console.warn(dT(), 'Result for unknown message', result);\r\n return;\r\n }\r\n result.result = this.fetchObject(type, field + '[result]');\r\n // self.log(dT(), 'override rpc_result', sentMessage, type, result);\r\n }).bind(deserializer)\r\n };\r\n var response = deserializer.fetchObject('', 'INPUT');\r\n return {\r\n response: response,\r\n messageID: messageID,\r\n sessionID: sessionID,\r\n seqNo: seqNo\r\n };\r\n });\r\n });\r\n }\r\n applyServerSalt(newServerSalt) {\r\n var serverSalt = bin_utils_2.longToBytes(newServerSalt);\r\n storage_1.default.set({\r\n ['dc' + this.dcID + '_server_salt']: bin_utils_2.bytesToHex(serverSalt)\r\n });\r\n this.serverSalt = serverSalt;\r\n return true;\r\n }\r\n scheduleRequest(delay = 0) {\r\n if (!(this.transport instanceof http_1.default)) { // if socket\r\n return this.performScheduledRequest();\r\n }\r\n if (this.offline /* && this.transport instanceof HTTP */) {\r\n this.checkConnection('forced schedule');\r\n }\r\n /* if(delay && !(this.transport instanceof HTTP)) {\r\n delay = 0;\r\n } */\r\n var nextReq = Date.now() + delay;\r\n if (delay && this.nextReq && this.nextReq <= nextReq) {\r\n return false;\r\n }\r\n // this.log('schedule req', delay)\r\n // console.trace()\r\n clearTimeout(this.nextReqTimeout);\r\n this.nextReqTimeout = 0;\r\n if (delay > 0) {\r\n this.nextReqTimeout = window.setTimeout(this.performScheduledRequest.bind(this), delay || 0);\r\n }\r\n else {\r\n setTimeout(this.performScheduledRequest.bind(this), 0);\r\n }\r\n this.nextReq = nextReq;\r\n }\r\n ackMessage(msgID) {\r\n // this.log('ack message', msgID)\r\n this.pendingAcks.push(msgID);\r\n this.scheduleRequest(30000);\r\n }\r\n reqResendMessage(msgID) {\r\n this.log('Req resend', msgID);\r\n this.pendingResends.push(msgID);\r\n this.scheduleRequest(100);\r\n }\r\n cleanupSent() {\r\n var self = this;\r\n var notEmpty = false;\r\n // this.log('clean start', this.dcID/*, this.sentMessages*/)\r\n Object.keys(this.sentMessages).forEach((msgID) => {\r\n let message = this.sentMessages[msgID];\r\n // this.log('clean iter', msgID, message)\r\n if (message.notContentRelated && self.pendingMessages[msgID] === undefined) {\r\n // this.log('clean notContentRelated', msgID)\r\n delete self.sentMessages[msgID];\r\n }\r\n else if (message.container) {\r\n for (var i = 0; i < message.inner.length; i++) {\r\n if (self.sentMessages[message.inner[i]] !== undefined) {\r\n // this.log('clean failed, found', msgID, message.inner[i], self.sentMessages[message.inner[i]].seq_no)\r\n notEmpty = true;\r\n return;\r\n }\r\n }\r\n // this.log('clean container', msgID)\r\n delete self.sentMessages[msgID];\r\n }\r\n else {\r\n notEmpty = true;\r\n }\r\n });\r\n return !notEmpty;\r\n }\r\n processMessageAck(messageID) {\r\n var sentMessage = this.sentMessages[messageID];\r\n if (sentMessage && !sentMessage.acked) {\r\n delete sentMessage.body;\r\n sentMessage.acked = true;\r\n return true;\r\n }\r\n return false;\r\n }\r\n processError(rawError) {\r\n var matches = (rawError.error_message || '').match(/^([A-Z_0-9]+\\b)(: (.+))?/) || [];\r\n rawError.error_code = rawError.error_code;\r\n return {\r\n code: !rawError.error_code || rawError.error_code <= 0 ? 500 : rawError.error_code,\r\n type: matches[1] || 'UNKNOWN',\r\n description: matches[3] || ('CODE#' + rawError.error_code + ' ' + rawError.error_message),\r\n originalError: rawError\r\n };\r\n }\r\n processMessage(message, messageID, sessionID) {\r\n var msgidInt = parseInt(messageID /* .toString(10) */.substr(0, -10), 10);\r\n if (msgidInt % 2) {\r\n this.log.warn('[MT] Server even message id: ', messageID, message);\r\n return;\r\n }\r\n this.debug && this.log('process message', message, messageID, sessionID);\r\n switch (message._) {\r\n case 'msg_container':\r\n var len = message.messages.length;\r\n for (var i = 0; i < len; i++) {\r\n this.processMessage(message.messages[i], message.messages[i].msg_id, sessionID);\r\n }\r\n break;\r\n case 'bad_server_salt':\r\n this.log('Bad server salt', message);\r\n var sentMessage = this.sentMessages[message.bad_msg_id];\r\n if (!sentMessage || sentMessage.seq_no != message.bad_msg_seqno) {\r\n this.log(message.bad_msg_id, message.bad_msg_seqno);\r\n throw new Error('[MT] Bad server salt for invalid message');\r\n }\r\n this.applyServerSalt(message.new_server_salt);\r\n this.pushResend(message.bad_msg_id);\r\n this.ackMessage(messageID);\r\n break;\r\n case 'bad_msg_notification':\r\n this.log('Bad msg notification', message);\r\n var sentMessage = this.sentMessages[message.bad_msg_id];\r\n if (!sentMessage || sentMessage.seq_no != message.bad_msg_seqno) {\r\n this.log(message.bad_msg_id, message.bad_msg_seqno);\r\n throw new Error('[MT] Bad msg notification for invalid message');\r\n }\r\n if (message.error_code == 16 || message.error_code == 17) {\r\n if (timeManager_1.default.applyServerTime(bin_utils_2.bigStringInt(messageID).shiftRight(32).toString(10))) {\r\n this.log('Update session');\r\n this.updateSession();\r\n }\r\n var badMessage = this.updateSentMessage(message.bad_msg_id);\r\n if (badMessage)\r\n this.pushResend(badMessage.msg_id); // fix 23.01.2020\r\n this.ackMessage(messageID);\r\n }\r\n break;\r\n case 'message':\r\n if (this.lastServerMessages.indexOf(messageID) != -1) {\r\n // console.warn('[MT] Server same messageID: ', messageID)\r\n this.ackMessage(messageID);\r\n return;\r\n }\r\n this.lastServerMessages.push(messageID);\r\n if (this.lastServerMessages.length > 100) {\r\n this.lastServerMessages.shift();\r\n }\r\n this.processMessage(message.body, message.msg_id, sessionID);\r\n break;\r\n case 'new_session_created':\r\n this.ackMessage(messageID);\r\n this.log('new_session_created in my head');\r\n //this.updateSession();\r\n this.processMessageAck(message.first_msg_id);\r\n this.applyServerSalt(message.server_salt);\r\n storage_1.default.get('dc').then((baseDcID) => {\r\n if (baseDcID == this.dcID && !this.upload && networkerFactory_1.default.updatesProcessor) {\r\n networkerFactory_1.default.updatesProcessor(message, true);\r\n }\r\n });\r\n break;\r\n case 'msgs_ack':\r\n for (var i = 0; i < message.msg_ids.length; i++) {\r\n this.processMessageAck(message.msg_ids[i]);\r\n }\r\n break;\r\n case 'msg_detailed_info':\r\n if (!this.sentMessages[message.msg_id]) {\r\n this.ackMessage(message.answer_msg_id);\r\n break;\r\n }\r\n case 'msg_new_detailed_info':\r\n if (this.pendingAcks.indexOf(message.answer_msg_id)) {\r\n break;\r\n }\r\n this.reqResendMessage(message.answer_msg_id);\r\n break;\r\n case 'msgs_state_info':\r\n this.ackMessage(message.answer_msg_id);\r\n if (this.lastResendReq &&\r\n this.lastResendReq.req_msg_id == message.req_msg_id &&\r\n this.pendingResends.length) {\r\n var badMsgID, pos;\r\n for (let i = 0; i < this.lastResendReq.resend_msg_ids.length; i++) {\r\n badMsgID = this.lastResendReq.resend_msg_ids[i];\r\n pos = this.pendingResends.indexOf(badMsgID);\r\n if (pos != -1) {\r\n this.pendingResends.splice(pos, 1);\r\n }\r\n }\r\n }\r\n break;\r\n case 'rpc_result':\r\n this.ackMessage(messageID);\r\n var sentMessageID = message.req_msg_id;\r\n var sentMessage = this.sentMessages[sentMessageID];\r\n this.processMessageAck(sentMessageID);\r\n if (sentMessage) {\r\n var deferred = sentMessage.deferred;\r\n if (message.result._ == 'rpc_error') {\r\n var error = this.processError(message.result);\r\n this.log('Rpc error', error);\r\n if (deferred) {\r\n deferred.reject(error);\r\n }\r\n }\r\n else {\r\n if (deferred) {\r\n if (mtproto_config_1.Modes.debug) {\r\n this.debug && this.log('Rpc response', message.result);\r\n }\r\n else {\r\n var dRes = message.result._;\r\n if (!dRes) {\r\n if (message.result.length > 5) {\r\n dRes = '[..' + message.result.length + '..]';\r\n }\r\n else {\r\n dRes = message.result;\r\n }\r\n }\r\n this.debug && this.log('Rpc response', dRes, sentMessage);\r\n }\r\n sentMessage.deferred.resolve(message.result);\r\n }\r\n if (sentMessage.isAPI && !this.connectionInited) {\r\n this.connectionInited = true;\r\n ////this.log('Rpc set connectionInited to:', this.connectionInited);\r\n }\r\n }\r\n delete this.sentMessages[sentMessageID];\r\n }\r\n break;\r\n default:\r\n this.ackMessage(messageID);\r\n this.debug && this.log('Update', message);\r\n if (networkerFactory_1.default.updatesProcessor !== null) {\r\n networkerFactory_1.default.updatesProcessor(message, true);\r\n }\r\n break;\r\n }\r\n }\r\n}\r\nexports.MTPNetworker = MTPNetworker;\r\n"
},
{
"id": 19,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\@cryptography\\sha1\\dist\\index.js",
"name": "./node_modules/@cryptography/sha1/dist/index.js",
"index": 11,
"index2": 5,
"size": 6225,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"issuerId": 12,
"issuerName": "./src/lib/crypto/crypto_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
}
}
],
"profile": {
"factory": 897,
"building": 17
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "@cryptography/sha1",
"loc": "16:31-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/** Gets a uint32 from string in big-endian order order */\nfunction strToInt32(str, pos) {\n return (str.charCodeAt(pos) << 24\n ^ str.charCodeAt(pos + 1) << 16\n ^ str.charCodeAt(pos + 2) << 8\n ^ str.charCodeAt(pos + 3));\n}\n/** Returns a uint32 as a string in big-endian order order */\nfunction int32ToStr(data) {\n return (String.fromCharCode((data >> 24) & 0xFF)\n + String.fromCharCode((data >> 16) & 0xFF)\n + String.fromCharCode((data >> 8) & 0xFF)\n + String.fromCharCode(data & 0xFF));\n}\n// padding\nvar _padding = String.fromCharCode(128);\nfor (var i = 64; i--;)\n _padding += String.fromCharCode(0);\n/**\n * Updates a SHA-1 state with the given byte buffer.\n */\nfunction update(data) {\n var a;\n var b;\n var c;\n var d;\n var e;\n var i = 0;\n var f = 0;\n var t = 0;\n // Array to use to store words.\n var words = new Uint32Array(80);\n // SHA-256 state contains five 32-bit integers\n var h1 = 0x67452301;\n var h2 = 0xEFCDAB89;\n var h3 = 0x98BADCFE;\n var h4 = 0x10325476;\n var h5 = 0xC3D2E1F0;\n var len = data.length;\n var p = 0; // let ni = 64;\n // consume 512 bit (64 byte) chunks\n // While decrementing loop is much faster than for\n while (len >= 64) {\n // initialize hash value for this chunk\n a = h1;\n b = h2;\n c = h3;\n d = h4;\n e = h5;\n // round 1\n for (i = 0; i < 16; i += 1) {\n words[i] = strToInt32(data, p);\n p += 4;\n f = d ^ (b & (c ^ d));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + words[i];\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n for (; i < 20; i += 1) {\n t = (words[i - 3] ^ words[i - 8] ^ words[i - 14] ^ words[i - 16]);\n t = (t << 1) | (t >>> 31);\n words[i] = t;\n f = d ^ (b & (c ^ d));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 2\n for (; i < 32; i += 1) {\n t = (words[i - 3] ^ words[i - 8] ^ words[i - 14] ^ words[i - 16]);\n t = (t << 1) | (t >>> 31);\n words[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n for (; i < 40; i += 1) {\n t = (words[i - 6] ^ words[i - 16] ^ words[i - 28] ^ words[i - 32]);\n t = (t << 2) | (t >>> 30);\n words[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 3\n for (; i < 60; i += 1) {\n t = (words[i - 6] ^ words[i - 16] ^ words[i - 28] ^ words[i - 32]);\n t = (t << 2) | (t >>> 30);\n words[i] = t;\n f = (b & c) | (d & (b ^ c));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x8F1BBCDC + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 4\n for (; i < 80; i += 1) {\n t = (words[i - 6] ^ words[i - 16] ^ words[i - 28] ^ words[i - 32]);\n t = (t << 2) | (t >>> 30);\n words[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0xCA62C1D6 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // update hash state\n h1 = (h1 + a) | 0;\n h2 = (h2 + b) | 0;\n h3 = (h3 + c) | 0;\n h4 = (h4 + d) | 0;\n h5 = (h5 + e) | 0;\n len -= 64;\n }\n return {\n h1: h1, h2: h2, h3: h3, h4: h4, h5: h5,\n };\n}\n/**\n * Calculates sha1 hash from string\n */\nfunction sha1(message) {\n // 56-bit length of message so far (does not including padding)\n var len = message.length;\n var len64hi = (len / 0x100000000) >>> 0;\n var len64lo = len >>> 0;\n var flen = [0, 0];\n for (var i = flen.length - 1; i >= 0; i -= 1) {\n flen[i] += len64lo;\n len64lo = len64hi + ((flen[i] / 0x100000000) >>> 0);\n flen[i] >>>= 0;\n len64hi = ((len64lo / 0x100000000) >>> 0);\n }\n var pad = message;\n // compute remaining size to be digested (include message length size)\n var remaining = flen[flen.length - 1] + 8;\n // add padding for overflow blockSize - overflow\n // _padding starts with 1 byte with first bit is set (byte value 128), then\n // there may be up to (blockSize - 1) other pad bytes\n var overflow = remaining & 63;\n pad += _padding.substr(0, 64 - overflow);\n // serialize message length in bits in big-endian order; since length\n // is stored in bytes we multiply by 8 and add carry from next int\n var next;\n var carry;\n var bits = flen[0] * 8;\n for (var i = 0; i < flen.length - 1; i += 1) {\n next = flen[i + 1] * 8;\n carry = (next / 0x100000000) >>> 0;\n bits += carry;\n pad += int32ToStr(bits >>> 0);\n bits = next >>> 0;\n }\n pad += int32ToStr(bits);\n var state = update(pad);\n return int32ToStr(state.h1)\n + int32ToStr(state.h2)\n + int32ToStr(state.h3)\n + int32ToStr(state.h4)\n + int32ToStr(state.h5);\n}\nexports.default = sha1;\n//# sourceMappingURL=index.js.map"
},
{
"id": 20,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\@cryptography\\sha256\\dist\\es\\sha256.js",
"name": "./node_modules/@cryptography/sha256/dist/es/sha256.js",
"index": 12,
"index2": 6,
"size": 8334,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"issuerId": 12,
"issuerName": "./src/lib/crypto/crypto_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
}
}
],
"profile": {
"factory": 897,
"building": 17
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "@cryptography/sha256",
"loc": "17:33-64"
}
],
"usedExports": true,
"providedExports": [
"default"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/crypto/crypto_utils.ts (referenced with cjs require)"
],
"depth": 3,
"source": "/**\n * Gets a uint32 from string in big-endian order order\n */\nfunction s2i(str, pos) {\n return (str.charCodeAt(pos) << 24\n ^ str.charCodeAt(pos + 1) << 16\n ^ str.charCodeAt(pos + 2) << 8\n ^ str.charCodeAt(pos + 3));\n}\n/**\n * Returns a uint32 as a string in big-endian order order\n */\nfunction i2s(data) {\n return (String.fromCharCode((data >> 24) & 0xFF)\n + String.fromCharCode((data >> 16) & 0xFF)\n + String.fromCharCode((data >> 8) & 0xFF)\n + String.fromCharCode(data & 0xFF));\n}\n/**\n * Returns a uint32 as a hex-string in big-endian order order\n */\nfunction i2h(data) {\n return (\"00000000\" + data.toString(16)).slice(-8);\n}\n\n/**\n * Creates new SHA-256 state\n */\nfunction init(h) {\n if (!h)\n h = new Uint32Array(8);\n // SHA-256 state contains eight 32-bit integers\n h[0] = 0x6A09E667;\n h[1] = 0xBB67AE85;\n h[2] = 0x3C6EF372;\n h[3] = 0xA54FF53A;\n h[4] = 0x510E527F;\n h[5] = 0x9B05688C;\n h[6] = 0x1F83D9AB;\n h[7] = 0x5BE0CD19;\n return h;\n}\n/** Array to use to store round words. */\nvar words = new Uint32Array(64);\n/** K table for SHA-256 */\nvar _k = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n]);\n/**\n * Perform round function\n */\nfunction round(state, data) {\n // initialize hash value for this chunk\n var a = state[0];\n var b = state[1];\n var c = state[2];\n var d = state[3];\n var e = state[4];\n var f = state[5];\n var g = state[6];\n var h = state[7];\n words.set(data);\n for (var i = 16; i < 64; i += 1) {\n // XOR word 2 words ago rot right 17, rot right 19, shft right 10\n var t1 = words[i - 2];\n t1 = ((t1 >>> 17) | (t1 << 15))\n ^ ((t1 >>> 19) | (t1 << 13))\n ^ (t1 >>> 10);\n // XOR word 15 words ago rot right 7, rot right 18, shft right 3\n var t2 = words[i - 15];\n t2 = ((t2 >>> 7) | (t2 << 25))\n ^ ((t2 >>> 18) | (t2 << 14))\n ^ (t2 >>> 3);\n // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^32\n words[i] = (t1 + words[i - 7] + t2 + words[i - 16]);\n }\n // Round Function\n for (var i = 0; i < 64; i += 1) {\n // Sum1(e)\n var s1 = ((e >>> 6) | (e << 26))\n ^ ((e >>> 11) | (e << 21))\n ^ ((e >>> 25) | (e << 7));\n // Ch(e, f, g) (optimized the same way as SHA-1)\n var ch = g ^ (e & (f ^ g));\n // Sum0(a)\n var s0 = ((a >>> 2) | (a << 30))\n ^ ((a >>> 13) | (a << 19))\n ^ ((a >>> 22) | (a << 10));\n // Maj(a, b, c) (optimized the same way as SHA-1)\n var maj = (a & b) | (c & (a ^ b));\n // main algorithm\n var t1 = h + s1 + ch + _k[i] + words[i];\n var t2 = s0 + maj;\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n // update hash state\n state[0] += a;\n state[1] += b;\n state[2] += c;\n state[3] += d;\n state[4] += e;\n state[5] += f;\n state[6] += g;\n state[7] += h;\n}\n/**\n * Pre-processing round buffer for string input\n */\nfunction preprocess(str, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n while (str.length >= 64) {\n for (var i = offset; i < 16; i++)\n buf[i] = s2i(str, i * 4);\n str = str.slice(64 - offset * 4);\n offset = 0;\n round(state, buf);\n }\n return str;\n}\n/**\n * Process input buffer\n */\nfunction process(input, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n while (input.length >= buf.length - offset) {\n buf.set(input.subarray(0, buf.length - offset), offset);\n input = input.subarray(buf.length - offset);\n offset = 0;\n round(state, buf);\n }\n if (input.length > 0) {\n buf.set(input, offset);\n offset += input.length;\n }\n return offset;\n}\n/**\n * Repeatable part\n */\nfunction finish(len, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n var len64hi = (len / 0x100000000) >>> 0;\n var len64lo = len >>> 0;\n for (var i = offset + 1; i < buf.length; i++)\n buf[i] = 0;\n if (offset >= 14) {\n round(state, buf);\n for (var i = 0; i < buf.length; i++)\n buf[i] = 0;\n }\n buf[14] = (len64hi << 3) | (len64hi >>> 28);\n buf[15] = len64lo << 3;\n round(state, buf);\n}\n/**\n * Adds padding to message\n */\nfunction finalizestr(chunk, len, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n for (; chunk.length >= 4; offset++) {\n buf[offset] = s2i(chunk, 0);\n chunk = chunk.slice(4);\n }\n if (offset >= 16) {\n round(state, buf);\n offset = 0;\n }\n buf[offset] = s2i(chunk + \"\\u0080\\0\\0\\0\", 0);\n finish(len, buf, state, offset);\n}\n/**\n * Adds padding to buffer\n */\nfunction finalize(len, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n buf[offset] = 0x80000000;\n finish(len, buf, state, offset);\n}\nfunction out(state, format) {\n if (format === void 0) { format = 'array'; }\n switch (format) {\n case 'hex': return (i2h(state[0])\n + i2h(state[1])\n + i2h(state[2])\n + i2h(state[3])\n + i2h(state[4])\n + i2h(state[5])\n + i2h(state[6])\n + i2h(state[7]));\n case 'binary': return (i2s(state[0])\n + i2s(state[1])\n + i2s(state[2])\n + i2s(state[3])\n + i2s(state[4])\n + i2s(state[5])\n + i2s(state[6])\n + i2s(state[7]));\n default: return state;\n }\n}\n/**\n * Stream handler for hashing\n */\nvar Stream = /** @class */ (function () {\n function Stream(buf) {\n this.buffer = new Uint32Array(16);\n this.state = init(buf);\n this.length = 0;\n this.offset = 0;\n this.tail = '';\n }\n Stream.prototype.update = function (chunk) {\n if (typeof chunk === 'string') {\n this.length += chunk.length;\n this.tail = preprocess(this.tail + chunk, this.buffer, this.state, this.offset);\n this.offset = 0;\n }\n else {\n if (this.tail.length > 0)\n throw new Error('Unable to update hash-stream with array');\n this.length += chunk.length * 4;\n this.offset = process(chunk, this.buffer, this.state, this.offset);\n }\n return this;\n };\n Stream.prototype.digest = function (format) {\n if (format === void 0) { format = 'array'; }\n if (this.tail.length > 0) {\n finalizestr(this.tail, this.length, this.buffer, this.state, this.offset);\n }\n else {\n finalize(this.length, this.buffer, this.state, this.offset);\n }\n return out(this.state, format);\n };\n Stream.prototype.clear = function () {\n this.state = init();\n this.length = 0;\n this.offset = 0;\n this.tail = '';\n };\n return Stream;\n}());\nfunction sha256(message, format) {\n if (format === void 0) { format = 'array'; }\n var buf = new Uint32Array(16);\n var state = init();\n if (typeof message === 'string')\n finalizestr(preprocess(message, buf, state), message.length, buf, state);\n else\n finalize(message.length * 4, buf, state, process(message, buf, state));\n return out(state, format);\n}\n/**\n * Hash with stream constructor\n */\nsha256.stream = function (buf) { return new Stream(buf); };\nsha256.blockLength = 64;\nsha256.digestLength = 32;\n\nexport default sha256;\n"
},
{
"id": 21,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\pako\\dist\\pako_inflate.min.js",
"name": "./node_modules/pako/dist/pako_inflate.min.js",
"index": 14,
"index2": 8,
"size": 22682,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"issuerId": 12,
"issuerName": "./src/lib/crypto/crypto_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
}
}
],
"profile": {
"factory": 897,
"building": 17
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "pako/dist/pako_inflate.min.js",
"loc": "20:46-86"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).pako=e()}}(function(){return function r(o,s,f){function l(t,e){if(!s[t]){if(!o[t]){var i=\"function\"==typeof require&&require;if(!e&&i)return i(t,!0);if(d)return d(t,!0);var n=new Error(\"Cannot find module '\"+t+\"'\");throw n.code=\"MODULE_NOT_FOUND\",n}var a=s[t]={exports:{}};o[t][0].call(a.exports,function(e){return l(o[t][1][e]||e)},a,a.exports,r,o,s,f)}return s[t].exports}for(var d=\"function\"==typeof require&&require,e=0;e<f.length;e++)l(f[e]);return l}({1:[function(e,t,i){\"use strict\";var n=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Int32Array;i.assign=function(e){for(var t,i,n=Array.prototype.slice.call(arguments,1);n.length;){var a=n.shift();if(a){if(\"object\"!=typeof a)throw new TypeError(a+\"must be non-object\");for(var r in a)t=a,i=r,Object.prototype.hasOwnProperty.call(t,i)&&(e[r]=a[r])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,n,a){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),a);else for(var r=0;r<n;r++)e[a+r]=t[i+r]},flattenChunks:function(e){var t,i,n,a,r,o;for(t=n=0,i=e.length;t<i;t++)n+=e[t].length;for(o=new Uint8Array(n),t=a=0,i=e.length;t<i;t++)r=e[t],o.set(r,a),a+=r.length;return o}},r={arraySet:function(e,t,i,n,a){for(var r=0;r<n;r++)e[a+r]=t[i+r]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,a)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,r))},i.setTyped(n)},{}],2:[function(e,t,i){\"use strict\";var f=e(\"./common\"),a=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var l=new f.Buf8(256),n=0;n<256;n++)l[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function d(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&a))return String.fromCharCode.apply(null,f.shrinkBuf(e,t));for(var i=\"\",n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i}l[254]=l[254]=1,i.string2buf=function(e){var t,i,n,a,r,o=e.length,s=0;for(a=0;a<o;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new f.Buf8(s),a=r=0;r<s;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),i<128?t[r++]=i:(i<2048?t[r++]=192|i>>>6:(i<65536?t[r++]=224|i>>>12:(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63),t[r++]=128|i>>>6&63),t[r++]=128|63&i);return t},i.buf2binstring=function(e){return d(e,e.length)},i.binstring2buf=function(e){for(var t=new f.Buf8(e.length),i=0,n=t.length;i<n;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,n,a,r,o=t||e.length,s=new Array(2*o);for(i=n=0;i<o;)if((a=e[i++])<128)s[n++]=a;else if(4<(r=l[a]))s[n++]=65533,i+=r-1;else{for(a&=2===r?31:3===r?15:7;1<r&&i<o;)a=a<<6|63&e[i++],r--;1<r?s[n++]=65533:a<65536?s[n++]=a:(a-=65536,s[n++]=55296|a>>10&1023,s[n++]=56320|1023&a)}return d(s,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0?t:0===i?t:i+l[e[i]]>t?i:t}},{\"./common\":1}],3:[function(e,t,i){\"use strict\";t.exports=function(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3<i?2e3:i;r=r+(a=a+t[n++]|0)|0,--o;);a%=65521,r%=65521}return a|r<<16|0}},{}],4:[function(e,t,i){\"use strict\";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){\"use strict\";var s=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,n){var a=s,r=n+i;e^=-1;for(var o=n;o<r;o++)e=e>>>8^a[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,i){\"use strict\";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){\"use strict\";t.exports=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z;i=e.state,n=e.next_in,E=e.input,a=n+(e.avail_in-5),r=e.next_out,Z=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,c=i.wnext,u=i.window,h=i.hold,b=i.bits,m=i.lencode,w=i.distcode,k=(1<<i.lenbits)-1,_=(1<<i.distbits)-1;e:do{b<15&&(h+=E[n++]<<b,b+=8,h+=E[n++]<<b,b+=8),g=m[h&k];t:for(;;){if(h>>>=v=g>>>24,b-=v,0===(v=g>>>16&255))Z[r++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=m[(65535&g)+(h&(1<<v)-1)];continue t}if(32&v){i.mode=12;break e}e.msg=\"invalid literal/length code\",i.mode=30;break e}p=65535&g,(v&=15)&&(b<v&&(h+=E[n++]<<b,b+=8),p+=h&(1<<v)-1,h>>>=v,b-=v),b<15&&(h+=E[n++]<<b,b+=8,h+=E[n++]<<b,b+=8),g=w[h&_];i:for(;;){if(h>>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<<v)-1)];continue i}e.msg=\"invalid distance code\",i.mode=30;break e}if(x=65535&g,b<(v&=15)&&(h+=E[n++]<<b,(b+=8)<v&&(h+=E[n++]<<b,b+=8)),f<(x+=h&(1<<v)-1)){e.msg=\"invalid distance too far back\",i.mode=30;break e}if(h>>>=v,b-=v,(v=r-o)<x){if(d<(v=x-v)&&i.sane){e.msg=\"invalid distance too far back\",i.mode=30;break e}if(S=u,(y=0)===c){if(y+=l-v,v<p){for(p-=v;Z[r++]=u[y++],--v;);y=r-x,S=Z}}else if(c<v){if(y+=l+c-v,(v-=c)<p){for(p-=v;Z[r++]=u[y++],--v;);if(y=0,c<p){for(p-=v=c;Z[r++]=u[y++],--v;);y=r-x,S=Z}}}else if(y+=c-v,v<p){for(p-=v;Z[r++]=u[y++],--v;);y=r-x,S=Z}for(;2<p;)Z[r++]=S[y++],Z[r++]=S[y++],Z[r++]=S[y++],p-=3;p&&(Z[r++]=S[y++],1<p&&(Z[r++]=S[y++]))}else{for(y=r-x;Z[r++]=Z[y++],Z[r++]=Z[y++],Z[r++]=Z[y++],2<(p-=3););p&&(Z[r++]=Z[y++],1<p&&(Z[r++]=Z[y++]))}break}}break}}while(n<a&&r<s);n-=p=b>>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n<a?a-n+5:5-(n-a),e.avail_out=r<s?s-r+257:257-(r-s),i.hold=h,i.bits=b}},{}],8:[function(e,t,i){\"use strict\";var z=e(\"../utils/common\"),R=e(\"./adler32\"),N=e(\"./crc32\"),O=e(\"./inffast\"),C=e(\"./inftrees\"),I=1,D=2,T=0,U=-2,F=1,n=852,a=592;function L(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new z.Buf16(320),this.work=new z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new z.Buf32(n),t.distcode=t.distdyn=new z.Buf32(a),t.sane=1,t.back=-1,T):U}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):U}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?U:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,s(e))):U}function l(e,t){var i,n;return e?(n=new r,(e.state=n).window=null,(i=f(e,t))!==T&&(e.state=null),i):U}var d,c,u=!0;function H(e){if(u){var t;for(d=new z.Buf32(512),c=new z.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(C(I,e.lens,0,288,d,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;C(D,e.lens,0,32,c,0,e.work,{bits:5}),u=!1}e.lencode=d,e.lenbits=9,e.distcode=c,e.distbits=5}function j(e,t,i,n){var a,r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new z.Buf8(r.wsize)),n>=r.wsize?(z.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n<(a=r.wsize-r.wnext)&&(a=n),z.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(z.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0}i.inflateReset=s,i.inflateReset2=f,i.inflateResetKeep=o,i.inflateInit=function(e){return l(e,15)},i.inflateInit2=l,i.inflate=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z=0,B=new z.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return U;12===(i=e.state).mode&&(i.mode=13),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,c=s,u=f,y=T;e:for(;;)switch(i.mode){case F:if(0===i.wrap){i.mode=13;break}for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(2&i.wrap&&35615===l){B[i.check=0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0),d=l=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg=\"incorrect header check\",i.mode=30;break}if(8!=(15&l)){e.msg=\"unknown compression method\",i.mode=30;break}if(d-=4,x=8+(15&(l>>>=4)),0===i.wbits)i.wbits=x;else if(x>i.wbits){e.msg=\"invalid window size\",i.mode=30;break}i.dmax=1<<x,e.adler=i.check=1,i.mode=512&l?10:12,d=l=0;break;case 2:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(i.flags=l,8!=(255&i.flags)){e.msg=\"unknown compression method\",i.mode=30;break}if(57344&i.flags){e.msg=\"unknown header flags set\",i.mode=30;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=3;case 3:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.head&&(i.head.time=l),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,i.check=N(i.check,B,4,0)),d=l=0,i.mode=4;case 4:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=5;case 5:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(s<(h=i.length)&&(h=s),h&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),z.arraySet(i.head.extra,n,r,h,x)),512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,i.length-=h),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x)),x&&h<s;);if(512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,x)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.comment+=String.fromCharCode(x)),x&&h<s;);if(512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,x)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(l!==(65535&i.check)){e.msg=\"header crc mismatch\",i.mode=30;break}d=l=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}e.adler=i.check=L(l),d=l=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,2;e.adler=i.check=1,i.mode=12;case 12:if(5===t||6===t)break e;case 13:if(i.last){l>>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}switch(i.last=1&l,d-=1,3&(l>>>=1)){case 0:i.mode=14;break;case 1:if(H(i),i.mode=20,6!==t)break;l>>>=2,d-=2;break e;case 2:i.mode=17;break;case 3:e.msg=\"invalid block type\",i.mode=30}l>>>=2,d-=2;break;case 14:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg=\"invalid stored block lengths\",i.mode=30;break}if(i.length=65535&l,d=l=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(h=i.length){if(s<h&&(h=s),f<h&&(h=f),0===h)break e;z.arraySet(a,n,r,h,o),s-=h,r+=h,f-=h,o+=h,i.length-=h;break}i.mode=12;break;case 17:for(;d<14;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(i.nlen=257+(31&l),l>>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286<i.nlen||30<i.ndist){e.msg=\"too many length or distance symbols\",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;d<3;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.lens[A[i.have++]]=7&l,l>>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,S={bits:i.lenbits},y=C(0,i.lens,0,19,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg=\"invalid code lengths set\",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;k=(Z=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(_<16)l>>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(l>>>=w,d-=w,0===i.have){e.msg=\"invalid bit length repeat\",i.mode=30;break}x=i.lens[i.have-1],h=3+(3&l),l>>>=2,d-=2}else if(17===_){for(E=w+3;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}d-=w,x=0,h=3+(7&(l>>>=w)),l>>>=3,d-=3}else{for(E=w+7;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}d-=w,x=0,h=11+(127&(l>>>=w)),l>>>=7,d-=7}if(i.have+h>i.nlen+i.ndist){e.msg=\"invalid bit length repeat\",i.mode=30;break}for(;h--;)i.lens[i.have++]=x}}if(30===i.mode)break;if(0===i.lens[256]){e.msg=\"invalid code -- missing end-of-block\",i.mode=30;break}if(i.lenbits=9,S={bits:i.lenbits},y=C(I,i.lens,0,i.nlen,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg=\"invalid literal/lengths set\",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,S={bits:i.distbits},y=C(D,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,S),i.distbits=S.bits,y){e.msg=\"invalid distances set\",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=s&&258<=f){e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,O(e,u),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;k=(Z=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(k&&0==(240&k)){for(g=w,v=k,p=_;k=(Z=i.lencode[p+((l&(1<<g+v)-1)>>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}l>>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,i.length=_,0===k){i.mode=26;break}if(32&k){i.back=-1,i.mode=12;break}if(64&k){e.msg=\"invalid literal/length code\",i.mode=30;break}i.extra=15&k,i.mode=22;case 22:if(i.extra){for(E=i.extra;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;k=(Z=i.distcode[l&(1<<i.distbits)-1])>>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(0==(240&k)){for(g=w,v=k,p=_;k=(Z=i.distcode[p+((l&(1<<g+v)-1)>>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}l>>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,64&k){e.msg=\"invalid distance code\",i.mode=30;break}i.offset=_,i.extra=15&k,i.mode=24;case 24:if(i.extra){for(E=i.extra;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg=\"invalid distance too far back\",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(h=u-f,i.offset>h){if((h=i.offset-h)>i.whave&&i.sane){e.msg=\"invalid distance too far back\",i.mode=30;break}h>i.wnext?(h-=i.wnext,b=i.wsize-h):b=i.wnext-h,h>i.length&&(h=i.length),m=i.window}else m=a,b=o-i.offset,h=i.length;for(f<h&&(h=f),f-=h,i.length-=h;a[o++]=m[b++],--h;);0===i.length&&(i.mode=21);break;case 26:if(0===f)break e;a[o++]=i.length,f--,i.mode=21;break;case 27:if(i.wrap){for(;d<32;){if(0===s)break e;s--,l|=n[r++]<<d,d+=8}if(u-=f,e.total_out+=u,i.total+=u,u&&(e.adler=i.check=i.flags?N(i.check,a,u,o-u):R(i.check,a,u,o-u)),u=f,(i.flags?l:L(l))!==i.check){e.msg=\"incorrect data check\",i.mode=30;break}d=l=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(l!==(4294967295&i.total)){e.msg=\"incorrect length check\",i.mode=30;break}d=l=0}i.mode=29;case 29:y=1;break e;case 30:y=-3;break e;case 31:return-4;case 32:default:return U}return e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,(i.wsize||u!==e.avail_out&&i.mode<30&&(i.mode<27||4!==t))&&j(e,e.output,e.next_out,u-e.avail_out)?(i.mode=31,-4):(c-=e.avail_in,u-=e.avail_out,e.total_in+=c,e.total_out+=u,i.total+=u,i.wrap&&u&&(e.adler=i.check=i.flags?N(i.check,a,u,e.next_out-u):R(i.check,a,u,e.next_out-u)),e.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0===c&&0===u||4===t)&&y===T&&(y=-5),y)},i.inflateEnd=function(e){if(!e||!e.state)return U;var t=e.state;return t.window&&(t.window=null),e.state=null,T},i.inflateGetHeader=function(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?U:((i.head=t).done=!1,T):U},i.inflateSetDictionary=function(e,t){var i,n=t.length;return e&&e.state?0!==(i=e.state).wrap&&11!==i.mode?U:11===i.mode&&R(1,t,n,0)!==i.check?-3:j(e,t,n,n)?(i.mode=31,-4):(i.havedict=1,T):U},i.inflateInfo=\"pako inflate (from Nodeca project)\"},{\"../utils/common\":1,\"./adler32\":3,\"./crc32\":5,\"./inffast\":7,\"./inftrees\":9}],9:[function(e,t,i){\"use strict\";var I=e(\"../utils/common\"),D=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],T=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],U=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],F=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,n,a,r,o,s){var f,l,d,c,u,h,b,m,w,k=s.bits,_=0,g=0,v=0,p=0,x=0,y=0,S=0,E=0,Z=0,B=0,A=null,z=0,R=new I.Buf16(16),N=new I.Buf16(16),O=null,C=0;for(_=0;_<=15;_++)R[_]=0;for(g=0;g<n;g++)R[t[i+g]]++;for(x=k,p=15;1<=p&&0===R[p];p--);if(p<x&&(x=p),0===p)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(v=1;v<p&&0===R[v];v++);for(x<v&&(x=v),_=E=1;_<=15;_++)if(E<<=1,(E-=R[_])<0)return-1;if(0<E&&(0===e||1!==p))return-1;for(N[1]=0,_=1;_<15;_++)N[_+1]=N[_]+R[_];for(g=0;g<n;g++)0!==t[i+g]&&(o[N[t[i+g]]++]=g);if(0===e?(A=O=o,h=19):1===e?(A=D,z-=257,O=T,C-=257,h=256):(A=U,O=F,h=-1),_=v,u=r,S=g=B=0,d=-1,c=(Z=1<<(y=x))-1,1===e&&852<Z||2===e&&592<Z)return 1;for(;;){for(b=_-S,o[g]<h?(m=0,w=o[g]):o[g]>h?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<<y;a[u+(B>>S)+(l-=f)]=b<<24|m<<16|w|0,0!==l;);for(f=1<<_-1;B&f;)f>>=1;if(0!==f?(B&=f-1,B+=f):B=0,g++,0==--R[_]){if(_===p)break;_=t[i+o[g]]}if(x<_&&(B&c)!==d){for(0===S&&(S=x),u+=v,E=1<<(y=_-S);y+S<p&&!((E-=R[y+S])<=0);)y++,E<<=1;if(Z+=1<<y,1===e&&852<Z||2===e&&592<Z)return 1;a[d=B&c]=x<<24|y<<16|u-r|0}}return 0!==B&&(a[u+B]=_-S<<24|64<<16|0),s.bits=x,0}},{\"../utils/common\":1}],10:[function(e,t,i){\"use strict\";t.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],11:[function(e,t,i){\"use strict\";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],\"/lib/inflate.js\":[function(e,t,i){\"use strict\";var c=e(\"./zlib/inflate\"),u=e(\"./utils/common\"),h=e(\"./utils/strings\"),b=e(\"./zlib/constants\"),n=e(\"./zlib/messages\"),a=e(\"./zlib/zstream\"),r=e(\"./zlib/gzheader\"),m=Object.prototype.toString;function o(e){if(!(this instanceof o))return new o(e);this.options=u.assign({chunkSize:16384,windowBits:0,to:\"\"},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var i=c.inflateInit2(this.strm,t.windowBits);if(i!==b.Z_OK)throw new Error(n[i]);if(this.header=new r,c.inflateGetHeader(this.strm,this.header),t.dictionary&&(\"string\"==typeof t.dictionary?t.dictionary=h.string2buf(t.dictionary):\"[object ArrayBuffer]\"===m.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=c.inflateSetDictionary(this.strm,t.dictionary))!==b.Z_OK))throw new Error(n[i])}function s(e,t){var i=new o(t);if(i.push(e,!0),i.err)throw i.msg||n[i.err];return i.result}o.prototype.push=function(e,t){var i,n,a,r,o,s=this.strm,f=this.options.chunkSize,l=this.options.dictionary,d=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?b.Z_FINISH:b.Z_NO_FLUSH,\"string\"==typeof e?s.input=h.binstring2buf(e):\"[object ArrayBuffer]\"===m.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new u.Buf8(f),s.next_out=0,s.avail_out=f),(i=c.inflate(s,b.Z_NO_FLUSH))===b.Z_NEED_DICT&&l&&(i=c.inflateSetDictionary(this.strm,l)),i===b.Z_BUF_ERROR&&!0===d&&(i=b.Z_OK,d=!1),i!==b.Z_STREAM_END&&i!==b.Z_OK)return this.onEnd(i),!(this.ended=!0);s.next_out&&(0!==s.avail_out&&i!==b.Z_STREAM_END&&(0!==s.avail_in||n!==b.Z_FINISH&&n!==b.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(a=h.utf8border(s.output,s.next_out),r=s.next_out-a,o=h.buf2string(s.output,a),s.next_out=r,s.avail_out=f-r,r&&u.arraySet(s.output,s.output,a,r,0),this.onData(o)):this.onData(u.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(d=!0)}while((0<s.avail_in||0===s.avail_out)&&i!==b.Z_STREAM_END);return i===b.Z_STREAM_END&&(n=b.Z_FINISH),n===b.Z_FINISH?(i=c.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===b.Z_OK):n!==b.Z_SYNC_FLUSH||(this.onEnd(b.Z_OK),!(s.avail_out=0))},o.prototype.onData=function(e){this.chunks.push(e)},o.prototype.onEnd=function(e){e===b.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=o,i.inflate=s,i.inflateRaw=function(e,t){return(t=t||{}).raw=!0,s(e,t)},i.ungzip=s},{\"./utils/common\":1,\"./utils/strings\":2,\"./zlib/constants\":4,\"./zlib/gzheader\":6,\"./zlib/inflate\":8,\"./zlib/messages\":10,\"./zlib/zstream\":11}]},{},[])(\"/lib/inflate.js\")});\n"
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_methods.ts",
"name": "./src/lib/crypto/crypto_methods.ts",
"index": 17,
"index2": 12,
"size": 1422,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"issuerId": 1,
"issuerName": "./src/lib/crypto/cryptoworker.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"module": "./src/lib/crypto/cryptoworker.ts",
"moduleName": "./src/lib/crypto/cryptoworker.ts",
"type": "cjs require",
"userRequest": "./crypto_methods",
"loc": "26:41-68"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"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": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts",
"name": "./src/lib/mtproto/transports/websocket.ts",
"index": 20,
"index2": 18,
"size": 7993,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"issuerId": 8,
"issuerName": "./src/lib/mtproto/dcConfigurator.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"name": "./src/lib/mtproto/dcConfigurator.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 431,
"building": 313,
"dependencies": 226
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"module": "./src/lib/mtproto/dcConfigurator.ts",
"moduleName": "./src/lib/mtproto/dcConfigurator.ts",
"type": "cjs require",
"userRequest": "./transports/websocket",
"loc": "7:36-69"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.Obfuscation = void 0;\r\nconst transport_1 = __importDefault(require(\"./transport\"));\r\n//import aesjs from 'aes-js';\r\nconst aes_1 = require(\"@cryptography/aes\");\r\n//import abridgetPacketCodec from './abridged';\r\nconst intermediate_1 = __importDefault(require(\"./intermediate\"));\r\nconst polyfill_1 = require(\"../../polyfill\");\r\nconst bin_utils_1 = require(\"../../bin_utils\");\r\n/*\r\n@cryptography/aes не работает с массивами которые не кратны 4, поэтому использую intermediate а не abridged\r\n*/\r\nclass Obfuscation {\r\n init(codec) {\r\n const initPayload = new Uint8Array(64);\r\n initPayload.randomize();\r\n while (true) {\r\n let val = (initPayload[3] << 24) | (initPayload[2] << 16) | (initPayload[1] << 8) | (initPayload[0]);\r\n let val2 = (initPayload[7] << 24) | (initPayload[6] << 16) | (initPayload[5] << 8) | (initPayload[4]);\r\n if (initPayload[0] != 0xef &&\r\n val != 0x44414548 &&\r\n val != 0x54534f50 &&\r\n val != 0x20544547 &&\r\n val != 0x4954504f &&\r\n val != 0xeeeeeeee &&\r\n val != 0xdddddddd &&\r\n val2 != 0x00000000) {\r\n //initPayload[56] = initPayload[57] = initPayload[58] = initPayload[59] = transport;\r\n break;\r\n }\r\n initPayload.randomize();\r\n }\r\n ////////////////////////initPayload.subarray(60, 62).hex = dcID;\r\n const reversedPayload = initPayload.slice().reverse();\r\n let encKey = initPayload.slice(8, 40);\r\n let encIv = initPayload.slice(40, 56);\r\n let decKey = reversedPayload.slice(8, 40);\r\n let decIv = reversedPayload.slice(40, 56);\r\n /* this.enc = new aesjs.ModeOfOperation.ctr(encKey, new aesjs.Counter(encIv as any));\r\n this.dec = new aesjs.ModeOfOperation.ctr(decKey, new aesjs.Counter(decIv as any)); */\r\n this.encNew = new aes_1.CTR(encKey, encIv);\r\n this.decNew = new aes_1.CTR(decKey, decIv);\r\n initPayload.set(intermediate_1.default.obfuscateTag, 56);\r\n const encrypted = this.encode(initPayload);\r\n initPayload.set(encrypted.slice(56, 64), 56);\r\n return initPayload;\r\n }\r\n /* public encode(payload: Uint8Array) {\r\n let res = this.enc.encrypt(payload);\r\n \r\n try {\r\n let arr = this.encNew.encrypt(payload);\r\n //let resNew = bytesFromWords({words: arr, sigBytes: arr.length});\r\n let resNew = new Uint8Array(bytesFromWordss(arr));\r\n console.log('Obfuscation: encode comparison:', res, arr, resNew, res.hex == resNew.hex);\r\n } catch(err) {\r\n console.error('Obfuscation: error:', err);\r\n }\r\n \r\n return res;\r\n }\r\n \r\n public decode(payload: Uint8Array) {\r\n let res = this.dec.encrypt(payload);\r\n \r\n try {\r\n let arr = this.decNew.decrypt(payload);\r\n //let resNew = bytesFromWords({words: arr, sigBytes: arr.length});\r\n let resNew = new Uint8Array(bytesFromWordss(arr));\r\n console.log('Obfuscation: decode comparison:', res, arr, resNew, res.hex == resNew.hex);\r\n } catch(err) {\r\n console.error('Obfuscation: error:', err);\r\n }\r\n \r\n return res;\r\n } */\r\n encode(payload) {\r\n let res = this.encNew.encrypt(payload);\r\n let bytes = new Uint8Array(bin_utils_1.bytesFromWordss(res));\r\n return bytes;\r\n }\r\n decode(payload) {\r\n let res = this.decNew.decrypt(payload);\r\n let bytes = new Uint8Array(bin_utils_1.bytesFromWordss(res));\r\n return bytes;\r\n }\r\n}\r\nexports.Obfuscation = Obfuscation;\r\nclass Socket extends transport_1.default {\r\n constructor(dcID, url) {\r\n super(dcID, url);\r\n this.pending = [];\r\n this.connected = false;\r\n this.transport = 'websocket';\r\n this.obfuscation = new Obfuscation();\r\n this.debug = false;\r\n this.codec = intermediate_1.default;\r\n this.connect = () => {\r\n if (this.ws) {\r\n this.ws.removeEventListener('open', this.handleOpen);\r\n this.ws.removeEventListener('close', this.handleClose);\r\n this.ws.removeEventListener('message', this.handleMessage);\r\n this.ws.close(1000);\r\n }\r\n this.ws = new WebSocket(this.url, 'binary');\r\n this.ws.binaryType = 'arraybuffer';\r\n this.ws.onopen = this.handleOpen;\r\n this.ws.onclose = this.handleClose;\r\n this.ws.onmessage = this.handleMessage;\r\n };\r\n this.handleOpen = () => {\r\n this.log('opened');\r\n this.ws.send(this.obfuscation.init(this.codec));\r\n this.connected = true;\r\n this.releasePending();\r\n };\r\n this.handleClose = (event) => {\r\n this.log('closed', event);\r\n this.connected = false;\r\n this.pending.length = 0;\r\n if (this.networker) {\r\n this.networker.cleanupSent();\r\n }\r\n this.log('trying to reconnect...');\r\n this.connect();\r\n };\r\n this.handleMessage = (event) => {\r\n this.debug && this.log('<-', 'handleMessage', event);\r\n let data = this.obfuscation.decode(new Uint8Array(event.data));\r\n data = this.codec.readPacket(data);\r\n if (this.networker) { // authenticated!\r\n //this.pending = this.pending.filter(p => p.body); // clear pending\r\n this.debug && this.log('redirecting to networker');\r\n return this.networker.parseResponse(data).then(response => {\r\n this.debug && this.log('redirecting to networker response:', response);\r\n this.networker.processMessage(response.response, response.messageID, response.sessionID);\r\n });\r\n }\r\n //console.log('got hex:', data.hex);\r\n let pending = this.pending.shift();\r\n if (!pending) {\r\n return this.log('no pending for res:', data.hex);\r\n }\r\n pending.resolve(data);\r\n };\r\n this.send = (body) => {\r\n this.debug && this.log('-> body length to pending:', body.length);\r\n if (this.networker) {\r\n this.pending.push({ body });\r\n this.releasePending();\r\n }\r\n else {\r\n let promise = new Promise((resolve, reject) => {\r\n this.pending.push({ resolve, reject, body });\r\n });\r\n this.releasePending();\r\n return promise;\r\n }\r\n };\r\n this.log = polyfill_1.logger(`WS-${dcID}`);\r\n this.log('constructor');\r\n this.connect();\r\n }\r\n releasePending() {\r\n if (!this.connected) {\r\n //this.connect();\r\n return;\r\n }\r\n let length = this.pending.length;\r\n for (let i = length - 1; i >= 0; --i) {\r\n let pending = this.pending[i];\r\n let { body } = pending;\r\n if (body) {\r\n let toEncode = this.codec.encodePacket(body);\r\n //console.log('send before obf:', /* body.hex, nonce.hex, */ toEncode.hex);\r\n let enc = this.obfuscation.encode(toEncode);\r\n //console.log('send after obf:', enc.hex);\r\n this.debug && this.log('-> body length to send:', enc.length);\r\n this.ws.send(enc);\r\n if (!pending.resolve) { // remove if no response needed\r\n this.pending.splice(i, 1);\r\n }\r\n delete pending.body;\r\n }\r\n }\r\n }\r\n}\r\nexports.default = Socket;\r\n"
},
{
"id": 24,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\intermediate.ts",
"name": "./src/lib/mtproto/transports/intermediate.ts",
"index": 22,
"index2": 16,
"size": 1671,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts",
"issuerId": 23,
"issuerName": "./src/lib/mtproto/transports/websocket.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"name": "./src/lib/mtproto/dcConfigurator.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
},
{
"id": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts",
"name": "./src/lib/mtproto/transports/websocket.ts",
"profile": {
"factory": 431,
"building": 313,
"dependencies": 226
}
}
],
"profile": {
"factory": 226,
"building": 26,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "./intermediate",
"loc": "11:39-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst bin_utils_1 = require(\"../../bin_utils\");\r\nclass IntermediatePacketCodec {\r\n constructor() {\r\n this.tag = 0xee;\r\n this.obfuscateTag = new Uint8Array([this.tag, this.tag, this.tag, this.tag]);\r\n }\r\n encodePacket(data) {\r\n let len = data.byteLength;\r\n let header = new Uint8Array(new Uint32Array([len]).buffer);\r\n return header.concat(data);\r\n }\r\n readPacket(data) {\r\n let length = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);\r\n return data.slice(4, 4 + length);\r\n }\r\n}\r\n/* Data packets are aligned to 4bytes. This codec adds random bytes of size\r\n from 0 to 3 bytes, which are ignored by decoder. */\r\nclass PaddedIntermediatePacketCodec extends IntermediatePacketCodec {\r\n constructor() {\r\n super(...arguments);\r\n this.tag = 0xdd;\r\n this.obfuscateTag = new Uint8Array([this.tag, this.tag, this.tag, this.tag]);\r\n }\r\n encodePacket(data) {\r\n let padding = new Uint8Array(bin_utils_1.nextRandomInt(3)).randomize();\r\n let len = data.byteLength + padding.byteLength;\r\n let header = new Uint8Array(new Uint32Array([len]).buffer);\r\n console.log('encodePacket', padding, len, data, header);\r\n return header.concat(data, padding);\r\n }\r\n readPacket(data) {\r\n let padLength = data.byteLength % 4;\r\n if (padLength > 0) {\r\n return data.slice(4, -padLength);\r\n }\r\n return data.slice(4);\r\n }\r\n}\r\nexports.default = new IntermediatePacketCodec();\r\n//export default new PaddedIntermediatePacketCodec();\r\n"
},
{
"id": 25,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"name": "./src/lib/mtproto/mtproto.ts",
"index": 25,
"index2": 23,
"size": 2926,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./mtproto",
"loc": "19:18-38"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.telegramMeWebService = exports.TelegramMeWebService = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\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 = Date.now() / 1000;\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": 26,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"name": "./src/lib/mtproto/authorizer.ts",
"index": 26,
"index2": 25,
"size": 23315,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./authorizer",
"loc": "20:37-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.Authorizer = void 0;\r\nconst tl_utils_1 = require(\"./tl_utils\");\r\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst rsaKeysManager_1 = __importDefault(require(\"./rsaKeysManager\"));\r\nconst timeManager_1 = __importDefault(require(\"./timeManager\"));\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nclass Authorizer {\r\n constructor() {\r\n this.cached = {};\r\n }\r\n mtpSendPlainRequest(dcID, requestArray) {\r\n var requestLength = requestArray.byteLength;\r\n //requestArray = new /* Int32Array */Uint8Array(requestBuffer);\r\n var header = new tl_utils_1.TLSerialization();\r\n header.storeLongP(0, 0, 'auth_key_id'); // Auth key\r\n header.storeLong(timeManager_1.default.generateID(), 'msg_id'); // Msg_id\r\n header.storeInt(requestLength, 'request_length');\r\n let headerArray = header.getBytes(true);\r\n let resultArray = new Uint8Array(headerArray.byteLength + requestLength);\r\n resultArray.set(headerArray);\r\n resultArray.set(requestArray, headerArray.length);\r\n /* var headerBuffer = header.getBuffer(),\r\n headerArray = new Int32Array(headerBuffer);\r\n var headerLength = headerBuffer.byteLength;\r\n \r\n var resultBuffer = new ArrayBuffer(headerLength + requestLength),\r\n resultArray = new Int32Array(resultBuffer);\r\n \r\n resultArray.set(headerArray);\r\n resultArray.set(requestArray, headerArray.length);\r\n \r\n let requestData = xhrSendBuffer ? resultBuffer : resultArray; */\r\n let transport = dcConfigurator_1.default.chooseServer(dcID);\r\n let baseError = {\r\n code: 406,\r\n type: 'NETWORK_BAD_RESPONSE',\r\n transport: transport\r\n };\r\n console.log(bin_utils_1.dT(), 'mtpSendPlainRequest: creating requestPromise');\r\n return transport.send(resultArray).then(result => {\r\n console.log(bin_utils_1.dT(), 'mtpSendPlainRequest: in good sector', result);\r\n if (!result || !result.byteLength) {\r\n return Promise.reject(baseError);\r\n }\r\n try {\r\n /* result = fResult ? fResult : result;\r\n fResult = new Uint8Array(0); */\r\n let deserializer = new tl_utils_1.TLDeserialization(result, { mtproto: true });\r\n let auth_key_id = deserializer.fetchLong('auth_key_id');\r\n if (auth_key_id != 0)\r\n console.error('auth_key_id != 0', auth_key_id);\r\n let msg_id = deserializer.fetchLong('msg_id');\r\n if (msg_id == 0)\r\n console.error('msg_id == 0', msg_id);\r\n let msg_len = deserializer.fetchInt('msg_len');\r\n if (!msg_len)\r\n console.error('no msg_len', msg_len);\r\n return deserializer;\r\n }\r\n catch (e) {\r\n console.error('mtpSendPlainRequest: deserialization went bad', e);\r\n let error = Object.assign(baseError, { originalError: e });\r\n throw error;\r\n }\r\n }, error => {\r\n if (!error.message && !error.type) {\r\n error = Object.assign(baseError, {\r\n originalError: error\r\n });\r\n }\r\n return Promise.reject(error);\r\n });\r\n }\r\n mtpSendReqPQ(auth) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\r\n request.storeMethod('req_pq_multi', { nonce: auth.nonce });\r\n // need\r\n rsaKeysManager_1.default.prepare().then(() => { });\r\n console.log(bin_utils_1.dT(), 'Send req_pq', auth.nonce.hex);\r\n try {\r\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, request.getBytes(true));\r\n }\r\n catch (error) {\r\n console.error(bin_utils_1.dT(), 'req_pq error', error.message);\r\n throw error;\r\n }\r\n var response = deserializer.fetchObject('ResPQ');\r\n if (response._ != 'resPQ') {\r\n throw new Error('[MT] resPQ response invalid: ' + response._);\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\r\n console.log(auth.nonce, response.nonce);\r\n throw new Error('[MT] resPQ nonce mismatch');\r\n }\r\n //auth.serverNonce = response.server_nonce;\r\n auth.serverNonce = new Uint8Array(response.server_nonce); // need\r\n auth.pq = response.pq;\r\n auth.fingerprints = response.server_public_key_fingerprints;\r\n console.log(bin_utils_1.dT(), 'Got ResPQ', bin_utils_1.bytesToHex(auth.serverNonce), bin_utils_1.bytesToHex(auth.pq), auth.fingerprints);\r\n let publicKey = yield rsaKeysManager_1.default.select(auth.fingerprints);\r\n if (!publicKey) {\r\n throw new Error('[MT] No public key found');\r\n }\r\n auth.publicKey = publicKey;\r\n console.log(bin_utils_1.dT(), 'PQ factorization start', auth.pq);\r\n try {\r\n var pAndQ = yield cryptoworker_1.default.factorize(auth.pq);\r\n }\r\n catch (error) {\r\n console.error('worker error factorize', error);\r\n throw error;\r\n }\r\n auth.p = pAndQ[0];\r\n auth.q = pAndQ[1];\r\n console.log(bin_utils_1.dT(), 'PQ factorization done', pAndQ);\r\n /* let p = new Uint32Array(new Uint8Array(auth.p).buffer)[0];\r\n let q = new Uint32Array(new Uint8Array(auth.q).buffer)[0];\r\n console.log(dT(), 'PQ factorization done', pAndQ, p.toString(16), q.toString(16)); */\r\n return this.mtpSendReqDhParams(auth);\r\n });\r\n }\r\n mtpSendReqDhParams(auth) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n auth.newNonce = new Uint8Array(32).randomize();\r\n /* auth.newNonce = new Array(32); // need array, not uint8array!\r\n MTProto.secureRandom.nextBytes(auth.newNonce); */\r\n //console.log(\"TCL: Authorizer -> mtpSendReqDhParams -> auth.newNonce\", auth.newNonce)\r\n // remove\r\n // auth.newNonce = fNewNonce ? fNewNonce : auth.newNonce;\r\n // console.log(\"TCL: Authorizer -> mtpSendReqDhParams -> auth.newNonce\", auth.newNonce);\r\n let p_q_inner_data = {\r\n _: 'p_q_inner_data',\r\n pq: auth.pq,\r\n p: auth.p,\r\n q: auth.q,\r\n nonce: auth.nonce,\r\n server_nonce: auth.serverNonce,\r\n new_nonce: auth.newNonce\r\n };\r\n let data = new tl_utils_1.TLSerialization({ mtproto: true });\r\n data.storeObject(p_q_inner_data, 'P_Q_inner_data', 'DECRYPTED_DATA');\r\n /* console.log('p_q_inner_data', p_q_inner_data,\r\n bytesToHex(bytesFromArrayBuffer(data.getBuffer())),\r\n sha1BytesSync(data.getBuffer()),\r\n bytesFromArrayBuffer(await CryptoWorker.sha1Hash(data.getBuffer()))); */\r\n let uint8Data = data.getBytes(true);\r\n let sha1Hashed = yield cryptoworker_1.default.sha1Hash(uint8Data);\r\n //var dataWithHash = sha1BytesSync(data.getBuffer()).concat(data.getBytes() as number[]);\r\n let dataWithHash = sha1Hashed.concat(uint8Data);\r\n //dataWithHash = addPadding(dataWithHash, 255);\r\n //dataWithHash = dataWithHash.concat(bytesFromHex('96228ea7790e71caaabc2ab67f4412e9aa224c664d232cc08617a32ce1796aa052da4a737083211689858f461e4473fd6394afd3aa0c8014840dc13f47beaf4fc3b9229aea9cfa83f9f6e676e50ee7676542fb75606879ee7e65cf3a2295b4ba0934ceec1011560c62395a6e9593bfb117cd0da75ba56723672d100ac17ec4d805aa59f7852e3a25a79ee4'));\r\n //console.log('sha1Hashed', bytesToHex(sha1Hashed), 'dataWithHash', bytesToHex(dataWithHash), dataWithHash.length);\r\n let rsaEncrypted = yield cryptoworker_1.default.rsaEncrypt(auth.publicKey, dataWithHash);\r\n //let rsaEncrypted = await CryptoWorker.rsaEncrypt(auth.publicKey, dataWithHash);\r\n //console.log('rsaEncrypted', rsaEncrypted, new Uint8Array(rsaEncrypted).hex);\r\n let req_DH_params = {\r\n nonce: auth.nonce,\r\n server_nonce: auth.serverNonce,\r\n p: auth.p,\r\n q: auth.q,\r\n public_key_fingerprint: auth.publicKey.fingerprint,\r\n encrypted_data: rsaEncrypted\r\n };\r\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\r\n request.storeMethod('req_DH_params', req_DH_params);\r\n let requestBytes = request.getBytes(true);\r\n console.log(bin_utils_1.dT(), 'Send req_DH_params', req_DH_params /* , requestBytes.hex */);\r\n try {\r\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, requestBytes);\r\n }\r\n catch (error) {\r\n console.log(bin_utils_1.dT(), 'Send req_DH_params FAIL!', error);\r\n throw error;\r\n }\r\n var response = deserializer.fetchObject('Server_DH_Params', 'RESPONSE');\r\n console.log(bin_utils_1.dT(), 'Sent req_DH_params, response:', response);\r\n if (response._ != 'server_DH_params_fail' && response._ != 'server_DH_params_ok') {\r\n throw new Error('[MT] Server_DH_Params response invalid: ' + response._);\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\r\n throw new Error('[MT] Server_DH_Params nonce mismatch');\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\r\n throw new Error('[MT] Server_DH_Params server_nonce mismatch');\r\n }\r\n if (response._ == 'server_DH_params_fail') {\r\n //var newNonceHash = sha1BytesSync(auth.newNonce).slice(-16);\r\n var newNonceHash = (yield cryptoworker_1.default.sha1Hash(auth.newNonce)).slice(-16);\r\n if (!bin_utils_1.bytesCmp(newNonceHash, response.new_nonce_hash)) {\r\n throw new Error('[MT] server_DH_params_fail new_nonce_hash mismatch');\r\n }\r\n throw new Error('[MT] server_DH_params_fail');\r\n }\r\n // fill auth object\r\n try {\r\n yield this.mtpDecryptServerDhDataAnswer(auth, response.encrypted_answer);\r\n }\r\n catch (e) {\r\n console.error(bin_utils_1.dT(), 'mtpDecryptServerDhDataAnswer FAILED!', e);\r\n throw e;\r\n }\r\n //console.log(dT(), 'mtpSendReqDhParams: executing mtpSendSetClientDhParams...');\r\n return this.mtpSendSetClientDhParams(auth); // костыль\r\n });\r\n }\r\n mtpDecryptServerDhDataAnswer(auth, encryptedAnswer) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n auth.localTime = Date.now();\r\n // can't concat Array with Uint8Array!\r\n //auth.tmpAesKey = sha1BytesSync(auth.newNonce.concat(auth.serverNonce)).concat(sha1BytesSync(auth.serverNonce.concat(auth.newNonce)).slice(0, 12));\r\n //auth.tmpAesIv = sha1BytesSync(auth.serverNonce.concat(auth.newNonce)).slice(12).concat(sha1BytesSync([].concat(auth.newNonce, auth.newNonce)), auth.newNonce.slice(0, 4));\r\n auth.tmpAesKey = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat(auth.serverNonce)))\r\n .concat((yield cryptoworker_1.default.sha1Hash(auth.serverNonce.concat(auth.newNonce))).slice(0, 12));\r\n auth.tmpAesIv = (yield cryptoworker_1.default.sha1Hash(auth.serverNonce.concat(auth.newNonce))).slice(12)\r\n .concat(yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat(auth.newNonce)), auth.newNonce.slice(0, 4));\r\n /* console.log(auth.serverNonce.concat(auth.newNonce));\r\n console.log(auth.newNonce.concat(auth.serverNonce));\r\n console.log(auth.newNonce.concat(auth.newNonce)); */\r\n //var answerWithHash = aesDecryptSync(encryptedAnswer, auth.tmpAesKey, auth.tmpAesIv);\r\n var answerWithHash = new Uint8Array(yield cryptoworker_1.default.aesDecrypt(encryptedAnswer, auth.tmpAesKey, auth.tmpAesIv));\r\n var hash = answerWithHash.slice(0, 20);\r\n var answerWithPadding = answerWithHash.slice(20);\r\n // console.log('hash', hash);\r\n var deserializer = new tl_utils_1.TLDeserialization(answerWithPadding, { mtproto: true });\r\n var response = deserializer.fetchObject('Server_DH_inner_data');\r\n if (response._ != 'server_DH_inner_data') {\r\n throw new Error('[MT] server_DH_inner_data response invalid: ' + response);\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\r\n throw new Error('[MT] server_DH_inner_data nonce mismatch');\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\r\n throw new Error('[MT] server_DH_inner_data serverNonce mismatch');\r\n }\r\n console.log(bin_utils_1.dT(), 'Done decrypting answer');\r\n auth.g = response.g;\r\n auth.dhPrime = response.dh_prime;\r\n auth.gA = response.g_a;\r\n auth.serverTime = response.server_time;\r\n auth.retry = 0;\r\n this.mtpVerifyDhParams(auth.g, auth.dhPrime, auth.gA);\r\n var offset = deserializer.getOffset();\r\n //if(!bytesCmp(hash, sha1BytesSync(answerWithPadding.slice(0, offset)))) {\r\n if (!bin_utils_1.bytesCmp(hash, yield cryptoworker_1.default.sha1Hash(answerWithPadding.slice(0, offset)))) {\r\n throw new Error('[MT] server_DH_inner_data SHA1-hash mismatch');\r\n }\r\n timeManager_1.default.applyServerTime(auth.serverTime, auth.localTime);\r\n });\r\n }\r\n mtpVerifyDhParams(g, dhPrime, gA) {\r\n console.log(bin_utils_1.dT(), 'Verifying DH params');\r\n var dhPrimeHex = bin_utils_1.bytesToHex(dhPrime);\r\n if (g != 3 || dhPrimeHex !== 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b') {\r\n // The verified value is from https://core.telegram.org/mtproto/security_guidelines\r\n throw new Error('[MT] DH params are not verified: unknown dhPrime');\r\n }\r\n console.log(bin_utils_1.dT(), 'dhPrime cmp OK');\r\n var gABigInt = new jsbn_1.BigInteger(bin_utils_1.bytesToHex(gA), 16);\r\n var dhPrimeBigInt = new jsbn_1.BigInteger(dhPrimeHex, 16);\r\n if (gABigInt.compareTo(jsbn_1.BigInteger.ONE) <= 0) {\r\n throw new Error('[MT] DH params are not verified: gA <= 1');\r\n }\r\n if (gABigInt.compareTo(dhPrimeBigInt.subtract(jsbn_1.BigInteger.ONE)) >= 0) {\r\n throw new Error('[MT] DH params are not verified: gA >= dhPrime - 1');\r\n }\r\n console.log(bin_utils_1.dT(), '1 < gA < dhPrime-1 OK');\r\n var two = new jsbn_1.BigInteger(/* null */ '');\r\n two.fromInt(2);\r\n var twoPow = two.pow(2048 - 64);\r\n if (gABigInt.compareTo(twoPow) < 0) {\r\n throw new Error('[MT] DH params are not verified: gA < 2^{2048-64}');\r\n }\r\n if (gABigInt.compareTo(dhPrimeBigInt.subtract(twoPow)) >= 0) {\r\n throw new Error('[MT] DH params are not verified: gA > dhPrime - 2^{2048-64}');\r\n }\r\n console.log(bin_utils_1.dT(), '2^{2048-64} < gA < dhPrime-2^{2048-64} OK');\r\n return true;\r\n }\r\n mtpSendSetClientDhParams(auth) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n var gBytes = bin_utils_1.bytesFromHex(auth.g.toString(16));\r\n auth.b = new Array(256);\r\n auth.b = [...new Uint8Array(auth.b.length).randomize()];\r\n //MTProto.secureRandom.nextBytes(auth.b);\r\n try {\r\n var gB = yield cryptoworker_1.default.modPow(gBytes, auth.b, auth.dhPrime);\r\n }\r\n catch (error) {\r\n throw error;\r\n }\r\n var data = new tl_utils_1.TLSerialization({ mtproto: true });\r\n data.storeObject({\r\n _: 'client_DH_inner_data',\r\n nonce: auth.nonce,\r\n server_nonce: auth.serverNonce,\r\n retry_id: [0, auth.retry++],\r\n g_b: gB\r\n }, 'Client_DH_Inner_Data');\r\n //var dataWithHash = sha1BytesSync(data.getBuffer()).concat(data.getBytes());\r\n var dataWithHash = (yield cryptoworker_1.default.sha1Hash(data.getBuffer())).concat(data.getBytes());\r\n //var encryptedData = aesEncryptSync(dataWithHash, auth.tmpAesKey, auth.tmpAesIv);\r\n var encryptedData = yield cryptoworker_1.default.aesEncrypt(dataWithHash, auth.tmpAesKey, auth.tmpAesIv);\r\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\r\n request.storeMethod('set_client_DH_params', {\r\n nonce: auth.nonce,\r\n server_nonce: auth.serverNonce,\r\n encrypted_data: encryptedData\r\n });\r\n console.log(bin_utils_1.dT(), 'Send set_client_DH_params');\r\n try {\r\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, request.getBytes(true));\r\n }\r\n catch (err) {\r\n throw err;\r\n }\r\n let response = deserializer.fetchObject('Set_client_DH_params_answer');\r\n if (response._ != 'dh_gen_ok' && response._ != 'dh_gen_retry' && response._ != 'dh_gen_fail') {\r\n throw new Error('[MT] Set_client_DH_params_answer response invalid: ' + response._);\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\r\n throw new Error('[MT] Set_client_DH_params_answer nonce mismatch');\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\r\n throw new Error('[MT] Set_client_DH_params_answer server_nonce mismatch');\r\n }\r\n try {\r\n var authKey = yield cryptoworker_1.default.modPow(auth.gA, auth.b, auth.dhPrime);\r\n }\r\n catch (err) {\r\n throw authKey;\r\n }\r\n //var authKeyHash = sha1BytesSync(authKey),\r\n let authKeyHash = yield cryptoworker_1.default.sha1Hash(authKey), authKeyAux = authKeyHash.slice(0, 8), authKeyID = authKeyHash.slice(-8);\r\n console.log(bin_utils_1.dT(), 'Got Set_client_DH_params_answer', response._, authKey);\r\n switch (response._) {\r\n case 'dh_gen_ok':\r\n var newNonceHash1 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([1], authKeyAux))).slice(-16);\r\n //var newNonceHash1 = sha1BytesSync(auth.newNonce.concat([1], authKeyAux)).slice(-16);\r\n if (!bin_utils_1.bytesCmp(newNonceHash1, response.new_nonce_hash1)) {\r\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash1 mismatch');\r\n }\r\n var serverSalt = bin_utils_1.bytesXor(auth.newNonce.slice(0, 8), auth.serverNonce.slice(0, 8));\r\n console.log('Auth successfull!', authKeyID, authKey, serverSalt);\r\n auth.authKeyID = authKeyID;\r\n auth.authKey = authKey;\r\n auth.serverSalt = serverSalt;\r\n return auth;\r\n break;\r\n case 'dh_gen_retry':\r\n //var newNonceHash2 = sha1BytesSync(auth.newNonce.concat([2], authKeyAux)).slice(-16);\r\n var newNonceHash2 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([2], authKeyAux))).slice(-16);\r\n if (!bin_utils_1.bytesCmp(newNonceHash2, response.new_nonce_hash2)) {\r\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash2 mismatch');\r\n }\r\n return this.mtpSendSetClientDhParams(auth);\r\n case 'dh_gen_fail':\r\n //var newNonceHash3 = sha1BytesSync(auth.newNonce.concat([3], authKeyAux)).slice(-16);\r\n var newNonceHash3 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([3], authKeyAux))).slice(-16);\r\n if (!bin_utils_1.bytesCmp(newNonceHash3, response.new_nonce_hash3)) {\r\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash3 mismatch');\r\n }\r\n throw new Error('[MT] Set_client_DH_params_answer fail');\r\n }\r\n });\r\n }\r\n // mtpAuth\r\n auth(dcID) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (dcID in this.cached) {\r\n return this.cached[dcID];\r\n }\r\n let nonce = /* fNonce ? fNonce : */ new Uint8Array(16).randomize();\r\n /* var nonce = new Array(16);\r\n MTProto.secureRandom.nextBytes(nonce); */\r\n if (!dcConfigurator_1.default.chooseServer(dcID)) {\r\n return Promise.reject(new Error('[MT] No server found for dc ' + dcID));\r\n }\r\n try {\r\n let promise = this.mtpSendReqPQ({ dcID, nonce });\r\n this.cached[dcID] = promise;\r\n return yield promise;\r\n }\r\n catch (err) {\r\n delete this.cached[dcID];\r\n throw err;\r\n }\r\n });\r\n }\r\n}\r\nexports.Authorizer = Authorizer;\r\nexports.default = new Authorizer();\r\n"
},
{
"id": 27,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\rsaKeysManager.ts",
"name": "./src/lib/mtproto/rsaKeysManager.ts",
"index": 27,
"index2": 24,
"size": 9544,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"issuerId": 26,
"issuerName": "./src/lib/mtproto/authorizer.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 26,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"name": "./src/lib/mtproto/authorizer.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 438,
"building": 329,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "./rsaKeysManager",
"loc": "19:41-68"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.RSAKeysManager = void 0;\r\nconst tl_utils_1 = require(\"./tl_utils\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nclass RSAKeysManager {\r\n constructor() {\r\n /**\r\n * Server public key, obtained from here: https://core.telegram.org/api/obtaining_api_id\r\n *\r\n *\r\n * -----BEGIN RSA PUBLIC KEY-----\r\n * MIIBCgKCAQEAwVACPi9w23mF3tBkdZz+zwrzKOaaQdr01vAbU4E1pvkfj4sqDsm6\r\n * lyDONS789sVoD/xCS9Y0hkkC3gtL1tSfTlgCMOOul9lcixlEKzwKENj1Yz/s7daS\r\n * an9tqw3bfUV/nqgbhGX81v/+7RFAEd+RwFnK7a+XYl9sluzHRyVVaTTveB2GazTw\r\n * Efzk2DWgkBluml8OREmvfraX3bkHZJTKX4EQSjBbbdJ2ZXIsRrYOXfaA+xayEGB+\r\n * 8hdlLmAjbCVfaigxX0CDqWeR1yFL9kwd9P0NsZRPsmoqVwMbMu7mStFai6aIhc3n\r\n * Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB\r\n * -----END RSA PUBLIC KEY-----\r\n *\r\n * -----BEGIN PUBLIC KEY-----\r\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAruw2yP/BCcsJliRoW5eB\r\n * VBVle9dtjJw+OYED160Wybum9SXtBBLXriwt4rROd9csv0t0OHCaTmRqBcQ0J8fx\r\n * hN6/cpR1GWgOZRUAiQxoMnlt0R93LCX/j1dnVa/gVbCjdSxpbrfY2g2L4frzjJvd\r\n * l84Kd9ORYjDEAyFnEA7dD556OptgLQQ2e2iVNq8NZLYTzLp5YpOdO1doK+ttrltg\r\n * gTCy5SrKeLoCPPbOgGsdxJxyz5KKcZnSLj16yE5HvJQn0CNpRdENvRUXe6tBP78O\r\n * 39oJ8BTHp9oIjd6XWXAsp2CvK45Ol8wFXGF710w9lwCGNbmNxNYhtIkdqfsEcwR5\r\n * JwIDAQAB\r\n * -----END PUBLIC KEY-----\r\n *\r\n * -----BEGIN PUBLIC KEY-----\r\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvfLHfYH2r9R70w8prHbl\r\n * Wt/nDkh+XkgpflqQVcnAfSuTtO05lNPspQmL8Y2XjVT4t8cT6xAkdgfmmvnvRPOO\r\n * KPi0OfJXoRVylFzAQG/j83u5K3kRLbae7fLccVhKZhY46lvsueI1hQdLgNV9n1cQ\r\n * 3TDS2pQOCtovG4eDl9wacrXOJTG2990VjgnIKNA0UMoP+KF03qzryqIt3oTvZq03\r\n * DyWdGK+AZjgBLaDKSnC6qD2cFY81UryRWOab8zKkWAnhw2kFpcqhI0jdV5QaSCEx\r\n * vnsjVaX0Y1N0870931/5Jb9ICe4nweZ9kSDF/gip3kWLG0o8XQpChDfyvsqB9OLV\r\n * /wIDAQAB\r\n * -----END PUBLIC KEY-----\r\n *\r\n * -----BEGIN PUBLIC KEY-----\r\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/ditzm+mPND6xkhzwFI\r\n * z6J/968CtkcSE/7Z2qAJiXbmZ3UDJPGrzqTDHkO30R8VeRM/Kz2f4nR05GIFiITl\r\n * 4bEjvpy7xqRDspJcCFIOcyXm8abVDhF+th6knSU0yLtNKuQVP6voMrnt9MV1X92L\r\n * GZQLgdHZbPQz0Z5qIpaKhdyA8DEvWWvSUwwc+yi1/gGaybwlzZwqXYoPOhwMebzK\r\n * Uk0xW14htcJrRrq+PXXQbRzTMynseCoPIoke0dtCodbA3qQxQovE16q9zz4Otv2k\r\n * 4j63cz53J+mhkVWAeWxVGI0lltJmWtEYK6er8VqqWot3nqmWMXogrgRLggv/Nbbo\r\n * oQIDAQAB\r\n * -----END PUBLIC KEY-----\r\n *\r\n * -----BEGIN PUBLIC KEY-----\r\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvmpxVY7ld/8DAjz6F6q0\r\n * 5shjg8/4p6047bn6/m8yPy1RBsvIyvuDuGnP/RzPEhzXQ9UJ5Ynmh2XJZgHoE9xb\r\n * nfxL5BXHplJhMtADXKM9bWB11PU1Eioc3+AXBB8QiNFBn2XI5UkO5hPhbb9mJpjA\r\n * 9Uhw8EdfqJP8QetVsI/xrCEbwEXe0xvifRLJbY08/Gp66KpQvy7g8w7VB8wlgePe\r\n * xW3pT13Ap6vuC+mQuJPyiHvSxjEKHgqePji9NP3tJUFQjcECqcm0yV7/2d0t/pbC\r\n * m+ZH1sadZspQCEPPrtbkQBlvHb4OLiIWPGHKSMeRFvp3IWcmdJqXahxLCUS1Eh6M\r\n * AQIDAQAB\r\n * -----END PUBLIC KEY-----\r\n *\r\n * Bytes can be got via\r\n * $ openssl rsa -pubin -in key.pub -text -noout\r\n */\r\n this.publisKeysHex = [{\r\n modulus: 'c150023e2f70db7985ded064759cfecf0af328e69a41daf4d6f01b538135a6f91f8f8b2a0ec9ba9720ce352efcf6c5680ffc424bd634864902de0b4bd6d49f4e580230e3ae97d95c8b19442b3c0a10d8f5633fecedd6926a7f6dab0ddb7d457f9ea81b8465fcd6fffeed114011df91c059caedaf97625f6c96ecc74725556934ef781d866b34f011fce4d835a090196e9a5f0e4449af7eb697ddb9076494ca5f81104a305b6dd27665722c46b60e5df680fb16b210607ef217652e60236c255f6a28315f4083a96791d7214bf64c1df4fd0db1944fb26a2a57031b32eee64ad15a8ba68885cde74a5bfc920f6abf59ba5c75506373e7130f9042da922179251f',\r\n exponent: '010001'\r\n }, {\r\n modulus: 'aeec36c8ffc109cb099624685b97815415657bd76d8c9c3e398103d7ad16c9bba6f525ed0412d7ae2c2de2b44e77d72cbf4b7438709a4e646a05c43427c7f184debf72947519680e651500890c6832796dd11f772c25ff8f576755afe055b0a3752c696eb7d8da0d8be1faf38c9bdd97ce0a77d3916230c4032167100edd0f9e7a3a9b602d04367b689536af0d64b613ccba7962939d3b57682beb6dae5b608130b2e52aca78ba023cf6ce806b1dc49c72cf928a7199d22e3d7ac84e47bc9427d0236945d10dbd15177bab413fbf0edfda09f014c7a7da088dde9759702ca760af2b8e4e97cc055c617bd74c3d97008635b98dc4d621b4891da9fb0473047927',\r\n exponent: '010001'\r\n }, {\r\n modulus: 'bdf2c77d81f6afd47bd30f29ac76e55adfe70e487e5e48297e5a9055c9c07d2b93b4ed3994d3eca5098bf18d978d54f8b7c713eb10247607e69af9ef44f38e28f8b439f257a11572945cc0406fe3f37bb92b79112db69eedf2dc71584a661638ea5becb9e23585074b80d57d9f5710dd30d2da940e0ada2f1b878397dc1a72b5ce2531b6f7dd158e09c828d03450ca0ff8a174deacebcaa22dde84ef66ad370f259d18af806638012da0ca4a70baa83d9c158f3552bc9158e69bf332a45809e1c36905a5caa12348dd57941a482131be7b2355a5f4635374f3bd3ddf5ff925bf4809ee27c1e67d9120c5fe08a9de458b1b4a3c5d0a428437f2beca81f4e2d5ff',\r\n exponent: '010001'\r\n }, {\r\n modulus: 'b3f762b739be98f343eb1921cf0148cfa27ff7af02b6471213fed9daa0098976e667750324f1abcea4c31e43b7d11f1579133f2b3d9fe27474e462058884e5e1b123be9cbbc6a443b2925c08520e7325e6f1a6d50e117eb61ea49d2534c8bb4d2ae4153fabe832b9edf4c5755fdd8b19940b81d1d96cf433d19e6a22968a85dc80f0312f596bd2530c1cfb28b5fe019ac9bc25cd9c2a5d8a0f3a1c0c79bcca524d315b5e21b5c26b46babe3d75d06d1cd33329ec782a0f22891ed1db42a1d6c0dea431428bc4d7aabdcf3e0eb6fda4e23eb7733e7727e9a1915580796c55188d2596d2665ad1182ba7abf15aaa5a8b779ea996317a20ae044b820bff35b6e8a1',\r\n exponent: '010001'\r\n }, {\r\n modulus: 'be6a71558ee577ff03023cfa17aab4e6c86383cff8a7ad38edb9fafe6f323f2d5106cbc8cafb83b869cffd1ccf121cd743d509e589e68765c96601e813dc5b9dfc4be415c7a6526132d0035ca33d6d6075d4f535122a1cdfe017041f1088d1419f65c8e5490ee613e16dbf662698c0f54870f0475fa893fc41eb55b08ff1ac211bc045ded31be27d12c96d8d3cfc6a7ae8aa50bf2ee0f30ed507cc2581e3dec56de94f5dc0a7abee0be990b893f2887bd2c6310a1e0a9e3e38bd34fded2541508dc102a9c9b4c95effd9dd2dfe96c29be647d6c69d66ca500843cfaed6e440196f1dbe0e2e22163c61ca48c79116fa77216726749a976a1c4b0944b5121e8c01',\r\n exponent: '010001'\r\n }];\r\n this.publicKeysParsed = {};\r\n this.prepared = false;\r\n this.preparePromise = null;\r\n }\r\n // prepareRsaKeys\r\n prepare() {\r\n if (this.preparePromise)\r\n return this.preparePromise;\r\n else if (this.prepared) {\r\n return Promise.resolve();\r\n }\r\n return this.preparePromise = Promise.all(this.publisKeysHex.map(keyParsed => {\r\n let RSAPublicKey = new tl_utils_1.TLSerialization();\r\n RSAPublicKey.storeBytes(bin_utils_1.bytesFromHex(keyParsed.modulus), 'n');\r\n RSAPublicKey.storeBytes(bin_utils_1.bytesFromHex(keyParsed.exponent), 'e');\r\n let buffer = RSAPublicKey.getBuffer();\r\n return cryptoworker_1.default.sha1Hash(buffer).then(hash => {\r\n let fingerprintBytes = bin_utils_1.bytesFromArrayBuffer(hash).slice(-8);\r\n fingerprintBytes.reverse();\r\n this.publicKeysParsed[bin_utils_1.bytesToHex(fingerprintBytes)] = {\r\n modulus: keyParsed.modulus,\r\n exponent: keyParsed.exponent\r\n };\r\n });\r\n })).then(() => {\r\n this.prepared = true;\r\n console.log('[MT] Prepared keys');\r\n this.preparePromise = null;\r\n });\r\n }\r\n // selectRsaKeyByFingerPrint\r\n select(fingerprints) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.prepare();\r\n var fingerprintHex, foundKey, i;\r\n for (i = 0; i < fingerprints.length; i++) {\r\n fingerprintHex = bin_utils_1.bigStringInt(fingerprints[i]).toString(16);\r\n if (fingerprintHex.length < 16) {\r\n fingerprintHex = new Array(16 - fingerprintHex.length).fill('0').join('') + fingerprintHex;\r\n }\r\n console.log(fingerprintHex, this.publicKeysParsed);\r\n if (foundKey = this.publicKeysParsed[fingerprintHex]) {\r\n return Object.assign({\r\n fingerprint: fingerprints[i]\r\n }, foundKey);\r\n }\r\n }\r\n return false;\r\n });\r\n }\r\n}\r\nexports.RSAKeysManager = RSAKeysManager;\r\nexports.default = new RSAKeysManager();\r\n"
},
{
"id": 28,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"name": "./src/lib/mtproto/passwordManager.ts",
"index": 28,
"index2": 26,
"size": 13021,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./passwordManager",
"loc": "25:42-70"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.PasswordManager = void 0;\r\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst index_1 = require(\"leemon/es/index/\");\r\nclass PasswordManager {\r\n getState(options = {}) {\r\n return apiManager_1.default.invokeApi('account.getPassword', {}, options).then((result) => {\r\n return result;\r\n });\r\n }\r\n /* public updateSettings(state: any, settings: any) {\r\n var currentHashPromise;\r\n var newHashPromise;\r\n var params: any = {\r\n new_settings: {\r\n _: 'account.passwordInputSettings',\r\n flags: 0,\r\n hint: settings.hint || ''\r\n }\r\n };\r\n \r\n if(typeof settings.cur_password === 'string' &&\r\n settings.cur_password.length > 0) {\r\n currentHashPromise = this.makePasswordHash(state.current_salt, settings.cur_password);\r\n } else {\r\n currentHashPromise = Promise.resolve([]);\r\n }\r\n \r\n if (typeof settings.new_password === 'string' &&\r\n settings.new_password.length > 0) {\r\n var saltRandom = new Array(8);\r\n var newSalt = bufferConcat(state.new_salt, saltRandom);\r\n secureRandom.nextBytes(saltRandom);\r\n newHashPromise = this.makePasswordHash(newSalt, settings.new_password);\r\n params.new_settings.new_salt = newSalt;\r\n params.new_settings.flags |= 1;\r\n } else {\r\n if(typeof settings.new_password === 'string') {\r\n params.new_settings.flags |= 1;\r\n params.new_settings.new_salt = [];\r\n }\r\n newHashPromise = Promise.resolve([]);\r\n }\r\n \r\n if(typeof settings.email === 'string') {\r\n params.new_settings.flags |= 2;\r\n params.new_settings.email = settings.email || '';\r\n }\r\n \r\n return Promise.all([currentHashPromise, newHashPromise]).then((hashes) => {\r\n params.current_password_hash = hashes[0];\r\n params.new_settings.new_password_hash = hashes[1];\r\n \r\n return apiManager.invokeApi('account.updatePasswordSettings', params);\r\n });\r\n } */\r\n check(state, password, options = {}) {\r\n return this.computeCheck(password, state).then((inputCheckPassword) => {\r\n return apiManager_1.default.invokeApi('auth.checkPassword', {\r\n password: inputCheckPassword\r\n }, options);\r\n });\r\n }\r\n requestRecovery(options = {}) {\r\n return apiManager_1.default.invokeApi('auth.requestPasswordRecovery', {}, options);\r\n }\r\n recover(code, options = {}) {\r\n return apiManager_1.default.invokeApi('auth.recoverPassword', {\r\n code: code\r\n }, options);\r\n }\r\n makePasswordHash(password, client_salt, server_salt) {\r\n var passwordUTF8 = unescape(encodeURIComponent(password));\r\n // @ts-ignore\r\n const textEncoder = new TextEncoder(\"utf-8\");\r\n const passwordBuffer = textEncoder.encode(passwordUTF8);\r\n // right\r\n let buffer = bin_utils_1.bufferConcats(client_salt, passwordBuffer, client_salt);\r\n return cryptoworker_1.default.sha256Hash(buffer).then((buffer) => {\r\n console.log('encoded 1', bin_utils_1.bytesToHex(new Uint8Array(buffer)));\r\n buffer = bin_utils_1.bufferConcats(server_salt, buffer, server_salt);\r\n return cryptoworker_1.default.sha256Hash(buffer).then((buffer) => {\r\n console.log('encoded 2', buffer, bin_utils_1.bytesToHex(new Uint8Array(buffer)));\r\n return cryptoworker_1.default.pbkdf2(new Uint8Array(buffer), client_salt, 100000).then((hash) => {\r\n console.log('encoded 3', hash, bin_utils_1.bytesToHex(new Uint8Array(hash)));\r\n hash = bin_utils_1.bufferConcats(server_salt, hash, server_salt);\r\n return cryptoworker_1.default.sha256Hash(hash).then((buffer) => {\r\n console.log('got password hash:', buffer, bin_utils_1.bytesToHex(new Uint8Array(buffer)));\r\n return buffer;\r\n });\r\n });\r\n });\r\n });\r\n }\r\n computeCheck(password, state) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let algo = state.current_algo;\r\n let p = index_1.str2bigInt(bin_utils_1.bytesToHex(algo.p), 16);\r\n let B = index_1.str2bigInt(bin_utils_1.bytesToHex(state.srp_B), 16);\r\n let g = index_1.int2bigInt(algo.g, 32, 256);\r\n console.log('p', index_1.bigInt2str(p, 16));\r\n console.log('B', index_1.bigInt2str(B, 16));\r\n /* if(B.compareTo(BigInteger.ZERO) < 0) {\r\n console.error('srp_B < 0')\r\n }\r\n \r\n if(B.compareTo(p) <= 0) {\r\n console.error('srp_B <= p');\r\n } */\r\n /* let check_prime_and_good = (bytes: any, g: number) => {\r\n let good_prime = 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b';\r\n \r\n if(bytesToHex(bytes) == good_prime && [3, 4, 5, 7].indexOf(g) !== -1) {\r\n return true;\r\n }\r\n \r\n // TO-DO check_prime_and_good_check\r\n }; */\r\n //check_prime_and_good(algo.p, g);\r\n let pw_hash = yield this.makePasswordHash(password, new Uint8Array(algo.salt1), new Uint8Array(algo.salt2));\r\n let x = index_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(pw_hash)), 16);\r\n console.warn('computed pw_hash:', pw_hash, x, bin_utils_1.bytesToHex(new Uint8Array(pw_hash)));\r\n var padArray = function (arr, len, fill = 0) {\r\n return Array(len).fill(fill).concat(arr).slice(-len);\r\n };\r\n let pForHash = padArray(bin_utils_1.bytesFromHex(index_1.bigInt2str(p, 16)), 256);\r\n let gForHash = padArray(bin_utils_1.bytesFromHex(index_1.bigInt2str(g, 16)), 256); // like uint8array\r\n let b_for_hash = padArray(bin_utils_1.bytesFromHex(index_1.bigInt2str(B, 16)), 256);\r\n console.log(bin_utils_1.bytesToHex(pForHash));\r\n console.log(bin_utils_1.bytesToHex(gForHash));\r\n console.log(bin_utils_1.bytesToHex(b_for_hash));\r\n let g_x = index_1.powMod(g, x, p);\r\n console.log('g_x', index_1.bigInt2str(g_x, 16));\r\n let k = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(pForHash, gForHash));\r\n k = index_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(k)), 16);\r\n console.log('k', index_1.bigInt2str(k, 16));\r\n // kg_x = (k * g_x) % p\r\n let kg_x = index_1.mod(index_1.mult(k, g_x), p);\r\n // good\r\n console.log('kg_x', index_1.bigInt2str(kg_x, 16));\r\n let is_good_mod_exp_first = (modexp, prime) => {\r\n let diff = index_1.sub(prime, modexp);\r\n let min_diff_bits_count = 2048 - 64;\r\n let max_mod_exp_size = 256;\r\n if (index_1.negative(diff) ||\r\n index_1.bitSize(diff) < min_diff_bits_count ||\r\n index_1.bitSize(modexp) < min_diff_bits_count ||\r\n Math.floor((index_1.bitSize(modexp) + 7) / 8) > max_mod_exp_size)\r\n return false;\r\n return true;\r\n };\r\n let generate_and_check_random = () => __awaiter(this, void 0, void 0, function* () {\r\n //let random_size = 256;\r\n while (true) {\r\n /* let a = addPadding([], random_size, false, true);\r\n a = str2bigInt(bytesToHex(a), 16); */\r\n //let a = randBigInt(random_size, 1);\r\n let a = index_1.str2bigInt(bin_utils_1.bytesToHex(state.secure_random), 16);\r\n /* console.log('a', bigInt2str(a, 16));\r\n break; */\r\n let A = index_1.powMod(g, a, p);\r\n //console.log('A', bigInt2str(A, 16));\r\n if (is_good_mod_exp_first(A, p)) {\r\n // a_for_hash = big_num_for_hash(A)\r\n let a_for_hash = bin_utils_1.bytesFromHex(index_1.bigInt2str(A, 16));\r\n let s = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(new Uint8Array(a_for_hash), new Uint8Array(b_for_hash)));\r\n let u = index_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(s)), 16);\r\n //if(u > 0)\r\n if (!index_1.isZero(u) && !index_1.negative(u))\r\n return { a, a_for_hash, u };\r\n }\r\n }\r\n });\r\n let { a, a_for_hash, u } = yield generate_and_check_random();\r\n console.log('a', index_1.bigInt2str(a, 16));\r\n console.log('a_for_hash', bin_utils_1.bytesToHex(a_for_hash));\r\n console.log('u', index_1.bigInt2str(u, 16));\r\n // g_b = (B - kg_x) % p\r\n console.log('B - kg_x', index_1.bigInt2str(index_1.sub(B, kg_x), 16));\r\n //let g_b = mod(sub(B, kg_x), p);\r\n /* let g_b = sub(B, kg_x);\r\n if(negative(g_b)) g_b = add(g_b, p);\r\n else g_b = mod(g_b, p); */\r\n /* let g_b; // g_b = sub(mod(B, p), kg_x);\r\n if(!negative(sub(B, kg_x))) g_b = sub(mod(B, p), kg_x);\r\n else g_b = mod(sub(B, kg_x), p); */\r\n /* let lol = trim(sub(B, kg_x), 10);\r\n console.log('llalala', bigInt2str(lol, 16)); */\r\n let g_b;\r\n if (!index_1.greater(B, kg_x)) {\r\n console.log('negative');\r\n g_b = index_1.add(B, p);\r\n }\r\n else\r\n g_b = B;\r\n g_b = index_1.mod(index_1.sub(g_b, kg_x), p);\r\n //g_b = mod(g_b, p);\r\n //console.log('g_b', bigInt2str(g_b, 16));\r\n /* if(!is_good_mod_exp_first(g_b, p))\r\n throw new Error('bad g_b'); */\r\n let ux = index_1.mult(u, x);\r\n let a_ux = index_1.add(a, ux);\r\n let S = index_1.powMod(g_b, a_ux, p);\r\n let K = yield cryptoworker_1.default.sha256Hash(padArray(bin_utils_1.bytesFromHex(index_1.bigInt2str(S, 16)), 256));\r\n let h1 = yield cryptoworker_1.default.sha256Hash(pForHash);\r\n let h2 = yield cryptoworker_1.default.sha256Hash(gForHash);\r\n h1 = bin_utils_1.bytesXor(new Uint8Array(h1), new Uint8Array(h2));\r\n /* let buff = bufferConcat(h1, await CryptoWorker.sha256Hash(algo.salt1));\r\n buff = bufferConcat(buff, await CryptoWorker.sha256Hash(algo.salt2));\r\n buff = bufferConcat(buff, a_for_hash);\r\n buff = bufferConcat(buff, b_for_hash);\r\n buff = bufferConcat(buff, K); */\r\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);\r\n let M1 = yield cryptoworker_1.default.sha256Hash(buff);\r\n let out = {\r\n _: 'inputCheckPasswordSRP',\r\n srp_id: state.srp_id,\r\n A: new Uint8Array(a_for_hash),\r\n M1: new Uint8Array(M1)\r\n };\r\n console.log('out', bin_utils_1.bytesToHex(out.A), bin_utils_1.bytesToHex(out.M1));\r\n return out;\r\n /* console.log(gForHash, pForHash, bForHash); */\r\n });\r\n }\r\n}\r\nexports.PasswordManager = PasswordManager;\r\nexports.default = new PasswordManager();\r\n"
}
],
"filteredModules": 0,
"origins": [
{
"module": "",
"moduleIdentifier": "",
"moduleName": "",
"loc": "main",
"request": "!!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"reasons": []
}
]
}
],
"modules": [
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"name": "./src/lib/bin_utils.ts",
"index": 4,
"index2": 3,
"size": 12166,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"module": "./src/lib/crypto/cryptoworker.ts",
"moduleName": "./src/lib/crypto/cryptoworker.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "25:20-43"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "17:20-43"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\tl_utils.ts",
"module": "./src/lib/mtproto/tl_utils.ts",
"moduleName": "./src/lib/mtproto/tl_utils.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "13:20-43"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"module": "./src/lib/polyfill.ts",
"moduleName": "./src/lib/polyfill.ts",
"type": "cjs require",
"userRequest": "./bin_utils",
"loc": "4:20-42"
},
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../../bin_utils",
"loc": "7:20-46"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "24:20-43"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\timeManager.ts",
"module": "./src/lib/mtproto/timeManager.ts",
"moduleName": "./src/lib/mtproto/timeManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "8:20-43"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "16:20-43"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "17:20-43"
},
{
"moduleId": 22,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../bin_utils",
"loc": "3:20-43"
},
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../../bin_utils",
"loc": "13:20-46"
},
{
"moduleId": 24,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\intermediate.ts",
"module": "./src/lib/mtproto/transports/intermediate.ts",
"moduleName": "./src/lib/mtproto/transports/intermediate.ts",
"type": "cjs require",
"userRequest": "../../bin_utils",
"loc": "3:20-46"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "18:20-43"
},
{
"moduleId": 27,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\rsaKeysManager.ts",
"module": "./src/lib/mtproto/rsaKeysManager.ts",
"moduleName": "./src/lib/mtproto/rsaKeysManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "17:20-43"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"module": "./src/lib/mtproto/passwordManager.ts",
"moduleName": "./src/lib/mtproto/passwordManager.ts",
"type": "cjs require",
"userRequest": "../bin_utils",
"loc": "17:20-43"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 <igor.beatle@gmail.com>\r\n * https://github.com/zhukov/webogram/blob/master/LICENSE\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.nextRandomInt = exports.addPadding = exports.longFromInts = exports.longToBytes = exports.bytesToWordss = exports.bytesFromWordss = exports.bytesFromWords = exports.longToInts = exports.bufferConcats = exports.bufferConcat = exports.bytesFromArrayBuffer = exports.convertToByteArray = exports.convertToUint8Array = exports.convertToArrayBuffer = exports.bytesToArrayBuffer = exports.bytesFromBigInt = exports.bytesXor = exports.bytesCmp = exports.blobSafeMimeType = exports.blobConstruct = exports.dataUrlToBlob = exports.base64ToBlob = exports.uint6ToBase64 = exports.bytesToBase64 = exports.bytesFromHex = exports.bytesToHex = exports.bigStringInt = exports.bigint = exports.isObject = exports.dT = void 0;\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\n///////////////////////\r\n/////////////\r\n/////////////////////////////////////////////////\r\n///////////////////////////////////////////////////////////////////////////\r\n/////////////////////////////////////////////////////////////////////////////////\r\n/////////////////////////////////////////////////////////////////////////////////////////////\r\n///////////////////////////////////////////////\r\n//////////////////////////////////////////////////////////////////////////\r\n//////////////////////////////////////////////////////////////\r\n////////////////\r\n//////////\r\nvar _logTimer = Date.now();\r\nfunction dT() {\r\n return '[' + ((Date.now() - _logTimer) / 1000).toFixed(3) + ']';\r\n}\r\nexports.dT = dT;\r\nfunction isObject(object) {\r\n return typeof (object) === 'object' && object !== null;\r\n}\r\nexports.isObject = isObject;\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 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 nextRandomInt(maxValue) {\r\n return Math.floor(Math.random() * maxValue);\r\n}\r\nexports.nextRandomInt = nextRandomInt;\r\n"
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"index": 16,
"index2": 13,
"size": 4676,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"issuerId": 17,
"issuerName": "./src/lib/mtproto/mtproto.worker.js",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
}
],
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony side effect evaluation",
"userRequest": "../crypto/cryptoworker",
"loc": "3:0-50"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "../crypto/cryptoworker",
"loc": "25:13-25"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "../crypto/cryptoworker",
"loc": "25:47-59"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../crypto/cryptoworker",
"loc": "19:39-72"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "../crypto/cryptoworker",
"loc": "23:39-72"
},
{
"moduleId": 27,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\rsaKeysManager.ts",
"module": "./src/lib/mtproto/rsaKeysManager.ts",
"moduleName": "./src/lib/mtproto/rsaKeysManager.ts",
"type": "cjs require",
"userRequest": "../crypto/cryptoworker",
"loc": "18:39-72"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"module": "./src/lib/mtproto/passwordManager.ts",
"moduleName": "./src/lib/mtproto/passwordManager.ts",
"type": "cjs require",
"userRequest": "../crypto/cryptoworker",
"loc": "18:39-72"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\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)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\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 crypto_methods_1 = __importDefault(require(\"./crypto_methods\"));\r\nclass CryptoWorker 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 = false;\r\n this.utils = {};\r\n console.log(bin_utils_1.dT(), 'CW constructor');\r\n //////////////////////////\r\n Promise.all([\r\n Promise.resolve().then(() => __importStar(require('./crypto_utils'))).then(utils => {\r\n Object.assign(this.utils, {\r\n 'sha1-hash': utils.sha1HashSync,\r\n 'sha256-hash': utils.sha256HashSync,\r\n 'pbkdf2': utils.hash_pbkdf2,\r\n 'aes-encrypt': utils.aesEncryptSync,\r\n 'aes-decrypt': utils.aesDecryptSync,\r\n 'rsa-encrypt': utils.rsaEncrypt,\r\n 'factorize': utils.pqPrimeFactorization,\r\n 'mod-pow': utils.bytesModPow,\r\n 'unzip': utils.gzipUncompress\r\n });\r\n }) /* ,\r\n \r\n import('../bin_utils').then(utils => {\r\n this.utils.unzip = utils.gzipUncompress;\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 finalizeTask(taskID, result) {\r\n let deferred = this.awaiting[taskID];\r\n if (deferred !== undefined) {\r\n this.debug && console.log(bin_utils_1.dT(), 'CW done', deferred.taskName, result);\r\n deferred.resolve(result);\r\n delete this.awaiting[taskID];\r\n }\r\n }\r\n performTaskWorker(task, ...args) {\r\n this.debug && console.log(bin_utils_1.dT(), 'CW start', task, args);\r\n //////////////////////////\r\n return Promise.resolve(this.utils[task](...args));\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 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}\r\nconst cryptoWorker = new CryptoWorker();\r\n//(window as any).CryptoWorker = cryptoWorker;\r\nexports.default = cryptoWorker;\r\n"
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"name": "./src/lib/storage.ts",
"index": 2,
"index2": 1,
"size": 6346,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"issuerId": 17,
"issuerName": "./src/lib/mtproto/mtproto.worker.js",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
}
],
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "16:34-55"
},
{
"moduleId": 15,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\timeManager.ts",
"module": "./src/lib/mtproto/timeManager.ts",
"moduleName": "./src/lib/mtproto/timeManager.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "7:34-55"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony side effect evaluation",
"userRequest": "../storage",
"loc": "2:0-36"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "../storage",
"loc": "19:4-14"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "20:34-55"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"module": "./src/lib/mtproto/mtproto.ts",
"moduleName": "./src/lib/mtproto/mtproto.ts",
"type": "cjs require",
"userRequest": "../storage",
"loc": "7:34-55"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 = JSON.stringify(value, (key, value) => {\r\n if (key == 'downloaded' || (key == 'url' && value.indexOf('blob:') === 0))\r\n return undefined;\r\n return value;\r\n });\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<Cache>;\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": 3,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto_config.ts",
"name": "./src/lib/mtproto/mtproto_config.ts",
"index": 3,
"index2": 0,
"size": 606,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"issuerId": 2,
"issuerName": "./src/lib/storage.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 2,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"name": "./src/lib/storage.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 0,
"building": 2
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\storage.ts",
"module": "./src/lib/storage.ts",
"moduleName": "./src/lib/storage.ts",
"type": "cjs require",
"userRequest": "./mtproto/mtproto_config",
"loc": "3:25-60"
},
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "21:25-52"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"module": "./src/lib/mtproto/dcConfigurator.ts",
"moduleName": "./src/lib/mtproto/dcConfigurator.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "9:25-52"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "27:25-52"
},
{
"moduleId": 25,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"module": "./src/lib/mtproto/mtproto.ts",
"moduleName": "./src/lib/mtproto/mtproto.ts",
"type": "cjs require",
"userRequest": "./mtproto_config",
"loc": "8:25-52"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Modes = exports.App = void 0;\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": 4,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\jsbn\\index.js",
"name": "./node_modules/jsbn/index.js",
"index": 5,
"index2": 2,
"size": 42308,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"issuerId": 0,
"issuerName": "./src/lib/bin_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 0,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"name": "./src/lib/bin_utils.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 20,
"building": 10
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\bin_utils.ts",
"module": "./src/lib/bin_utils.ts",
"moduleName": "./src/lib/bin_utils.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "11:15-30"
},
{
"moduleId": 9,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"module": "./src/lib/polyfill.ts",
"moduleName": "./src/lib/polyfill.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "6:15-30"
},
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "23:15-30"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "jsbn",
"loc": "22:15-30"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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<<dbits)-1);\n BigInteger.prototype.DV = (1<<dbits);\n\n var BI_FP = 52;\n BigInteger.prototype.FV = Math.pow(2,BI_FP);\n BigInteger.prototype.F1 = BI_FP-dbits;\n BigInteger.prototype.F2 = 2*dbits-BI_FP;\n\n // Digit conversions\n var BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n var BI_RC = new Array();\n var rr,vv;\n rr = \"0\".charCodeAt(0);\n for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;\n rr = \"a\".charCodeAt(0);\n for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n rr = \"A\".charCodeAt(0);\n for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n\n function int2char(n) { return BI_RM.charAt(n); }\n function intAt(s,i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c==null)?-1:c;\n }\n\n // (protected) copy this to r\n function bnpCopyTo(r) {\n for(var i = this.t-1; i >= 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))<<sh;\n this[this.t++] = (x>>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<<sh;\n sh += k;\n if(sh >= 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)<<sh;\n }\n this.clamp();\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) clamp off excess high words\n function bnpClamp() {\n var c = this.s&this.DM;\n while(this.t > 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<<k)-1, d, m = false, r = \"\", i = this.t;\n var p = this.DB-(i*this.DB)%k;\n if(i-- > 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)-1))<<(k-p);\n d |= this[--i]>>(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<<cbs)-1;\n var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;\n for(i = this.t-1; i >= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<<bs;\n }\n for(i = ds-1; i >= 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)-1;\n r[0] = this[ds]>>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<<cbs;\n r[i-ds] = this[i]>>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;\n r.t = this.t-ds;\n r.clamp();\n }\n\n // (protected) r = this - a\n function bnpSubTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]-a[i];\n r[i++] = c&this.DM;\n c >>= 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<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;\n var i = r.t, j = i-ys, t = (q==null)?nbi():q;\n y.dlShiftTo(j,t);\n if(r.compareTo(t) >= 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<<i)) > 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))<<this.DB)|this[0];\n }\n\n // (public) return value as byte\n function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>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<<t)-1); else x[0] = 0;\n this.fromString(x,256);\n }\n }\n\n // (public) convert to bigendian byte array\n function bnToByteArray() {\n var i = this.t, r = new Array();\n r[0] = this.s;\n var p = this.DB-(i*this.DB)%8, d, k = 0;\n if(i-- > 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)-1))<<(8-p);\n d |= this[--i]>>(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<<n)\n function bnpChangeBit(n,op) {\n var r = BigInteger.ONE.shiftLeft(n);\n this.bitwiseTo(r,op,r);\n return r;\n }\n\n // (public) this | (1<<n)\n function bnSetBit(n) { return this.changeBit(n,op_or); }\n\n // (public) this & ~(1<<n)\n function bnClearBit(n) { return this.changeBit(n,op_andnot); }\n\n // (public) this ^ (1<<n)\n function bnFlipBit(n) { return this.changeBit(n,op_xor); }\n\n // (protected) r = this + a\n function bnpAddTo(a,r) {\n var i = 0, c = 0, m = Math.min(a.t,this.t);\n while(i < m) {\n c += this[i]+a[i];\n r[i++] = c&this.DM;\n c >>= 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<<k)-1;\n g[1] = z.convert(this);\n if(k > 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<<i)) == 0) {\n z.sqrTo(r,r2); t = r; r = r2; r2 = t;\n if(--i < 0) { i = this.DB-1; --j; }\n }\n }\n return z.revert(r);\n }\n\n // (public) gcd(this,a) (HAC 14.54)\n function bnGCD(a) {\n var x = (this.s<0)?this.negate():this.clone();\n var y = (a.s<0)?a.negate():a.clone();\n if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }\n var i = x.getLowestSetBit(), g = y.getLowestSetBit();\n if(g < 0) return x;\n if(i < g) g = i;\n if(g > 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 // <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>\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"
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"name": "./src/lib/mtproto/networkerFactory.ts",
"index": 6,
"index2": 22,
"size": 704,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"issuerId": 17,
"issuerName": "./src/lib/mtproto/mtproto.worker.js",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
}
],
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./networkerFactory",
"loc": "18:43-72"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony side effect evaluation",
"userRequest": "./networkerFactory",
"loc": "4:0-50"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "./networkerFactory",
"loc": "11:0-16"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./networkerFactory",
"loc": "23:43-72"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.NetworkerFactory = void 0;\r\nconst networker_1 = require(\"./networker\");\r\nclass NetworkerFactory {\r\n constructor() {\r\n this.updatesProcessor = null;\r\n }\r\n setUpdatesProcessor(callback) {\r\n this.updatesProcessor = callback;\r\n }\r\n getNetworker(dcID, authKey, authKeyID, serverSalt, options) {\r\n //console.log(dT(), 'NetworkerFactory: creating new instance of MTPNetworker:', dcID, options);\r\n return new networker_1.MTPNetworker(dcID, authKey, authKeyID, serverSalt, options);\r\n }\r\n}\r\nexports.NetworkerFactory = NetworkerFactory;\r\nexports.default = new NetworkerFactory();\r\n"
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"index": 1,
"index2": 27,
"size": 15145,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"issuerId": 17,
"issuerName": "./src/lib/mtproto/mtproto.worker.js",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
}
],
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony side effect evaluation",
"userRequest": "./apiManager",
"loc": "1:0-38"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "./apiManager",
"loc": "31:21-31"
},
{
"moduleId": 17,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"module": "./src/lib/mtproto/mtproto.worker.js",
"moduleName": "./src/lib/mtproto/mtproto.worker.js",
"type": "harmony import specifier",
"userRequest": "./apiManager",
"loc": "31:51-61"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"module": "./src/lib/mtproto/passwordManager.ts",
"moduleName": "./src/lib/mtproto/passwordManager.ts",
"type": "cjs require",
"userRequest": "./apiManager",
"loc": "16:37-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 1,
"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\nexports.ApiManager = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\r\nconst mtproto_1 = require(\"./mtproto\");\r\nconst authorizer_1 = __importDefault(require(\"./authorizer\"));\r\nconst mtproto_config_1 = require(\"./mtproto_config\");\r\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\r\nconst http_1 = __importDefault(require(\"./transports/http\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst passwordManager_1 = __importDefault(require(\"./passwordManager\"));\r\n///////////////////////\r\n//////////////////////////////////////\r\n//////////\r\n//console.error('apiManager included!');\r\nclass ApiManager {\r\n constructor() {\r\n //MtpSingleInstanceService.start();\r\n this.cachedNetworkers = {};\r\n this.cachedUploadNetworkers = {};\r\n this.cachedExportPromise = {};\r\n this.gettingNetworkers = {};\r\n this.baseDcID = 0;\r\n this.telegramMeNotified = false;\r\n this.log = polyfill_1.logger('API');\r\n /* AppStorage.get<number>('dc').then((dcID) => {\r\n if(dcID) {\r\n this.baseDcID = dcID;\r\n }\r\n }); */\r\n }\r\n telegramMeNotify(newValue) {\r\n if (this.telegramMeNotified !== newValue) {\r\n this.telegramMeNotified = newValue;\r\n mtproto_1.telegramMeWebService.setAuthorized(this.telegramMeNotified);\r\n }\r\n }\r\n // mtpSetUserAuth\r\n setUserAuth(userAuth) {\r\n var fullUserAuth = Object.assign({ dcID: this.baseDcID }, userAuth);\r\n storage_1.default.set({\r\n dc: this.baseDcID,\r\n user_auth: fullUserAuth\r\n });\r\n this.telegramMeNotify(true);\r\n ///////////////////////////\r\n /////////////////////////////////////////////////////\r\n //////////////\r\n }\r\n setBaseDcID(dcID) {\r\n this.baseDcID = dcID;\r\n }\r\n // mtpLogOut\r\n logOut() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let storageKeys = [];\r\n let prefix = mtproto_config_1.Modes.test ? 't_dc' : 'dc';\r\n for (let dcID = 1; dcID <= 5; dcID++) {\r\n storageKeys.push(prefix + dcID + '_auth_key');\r\n //storageKeys.push(prefix + dcID + '_auth_keyID');\r\n }\r\n // WebPushApiManager.forceUnsubscribe(); // WARNING\r\n let storageResult = yield storage_1.default.get(storageKeys);\r\n let logoutPromises = [];\r\n for (let i = 0; i < storageResult.length; i++) {\r\n if (storageResult[i]) {\r\n logoutPromises.push(this.invokeApi('auth.logOut', {}, { dcID: i + 1, ignoreErrors: true }));\r\n }\r\n }\r\n return Promise.all(logoutPromises).then(() => {\r\n storage_1.default.remove('dc', 'user_auth', 'stickerSets');\r\n this.baseDcID = 0;\r\n this.telegramMeNotify(false);\r\n this.mtpClearStorage();\r\n }, (error) => {\r\n storageKeys.push('dc', 'user_auth', 'stickerSets');\r\n storage_1.default.remove(storageKeys);\r\n this.baseDcID = 0;\r\n error.handled = true;\r\n this.telegramMeNotify(false);\r\n this.mtpClearStorage();\r\n }) /* .then(() => {\r\n location.pathname = '/';\r\n }) */;\r\n });\r\n }\r\n mtpClearStorage() {\r\n var saveKeys = ['user_auth', 't_user_auth', 'dc', 't_dc'];\r\n for (var dcID = 1; dcID <= 5; dcID++) {\r\n saveKeys.push('dc' + dcID + '_auth_key');\r\n saveKeys.push('dc' + dcID + '_auth_keyID');\r\n saveKeys.push('dc' + dcID + '_server_salt'); // new\r\n saveKeys.push('t_dc' + dcID + '_auth_key');\r\n saveKeys.push('t_dc' + dcID + '_auth_keyID');\r\n saveKeys.push('t_dc' + dcID + '_server_salt'); // new\r\n }\r\n storage_1.default.noPrefix();\r\n storage_1.default.get(saveKeys).then((values) => {\r\n storage_1.default.clear().then(() => {\r\n var restoreObj = {};\r\n saveKeys.forEach((key, i) => {\r\n var value = values[i];\r\n if (value !== false && value !== undefined) {\r\n restoreObj[key] = value;\r\n }\r\n });\r\n storage_1.default.noPrefix();\r\n return storage_1.default.set(restoreObj);\r\n });\r\n });\r\n }\r\n // mtpGetNetworker\r\n getNetworker(dcID, options = {}) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let upload = (options.fileUpload || options.fileDownload)\r\n && (dcConfigurator_1.default.chooseServer(dcID, true) instanceof http_1.default || mtproto_config_1.Modes.multipleConnections);\r\n let cache = upload ? this.cachedUploadNetworkers : this.cachedNetworkers;\r\n if (!dcID) {\r\n throw new Error('get Networker without dcID');\r\n }\r\n if (cache[dcID] !== undefined) {\r\n return cache[dcID];\r\n }\r\n let getKey = dcID + '-' + +upload;\r\n if (this.gettingNetworkers[getKey]) {\r\n return this.gettingNetworkers[getKey];\r\n }\r\n return this.gettingNetworkers[getKey] = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\r\n var ak = 'dc' + dcID + '_auth_key';\r\n var akID = 'dc' + dcID + '_auth_keyID';\r\n var ss = 'dc' + dcID + '_server_salt';\r\n let result = yield storage_1.default.get([ak, akID, ss]);\r\n let [authKeyHex, authKeyIDHex, serverSaltHex] = result;\r\n if (authKeyHex && !authKeyIDHex && serverSaltHex) {\r\n this.log.warn('Updating to new version (+akID)');\r\n yield storage_1.default.remove(ak, akID, ss);\r\n authKeyHex = serverSaltHex = '';\r\n }\r\n if (authKeyHex && authKeyHex.length == 512) {\r\n if (!serverSaltHex || serverSaltHex.length != 16) {\r\n serverSaltHex = 'AAAAAAAAAAAAAAAA';\r\n }\r\n var authKey = bin_utils_1.bytesFromHex(authKeyHex);\r\n var authKeyID = new Uint8Array(bin_utils_1.bytesFromHex(authKeyIDHex));\r\n var serverSalt = bin_utils_1.bytesFromHex(serverSaltHex);\r\n resolve(cache[dcID] = networkerFactory_1.default.getNetworker(dcID, authKey, authKeyID, serverSalt, options));\r\n }\r\n else\r\n try {\r\n let auth = yield authorizer_1.default.auth(dcID);\r\n let storeObj = {\r\n [ak]: bin_utils_1.bytesToHex(auth.authKey),\r\n [akID]: auth.authKeyID.hex,\r\n [ss]: bin_utils_1.bytesToHex(auth.serverSalt)\r\n };\r\n storage_1.default.set(storeObj);\r\n resolve(cache[dcID] = networkerFactory_1.default.getNetworker(dcID, auth.authKey, auth.authKeyID, auth.serverSalt, options));\r\n }\r\n catch (error) {\r\n this.log('Get networker error', error, error.stack);\r\n reject(error);\r\n }\r\n delete this.gettingNetworkers[getKey];\r\n }));\r\n });\r\n }\r\n // mtpInvokeApi\r\n invokeApi(method, params = {}, options = {}) {\r\n ///////this.log('Invoke api', method, params, options);\r\n return new Promise((resolve, reject) => {\r\n let rejectPromise = (error) => {\r\n if (!error) {\r\n error = { type: 'ERROR_EMPTY' };\r\n }\r\n else if (!bin_utils_1.isObject(error)) {\r\n error = { message: error };\r\n }\r\n reject(error);\r\n if (options.ignoreErrors) {\r\n return;\r\n }\r\n if (error.code == 406) {\r\n error.handled = true;\r\n }\r\n if (!options.noErrorBox) {\r\n error.input = method;\r\n error.stack = stack || (error.originalError && error.originalError.stack) || error.stack || (new Error()).stack;\r\n setTimeout(() => {\r\n if (!error.handled) {\r\n if (error.code == 401) {\r\n this.logOut();\r\n }\r\n else {\r\n // ErrorService.show({error: error}); // WARNING\r\n }\r\n error.handled = true;\r\n }\r\n }, 100);\r\n }\r\n };\r\n var dcID;\r\n var cachedNetworker;\r\n var stack = (new Error()).stack || 'empty stack';\r\n var performRequest = (networker) => {\r\n return (cachedNetworker = networker)\r\n .wrapApiCall(method, params, options)\r\n .then(resolve, (error) => {\r\n this.log.error('Error', error.code, error.type, this.baseDcID, dcID);\r\n if (error.code == 401 && this.baseDcID == dcID) {\r\n storage_1.default.remove('dc', 'user_auth');\r\n this.telegramMeNotify(false);\r\n rejectPromise(error);\r\n }\r\n else if (error.code == 401 && this.baseDcID && dcID != this.baseDcID) {\r\n if (this.cachedExportPromise[dcID] === undefined) {\r\n let promise = new Promise((exportResolve, exportReject) => {\r\n this.invokeApi('auth.exportAuthorization', { dc_id: dcID }, { noErrorBox: true }).then((exportedAuth) => {\r\n this.invokeApi('auth.importAuthorization', {\r\n id: exportedAuth.id,\r\n bytes: exportedAuth.bytes\r\n }, { dcID: dcID, noErrorBox: true }).then(exportResolve, exportReject);\r\n }, exportReject);\r\n });\r\n this.cachedExportPromise[dcID] = promise;\r\n }\r\n this.cachedExportPromise[dcID].then(() => {\r\n (cachedNetworker = networker).wrapApiCall(method, params, options).then(resolve, rejectPromise);\r\n }, rejectPromise);\r\n }\r\n else if (error.code == 303) {\r\n var newDcID = error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_|USER_MIGRATE_)(\\d+)/)[2];\r\n if (newDcID != dcID) {\r\n if (options.dcID) {\r\n options.dcID = newDcID;\r\n }\r\n else {\r\n storage_1.default.set({ dc: this.baseDcID = newDcID });\r\n }\r\n this.getNetworker(newDcID, options).then((networker) => {\r\n networker.wrapApiCall(method, params, options).then(resolve, rejectPromise);\r\n }, rejectPromise);\r\n }\r\n }\r\n else if (!options.rawError && error.code == 420) {\r\n var waitTime = error.type.match(/^FLOOD_WAIT_(\\d+)/)[1] || 10;\r\n if (waitTime > (options.timeout !== undefined ? options.timeout : 60)) {\r\n return rejectPromise(error);\r\n }\r\n setTimeout(() => {\r\n performRequest(cachedNetworker);\r\n }, (waitTime + 5) * 1000); // 03.02.2020\r\n }\r\n else if (!options.rawError && (error.code == 500 || error.type == 'MSG_WAIT_FAILED')) {\r\n var now = Date.now();\r\n if (options.stopTime) {\r\n if (now >= options.stopTime) {\r\n return rejectPromise(error);\r\n }\r\n }\r\n else {\r\n options.stopTime = now + (options.timeout !== undefined ? options.timeout : 10) * 1000;\r\n }\r\n options.waitTime = options.waitTime ? Math.min(60, options.waitTime * 1.5) : 1;\r\n setTimeout(() => {\r\n performRequest(cachedNetworker);\r\n }, options.waitTime * 1000);\r\n }\r\n else {\r\n rejectPromise(error);\r\n }\r\n });\r\n };\r\n if (dcID = (options.dcID || this.baseDcID)) {\r\n this.getNetworker(dcID, options).then(performRequest, rejectPromise);\r\n }\r\n else {\r\n storage_1.default.get('dc').then((baseDcID) => {\r\n this.getNetworker(this.baseDcID = dcID = baseDcID || mtproto_config_1.App.baseDcID, options).then(performRequest, rejectPromise);\r\n });\r\n }\r\n });\r\n }\r\n // mtpGetUserID\r\n getUserID() {\r\n return storage_1.default.get('user_auth').then((auth) => {\r\n this.telegramMeNotify(auth && auth.id > 0 || false);\r\n return auth.id || 0;\r\n });\r\n }\r\n checkPassword(value) {\r\n return passwordManager_1.default.getState()\r\n .then(state => {\r\n console.log(state);\r\n return passwordManager_1.default.check(state, value);\r\n });\r\n }\r\n}\r\nexports.ApiManager = ApiManager;\r\nexports.default = new ApiManager();\r\n"
},
{
"id": 7,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\tl_utils.ts",
"name": "./src/lib/mtproto/tl_utils.ts",
"index": 8,
"index2": 11,
"size": 25294,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"issuerId": 26,
"issuerName": "./src/lib/mtproto/authorizer.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 26,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"name": "./src/lib/mtproto/authorizer.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 438,
"building": 329,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./tl_utils",
"loc": "18:19-40"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "./tl_utils",
"loc": "16:19-40"
},
{
"moduleId": 27,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "16:19-40"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"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 <igor.beatle@gmail.com>\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\nexports.TLSerialization = exports.TLDeserialization = void 0;\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst schema_1 = __importDefault(require(\"./schema\"));\r\n//////////////////////\r\n// @ts-ignore\r\nconst crypto_utils_1 = require(\"../crypto/crypto_utils\");\r\n/////////\r\n/////////////\r\n////////////////////////////////////////////\r\n//////////\r\nconst boolFalse = +schema_1.default.API.constructors.find(c => c.predicate == 'boolFalse').id >>> 0;\r\nconst boolTrue = +schema_1.default.API.constructors.find(c => c.predicate == 'boolTrue').id >>> 0;\r\nconst vector = +schema_1.default.API.constructors.find(c => c.predicate == 'vector').id >>> 0;\r\nconst gzipPacked = +schema_1.default.MTProto.constructors.find(c => c.predicate == 'gzip_packed').id >>> 0;\r\n//console.log('boolFalse', boolFalse == 0xbc799737);\r\nclass TLSerialization {\r\n constructor(options = {}) {\r\n this.maxLength = 2048; // 2Kb\r\n this.offset = 0; // in bytes\r\n this.mtproto = false;\r\n this.debug = false; //Modes.debug;\r\n this.maxLength = options.startMaxLength || 2048; // 2Kb\r\n this.mtproto = options.mtproto || false;\r\n this.createBuffer();\r\n }\r\n createBuffer() {\r\n this.buffer = new ArrayBuffer(this.maxLength);\r\n this.intView = new Int32Array(this.buffer);\r\n this.byteView = new Uint8Array(this.buffer);\r\n }\r\n getArray() {\r\n let resultBuffer = new ArrayBuffer(this.offset);\r\n let resultArray = new Int32Array(resultBuffer);\r\n resultArray.set(this.intView.subarray(0, this.offset / 4));\r\n return resultArray;\r\n }\r\n getBuffer() {\r\n return this.getArray().buffer;\r\n }\r\n getBytes(typed) {\r\n if (typed) {\r\n let resultBuffer = new ArrayBuffer(this.offset);\r\n let resultArray = new Uint8Array(resultBuffer);\r\n resultArray.set(this.byteView.subarray(0, this.offset));\r\n return resultArray;\r\n }\r\n let bytes = [];\r\n for (var i = 0; i < this.offset; i++) {\r\n bytes.push(this.byteView[i]);\r\n }\r\n return bytes;\r\n }\r\n checkLength(needBytes) {\r\n if (this.offset + needBytes < this.maxLength) {\r\n return;\r\n }\r\n ///console.trace('Increase buffer', this.offset, needBytes, this.maxLength);\r\n this.maxLength = Math.ceil(Math.max(this.maxLength * 2, this.offset + needBytes + 16) / 4) * 4;\r\n var previousBuffer = this.buffer;\r\n var previousArray = new Int32Array(previousBuffer);\r\n this.createBuffer();\r\n new Int32Array(this.buffer).set(previousArray);\r\n }\r\n writeInt(i, field) {\r\n this.debug && console.log('>>>', i.toString(16), i, field);\r\n this.checkLength(4);\r\n this.intView[this.offset / 4] = i;\r\n this.offset += 4;\r\n }\r\n storeInt(i, field) {\r\n this.writeInt(i, (field || '') + ':int');\r\n }\r\n storeBool(i, field) {\r\n if (i) {\r\n this.writeInt(boolTrue, (field || '') + ':bool');\r\n }\r\n else {\r\n this.writeInt(boolFalse, (field || '') + ':bool');\r\n }\r\n }\r\n storeLongP(iHigh, iLow, field) {\r\n this.writeInt(iLow, (field || '') + ':long[low]');\r\n this.writeInt(iHigh, (field || '') + ':long[high]');\r\n }\r\n storeLong(sLong, field) {\r\n if (Array.isArray(sLong)) {\r\n if (sLong.length == 2) {\r\n return this.storeLongP(sLong[0], sLong[1], field);\r\n }\r\n else {\r\n return this.storeIntBytes(sLong, 64, field);\r\n }\r\n }\r\n if (typeof sLong != 'string') {\r\n sLong = sLong ? sLong.toString() : '0';\r\n }\r\n var divRem = bin_utils_1.bigStringInt(sLong).divideAndRemainder(bin_utils_1.bigint(0x100000000));\r\n this.writeInt(divRem[1].intValue(), (field || '') + ':long[low]');\r\n this.writeInt(divRem[0].intValue(), (field || '') + ':long[high]');\r\n }\r\n storeDouble(f, field) {\r\n var buffer = new ArrayBuffer(8);\r\n var intView = new Int32Array(buffer);\r\n var doubleView = new Float64Array(buffer);\r\n doubleView[0] = f;\r\n this.writeInt(intView[0], (field || '') + ':double[low]');\r\n this.writeInt(intView[1], (field || '') + ':double[high]');\r\n }\r\n storeString(s, field) {\r\n this.debug && console.log('>>>', s, (field || '') + ':string');\r\n if (s === undefined) {\r\n s = '';\r\n }\r\n var sUTF8 = unescape(encodeURIComponent(s));\r\n this.checkLength(sUTF8.length + 8);\r\n var len = sUTF8.length;\r\n if (len <= 253) {\r\n this.byteView[this.offset++] = len;\r\n }\r\n else {\r\n this.byteView[this.offset++] = 254;\r\n this.byteView[this.offset++] = len & 0xFF;\r\n this.byteView[this.offset++] = (len & 0xFF00) >> 8;\r\n this.byteView[this.offset++] = (len & 0xFF0000) >> 16;\r\n }\r\n for (var i = 0; i < len; i++) {\r\n this.byteView[this.offset++] = sUTF8.charCodeAt(i);\r\n }\r\n // Padding\r\n while (this.offset % 4) {\r\n this.byteView[this.offset++] = 0;\r\n }\r\n }\r\n storeBytes(bytes, field) {\r\n if (bytes instanceof ArrayBuffer) {\r\n bytes = new Uint8Array(bytes);\r\n }\r\n else if (bytes === undefined) {\r\n bytes = [];\r\n }\r\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || '') + ':bytes');\r\n // if uint8array were json.stringified, then will be: {'0': 123, '1': 123}\r\n var len = bytes.byteLength || bytes.length;\r\n this.checkLength(len + 8);\r\n if (len <= 253) {\r\n this.byteView[this.offset++] = len;\r\n }\r\n else {\r\n this.byteView[this.offset++] = 254;\r\n this.byteView[this.offset++] = len & 0xFF;\r\n this.byteView[this.offset++] = (len & 0xFF00) >> 8;\r\n this.byteView[this.offset++] = (len & 0xFF0000) >> 16;\r\n }\r\n this.byteView.set(bytes, this.offset);\r\n this.offset += len;\r\n // Padding\r\n while (this.offset % 4) {\r\n this.byteView[this.offset++] = 0;\r\n }\r\n }\r\n storeIntBytes(bytes, bits, field) {\r\n if (bytes instanceof ArrayBuffer) {\r\n bytes = new Uint8Array(bytes);\r\n }\r\n var len = bytes.length;\r\n if ((bits % 32) || (len * 8) != bits) {\r\n throw new Error('Invalid bits: ' + bits + ', ' + bytes.length);\r\n }\r\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || '') + ':int' + bits);\r\n this.checkLength(len);\r\n this.byteView.set(bytes, this.offset);\r\n this.offset += len;\r\n }\r\n storeRawBytes(bytes, field) {\r\n if (bytes instanceof ArrayBuffer) {\r\n bytes = new Uint8Array(bytes);\r\n }\r\n var len = bytes.length;\r\n this.debug && console.log('>>>', bin_utils_1.bytesToHex(bytes), (field || ''));\r\n this.checkLength(len);\r\n this.byteView.set(bytes, this.offset);\r\n this.offset += len;\r\n }\r\n storeMethod(methodName, params) {\r\n var schema = this.mtproto ? schema_1.default.MTProto : schema_1.default.API;\r\n var methodData = false, i;\r\n for (i = 0; i < schema.methods.length; i++) {\r\n if (schema.methods[i].method == methodName) {\r\n methodData = schema.methods[i];\r\n break;\r\n }\r\n }\r\n if (!methodData) {\r\n throw new Error('No method ' + methodName + ' found');\r\n }\r\n this.storeInt(methodData.id, methodName + '[id]');\r\n var param, type;\r\n var i, condType;\r\n var fieldBit;\r\n var len = methodData.params.length;\r\n //console.log('storeMethod', len, methodData);\r\n for (i = 0; i < len; i++) {\r\n param = methodData.params[i];\r\n type = param.type;\r\n if (type.indexOf('?') !== -1) {\r\n condType = type.split('?');\r\n fieldBit = condType[0].split('.');\r\n if (!(params[fieldBit[0]] & (1 << fieldBit[1]))) {\r\n continue;\r\n }\r\n type = condType[1];\r\n }\r\n this.storeObject(params[param.name], type, methodName + '[' + param.name + ']');\r\n }\r\n return methodData.type;\r\n }\r\n storeObject(obj, type, field) {\r\n //console.log('storeObject', obj, type, field, this.offset, this.getBytes(true).hex);\r\n switch (type) {\r\n case '#':\r\n case 'int':\r\n return this.storeInt(obj, field);\r\n case 'long':\r\n return this.storeLong(obj, field);\r\n case 'int128':\r\n return this.storeIntBytes(obj, 128, field);\r\n case 'int256':\r\n return this.storeIntBytes(obj, 256, field);\r\n case 'int512':\r\n return this.storeIntBytes(obj, 512, field);\r\n case 'string':\r\n return this.storeString(obj, field);\r\n case 'bytes':\r\n return this.storeBytes(obj, field);\r\n case 'double':\r\n return this.storeDouble(obj, field);\r\n case 'Bool':\r\n return this.storeBool(obj, field);\r\n case 'true':\r\n return;\r\n }\r\n if (Array.isArray(obj)) {\r\n if (type.substr(0, 6) == 'Vector') {\r\n this.writeInt(vector, field + '[id]');\r\n }\r\n else if (type.substr(0, 6) != 'vector') {\r\n throw new Error('Invalid vector type ' + type);\r\n }\r\n var itemType = type.substr(7, type.length - 8); // for \"Vector<itemType>\"\r\n this.writeInt(obj.length, field + '[count]');\r\n for (var i = 0; i < obj.length; i++) {\r\n this.storeObject(obj[i], itemType, field + '[' + i + ']');\r\n }\r\n return true;\r\n }\r\n else if (type.substr(0, 6).toLowerCase() == 'vector') {\r\n throw new Error('Invalid vector object');\r\n }\r\n if (!bin_utils_1.isObject(obj)) {\r\n throw new Error('Invalid object for type ' + type);\r\n }\r\n var schema = this.mtproto ? schema_1.default.MTProto : schema_1.default.API;\r\n var predicate = obj['_'];\r\n var isBare = false;\r\n var constructorData = false;\r\n if (isBare = (type.charAt(0) == '%')) {\r\n type = type.substr(1);\r\n }\r\n for (i = 0; i < schema.constructors.length; i++) {\r\n if (schema.constructors[i].predicate == predicate) {\r\n constructorData = schema.constructors[i];\r\n break;\r\n }\r\n }\r\n if (!constructorData) {\r\n throw new Error('No predicate ' + predicate + ' found');\r\n }\r\n if (predicate == type) {\r\n isBare = true;\r\n }\r\n if (!isBare) {\r\n this.writeInt(constructorData.id, field + '[' + predicate + '][id]');\r\n }\r\n var param, type;\r\n var condType;\r\n var fieldBit;\r\n var len = constructorData.params.length;\r\n //console.log('storeObject', len, constructorData);\r\n for (i = 0; i < len; i++) {\r\n param = constructorData.params[i];\r\n type = param.type;\r\n //console.log('storeObject', param, type);\r\n if (type.indexOf('?') !== -1) {\r\n condType = type.split('?');\r\n fieldBit = condType[0].split('.');\r\n //console.log('storeObject fieldBit', fieldBit, obj[fieldBit[0]]);\r\n if (!(obj[fieldBit[0]] & (1 << +fieldBit[1]))) {\r\n continue;\r\n }\r\n type = condType[1];\r\n }\r\n //console.log('storeObject', param, type);\r\n this.storeObject(obj[param.name], type, field + '[' + predicate + '][' + param.name + ']');\r\n }\r\n return constructorData.type;\r\n }\r\n}\r\nexports.TLSerialization = TLSerialization;\r\nclass TLDeserialization {\r\n constructor(buffer, options = {}) {\r\n this.offset = 0; // in bytes\r\n // this.debug = \r\n this.mtproto = false;\r\n //buffer = addPadding(buffer, 4, true); // fix 21.01.2020 for wss\r\n if (buffer instanceof ArrayBuffer) {\r\n this.buffer = buffer;\r\n this.byteView = new Uint8Array(this.buffer);\r\n }\r\n else {\r\n this.buffer = buffer.buffer;\r\n this.byteView = buffer;\r\n }\r\n //console.log(\"TCL: TLDeserialization -> constructor -> buffer\", buffer, this.byteView, this.byteView.hex);\r\n /* this.buffer = buffer;\r\n //this.intView = new Uint32Array(this.buffer);\r\n this.byteView = new Uint8Array(this.buffer); */\r\n //console.log(this.intView);\r\n this.override = 'override' in options ? options.override : {};\r\n this.mtproto = 'mtproto' in options ? options.mtproto : false;\r\n this.debug = options.debug !== undefined ? options.debug : /* Modes.debug */ false;\r\n }\r\n readInt(field) {\r\n //if(this.offset >= this.intView.length * 4) {\r\n if ((this.byteView.length - this.offset) < 4) {\r\n console.error(this.byteView, this.offset);\r\n throw new Error('Nothing to fetch: ' + field);\r\n }\r\n //var i = this.intView[this.offset / 4];\r\n let i = new Uint32Array(this.byteView.buffer.slice(this.offset, this.offset + 4))[0];\r\n this.debug /* || field.includes('[dialog][read_outbox_max_id]') */\r\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);\r\n this.offset += 4;\r\n return i;\r\n }\r\n fetchInt(field) {\r\n return this.readInt((field || '') + ':int');\r\n }\r\n fetchDouble(field) {\r\n var buffer = new ArrayBuffer(8);\r\n var intView = new Int32Array(buffer);\r\n var doubleView = new Float64Array(buffer);\r\n intView[0] = this.readInt((field || '') + ':double[low]'),\r\n intView[1] = this.readInt((field || '') + ':double[high]');\r\n return doubleView[0];\r\n }\r\n fetchLong(field) {\r\n var iLow = this.readInt((field || '') + ':long[low]');\r\n var iHigh = this.readInt((field || '') + ':long[high]');\r\n var longDec = bin_utils_1.bigint(iHigh).shiftLeft(32).add(bin_utils_1.bigint(iLow)).toString();\r\n return longDec;\r\n }\r\n fetchBool(field) {\r\n var i = this.readInt((field || '') + ':bool');\r\n if (i == boolTrue) {\r\n return true;\r\n }\r\n else if (i == boolFalse) {\r\n return false;\r\n }\r\n this.offset -= 4;\r\n return this.fetchObject('Object', field);\r\n }\r\n fetchString(field) {\r\n var len = this.byteView[this.offset++];\r\n if (len == 254) {\r\n var len = this.byteView[this.offset++] |\r\n (this.byteView[this.offset++] << 8) |\r\n (this.byteView[this.offset++] << 16);\r\n }\r\n var sUTF8 = '';\r\n for (var i = 0; i < len; i++) {\r\n sUTF8 += String.fromCharCode(this.byteView[this.offset++]);\r\n }\r\n // Padding\r\n while (this.offset % 4) {\r\n this.offset++;\r\n }\r\n try {\r\n var s = decodeURIComponent(escape(sUTF8));\r\n }\r\n catch (e) {\r\n var s = sUTF8;\r\n }\r\n this.debug && console.log('<<<', s, (field || '') + ':string');\r\n return s;\r\n }\r\n fetchBytes(field) {\r\n var len = this.byteView[this.offset++];\r\n if (len == 254) {\r\n len = this.byteView[this.offset++] |\r\n (this.byteView[this.offset++] << 8) |\r\n (this.byteView[this.offset++] << 16);\r\n }\r\n var bytes = this.byteView.subarray(this.offset, this.offset + len);\r\n this.offset += len;\r\n // Padding\r\n while (this.offset % 4) {\r\n this.offset++;\r\n }\r\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || '') + ':bytes');\r\n return bytes;\r\n }\r\n fetchIntBytes(bits, typed, field) {\r\n if (bits % 32) {\r\n throw new Error('Invalid bits: ' + bits);\r\n }\r\n var len = bits / 8;\r\n if (typed) {\r\n var result = this.byteView.subarray(this.offset, this.offset + len);\r\n this.offset += len;\r\n return result;\r\n }\r\n var bytes = [];\r\n for (var i = 0; i < len; i++) {\r\n bytes.push(this.byteView[this.offset++]);\r\n }\r\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || '') + ':int' + bits);\r\n return bytes;\r\n }\r\n fetchRawBytes(len, typed, field) {\r\n if (len === false) {\r\n len = this.readInt((field || '') + '_length');\r\n if (len > this.byteView.byteLength) {\r\n throw new Error('Invalid raw bytes length: ' + len + ', buffer len: ' + this.byteView.byteLength);\r\n }\r\n }\r\n if (typed) {\r\n let bytes = new Uint8Array(len);\r\n bytes.set(this.byteView.subarray(this.offset, this.offset + len));\r\n this.offset += len;\r\n return bytes;\r\n }\r\n var bytes = [];\r\n for (var i = 0; i < len; i++) {\r\n bytes.push(this.byteView[this.offset++]);\r\n }\r\n this.debug && console.log('<<<', bin_utils_1.bytesToHex(bytes), (field || ''));\r\n return bytes;\r\n }\r\n fetchObject(type, field) {\r\n switch (type) {\r\n case '#':\r\n case 'int':\r\n return this.fetchInt(field);\r\n case 'long':\r\n return this.fetchLong(field);\r\n case 'int128':\r\n return this.fetchIntBytes(128, false, field);\r\n case 'int256':\r\n return this.fetchIntBytes(256, false, field);\r\n case 'int512':\r\n return this.fetchIntBytes(512, false, field);\r\n case 'string':\r\n return this.fetchString(field);\r\n case 'bytes':\r\n return this.fetchBytes(field);\r\n case 'double':\r\n return this.fetchDouble(field);\r\n case 'Bool':\r\n return this.fetchBool(field);\r\n case 'true':\r\n return true;\r\n }\r\n field = field || type || 'Object';\r\n if (type.substr(0, 6) == 'Vector' || type.substr(0, 6) == 'vector') {\r\n if (type.charAt(0) == 'V') {\r\n var constructor = this.readInt(field + '[id]');\r\n var constructorCmp = constructor;\r\n if (constructorCmp == gzipPacked) { // Gzip packed\r\n var compressed = this.fetchBytes(field + '[packed_string]');\r\n var uncompressed = crypto_utils_1.gzipUncompress(compressed);\r\n var newDeserializer = new TLDeserialization(uncompressed);\r\n return newDeserializer.fetchObject(type, field);\r\n }\r\n if (constructorCmp != vector) {\r\n throw new Error('Invalid vector constructor ' + constructor);\r\n }\r\n }\r\n var len = this.readInt(field + '[count]');\r\n var result = [];\r\n if (len > 0) {\r\n var itemType = type.substr(7, type.length - 8); // for \"Vector<itemType>\"\r\n for (var i = 0; i < len; i++) {\r\n result.push(this.fetchObject(itemType, field + '[' + i + ']'));\r\n }\r\n }\r\n return result;\r\n }\r\n var schema = this.mtproto ? schema_1.default.MTProto : schema_1.default.API;\r\n var predicate = false;\r\n var constructorData = false;\r\n if (type.charAt(0) == '%') {\r\n var checkType = type.substr(1);\r\n for (var i = 0; i < schema.constructors.length; i++) {\r\n if (schema.constructors[i].type == checkType) {\r\n constructorData = schema.constructors[i];\r\n break;\r\n }\r\n }\r\n if (!constructorData) {\r\n throw new Error('Constructor not found for type: ' + type);\r\n }\r\n }\r\n else if (type.charAt(0) >= 97 && type.charAt(0) <= 122) {\r\n for (var i = 0; i < schema.constructors.length; i++) {\r\n if (schema.constructors[i].predicate == type) {\r\n constructorData = schema.constructors[i];\r\n break;\r\n }\r\n }\r\n if (!constructorData) {\r\n throw new Error('Constructor not found for predicate: ' + type);\r\n }\r\n }\r\n else {\r\n var constructor = this.readInt(field + '[id]');\r\n var constructorCmp = constructor;\r\n if (constructorCmp == gzipPacked) { // Gzip packed\r\n var compressed = this.fetchBytes(field + '[packed_string]');\r\n var uncompressed = crypto_utils_1.gzipUncompress(compressed);\r\n var newDeserializer = new TLDeserialization(uncompressed);\r\n return newDeserializer.fetchObject(type, field);\r\n }\r\n var index = schema.constructorsIndex;\r\n if (!index) {\r\n schema.constructorsIndex = index = {};\r\n for (var i = 0; i < schema.constructors.length; i++) {\r\n index[schema.constructors[i].id] = i;\r\n }\r\n }\r\n var i = index[constructorCmp];\r\n if (i) {\r\n constructorData = schema.constructors[i];\r\n }\r\n var fallback = false;\r\n if (!constructorData && this.mtproto) {\r\n var schemaFallback = schema_1.default.API;\r\n for (i = 0; i < schemaFallback.constructors.length; i++) {\r\n if (+schemaFallback.constructors[i].id == constructorCmp) {\r\n constructorData = schemaFallback.constructors[i];\r\n delete this.mtproto;\r\n fallback = true;\r\n break;\r\n }\r\n }\r\n }\r\n if (!constructorData) {\r\n throw new Error('Constructor not found: ' + constructor + ' ' + this.fetchInt() + ' ' + this.fetchInt() + ' ' + field);\r\n }\r\n }\r\n predicate = constructorData.predicate;\r\n var result = { '_': predicate };\r\n var overrideKey = (this.mtproto ? 'mt_' : '') + predicate;\r\n var self = this;\r\n if (this.override[overrideKey]) {\r\n this.override[overrideKey].apply(this, [result, field + '[' + predicate + ']']);\r\n }\r\n else {\r\n var i, param;\r\n var type, isCond;\r\n var condType, fieldBit;\r\n var value;\r\n var len = constructorData.params.length;\r\n for (i = 0; i < len; i++) {\r\n param = constructorData.params[i];\r\n type = param.type;\r\n if (type == '#' && result.pFlags === undefined) {\r\n result.pFlags = {};\r\n }\r\n if (isCond = (type.indexOf('?') !== -1)) {\r\n condType = type.split('?');\r\n fieldBit = condType[0].split('.');\r\n if (!(result[fieldBit[0]] & (1 << fieldBit[1]))) {\r\n //console.log('fetchObject bad', constructorData, result[fieldBit[0]], fieldBit);\r\n continue;\r\n }\r\n //console.log('fetchObject good', constructorData, result[fieldBit[0]], fieldBit);\r\n type = condType[1];\r\n }\r\n value = self.fetchObject(type, field + '[' + predicate + '][' + param.name + ']');\r\n if (isCond && type === 'true') {\r\n result.pFlags[param.name] = value;\r\n }\r\n else {\r\n /* if(param.name == 'read_outbox_max_id') {\r\n console.log(result, param.name, value, field + '[' + predicate + '][' + param.name + ']');\r\n } */\r\n result[param.name] = value;\r\n }\r\n }\r\n }\r\n if (fallback) {\r\n this.mtproto = true;\r\n }\r\n return result;\r\n }\r\n getOffset() {\r\n return this.offset;\r\n }\r\n fetchEnd() {\r\n if (this.offset != this.byteView.length) {\r\n throw new Error('Fetch end with non-empty buffer');\r\n }\r\n return true;\r\n }\r\n}\r\nexports.TLDeserialization = TLDeserialization;\r\n"
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"name": "./src/lib/mtproto/dcConfigurator.ts",
"index": 19,
"index2": 20,
"size": 3145,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./dcConfigurator",
"loc": "22:41-68"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./dcConfigurator",
"loc": "24:41-68"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "./dcConfigurator",
"loc": "17:41-68"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.DcConfigurator = void 0;\r\nconst websocket_1 = __importDefault(require(\"./transports/websocket\"));\r\nconst http_1 = __importDefault(require(\"./transports/http\"));\r\nconst mtproto_config_1 = require(\"./mtproto_config\");\r\nclass DcConfigurator {\r\n constructor() {\r\n this.sslSubdomains = ['pluto', 'venus', 'aurora', 'vesta', 'flora'];\r\n this.dcOptions = mtproto_config_1.Modes.test\r\n ? [\r\n { id: 1, host: '149.154.175.10', port: 80 },\r\n { id: 2, host: '149.154.167.40', port: 80 },\r\n { id: 3, host: '149.154.175.117', port: 80 }\r\n ]\r\n : [\r\n { id: 1, host: '149.154.175.50', port: 80 },\r\n { id: 2, host: '149.154.167.50', port: 80 },\r\n { id: 3, host: '149.154.175.100', port: 80 },\r\n { id: 4, host: '149.154.167.91', port: 80 },\r\n { id: 5, host: '149.154.171.5', port: 80 }\r\n ];\r\n this.chosenServers = {\r\n websocket: {},\r\n https: {},\r\n http: {}\r\n };\r\n this.chosenUploadServers = {\r\n websocket: {},\r\n https: {},\r\n http: {}\r\n };\r\n }\r\n chooseServer(dcID, upload, transport = 'websocket') {\r\n let servers = upload && (transport != 'websocket' || mtproto_config_1.Modes.multipleConnections)\r\n ? this.chosenUploadServers[transport]\r\n : this.chosenServers[transport];\r\n if (!(dcID in servers)) {\r\n let chosenServer = '';\r\n if (transport == 'websocket') {\r\n let subdomain = this.sslSubdomains[dcID - 1];\r\n let path = mtproto_config_1.Modes.test ? 'apiws_test' : 'apiws';\r\n chosenServer = 'wss://' + subdomain + '.web.telegram.org/' + path;\r\n return servers[dcID] = new websocket_1.default(dcID, chosenServer);\r\n }\r\n if (mtproto_config_1.Modes.ssl || !mtproto_config_1.Modes.http || transport == 'https') {\r\n let subdomain = this.sslSubdomains[dcID - 1] + (upload ? '-1' : '');\r\n let path = mtproto_config_1.Modes.test ? 'apiw_test1' : 'apiw1';\r\n chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path;\r\n return servers[dcID] = new http_1.default(dcID, chosenServer);\r\n }\r\n for (let dcOption of this.dcOptions) {\r\n if (dcOption.id == dcID) {\r\n chosenServer = 'http://' + dcOption.host + (dcOption.port != 80 ? ':' + dcOption.port : '') + '/apiw1';\r\n return servers[dcID] = new http_1.default(dcID, chosenServer);\r\n }\r\n }\r\n console.error('No chosenServer!', dcID);\r\n return null;\r\n }\r\n return servers[dcID];\r\n }\r\n}\r\nexports.DcConfigurator = DcConfigurator;\r\nexports.default = new DcConfigurator();\r\n"
},
{
"id": 9,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\polyfill.ts",
"name": "./src/lib/polyfill.ts",
"index": 23,
"index2": 17,
"size": 3188,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "24:19-41"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "../polyfill",
"loc": "26:19-41"
},
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "../../polyfill",
"loc": "12:19-44"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.deferredPromise = exports.logger = exports.secureRandom = void 0;\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\nUint8Array.prototype.toJSON = function () {\r\n return [...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": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\http.ts",
"name": "./src/lib/mtproto/transports/http.ts",
"index": 24,
"index2": 19,
"size": 1204,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "23:31-59"
},
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"module": "./src/lib/mtproto/dcConfigurator.ts",
"moduleName": "./src/lib/mtproto/dcConfigurator.ts",
"type": "cjs require",
"userRequest": "./transports/http",
"loc": "8:31-59"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./transports/http",
"loc": "25:31-59"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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 transport_1 = __importDefault(require(\"./transport\"));\r\nconst bin_utils_1 = require(\"../../bin_utils\");\r\nclass HTTP extends transport_1.default {\r\n constructor(dcID, url) {\r\n super(dcID, url);\r\n this.send = (data) => {\r\n return fetch(this.url, { method: 'POST', body: data }).then(response => {\r\n //console.log('http response', response/* , response.arrayBuffer() */);\r\n if (response.status != 200) {\r\n response.arrayBuffer().then(buffer => {\r\n console.log('not 200', new TextDecoder(\"utf-8\").decode(new Uint8Array(bin_utils_1.bytesFromArrayBuffer(buffer))));\r\n });\r\n throw response;\r\n }\r\n return response.arrayBuffer().then(buffer => {\r\n return new Uint8Array(bin_utils_1.bytesFromArrayBuffer(buffer));\r\n });\r\n });\r\n };\r\n }\r\n}\r\nexports.default = HTTP;\r\n"
},
{
"id": 11,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\schema.ts",
"name": "./src/lib/mtproto/schema.ts",
"index": 9,
"index2": 4,
"size": 258381,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"issuerId": 18,
"issuerName": "./src/lib/mtproto/networker.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"name": "./src/lib/mtproto/networkerFactory.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 18,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"name": "./src/lib/mtproto/networker.ts",
"profile": {
"factory": 12,
"building": 482,
"dependencies": 9
}
}
],
"profile": {
"factory": 13,
"building": 504
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\tl_utils.ts",
"module": "./src/lib/mtproto/tl_utils.ts",
"moduleName": "./src/lib/mtproto/tl_utils.ts",
"type": "cjs require",
"userRequest": "./schema",
"loc": "14:33-52"
},
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./schema",
"loc": "21:33-52"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.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<long>\" }], \"type\": \"ResPQ\" }, { \"id\": 2211011308, \"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\": 2851430293, \"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\": 3504867164, \"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\": 3045658042, \"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\": 2795351554, \"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\": 4082920705, \"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\": 3447252358, \"predicate\": \"rpc_answer_dropped_running\", \"params\": [], \"type\": \"RpcDropAnswer\" }, { \"id\": 2755319991, \"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\": 2924480661, \"predicate\": \"future_salts\", \"params\": [{ \"name\": \"req_msg_id\", \"type\": \"long\" }, { \"name\": \"now\", \"type\": \"int\" }, { \"name\": \"salts\", \"type\": \"vector<future_salt>\" }], \"type\": \"FutureSalts\" }, { \"id\": \"880243653\", \"predicate\": \"pong\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"long\" }, { \"name\": \"ping_id\", \"type\": \"long\" }], \"type\": \"Pong\" }, { \"id\": 2663516424, \"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\": 3764405938, \"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<long>\" }], \"type\": \"MsgsAck\" }, { \"id\": 2817521681, \"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\": 3987424379, \"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<long>\" }], \"type\": \"MsgResendReq\" }, { \"id\": 2249243371, \"predicate\": \"msg_resend_ans_req\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector<long>\" }], \"type\": \"MsgResendReq\" }, { \"id\": 3664378706, \"predicate\": \"msgs_state_req\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector<long>\" }], \"type\": \"MsgsStateReq\" }, { \"id\": \"81704317\", \"predicate\": \"msgs_state_info\", \"params\": [{ \"name\": \"req_msg_id\", \"type\": \"long\" }, { \"name\": \"info\", \"type\": \"bytes\" }], \"type\": \"MsgsStateInfo\" }, { \"id\": 2361446705, \"predicate\": \"msgs_all_info\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector<long>\" }, { \"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\": 2157819615, \"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\": 4133544404, \"predicate\": \"destroy_auth_key_ok\", \"params\": [], \"type\": \"DestroyAuthKeyRes\" }, { \"id\": \"178201177\", \"predicate\": \"destroy_auth_key_none\", \"params\": [], \"type\": \"DestroyAuthKeyRes\" }, { \"id\": 3926956819, \"predicate\": \"destroy_auth_key_fail\", \"params\": [], \"type\": \"DestroyAuthKeyRes\" }, { \"id\": 3793765884, \"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\": 3195965169, \"method\": \"req_pq_multi\", \"params\": [{ \"name\": \"nonce\", \"type\": \"int128\" }], \"type\": \"ResPQ\" }, { \"id\": 3608339646, \"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\": 4110704415, \"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\": 3105996036, \"method\": \"get_future_salts\", \"params\": [{ \"name\": \"num\", \"type\": \"int\" }], \"type\": \"FutureSalts\" }, { \"id\": \"2059302892\", \"method\": \"ping\", \"params\": [{ \"name\": \"ping_id\", \"type\": \"long\" }], \"type\": \"Pong\" }, { \"id\": 4081220492, \"method\": \"ping_delay_disconnect\", \"params\": [{ \"name\": \"ping_id\", \"type\": \"long\" }, { \"name\": \"disconnect_delay\", \"type\": \"int\" }], \"type\": \"Pong\" }, { \"id\": 2459514271, \"method\": \"http_wait\", \"params\": [{ \"name\": \"max_delay\", \"type\": \"int\" }, { \"name\": \"wait_after\", \"type\": \"int\" }, { \"name\": \"max_wait\", \"type\": \"int\" }], \"type\": \"HttpWait\" }, { \"id\": 3510849888, \"method\": \"destroy_auth_key\", \"params\": [], \"type\": \"DestroyAuthKeyRes\" }, { \"id\": 3880853798, \"method\": \"destroy_session\", \"params\": [{ \"name\": \"session_id\", \"type\": \"long\" }], \"type\": \"DestroySessionRes\" }] }, \"API\": { \"constructors\": [{ \"id\": 3162085175, \"predicate\": \"boolFalse\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 2574415285, \"predicate\": \"boolTrue\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 1072550713, \"predicate\": \"true\", \"params\": [], \"type\": \"True\" }, { \"id\": 481674261, \"predicate\": \"vector\", \"params\": [], \"type\": \"Vector t\" }, { \"id\": 3300522427, \"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\": 2072935910, \"predicate\": \"inputPeerUser\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputPeer\" }, { \"id\": 548253432, \"predicate\": \"inputPeerChannel\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputPeer\" }, { \"id\": 398123750, \"predicate\": \"inputPeerUserFromMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"InputPeer\" }, { \"id\": 2627073979, \"predicate\": \"inputPeerChannelFromMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"channel_id\", \"type\": \"int\" }], \"type\": \"InputPeer\" }, { \"id\": 3112732367, \"predicate\": \"inputUserEmpty\", \"params\": [], \"type\": \"InputUser\" }, { \"id\": 4156666175, \"predicate\": \"inputUserSelf\", \"params\": [], \"type\": \"InputUser\" }, { \"id\": 3626575894, \"predicate\": \"inputUser\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputUser\" }, { \"id\": 756118935, \"predicate\": \"inputUserFromMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"InputUser\" }, { \"id\": 4086478836, \"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\": 4113560191, \"predicate\": \"inputFile\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"parts\", \"type\": \"int\" }, { \"name\": \"name\", \"type\": \"string\" }, { \"name\": \"md5_checksum\", \"type\": \"string\" }], \"type\": \"InputFile\" }, { \"id\": 4199484341, \"predicate\": \"inputFileBig\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"parts\", \"type\": \"int\" }, { \"name\": \"name\", \"type\": \"string\" }], \"type\": \"InputFile\" }, { \"id\": 2523198847, \"predicate\": \"inputMediaEmpty\", \"params\": [], \"type\": \"InputMedia\" }, { \"id\": 505969924, \"predicate\": \"inputMediaUploadedPhoto\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"file\", \"type\": \"InputFile\" }, { \"name\": \"stickers\", \"type\": \"flags.0?Vector<InputDocument>\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.1?int\" }], \"type\": \"InputMedia\" }, { \"id\": 3015312949, \"predicate\": \"inputMediaPhoto\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"InputPhoto\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.0?int\" }], \"type\": \"InputMedia\" }, { \"id\": 4190388548, \"predicate\": \"inputMediaGeoPoint\", \"params\": [{ \"name\": \"geo_point\", \"type\": \"InputGeoPoint\" }], \"type\": \"InputMedia\" }, { \"id\": 4171988475, \"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\": 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<DocumentAttribute>\" }, { \"name\": \"stickers\", \"type\": \"flags.0?Vector<InputDocument>\" }, { \"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\": 3242007569, \"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\": 1212395773, \"predicate\": \"inputMediaGifExternal\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"q\", \"type\": \"string\" }], \"type\": \"InputMedia\" }, { \"id\": 3854302746, \"predicate\": \"inputMediaPhotoExternal\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.0?int\" }], \"type\": \"InputMedia\" }, { \"id\": 4216511641, \"predicate\": \"inputMediaDocumentExternal\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.0?int\" }], \"type\": \"InputMedia\" }, { \"id\": 3544138739, \"predicate\": \"inputMediaGame\", \"params\": [{ \"name\": \"id\", \"type\": \"InputGame\" }], \"type\": \"InputMedia\" }, { \"id\": 4108359363, \"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\": 3461251837, \"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\": 261416433, \"predicate\": \"inputMediaPoll\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"poll\", \"type\": \"Poll\" }, { \"name\": \"correct_answers\", \"type\": \"flags.0?Vector<bytes>\" }, { \"name\": \"solution\", \"type\": \"flags.1?string\" }, { \"name\": \"solution_entities\", \"type\": \"flags.1?Vector<MessageEntity>\" }], \"type\": \"InputMedia\" }, { \"id\": 3866083195, \"predicate\": \"inputMediaDice\", \"params\": [{ \"name\": \"emoticon\", \"type\": \"string\" }], \"type\": \"InputMedia\" }, { \"id\": 480546647, \"predicate\": \"inputChatPhotoEmpty\", \"params\": [], \"type\": \"InputChatPhoto\" }, { \"id\": 2457621940, \"predicate\": \"inputChatUploadedPhoto\", \"params\": [{ \"name\": \"file\", \"type\": \"InputFile\" }], \"type\": \"InputChatPhoto\" }, { \"id\": 2303962423, \"predicate\": \"inputChatPhoto\", \"params\": [{ \"name\": \"id\", \"type\": \"InputPhoto\" }], \"type\": \"InputChatPhoto\" }, { \"id\": 3837862870, \"predicate\": \"inputGeoPointEmpty\", \"params\": [], \"type\": \"InputGeoPoint\" }, { \"id\": 4088900809, \"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\": 3755650017, \"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\": 4112735573, \"predicate\": \"inputEncryptedFileLocation\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputFileLocation\" }, { \"id\": 3134223748, \"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\": 3418877480, \"predicate\": \"inputSecureFileLocation\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputFileLocation\" }, { \"id\": 700340377, \"predicate\": \"inputTakeoutFileLocation\", \"params\": [], \"type\": \"InputFileLocation\" }, { \"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\": 3627312883, \"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\": 2645671021, \"predicate\": \"peerUser\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"Peer\" }, { \"id\": 3134252475, \"predicate\": \"peerChat\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"Peer\" }, { \"id\": 3185435954, \"predicate\": \"peerChannel\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }], \"type\": \"Peer\" }, { \"id\": 2861972229, \"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\": 3403786975, \"predicate\": \"storage.fileGif\", \"params\": [], \"type\": \"storage.FileType\" }, { \"id\": 172975040, \"predicate\": \"storage.filePng\", \"params\": [], \"type\": \"storage.FileType\" }, { \"id\": 2921222285, \"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\": 3016663268, \"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\": 2474924225, \"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<RestrictionReason>\" }, { \"name\": \"bot_inline_placeholder\", \"type\": \"flags.19?string\" }, { \"name\": \"lang_code\", \"type\": \"flags.22?string\" }], \"type\": \"User\" }, { \"id\": 1326562017, \"predicate\": \"userProfilePhotoEmpty\", \"params\": [], \"type\": \"UserProfilePhoto\" }, { \"id\": 3973537164, \"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\": 3988339017, \"predicate\": \"userStatusOnline\", \"params\": [{ \"name\": \"expires\", \"type\": \"int\" }], \"type\": \"UserStatus\" }, { \"id\": 9203775, \"predicate\": \"userStatusOffline\", \"params\": [{ \"name\": \"was_online\", \"type\": \"int\" }], \"type\": \"UserStatus\" }, { \"id\": 3798942449, \"predicate\": \"userStatusRecently\", \"params\": [], \"type\": \"UserStatus\" }, { \"id\": 129960444, \"predicate\": \"userStatusLastWeek\", \"params\": [], \"type\": \"UserStatus\" }, { \"id\": 2011940674, \"predicate\": \"userStatusLastMonth\", \"params\": [], \"type\": \"UserStatus\" }, { \"id\": 2611140608, \"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\": 3541734942, \"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<RestrictionReason>\" }, { \"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\": 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<BotInfo>\" }, { \"name\": \"pinned_msg_id\", \"type\": \"flags.6?int\" }, { \"name\": \"folder_id\", \"type\": \"flags.11?int\" }], \"type\": \"ChatFull\" }, { \"id\": 4041631530, \"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<BotInfo>\" }, { \"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\": \"stats_dc\", \"type\": \"flags.12?int\" }, { \"name\": \"pts\", \"type\": \"int\" }], \"type\": \"ChatFull\" }, { \"id\": 3369552190, \"predicate\": \"chatParticipant\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"inviter_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"ChatParticipant\" }, { \"id\": 3658699658, \"predicate\": \"chatParticipantCreator\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"ChatParticipant\" }, { \"id\": 3805733942, \"predicate\": \"chatParticipantAdmin\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"inviter_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"ChatParticipant\" }, { \"id\": 4237298731, \"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<ChatParticipant>\" }, { \"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\": 2212879956, \"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<MessageEntity>\" }, { \"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<RestrictionReason>\" }], \"type\": \"Message\" }, { \"id\": 2652479990, \"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\": 3421653312, \"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\": 2676290718, \"predicate\": \"messageMediaUnsupported\", \"params\": [], \"type\": \"MessageMedia\" }, { \"id\": 2628808919, \"predicate\": \"messageMediaDocument\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"document\", \"type\": \"flags.0?Document\" }, { \"name\": \"ttl_seconds\", \"type\": \"flags.2?int\" }], \"type\": \"MessageMedia\" }, { \"id\": 2737690112, \"predicate\": \"messageMediaWebPage\", \"params\": [{ \"name\": \"webpage\", \"type\": \"WebPage\" }], \"type\": \"MessageMedia\" }, { \"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\": 4256272392, \"predicate\": \"messageMediaGame\", \"params\": [{ \"name\": \"game\", \"type\": \"Game\" }], \"type\": \"MessageMedia\" }, { \"id\": 2220168007, \"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\": 2084316681, \"predicate\": \"messageMediaGeoLive\", \"params\": [{ \"name\": \"geo\", \"type\": \"GeoPoint\" }, { \"name\": \"period\", \"type\": \"int\" }], \"type\": \"MessageMedia\" }, { \"id\": 1272375192, \"predicate\": \"messageMediaPoll\", \"params\": [{ \"name\": \"poll\", \"type\": \"Poll\" }, { \"name\": \"results\", \"type\": \"PollResults\" }], \"type\": \"MessageMedia\" }, { \"id\": 1065280907, \"predicate\": \"messageMediaDice\", \"params\": [{ \"name\": \"value\", \"type\": \"int\" }, { \"name\": \"emoticon\", \"type\": \"string\" }], \"type\": \"MessageMedia\" }, { \"id\": 3064919984, \"predicate\": \"messageActionEmpty\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 2791541658, \"predicate\": \"messageActionChatCreate\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"users\", \"type\": \"Vector<int>\" }], \"type\": \"MessageAction\" }, { \"id\": 3047280218, \"predicate\": \"messageActionChatEditTitle\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }], \"type\": \"MessageAction\" }, { \"id\": 2144015272, \"predicate\": \"messageActionChatEditPhoto\", \"params\": [{ \"name\": \"photo\", \"type\": \"Photo\" }], \"type\": \"MessageAction\" }, { \"id\": 2514746351, \"predicate\": \"messageActionChatDeletePhoto\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 1217033015, \"predicate\": \"messageActionChatAddUser\", \"params\": [{ \"name\": \"users\", \"type\": \"Vector<int>\" }], \"type\": \"MessageAction\" }, { \"id\": 2997787404, \"predicate\": \"messageActionChatDeleteUser\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 4171036136, \"predicate\": \"messageActionChatJoinedByLink\", \"params\": [{ \"name\": \"inviter_id\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 2513611922, \"predicate\": \"messageActionChannelCreate\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }], \"type\": \"MessageAction\" }, { \"id\": 1371385889, \"predicate\": \"messageActionChatMigrateTo\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 2958420718, \"predicate\": \"messageActionChannelMigrateFrom\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 2495428845, \"predicate\": \"messageActionPinMessage\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 2679813636, \"predicate\": \"messageActionHistoryClear\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 2460428406, \"predicate\": \"messageActionGameScore\", \"params\": [{ \"name\": \"game_id\", \"type\": \"long\" }, { \"name\": \"score\", \"type\": \"int\" }], \"type\": \"MessageAction\" }, { \"id\": 2402399015, \"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\": 1080663248, \"predicate\": \"messageActionPaymentSent\", \"params\": [{ \"name\": \"currency\", \"type\": \"string\" }, { \"name\": \"total_amount\", \"type\": \"long\" }], \"type\": \"MessageAction\" }, { \"id\": 2162236031, \"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\": 1200788123, \"predicate\": \"messageActionScreenshotTaken\", \"params\": [], \"type\": \"MessageAction\" }, { \"id\": 4209418070, \"predicate\": \"messageActionCustomAction\", \"params\": [{ \"name\": \"message\", \"type\": \"string\" }], \"type\": \"MessageAction\" }, { \"id\": 2884218878, \"predicate\": \"messageActionBotAllowed\", \"params\": [{ \"name\": \"domain\", \"type\": \"string\" }], \"type\": \"MessageAction\" }, { \"id\": 455635795, \"predicate\": \"messageActionSecureValuesSentMe\", \"params\": [{ \"name\": \"values\", \"type\": \"Vector<SecureValue>\" }, { \"name\": \"credentials\", \"type\": \"SecureCredentialsEncrypted\" }], \"type\": \"MessageAction\" }, { \"id\": 3646710100, \"predicate\": \"messageActionSecureValuesSent\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector<SecureValueType>\" }], \"type\": \"MessageAction\" }, { \"id\": 4092747638, \"predicate\": \"messageActionContactSignUp\", \"params\": [], \"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\": 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\": 590459437, \"predicate\": \"photoEmpty\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }], \"type\": \"Photo\" }, { \"id\": 3497329829, \"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<PhotoSize>\" }, { \"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\": 3920049402, \"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\": 3769678894, \"predicate\": \"photoStrippedSize\", \"params\": [{ \"name\": \"type\", \"type\": \"string\" }, { \"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\": 3439659286, \"predicate\": \"auth.authorization\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"tmp_sessions\", \"type\": \"flags.0?int\" }, { \"name\": \"user\", \"type\": \"User\" }], \"type\": \"auth.Authorization\" }, { \"id\": 1148485274, \"predicate\": \"auth.authorizationSignUpRequired\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"terms_of_service\", \"type\": \"flags.0?help.TermsOfService\" }], \"type\": \"auth.Authorization\" }, { \"id\": 3751189549, \"predicate\": \"auth.exportedAuthorization\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"auth.ExportedAuthorization\" }, { \"id\": 3099351820, \"predicate\": \"inputNotifyPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"InputNotifyPeer\" }, { \"id\": 423314455, \"predicate\": \"inputNotifyUsers\", \"params\": [], \"type\": \"InputNotifyPeer\" }, { \"id\": 1251338318, \"predicate\": \"inputNotifyChats\", \"params\": [], \"type\": \"InputNotifyPeer\" }, { \"id\": 2983951486, \"predicate\": \"inputNotifyBroadcasts\", \"params\": [], \"type\": \"InputNotifyPeer\" }, { \"id\": 2621249934, \"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\": 2941295904, \"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\": 2172921549, \"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\": 2755118061, \"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\": 2331249445, \"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\": 1490799288, \"predicate\": \"inputReportReasonSpam\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 505595789, \"predicate\": \"inputReportReasonViolence\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 777640226, \"predicate\": \"inputReportReasonPornography\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 2918469347, \"predicate\": \"inputReportReasonChildAbuse\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 3782503690, \"predicate\": \"inputReportReasonOther\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"ReportReason\" }, { \"id\": 2609510714, \"predicate\": \"inputReportReasonCopyright\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 3688169197, \"predicate\": \"inputReportReasonGeoIrrelevant\", \"params\": [], \"type\": \"ReportReason\" }, { \"id\": 3992026130, \"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\": 4178692500, \"predicate\": \"contact\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"mutual\", \"type\": \"Bool\" }], \"type\": \"Contact\" }, { \"id\": 3489825848, \"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\": 3546811489, \"predicate\": \"contactStatus\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"status\", \"type\": \"UserStatus\" }], \"type\": \"ContactStatus\" }, { \"id\": 3075189202, \"predicate\": \"contacts.contactsNotModified\", \"params\": [], \"type\": \"contacts.Contacts\" }, { \"id\": 3941105218, \"predicate\": \"contacts.contacts\", \"params\": [{ \"name\": \"contacts\", \"type\": \"Vector<Contact>\" }, { \"name\": \"saved_count\", \"type\": \"int\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.Contacts\" }, { \"id\": 2010127419, \"predicate\": \"contacts.importedContacts\", \"params\": [{ \"name\": \"imported\", \"type\": \"Vector<ImportedContact>\" }, { \"name\": \"popular_invites\", \"type\": \"Vector<PopularContact>\" }, { \"name\": \"retry_contacts\", \"type\": \"Vector<long>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.ImportedContacts\" }, { \"id\": 471043349, \"predicate\": \"contacts.blocked\", \"params\": [{ \"name\": \"blocked\", \"type\": \"Vector<ContactBlocked>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 2416444065, \"predicate\": \"contacts.blockedSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"blocked\", \"type\": \"Vector<ContactBlocked>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 364538944, \"predicate\": \"messages.dialogs\", \"params\": [{ \"name\": \"dialogs\", \"type\": \"Vector<Dialog>\" }, { \"name\": \"messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 1910543603, \"predicate\": \"messages.dialogsSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"dialogs\", \"type\": \"Vector<Dialog>\" }, { \"name\": \"messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 4041467286, \"predicate\": \"messages.dialogsNotModified\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }], \"type\": \"messages.Dialogs\" }, { \"id\": 2356252295, \"predicate\": \"messages.messages\", \"params\": [{ \"name\": \"messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Messages\" }, { \"id\": 3371027998, \"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<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Messages\" }, { \"id\": 2569416247, \"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<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.Messages\" }, { \"id\": 1951620897, \"predicate\": \"messages.messagesNotModified\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }], \"type\": \"messages.Messages\" }, { \"id\": 1694474197, \"predicate\": \"messages.chats\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<Chat>\" }], \"type\": \"messages.Chats\" }, { \"id\": 2631405892, \"predicate\": \"messages.chatsSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }], \"type\": \"messages.Chats\" }, { \"id\": 3856126364, \"predicate\": \"messages.chatFull\", \"params\": [{ \"name\": \"full_chat\", \"type\": \"ChatFull\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.ChatFull\" }, { \"id\": 3025955281, \"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\": 2517214492, \"predicate\": \"inputMessagesFilterPhotos\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 2680163941, \"predicate\": \"inputMessagesFilterVideo\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 1458172132, \"predicate\": \"inputMessagesFilterPhotoVideo\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 2665345416, \"predicate\": \"inputMessagesFilterDocument\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 2129714567, \"predicate\": \"inputMessagesFilterUrl\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 4291323271, \"predicate\": \"inputMessagesFilterGif\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 1358283666, \"predicate\": \"inputMessagesFilterVoice\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 928101534, \"predicate\": \"inputMessagesFilterMusic\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 975236280, \"predicate\": \"inputMessagesFilterChatPhotos\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 2160695144, \"predicate\": \"inputMessagesFilterPhoneCalls\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"missed\", \"type\": \"flags.0?true\" }], \"type\": \"MessagesFilter\" }, { \"id\": 2054952868, \"predicate\": \"inputMessagesFilterRoundVoice\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 3041516115, \"predicate\": \"inputMessagesFilterRoundVideo\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 3254314650, \"predicate\": \"inputMessagesFilterMyMentions\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 3875695885, \"predicate\": \"inputMessagesFilterGeo\", \"params\": [], \"type\": \"MessagesFilter\" }, { \"id\": 3764575107, \"predicate\": \"inputMessagesFilterContacts\", \"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\": 2718806245, \"predicate\": \"updateDeleteMessages\", \"params\": [{ \"name\": \"messages\", \"type\": \"Vector<int>\" }, { \"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\": 2590370335, \"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\": 2805148531, \"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\": 2503031564, \"predicate\": \"updateUserPhoto\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"photo\", \"type\": \"UserProfilePhoto\" }, { \"name\": \"previous\", \"type\": \"Bool\" }], \"type\": \"Update\" }, { \"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\": 3030575245, \"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\": 3930787420, \"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\": 2388564083, \"predicate\": \"updateDcOptions\", \"params\": [{ \"name\": \"dc_options\", \"type\": \"Vector<DcOption>\" }], \"type\": \"Update\" }, { \"id\": 2163009562, \"predicate\": \"updateUserBlocked\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"blocked\", \"type\": \"Bool\" }], \"type\": \"Update\" }, { \"id\": 3200411887, \"predicate\": \"updateNotifySettings\", \"params\": [{ \"name\": \"peer\", \"type\": \"NotifyPeer\" }, { \"name\": \"notify_settings\", \"type\": \"PeerNotifySettings\" }], \"type\": \"Update\" }, { \"id\": 3957614617, \"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<MessageEntity>\" }], \"type\": \"Update\" }, { \"id\": 3996854058, \"predicate\": \"updatePrivacy\", \"params\": [{ \"name\": \"key\", \"type\": \"PrivacyKey\" }, { \"name\": \"rules\", \"type\": \"Vector<PrivacyRule>\" }], \"type\": \"Update\" }, { \"id\": 314130811, \"predicate\": \"updateUserPhone\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"phone\", \"type\": \"string\" }], \"type\": \"Update\" }, { \"id\": 2627162079, \"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\": 2139689491, \"predicate\": \"updateWebPage\", \"params\": [{ \"name\": \"webpage\", \"type\": \"WebPage\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 1757493555, \"predicate\": \"updateReadMessagesContents\", \"params\": [{ \"name\": \"messages\", \"type\": \"Vector<int>\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3942934523, \"predicate\": \"updateChannelTooLong\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"pts\", \"type\": \"flags.0?int\" }], \"type\": \"Update\" }, { \"id\": 3067369046, \"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\": 3279233481, \"predicate\": \"updateDeleteChannelMessages\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"messages\", \"type\": \"Vector<int>\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 2560699211, \"predicate\": \"updateChannelMessageViews\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"views\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3062896985, \"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\": 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<long>\" }], \"type\": \"Update\" }, { \"id\": 1135492588, \"predicate\": \"updateStickerSets\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2473931806, \"predicate\": \"updateSavedGifs\", \"params\": [], \"type\": \"Update\" }, { \"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\": 457133559, \"predicate\": \"updateEditChannelMessage\", \"params\": [{ \"name\": \"message\", \"type\": \"Message\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 2555978869, \"predicate\": \"updateChannelPinnedMessage\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3879028705, \"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\": 3825430691, \"predicate\": \"updateEditMessage\", \"params\": [{ \"name\": \"message\", \"type\": \"Message\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 4191320666, \"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\": 634833351, \"predicate\": \"updateReadChannelOutbox\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3995842921, \"predicate\": \"updateDraftMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"draft\", \"type\": \"DraftMessage\" }], \"type\": \"Update\" }, { \"id\": 1461528386, \"predicate\": \"updateReadFeaturedStickers\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2588027936, \"predicate\": \"updateRecentStickers\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2720652550, \"predicate\": \"updateConfig\", \"params\": [], \"type\": \"Update\" }, { \"id\": 861169551, \"predicate\": \"updatePtsChanged\", \"params\": [], \"type\": \"Update\" }, { \"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\": 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\": 4195302562, \"predicate\": \"updatePinnedDialogs\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"folder_id\", \"type\": \"flags.1?int\" }, { \"name\": \"order\", \"type\": \"flags.0?Vector<DialogPeer>\" }], \"type\": \"Update\" }, { \"id\": 2199371971, \"predicate\": \"updateBotWebhookJSON\", \"params\": [{ \"name\": \"data\", \"type\": \"DataJSON\" }], \"type\": \"Update\" }, { \"id\": 2610053286, \"predicate\": \"updateBotWebhookJSONQuery\", \"params\": [{ \"name\": \"query_id\", \"type\": \"long\" }, { \"name\": \"data\", \"type\": \"DataJSON\" }, { \"name\": \"timeout\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3771582784, \"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\": 2869914398, \"predicate\": \"updatePhoneCall\", \"params\": [{ \"name\": \"phone_call\", \"type\": \"PhoneCall\" }], \"type\": \"Update\" }, { \"id\": 1180041828, \"predicate\": \"updateLangPackTooLong\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"Update\" }, { \"id\": 1442983757, \"predicate\": \"updateLangPack\", \"params\": [{ \"name\": \"difference\", \"type\": \"LangPackDifference\" }], \"type\": \"Update\" }, { \"id\": 3843135853, \"predicate\": \"updateFavedStickers\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2307472197, \"predicate\": \"updateChannelReadMessagesContents\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"messages\", \"type\": \"Vector<int>\" }], \"type\": \"Update\" }, { \"id\": 1887741886, \"predicate\": \"updateContactsReset\", \"params\": [], \"type\": \"Update\" }, { \"id\": 1893427255, \"predicate\": \"updateChannelAvailableMessages\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"available_min_id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3781450179, \"predicate\": \"updateDialogUnreadMark\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"unread\", \"type\": \"flags.0?true\" }, { \"name\": \"peer\", \"type\": \"DialogPeer\" }], \"type\": \"Update\" }, { \"id\": 1279515160, \"predicate\": \"updateUserPinnedMessage\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 3775771465, \"predicate\": \"updateChatPinnedMessage\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"version\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 2896258427, \"predicate\": \"updateMessagePoll\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"poll_id\", \"type\": \"long\" }, { \"name\": \"poll\", \"type\": \"flags.0?Poll\" }, { \"name\": \"results\", \"type\": \"PollResults\" }], \"type\": \"Update\" }, { \"id\": 1421875280, \"predicate\": \"updateChatDefaultBannedRights\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"default_banned_rights\", \"type\": \"ChatBannedRights\" }, { \"name\": \"version\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 422972864, \"predicate\": \"updateFolderPeers\", \"params\": [{ \"name\": \"folder_peers\", \"type\": \"Vector<FolderPeer>\" }, { \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 1786671974, \"predicate\": \"updatePeerSettings\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"settings\", \"type\": \"PeerSettings\" }], \"type\": \"Update\" }, { \"id\": 3031420848, \"predicate\": \"updatePeerLocated\", \"params\": [{ \"name\": \"peers\", \"type\": \"Vector<PeerLocated>\" }], \"type\": \"Update\" }, { \"id\": 967122427, \"predicate\": \"updateNewScheduledMessage\", \"params\": [{ \"name\": \"message\", \"type\": \"Message\" }], \"type\": \"Update\" }, { \"id\": 2424728814, \"predicate\": \"updateDeleteScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"messages\", \"type\": \"Vector<int>\" }], \"type\": \"Update\" }, { \"id\": 2182544291, \"predicate\": \"updateTheme\", \"params\": [{ \"name\": \"theme\", \"type\": \"Theme\" }], \"type\": \"Update\" }, { \"id\": 2267003193, \"predicate\": \"updateGeoLiveViewed\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }], \"type\": \"Update\" }, { \"id\": 1448076945, \"predicate\": \"updateLoginToken\", \"params\": [], \"type\": \"Update\" }, { \"id\": 1123585836, \"predicate\": \"updateMessagePollVote\", \"params\": [{ \"name\": \"poll_id\", \"type\": \"long\" }, { \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"options\", \"type\": \"Vector<bytes>\" }], \"type\": \"Update\" }, { \"id\": 654302845, \"predicate\": \"updateDialogFilter\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"filter\", \"type\": \"flags.0?DialogFilter\" }], \"type\": \"Update\" }, { \"id\": 2782339333, \"predicate\": \"updateDialogFilterOrder\", \"params\": [{ \"name\": \"order\", \"type\": \"Vector<int>\" }], \"type\": \"Update\" }, { \"id\": 889491791, \"predicate\": \"updateDialogFilters\", \"params\": [], \"type\": \"Update\" }, { \"id\": 2775329342, \"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<Message>\" }, { \"name\": \"new_encrypted_messages\", \"type\": \"Vector<EncryptedMessage>\" }, { \"name\": \"other_updates\", \"type\": \"Vector<Update>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"state\", \"type\": \"updates.State\" }], \"type\": \"updates.Difference\" }, { \"id\": 2835028353, \"predicate\": \"updates.differenceSlice\", \"params\": [{ \"name\": \"new_messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"new_encrypted_messages\", \"type\": \"Vector<EncryptedMessage>\" }, { \"name\": \"other_updates\", \"type\": \"Vector<Update>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"intermediate_state\", \"type\": \"updates.State\" }], \"type\": \"updates.Difference\" }, { \"id\": 1258196845, \"predicate\": \"updates.differenceTooLong\", \"params\": [{ \"name\": \"pts\", \"type\": \"int\" }], \"type\": \"updates.Difference\" }, { \"id\": 3809980286, \"predicate\": \"updatesTooLong\", \"params\": [], \"type\": \"Updates\" }, { \"id\": 2437922577, \"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<MessageEntity>\" }], \"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<MessageEntity>\" }], \"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<Update>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"seq_start\", \"type\": \"int\" }, { \"name\": \"seq\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 1957577280, \"predicate\": \"updates\", \"params\": [{ \"name\": \"updates\", \"type\": \"Vector<Update>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"seq\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"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<MessageEntity>\" }], \"type\": \"Updates\" }, { \"id\": 2378853029, \"predicate\": \"photos.photos\", \"params\": [{ \"name\": \"photos\", \"type\": \"Vector<Photo>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"photos.Photos\" }, { \"id\": 352657236, \"predicate\": \"photos.photosSlice\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"photos\", \"type\": \"Vector<Photo>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"photos.Photos\" }, { \"id\": 539045032, \"predicate\": \"photos.photo\", \"params\": [{ \"name\": \"photo\", \"type\": \"Photo\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"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\": 4052539972, \"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<FileHash>\" }], \"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<DcOption>\" }, { \"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\": 2384074613, \"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<MessageEntity>\" }, { \"name\": \"document\", \"type\": \"flags.1?Document\" }, { \"name\": \"url\", \"type\": \"flags.2?string\" }], \"type\": \"help.AppUpdate\" }, { \"id\": 3294258486, \"predicate\": \"help.noAppUpdate\", \"params\": [], \"type\": \"help.AppUpdate\" }, { \"id\": 415997816, \"predicate\": \"help.inviteText\", \"params\": [{ \"name\": \"message\", \"type\": \"string\" }], \"type\": \"help.InviteText\" }, { \"id\": 2877210784, \"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\": 3363328638, \"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\": 4199992886, \"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\": 4047615457, \"predicate\": \"inputEncryptedChat\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputEncryptedChat\" }, { \"id\": 3256830334, \"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\": 767652808, \"predicate\": \"inputEncryptedFileBigUploaded\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"parts\", \"type\": \"int\" }, { \"name\": \"key_fingerprint\", \"type\": \"int\" }], \"type\": \"InputEncryptedFile\" }, { \"id\": 3977822488, \"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\": 3236054581, \"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\": 2492727090, \"predicate\": \"messages.sentEncryptedFile\", \"params\": [{ \"name\": \"date\", \"type\": \"int\" }, { \"name\": \"file\", \"type\": \"EncryptedFile\" }], \"type\": \"messages.SentEncryptedMessage\" }, { \"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\": 922273905, \"predicate\": \"documentEmpty\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }], \"type\": \"Document\" }, { \"id\": 2611125441, \"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<PhotoSize>\" }, { \"name\": \"dc_id\", \"type\": \"int\" }, { \"name\": \"attributes\", \"type\": \"Vector<DocumentAttribute>\" }], \"type\": \"Document\" }, { \"id\": 398898678, \"predicate\": \"help.support\", \"params\": [{ \"name\": \"phone_number\", \"type\": \"string\" }, { \"name\": \"user\", \"type\": \"User\" }], \"type\": \"help.Support\" }, { \"id\": 2681474008, \"predicate\": \"notifyPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }], \"type\": \"NotifyPeer\" }, { \"id\": 3033021260, \"predicate\": \"notifyUsers\", \"params\": [], \"type\": \"NotifyPeer\" }, { \"id\": 3221737155, \"predicate\": \"notifyChats\", \"params\": [], \"type\": \"NotifyPeer\" }, { \"id\": 3591563503, \"predicate\": \"notifyBroadcasts\", \"params\": [], \"type\": \"NotifyPeer\" }, { \"id\": 381645902, \"predicate\": \"sendMessageTypingAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 4250847477, \"predicate\": \"sendMessageCancelAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 2710034031, \"predicate\": \"sendMessageRecordVideoAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 3916839660, \"predicate\": \"sendMessageUploadVideoAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 3576656887, \"predicate\": \"sendMessageRecordAudioAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 4082227115, \"predicate\": \"sendMessageUploadAudioAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 3520285222, \"predicate\": \"sendMessageUploadPhotoAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 2852968932, \"predicate\": \"sendMessageUploadDocumentAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 393186209, \"predicate\": \"sendMessageGeoLocationAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 1653390447, \"predicate\": \"sendMessageChooseContactAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 3714748232, \"predicate\": \"sendMessageGamePlayAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 2297593788, \"predicate\": \"sendMessageRecordRoundAction\", \"params\": [], \"type\": \"SendMessageAction\" }, { \"id\": 608050278, \"predicate\": \"sendMessageUploadRoundAction\", \"params\": [{ \"name\": \"progress\", \"type\": \"int\" }], \"type\": \"SendMessageAction\" }, { \"id\": 3004386717, \"predicate\": \"contacts.found\", \"params\": [{ \"name\": \"my_results\", \"type\": \"Vector<Peer>\" }, { \"name\": \"results\", \"type\": \"Vector<Peer>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.Found\" }, { \"id\": 1335282456, \"predicate\": \"inputPrivacyKeyStatusTimestamp\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 3187344422, \"predicate\": \"inputPrivacyKeyChatInvite\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 4206550111, \"predicate\": \"inputPrivacyKeyPhoneCall\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 3684593874, \"predicate\": \"inputPrivacyKeyPhoneP2P\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 2765966344, \"predicate\": \"inputPrivacyKeyForwards\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 1461304012, \"predicate\": \"inputPrivacyKeyProfilePhoto\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 55761658, \"predicate\": \"inputPrivacyKeyPhoneNumber\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 3508640733, \"predicate\": \"inputPrivacyKeyAddedByPhone\", \"params\": [], \"type\": \"InputPrivacyKey\" }, { \"id\": 3157175088, \"predicate\": \"privacyKeyStatusTimestamp\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 1343122938, \"predicate\": \"privacyKeyChatInvite\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 1030105979, \"predicate\": \"privacyKeyPhoneCall\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 961092808, \"predicate\": \"privacyKeyPhoneP2P\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 1777096355, \"predicate\": \"privacyKeyForwards\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 2517966829, \"predicate\": \"privacyKeyProfilePhoto\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 3516589165, \"predicate\": \"privacyKeyPhoneNumber\", \"params\": [], \"type\": \"PrivacyKey\" }, { \"id\": 1124062251, \"predicate\": \"privacyKeyAddedByPhone\", \"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<InputUser>\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 195371015, \"predicate\": \"inputPrivacyValueDisallowContacts\", \"params\": [], \"type\": \"InputPrivacyRule\" }, { \"id\": 3597362889, \"predicate\": \"inputPrivacyValueDisallowAll\", \"params\": [], \"type\": \"InputPrivacyRule\" }, { \"id\": 2417034343, \"predicate\": \"inputPrivacyValueDisallowUsers\", \"params\": [{ \"name\": \"users\", \"type\": \"Vector<InputUser>\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 1283572154, \"predicate\": \"inputPrivacyValueAllowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<int>\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 3626197935, \"predicate\": \"inputPrivacyValueDisallowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<int>\" }], \"type\": \"InputPrivacyRule\" }, { \"id\": 4294843308, \"predicate\": \"privacyValueAllowContacts\", \"params\": [], \"type\": \"PrivacyRule\" }, { \"id\": 1698855810, \"predicate\": \"privacyValueAllowAll\", \"params\": [], \"type\": \"PrivacyRule\" }, { \"id\": 1297858060, \"predicate\": \"privacyValueAllowUsers\", \"params\": [{ \"name\": \"users\", \"type\": \"Vector<int>\" }], \"type\": \"PrivacyRule\" }, { \"id\": 4169726490, \"predicate\": \"privacyValueDisallowContacts\", \"params\": [], \"type\": \"PrivacyRule\" }, { \"id\": 2339628899, \"predicate\": \"privacyValueDisallowAll\", \"params\": [], \"type\": \"PrivacyRule\" }, { \"id\": 209668535, \"predicate\": \"privacyValueDisallowUsers\", \"params\": [{ \"name\": \"users\", \"type\": \"Vector<int>\" }], \"type\": \"PrivacyRule\" }, { \"id\": 415136107, \"predicate\": \"privacyValueAllowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<int>\" }], \"type\": \"PrivacyRule\" }, { \"id\": 2897086096, \"predicate\": \"privacyValueDisallowChatParticipants\", \"params\": [{ \"name\": \"chats\", \"type\": \"Vector<int>\" }], \"type\": \"PrivacyRule\" }, { \"id\": 1352683077, \"predicate\": \"account.privacyRules\", \"params\": [{ \"name\": \"rules\", \"type\": \"Vector<PrivacyRule>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"account.PrivacyRules\" }, { \"id\": 3100684255, \"predicate\": \"accountDaysTTL\", \"params\": [{ \"name\": \"days\", \"type\": \"int\" }], \"type\": \"AccountDaysTTL\" }, { \"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\": 2555574726, \"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\": 2550256375, \"predicate\": \"documentAttributeHasStickers\", \"params\": [], \"type\": \"DocumentAttribute\" }, { \"id\": 4050950690, \"predicate\": \"messages.stickersNotModified\", \"params\": [], \"type\": \"messages.Stickers\" }, { \"id\": 3831077821, \"predicate\": \"messages.stickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"stickers\", \"type\": \"Vector<Document>\" }], \"type\": \"messages.Stickers\" }, { \"id\": 313694676, \"predicate\": \"stickerPack\", \"params\": [{ \"name\": \"emoticon\", \"type\": \"string\" }, { \"name\": \"documents\", \"type\": \"Vector<long>\" }], \"type\": \"StickerPack\" }, { \"id\": 3898999491, \"predicate\": \"messages.allStickersNotModified\", \"params\": [], \"type\": \"messages.AllStickers\" }, { \"id\": 3992797279, \"predicate\": \"messages.allStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"sets\", \"type\": \"Vector<StickerSet>\" }], \"type\": \"messages.AllStickers\" }, { \"id\": 2228326789, \"predicate\": \"messages.affectedMessages\", \"params\": [{ \"name\": \"pts\", \"type\": \"int\" }, { \"name\": \"pts_count\", \"type\": \"int\" }], \"type\": \"messages.AffectedMessages\" }, { \"id\": 3943987176, \"predicate\": \"webPageEmpty\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }], \"type\": \"WebPage\" }, { \"id\": 3313949212, \"predicate\": \"webPagePending\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"WebPage\" }, { \"id\": 3902555570, \"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<WebPageAttribute>\" }], \"type\": \"WebPage\" }, { \"id\": 1930545681, \"predicate\": \"webPageNotModified\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"cached_page_views\", \"type\": \"flags.0?int\" }], \"type\": \"WebPage\" }, { \"id\": 2902578717, \"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<Authorization>\" }], \"type\": \"account.Authorizations\" }, { \"id\": 2904965624, \"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\": 2589733861, \"predicate\": \"account.passwordSettings\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"email\", \"type\": \"flags.0?string\" }, { \"name\": \"secure_settings\", \"type\": \"flags.1?SecureSecretSettings\" }], \"type\": \"account.PasswordSettings\" }, { \"id\": 3258394569, \"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\": 2743383929, \"predicate\": \"receivedNotifyMessage\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"flags\", \"type\": \"int\" }], \"type\": \"ReceivedNotifyMessage\" }, { \"id\": 1776236393, \"predicate\": \"chatInviteEmpty\", \"params\": [], \"type\": \"ExportedChatInvite\" }, { \"id\": 4230874556, \"predicate\": \"chatInviteExported\", \"params\": [{ \"name\": \"link\", \"type\": \"string\" }], \"type\": \"ExportedChatInvite\" }, { \"id\": 1516793212, \"predicate\": \"chatInviteAlready\", \"params\": [{ \"name\": \"chat\", \"type\": \"Chat\" }], \"type\": \"ChatInvite\" }, { \"id\": 3754096014, \"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<User>\" }], \"type\": \"ChatInvite\" }, { \"id\": 4290128789, \"predicate\": \"inputStickerSetEmpty\", \"params\": [], \"type\": \"InputStickerSet\" }, { \"id\": 2649203305, \"predicate\": \"inputStickerSetID\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputStickerSet\" }, { \"id\": 2250033312, \"predicate\": \"inputStickerSetShortName\", \"params\": [{ \"name\": \"short_name\", \"type\": \"string\" }], \"type\": \"InputStickerSet\" }, { \"id\": 42402760, \"predicate\": \"inputStickerSetAnimatedEmoji\", \"params\": [], \"type\": \"InputStickerSet\" }, { \"id\": 3867103758, \"predicate\": \"inputStickerSetDice\", \"params\": [{ \"name\": \"emoticon\", \"type\": \"string\" }], \"type\": \"InputStickerSet\" }, { \"id\": 4004802343, \"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\": 3054118054, \"predicate\": \"messages.stickerSet\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"packs\", \"type\": \"Vector<StickerPack>\" }, { \"name\": \"documents\", \"type\": \"Vector<Document>\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 3262826695, \"predicate\": \"botCommand\", \"params\": [{ \"name\": \"command\", \"type\": \"string\" }, { \"name\": \"description\", \"type\": \"string\" }], \"type\": \"BotCommand\" }, { \"id\": 2565348666, \"predicate\": \"botInfo\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"description\", \"type\": \"string\" }, { \"name\": \"commands\", \"type\": \"Vector<BotCommand>\" }], \"type\": \"BotInfo\" }, { \"id\": 2734311552, \"predicate\": \"keyboardButton\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"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\": 2976541737, \"predicate\": \"keyboardButtonRequestPhone\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"id\": 4235815743, \"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\": 1358175439, \"predicate\": \"keyboardButtonGame\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"id\": 2950250427, \"predicate\": \"keyboardButtonBuy\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"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\": 3492708308, \"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\": 3150401885, \"predicate\": \"keyboardButtonRequestPoll\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"quiz\", \"type\": \"flags.0?Bool\" }, { \"name\": \"text\", \"type\": \"string\" }], \"type\": \"KeyboardButton\" }, { \"id\": 2002815875, \"predicate\": \"keyboardButtonRow\", \"params\": [{ \"name\": \"buttons\", \"type\": \"Vector<KeyboardButton>\" }], \"type\": \"KeyboardButtonRow\" }, { \"id\": 2688441221, \"predicate\": \"replyKeyboardHide\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"selective\", \"type\": \"flags.2?true\" }], \"type\": \"ReplyMarkup\" }, { \"id\": 4094724768, \"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<KeyboardButtonRow>\" }], \"type\": \"ReplyMarkup\" }, { \"id\": 1218642516, \"predicate\": \"replyInlineMarkup\", \"params\": [{ \"name\": \"rows\", \"type\": \"Vector<KeyboardButtonRow>\" }], \"type\": \"ReplyMarkup\" }, { \"id\": 3146955413, \"predicate\": \"messageEntityUnknown\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"MessageEntity\" }, { \"id\": 4194588573, \"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\": 3177253833, \"predicate\": \"messageEntityBold\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"MessageEntity\" }, { \"id\": 2188348256, \"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\": 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\": 2607407947, \"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\": 2622389899, \"predicate\": \"messageEntityUnderline\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"MessageEntity\" }, { \"id\": 3204879316, \"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\": 1981704948, \"predicate\": \"messageEntityBankCard\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"MessageEntity\" }, { \"id\": 4002160262, \"predicate\": \"inputChannelEmpty\", \"params\": [], \"type\": \"InputChannel\" }, { \"id\": 2951442734, \"predicate\": \"inputChannel\", \"params\": [{ \"name\": \"channel_id\", \"type\": \"int\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputChannel\" }, { \"id\": 707290417, \"predicate\": \"inputChannelFromMessage\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"channel_id\", \"type\": \"int\" }], \"type\": \"InputChannel\" }, { \"id\": 2131196633, \"predicate\": \"contacts.resolvedPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.ResolvedPeer\" }, { \"id\": 182649427, \"predicate\": \"messageRange\", \"params\": [{ \"name\": \"min_id\", \"type\": \"int\" }, { \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"MessageRange\" }, { \"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\": 2763835134, \"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<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"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<Message>\" }, { \"name\": \"other_updates\", \"type\": \"Vector<Update>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"updates.ChannelDifference\" }, { \"id\": 2496933607, \"predicate\": \"channelMessagesFilterEmpty\", \"params\": [], \"type\": \"ChannelMessagesFilter\" }, { \"id\": 3447183703, \"predicate\": \"channelMessagesFilter\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"exclude_new_messages\", \"type\": \"flags.1?true\" }, { \"name\": \"ranges\", \"type\": \"Vector<MessageRange>\" }], \"type\": \"ChannelMessagesFilter\" }, { \"id\": 367766557, \"predicate\": \"channelParticipant\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"ChannelParticipant\" }, { \"id\": 2737347181, \"predicate\": \"channelParticipantSelf\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"inviter_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"ChannelParticipant\" }, { \"id\": 2156729764, \"predicate\": \"channelParticipantCreator\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"rank\", \"type\": \"flags.0?string\" }], \"type\": \"ChannelParticipant\" }, { \"id\": 3435051951, \"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\": 3728686201, \"predicate\": \"channelParticipantsRecent\", \"params\": [], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 3026225513, \"predicate\": \"channelParticipantsAdmins\", \"params\": [], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 2746567045, \"predicate\": \"channelParticipantsKicked\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 2966521435, \"predicate\": \"channelParticipantsBots\", \"params\": [], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 338142689, \"predicate\": \"channelParticipantsBanned\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 106343499, \"predicate\": \"channelParticipantsSearch\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 3144345741, \"predicate\": \"channelParticipantsContacts\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }], \"type\": \"ChannelParticipantsFilter\" }, { \"id\": 4117684904, \"predicate\": \"channels.channelParticipants\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"participants\", \"type\": \"Vector<ChannelParticipant>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"channels.ChannelParticipants\" }, { \"id\": 4028055529, \"predicate\": \"channels.channelParticipantsNotModified\", \"params\": [], \"type\": \"channels.ChannelParticipants\" }, { \"id\": 3503927651, \"predicate\": \"channels.channelParticipant\", \"params\": [{ \"name\": \"participant\", \"type\": \"ChannelParticipant\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"channels.ChannelParticipant\" }, { \"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<MessageEntity>\" }, { \"name\": \"min_age_confirm\", \"type\": \"flags.1?int\" }], \"type\": \"help.TermsOfService\" }, { \"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\": 2624914441, \"predicate\": \"foundGifCached\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"photo\", \"type\": \"Photo\" }, { \"name\": \"document\", \"type\": \"Document\" }], \"type\": \"FoundGif\" }, { \"id\": 1158290442, \"predicate\": \"messages.foundGifs\", \"params\": [{ \"name\": \"next_offset\", \"type\": \"int\" }, { \"name\": \"results\", \"type\": \"Vector<FoundGif>\" }], \"type\": \"messages.FoundGifs\" }, { \"id\": 3892468898, \"predicate\": \"messages.savedGifsNotModified\", \"params\": [], \"type\": \"messages.SavedGifs\" }, { \"id\": 772213157, \"predicate\": \"messages.savedGifs\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"gifs\", \"type\": \"Vector<Document>\" }], \"type\": \"messages.SavedGifs\" }, { \"id\": 864077702, \"predicate\": \"inputBotInlineMessageMediaAuto\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.1?Vector<MessageEntity>\" }, { \"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<MessageEntity>\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"InputBotInlineMessage\" }, { \"id\": 3249626469, \"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\": 2800599037, \"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\": 1262639204, \"predicate\": \"inputBotInlineMessageGame\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"InputBotInlineMessage\" }, { \"id\": 2294256409, \"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\": 2832753831, \"predicate\": \"inputBotInlineResultPhoto\", \"params\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"type\", \"type\": \"string\" }, { \"name\": \"photo\", \"type\": \"InputPhoto\" }, { \"name\": \"send_message\", \"type\": \"InputBotInlineMessage\" }], \"type\": \"InputBotInlineResult\" }, { \"id\": 4294507972, \"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\": 1336154098, \"predicate\": \"inputBotInlineResultGame\", \"params\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"short_name\", \"type\": \"string\" }, { \"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<MessageEntity>\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"BotInlineMessage\" }, { \"id\": 2357159394, \"predicate\": \"botInlineMessageText\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"no_webpage\", \"type\": \"flags.0?true\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.1?Vector<MessageEntity>\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"BotInlineMessage\" }, { \"id\": 3072515685, \"predicate\": \"botInlineMessageMediaGeo\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"geo\", \"type\": \"GeoPoint\" }, { \"name\": \"period\", \"type\": \"int\" }, { \"name\": \"reply_markup\", \"type\": \"flags.2?ReplyMarkup\" }], \"type\": \"BotInlineMessage\" }, { \"id\": 2324063644, \"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\": 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\": 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\": 2491197512, \"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<BotInlineResult>\" }, { \"name\": \"cache_time\", \"type\": \"int\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.BotResults\" }, { \"id\": 1571494644, \"predicate\": \"exportedMessageLink\", \"params\": [{ \"name\": \"link\", \"type\": \"string\" }, { \"name\": \"html\", \"type\": \"string\" }], \"type\": \"ExportedMessageLink\" }, { \"id\": 893020267, \"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\" }, { \"name\": \"psa_type\", \"type\": \"flags.6?string\" }], \"type\": \"MessageFwdHeader\" }, { \"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\": 3221273506, \"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\": 2869151449, \"predicate\": \"auth.sentCodeTypeFlashCall\", \"params\": [{ \"name\": \"pattern\", \"type\": \"string\" }], \"type\": \"auth.SentCodeType\" }, { \"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\": 649453030, \"predicate\": \"messages.messageEditData\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"caption\", \"type\": \"flags.0?true\" }], \"type\": \"messages.MessageEditData\" }, { \"id\": 2299280777, \"predicate\": \"inputBotInlineMessageID\", \"params\": [{ \"name\": \"dc_id\", \"type\": \"int\" }, { \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputBotInlineMessageID\" }, { \"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<Dialog>\" }, { \"name\": \"messages\", \"type\": \"Vector<Message>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"state\", \"type\": \"updates.State\" }], \"type\": \"messages.PeerDialogs\" }, { \"id\": 3989684315, \"predicate\": \"topPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"rating\", \"type\": \"double\" }], \"type\": \"TopPeer\" }, { \"id\": 2875595611, \"predicate\": \"topPeerCategoryBotsPM\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 344356834, \"predicate\": \"topPeerCategoryBotsInline\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 104314861, \"predicate\": \"topPeerCategoryCorrespondents\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 3172442442, \"predicate\": \"topPeerCategoryGroups\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 371037736, \"predicate\": \"topPeerCategoryChannels\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 511092620, \"predicate\": \"topPeerCategoryPhoneCalls\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 2822794409, \"predicate\": \"topPeerCategoryForwardUsers\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 4226728176, \"predicate\": \"topPeerCategoryForwardChats\", \"params\": [], \"type\": \"TopPeerCategory\" }, { \"id\": 4219683473, \"predicate\": \"topPeerCategoryPeers\", \"params\": [{ \"name\": \"category\", \"type\": \"TopPeerCategory\" }, { \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"peers\", \"type\": \"Vector<TopPeer>\" }], \"type\": \"TopPeerCategoryPeers\" }, { \"id\": 3727060725, \"predicate\": \"contacts.topPeersNotModified\", \"params\": [], \"type\": \"contacts.TopPeers\" }, { \"id\": 1891070632, \"predicate\": \"contacts.topPeers\", \"params\": [{ \"name\": \"categories\", \"type\": \"Vector<TopPeerCategoryPeers>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"contacts.TopPeers\" }, { \"id\": 3039597469, \"predicate\": \"contacts.topPeersDisabled\", \"params\": [], \"type\": \"contacts.TopPeers\" }, { \"id\": 453805082, \"predicate\": \"draftMessageEmpty\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"date\", \"type\": \"flags.0?int\" }], \"type\": \"DraftMessage\" }, { \"id\": 4253970719, \"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<MessageEntity>\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"DraftMessage\" }, { \"id\": 3336309862, \"predicate\": \"messages.featuredStickersNotModified\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }], \"type\": \"messages.FeaturedStickers\" }, { \"id\": 3064709953, \"predicate\": \"messages.featuredStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"sets\", \"type\": \"Vector<StickerSetCovered>\" }, { \"name\": \"unread\", \"type\": \"Vector<long>\" }], \"type\": \"messages.FeaturedStickers\" }, { \"id\": 186120336, \"predicate\": \"messages.recentStickersNotModified\", \"params\": [], \"type\": \"messages.RecentStickers\" }, { \"id\": 586395571, \"predicate\": \"messages.recentStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"packs\", \"type\": \"Vector<StickerPack>\" }, { \"name\": \"stickers\", \"type\": \"Vector<Document>\" }, { \"name\": \"dates\", \"type\": \"Vector<int>\" }], \"type\": \"messages.RecentStickers\" }, { \"id\": 1338747336, \"predicate\": \"messages.archivedStickers\", \"params\": [{ \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"sets\", \"type\": \"Vector<StickerSetCovered>\" }], \"type\": \"messages.ArchivedStickers\" }, { \"id\": 946083368, \"predicate\": \"messages.stickerSetInstallResultSuccess\", \"params\": [], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 904138920, \"predicate\": \"messages.stickerSetInstallResultArchive\", \"params\": [{ \"name\": \"sets\", \"type\": \"Vector<StickerSetCovered>\" }], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 1678812626, \"predicate\": \"stickerSetCovered\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"cover\", \"type\": \"Document\" }], \"type\": \"StickerSetCovered\" }, { \"id\": 872932635, \"predicate\": \"stickerSetMultiCovered\", \"params\": [{ \"name\": \"set\", \"type\": \"StickerSet\" }, { \"name\": \"covers\", \"type\": \"Vector<Document>\" }], \"type\": \"StickerSetCovered\" }, { \"id\": 2933316530, \"predicate\": \"maskCoords\", \"params\": [{ \"name\": \"n\", \"type\": \"int\" }, { \"name\": \"x\", \"type\": \"double\" }, { \"name\": \"y\", \"type\": \"double\" }, { \"name\": \"zoom\", \"type\": \"double\" }], \"type\": \"MaskCoords\" }, { \"id\": 1251549527, \"predicate\": \"inputStickeredMediaPhoto\", \"params\": [{ \"name\": \"id\", \"type\": \"InputPhoto\" }], \"type\": \"InputStickeredMedia\" }, { \"id\": 70813275, \"predicate\": \"inputStickeredMediaDocument\", \"params\": [{ \"name\": \"id\", \"type\": \"InputDocument\" }], \"type\": \"InputStickeredMedia\" }, { \"id\": 3187238203, \"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\": 53231223, \"predicate\": \"inputGameID\", \"params\": [{ \"name\": \"id\", \"type\": \"long\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputGame\" }, { \"id\": 3274827786, \"predicate\": \"inputGameShortName\", \"params\": [{ \"name\": \"bot_id\", \"type\": \"InputUser\" }, { \"name\": \"short_name\", \"type\": \"string\" }], \"type\": \"InputGame\" }, { \"id\": 1493171408, \"predicate\": \"highScore\", \"params\": [{ \"name\": \"pos\", \"type\": \"int\" }, { \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"score\", \"type\": \"int\" }], \"type\": \"HighScore\" }, { \"id\": 2587622809, \"predicate\": \"messages.highScores\", \"params\": [{ \"name\": \"scores\", \"type\": \"Vector<HighScore>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.HighScores\" }, { \"id\": 3695018575, \"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\": 3641877916, \"predicate\": \"textItalic\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"RichText\" }, { \"id\": 3240501956, \"predicate\": \"textUnderline\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"RichText\" }, { \"id\": 2616769429, \"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\": 3730443734, \"predicate\": \"textEmail\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }, { \"name\": \"email\", \"type\": \"string\" }], \"type\": \"RichText\" }, { \"id\": 2120376535, \"predicate\": \"textConcat\", \"params\": [{ \"name\": \"texts\", \"type\": \"Vector<RichText>\" }], \"type\": \"RichText\" }, { \"id\": 3983181060, \"predicate\": \"textSubscript\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"RichText\" }, { \"id\": 3355139585, \"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\": 894777186, \"predicate\": \"textAnchor\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }, { \"name\": \"name\", \"type\": \"string\" }], \"type\": \"RichText\" }, { \"id\": 324435594, \"predicate\": \"pageBlockUnsupported\", \"params\": [], \"type\": \"PageBlock\" }, { \"id\": 1890305021, \"predicate\": \"pageBlockTitle\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 2415565343, \"predicate\": \"pageBlockSubtitle\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 3132089824, \"predicate\": \"pageBlockAuthorDate\", \"params\": [{ \"name\": \"author\", \"type\": \"RichText\" }, { \"name\": \"published_date\", \"type\": \"int\" }], \"type\": \"PageBlock\" }, { \"id\": 3218105580, \"predicate\": \"pageBlockHeader\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 4046173921, \"predicate\": \"pageBlockSubheader\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 1182402406, \"predicate\": \"pageBlockParagraph\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 3228621118, \"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\": 3676352904, \"predicate\": \"pageBlockDivider\", \"params\": [], \"type\": \"PageBlock\" }, { \"id\": 3456972720, \"predicate\": \"pageBlockAnchor\", \"params\": [{ \"name\": \"name\", \"type\": \"string\" }], \"type\": \"PageBlock\" }, { \"id\": 3840442385, \"predicate\": \"pageBlockList\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector<PageListItem>\" }], \"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\": 2826014149, \"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\": 4065961995, \"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<PageBlock>\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 1705048653, \"predicate\": \"pageBlockCollage\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector<PageBlock>\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 52401552, \"predicate\": \"pageBlockSlideshow\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector<PageBlock>\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 4011282869, \"predicate\": \"pageBlockChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"Chat\" }], \"type\": \"PageBlock\" }, { \"id\": 2151899626, \"predicate\": \"pageBlockAudio\", \"params\": [{ \"name\": \"audio_id\", \"type\": \"long\" }, { \"name\": \"caption\", \"type\": \"PageCaption\" }], \"type\": \"PageBlock\" }, { \"id\": 504660880, \"predicate\": \"pageBlockKicker\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 3209554562, \"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<PageTableRow>\" }], \"type\": \"PageBlock\" }, { \"id\": 2592793057, \"predicate\": \"pageBlockOrderedList\", \"params\": [{ \"name\": \"items\", \"type\": \"Vector<PageListOrderedItem>\" }], \"type\": \"PageBlock\" }, { \"id\": 1987480557, \"predicate\": \"pageBlockDetails\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"open\", \"type\": \"flags.0?true\" }, { \"name\": \"blocks\", \"type\": \"Vector<PageBlock>\" }, { \"name\": \"title\", \"type\": \"RichText\" }], \"type\": \"PageBlock\" }, { \"id\": 370236054, \"predicate\": \"pageBlockRelatedArticles\", \"params\": [{ \"name\": \"title\", \"type\": \"RichText\" }, { \"name\": \"articles\", \"type\": \"Vector<PageRelatedArticle>\" }], \"type\": \"PageBlock\" }, { \"id\": 2756656886, \"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\": 2246320897, \"predicate\": \"phoneCallDiscardReasonMissed\", \"params\": [], \"type\": \"PhoneCallDiscardReason\" }, { \"id\": 3767910816, \"predicate\": \"phoneCallDiscardReasonDisconnect\", \"params\": [], \"type\": \"PhoneCallDiscardReason\" }, { \"id\": 1471006352, \"predicate\": \"phoneCallDiscardReasonHangup\", \"params\": [], \"type\": \"PhoneCallDiscardReason\" }, { \"id\": 4210550985, \"predicate\": \"phoneCallDiscardReasonBusy\", \"params\": [], \"type\": \"PhoneCallDiscardReason\" }, { \"id\": 2104790276, \"predicate\": \"dataJSON\", \"params\": [{ \"name\": \"data\", \"type\": \"string\" }], \"type\": \"DataJSON\" }, { \"id\": 3408489464, \"predicate\": \"labeledPrice\", \"params\": [{ \"name\": \"label\", \"type\": \"string\" }, { \"name\": \"amount\", \"type\": \"long\" }], \"type\": \"LabeledPrice\" }, { \"id\": 3272254296, \"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<LabeledPrice>\" }], \"type\": \"Invoice\" }, { \"id\": 3926049406, \"predicate\": \"paymentCharge\", \"params\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"provider_charge_id\", \"type\": \"string\" }], \"type\": \"PaymentCharge\" }, { \"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\": 2426158996, \"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\": 3452074527, \"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<DocumentAttribute>\" }], \"type\": \"WebDocument\" }, { \"id\": 4190682310, \"predicate\": \"webDocumentNoProxy\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"attributes\", \"type\": \"Vector<DocumentAttribute>\" }], \"type\": \"WebDocument\" }, { \"id\": 2616017741, \"predicate\": \"inputWebDocument\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }, { \"name\": \"attributes\", \"type\": \"Vector<DocumentAttribute>\" }], \"type\": \"InputWebDocument\" }, { \"id\": 3258570374, \"predicate\": \"inputWebFileLocation\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"access_hash\", \"type\": \"long\" }], \"type\": \"InputWebFileLocation\" }, { \"id\": 2669814217, \"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\": 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<User>\" }], \"type\": \"payments.PaymentForm\" }, { \"id\": 3510966403, \"predicate\": \"payments.validatedRequestedInfo\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"flags.0?string\" }, { \"name\": \"shipping_options\", \"type\": \"flags.1?Vector<ShippingOption>\" }], \"type\": \"payments.ValidatedRequestedInfo\" }, { \"id\": 1314881805, \"predicate\": \"payments.paymentResult\", \"params\": [{ \"name\": \"updates\", \"type\": \"Updates\" }], \"type\": \"payments.PaymentResult\" }, { \"id\": 3628142905, \"predicate\": \"payments.paymentVerificationNeeded\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"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<User>\" }], \"type\": \"payments.PaymentReceipt\" }, { \"id\": 4220511292, \"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\": 3238965967, \"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\": 178373535, \"predicate\": \"inputPaymentCredentialsApplePay\", \"params\": [{ \"name\": \"payment_data\", \"type\": \"DataJSON\" }], \"type\": \"InputPaymentCredentials\" }, { \"id\": 3389379854, \"predicate\": \"inputPaymentCredentialsAndroidPay\", \"params\": [{ \"name\": \"payment_token\", \"type\": \"DataJSON\" }, { \"name\": \"google_transaction_id\", \"type\": \"string\" }], \"type\": \"InputPaymentCredentials\" }, { \"id\": 3680828724, \"predicate\": \"account.tmpPassword\", \"params\": [{ \"name\": \"tmp_password\", \"type\": \"bytes\" }, { \"name\": \"valid_until\", \"type\": \"int\" }], \"type\": \"account.TmpPassword\" }, { \"id\": 3055631583, \"predicate\": \"shippingOption\", \"params\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"prices\", \"type\": \"Vector<LabeledPrice>\" }], \"type\": \"ShippingOption\" }, { \"id\": 4288717974, \"predicate\": \"inputStickerSetItem\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"document\", \"type\": \"InputDocument\" }, { \"name\": \"emoji\", \"type\": \"string\" }, { \"name\": \"mask_coords\", \"type\": \"flags.0?MaskCoords\" }], \"type\": \"InputStickerSetItem\" }, { \"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\": 2280307539, \"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\": 2575058250, \"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\": 2269294207, \"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<PhoneConnection>\" }, { \"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\": 2639009728, \"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\": 4236742600, \"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\" }, { \"name\": \"library_versions\", \"type\": \"Vector<string>\" }], \"type\": \"PhoneCallProtocol\" }, { \"id\": 3968000320, \"predicate\": \"phone.phoneCall\", \"params\": [{ \"name\": \"phone_call\", \"type\": \"PhoneCall\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"phone.PhoneCall\" }, { \"id\": 4004045934, \"predicate\": \"upload.cdnFileReuploadNeeded\", \"params\": [{ \"name\": \"request_token\", \"type\": \"bytes\" }], \"type\": \"upload.CdnFile\" }, { \"id\": 2845821519, \"predicate\": \"upload.cdnFile\", \"params\": [{ \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"upload.CdnFile\" }, { \"id\": 3380800186, \"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<CdnPublicKey>\" }], \"type\": \"CdnConfig\" }, { \"id\": 3402727926, \"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\": 4085629430, \"predicate\": \"langPackDifference\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }, { \"name\": \"from_version\", \"type\": \"int\" }, { \"name\": \"version\", \"type\": \"int\" }, { \"name\": \"strings\", \"type\": \"Vector<LangPackString>\" }], \"type\": \"LangPackDifference\" }, { \"id\": 4006239459, \"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\": 3873421349, \"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\": 3924306968, \"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\": 4170676210, \"predicate\": \"channelAdminLogEventActionParticipantLeave\", \"params\": [], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 3810276568, \"predicate\": \"channelAdminLogEventActionParticipantInvite\", \"params\": [{ \"name\": \"participant\", \"type\": \"ChannelParticipant\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 3872931198, \"predicate\": \"channelAdminLogEventActionParticipantToggleBan\", \"params\": [{ \"name\": \"prev_participant\", \"type\": \"ChannelParticipant\" }, { \"name\": \"new_participant\", \"type\": \"ChannelParticipant\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 3580323600, \"predicate\": \"channelAdminLogEventActionParticipantToggleAdmin\", \"params\": [{ \"name\": \"prev_participant\", \"type\": \"ChannelParticipant\" }, { \"name\": \"new_participant\", \"type\": \"ChannelParticipant\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 2982398631, \"predicate\": \"channelAdminLogEventActionChangeStickerSet\", \"params\": [{ \"name\": \"prev_stickerset\", \"type\": \"InputStickerSet\" }, { \"name\": \"new_stickerset\", \"type\": \"InputStickerSet\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 1599903217, \"predicate\": \"channelAdminLogEventActionTogglePreHistoryHidden\", \"params\": [{ \"name\": \"new_value\", \"type\": \"Bool\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 771095562, \"predicate\": \"channelAdminLogEventActionDefaultBannedRights\", \"params\": [{ \"name\": \"prev_banned_rights\", \"type\": \"ChatBannedRights\" }, { \"name\": \"new_banned_rights\", \"type\": \"ChatBannedRights\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 2399639107, \"predicate\": \"channelAdminLogEventActionStopPoll\", \"params\": [{ \"name\": \"message\", \"type\": \"Message\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 2725218331, \"predicate\": \"channelAdminLogEventActionChangeLinkedChat\", \"params\": [{ \"name\": \"prev_value\", \"type\": \"int\" }, { \"name\": \"new_value\", \"type\": \"int\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 241923758, \"predicate\": \"channelAdminLogEventActionChangeLocation\", \"params\": [{ \"name\": \"prev_value\", \"type\": \"ChannelLocation\" }, { \"name\": \"new_value\", \"type\": \"ChannelLocation\" }], \"type\": \"ChannelAdminLogEventAction\" }, { \"id\": 1401984889, \"predicate\": \"channelAdminLogEventActionToggleSlowMode\", \"params\": [{ \"name\": \"prev_value\", \"type\": \"int\" }, { \"name\": \"new_value\", \"type\": \"int\" }], \"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\": 3985307469, \"predicate\": \"channels.adminLogResults\", \"params\": [{ \"name\": \"events\", \"type\": \"Vector<ChannelAdminLogEvent>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"channels.AdminLogResults\" }, { \"id\": 3926948580, \"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\": 1558266229, \"predicate\": \"popularContact\", \"params\": [{ \"name\": \"client_id\", \"type\": \"long\" }, { \"name\": \"importers\", \"type\": \"int\" }], \"type\": \"PopularContact\" }, { \"id\": 2660214483, \"predicate\": \"messages.favedStickersNotModified\", \"params\": [], \"type\": \"messages.FavedStickers\" }, { \"id\": 4085198614, \"predicate\": \"messages.favedStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"packs\", \"type\": \"Vector<StickerPack>\" }, { \"name\": \"stickers\", \"type\": \"Vector<Document>\" }], \"type\": \"messages.FavedStickers\" }, { \"id\": 1189204285, \"predicate\": \"recentMeUrlUnknown\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 2377921334, \"predicate\": \"recentMeUrlUser\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"user_id\", \"type\": \"int\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 2686132985, \"predicate\": \"recentMeUrlChat\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 3947431965, \"predicate\": \"recentMeUrlChatInvite\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"chat_invite\", \"type\": \"ChatInvite\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 3154794460, \"predicate\": \"recentMeUrlStickerSet\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"set\", \"type\": \"StickerSetCovered\" }], \"type\": \"RecentMeUrl\" }, { \"id\": 235081943, \"predicate\": \"help.recentMeUrls\", \"params\": [{ \"name\": \"urls\", \"type\": \"Vector<RecentMeUrl>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"help.RecentMeUrls\" }, { \"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<MessageEntity>\" }], \"type\": \"InputSingleMedia\" }, { \"id\": 3402187762, \"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\": 3981887996, \"predicate\": \"account.webAuthorizations\", \"params\": [{ \"name\": \"authorizations\", \"type\": \"Vector<WebAuthorization>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"account.WebAuthorizations\" }, { \"id\": 2792792866, \"predicate\": \"inputMessageID\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }], \"type\": \"InputMessage\" }, { \"id\": 3134751637, \"predicate\": \"inputMessageReplyTo\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }], \"type\": \"InputMessage\" }, { \"id\": 2257003832, \"predicate\": \"inputMessagePinned\", \"params\": [], \"type\": \"InputMessage\" }, { \"id\": 4239064759, \"predicate\": \"inputDialogPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"InputDialogPeer\" }, { \"id\": 1684014375, \"predicate\": \"inputDialogPeerFolder\", \"params\": [{ \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"InputDialogPeer\" }, { \"id\": 3849174789, \"predicate\": \"dialogPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }], \"type\": \"DialogPeer\" }, { \"id\": 1363483106, \"predicate\": \"dialogPeerFolder\", \"params\": [{ \"name\": \"folder_id\", \"type\": \"int\" }], \"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<StickerSetCovered>\" }], \"type\": \"messages.FoundStickerSets\" }, { \"id\": 1648543603, \"predicate\": \"fileHash\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }, { \"name\": \"hash\", \"type\": \"bytes\" }], \"type\": \"FileHash\" }, { \"id\": 1968737087, \"predicate\": \"inputClientProxy\", \"params\": [{ \"name\": \"address\", \"type\": \"string\" }, { \"name\": \"port\", \"type\": \"int\" }], \"type\": \"InputClientProxy\" }, { \"id\": 3811614591, \"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\": 1679398724, \"predicate\": \"secureFileEmpty\", \"params\": [], \"type\": \"SecureFile\" }, { \"id\": 3760683618, \"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\": 2330640067, \"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\": 2636808675, \"predicate\": \"secureValueTypePersonalDetails\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 1034709504, \"predicate\": \"secureValueTypePassport\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 115615172, \"predicate\": \"secureValueTypeDriverLicense\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2698015819, \"predicate\": \"secureValueTypeIdentityCard\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2577698595, \"predicate\": \"secureValueTypeInternalPassport\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 3420659238, \"predicate\": \"secureValueTypeAddress\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 4231435598, \"predicate\": \"secureValueTypeUtilityBill\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2299755533, \"predicate\": \"secureValueTypeBankStatement\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2340959368, \"predicate\": \"secureValueTypeRentalAgreement\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2581823594, \"predicate\": \"secureValueTypePassportRegistration\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 3926060083, \"predicate\": \"secureValueTypeTemporaryRegistration\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 3005262555, \"predicate\": \"secureValueTypePhone\", \"params\": [], \"type\": \"SecureValueType\" }, { \"id\": 2386339822, \"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<SecureFile>\" }, { \"name\": \"files\", \"type\": \"flags.4?Vector<SecureFile>\" }, { \"name\": \"plain_data\", \"type\": \"flags.5?SecurePlainData\" }, { \"name\": \"hash\", \"type\": \"bytes\" }], \"type\": \"SecureValue\" }, { \"id\": 3676426407, \"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<InputSecureFile>\" }, { \"name\": \"files\", \"type\": \"flags.4?Vector<InputSecureFile>\" }, { \"name\": \"plain_data\", \"type\": \"flags.5?SecurePlainData\" }], \"type\": \"InputSecureValue\" }, { \"id\": 3978218928, \"predicate\": \"secureValueHash\", \"params\": [{ \"name\": \"type\", \"type\": \"SecureValueType\" }, { \"name\": \"hash\", \"type\": \"bytes\" }], \"type\": \"SecureValueHash\" }, { \"id\": 3903065049, \"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\": 2257201829, \"predicate\": \"secureValueErrorReverseSide\", \"params\": [{ \"name\": \"type\", \"type\": \"SecureValueType\" }, { \"name\": \"file_hash\", \"type\": \"bytes\" }, { \"name\": \"text\", \"type\": \"string\" }], \"type\": \"SecureValueError\" }, { \"id\": 3845639894, \"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<bytes>\" }, { \"name\": \"text\", \"type\": \"string\" }], \"type\": \"SecureValueError\" }, { \"id\": 2258466191, \"predicate\": \"secureValueError\", \"params\": [{ \"name\": \"type\", \"type\": \"SecureValueType\" }, { \"name\": \"hash\", \"type\": \"bytes\" }, { \"name\": \"text\", \"type\": \"string\" }], \"type\": \"SecureValueError\" }, { \"id\": 2702460784, \"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<bytes>\" }, { \"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\": 2905480408, \"predicate\": \"account.authorizationForm\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"required_types\", \"type\": \"Vector<SecureRequiredType>\" }, { \"name\": \"values\", \"type\": \"Vector<SecureValue>\" }, { \"name\": \"errors\", \"type\": \"Vector<SecureValueError>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"privacy_policy_url\", \"type\": \"flags.0?string\" }], \"type\": \"account.AuthorizationForm\" }, { \"id\": 2166326607, \"predicate\": \"account.sentEmailCode\", \"params\": [{ \"name\": \"email_pattern\", \"type\": \"string\" }, { \"name\": \"length\", \"type\": \"int\" }], \"type\": \"account.SentEmailCode\" }, { \"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<MessageEntity>\" }], \"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\": 3562713238, \"predicate\": \"passwordKdfAlgoUnknown\", \"params\": [], \"type\": \"PasswordKdfAlgo\" }, { \"id\": 982592842, \"predicate\": \"passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow\", \"params\": [{ \"name\": \"salt1\", \"type\": \"bytes\" }, { \"name\": \"salt2\", \"type\": \"bytes\" }, { \"name\": \"g\", \"type\": \"int\" }, { \"name\": \"p\", \"type\": \"bytes\" }], \"type\": \"PasswordKdfAlgo\" }, { \"id\": 4883767, \"predicate\": \"securePasswordKdfAlgoUnknown\", \"params\": [], \"type\": \"SecurePasswordKdfAlgo\" }, { \"id\": 3153255840, \"predicate\": \"securePasswordKdfAlgoPBKDF2HMACSHA512iter100000\", \"params\": [{ \"name\": \"salt\", \"type\": \"bytes\" }], \"type\": \"SecurePasswordKdfAlgo\" }, { \"id\": 2252807570, \"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\": 2558588504, \"predicate\": \"inputCheckPasswordEmpty\", \"params\": [], \"type\": \"InputCheckPasswordSRP\" }, { \"id\": 3531600002, \"predicate\": \"inputCheckPasswordSRP\", \"params\": [{ \"name\": \"srp_id\", \"type\": \"long\" }, { \"name\": \"A\", \"type\": \"bytes\" }, { \"name\": \"M1\", \"type\": \"bytes\" }], \"type\": \"InputCheckPasswordSRP\" }, { \"id\": 2191366618, \"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<SecureRequiredType>\" }], \"type\": \"SecureRequiredType\" }, { \"id\": 3216634967, \"predicate\": \"help.passportConfigNotModified\", \"params\": [], \"type\": \"help.PassportConfig\" }, { \"id\": 2694370991, \"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\": 3235781593, \"predicate\": \"jsonObjectValue\", \"params\": [{ \"name\": \"key\", \"type\": \"string\" }, { \"name\": \"value\", \"type\": \"JSONValue\" }], \"type\": \"JSONObjectValue\" }, { \"id\": 1064139624, \"predicate\": \"jsonNull\", \"params\": [], \"type\": \"JSONValue\" }, { \"id\": 3342098026, \"predicate\": \"jsonBool\", \"params\": [{ \"name\": \"value\", \"type\": \"Bool\" }], \"type\": \"JSONValue\" }, { \"id\": 736157604, \"predicate\": \"jsonNumber\", \"params\": [{ \"name\": \"value\", \"type\": \"double\" }], \"type\": \"JSONValue\" }, { \"id\": 3072226938, \"predicate\": \"jsonString\", \"params\": [{ \"name\": \"value\", \"type\": \"string\" }], \"type\": \"JSONValue\" }, { \"id\": 4148447075, \"predicate\": \"jsonArray\", \"params\": [{ \"name\": \"value\", \"type\": \"Vector<JSONValue>\" }], \"type\": \"JSONValue\" }, { \"id\": 2579616925, \"predicate\": \"jsonObject\", \"params\": [{ \"name\": \"value\", \"type\": \"Vector<JSONObjectValue>\" }], \"type\": \"JSONValue\" }, { \"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\": 3770729957, \"predicate\": \"pageTableRow\", \"params\": [{ \"name\": \"cells\", \"type\": \"Vector<PageTableCell>\" }], \"type\": \"PageTableRow\" }, { \"id\": 1869903447, \"predicate\": \"pageCaption\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }, { \"name\": \"credit\", \"type\": \"RichText\" }], \"type\": \"PageCaption\" }, { \"id\": 3106911949, \"predicate\": \"pageListItemText\", \"params\": [{ \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageListItem\" }, { \"id\": 635466748, \"predicate\": \"pageListItemBlocks\", \"params\": [{ \"name\": \"blocks\", \"type\": \"Vector<PageBlock>\" }], \"type\": \"PageListItem\" }, { \"id\": 1577484359, \"predicate\": \"pageListOrderedItemText\", \"params\": [{ \"name\": \"num\", \"type\": \"string\" }, { \"name\": \"text\", \"type\": \"RichText\" }], \"type\": \"PageListOrderedItem\" }, { \"id\": 2564655414, \"predicate\": \"pageListOrderedItemBlocks\", \"params\": [{ \"name\": \"num\", \"type\": \"string\" }, { \"name\": \"blocks\", \"type\": \"Vector<PageBlock>\" }], \"type\": \"PageListOrderedItem\" }, { \"id\": 3012615176, \"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\": 2556788493, \"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<PageBlock>\" }, { \"name\": \"photos\", \"type\": \"Vector<Photo>\" }, { \"name\": \"documents\", \"type\": \"Vector<Document>\" }, { \"name\": \"views\", \"type\": \"flags.3?int\" }], \"type\": \"Page\" }, { \"id\": 2349199817, \"predicate\": \"help.supportName\", \"params\": [{ \"name\": \"name\", \"type\": \"string\" }], \"type\": \"help.SupportName\" }, { \"id\": 4088278765, \"predicate\": \"help.userInfoEmpty\", \"params\": [], \"type\": \"help.UserInfo\" }, { \"id\": 32192344, \"predicate\": \"help.userInfo\", \"params\": [{ \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"Vector<MessageEntity>\" }, { \"name\": \"author\", \"type\": \"string\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"help.UserInfo\" }, { \"id\": 1823064809, \"predicate\": \"pollAnswer\", \"params\": [{ \"name\": \"text\", \"type\": \"string\" }, { \"name\": \"option\", \"type\": \"bytes\" }], \"type\": \"PollAnswer\" }, { \"id\": 2262925665, \"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<PollAnswer>\" }, { \"name\": \"close_period\", \"type\": \"flags.4?int\" }, { \"name\": \"close_date\", \"type\": \"flags.5?int\" }], \"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\": 3135029667, \"predicate\": \"pollResults\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"min\", \"type\": \"flags.0?true\" }, { \"name\": \"results\", \"type\": \"flags.1?Vector<PollAnswerVoters>\" }, { \"name\": \"total_voters\", \"type\": \"flags.2?int\" }, { \"name\": \"recent_voters\", \"type\": \"flags.3?Vector<int>\" }, { \"name\": \"solution\", \"type\": \"flags.4?string\" }, { \"name\": \"solution_entities\", \"type\": \"flags.4?Vector<MessageEntity>\" }], \"type\": \"PollResults\" }, { \"id\": 4030849616, \"predicate\": \"chatOnlines\", \"params\": [{ \"name\": \"onlines\", \"type\": \"int\" }], \"type\": \"ChatOnlines\" }, { \"id\": 1202287072, \"predicate\": \"statsURL\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"type\": \"StatsURL\" }, { \"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\": 2668758040, \"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\": 3861952889, \"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\": 2217196460, \"predicate\": \"inputWallPaperNoFile\", \"params\": [], \"type\": \"InputWallPaper\" }, { \"id\": 471437699, \"predicate\": \"account.wallPapersNotModified\", \"params\": [], \"type\": \"account.WallPapers\" }, { \"id\": 1881892265, \"predicate\": \"account.wallPapers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"wallpapers\", \"type\": \"Vector<WallPaper>\" }], \"type\": \"account.WallPapers\" }, { \"id\": 3737042563, \"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\": 3762434803, \"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\": 3585325561, \"predicate\": \"emojiKeyword\", \"params\": [{ \"name\": \"keyword\", \"type\": \"string\" }, { \"name\": \"emoticons\", \"type\": \"Vector<string>\" }], \"type\": \"EmojiKeyword\" }, { \"id\": 594408994, \"predicate\": \"emojiKeywordDeleted\", \"params\": [{ \"name\": \"keyword\", \"type\": \"string\" }, { \"name\": \"emoticons\", \"type\": \"Vector<string>\" }], \"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<EmojiKeyword>\" }], \"type\": \"EmojiKeywordsDifference\" }, { \"id\": 2775937949, \"predicate\": \"emojiURL\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"type\": \"EmojiURL\" }, { \"id\": 3019592545, \"predicate\": \"emojiLanguage\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"EmojiLanguage\" }, { \"id\": 3162490573, \"predicate\": \"fileLocationToBeDeprecated\", \"params\": [{ \"name\": \"volume_id\", \"type\": \"long\" }, { \"name\": \"local_id\", \"type\": \"int\" }], \"type\": \"FileLocation\" }, { \"id\": 4283715173, \"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\": 4224893590, \"predicate\": \"inputFolderPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"InputFolderPeer\" }, { \"id\": 3921323624, \"predicate\": \"folderPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"FolderPeer\" }, { \"id\": 3896830975, \"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\": 2463316494, \"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\": 2408320590, \"predicate\": \"urlAuthResultAccepted\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }], \"type\": \"UrlAuthResult\" }, { \"id\": 2849430303, \"predicate\": \"urlAuthResultDefault\", \"params\": [], \"type\": \"UrlAuthResult\" }, { \"id\": 3216354699, \"predicate\": \"channelLocationEmpty\", \"params\": [], \"type\": \"ChannelLocation\" }, { \"id\": 547062491, \"predicate\": \"channelLocation\", \"params\": [{ \"name\": \"geo_point\", \"type\": \"GeoPoint\" }, { \"name\": \"address\", \"type\": \"string\" }], \"type\": \"ChannelLocation\" }, { \"id\": 3393592157, \"predicate\": \"peerLocated\", \"params\": [{ \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"expires\", \"type\": \"int\" }, { \"name\": \"distance\", \"type\": \"int\" }], \"type\": \"PeerLocated\" }, { \"id\": 4176226379, \"predicate\": \"peerSelfLocated\", \"params\": [{ \"name\": \"expires\", \"type\": \"int\" }], \"type\": \"PeerLocated\" }, { \"id\": 3497176244, \"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\": 4119399921, \"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\": 4095653410, \"predicate\": \"account.themesNotModified\", \"params\": [], \"type\": \"account.Themes\" }, { \"id\": 2137482273, \"predicate\": \"account.themes\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }, { \"name\": \"themes\", \"type\": \"Vector<Theme>\" }], \"type\": \"account.Themes\" }, { \"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\": 2837970629, \"predicate\": \"messages.inactiveChats\", \"params\": [{ \"name\": \"dates\", \"type\": \"Vector<int>\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }], \"type\": \"messages.InactiveChats\" }, { \"id\": 3282117730, \"predicate\": \"baseThemeClassic\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 4225242760, \"predicate\": \"baseThemeDay\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 3081969320, \"predicate\": \"baseThemeNight\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 1834973166, \"predicate\": \"baseThemeTinted\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 1527845466, \"predicate\": \"baseThemeArctic\", \"params\": [], \"type\": \"BaseTheme\" }, { \"id\": 3176168657, \"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\": 2618595402, \"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<Document>\" }, { \"name\": \"settings\", \"type\": \"flags.1?ThemeSettings\" }], \"type\": \"WebPageAttribute\" }, { \"id\": 2727236953, \"predicate\": \"messageUserVote\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"option\", \"type\": \"bytes\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"MessageUserVote\" }, { \"id\": 909603888, \"predicate\": \"messageUserVoteInputOption\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"MessageUserVote\" }, { \"id\": 244310238, \"predicate\": \"messageUserVoteMultiple\", \"params\": [{ \"name\": \"user_id\", \"type\": \"int\" }, { \"name\": \"options\", \"type\": \"Vector<bytes>\" }, { \"name\": \"date\", \"type\": \"int\" }], \"type\": \"MessageUserVote\" }, { \"id\": 136574537, \"predicate\": \"messages.votesList\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"count\", \"type\": \"int\" }, { \"name\": \"votes\", \"type\": \"Vector<MessageUserVote>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"next_offset\", \"type\": \"flags.0?string\" }], \"type\": \"messages.VotesList\" }, { \"id\": 4117234314, \"predicate\": \"bankCardOpenUrl\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"name\", \"type\": \"string\" }], \"type\": \"BankCardOpenUrl\" }, { \"id\": 1042605427, \"predicate\": \"payments.bankCardData\", \"params\": [{ \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"open_urls\", \"type\": \"Vector<BankCardOpenUrl>\" }], \"type\": \"payments.BankCardData\" }, { \"id\": 1949890536, \"predicate\": \"dialogFilter\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"contacts\", \"type\": \"flags.0?true\" }, { \"name\": \"non_contacts\", \"type\": \"flags.1?true\" }, { \"name\": \"groups\", \"type\": \"flags.2?true\" }, { \"name\": \"broadcasts\", \"type\": \"flags.3?true\" }, { \"name\": \"bots\", \"type\": \"flags.4?true\" }, { \"name\": \"exclude_muted\", \"type\": \"flags.11?true\" }, { \"name\": \"exclude_read\", \"type\": \"flags.12?true\" }, { \"name\": \"exclude_archived\", \"type\": \"flags.13?true\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"emoticon\", \"type\": \"flags.25?string\" }, { \"name\": \"pinned_peers\", \"type\": \"Vector<InputPeer>\" }, { \"name\": \"include_peers\", \"type\": \"Vector<InputPeer>\" }, { \"name\": \"exclude_peers\", \"type\": \"Vector<InputPeer>\" }], \"type\": \"DialogFilter\" }, { \"id\": 2004110666, \"predicate\": \"dialogFilterSuggested\", \"params\": [{ \"name\": \"filter\", \"type\": \"DialogFilter\" }, { \"name\": \"description\", \"type\": \"string\" }], \"type\": \"DialogFilterSuggested\" }, { \"id\": 3057118639, \"predicate\": \"statsDateRangeDays\", \"params\": [{ \"name\": \"min_date\", \"type\": \"int\" }, { \"name\": \"max_date\", \"type\": \"int\" }], \"type\": \"StatsDateRangeDays\" }, { \"id\": 3410210014, \"predicate\": \"statsAbsValueAndPrev\", \"params\": [{ \"name\": \"current\", \"type\": \"double\" }, { \"name\": \"previous\", \"type\": \"double\" }], \"type\": \"StatsAbsValueAndPrev\" }, { \"id\": 3419287520, \"predicate\": \"statsPercentValue\", \"params\": [{ \"name\": \"part\", \"type\": \"double\" }, { \"name\": \"total\", \"type\": \"double\" }], \"type\": \"StatsPercentValue\" }, { \"id\": 1244130093, \"predicate\": \"statsGraphAsync\", \"params\": [{ \"name\": \"token\", \"type\": \"string\" }], \"type\": \"StatsGraph\" }, { \"id\": 3202127906, \"predicate\": \"statsGraphError\", \"params\": [{ \"name\": \"error\", \"type\": \"string\" }], \"type\": \"StatsGraph\" }, { \"id\": 2393138358, \"predicate\": \"statsGraph\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"json\", \"type\": \"DataJSON\" }, { \"name\": \"zoom_token\", \"type\": \"flags.0?string\" }], \"type\": \"StatsGraph\" }, { \"id\": 2907687357, \"predicate\": \"messageInteractionCounters\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"views\", \"type\": \"int\" }, { \"name\": \"forwards\", \"type\": \"int\" }], \"type\": \"MessageInteractionCounters\" }, { \"id\": 3187114900, \"predicate\": \"stats.broadcastStats\", \"params\": [{ \"name\": \"period\", \"type\": \"StatsDateRangeDays\" }, { \"name\": \"followers\", \"type\": \"StatsAbsValueAndPrev\" }, { \"name\": \"views_per_post\", \"type\": \"StatsAbsValueAndPrev\" }, { \"name\": \"shares_per_post\", \"type\": \"StatsAbsValueAndPrev\" }, { \"name\": \"enabled_notifications\", \"type\": \"StatsPercentValue\" }, { \"name\": \"growth_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"followers_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"mute_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"top_hours_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"interactions_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"iv_interactions_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"views_by_source_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"new_followers_by_source_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"languages_graph\", \"type\": \"StatsGraph\" }, { \"name\": \"recent_message_interactions\", \"type\": \"Vector<MessageInteractionCounters>\" }], \"type\": \"stats.BroadcastStats\" }, { \"id\": 2566302837, \"predicate\": \"help.promoDataEmpty\", \"params\": [{ \"name\": \"expires\", \"type\": \"int\" }], \"type\": \"help.PromoData\" }, { \"id\": 2352576831, \"predicate\": \"help.promoData\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"proxy\", \"type\": \"flags.0?true\" }, { \"name\": \"expires\", \"type\": \"int\" }, { \"name\": \"peer\", \"type\": \"Peer\" }, { \"name\": \"chats\", \"type\": \"Vector<Chat>\" }, { \"name\": \"users\", \"type\": \"Vector<User>\" }, { \"name\": \"psa_type\", \"type\": \"flags.1?string\" }, { \"name\": \"psa_message\", \"type\": \"flags.2?string\" }], \"type\": \"help.PromoData\" }], \"methods\": [{ \"id\": 3416209197, \"method\": \"invokeAfterMsg\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"long\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 1036301552, \"method\": \"invokeAfterMsgs\", \"params\": [{ \"name\": \"msg_ids\", \"type\": \"Vector<long>\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 3251461801, \"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\": \"params\", \"type\": \"flags.1?JSONValue\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 3667594509, \"method\": \"invokeWithLayer\", \"params\": [{ \"name\": \"layer\", \"type\": \"int\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 3214170551, \"method\": \"invokeWithoutUpdates\", \"params\": [{ \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 911373810, \"method\": \"invokeWithMessagesRange\", \"params\": [{ \"name\": \"range\", \"type\": \"MessageRange\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 2896821550, \"method\": \"invokeWithTakeout\", \"params\": [{ \"name\": \"takeout_id\", \"type\": \"long\" }, { \"name\": \"query\", \"type\": \"!X\" }], \"type\": \"X\" }, { \"id\": 2792825935, \"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\": 2163139623, \"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\": 3168081281, \"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\": 2678787354, \"method\": \"auth.resetAuthorizations\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 3854565325, \"method\": \"auth.exportAuthorization\", \"params\": [{ \"name\": \"dc_id\", \"type\": \"int\" }], \"type\": \"auth.ExportedAuthorization\" }, { \"id\": 3824129555, \"method\": \"auth.importAuthorization\", \"params\": [{ \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"auth.Authorization\" }, { \"id\": 3453233669, \"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\": 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\": 3515567382, \"method\": \"auth.checkPassword\", \"params\": [{ \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }], \"type\": \"auth.Authorization\" }, { \"id\": 3633822822, \"method\": \"auth.requestPasswordRecovery\", \"params\": [], \"type\": \"auth.PasswordRecovery\" }, { \"id\": 1319464594, \"method\": \"auth.recoverPassword\", \"params\": [{ \"name\": \"code\", \"type\": \"string\" }], \"type\": \"auth.Authorization\" }, { \"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\": 2387124616, \"method\": \"auth.dropTempAuthKeys\", \"params\": [{ \"name\": \"except_auth_keys\", \"type\": \"Vector<long>\" }], \"type\": \"Bool\" }, { \"id\": 2981369111, \"method\": \"auth.exportLoginToken\", \"params\": [{ \"name\": \"api_id\", \"type\": \"int\" }, { \"name\": \"api_hash\", \"type\": \"string\" }, { \"name\": \"except_ids\", \"type\": \"Vector<int>\" }], \"type\": \"auth.LoginToken\" }, { \"id\": 2511101156, \"method\": \"auth.importLoginToken\", \"params\": [{ \"name\": \"token\", \"type\": \"bytes\" }], \"type\": \"auth.LoginToken\" }, { \"id\": 3902057805, \"method\": \"auth.acceptLoginToken\", \"params\": [{ \"name\": \"token\", \"type\": \"bytes\" }], \"type\": \"Authorization\" }, { \"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<int>\" }], \"type\": \"Bool\" }, { \"id\": 813089983, \"method\": \"account.unregisterDevice\", \"params\": [{ \"name\": \"token_type\", \"type\": \"int\" }, { \"name\": \"token\", \"type\": \"string\" }, { \"name\": \"other_uids\", \"type\": \"Vector<int>\" }], \"type\": \"Bool\" }, { \"id\": 2227067795, \"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\": 3682473799, \"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\": 2864387939, \"method\": \"account.getWallPapers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"account.WallPapers\" }, { \"id\": 2920848735, \"method\": \"account.reportPeer\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"reason\", \"type\": \"ReportReason\" }], \"type\": \"Bool\" }, { \"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\": 3671837008, \"method\": \"account.getPrivacy\", \"params\": [{ \"name\": \"key\", \"type\": \"InputPrivacyKey\" }], \"type\": \"account.PrivacyRules\" }, { \"id\": 3388480744, \"method\": \"account.setPrivacy\", \"params\": [{ \"name\": \"key\", \"type\": \"InputPrivacyKey\" }, { \"name\": \"rules\", \"type\": \"Vector<InputPrivacyRule>\" }], \"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\": 2186758885, \"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\": 954152242, \"method\": \"account.updateDeviceLocked\", \"params\": [{ \"name\": \"period\", \"type\": \"int\" }], \"type\": \"Bool\" }, { \"id\": 3810574680, \"method\": \"account.getAuthorizations\", \"params\": [], \"type\": \"account.Authorizations\" }, { \"id\": 3749180348, \"method\": \"account.resetAuthorization\", \"params\": [{ \"name\": \"hash\", \"type\": \"long\" }], \"type\": \"Bool\" }, { \"id\": 1418342645, \"method\": \"account.getPassword\", \"params\": [], \"type\": \"account.Password\" }, { \"id\": 2631199481, \"method\": \"account.getPasswordSettings\", \"params\": [{ \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }], \"type\": \"account.PasswordSettings\" }, { \"id\": 2778402863, \"method\": \"account.updatePasswordSettings\", \"params\": [{ \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }, { \"name\": \"new_settings\", \"type\": \"account.PasswordInputSettings\" }], \"type\": \"Bool\" }, { \"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\": 1151208273, \"method\": \"account.getTmpPassword\", \"params\": [{ \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }, { \"name\": \"period\", \"type\": \"int\" }], \"type\": \"account.TmpPassword\" }, { \"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\": 2995305597, \"method\": \"account.getAllSecureValues\", \"params\": [], \"type\": \"Vector<SecureValue>\" }, { \"id\": 1936088002, \"method\": \"account.getSecureValue\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector<SecureValueType>\" }], \"type\": \"Vector<SecureValue>\" }, { \"id\": 2308956957, \"method\": \"account.saveSecureValue\", \"params\": [{ \"name\": \"value\", \"type\": \"InputSecureValue\" }, { \"name\": \"secure_secret_id\", \"type\": \"long\" }], \"type\": \"SecureValue\" }, { \"id\": 3095444555, \"method\": \"account.deleteSecureValue\", \"params\": [{ \"name\": \"types\", \"type\": \"Vector<SecureValueType>\" }], \"type\": \"Bool\" }, { \"id\": 3094063329, \"method\": \"account.getAuthorizationForm\", \"params\": [{ \"name\": \"bot_id\", \"type\": \"int\" }, { \"name\": \"scope\", \"type\": \"string\" }, { \"name\": \"public_key\", \"type\": \"string\" }], \"type\": \"account.AuthorizationForm\" }, { \"id\": 3875699860, \"method\": \"account.acceptAuthorization\", \"params\": [{ \"name\": \"bot_id\", \"type\": \"int\" }, { \"name\": \"scope\", \"type\": \"string\" }, { \"name\": \"public_key\", \"type\": \"string\" }, { \"name\": \"value_hashes\", \"type\": \"Vector<SecureValueHash>\" }, { \"name\": \"credentials\", \"type\": \"SecureCredentialsEncrypted\" }], \"type\": \"Bool\" }, { \"id\": 2778945273, \"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\": 3971627483, \"method\": \"account.verifyEmail\", \"params\": [{ \"name\": \"email\", \"type\": \"string\" }, { \"name\": \"code\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 4032514052, \"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\": 2413762848, \"method\": \"account.confirmPasswordEmail\", \"params\": [{ \"name\": \"code\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 2055154197, \"method\": \"account.resendPasswordEmail\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 3251361206, \"method\": \"account.cancelPasswordEmail\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 2668087080, \"method\": \"account.getContactSignUpNotification\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 3488890721, \"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\": 4237155306, \"method\": \"account.getWallPaper\", \"params\": [{ \"name\": \"wallpaper\", \"type\": \"InputWallPaper\" }], \"type\": \"WallPaper\" }, { \"id\": 3716494945, \"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\": 4276967273, \"method\": \"account.installWallPaper\", \"params\": [{ \"name\": \"wallpaper\", \"type\": \"InputWallPaper\" }, { \"name\": \"settings\", \"type\": \"WallPaperSettings\" }], \"type\": \"Bool\" }, { \"id\": 3141244932, \"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\": 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\": 2217919007, \"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\": 4065792108, \"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\": 2375906347, \"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\": 3044323691, \"method\": \"account.setContentSettings\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"sensitive_enabled\", \"type\": \"flags.0?true\" }], \"type\": \"Bool\" }, { \"id\": 2342210990, \"method\": \"account.getContentSettings\", \"params\": [], \"type\": \"account.ContentSettings\" }, { \"id\": 1705865692, \"method\": \"account.getMultiWallPapers\", \"params\": [{ \"name\": \"wallpapers\", \"type\": \"Vector<InputWallPaper>\" }], \"type\": \"Vector<WallPaper>\" }, { \"id\": 227648840, \"method\": \"users.getUsers\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<InputUser>\" }], \"type\": \"Vector<User>\" }, { \"id\": 3392185777, \"method\": \"users.getFullUser\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"UserFull\" }, { \"id\": 2429064373, \"method\": \"users.setSecureValueErrors\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }, { \"name\": \"errors\", \"type\": \"Vector<SecureValueError>\" }], \"type\": \"Bool\" }, { \"id\": 749357634, \"method\": \"contacts.getContactIDs\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"Vector<int>\" }, { \"id\": 3299038190, \"method\": \"contacts.getStatuses\", \"params\": [], \"type\": \"Vector<ContactStatus>\" }, { \"id\": 3223553183, \"method\": \"contacts.getContacts\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"contacts.Contacts\" }, { \"id\": 746589157, \"method\": \"contacts.importContacts\", \"params\": [{ \"name\": \"contacts\", \"type\": \"Vector<InputContact>\" }], \"type\": \"contacts.ImportedContacts\" }, { \"id\": 157945344, \"method\": \"contacts.deleteContacts\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<InputUser>\" }], \"type\": \"Updates\" }, { \"id\": 269745566, \"method\": \"contacts.deleteByPhones\", \"params\": [{ \"name\": \"phones\", \"type\": \"Vector<string>\" }], \"type\": \"Bool\" }, { \"id\": 858475004, \"method\": \"contacts.block\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"Bool\" }, { \"id\": 3846242493, \"method\": \"contacts.unblock\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"Bool\" }, { \"id\": 4118557967, \"method\": \"contacts.getBlocked\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"contacts.Blocked\" }, { \"id\": 301470424, \"method\": \"contacts.search\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"contacts.Found\" }, { \"id\": 4181511075, \"method\": \"contacts.resolveUsername\", \"params\": [{ \"name\": \"username\", \"type\": \"string\" }], \"type\": \"contacts.ResolvedPeer\" }, { \"id\": 3566742965, \"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\": 2274703345, \"method\": \"contacts.resetSaved\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 2196890527, \"method\": \"contacts.getSaved\", \"params\": [], \"type\": \"Vector<SavedContact>\" }, { \"id\": 2232729050, \"method\": \"contacts.toggleTopPeers\", \"params\": [{ \"name\": \"enabled\", \"type\": \"Bool\" }], \"type\": \"Bool\" }, { \"id\": 3908330448, \"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\": 4164002319, \"method\": \"contacts.acceptContact\", \"params\": [{ \"name\": \"id\", \"type\": \"InputUser\" }], \"type\": \"Updates\" }, { \"id\": 3544759364, \"method\": \"contacts.getLocated\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"background\", \"type\": \"flags.1?true\" }, { \"name\": \"geo_point\", \"type\": \"InputGeoPoint\" }, { \"name\": \"self_expires\", \"type\": \"flags.0?int\" }], \"type\": \"Updates\" }, { \"id\": 1673946374, \"method\": \"messages.getMessages\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<InputMessage>\" }], \"type\": \"messages.Messages\" }, { \"id\": 2699967347, \"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\": 3703276128, \"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\": 2249518952, \"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\": 3851326930, \"method\": \"messages.deleteMessages\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"revoke\", \"type\": \"flags.0?true\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.AffectedMessages\" }, { \"id\": 94983360, \"method\": \"messages.receivedMessages\", \"params\": [{ \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Vector<ReceivedNotifyMessage>\" }, { \"id\": 2743230032, \"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<MessageEntity>\" }, { \"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<MessageEntity>\" }, { \"name\": \"schedule_date\", \"type\": \"flags.10?int\" }], \"type\": \"Updates\" }, { \"id\": 3657360910, \"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<int>\" }, { \"name\": \"random_id\", \"type\": \"Vector<long>\" }, { \"name\": \"to_peer\", \"type\": \"InputPeer\" }, { \"name\": \"schedule_date\", \"type\": \"flags.10?int\" }], \"type\": \"Updates\" }, { \"id\": 3474297563, \"method\": \"messages.reportSpam\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"Bool\" }, { \"id\": 913498268, \"method\": \"messages.getPeerSettings\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"PeerSettings\" }, { \"id\": 3179460184, \"method\": \"messages.report\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }, { \"name\": \"reason\", \"type\": \"ReportReason\" }], \"type\": \"Bool\" }, { \"id\": 1013621127, \"method\": \"messages.getChats\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.Chats\" }, { \"id\": 998448230, \"method\": \"messages.getFullChat\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }], \"type\": \"messages.ChatFull\" }, { \"id\": 3695519829, \"method\": \"messages.editChatTitle\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"title\", \"type\": \"string\" }], \"type\": \"Updates\" }, { \"id\": 3394009560, \"method\": \"messages.editChatPhoto\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"photo\", \"type\": \"InputChatPhoto\" }], \"type\": \"Updates\" }, { \"id\": 4188056073, \"method\": \"messages.addChatUser\", \"params\": [{ \"name\": \"chat_id\", \"type\": \"int\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }, { \"name\": \"fwd_limit\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 3764461334, \"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<InputUser>\" }, { \"name\": \"title\", \"type\": \"string\" }], \"type\": \"Updates\" }, { \"id\": 651135312, \"method\": \"messages.getDhConfig\", \"params\": [{ \"name\": \"version\", \"type\": \"int\" }, { \"name\": \"random_length\", \"type\": \"int\" }], \"type\": \"messages.DhConfig\" }, { \"id\": 4132286275, \"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\": 3990430661, \"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\": 2843174771, \"method\": \"messages.sendEncrypted\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputEncryptedChat\" }, { \"name\": \"random_id\", \"type\": \"long\" }, { \"name\": \"data\", \"type\": \"bytes\" }], \"type\": \"messages.SentEncryptedMessage\" }, { \"id\": 2593135462, \"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<long>\" }, { \"id\": 1259113487, \"method\": \"messages.reportEncryptedSpam\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputEncryptedChat\" }], \"type\": \"Bool\" }, { \"id\": 916930423, \"method\": \"messages.readMessageContents\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.AffectedMessages\" }, { \"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\": 2338894028, \"method\": \"messages.getWebPagePreview\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"message\", \"type\": \"string\" }, { \"name\": \"entities\", \"type\": \"flags.3?Vector<MessageEntity>\" }], \"type\": \"MessageMedia\" }, { \"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\": 3348096096, \"method\": \"messages.installStickerSet\", \"params\": [{ \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }, { \"name\": \"archived\", \"type\": \"Bool\" }], \"type\": \"messages.StickerSetInstallResult\" }, { \"id\": 4184757726, \"method\": \"messages.uninstallStickerSet\", \"params\": [{ \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }], \"type\": \"Bool\" }, { \"id\": 3873403768, \"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\": 3301483869, \"method\": \"messages.getMessagesViews\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }, { \"name\": \"increment\", \"type\": \"Bool\" }], \"type\": \"Vector<int>\" }, { \"id\": 2850463534, \"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\": 3211928996, \"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<long>\" }], \"type\": \"Bool\" }, { \"id\": 864953444, \"method\": \"messages.getDocumentByHash\", \"params\": [{ \"name\": \"sha256\", \"type\": \"bytes\" }, { \"name\": \"size\", \"type\": \"int\" }, { \"name\": \"mime_type\", \"type\": \"string\" }], \"type\": \"Document\" }, { \"id\": 3214571371, \"method\": \"messages.searchGifs\", \"params\": [{ \"name\": \"q\", \"type\": \"string\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"messages.FoundGifs\" }, { \"id\": 2210348370, \"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\": 3948847622, \"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<InputBotInlineResult>\" }, { \"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\": 4255550774, \"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<MessageEntity>\" }, { \"name\": \"schedule_date\", \"type\": \"flags.15?int\" }], \"type\": \"Updates\" }, { \"id\": 2203418042, \"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<MessageEntity>\" }], \"type\": \"Bool\" }, { \"id\": 2164957164, \"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\": 3582923530, \"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\": 3832593661, \"method\": \"messages.getPeerDialogs\", \"params\": [{ \"name\": \"peers\", \"type\": \"Vector<InputDialogPeer>\" }], \"type\": \"messages.PeerDialogs\" }, { \"id\": 3157909835, \"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<MessageEntity>\" }], \"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<long>\" }], \"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\": 2308530221, \"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\": 1706608543, \"method\": \"messages.getMaskStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.AllStickers\" }, { \"id\": 3428542412, \"method\": \"messages.getAttachedStickers\", \"params\": [{ \"name\": \"media\", \"type\": \"InputStickeredMedia\" }], \"type\": \"Vector<StickerSetCovered>\" }, { \"id\": 2398678208, \"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\": 3894568093, \"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\": 3953659888, \"method\": \"messages.getAllChats\", \"params\": [{ \"name\": \"except_ids\", \"type\": \"Vector<int>\" }], \"type\": \"messages.Chats\" }, { \"id\": 852135825, \"method\": \"messages.getWebPage\", \"params\": [{ \"name\": \"url\", \"type\": \"string\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"WebPage\" }, { \"id\": 2805064279, \"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<InputDialogPeer>\" }], \"type\": \"Bool\" }, { \"id\": 3602468338, \"method\": \"messages.getPinnedDialogs\", \"params\": [{ \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"messages.PeerDialogs\" }, { \"id\": 3858133754, \"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<ShippingOption>\" }], \"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\": 1369162417, \"method\": \"messages.uploadMedia\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"media\", \"type\": \"InputMedia\" }], \"type\": \"MessageMedia\" }, { \"id\": 3380473888, \"method\": \"messages.sendScreenshotNotification\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"reply_to_msg_id\", \"type\": \"int\" }, { \"name\": \"random_id\", \"type\": \"long\" }], \"type\": \"Updates\" }, { \"id\": 567151374, \"method\": \"messages.getFavedStickers\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.FavedStickers\" }, { \"id\": 3120547163, \"method\": \"messages.faveSticker\", \"params\": [{ \"name\": \"id\", \"type\": \"InputDocument\" }, { \"name\": \"unfave\", \"type\": \"Bool\" }], \"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\": 251759059, \"method\": \"messages.readMentions\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"messages.AffectedHistory\" }, { \"id\": 3150207753, \"method\": \"messages.getRecentLocations\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"limit\", \"type\": \"int\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.Messages\" }, { \"id\": 3422621899, \"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<InputSingleMedia>\" }, { \"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\": 3266826379, \"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\": 486505992, \"method\": \"messages.getSplitRanges\", \"params\": [], \"type\": \"Vector<MessageRange>\" }, { \"id\": 3263617423, \"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<DialogPeer>\" }, { \"id\": 2119757468, \"method\": \"messages.clearAllDrafts\", \"params\": [], \"type\": \"Bool\" }, { \"id\": 3534419948, \"method\": \"messages.updatePinnedMessage\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"silent\", \"type\": \"flags.0?true\" }, { \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 283795844, \"method\": \"messages.sendVote\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"options\", \"type\": \"Vector<bytes>\" }], \"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\": 2167155430, \"method\": \"messages.getStatsURL\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"dark\", \"type\": \"flags.0?true\" }, { \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"params\", \"type\": \"string\" }], \"type\": \"StatsURL\" }, { \"id\": 3740665751, \"method\": \"messages.editChatAbout\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"about\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 2777049921, \"method\": \"messages.editChatDefaultBannedRights\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"banned_rights\", \"type\": \"ChatBannedRights\" }], \"type\": \"Updates\" }, { \"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<string>\" }], \"type\": \"Vector<EmojiLanguage>\" }, { \"id\": 3585149990, \"method\": \"messages.getEmojiURL\", \"params\": [{ \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"EmojiURL\" }, { \"id\": 1932455680, \"method\": \"messages.getSearchCounters\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"filters\", \"type\": \"Vector<MessagesFilter>\" }], \"type\": \"Vector<messages.SearchCounter>\" }, { \"id\": 3812578835, \"method\": \"messages.requestUrlAuth\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"msg_id\", \"type\": \"int\" }, { \"name\": \"button_id\", \"type\": \"int\" }], \"type\": \"UrlAuthResult\" }, { \"id\": 4146719384, \"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\": 3804391515, \"method\": \"messages.getScheduledHistory\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.Messages\" }, { \"id\": 3183150180, \"method\": \"messages.getScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.Messages\" }, { \"id\": 3174597898, \"method\": \"messages.sendScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"Updates\" }, { \"id\": 1504586518, \"method\": \"messages.deleteScheduledMessages\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"Updates\" }, { \"id\": 3094231054, \"method\": \"messages.getPollVotes\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"peer\", \"type\": \"InputPeer\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"option\", \"type\": \"flags.0?bytes\" }, { \"name\": \"offset\", \"type\": \"flags.1?string\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"messages.VotesList\" }, { \"id\": 3037016042, \"method\": \"messages.toggleStickerSets\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"uninstall\", \"type\": \"flags.0?true\" }, { \"name\": \"archive\", \"type\": \"flags.1?true\" }, { \"name\": \"unarchive\", \"type\": \"flags.2?true\" }, { \"name\": \"stickersets\", \"type\": \"Vector<InputStickerSet>\" }], \"type\": \"Bool\" }, { \"id\": 4053719405, \"method\": \"messages.getDialogFilters\", \"params\": [], \"type\": \"Vector<DialogFilter>\" }, { \"id\": 2728186924, \"method\": \"messages.getSuggestedDialogFilters\", \"params\": [], \"type\": \"Vector<DialogFilterSuggested>\" }, { \"id\": 450142282, \"method\": \"messages.updateDialogFilter\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"id\", \"type\": \"int\" }, { \"name\": \"filter\", \"type\": \"flags.0?DialogFilter\" }], \"type\": \"Bool\" }, { \"id\": 3311649252, \"method\": \"messages.updateDialogFiltersOrder\", \"params\": [{ \"name\": \"order\", \"type\": \"Vector<int>\" }], \"type\": \"Bool\" }, { \"id\": 1608974939, \"method\": \"messages.getOldFeaturedStickers\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }, { \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"messages.FeaturedStickers\" }, { \"id\": 3990128682, \"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\": 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\": 4038807890, \"method\": \"photos.updateProfilePhoto\", \"params\": [{ \"name\": \"id\", \"type\": \"InputPhoto\" }], \"type\": \"UserProfilePhoto\" }, { \"id\": 1328726168, \"method\": \"photos.uploadProfilePhoto\", \"params\": [{ \"name\": \"file\", \"type\": \"InputFile\" }], \"type\": \"photos.Photo\" }, { \"id\": 2278522671, \"method\": \"photos.deletePhotos\", \"params\": [{ \"name\": \"id\", \"type\": \"Vector<InputPhoto>\" }], \"type\": \"Vector<long>\" }, { \"id\": 2446144168, \"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\": 3003426337, \"method\": \"upload.saveFilePart\", \"params\": [{ \"name\": \"file_id\", \"type\": \"long\" }, { \"name\": \"file_part\", \"type\": \"int\" }, { \"name\": \"bytes\", \"type\": \"bytes\" }], \"type\": \"Bool\" }, { \"id\": 2975505148, \"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\": 3732629309, \"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\": 619086221, \"method\": \"upload.getWebFile\", \"params\": [{ \"name\": \"location\", \"type\": \"InputWebFileLocation\" }, { \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"upload.WebFile\" }, { \"id\": 536919235, \"method\": \"upload.getCdnFile\", \"params\": [{ \"name\": \"file_token\", \"type\": \"bytes\" }, { \"name\": \"offset\", \"type\": \"int\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"upload.CdnFile\" }, { \"id\": 2603046056, \"method\": \"upload.reuploadCdnFile\", \"params\": [{ \"name\": \"file_token\", \"type\": \"bytes\" }, { \"name\": \"request_token\", \"type\": \"bytes\" }], \"type\": \"Vector<FileHash>\" }, { \"id\": 1302676017, \"method\": \"upload.getCdnFileHashes\", \"params\": [{ \"name\": \"file_token\", \"type\": \"bytes\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"Vector<FileHash>\" }, { \"id\": 3338819889, \"method\": \"upload.getFileHashes\", \"params\": [{ \"name\": \"location\", \"type\": \"InputFileLocation\" }, { \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"Vector<FileHash>\" }, { \"id\": 3304659051, \"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\": 2631862477, \"method\": \"help.getSupport\", \"params\": [], \"type\": \"help.Support\" }, { \"id\": 2417028975, \"method\": \"help.getAppChangelog\", \"params\": [{ \"name\": \"prev_app_version\", \"type\": \"string\" }], \"type\": \"Updates\" }, { \"id\": 3961704397, \"method\": \"help.setBotUpdatesStatus\", \"params\": [{ \"name\": \"pending_updates_count\", \"type\": \"int\" }, { \"name\": \"message\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 1375900482, \"method\": \"help.getCdnConfig\", \"params\": [], \"type\": \"CdnConfig\" }, { \"id\": 1036054804, \"method\": \"help.getRecentMeUrls\", \"params\": [{ \"name\": \"referer\", \"type\": \"string\" }], \"type\": \"help.RecentMeUrls\" }, { \"id\": 749019089, \"method\": \"help.getTermsOfServiceUpdate\", \"params\": [], \"type\": \"help.TermsOfServiceUpdate\" }, { \"id\": 4000511898, \"method\": \"help.acceptTermsOfService\", \"params\": [{ \"name\": \"id\", \"type\": \"DataJSON\" }], \"type\": \"Bool\" }, { \"id\": 1072547679, \"method\": \"help.getDeepLinkInfo\", \"params\": [{ \"name\": \"path\", \"type\": \"string\" }], \"type\": \"help.DeepLinkInfo\" }, { \"id\": 2559656208, \"method\": \"help.getAppConfig\", \"params\": [], \"type\": \"JSONValue\" }, { \"id\": 1862465352, \"method\": \"help.saveAppLog\", \"params\": [{ \"name\": \"events\", \"type\": \"Vector<InputAppEvent>\" }], \"type\": \"Bool\" }, { \"id\": 3328290056, \"method\": \"help.getPassportConfig\", \"params\": [{ \"name\": \"hash\", \"type\": \"int\" }], \"type\": \"help.PassportConfig\" }, { \"id\": 3546343212, \"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<MessageEntity>\" }], \"type\": \"help.UserInfo\" }, { \"id\": 3231151137, \"method\": \"help.getPromoData\", \"params\": [], \"type\": \"help.PromoData\" }, { \"id\": 505748629, \"method\": \"help.hidePromoData\", \"params\": [{ \"name\": \"peer\", \"type\": \"InputPeer\" }], \"type\": \"Bool\" }, { \"id\": 3423619383, \"method\": \"channels.readHistory\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Bool\" }, { \"id\": 2227305806, \"method\": \"channels.deleteMessages\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"messages.AffectedMessages\" }, { \"id\": 3507345179, \"method\": \"channels.deleteUserHistory\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }], \"type\": \"messages.AffectedHistory\" }, { \"id\": 4261967888, \"method\": \"channels.reportSpam\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"Bool\" }, { \"id\": 2911672867, \"method\": \"channels.getMessages\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"id\", \"type\": \"Vector<InputMessage>\" }], \"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<InputChannel>\" }], \"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\": 3543959810, \"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\": 4046346185, \"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\": 4164332181, \"method\": \"channels.leaveChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }], \"type\": \"Updates\" }, { \"id\": 429865580, \"method\": \"channels.inviteToChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"users\", \"type\": \"Vector<InputUser>\" }], \"type\": \"Updates\" }, { \"id\": 3222347747, \"method\": \"channels.deleteChannel\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }], \"type\": \"Updates\" }, { \"id\": 3468128611, \"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\": 4172297903, \"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\": 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<InputUser>\" }, { \"name\": \"max_id\", \"type\": \"long\" }, { \"name\": \"min_id\", \"type\": \"long\" }, { \"name\": \"limit\", \"type\": \"int\" }], \"type\": \"channels.AdminLogResults\" }, { \"id\": 3935085817, \"method\": \"channels.setStickers\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }], \"type\": \"Bool\" }, { \"id\": 3937786936, \"method\": \"channels.readMessageContents\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"id\", \"type\": \"Vector<int>\" }], \"type\": \"Bool\" }, { \"id\": 2939592002, \"method\": \"channels.deleteHistory\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"max_id\", \"type\": \"int\" }], \"type\": \"Bool\" }, { \"id\": 3938171212, \"method\": \"channels.togglePreHistoryHidden\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"enabled\", \"type\": \"Bool\" }], \"type\": \"Updates\" }, { \"id\": 2202135744, \"method\": \"channels.getLeftChannels\", \"params\": [{ \"name\": \"offset\", \"type\": \"int\" }], \"type\": \"messages.Chats\" }, { \"id\": 4124758904, \"method\": \"channels.getGroupsForDiscussion\", \"params\": [], \"type\": \"messages.Chats\" }, { \"id\": 1079520178, \"method\": \"channels.setDiscussionGroup\", \"params\": [{ \"name\": \"broadcast\", \"type\": \"InputChannel\" }, { \"name\": \"group\", \"type\": \"InputChannel\" }], \"type\": \"Bool\" }, { \"id\": 2402864415, \"method\": \"channels.editCreator\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }, { \"name\": \"password\", \"type\": \"InputCheckPasswordSRP\" }], \"type\": \"Updates\" }, { \"id\": 1491484525, \"method\": \"channels.editLocation\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"geo_point\", \"type\": \"InputGeoPoint\" }, { \"name\": \"address\", \"type\": \"string\" }], \"type\": \"Bool\" }, { \"id\": 3990134512, \"method\": \"channels.toggleSlowMode\", \"params\": [{ \"name\": \"channel\", \"type\": \"InputChannel\" }, { \"name\": \"seconds\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 300429806, \"method\": \"channels.getInactiveChannels\", \"params\": [], \"type\": \"messages.InactiveChats\" }, { \"id\": 2854709741, \"method\": \"bots.sendCustomRequest\", \"params\": [{ \"name\": \"custom_method\", \"type\": \"string\" }, { \"name\": \"params\", \"type\": \"DataJSON\" }], \"type\": \"DataJSON\" }, { \"id\": 3860938573, \"method\": \"bots.answerWebhookJSONQuery\", \"params\": [{ \"name\": \"query_id\", \"type\": \"long\" }, { \"name\": \"data\", \"type\": \"DataJSON\" }], \"type\": \"Bool\" }, { \"id\": 2153596662, \"method\": \"bots.setBotCommands\", \"params\": [{ \"name\": \"commands\", \"type\": \"Vector<BotCommand>\" }], \"type\": \"Bool\" }, { \"id\": 2582681413, \"method\": \"payments.getPaymentForm\", \"params\": [{ \"name\": \"msg_id\", \"type\": \"int\" }], \"type\": \"payments.PaymentForm\" }, { \"id\": 2693966208, \"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\": 578650699, \"method\": \"payments.getSavedInfo\", \"params\": [], \"type\": \"payments.SavedInfo\" }, { \"id\": 3627905217, \"method\": \"payments.clearSavedInfo\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"credentials\", \"type\": \"flags.0?true\" }, { \"name\": \"info\", \"type\": \"flags.1?true\" }], \"type\": \"Bool\" }, { \"id\": 779736953, \"method\": \"payments.getBankCardData\", \"params\": [{ \"name\": \"number\", \"type\": \"string\" }], \"type\": \"payments.BankCardData\" }, { \"id\": 4043532160, \"method\": \"stickers.createStickerSet\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"masks\", \"type\": \"flags.0?true\" }, { \"name\": \"animated\", \"type\": \"flags.1?true\" }, { \"name\": \"user_id\", \"type\": \"InputUser\" }, { \"name\": \"title\", \"type\": \"string\" }, { \"name\": \"short_name\", \"type\": \"string\" }, { \"name\": \"thumb\", \"type\": \"flags.2?InputDocument\" }, { \"name\": \"stickers\", \"type\": \"Vector<InputStickerSetItem>\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 4151709521, \"method\": \"stickers.removeStickerFromSet\", \"params\": [{ \"name\": \"sticker\", \"type\": \"InputDocument\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 4290172106, \"method\": \"stickers.changeStickerPosition\", \"params\": [{ \"name\": \"sticker\", \"type\": \"InputDocument\" }, { \"name\": \"position\", \"type\": \"int\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 2253651646, \"method\": \"stickers.addStickerToSet\", \"params\": [{ \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }, { \"name\": \"sticker\", \"type\": \"InputStickerSetItem\" }], \"type\": \"messages.StickerSet\" }, { \"id\": 2587250224, \"method\": \"stickers.setStickerSetThumb\", \"params\": [{ \"name\": \"stickerset\", \"type\": \"InputStickerSet\" }, { \"name\": \"thumb\", \"type\": \"InputDocument\" }], \"type\": \"messages.StickerSet\" }, { \"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\": 2999697856, \"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\": 4075959050, \"method\": \"langpack.getLangPack\", \"params\": [{ \"name\": \"lang_pack\", \"type\": \"string\" }, { \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"LangPackDifference\" }, { \"id\": 4025104387, \"method\": \"langpack.getStrings\", \"params\": [{ \"name\": \"lang_pack\", \"type\": \"string\" }, { \"name\": \"lang_code\", \"type\": \"string\" }, { \"name\": \"keys\", \"type\": \"Vector<string>\" }], \"type\": \"Vector<LangPackString>\" }, { \"id\": 3449309861, \"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<LangPackLanguage>\" }, { \"id\": 1784243458, \"method\": \"langpack.getLanguage\", \"params\": [{ \"name\": \"lang_pack\", \"type\": \"string\" }, { \"name\": \"lang_code\", \"type\": \"string\" }], \"type\": \"LangPackLanguage\" }, { \"id\": 1749536939, \"method\": \"folders.editPeerFolders\", \"params\": [{ \"name\": \"folder_peers\", \"type\": \"Vector<InputFolderPeer>\" }], \"type\": \"Updates\" }, { \"id\": 472471681, \"method\": \"folders.deleteFolder\", \"params\": [{ \"name\": \"folder_id\", \"type\": \"int\" }], \"type\": \"Updates\" }, { \"id\": 2873246746, \"method\": \"stats.getBroadcastStats\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"dark\", \"type\": \"flags.0?true\" }, { \"name\": \"channel\", \"type\": \"InputChannel\" }], \"type\": \"stats.BroadcastStats\" }, { \"id\": 1646092192, \"method\": \"stats.loadAsyncGraph\", \"params\": [{ \"name\": \"flags\", \"type\": \"#\" }, { \"name\": \"token\", \"type\": \"string\" }, { \"name\": \"x\", \"type\": \"flags.0?long\" }], \"type\": \"StatsGraph\" }] }, \"layer\": 113 };\r\n"
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"index": 10,
"index2": 10,
"size": 9758,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"issuerId": 1,
"issuerName": "./src/lib/crypto/cryptoworker.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"module": "./src/lib/crypto/cryptoworker.ts",
"moduleName": "./src/lib/crypto/cryptoworker.ts",
"type": "cjs require",
"userRequest": "./crypto_utils",
"loc": "39:54-79"
},
{
"moduleId": 7,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\tl_utils.ts",
"module": "./src/lib/mtproto/tl_utils.ts",
"moduleName": "./src/lib/mtproto/tl_utils.ts",
"type": "cjs require",
"userRequest": "../crypto/crypto_utils",
"loc": "17:23-56"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.gzipUncompress = exports.bytesModPow = exports.pqPrimeLeemon = exports.pqPrimeFactorization = exports.hash_pbkdf2 = exports.rsaEncrypt = exports.aesDecryptSync = exports.aesEncryptSync = exports.sha256HashSync = exports.sha1HashSync = exports.bytesFromLeemonBigInt = void 0;\r\nconst sha1_1 = __importDefault(require(\"@cryptography/sha1\"));\r\nconst sha256_1 = __importDefault(require(\"@cryptography/sha256\"));\r\nconst aes_1 = require(\"@cryptography/aes\");\r\n// @ts-ignore\r\nconst pako_inflate_min_js_1 = __importDefault(require(\"pako/dist/pako_inflate.min.js\"));\r\nconst index_1 = require(\"leemon/es/index/\"); //from 'leemon';\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nfunction bytesFromLeemonBigInt(bigInt) {\r\n var str = index_1.bigInt2str(bigInt, 16);\r\n return bin_utils_1.bytesFromHex(str);\r\n}\r\nexports.bytesFromLeemonBigInt = bytesFromLeemonBigInt;\r\nfunction sha1HashSync(bytes) {\r\n //console.trace(dT(), 'SHA-1 hash start', bytes);\r\n const hashBytes = [];\r\n let hash = sha1_1.default(String.fromCharCode.apply(null, bytes instanceof Uint8Array ? [...bytes] : [...new Uint8Array(bytes)]));\r\n for (let i = 0; i < hash.length; ++i) {\r\n hashBytes.push(hash.charCodeAt(i));\r\n }\r\n //console.log(dT(), 'SHA-1 hash finish', hashBytes, bytesToHex(hashBytes));\r\n return new Uint8Array(hashBytes);\r\n}\r\nexports.sha1HashSync = sha1HashSync;\r\nfunction sha256HashSync(bytes) {\r\n //console.log(dT(), 'SHA-256 hash start');\r\n let words = bin_utils_1.bytesToWordss(bytes);\r\n let hash = sha256_1.default(words);\r\n //console.log(dT(), 'SHA-256 hash finish');\r\n return bin_utils_1.bytesFromWordss(hash);\r\n}\r\nexports.sha256HashSync = sha256HashSync;\r\nfunction aesEncryptSync(bytes, keyBytes, ivBytes) {\r\n //console.log(dT(), 'AES encrypt start', bytes, keyBytes, ivBytes);\r\n // console.log('aes before padding bytes:', bytesToHex(bytes));\r\n bytes = bin_utils_1.addPadding(bytes);\r\n // console.log('aes after padding bytes:', bytesToHex(bytes));\r\n const cipher = new aes_1.IGE(bin_utils_1.bytesToWordss(keyBytes), bin_utils_1.bytesToWordss(ivBytes));\r\n const encryptedBytes = cipher.encrypt(bin_utils_1.bytesToWordss(bytes));\r\n //console.log(dT(), 'AES encrypt finish');\r\n return bin_utils_1.bytesFromWordss(encryptedBytes);\r\n}\r\nexports.aesEncryptSync = aesEncryptSync;\r\nfunction aesDecryptSync(bytes, keyBytes, ivBytes) {\r\n //console.log(dT(), 'AES decrypt start', bytes, keyBytes, ivBytes);\r\n const cipher = new aes_1.IGE(bin_utils_1.bytesToWordss(keyBytes), bin_utils_1.bytesToWordss(ivBytes));\r\n const decryptedBytes = cipher.decrypt(bin_utils_1.bytesToWordss(bytes));\r\n //console.log(dT(), 'AES decrypt finish');\r\n return bin_utils_1.bytesFromWordss(decryptedBytes);\r\n}\r\nexports.aesDecryptSync = aesDecryptSync;\r\nfunction rsaEncrypt(publicKey, bytes) {\r\n console.log(bin_utils_1.dT(), 'RSA encrypt start', publicKey, bytes);\r\n bytes = bin_utils_1.addPadding(bytes, 255);\r\n var N = index_1.str2bigInt(publicKey.modulus, 16);\r\n var E = index_1.str2bigInt(publicKey.exponent, 16);\r\n var X = index_1.str2bigInt(bin_utils_1.bytesToHex(bytes), 16);\r\n var encryptedBigInt = index_1.powMod(X, E, N);\r\n var encryptedBytes = bin_utils_1.bytesFromHex(index_1.bigInt2str(encryptedBigInt, 16));\r\n console.log(bin_utils_1.dT(), 'RSA encrypt finish');\r\n return encryptedBytes;\r\n}\r\nexports.rsaEncrypt = rsaEncrypt;\r\nfunction hash_pbkdf2(/* hasher: 'string', */ buffer, salt, iterations) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let subtle = typeof (window) !== 'undefined' && 'crypto' in window ? window.crypto.subtle : self.crypto.subtle;\r\n // @ts-ignore\r\n let importKey = yield subtle.importKey(\"raw\", //only \"raw\" is allowed\r\n buffer, //your password\r\n {\r\n name: \"PBKDF2\",\r\n }, false, //whether the key is extractable (i.e. can be used in exportKey)\r\n [\"deriveKey\", \"deriveBits\"] //can be any combination of \"deriveKey\" and \"deriveBits\"\r\n );\r\n /* let deriveKey = */ yield subtle.deriveKey({\r\n \"name\": \"PBKDF2\",\r\n salt: salt,\r\n iterations: iterations,\r\n hash: { name: \"SHA-512\" },\r\n }, importKey, //your key from generateKey or importKey\r\n {\r\n name: \"AES-CTR\",\r\n //the generateKey parameters for that type of algorithm\r\n length: 256,\r\n }, false, //whether the derived key is extractable (i.e. can be used in exportKey)\r\n [\"encrypt\", \"decrypt\"] //limited to the options in that algorithm's importKey\r\n );\r\n let bits = subtle.deriveBits({\r\n \"name\": \"PBKDF2\",\r\n salt: salt,\r\n iterations: iterations,\r\n hash: { name: \"SHA-512\" },\r\n }, importKey, //your key from generateKey or importKey\r\n 512 //the number of bits you want to derive\r\n );\r\n return bits;\r\n });\r\n}\r\nexports.hash_pbkdf2 = hash_pbkdf2;\r\nfunction pqPrimeFactorization(pqBytes) {\r\n var what = new jsbn_1.BigInteger(pqBytes);\r\n var result = false;\r\n console.log(bin_utils_1.dT(), 'PQ start', pqBytes, what.toString(16), what.bitLength());\r\n try {\r\n console.time('PQ leemon');\r\n result = pqPrimeLeemon(index_1.str2bigInt(what.toString(16), 16, Math.ceil(64 / index_1.bpe) + 1));\r\n console.timeEnd('PQ leemon');\r\n }\r\n catch (e) {\r\n console.error('Pq leemon Exception', e);\r\n }\r\n console.log(bin_utils_1.dT(), 'PQ finish');\r\n return result;\r\n}\r\nexports.pqPrimeFactorization = pqPrimeFactorization;\r\nfunction pqPrimeLeemon(what) {\r\n var minBits = 64;\r\n var minLen = Math.ceil(minBits / index_1.bpe) + 1;\r\n var it = 0;\r\n var i, q;\r\n var j, lim;\r\n var P;\r\n var Q;\r\n var a = new Array(minLen);\r\n var b = new Array(minLen);\r\n var c = new Array(minLen);\r\n var g = new Array(minLen);\r\n var z = new Array(minLen);\r\n var x = new Array(minLen);\r\n var y = new Array(minLen);\r\n for (i = 0; i < 3; i++) {\r\n q = (bin_utils_1.nextRandomInt(128) & 15) + 17;\r\n index_1.copyInt_(x, bin_utils_1.nextRandomInt(1000000000) + 1);\r\n index_1.copy_(y, x);\r\n lim = 1 << (i + 18);\r\n for (j = 1; j < lim; j++) {\r\n ++it;\r\n index_1.copy_(a, x);\r\n index_1.copy_(b, x);\r\n index_1.copyInt_(c, q);\r\n while (!index_1.isZero(b)) {\r\n if (b[0] & 1) {\r\n index_1.add_(c, a);\r\n if (index_1.greater(c, what)) {\r\n index_1.sub_(c, what);\r\n }\r\n }\r\n index_1.add_(a, a);\r\n if (index_1.greater(a, what)) {\r\n index_1.sub_(a, what);\r\n }\r\n index_1.rightShift_(b, 1);\r\n }\r\n index_1.copy_(x, c);\r\n if (index_1.greater(x, y)) {\r\n index_1.copy_(z, x);\r\n index_1.sub_(z, y);\r\n }\r\n else {\r\n index_1.copy_(z, y);\r\n index_1.sub_(z, x);\r\n }\r\n index_1.eGCD_(z, what, g, a, b);\r\n if (!index_1.equalsInt(g, 1)) {\r\n break;\r\n }\r\n if ((j & (j - 1)) == 0) {\r\n index_1.copy_(y, x);\r\n }\r\n }\r\n if (index_1.greater(g, index_1.one)) {\r\n break;\r\n }\r\n }\r\n index_1.divide_(what, g, x, y);\r\n if (index_1.greater(g, x)) {\r\n P = x;\r\n Q = g;\r\n }\r\n else {\r\n P = g;\r\n Q = x;\r\n }\r\n // console.log(dT(), 'done', bigInt2str(what, 10), bigInt2str(P, 10), bigInt2str(Q, 10))\r\n return [bytesFromLeemonBigInt(P), bytesFromLeemonBigInt(Q), it];\r\n}\r\nexports.pqPrimeLeemon = pqPrimeLeemon;\r\nfunction bytesModPow(x, y, m) {\r\n try {\r\n var xBigInt = index_1.str2bigInt(bin_utils_1.bytesToHex(x), 16);\r\n var yBigInt = index_1.str2bigInt(bin_utils_1.bytesToHex(y), 16);\r\n var mBigInt = index_1.str2bigInt(bin_utils_1.bytesToHex(m), 16);\r\n var resBigInt = index_1.powMod(xBigInt, yBigInt, mBigInt);\r\n return bin_utils_1.bytesFromHex(index_1.bigInt2str(resBigInt, 16));\r\n }\r\n catch (e) {\r\n console.error('mod pow error', e);\r\n }\r\n return bin_utils_1.bytesFromBigInt(new jsbn_1.BigInteger(x).modPow(new jsbn_1.BigInteger(y), new jsbn_1.BigInteger(m)), 256);\r\n}\r\nexports.bytesModPow = bytesModPow;\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\n"
},
{
"id": 13,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\@cryptography\\aes\\dist\\es\\aes.js",
"name": "./node_modules/@cryptography/aes/dist/es/aes.js",
"index": 13,
"index2": 7,
"size": 11143,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"issuerId": 12,
"issuerName": "./src/lib/crypto/crypto_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
}
}
],
"profile": {
"factory": 897,
"building": 17
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "@cryptography/aes",
"loc": "18:14-42"
},
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "@cryptography/aes",
"loc": "9:14-42"
}
],
"usedExports": true,
"providedExports": [
"default",
"CTR",
"IGE"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/crypto/crypto_utils.ts (referenced with cjs require), ./src/lib/mtproto/transports/websocket.ts (referenced with cjs require)"
],
"depth": 3,
"source": "var S = new Uint8Array(256);\nvar Si = new Uint8Array(256);\nvar T1 = new Uint32Array(256);\nvar T2 = new Uint32Array(256);\nvar T3 = new Uint32Array(256);\nvar T4 = new Uint32Array(256);\nvar T5 = new Uint32Array(256);\nvar T6 = new Uint32Array(256);\nvar T7 = new Uint32Array(256);\nvar T8 = new Uint32Array(256);\nfunction computeTables() {\n var d = new Uint8Array(256);\n var t = new Uint8Array(256);\n var x2;\n var x4;\n var x8;\n var s;\n var tEnc;\n var tDec;\n var x = 0;\n var xInv = 0;\n // Compute double and third tables\n for (var i = 0; i < 256; i++) {\n d[i] = i << 1 ^ (i >> 7) * 283;\n t[d[i] ^ i] = i;\n }\n for (; !S[x]; x ^= x2 || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n S[x] = s;\n Si[s] = x;\n // Compute MixColumns\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n T1[x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n T2[x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n T3[x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n T4[x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n T5[s] = tDec = tDec << 24 ^ tDec >>> 8;\n T6[s] = tDec = tDec << 24 ^ tDec >>> 8;\n T7[s] = tDec = tDec << 24 ^ tDec >>> 8;\n T8[s] = tDec = tDec << 24 ^ tDec >>> 8;\n xInv = t[xInv] || 1;\n }\n}\n\n/**\n * Gets a uint32 from string in big-endian order order\n */\nfunction s2i(str, pos) {\n return (str.charCodeAt(pos) << 24\n ^ str.charCodeAt(pos + 1) << 16\n ^ str.charCodeAt(pos + 2) << 8\n ^ str.charCodeAt(pos + 3));\n}\n\n/* eslint-disable import/prefer-default-export */\n/**\n * Helper function for transforming string key to Uint32Array\n */\nfunction getWords(key) {\n if (key instanceof Uint32Array) {\n return key;\n }\n if (typeof key === 'string') {\n if (key.length % 4 !== 0)\n for (var i = key.length % 4; i <= 4; i++)\n key += '\\0x00';\n var buf = new Uint32Array(key.length / 4);\n for (var i = 0; i < key.length; i += 4)\n buf[i / 4] = s2i(key, i);\n return buf;\n }\n if (key instanceof Uint8Array) {\n var buf = new Uint32Array(key.length / 4);\n for (var i = 0; i < key.length; i += 4) {\n buf[i / 4] = (key[i] << 24\n ^ key[i + 1] << 16\n ^ key[i + 2] << 8\n ^ key[i + 3]);\n }\n return buf;\n }\n throw new Error('Unable to create 32-bit words');\n}\nfunction xor(left, right, to) {\n if (to === void 0) { to = left; }\n for (var i = 0; i < left.length; i++)\n to[i] = left[i] ^ right[i];\n}\n\ncomputeTables();\n/**\n * Low-level AES Cipher\n */\nvar AES = /** @class */ (function () {\n function AES(_key) {\n var key = getWords(_key);\n if (key.length !== 4 && key.length !== 6 && key.length !== 8) {\n throw new Error('Invalid key size');\n }\n this.encKey = new Uint32Array(4 * key.length + 28);\n this.decKey = new Uint32Array(4 * key.length + 28);\n this.encKey.set(key);\n var rcon = 1;\n var i = key.length;\n var tmp;\n // schedule encryption keys\n for (; i < 4 * key.length + 28; i++) {\n tmp = this.encKey[i - 1];\n // apply sbox\n if (i % key.length === 0 || (key.length === 8 && i % key.length === 4)) {\n tmp = S[tmp >>> 24] << 24 ^ S[(tmp >> 16) & 255] << 16 ^ S[(tmp >> 8) & 255] << 8 ^ S[tmp & 255];\n // shift rows and add rcon\n if (i % key.length === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ (rcon << 24);\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n this.encKey[i] = this.encKey[i - key.length] ^ tmp;\n }\n // schedule decryption keys\n for (var j = 0; i; j++, i--) {\n tmp = this.encKey[j & 3 ? i : i - 4];\n if (i <= 4 || j < 4) {\n this.decKey[j] = tmp;\n }\n else {\n this.decKey[j] = (T5[S[tmp >>> 24]]\n ^ T6[S[(tmp >> 16) & 255]]\n ^ T7[S[(tmp >> 8) & 255]]\n ^ T8[S[tmp & 255]]);\n }\n }\n }\n AES.prototype.encrypt = function (_message) {\n var message = getWords(_message);\n var out = new Uint32Array(4);\n var a = message[0] ^ this.encKey[0];\n var b = message[1] ^ this.encKey[1];\n var c = message[2] ^ this.encKey[2];\n var d = message[3] ^ this.encKey[3];\n var rounds = this.encKey.length / 4 - 2;\n var k = 4;\n var a2;\n var b2;\n var c2;\n // Inner rounds. Cribbed from OpenSSL.\n for (var i = 0; i < rounds; i++) {\n a2 = T1[a >>> 24] ^ T2[(b >> 16) & 255] ^ T3[(c >> 8) & 255] ^ T4[d & 255] ^ this.encKey[k];\n b2 = T1[b >>> 24] ^ T2[(c >> 16) & 255] ^ T3[(d >> 8) & 255] ^ T4[a & 255] ^ this.encKey[k + 1];\n c2 = T1[c >>> 24] ^ T2[(d >> 16) & 255] ^ T3[(a >> 8) & 255] ^ T4[b & 255] ^ this.encKey[k + 2];\n d = T1[d >>> 24] ^ T2[(a >> 16) & 255] ^ T3[(b >> 8) & 255] ^ T4[c & 255] ^ this.encKey[k + 3];\n a = a2;\n b = b2;\n c = c2;\n k += 4;\n // console.log(a, b, c, d);\n }\n // Last round.\n for (var i = 0; i < 4; i++) {\n out[i] = (S[a >>> 24] << 24\n ^ S[(b >> 16) & 255] << 16\n ^ S[(c >> 8) & 255] << 8\n ^ S[d & 255]\n ^ this.encKey[k++]);\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n return out;\n };\n AES.prototype.decrypt = function (_message) {\n var message = getWords(_message);\n var out = new Uint32Array(4);\n var a = message[0] ^ this.decKey[0];\n var b = message[3] ^ this.decKey[1];\n var c = message[2] ^ this.decKey[2];\n var d = message[1] ^ this.decKey[3];\n var rounds = this.decKey.length / 4 - 2;\n var a2;\n var b2;\n var c2;\n var k = 4;\n // Inner rounds. Cribbed from OpenSSL.\n for (var i = 0; i < rounds; i++) {\n a2 = T5[a >>> 24] ^ T6[(b >> 16) & 255] ^ T7[(c >> 8) & 255] ^ T8[d & 255] ^ this.decKey[k];\n b2 = T5[b >>> 24] ^ T6[(c >> 16) & 255] ^ T7[(d >> 8) & 255] ^ T8[a & 255] ^ this.decKey[k + 1];\n c2 = T5[c >>> 24] ^ T6[(d >> 16) & 255] ^ T7[(a >> 8) & 255] ^ T8[b & 255] ^ this.decKey[k + 2];\n d = T5[d >>> 24] ^ T6[(a >> 16) & 255] ^ T7[(b >> 8) & 255] ^ T8[c & 255] ^ this.decKey[k + 3];\n a = a2;\n b = b2;\n c = c2;\n k += 4;\n }\n // Last round.\n for (var i = 0; i < 4; i++) {\n out[3 & -i] = (Si[a >>> 24] << 24\n ^ Si[(b >> 16) & 255] << 16\n ^ Si[(c >> 8) & 255] << 8\n ^ Si[d & 255]\n ^ this.decKey[k++]);\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n return out;\n };\n return AES;\n}());\n\n/**\n * AES-IGE mode.\n */\nvar AES_IGE = /** @class */ (function () {\n function AES_IGE(key, iv, blockSize) {\n if (blockSize === void 0) { blockSize = 16; }\n this.key = getWords(key);\n this.iv = getWords(iv);\n this.cipher = new AES(key);\n this.blockSize = blockSize / 4;\n }\n /**\n * Encrypts plain text with AES-IGE mode.\n */\n AES_IGE.prototype.encrypt = function (message, buf) {\n var text = getWords(message);\n var cipherText = buf || new Uint32Array(text.length);\n var prevX = this.iv.subarray(this.blockSize, this.iv.length);\n var prevY = this.iv.subarray(0, this.blockSize);\n var yXOR = new Uint32Array(this.blockSize);\n for (var i = 0; i < text.length; i += this.blockSize) {\n var x = text.subarray(i, i + this.blockSize);\n xor(x, prevY, yXOR);\n var y = this.cipher.encrypt(yXOR);\n xor(y, prevX);\n prevX = x;\n prevY = y;\n for (var j = i, k = 0; j < text.length && k < 4; j++, k++)\n cipherText[j] = y[k];\n }\n return cipherText;\n };\n /**\n * Decrypts cipher text with AES-IGE mode.\n */\n AES_IGE.prototype.decrypt = function (message, buf) {\n var cipherText = getWords(message);\n var text = buf || new Uint32Array(cipherText.length);\n var prevY = this.iv.subarray(this.blockSize, this.iv.length);\n var prevX = this.iv.subarray(0, this.blockSize);\n var yXOR = new Uint32Array(this.blockSize);\n for (var i = 0; i < text.length; i += this.blockSize) {\n var x = cipherText.subarray(i, i + this.blockSize);\n xor(x, prevY, yXOR);\n var y = this.cipher.decrypt(yXOR);\n xor(y, prevX);\n prevX = x;\n prevY = y;\n for (var j = i, k = 0; j < text.length && k < 4; j++, k++)\n text[j] = y[k];\n }\n return text;\n };\n return AES_IGE;\n}());\n\n/**\n * AES-IGE mode.\n */\nvar AES_IGE$1 = /** @class */ (function () {\n function AES_IGE(key, counter, blockSize) {\n if (blockSize === void 0) { blockSize = 16; }\n this.offset = 0;\n this.key = getWords(key);\n this.counter = getWords(counter);\n this.cipher = new AES(key);\n this.blockSize = blockSize / 4;\n if (this.counter.length !== 4) {\n throw new Error('AES-CTR mode counter must be 16 bytes length');\n }\n }\n /**\n * Encrypts plain text with AES-IGE mode.\n */\n AES_IGE.prototype.encrypt = function (message, buf) {\n var text = getWords(message);\n var cipherText = buf || new Uint32Array(text.length);\n var offset = this.offset;\n for (var i = 0; i < text.length; i += this.blockSize) {\n var x = this.cipher.encrypt(this.counter);\n for (var j = i, k = offset; j < text.length && k < this.blockSize; j++, k++)\n cipherText[j] = x[k] ^ text[j];\n if (text.length - i >= this.blockSize)\n this.incrementCounter();\n if (offset) {\n i -= offset;\n offset = 0;\n }\n }\n this.offset = (this.offset + (text.length % 4)) % 4;\n return cipherText;\n };\n /**\n * Decrypts cipher text with AES-IGE mode.\n */\n AES_IGE.prototype.decrypt = function (message, buf) {\n return this.encrypt(message, buf);\n };\n AES_IGE.prototype.incrementCounter = function () {\n // increment counter\n for (var carry = this.counter.length - 1; carry >= 0; carry--) {\n if (++this.counter[carry] < 0xFFFFFFFF)\n break; // If overflowing, it'll be 0 and we'll have to continue propagating the carry\n }\n };\n return AES_IGE;\n}());\n\nexport default AES;\nexport { AES_IGE$1 as CTR, AES_IGE as IGE };\n"
},
{
"id": 14,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\leemon\\es\\index.js",
"name": "./node_modules/leemon/es/index.js",
"index": 15,
"index2": 9,
"size": 57067,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"issuerId": 28,
"issuerName": "./src/lib/mtproto/passwordManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 28,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"name": "./src/lib/mtproto/passwordManager.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 913,
"building": 27
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "leemon/es/index/",
"loc": "21:16-43"
},
{
"moduleId": 28,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"module": "./src/lib/mtproto/passwordManager.ts",
"moduleName": "./src/lib/mtproto/passwordManager.ts",
"type": "cjs require",
"userRequest": "leemon/es/index/",
"loc": "19:16-43"
}
],
"usedExports": true,
"providedExports": [
"bpe",
"one",
"zero",
"findPrimes",
"millerRabinInt",
"millerRabin",
"bitSize",
"expand",
"randTruePrime",
"randProbPrime",
"randProbPrimeRounds",
"mod",
"addInt",
"mult",
"powMod",
"sub",
"add",
"inverseMod",
"multMod",
"randTruePrime_",
"randBigInt",
"randBigInt_",
"GCD",
"GCD_",
"inverseMod_",
"inverseModInt",
"eGCD_",
"negative",
"greaterShift",
"greater",
"divide_",
"carry_",
"modInt",
"int2bigInt",
"str2bigInt",
"equalsInt",
"equals",
"isZero",
"bigInt2str",
"dup",
"copy_",
"copyInt_",
"addInt_",
"rightShift_",
"halve_",
"leftShift_",
"multInt_",
"divInt_",
"linComb_",
"linCombShift_",
"addShift_",
"subShift_",
"sub_",
"add_",
"mult_",
"mod_",
"multMod_",
"squareMod_",
"trim",
"powMod_",
"mont_"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/crypto/crypto_utils.ts (referenced with cjs require), ./src/lib/mtproto/passwordManager.ts (referenced with cjs require)"
],
"depth": 3,
"source": "'use strict';\n/** * * * * * * * * * *\n * Big Integer Library *\n * Created 2000 *\n * Leemon Baird *\n * www.leemon.com *\n * * * * * * * * * * * */\n////////////////////////////////////////////////////////////////////////////////////////\n// These functions are designed to avoid frequent dynamic memory allocation in the inner loop.\n// For most functions, if it needs a BigInt as a local variable it will actually use\n// a global, and will only allocate to it only when it's not the right size. This ensures\n// that when a function is called repeatedly with same-sized parameters, it only allocates\n// memory on the first call.\n//\n// Note that for cryptographic purposes, the calls to Math.random() must\n// be replaced with calls to a better pseudorandom number generator.\n//\n// In the following, \"bigInt\" means a bigInt with at least one leading zero element,\n// and \"integer\" means a nonnegative integer less than radix. In some cases, integer\n// can be negative. Negative bigInts are 2s complement.\n//\n// The following functions do not modify their inputs.\n// Those returning a bigInt, string, or Array will dynamically allocate memory for that value.\n// Those returning a boolean will return the integer 0 (false) or 1 (true).\n// Those returning boolean or int will not allocate memory except possibly on the first\n// time they're called with a given parameter size.\n//\n// bigInt add(x,y) //return (x+y) for bigInts x and y.\n// bigInt addInt(x,n) //return (x+n) where x is a bigInt and n is an integer.\n// string bigInt2str(x,base) //return a string form of bigInt x in a given base, with 2 <= base <= 95\n// int bitSize(x) //return how many bits long the bigInt x is, not counting leading zeros\n// bigInt dup(x) //return a copy of bigInt x\n// boolean equals(x,y) //is the bigInt x equal to the bigint y?\n// boolean equalsInt(x,y) //is bigint x equal to integer y?\n// bigInt expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed\n// Array findPrimes(n) //return array of all primes less than integer n\n// bigInt GCD(x,y) //return greatest common divisor of bigInts x and y (each with same number of elements).\n// boolean greater(x,y) //is x>y? (x and y are nonnegative bigInts)\n// boolean greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y?\n// bigInt int2bigInt(t,n,m) //return a bigInt equal to integer t, with at least n bits and m array elements\n// bigInt inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null\n// int inverseModInt(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse\n// boolean isZero(x) //is the bigInt x equal to zero?\n// boolean millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime? (b is bigInt, 1<b<x)\n// boolean millerRabinInt(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime? (b is int, 1<b<x)\n// bigInt mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n.\n// int modInt(x,n) //return x mod n for bigInt x and integer n.\n// bigInt mult(x,y) //return x*y for bigInts x and y. This is faster when y<x.\n// bigInt multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.\n// boolean negative(x) //is bigInt x negative?\n// bigInt powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n.\n// bigInt randBigInt(n,s) //return an n-bit random BigInt (n>=1). If s=1, then the most significant of those n bits is set to 1.\n// bigInt randTruePrime(k) //return a new, random, k-bit, true prime bigInt using Maurer's algorithm.\n// bigInt randProbPrime(k) //return a new, random, k-bit, probable prime bigInt (probability it's composite less than 2^-80).\n// bigInt str2bigInt(s,b,n,m) //return a bigInt for number represented in string s in base b with at least n bits and m array elements\n// bigInt sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement\n// bigInt trim(x,k) //return a copy of x with exactly k leading zero elements\n//\n//\n// The following functions each have a non-underscored version, which most users should call instead.\n// These functions each write to a single parameter, and the caller is responsible for ensuring the array\n// passed in is large enough to hold the result.\n//\n// void addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer\n// void add_(x,y) //do x=x+y for bigInts x and y\n// void copy_(x,y) //do x=y on bigInts x and y\n// void copyInt_(x,n) //do x=n on bigInt x and integer n\n// void GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). (This never overflows its array).\n// boolean inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist\n// void mod_(x,n) //do x=x mod n for bigInts x and n. (This never overflows its array).\n// void mult_(x,y) //do x=x*y for bigInts x and y.\n// void multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n.\n// void powMod_(x,y,n) //do x=x**y mod n, where x,y,n are bigInts (n is odd) and ** is exponentiation. 0**0=1.\n// void randBigInt_(b,n,s) //do b = an n-bit random BigInt. if s=1, then nth bit (most significant bit) is set to 1. n>=1.\n// void randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb.\n// void sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement.\n//\n// The following functions do NOT have a non-underscored version.\n// They each write a bigInt result to one or more parameters. The caller is responsible for\n// ensuring the arrays passed in are large enough to hold the results.\n//\n// void addShift_(x,y,ys) //do x=x+(y<<(ys*bpe))\n// void carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits.\n// void divide_(x,y,q,r) //divide x by y giving quotient q and remainder r\n// int divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder. (This never overflows its array).\n// void eGCD_(x,y,d,a,b) //sets a,b,d to positive bigInts such that d = GCD_(x,y) = a*x-b*y\n// void halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement. (This never overflows its array).\n// void leftShift_(x,n) //left shift bigInt x by n bits. n<bpe.\n// void linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b\n// void linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys\n// void mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined)\n// void multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer.\n// void rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. (This never overflows its array).\n// void squareMod_(x,n) //do x=x*x mod n for bigInts x,n\n// void subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement.\n//\n// The following functions are based on algorithms from the _Handbook of Applied Cryptography_\n// powMod_() = algorithm 14.94, Montgomery exponentiation\n// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_\n// GCD_() = algorothm 14.57, Lehmer's algorithm\n// mont_() = algorithm 14.36, Montgomery multiplication\n// divide_() = algorithm 14.20 Multiple-precision division\n// squareMod_() = algorithm 14.16 Multiple-precision squaring\n// randTruePrime_() = algorithm 4.62, Maurer's algorithm\n// millerRabin() = algorithm 4.24, Miller-Rabin algorithm\n//\n// Profiling shows:\n// randTruePrime_() spends:\n// 10% of its time in calls to powMod_()\n// 85% of its time in calls to millerRabin()\n// millerRabin() spends:\n// 99% of its time in calls to powMod_() (always with a base of 2)\n// powMod_() spends:\n// 94% of its time in calls to mont_() (almost always with x==y)\n//\n// This suggests there are several ways to speed up this library slightly:\n// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window)\n// -- this should especially focus on being fast when raising 2 to a power mod n\n// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test\n// - tune the parameters in randTruePrime_(), including c, m, and recLimit\n// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking\n// within the loop when all the parameters are the same length.\n//\n// There are several ideas that look like they wouldn't help much at all:\n// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway)\n// - increase bpe from 15 to 30 (that would help if we had a 32*32->64 multiplier, but not with JavaScript's 32*32->32)\n// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square\n// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that\n// method would be slower. This is unfortunate because the code currently spends almost all of its time\n// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring\n// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded\n// sentences that seem to imply it's faster to do a non-modular square followed by a single\n// Montgomery reduction, but that's obviously wrong.\n////////////////////////////////////////////////////////////////////////////////////////\n\n//globals\nexport var bpe = 0; //bits stored per array element\n\nvar mask = 0; //AND this with an array element to chop it down to bpe bits\n\nvar radix = mask + 1; //equals 2^bpe. A single 1 bit to the left of the last bit of mask.\n//the digits for converting to different bases\n\nvar digitsStr = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\\\\'\"+-'; //initialize the global variables\n//bpe=number of bits in the mantissa on this platform\n\nfor (bpe = 0; 1 << bpe + 1 > 1 << bpe; bpe++) {\n ;\n}\n\nbpe >>= 1; //bpe=number of bits in one element of the array representing the bigInt\n\nmask = (1 << bpe) - 1; //AND the mask with an integer to get its bpe least significant bits\n\nradix = mask + 1; //2^bpe. a single 1 bit to the left of the first bit of mask\n\nexport var one = int2bigInt(1, 1, 1); //constant used in powMod_()\n\nexport var zero = int2bigInt(0, 1, 1); //the following global variables are scratchpad memory to\n//reduce dynamic memory allocation in the inner loop\n\nvar t = new Array(0);\nvar ss = t; //used in mult_()\n\nvar s0 = t; //used in multMod_(), squareMod_()\n// var s1=t; //used in powMod_(), multMod_(), squareMod_()\n// var s2=t; //used in powMod_(), multMod_()\n\nvar s3 = t; //used in powMod_()\n\nvar s4 = t,\n s5 = t; //used in mod_()\n\nvar s6 = t; //used in bigInt2str()\n\nvar s7 = t; //used in powMod_()\n\nvar T = t; //used in GCD_()\n\nvar sa = t; //used in mont_()\n\nvar mr_x1 = t,\n mr_r = t,\n mr_a = t,\n //used in millerRabin()\neg_v = t,\n eg_u = t,\n eg_A = t,\n eg_B = t,\n eg_C = t,\n eg_D = t,\n //used in eGCD_(), inverseMod_()\n//, md_q1=t, md_q2=t, md_q3=t, md_r=t, md_r1=t, md_r2=t, md_tt=t, //used in mod_()\nprimes = t,\n pows = t,\n s_i = t,\n s_i2 = t,\n s_R = t,\n s_rm = t,\n s_q = t,\n s_n1 = t,\n s_a = t,\n s_r2 = t,\n s_n = t,\n s_b = t,\n s_d = t,\n s_x1 = t,\n s_x2 = t,\n s_aa = t,\n //used in randTruePrime_()\nrpprb = t; //used in randProbPrimeRounds() (which also uses \"primes\")\n////////////////////////////////////////////////////////////////////////////////////////\n\nvar k, buff;\n/**\n * return array of all primes less than integer n\n *\n * @param {number} n\n * @returns {number[]}\n */\n\nexport function findPrimes(n) {\n var i, s, p, ans;\n s = new Array(n);\n\n for (i = 0; i < n; i++) {\n s[i] = 0;\n }\n\n s[0] = 2;\n p = 0; //first p elements of s are primes, the rest are a sieve\n\n for (; s[p] < n;) {\n //s[p] is the pth prime\n for (i = s[p] * s[p]; i < n; i += s[p] //mark multiples of s[p]\n ) {\n s[i] = 1;\n }\n\n p++;\n s[p] = s[p - 1] + 1;\n\n for (; s[p] < n && s[s[p]]; s[p]++) {\n ;\n } //find next prime (where s[p]==0)\n\n }\n\n ans = new Array(p);\n\n for (i = 0; i < p; i++) {\n ans[i] = s[i];\n }\n\n return ans;\n}\n/**\n * does a single round of Miller-Rabin base b consider x to be a possible prime?\n *\n * x is a bigInt, and b is an integer, with b<x\n *\n * @export\n * @param {number[]} x\n * @param {number} b\n * @returns {(0 | 1)}\n */\n\nexport function millerRabinInt(x, b) {\n if (mr_x1.length !== x.length) {\n mr_x1 = dup(x);\n mr_r = dup(x);\n mr_a = dup(x);\n }\n\n copyInt_(mr_a, b);\n return millerRabin(x, mr_a);\n}\n/**\n * does a single round of Miller-Rabin base b consider x to be a possible prime?\n *\n * x and b are bigInts with b<x\n *\n * @export\n * @param {number[]} x\n * @param {number[]} b\n * @returns {(0 | 1)}\n */\n\nexport function millerRabin(x, b) {\n var i, j, k, s;\n\n if (mr_x1.length !== x.length) {\n mr_x1 = dup(x);\n mr_r = dup(x);\n mr_a = dup(x);\n }\n\n copy_(mr_a, b);\n copy_(mr_r, x);\n copy_(mr_x1, x);\n addInt_(mr_r, -1);\n addInt_(mr_x1, -1); //s=the highest power of two that divides mr_r\n\n k = 0;\n\n for (i = 0; i < mr_r.length; i++) {\n for (j = 1; j < mask; j <<= 1) {\n if (x[i] & j) {\n s = k < mr_r.length + bpe ? k : 0;\n i = mr_r.length;\n j = mask;\n } else k++;\n }\n }\n\n if (s) rightShift_(mr_r, s);\n powMod_(mr_a, mr_r, x);\n\n if (!equalsInt(mr_a, 1) && !equals(mr_a, mr_x1)) {\n j = 1; //$off\n\n while (j <= s - 1 && !equals(mr_a, mr_x1)) {\n squareMod_(mr_a, x);\n\n if (equalsInt(mr_a, 1)) {\n return 0;\n }\n\n j++;\n }\n\n if (!equals(mr_a, mr_x1)) {\n return 0;\n }\n }\n\n return 1;\n}\n/**\n * returns how many bits long the bigInt is, not counting leading zeros.\n *\n * @param {number[]} x\n * @returns {number}\n */\n\nexport function bitSize(x) {\n var j, z, w;\n\n for (j = x.length - 1; x[j] == 0 && j > 0; j--) {\n ;\n }\n\n for (z = 0, w = x[j]; w; w >>= 1, z++) {\n ;\n }\n\n z += bpe * j;\n return z;\n}\n/**\n * return a copy of x with at least n elements, adding leading zeros if needed\n *\n * @param {number[]} x\n * @param {number} n\n * @returns {number[]}\n */\n\nexport function expand(x, n) {\n var ans = int2bigInt(0, (x.length > n ? x.length : n) * bpe, 0);\n copy_(ans, x);\n return ans;\n}\n/**\n * return a k-bit true random prime using Maurer's algorithm.\n *\n * @export\n * @param {number} k\n * @returns {number[]}\n */\n\nexport function randTruePrime(k) {\n var ans = int2bigInt(0, k, 0);\n randTruePrime_(ans, k);\n return trim(ans, 1);\n}\n/**\n * return a k-bit random probable prime with probability of error < 2^-80\n *\n * @export\n * @param {number} k\n * @returns {number[]}\n */\n\nexport function randProbPrime(k) {\n if (k >= 600) return randProbPrimeRounds(k, 2); //numbers from HAC table 4.3\n\n if (k >= 550) return randProbPrimeRounds(k, 4);\n if (k >= 500) return randProbPrimeRounds(k, 5);\n if (k >= 400) return randProbPrimeRounds(k, 6);\n if (k >= 350) return randProbPrimeRounds(k, 7);\n if (k >= 300) return randProbPrimeRounds(k, 9);\n if (k >= 250) return randProbPrimeRounds(k, 12); //numbers from HAC table 4.4\n\n if (k >= 200) return randProbPrimeRounds(k, 15);\n if (k >= 150) return randProbPrimeRounds(k, 18);\n if (k >= 100) return randProbPrimeRounds(k, 27);\n return randProbPrimeRounds(k, 40); //number from HAC remark 4.26 (only an estimate)\n}\n/**\n * return a k-bit probable random prime using n rounds of Miller Rabin\n * (after trial division with small primes)\n *\n * @export\n * @param {number} k\n * @param {number} n\n * @returns {number[]}\n */\n\nexport function randProbPrimeRounds(k, n) {\n var ans, i, divisible, B;\n B = 30000; //B is largest prime to use in trial division\n\n ans = int2bigInt(0, k, 0); //optimization: try larger and smaller B to find the best limit.\n\n if (primes.length === 0) primes = findPrimes(30000); //check for divisibility by primes <=30000\n\n if (rpprb.length !== ans.length) rpprb = dup(ans);\n\n for (;;) {\n //keep trying random values for ans until one appears to be prime\n //optimization: pick a random number times L=2*3*5*...*p, plus a\n // random element of the list of all numbers in [0,L) not divisible by any prime up to p.\n // This can reduce the amount of random number generation.\n randBigInt_(ans, k, 0); //ans = a random odd number to check\n\n ans[0] |= 1;\n divisible = 0; //check ans for divisibility by small primes up to B\n\n for (i = 0; i < primes.length && primes[i] <= B; i++) {\n if (modInt(ans, primes[i]) === 0 && !equalsInt(ans, primes[i])) {\n divisible = 1;\n break;\n }\n } //optimization: change millerRabin so the base can be bigger than the number being checked, then eliminate the while here.\n //do n rounds of Miller Rabin, with random bases less than ans\n\n\n for (i = 0; i < n && !divisible; i++) {\n randBigInt_(rpprb, k, 0);\n\n while (!greater(ans, rpprb) //pick a random rpprb that's < ans\n ) {\n randBigInt_(rpprb, k, 0);\n }\n\n if (!millerRabin(ans, rpprb)) divisible = 1;\n }\n\n if (!divisible) return ans;\n }\n /*::\n declare var never: empty\n return never\n */\n\n}\n/**\n * return a new bigInt equal to (x mod n) for bigInts x and n.\n *\n * @param {number[]} x\n * @param {number[]} n\n * @returns {number[]}\n */\n\nexport function mod(x, n) {\n var ans = dup(x);\n mod_(ans, n);\n return trim(ans, 1);\n}\n/**\n * return (x+n) where x is a bigInt and n is an integer.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {number[]}\n */\n\nexport function addInt(x, n) {\n var ans = expand(x, x.length + 1);\n addInt_(ans, n);\n return trim(ans, 1);\n}\n/**\n * return x*y for bigInts x and y. This is faster when y<x.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {number[]}\n */\n\nexport function mult(x, y) {\n var ans = expand(x, x.length + y.length);\n mult_(ans, y);\n return trim(ans, 1);\n}\n/**\n * return (x**y mod n) where x,y,n are bigInts and ** is exponentiation.\n *\n * 0**0=1.\n *\n * Faster for odd n.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @returns {number[]}\n */\n\nexport function powMod(x, y, n) {\n var ans = expand(x, n.length);\n powMod_( //this should work without the trim, but doesn't\n ans, trim(y, 2), trim(n, 2));\n return trim(ans, 1);\n}\n/**\n * return (x-y) for bigInts x and y\n *\n * Negative answers will be 2s complement\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {number[]}\n */\n\nexport function sub(x, y) {\n var ans = expand(x, x.length > y.length ? x.length + 1 : y.length + 1);\n sub_(ans, y);\n return trim(ans, 1);\n}\n/**\n * return (x+y) for bigInts x and y\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {number[]}\n */\n\nexport function add(x, y) {\n var ans = expand(x, x.length > y.length ? x.length + 1 : y.length + 1);\n add_(ans, y);\n return trim(ans, 1);\n}\n/**\n * return (x**(-1) mod n) for bigInts x and n.\n *\n * If no inverse exists, it returns null\n *\n * @param {number[]} x\n * @param {number[]} n\n * @returns {(number[] | null)}\n */\n\nexport function inverseMod(x, n) {\n var ans = expand(x, n.length);\n var s = inverseMod_(ans, n);\n return s ? trim(ans, 1) : null;\n}\n/**\n * return (x*y mod n) for bigInts x,y,n.\n *\n * For greater speed, let y<x.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @returns {number[]}\n */\n\nexport function multMod(x, y, n) {\n var ans = expand(x, n.length);\n multMod_(ans, y, n);\n return trim(ans, 1);\n}\n/**\n * generate a k-bit true random prime using Maurer's algorithm, and put it into ans.\n *\n * The bigInt ans must be large enough to hold it.\n *\n * @export\n * @param {number[]} ans\n * @param {number} k\n * @return {void}\n */\n\nexport function randTruePrime_(ans, k) {\n var c, m, pm, dd, j, r, B, divisible, z, zz, recSize;\n var w;\n if (primes.length == 0) primes = findPrimes(30000); //check for divisibility by primes <=30000\n\n if (pows.length == 0) {\n pows = new Array(512);\n\n for (j = 0; j < 512; j++) {\n pows[j] = Math.pow(2, j / 511 - 1);\n }\n } //c and m should be tuned for a particular machine and value of k, to maximize speed\n\n\n c = 0.1; //c=0.1 in HAC\n\n m = 20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits\n\n var recLimit = 20; //stop recursion when k <=recLimit. Must have recLimit >= 2\n\n if (s_i2.length != ans.length) {\n s_i2 = dup(ans);\n s_R = dup(ans);\n s_n1 = dup(ans);\n s_r2 = dup(ans);\n s_d = dup(ans);\n s_x1 = dup(ans); //TODO Seems like a bug in eslint, reports as unused\n\n s_x2 = dup(ans);\n s_b = dup(ans);\n s_n = dup(ans);\n s_i = dup(ans);\n s_rm = dup(ans);\n s_q = dup(ans);\n s_a = dup(ans);\n s_aa = dup(ans);\n }\n\n if (k <= recLimit) {\n //generate small random primes by trial division up to its square root\n pm = (1 << (k + 2 >> 1)) - 1; //pm is binary number with all ones, just over sqrt(2^k)\n\n copyInt_(ans, 0);\n\n for (dd = 1; dd;) {\n dd = 0;\n ans[0] = 1 | 1 << k - 1 | Math.floor(Math.random() * (1 << k)); //random, k-bit, odd integer, with msb 1\n\n for (j = 1; j < primes.length && (primes[j] & pm) == primes[j]; j++) {\n //trial division by all primes 3...sqrt(2^k)\n if (0 == ans[0] % primes[j]) {\n dd = 1;\n break;\n }\n }\n }\n\n carry_(ans);\n return;\n }\n\n B = c * k * k; //try small primes up to B (or all the primes[] array if the largest is less than B).\n\n if (k > 2 * m) //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits\n for (r = 1; k - k * r <= m;) {\n r = pows[Math.floor(Math.random() * 512)];\n } //r=Math.pow(2,Math.random()-1);\n else r = 0.5; //simulation suggests the more complex algorithm using r=.333 is only slightly faster.\n\n recSize = Math.floor(r * k) + 1;\n randTruePrime_(s_q, recSize);\n copyInt_(s_i2, 0);\n s_i2[Math.floor((k - 2) / bpe)] |= 1 << (k - 2) % bpe; //s_i2=2^(k-2)\n\n divide_(s_i2, s_q, s_i, s_rm); //s_i=floor((2^(k-1))/(2q))\n\n z = bitSize(s_i);\n\n for (;;) {\n for (;;) {\n //generate z-bit numbers until one falls in the range [0,s_i-1]\n randBigInt_(s_R, z, 0);\n if (greater(s_i, s_R)) break;\n } //now s_R is in the range [0,s_i-1]\n\n\n addInt_(s_R, 1); //now s_R is in the range [1,s_i]\n\n add_(s_R, s_i); //now s_R is in the range [s_i+1,2*s_i]\n\n copy_(s_n, s_q);\n mult_(s_n, s_R);\n multInt_(s_n, 2);\n addInt_(s_n, 1); //s_n=2*s_R*s_q+1\n\n copy_(s_r2, s_R);\n multInt_(s_r2, 2); //s_r2=2*s_R\n //check s_n for divisibility by small primes up to B\n\n for (divisible = 0, j = 0; j < primes.length && primes[j] < B; j++) {\n if (modInt(s_n, primes[j]) == 0 && !equalsInt(s_n, primes[j])) {\n divisible = 1;\n break;\n }\n }\n\n if (!divisible) if (!millerRabinInt(s_n, 2)) //if it passes small primes check, then try a single Miller-Rabin base 2\n //this line represents 75% of the total runtime for randTruePrime_\n divisible = 1;\n\n if (!divisible) {\n //if it passes that test, continue checking s_n\n addInt_(s_n, -3);\n\n for (j = s_n.length - 1; s_n[j] == 0 && j > 0; j--) {\n ;\n } //strip leading zeros\n\n\n for (zz = 0, w = s_n[j]; w; w >>= 1, zz++) {\n ;\n }\n\n zz += bpe * j; //zz=number of bits in s_n, ignoring leading zeros\n\n for (;;) {\n //generate z-bit numbers until one falls in the range [0,s_n-1]\n randBigInt_(s_a, zz, 0);\n if (greater(s_n, s_a)) break;\n } //now s_a is in the range [0,s_n-1]\n\n\n addInt_(s_n, 3); //now s_a is in the range [0,s_n-4]\n\n addInt_(s_a, 2); //now s_a is in the range [2,s_n-2]\n\n copy_(s_b, s_a);\n copy_(s_n1, s_n);\n addInt_(s_n1, -1);\n powMod_(s_b, s_n1, s_n); //s_b=s_a^(s_n-1) modulo s_n\n\n addInt_(s_b, -1);\n\n if (isZero(s_b)) {\n copy_(s_b, s_a);\n powMod_(s_b, s_r2, s_n);\n addInt_(s_b, -1);\n copy_(s_aa, s_n);\n copy_(s_d, s_b);\n GCD_(s_d, s_n); //if s_b and s_n are relatively prime, then s_n is a prime\n\n if (equalsInt(s_d, 1)) {\n copy_(ans, s_aa);\n return; //if we've made it this far, then s_n is absolutely guaranteed to be prime\n }\n }\n }\n }\n}\n/**\n * Return an n-bit random BigInt (n>=1). If s=1, then the most significant of those n bits is set to 1.\n *\n * @export\n * @param {number} n\n * @param {number} s\n * @returns {number[]}\n */\n\nexport function randBigInt(n, s) {\n var a, b;\n a = Math.floor((n - 1) / bpe) + 2; //# array elements to hold the BigInt with a leading 0 element\n\n b = int2bigInt(0, 0, a);\n randBigInt_(b, n, s);\n return b;\n}\n/**\n * Set b to an n-bit random BigInt. If s=1, then the most significant of those n bits is set to 1.\n *\n * Array b must be big enough to hold the result. Must have n>=1\n *\n * @export\n * @param {number[]} b\n * @param {number} n\n * @param {number} s\n * @return {void}\n */\n\nexport function randBigInt_(b, n, s) {\n var i, a;\n\n for (i = 0; i < b.length; i++) {\n b[i] = 0;\n }\n\n a = Math.floor((n - 1) / bpe) + 1; //# array elements to hold the BigInt\n\n for (i = 0; i < a; i++) {\n b[i] = Math.floor(Math.random() * (1 << bpe - 1));\n }\n\n b[a - 1] &= (2 << (n - 1) % bpe) - 1;\n if (s == 1) b[a - 1] |= 1 << (n - 1) % bpe;\n}\n/**\n * Return the greatest common divisor of bigInts x and y (each with same number of elements).\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {number[]}\n */\n\nexport function GCD(x, y) {\n var xc, yc;\n xc = dup(x);\n yc = dup(y);\n GCD_(xc, yc);\n return xc;\n}\n/**\n * set x to the greatest common divisor of bigInts x and y (each with same number of elements).\n *\n * y is destroyed.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n */\n\nexport function GCD_(x, y) {\n var i, xp, yp, A, B, C, D, q, sing;\n var qp;\n if (T.length !== x.length) T = dup(x);\n sing = 1;\n\n while (sing) {\n //while y has nonzero elements other than y[0]\n sing = 0;\n\n for (i = 1; i < y.length; i++ //check if y has nonzero elements other than 0\n ) {\n if (y[i]) {\n sing = 1;\n break;\n }\n }\n\n if (!sing) break; //quit when y all zero elements except possibly y[0]\n\n for (i = x.length; !x[i] && i >= 0; i--) {\n ;\n } //find most significant element of x\n\n\n xp = x[i];\n yp = y[i];\n A = 1;\n B = 0;\n C = 0;\n D = 1;\n\n while (yp + C && yp + D) {\n q = Math.floor((xp + A) / (yp + C));\n qp = Math.floor((xp + B) / (yp + D));\n if (q != qp) break;\n t = A - q * C;\n A = C;\n C = t; // do (A,B,xp, C,D,yp) = (C,D,yp, A,B,xp) - q*(0,0,0, C,D,yp)\n\n t = B - q * D;\n B = D;\n D = t;\n t = xp - q * yp;\n xp = yp;\n yp = t;\n }\n\n if (B) {\n copy_(T, x);\n linComb_(x, y, A, B); //x=A*x+B*y\n\n linComb_(y, T, D, C); //y=D*y+C*T\n } else {\n mod_(x, y);\n copy_(T, x);\n copy_(x, y);\n copy_(y, T);\n }\n }\n\n if (y[0] === 0) return;\n t = modInt(x, y[0]);\n copyInt_(x, y[0]);\n y[0] = t;\n\n while (y[0]) {\n x[0] %= y[0];\n t = x[0];\n x[0] = y[0];\n y[0] = t;\n }\n}\n/**\n * do x=x**(-1) mod n, for bigInts x and n.\n *\n * If no inverse exists, it sets x to zero and returns 0, else it returns 1.\n * The x array must be at least as large as the n array.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} n\n * @returns {(0 | 1)}\n */\n\nexport function inverseMod_(x, n) {\n var k = 1 + 2 * Math.max(x.length, n.length);\n\n if (!(x[0] & 1) && !(n[0] & 1)) {\n //if both inputs are even, then inverse doesn't exist\n copyInt_(x, 0);\n return 0;\n }\n\n if (eg_u.length != k) {\n eg_u = new Array(k);\n eg_v = new Array(k);\n eg_A = new Array(k);\n eg_B = new Array(k);\n eg_C = new Array(k);\n eg_D = new Array(k);\n }\n\n copy_(eg_u, x);\n copy_(eg_v, n);\n copyInt_(eg_A, 1);\n copyInt_(eg_B, 0);\n copyInt_(eg_C, 0);\n copyInt_(eg_D, 1);\n\n for (;;) {\n while (!(eg_u[0] & 1)) {\n //while eg_u is even\n halve_(eg_u);\n\n if (!(eg_A[0] & 1) && !(eg_B[0] & 1)) {\n //if eg_A==eg_B==0 mod 2\n halve_(eg_A);\n halve_(eg_B);\n } else {\n add_(eg_A, n);\n halve_(eg_A);\n sub_(eg_B, x);\n halve_(eg_B);\n }\n }\n\n while (!(eg_v[0] & 1)) {\n //while eg_v is even\n halve_(eg_v);\n\n if (!(eg_C[0] & 1) && !(eg_D[0] & 1)) {\n //if eg_C==eg_D==0 mod 2\n halve_(eg_C);\n halve_(eg_D);\n } else {\n add_(eg_C, n);\n halve_(eg_C);\n sub_(eg_D, x);\n halve_(eg_D);\n }\n }\n\n if (!greater(eg_v, eg_u)) {\n //eg_v <= eg_u\n sub_(eg_u, eg_v);\n sub_(eg_A, eg_C);\n sub_(eg_B, eg_D);\n } else {\n //eg_v > eg_u\n sub_(eg_v, eg_u);\n sub_(eg_C, eg_A);\n sub_(eg_D, eg_B);\n }\n\n if (equalsInt(eg_u, 0)) {\n while (negative(eg_C) //make sure answer is nonnegative\n ) {\n add_(eg_C, n);\n }\n\n copy_(x, eg_C);\n\n if (!equalsInt(eg_v, 1)) {\n //if GCD_(x,n)!=1, then there is no inverse\n copyInt_(x, 0);\n return 0;\n }\n\n return 1;\n }\n }\n /*::\n declare var never: empty\n return never\n */\n\n}\n/**\n * return x**(-1) mod n, for integers x and n.\n *\n * Return 0 if there is no inverse\n *\n * @param {number} x\n * @param {number} n\n * @returns {number}\n */\n\nexport function inverseModInt(x, n) {\n var a = 1,\n b = 0,\n t;\n\n for (;;) {\n if (x === 1) return a;\n if (x === 0) return 0;\n b -= a * Math.floor(n / x); //$off\n\n n %= x;\n if (n === 1) return b; //to avoid negatives, change this b to n-b, and each -= to +=\n\n if (n === 0) return 0;\n a -= b * Math.floor(x / n); //$off\n\n x %= n;\n }\n /*::\n declare var never: empty\n return never\n */\n\n} //this deprecated function is for backward compatibility only.\n\nfunction inverseModInt_(x, n) {\n return inverseModInt(x, n);\n}\n/**\n * Given positive bigInts x and y, change the bigints v, a, and b to positive bigInts such that:\n *\n * v = GCD_(x,y) = a*x-b*y\n *\n * The bigInts v, a, b, must have exactly as many elements as the larger of x and y.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} v\n * @param {number[]} a\n * @param {number[]} b\n * @return {void}\n */\n\n\nexport function eGCD_(x, y, v, a, b) {\n var g = 0;\n var k = Math.max(x.length, y.length);\n\n if (eg_u.length != k) {\n eg_u = new Array(k);\n eg_A = new Array(k);\n eg_B = new Array(k);\n eg_C = new Array(k);\n eg_D = new Array(k);\n }\n\n while (!(x[0] & 1) && !(y[0] & 1)) {\n //while x and y both even\n halve_(x);\n halve_(y);\n g++;\n }\n\n copy_(eg_u, x);\n copy_(v, y);\n copyInt_(eg_A, 1);\n copyInt_(eg_B, 0);\n copyInt_(eg_C, 0);\n copyInt_(eg_D, 1);\n\n for (;;) {\n while (!(eg_u[0] & 1)) {\n //while u is even\n halve_(eg_u);\n\n if (!(eg_A[0] & 1) && !(eg_B[0] & 1)) {\n //if A==B==0 mod 2\n halve_(eg_A);\n halve_(eg_B);\n } else {\n add_(eg_A, y);\n halve_(eg_A);\n sub_(eg_B, x);\n halve_(eg_B);\n }\n }\n\n while (!(v[0] & 1)) {\n //while v is even\n halve_(v);\n\n if (!(eg_C[0] & 1) && !(eg_D[0] & 1)) {\n //if C==D==0 mod 2\n halve_(eg_C);\n halve_(eg_D);\n } else {\n add_(eg_C, y);\n halve_(eg_C);\n sub_(eg_D, x);\n halve_(eg_D);\n }\n }\n\n if (!greater(v, eg_u)) {\n //v<=u\n sub_(eg_u, v);\n sub_(eg_A, eg_C);\n sub_(eg_B, eg_D);\n } else {\n //v>u\n sub_(v, eg_u);\n sub_(eg_C, eg_A);\n sub_(eg_D, eg_B);\n }\n\n if (equalsInt(eg_u, 0)) {\n while (negative(eg_C)) {\n //make sure a (C) is nonnegative\n add_(eg_C, y);\n sub_(eg_D, x);\n }\n\n multInt_(eg_D, -1); ///make sure b (D) is nonnegative\n\n copy_(a, eg_C);\n copy_(b, eg_D);\n leftShift_(v, g);\n return;\n }\n }\n}\n/**\n * is bigInt x negative?\n *\n * @param {number[]} x\n * @returns {(1 | 0)}\n */\n\nexport function negative(x) {\n //TODO Flow Bool type inference\n return x[x.length - 1] >> bpe - 1 & 1;\n}\n/**\n * is (x << (shift*bpe)) > y?\n *\n * x and y are nonnegative bigInts\n * shift is a nonnegative integer\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} shift\n * @returns {(1 | 0)}\n */\n\nexport function greaterShift(x, y, shift) {\n var i,\n kx = x.length,\n ky = y.length;\n k = kx + shift < ky ? kx + shift : ky;\n\n for (i = ky - 1 - shift; i < kx && i >= 0; i++) {\n if (x[i] > 0) return 1;\n } //if there are nonzeros in x to the left of the first column of y, then x is bigger\n\n\n for (i = kx - 1 + shift; i < ky; i++) {\n if (y[i] > 0) return 0;\n } //if there are nonzeros in y to the left of the first column of x, then x is not bigger\n\n\n for (i = k - 1; i >= shift; i--) {\n if (x[i - shift] > y[i]) return 1;else if (x[i - shift] < y[i]) return 0;\n }\n\n return 0;\n}\n/**\n * is x > y?\n *\n * x and y both nonnegative\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {(1 | 0)}\n */\n\nexport function greater(x, y) {\n var i;\n var k = x.length < y.length ? x.length : y.length;\n\n for (i = x.length; i < y.length; i++) {\n if (y[i]) return 0;\n } //y has more digits\n\n\n for (i = y.length; i < x.length; i++) {\n if (x[i]) return 1;\n } //x has more digits\n\n\n for (i = k - 1; i >= 0; i--) {\n if (x[i] > y[i]) return 1;else if (x[i] < y[i]) return 0;\n }\n\n return 0;\n}\n/**\n * divide x by y giving quotient q and remainder r.\n *\n * q = floor(x/y)\n * r = x mod y\n *\n * All 4 are bigints.\n *\n * * x must have at least one leading zero element.\n * * y must be nonzero.\n * * q and r must be arrays that are exactly the same length as x. (Or q can have more).\n * * Must have x.length >= y.length >= 2.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} q\n * @param {number[]} r\n * @return {void}\n */\n\nexport function divide_(x, y, q, r) {\n var kx, ky;\n var i, j, y1, y2, c, a, b;\n copy_(r, x);\n\n for (ky = y.length; y[ky - 1] === 0; ky--) {\n ;\n } //ky is number of elements in y, not including leading zeros\n //normalize: ensure the most significant element of y has its highest bit set\n\n\n b = y[ky - 1];\n\n for (a = 0; b; a++) {\n b >>= 1;\n }\n\n a = bpe - a; //a is how many bits to shift so that the high order bit of y is leftmost in its array element\n\n leftShift_(y, a); //multiply both by 1<<a now, then divide both by that at the end\n\n leftShift_(r, a); //Rob Visser discovered a bug: the following line was originally just before the normalization.\n\n for (kx = r.length; r[kx - 1] === 0 && kx > ky; kx--) {\n ;\n } //kx is number of elements in normalized x, not including leading zeros\n\n\n copyInt_(q, 0); // q=0\n\n while (!greaterShift(y, r, kx - ky)) {\n // while (leftShift_(y,kx-ky) <= r) {\n subShift_(r, y, kx - ky); // r=r-leftShift_(y,kx-ky)\n\n q[kx - ky]++; // q[kx-ky]++;\n } // }\n\n\n for (i = kx - 1; i >= ky; i--) {\n if (r[i] == y[ky - 1]) q[i - ky] = mask;else q[i - ky] = Math.floor((r[i] * radix + r[i - 1]) / y[ky - 1]); //The following for(;;) loop is equivalent to the commented while loop,\n //except that the uncommented version avoids overflow.\n //The commented loop comes from HAC, which assumes r[-1]==y[-1]==0\n // while (q[i-ky]*(y[ky-1]*radix+y[ky-2]) > r[i]*radix*radix+r[i-1]*radix+r[i-2])\n // q[i-ky]--;\n\n for (;;) {\n y2 = (ky > 1 ? y[ky - 2] : 0) * q[i - ky];\n c = y2 >> bpe;\n y2 = y2 & mask;\n y1 = c + q[i - ky] * y[ky - 1];\n c = y1 >> bpe;\n y1 = y1 & mask;\n if (c == r[i] ? y1 == r[i - 1] ? y2 > (i > 1 ? r[i - 2] : 0) : y1 > r[i - 1] : c > r[i]) q[i - ky]--;else break;\n }\n\n linCombShift_(r, y, -q[i - ky], i - ky); //r=r-q[i-ky]*leftShift_(y,i-ky)\n\n if (negative(r)) {\n addShift_(r, y, i - ky); //r=r+leftShift_(y,i-ky)\n\n q[i - ky]--;\n }\n }\n\n rightShift_(y, a); //undo the normalization step\n\n rightShift_(r, a); //undo the normalization step\n}\n/**\n * do carries and borrows so each element of the bigInt x fits in bpe bits.\n *\n * @param {number[]} x\n */\n\nexport function carry_(x) {\n var i, k, c, b;\n k = x.length;\n c = 0;\n\n for (i = 0; i < k; i++) {\n c += x[i];\n b = 0;\n\n if (c < 0) {\n b = -(c >> bpe);\n c += b * radix;\n }\n\n x[i] = c & mask;\n c = (c >> bpe) - b;\n }\n}\n/**\n * return x mod n for bigInt x and integer n.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {number}\n */\n\nexport function modInt(x, n) {\n var i,\n c = 0;\n\n for (i = x.length - 1; i >= 0; i--) {\n c = (c * radix + x[i]) % n;\n }\n\n return c;\n}\n/**\n * convert the integer t into a bigInt with at least the given number of bits.\n * the returned array stores the bigInt in bpe-bit chunks, little endian (buff[0] is least significant word)\n * Pad the array with leading zeros so that it has at least minSize elements.\n *\n * There will always be at least one leading 0 element.\n *\n * @export\n * @param {number} t\n * @param {number} bits\n * @param {number} minSize\n * @returns {number[]}\n */\n\nexport function int2bigInt(t, bits, minSize) {\n var i, k;\n k = Math.ceil(bits / bpe) + 1;\n k = minSize > k ? minSize : k;\n var buff = new Array(k);\n copyInt_(buff, t);\n return buff;\n}\n/**\n * return the bigInt given a string representation in a given base.\n * Pad the array with leading zeros so that it has at least minSize elements.\n * If base=-1, then it reads in a space-separated list of array elements in decimal.\n *\n * The array will always have at least one leading zero, unless base=-1.\n *\n * @export\n * @param {string} s\n * @param {number} base\n * @param {number} [minSize]\n * @returns {number[]}\n */\n\nexport function str2bigInt(s, base, minSize) {\n var d, i, x, y, kk;\n var k = s.length;\n\n if (base === -1) {\n //comma-separated list of array elements in decimal\n x = new Array(0);\n\n for (;;) {\n y = new Array(x.length + 1);\n\n for (i = 0; i < x.length; i++) {\n y[i + 1] = x[i];\n }\n\n y[0] = parseInt(s, 10); //TODO PERF Should we replace that with ~~ (not not)? https://jsperf.com/number-vs-parseint-vs-plus/7\n\n x = y;\n d = s.indexOf(',', 0);\n if (d < 1) break; //$off\n\n s = s.substring(d + 1);\n if (s.length == 0) break;\n } //$off\n\n\n if (x.length < minSize) {\n //$off\n y = new Array(minSize);\n copy_(y, x);\n return y;\n }\n\n return x;\n }\n\n x = int2bigInt(0, base * k, 0);\n\n for (i = 0; i < k; i++) {\n d = digitsStr.indexOf(s.substring(i, i + 1), 0);\n if (base <= 36 && d >= 36) //convert lowercase to uppercase if base<=36\n d -= 26;\n\n if (d >= base || d < 0) {\n //stop at first illegal character\n break;\n }\n\n multInt_(x, base);\n addInt_(x, d);\n }\n\n for (k = x.length; k > 0 && !x[k - 1]; k--) {\n ;\n } //strip off leading zeros\n //$off\n\n\n k = minSize > k + 1 ? minSize : k + 1; //$off\n\n y = new Array(k); //$off\n\n kk = k < x.length ? k : x.length; //$off\n\n for (i = 0; i < kk; i++) {\n y[i] = x[i];\n } //$off\n\n\n for (; i < k; i++) {\n y[i] = 0;\n }\n\n return y;\n} //return the bigInt given a string representation in a given base.\n//Pad the array with leading zeros so that it has at least minSize elements.\n//If base=-1, then it reads in a space-separated list of array elements in decimal.\n//The array will always have at least one leading zero, unless base=-1.\n// function str2bigInt(s,b,minSize) {\n// var d, i, j, base, str, x, y, kk;\n// if (typeof b === 'string') {\n// base = b.length;\n// str = b;\n// } else {\n// base = b;\n// str = digitsStr;\n// }\n// var k=s.length;\n// if (base==-1) { //comma-separated list of array elements in decimal\n// x=new Array(0);\n// for (;;) {\n// y=new Array(x.length+1);\n// for (i=0;i<x.length;i++)\n// y[i+1]=x[i];\n// y[0]=parseInt(s,10);\n// x=y;\n// d=s.indexOf(',',0);\n// if (d<1)\n// break;\n// s=s.substring(d+1);\n// if (s.length==0)\n// break;\n// }\n// if (x.length<minSize) {\n// y=new Array(minSize);\n// copy_(y,x);\n// return y;\n// }\n// return x;\n// }\n// x=int2bigInt(0,base*k,0);\n// for (i=0;i<k;i++) {\n// d=str.indexOf(s.substring(i,i+1),0);\n// if (base<=36 && d>=36) { //convert lowercase to uppercase if base<=36\n// d-=26;\n// }\n// if (d>=base || d<0) { //ignore illegal characters\n// continue;\n// }\n// multInt_(x,base);\n// addInt_(x,d);\n// }\n// for (k=x.length;k>0 && !x[k-1];k--); //strip off leading zeros\n// k=minSize>k+1 ? minSize : k+1;\n// y=new Array(k);\n// kk=k<x.length ? k : x.length;\n// for (i=0;i<kk;i++)\n// y[i]=x[i];\n// for (;i<k;i++)\n// y[i]=0;\n// return y;\n// }\n\n/**\n * is bigint x equal to integer y?\n *\n * y must have less than bpe bits\n *\n * @export\n * @param {number[]} x\n * @param {number} y\n * @returns {(1 | 0)}\n */\n\nexport function equalsInt(x, y) {\n var i;\n if (x[0] != y) return 0;\n\n for (i = 1; i < x.length; i++) {\n if (x[i]) return 0;\n }\n\n return 1;\n}\n/**\n * are bigints x and y equal?\n *\n * this works even if x and y are different lengths and have arbitrarily many leading zeros\n *\n * @param {number[]} x\n * @param {number[]} y\n * @returns {(1 | 0)}\n */\n\nexport function equals(x, y) {\n var i;\n var k = x.length < y.length ? x.length : y.length;\n\n for (i = 0; i < k; i++) {\n if (x[i] !== y[i]) return 0;\n }\n\n if (x.length > y.length) {\n for (; i < x.length; i++) {\n if (x[i]) return 0;\n }\n } else {\n for (; i < y.length; i++) {\n if (y[i]) return 0;\n }\n }\n\n return 1;\n}\n/**\n * is the bigInt x equal to zero?\n *\n * @export\n * @param {number[]} x\n * @returns {(1 | 0)}\n */\n\nexport function isZero(x) {\n var i;\n\n for (i = 0; i < x.length; i++) {\n if (x[i]) return 0;\n }\n\n return 1;\n}\n/**\n * Convert a bigInt into a string in a given base, from base 2 up to base 95.\n *\n * Base -1 prints the contents of the array representing the number.\n *\n * @export\n * @param {number[]} x\n * @param {number} base\n * @returns {string}\n */\n\nexport function bigInt2str(x, base) {\n var i,\n t,\n s = '';\n if (s6.length !== x.length) s6 = dup(x);else copy_(s6, x);\n\n if (base === -1) {\n //return the list of array contents\n for (i = x.length - 1; i > 0; i--) {\n s += x[i] + ',';\n }\n\n s += x[0];\n } else {\n //return it in the given base\n while (!isZero(s6)) {\n t = divInt_(s6, base); //t=s6 % base; s6=floor(s6/base);\n\n s = digitsStr.substring(t, t + 1) + s;\n }\n }\n\n if (s.length === 0) s = '0';\n return s;\n}\n/**\n * Returns a duplicate of bigInt x\n *\n * @export\n * @param {number[]} x\n * @returns {number[]}\n */\n\nexport function dup(x) {\n var i;\n buff = Array(x.length);\n copy_(buff, x);\n return buff;\n}\n/**\n * do x=y on bigInts x and y.\n *\n * x must be an array at least as big as y (not counting the leading zeros in y).\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @returns {void}\n */\n\nexport function copy_(x, y) {\n var i;\n var k = x.length < y.length ? x.length : y.length;\n\n for (i = 0; i < k; i++) {\n x[i] = y[i];\n }\n\n for (i = k; i < x.length; i++) {\n x[i] = 0;\n }\n}\n/**\n * do x=y on bigInt x and integer y.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {void}\n */\n\nexport function copyInt_(x, n) {\n var i, c;\n var len = x.length; //TODO .length in for loop have perfomance costs. Bench this\n\n for (c = n, i = 0; i < len; i++) {\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x+n where x is a bigInt and n is an integer.\n *\n * x must be large enough to hold the result.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {void}\n */\n\nexport function addInt_(x, n) {\n var i, k, c, b;\n x[0] += n;\n k = x.length;\n c = 0;\n\n for (i = 0; i < k; i++) {\n c += x[i];\n b = 0;\n\n if (c < 0) {\n b = -(c >> bpe);\n c += b * radix;\n }\n\n x[i] = c & mask;\n c = (c >> bpe) - b;\n if (!c) return; //stop carrying as soon as the carry is zero\n }\n}\n/**\n * right shift bigInt x by n bits.\n *\n * 0 <= n < bpe.\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n */\n\nexport function rightShift_(x, n) {\n var i;\n var k = Math.floor(n / bpe);\n\n if (k) {\n for (i = 0; i < x.length - k; i++ //right shift x by k elements\n ) {\n x[i] = x[i + k];\n }\n\n for (; i < x.length; i++) {\n x[i] = 0;\n } //$off\n\n\n n %= bpe;\n }\n\n for (i = 0; i < x.length - 1; i++) {\n x[i] = mask & (x[i + 1] << bpe - n | x[i] >> n);\n }\n\n x[i] >>= n;\n}\n/**\n * do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement\n *\n * @param {number[]} x\n * @returns {void}\n */\n\nexport function halve_(x) {\n var i;\n\n for (i = 0; i < x.length - 1; i++) {\n x[i] = mask & (x[i + 1] << bpe - 1 | x[i] >> 1);\n }\n\n x[i] = x[i] >> 1 | x[i] & radix >> 1; //most significant bit stays the same\n}\n/**\n * left shift bigInt x by n bits\n *\n * @export\n * @param {number[]} x\n * @param {number} n\n * @returns {void}\n */\n\nexport function leftShift_(x, n) {\n var i;\n var k = Math.floor(n / bpe);\n\n if (k) {\n for (i = x.length; i >= k; i-- //left shift x by k elements\n ) {\n x[i] = x[i - k];\n }\n\n for (; i >= 0; i--) {\n x[i] = 0;\n } //$off\n\n\n n %= bpe;\n }\n\n if (!n) return;\n\n for (i = x.length - 1; i > 0; i--) {\n x[i] = mask & (x[i] << n | x[i - 1] >> bpe - n);\n }\n\n x[i] = mask & x[i] << n;\n}\n/**\n * do x=x*n where x is a bigInt and n is an integer.\n *\n * x must be large enough to hold the result.\n *\n * @param {number[]} x\n * @param {number} n\n * @returns {void}\n */\n\nexport function multInt_(x, n) {\n var i, k, c, b;\n if (!n) return;\n k = x.length;\n c = 0;\n\n for (i = 0; i < k; i++) {\n c += x[i] * n;\n b = 0;\n\n if (c < 0) {\n b = -(c >> bpe);\n c += b * radix;\n }\n\n x[i] = c & mask;\n c = (c >> bpe) - b;\n }\n}\n/**\n * do x=floor(x/n) for bigInt x and integer n, and return the remainder\n *\n * @param {number[]} x\n * @param {number} n\n * @returns {number} remainder\n */\n\nexport function divInt_(x, n) {\n var i,\n r = 0,\n s;\n\n for (i = x.length - 1; i >= 0; i--) {\n s = r * radix + x[i];\n x[i] = Math.floor(s / n);\n r = s % n;\n }\n\n return r;\n}\n/**\n * do the linear combination x=a*x+b*y for bigInts x and y, and integers a and b.\n *\n * x must be large enough to hold the answer.\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} a\n * @param {number} b\n * @returns {void}\n */\n\nexport function linComb_(x, y, a, b) {\n var i, c, k, kk;\n k = x.length < y.length ? x.length : y.length;\n kk = x.length;\n\n for (c = 0, i = 0; i < k; i++) {\n c += a * x[i] + b * y[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; i < kk; i++) {\n c += a * x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do the linear combination x=a*x+b*(y<<(ys*bpe)) for bigInts x and y, and integers a, b and ys.\n *\n * x must be large enough to hold the answer.\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} b\n * @param {number} ys\n * @returns {void}\n */\n\nexport function linCombShift_(x, y, b, ys) {\n var i, c, k, kk;\n k = x.length < ys + y.length ? x.length : ys + y.length;\n kk = x.length;\n\n for (c = 0, i = ys; i < k; i++) {\n c += x[i] + b * y[i - ys];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < kk; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x+(y<<(ys*bpe)) for bigInts x and y, and integer ys.\n *\n * x must be large enough to hold the answer.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} ys\n * @return {void}\n */\n\nexport function addShift_(x, y, ys) {\n var i, c, k, kk;\n k = x.length < ys + y.length ? x.length : ys + y.length;\n kk = x.length;\n\n for (c = 0, i = ys; i < k; i++) {\n c += x[i] + y[i - ys];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < kk; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x-(y<<(ys*bpe)) for bigInts x and y, and integer ys\n *\n * x must be large enough to hold the answer\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number} ys\n * @return {void}\n */\n\nexport function subShift_(x, y, ys) {\n var i, c, k, kk;\n k = x.length < ys + y.length ? x.length : ys + y.length;\n kk = x.length;\n\n for (c = 0, i = ys; i < k; i++) {\n c += x[i] - y[i - ys];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < kk; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x-y for bigInts x and y\n *\n * x must be large enough to hold the answer\n *\n * negative answers will be 2s complement\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @return {void}\n */\n\nexport function sub_(x, y) {\n var i, c, k, kk;\n k = x.length < y.length ? x.length : y.length;\n\n for (c = 0, i = 0; i < k; i++) {\n c += x[i] - y[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < x.length; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x+y for bigInts x and y\n *\n * x must be large enough to hold the answer\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @return {void}\n */\n\nexport function add_(x, y) {\n var i, c, k, kk;\n k = x.length < y.length ? x.length : y.length;\n\n for (c = 0, i = 0; i < k; i++) {\n c += x[i] + y[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n\n for (i = k; c && i < x.length; i++) {\n c += x[i];\n x[i] = c & mask;\n c >>= bpe;\n }\n}\n/**\n * do x=x*y for bigInts x and y.\n *\n * This is faster when y<x.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @return {void}\n */\n\nexport function mult_(x, y) {\n var i;\n if (ss.length != 2 * x.length) ss = new Array(2 * x.length);\n copyInt_(ss, 0);\n\n for (i = 0; i < y.length; i++) {\n if (y[i]) linCombShift_(ss, x, y[i], i);\n } //ss=1*ss+y[i]*(x<<(i*bpe))\n\n\n copy_(x, ss);\n}\n/**\n * do x=x mod n for bigInts x and n\n *\n * @export\n * @param {number[]} x\n * @param {number[]} n\n * @return {void}\n */\n\nexport function mod_(x, n) {\n if (s4.length !== x.length) s4 = dup(x);else copy_(s4, x);\n if (s5.length !== x.length) s5 = dup(x);\n divide_(s4, n, s5, x); //x = remainder of s4 / n\n}\n/**\n * do x=x*y mod n for bigInts x,y,n.\n *\n * for greater speed, let y<x.\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @return {void}\n */\n\nexport function multMod_(x, y, n) {\n var i;\n if (s0.length != 2 * x.length) s0 = new Array(2 * x.length);\n copyInt_(s0, 0);\n\n for (i = 0; i < y.length; i++) {\n if (y[i]) linCombShift_(s0, x, y[i], i);\n } //s0=1*s0+y[i]*(x<<(i*bpe))\n\n\n mod_(s0, n);\n copy_(x, s0);\n}\n/**\n * do x=x*x mod n for bigInts x,n.\n *\n * @export\n * @param {number[]} x\n * @param {number[]} n\n * @return {void}\n */\n\nexport function squareMod_(x, n) {\n var i, j, d, c, kx, kn, k;\n\n for (kx = x.length; kx > 0 && !x[kx - 1]; kx--) {\n ;\n } //ignore leading zeros in x\n\n\n k = kx > n.length ? 2 * kx : 2 * n.length; //k=# elements in the product, which is twice the elements in the larger of x and n\n\n if (s0.length != k) s0 = new Array(k);\n copyInt_(s0, 0);\n\n for (i = 0; i < kx; i++) {\n c = s0[2 * i] + x[i] * x[i];\n s0[2 * i] = c & mask;\n c >>= bpe;\n\n for (j = i + 1; j < kx; j++) {\n c = s0[i + j] + 2 * x[i] * x[j] + c;\n s0[i + j] = c & mask;\n c >>= bpe;\n }\n\n s0[i + kx] = c;\n }\n\n mod_(s0, n);\n copy_(x, s0);\n}\n/**\n * return x with exactly k leading zero elements\n *\n * @export\n * @param {number[]} x\n * @param {number} k\n * @returns {number[]}\n */\n\nexport function trim(x, k) {\n var i, y;\n\n for (i = x.length; i > 0 && !x[i - 1]; i--) {\n ;\n }\n\n y = new Array(i + k);\n copy_(y, x);\n return y;\n}\n/**\n * do `x=x**y mod n`, where x,y,n are bigInts and `**` is exponentiation. `0**0=1`.\n *\n * this is faster when n is odd.\n *\n * x usually needs to have as many elements as n.\n *\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @return {void}\n */\n\nexport function powMod_(x, y, n) {\n var k1, k2, kn, np;\n if (s7.length != n.length) s7 = dup(n); //for even modulus, use a simple square-and-multiply algorithm,\n //rather than using the more complex Montgomery algorithm.\n\n if ((n[0] & 1) == 0) {\n copy_(s7, x);\n copyInt_(x, 1);\n\n while (!equalsInt(y, 0)) {\n if (y[0] & 1) multMod_(x, s7, n);\n divInt_(y, 2);\n squareMod_(s7, n);\n }\n\n return;\n } //calculate np from n for the Montgomery multiplications\n\n\n copyInt_(s7, 0);\n\n for (kn = n.length; kn > 0 && !n[kn - 1]; kn--) {\n ;\n }\n\n np = radix - inverseModInt(modInt(n, radix), radix);\n s7[kn] = 1;\n multMod_(x, s7, n); // x = x * 2**(kn*bp) mod n\n\n if (s3.length != x.length) s3 = dup(x);else copy_(s3, x); //$off\n\n for (k1 = y.length - 1; k1 > 0 & !y[k1]; k1--) {\n ;\n } //k1=first nonzero element of y\n\n\n if (y[k1] == 0) {\n //anything to the 0th power is 1\n copyInt_(x, 1);\n return;\n }\n\n for (k2 = 1 << bpe - 1; k2 && !(y[k1] & k2); k2 >>= 1) {\n ;\n } //k2=position of first 1 bit in y[k1]\n\n\n for (;;) {\n if (!(k2 >>= 1)) {\n //look at next bit of y\n k1--;\n\n if (k1 < 0) {\n mont_(x, one, n, np);\n return;\n }\n\n k2 = 1 << bpe - 1;\n }\n\n mont_(x, x, n, np);\n if (k2 & y[k1]) //if next bit is a 1\n mont_(x, s3, n, np);\n }\n}\n/**\n * do x=x*y*Ri mod n for bigInts x,y,n,\n * where Ri = 2**(-kn*bpe) mod n, and kn is the\n * number of elements in the n array, not\n * counting leading zeros.\n *\n * x array must have at least as many elemnts as the n array\n * It's OK if x and y are the same variable.\n *\n * must have:\n * * x,y < n\n * * n is odd\n * * np = -(n^(-1)) mod radix\n *\n * @export\n * @param {number[]} x\n * @param {number[]} y\n * @param {number[]} n\n * @param {number} np\n * @return {void}\n */\n\nexport function mont_(x, y, n, np) {\n var i, j, c, ui, t, ks;\n var kn = n.length;\n var ky = y.length;\n if (sa.length != kn) sa = new Array(kn);\n copyInt_(sa, 0);\n\n for (; kn > 0 && n[kn - 1] == 0; kn--) {\n ;\n } //ignore leading zeros of n\n\n\n for (; ky > 0 && y[ky - 1] == 0; ky--) {\n ;\n } //ignore leading zeros of y\n\n\n ks = sa.length - 1; //sa will never have more than this many nonzero elements.\n //the following loop consumes 95% of the runtime for randTruePrime_() and powMod_() for large numbers\n\n for (i = 0; i < kn; i++) {\n t = sa[0] + x[i] * y[0];\n ui = (t & mask) * np & mask; //the inner \"& mask\" was needed on Safari (but not MSIE) at one time\n\n c = t + ui * n[0] >> bpe;\n t = x[i]; //do sa=(sa+x[i]*y+ui*n)/b where b=2**bpe. Loop is unrolled 5-fold for speed\n\n j = 1;\n\n for (; j < ky - 4;) {\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n for (; j < ky;) {\n c += sa[j] + ui * n[j] + t * y[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n for (; j < kn - 4;) {\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n for (; j < kn;) {\n c += sa[j] + ui * n[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n for (; j < ks;) {\n c += sa[j];\n sa[j - 1] = c & mask;\n c >>= bpe;\n j++;\n }\n\n sa[j - 1] = c & mask;\n }\n\n if (!greater(n, sa)) sub_(sa, n);\n copy_(x, sa);\n}\n//# sourceMappingURL=index.js.map"
},
{
"id": 15,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\timeManager.ts",
"name": "./src/lib/mtproto/timeManager.ts",
"index": 18,
"index2": 14,
"size": 1910,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"issuerId": 26,
"issuerName": "./src/lib/mtproto/authorizer.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 26,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"name": "./src/lib/mtproto/authorizer.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 438,
"building": 329,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 18,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"module": "./src/lib/mtproto/networker.ts",
"moduleName": "./src/lib/mtproto/networker.ts",
"type": "cjs require",
"userRequest": "./timeManager",
"loc": "22:38-62"
},
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "./timeManager",
"loc": "20:38-62"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.TimeManager = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nclass TimeManager {\r\n constructor() {\r\n this.lastMessageID = [0, 0];\r\n this.timeOffset = 0;\r\n storage_1.default.get('server_time_offset').then((to) => {\r\n if (to) {\r\n this.timeOffset = to;\r\n }\r\n });\r\n }\r\n generateID() {\r\n var timeTicks = Date.now(), timeSec = Math.floor(timeTicks / 1000) + this.timeOffset, timeMSec = timeTicks % 1000, random = bin_utils_1.nextRandomInt(0xFFFF);\r\n var messageID = [timeSec, (timeMSec << 21) | (random << 3) | 4];\r\n if (this.lastMessageID[0] > messageID[0] ||\r\n this.lastMessageID[0] == messageID[0] && this.lastMessageID[1] >= messageID[1]) {\r\n messageID = [this.lastMessageID[0], this.lastMessageID[1] + 4];\r\n }\r\n this.lastMessageID = messageID;\r\n // console.log('generated msg id', messageID, timeOffset)\r\n return bin_utils_1.longFromInts(messageID[0], messageID[1]);\r\n }\r\n applyServerTime(serverTime, localTime) {\r\n var newTimeOffset = serverTime - Math.floor((localTime || Date.now()) / 1000);\r\n var changed = Math.abs(this.timeOffset - newTimeOffset) > 10;\r\n storage_1.default.set({\r\n server_time_offset: newTimeOffset\r\n });\r\n this.lastMessageID = [0, 0];\r\n this.timeOffset = newTimeOffset;\r\n console.log(bin_utils_1.dT(), 'Apply server time', serverTime, localTime, newTimeOffset, changed);\r\n return changed;\r\n }\r\n}\r\nexports.TimeManager = TimeManager;\r\nexports.default = new TimeManager();\r\n"
},
{
"id": 16,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\transport.ts",
"name": "./src/lib/mtproto/transports/transport.ts",
"index": 21,
"index2": 15,
"size": 224,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\http.ts",
"issuerId": 10,
"issuerName": "./src/lib/mtproto/transports/http.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 10,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\http.ts",
"name": "./src/lib/mtproto/transports/http.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 8,
"building": 506
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 10,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "7:36-58"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass MTTransport {\r\n constructor(dcID, url) {\r\n this.dcID = dcID;\r\n this.url = url;\r\n }\r\n}\r\nexports.default = MTTransport;\r\n"
},
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"index": 0,
"index2": 28,
"size": 1540,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": null,
"issuerId": null,
"issuerName": null,
"issuerPath": null,
"profile": {
"factory": 0,
"building": 393
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": null,
"moduleIdentifier": null,
"module": null,
"moduleName": null,
"type": "single entry",
"userRequest": "!!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"loc": "main"
}
],
"usedExports": true,
"providedExports": [],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is an entry point"
],
"depth": 0,
"source": "import apiManager from \"./apiManager\";\r\nimport AppStorage from '../storage';\r\nimport cryptoWorker from \"../crypto/cryptoworker\";\r\nimport networkerFactory from \"./networkerFactory\";\r\n\r\n//const ctx: Worker = self as any;\r\nconst ctx = self;\r\n\r\n//console.error('INCLUDE !!!', new Error().stack);\r\n\r\nnetworkerFactory.setUpdatesProcessor((obj, bool) => {\r\n ctx.postMessage({update: {obj, bool}});\r\n});\r\n\r\nctx.onmessage = function(e) {\r\n var taskID = e.data.taskID;\r\n\r\n if(e.data.useLs) {\r\n AppStorage.finishTask(e.data.taskID, e.data.args);\r\n return;\r\n }\r\n\r\n switch(e.data.task) {\r\n case 'unzip':\r\n return cryptoWorker.gzipUncompress.apply(cryptoWorker, e.data.args).then(result => {\r\n ctx.postMessage({taskID: taskID, result: result});\r\n });\r\n\r\n default: {\r\n try {\r\n let result = apiManager[e.data.task].apply(apiManager, e.data.args);\r\n if(result instanceof Promise) {\r\n result.then(result => {\r\n //console.log(e.data.task + ' result:', result, taskID);\r\n ctx.postMessage({taskID: taskID, result: result});\r\n }).catch(err => {\r\n //console.error(e.data.task + ' err:', err, taskID);\r\n ctx.postMessage({taskID: taskID, error: err});\r\n });\r\n } else {\r\n ctx.postMessage({taskID: taskID, result: result});\r\n }\r\n } catch(err) {\r\n ctx.postMessage({taskID: taskID, error: err});\r\n }\r\n\r\n //throw new Error('Unknown task: ' + e.data.task);\r\n }\r\n }\r\n}\r\n\r\nctx.postMessage('ready');\r\n"
},
{
"id": 18,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networker.ts",
"name": "./src/lib/mtproto/networker.ts",
"index": 7,
"index2": 21,
"size": 45251,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"issuerId": 5,
"issuerName": "./src/lib/mtproto/networkerFactory.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 5,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"name": "./src/lib/mtproto/networkerFactory.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 12,
"building": 482,
"dependencies": 9
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\networkerFactory.ts",
"module": "./src/lib/mtproto/networkerFactory.ts",
"moduleName": "./src/lib/mtproto/networkerFactory.ts",
"type": "cjs require",
"userRequest": "./networker",
"loc": "4:20-42"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.MTPNetworker = void 0;\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst bin_utils_2 = require(\"../bin_utils\");\r\nconst tl_utils_1 = require(\"./tl_utils\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst storage_1 = __importDefault(require(\"../storage\"));\r\nconst schema_1 = __importDefault(require(\"./schema\"));\r\nconst timeManager_1 = __importDefault(require(\"./timeManager\"));\r\nconst networkerFactory_1 = __importDefault(require(\"./networkerFactory\"));\r\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\r\nconst http_1 = __importDefault(require(\"./transports/http\"));\r\nconst polyfill_1 = require(\"../polyfill\");\r\nconst mtproto_config_1 = require(\"./mtproto_config\");\r\nclass MTPNetworker {\r\n constructor(dcID, authKey, authKeyID, serverSalt, options = {}) {\r\n this.dcID = dcID;\r\n this.authKey = authKey;\r\n this.authKeyID = authKeyID;\r\n this.serverSalt = serverSalt;\r\n this.options = options;\r\n this.lastServerMessages = [];\r\n this.sentMessages = {};\r\n this.pendingMessages = {};\r\n this.pendingAcks = [];\r\n this.pendingResends = [];\r\n this.connectionInited = false;\r\n //private longPollInt: number;\r\n this.longPollPending = 0;\r\n this.seqNo = 0;\r\n this.prevSessionID = [];\r\n this.sessionID = [];\r\n this.sleepAfter = 0;\r\n this.offline = false;\r\n this.checkConnectionPeriod = 0;\r\n this.nextReq = 0;\r\n this.onOnlineCb = this.checkConnection.bind(this);\r\n this.debug = false;\r\n this.lastResendReq = null;\r\n this.authKeyUint8 = bin_utils_2.convertToUint8Array(this.authKey);\r\n //this.authKeyID = sha1BytesSync(this.authKey).slice(-8);\r\n this.upload = this.options.fileUpload || this.options.fileDownload || false;\r\n this.log = polyfill_1.logger('NET-' + dcID + (this.upload ? '-U' : ''));\r\n this.log('constructor' /* , this.authKey, this.authKeyID, this.serverSalt */);\r\n this.updateSession();\r\n // if(!NetworkerFactory.offlineInited) {\r\n // NetworkerFactory.offlineInited = true;\r\n // /* $rootScope.offline = true\r\n // $rootScope.offlineConnecting = true */\r\n // }\r\n this.transport = dcConfigurator_1.default.chooseServer(this.dcID, this.upload);\r\n if (this.transport instanceof http_1.default) {\r\n /* this.longPollInt = */ window.setInterval(this.checkLongPoll.bind(this), 10000);\r\n this.checkLongPoll();\r\n }\r\n else {\r\n this.transport.networker = this;\r\n }\r\n }\r\n updateSession() {\r\n this.seqNo = 0;\r\n this.prevSessionID = this.sessionID;\r\n this.sessionID = new Array(8);\r\n this.sessionID = [...new Uint8Array(this.sessionID.length).randomize()];\r\n //MTProto.secureRandom.nextBytes(this.sessionID);\r\n }\r\n updateSentMessage(sentMessageID) {\r\n var sentMessage = this.sentMessages[sentMessageID];\r\n if (!sentMessage) {\r\n return false;\r\n }\r\n var self = this;\r\n if (sentMessage.container) {\r\n var newInner = [];\r\n sentMessage.inner.forEach((innerSentMessageID) => {\r\n var innerSentMessage = self.updateSentMessage(innerSentMessageID);\r\n if (innerSentMessage) {\r\n newInner.push(innerSentMessage.msg_id);\r\n }\r\n });\r\n sentMessage.inner = newInner;\r\n }\r\n sentMessage.msg_id = timeManager_1.default.generateID();\r\n sentMessage.seq_no = this.generateSeqNo(sentMessage.notContentRelated ||\r\n sentMessage.container);\r\n this.sentMessages[sentMessage.msg_id] = sentMessage;\r\n delete self.sentMessages[sentMessageID];\r\n return sentMessage;\r\n }\r\n generateSeqNo(notContentRelated) {\r\n var seqNo = this.seqNo * 2;\r\n if (!notContentRelated) {\r\n seqNo++;\r\n this.seqNo++;\r\n }\r\n return seqNo;\r\n }\r\n wrapMtpCall(method, params = {}, options = {}) {\r\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\r\n serializer.storeMethod(method, params);\r\n var messageID = timeManager_1.default.generateID();\r\n var seqNo = this.generateSeqNo();\r\n var message = {\r\n msg_id: messageID,\r\n seq_no: seqNo,\r\n body: serializer.getBytes()\r\n };\r\n if (mtproto_config_1.Modes.debug) {\r\n this.log('MT call', method, params, messageID, seqNo);\r\n }\r\n return this.pushMessage(message, options);\r\n }\r\n wrapMtpMessage(object = {}, options = {}) {\r\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\r\n serializer.storeObject(object, 'Object');\r\n var messageID = timeManager_1.default.generateID();\r\n var seqNo = this.generateSeqNo(options.notContentRelated);\r\n var message = {\r\n msg_id: messageID,\r\n seq_no: seqNo,\r\n body: serializer.getBytes()\r\n };\r\n if (mtproto_config_1.Modes.debug) {\r\n this.log('MT message', object, messageID, seqNo);\r\n }\r\n return this.pushMessage(message, options);\r\n }\r\n wrapApiCall(method, params = {}, options = {}) {\r\n let serializer = new tl_utils_1.TLSerialization(options);\r\n if (!this.connectionInited) { // this will call once for each new session\r\n ///////this.log('Wrap api call !this.connectionInited');\r\n let invokeWithLayer = schema_1.default.API.methods.find(m => m.method == 'invokeWithLayer');\r\n if (!invokeWithLayer)\r\n throw new Error('no invokeWithLayer!');\r\n serializer.storeInt(+invokeWithLayer.id >>> 0, 'invokeWithLayer');\r\n // @ts-ignore\r\n serializer.storeInt(schema_1.default.layer, 'layer');\r\n let initConnection = schema_1.default.API.methods.find(m => m.method == 'initConnection');\r\n if (!initConnection)\r\n throw new Error('no initConnection!');\r\n serializer.storeInt(+initConnection.id >>> 0, 'initConnection');\r\n serializer.storeInt(0x0, 'flags');\r\n serializer.storeInt(mtproto_config_1.App.id, 'api_id');\r\n serializer.storeString(navigator.userAgent || 'Unknown UserAgent', 'device_model');\r\n serializer.storeString(navigator.platform || 'Unknown Platform', 'system_version');\r\n serializer.storeString(mtproto_config_1.App.version, 'app_version');\r\n serializer.storeString(navigator.language || 'en', 'system_lang_code');\r\n serializer.storeString('', 'lang_pack');\r\n serializer.storeString(navigator.language || 'en', 'lang_code');\r\n //serializer.storeInt(0x0, 'proxy');\r\n /* serializer.storeMethod('initConnection', {\r\n 'flags': 0,\r\n 'api_id': App.id,\r\n 'device_model': navigator.userAgent || 'Unknown UserAgent',\r\n 'system_version': navigator.platform || 'Unknown Platform',\r\n 'app_version': App.version,\r\n 'system_lang_code': navigator.language || 'en',\r\n 'lang_pack': '',\r\n 'lang_code': navigator.language || 'en'\r\n }); */\r\n }\r\n if (options.afterMessageID) {\r\n let invokeAfterMsg = schema_1.default.API.methods.find(m => m.method == 'invokeAfterMsg');\r\n if (!invokeAfterMsg)\r\n throw new Error('no invokeAfterMsg!');\r\n this.log('Api call options.afterMessageID!');\r\n serializer.storeInt(+invokeAfterMsg.id >>> 0, 'invokeAfterMsg');\r\n serializer.storeLong(options.afterMessageID, 'msg_id');\r\n }\r\n options.resultType = serializer.storeMethod(method, params);\r\n /* if(method == 'account.updateNotifySettings') {\r\n this.log('api call body:', serializer.getBytes(true));\r\n } */\r\n var messageID = timeManager_1.default.generateID();\r\n var seqNo = this.generateSeqNo();\r\n var message = {\r\n msg_id: messageID,\r\n seq_no: seqNo,\r\n body: serializer.getBytes(true),\r\n isAPI: true\r\n };\r\n if (mtproto_config_1.Modes.debug /* || true */) {\r\n this.log('Api call', method, message, params, options);\r\n }\r\n else {\r\n //////this.log('Api call', method);\r\n }\r\n return this.pushMessage(message, options);\r\n }\r\n checkLongPoll() {\r\n var isClean = this.cleanupSent();\r\n //this.log('Check lp', this.longPollPending, tsNow(), this.dcID, isClean, this);\r\n if ((this.longPollPending && Date.now() < this.longPollPending) ||\r\n this.offline) {\r\n //this.log('No lp this time');\r\n return false;\r\n }\r\n var self = this;\r\n storage_1.default.get('dc').then((baseDcID) => {\r\n if (isClean && (baseDcID != self.dcID ||\r\n self.upload ||\r\n (self.sleepAfter && Date.now() > self.sleepAfter))) {\r\n //console.warn(dT(), 'Send long-poll for DC is delayed', self.dcID, self.sleepAfter);\r\n return;\r\n }\r\n self.sendLongPoll();\r\n });\r\n }\r\n sendLongPoll() {\r\n let maxWait = 25000;\r\n this.longPollPending = Date.now() + maxWait;\r\n //this.log('Set lp', this.longPollPending, tsNow())\r\n this.wrapMtpCall('http_wait', {\r\n max_delay: 500,\r\n wait_after: 150,\r\n max_wait: maxWait\r\n }, {\r\n noResponse: true,\r\n longPoll: true\r\n }).then(() => {\r\n this.longPollPending = 0;\r\n setTimeout(this.checkLongPoll.bind(this), 0);\r\n }, (error) => {\r\n this.log('Long-poll failed', error);\r\n });\r\n }\r\n pushMessage(message, options = {}) {\r\n return new Promise((resolve, reject) => {\r\n this.sentMessages[message.msg_id] = Object.assign(message, options, {\r\n deferred: { resolve, reject }\r\n });\r\n // this.log('Networker pushMessage:', this.sentMessages[message.msg_id]);\r\n this.pendingMessages[message.msg_id] = 0;\r\n if (!options || !options.noSchedule) {\r\n this.scheduleRequest();\r\n }\r\n if (bin_utils_1.isObject(options)) {\r\n options.messageID = message.msg_id;\r\n }\r\n });\r\n }\r\n pushResend(messageID, delay = 0) {\r\n var value = delay ? Date.now() + delay : 0;\r\n var sentMessage = this.sentMessages[messageID];\r\n if (sentMessage.container) {\r\n for (var i = 0; i < sentMessage.inner.length; i++) {\r\n this.pendingMessages[sentMessage.inner[i]] = value;\r\n }\r\n }\r\n else {\r\n this.pendingMessages[messageID] = value;\r\n }\r\n // this.log('Resend due', messageID, this.pendingMessages)\r\n this.scheduleRequest(delay);\r\n }\r\n getMsgKey(dataWithPadding, isOut) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n var authKey = this.authKeyUint8;\r\n var x = isOut ? 0 : 8;\r\n var msgKeyLargePlain = bin_utils_2.bufferConcat(authKey.subarray(88 + x, 88 + x + 32), dataWithPadding);\r\n let msgKeyLarge = yield cryptoworker_1.default.sha256Hash(msgKeyLargePlain);\r\n var msgKey = new Uint8Array(msgKeyLarge).subarray(8, 24);\r\n return msgKey;\r\n });\r\n }\r\n ;\r\n getAesKeyIv(msgKey, isOut) {\r\n var authKey = this.authKeyUint8;\r\n var x = isOut ? 0 : 8;\r\n var sha2aText = new Uint8Array(52);\r\n var sha2bText = new Uint8Array(52);\r\n var promises = [];\r\n sha2aText.set(msgKey, 0);\r\n sha2aText.set(authKey.subarray(x, x + 36), 16);\r\n promises.push(cryptoworker_1.default.sha256Hash(sha2aText));\r\n sha2bText.set(authKey.subarray(40 + x, 40 + x + 36), 0);\r\n sha2bText.set(msgKey, 36);\r\n promises.push(cryptoworker_1.default.sha256Hash(sha2bText));\r\n return Promise.all(promises).then((results) => {\r\n var aesKey = new Uint8Array(32);\r\n var aesIv = new Uint8Array(32);\r\n var sha2a = new Uint8Array(results[0]);\r\n var sha2b = new Uint8Array(results[1]);\r\n aesKey.set(sha2a.subarray(0, 8));\r\n aesKey.set(sha2b.subarray(8, 24), 8);\r\n aesKey.set(sha2a.subarray(24, 32), 24);\r\n aesIv.set(sha2b.subarray(0, 8));\r\n aesIv.set(sha2a.subarray(8, 24), 8);\r\n aesIv.set(sha2b.subarray(24, 32), 24);\r\n return [aesKey, aesIv];\r\n });\r\n }\r\n checkConnection(event) {\r\n /* $rootScope.offlineConnecting = true */\r\n this.log('Check connection', event);\r\n clearTimeout(this.checkConnectionTimeout);\r\n this.checkConnectionTimeout = 0;\r\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\r\n var pingID = [bin_utils_2.nextRandomInt(0xFFFFFFFF), bin_utils_2.nextRandomInt(0xFFFFFFFF)];\r\n serializer.storeMethod('ping', {\r\n ping_id: pingID\r\n });\r\n var pingMessage = {\r\n msg_id: timeManager_1.default.generateID(),\r\n seq_no: this.generateSeqNo(true),\r\n body: serializer.getBytes()\r\n };\r\n var self = this;\r\n this.sendEncryptedRequest(pingMessage, {\r\n timeout: 15000\r\n }).then((result) => {\r\n /* delete $rootScope.offlineConnecting */\r\n self.toggleOffline(false);\r\n }, () => {\r\n this.log('Delay ', self.checkConnectionPeriod * 1000);\r\n self.checkConnectionTimeout = setTimeout(self.checkConnection.bind(self), self.checkConnectionPeriod * 1000 | 0);\r\n self.checkConnectionPeriod = Math.min(60, self.checkConnectionPeriod * 1.5);\r\n /* setTimeout(function() {\r\n delete $rootScope.offlineConnecting\r\n }, 1000); */\r\n });\r\n }\r\n toggleOffline(enabled) {\r\n // this.log('toggle ', enabled, this.dcID, this.iii)\r\n if (this.offline !== undefined && this.offline == enabled) {\r\n return false;\r\n }\r\n this.offline = enabled;\r\n /* $rootScope.offline = enabled;\r\n $rootScope.offlineConnecting = false; */\r\n if (!(this.transport instanceof http_1.default)) {\r\n this.log('toggle ', enabled, this.dcID);\r\n return;\r\n }\r\n if (this.offline) {\r\n clearTimeout(this.nextReqTimeout);\r\n this.nextReqTimeout = 0;\r\n this.nextReq = 0;\r\n if (this.checkConnectionPeriod < 1.5) {\r\n this.checkConnectionPeriod = 0;\r\n }\r\n this.checkConnectionTimeout = setTimeout(this.checkConnection.bind(this), this.checkConnectionPeriod * 1000 | 0);\r\n this.checkConnectionPeriod = Math.min(30, (1 + this.checkConnectionPeriod) * 1.5);\r\n document.body.addEventListener('online', this.onOnlineCb, false);\r\n document.body.addEventListener('focus', this.onOnlineCb, false);\r\n }\r\n else {\r\n this.checkLongPoll();\r\n this.scheduleRequest();\r\n document.body.removeEventListener('online', this.onOnlineCb);\r\n document.body.removeEventListener('focus', this.onOnlineCb);\r\n clearTimeout(this.checkConnectionTimeout);\r\n this.checkConnectionTimeout = 0;\r\n }\r\n }\r\n performScheduledRequest() {\r\n // this.log('scheduled', this.dcID, this.iii)\r\n if (this.offline) {\r\n this.log('Cancel scheduled');\r\n return false;\r\n }\r\n this.nextReq = 0;\r\n if (this.pendingAcks.length) {\r\n var ackMsgIDs = this.pendingAcks.slice();\r\n /* for(var i = 0; i < this.pendingAcks.length; i++) {\r\n ackMsgIDs.push(this.pendingAcks[i]);\r\n } */\r\n // this.log('acking messages', ackMsgIDs)\r\n this.wrapMtpMessage({\r\n _: 'msgs_ack',\r\n msg_ids: ackMsgIDs\r\n }, {\r\n notContentRelated: true,\r\n noSchedule: true\r\n });\r\n }\r\n if (this.pendingResends.length) {\r\n var resendMsgIDs = this.pendingResends.slice();\r\n var resendOpts = {\r\n noSchedule: true,\r\n notContentRelated: true,\r\n messageID: '' // will set in wrapMtpMessage->pushMessage\r\n };\r\n /* for(var i = 0; i < this.pendingResends.length; i++) {\r\n resendMsgIDs.push(this.pendingResends[i]);\r\n } */\r\n // this.log('resendReq messages', resendMsgIDs)\r\n this.wrapMtpMessage({\r\n _: 'msg_resend_req',\r\n msg_ids: resendMsgIDs\r\n }, resendOpts);\r\n this.lastResendReq = {\r\n req_msg_id: resendOpts.messageID,\r\n resend_msg_ids: resendMsgIDs\r\n };\r\n }\r\n var messages = [], message;\r\n var messagesByteLen = 0;\r\n var currentTime = Date.now();\r\n var hasApiCall = false;\r\n var hasHttpWait = false;\r\n var lengthOverflow = false;\r\n var singlesCount = 0;\r\n var self = this;\r\n for (let messageID in this.pendingMessages) {\r\n let value = this.pendingMessages[messageID];\r\n if (!value || value >= currentTime) {\r\n if (message = this.sentMessages[messageID]) {\r\n //this.log('performScheduledRequest message:', message);\r\n var messageByteLength = ( /* message.body.byteLength || */message.body.length) + 32;\r\n if (!message.notContentRelated &&\r\n lengthOverflow) {\r\n continue; // maybe break here\r\n }\r\n if (!message.notContentRelated &&\r\n messagesByteLen &&\r\n messagesByteLen + messageByteLength > 655360) { // 640 Kb\r\n this.log.warn('lengthOverflow', message);\r\n lengthOverflow = true;\r\n continue; // maybe break here\r\n }\r\n if (message.singleInRequest) {\r\n singlesCount++;\r\n if (singlesCount > 1) {\r\n continue; // maybe break here\r\n }\r\n }\r\n messages.push(message);\r\n messagesByteLen += messageByteLength;\r\n if (message.isAPI) {\r\n hasApiCall = true;\r\n }\r\n else if (message.longPoll) {\r\n hasHttpWait = true;\r\n }\r\n }\r\n else {\r\n // this.log(message, messageID)\r\n }\r\n delete self.pendingMessages[messageID];\r\n }\r\n }\r\n if (hasApiCall && !hasHttpWait && this.transport instanceof http_1.default) {\r\n var serializer = new tl_utils_1.TLSerialization({ mtproto: true });\r\n serializer.storeMethod('http_wait', {\r\n max_delay: 500,\r\n wait_after: 150,\r\n max_wait: 3000\r\n });\r\n messages.push({\r\n msg_id: timeManager_1.default.generateID(),\r\n seq_no: this.generateSeqNo(),\r\n body: serializer.getBytes()\r\n });\r\n }\r\n if (!messages.length) {\r\n // this.log('no scheduled messages')\r\n return;\r\n }\r\n var noResponseMsgs = [];\r\n if (messages.length > 1) {\r\n var container = new tl_utils_1.TLSerialization({\r\n mtproto: true,\r\n startMaxLength: messagesByteLen + 64\r\n });\r\n container.storeInt(0x73f1f8dc, 'CONTAINER[id]');\r\n container.storeInt(messages.length, 'CONTAINER[count]');\r\n var innerMessages = [];\r\n messages.forEach((message, i) => {\r\n container.storeLong(message.msg_id, 'CONTAINER[' + i + '][msg_id]');\r\n innerMessages.push(message.msg_id);\r\n container.storeInt(message.seq_no, 'CONTAINER[' + i + '][seq_no]');\r\n container.storeInt(message.body.length, 'CONTAINER[' + i + '][bytes]');\r\n container.storeRawBytes(message.body, 'CONTAINER[' + i + '][body]');\r\n if (message.noResponse) {\r\n noResponseMsgs.push(message.msg_id);\r\n }\r\n });\r\n var containerSentMessage = {\r\n msg_id: timeManager_1.default.generateID(),\r\n seq_no: this.generateSeqNo(true),\r\n container: true,\r\n inner: innerMessages\r\n };\r\n message = Object.assign({\r\n body: container.getBytes(true)\r\n }, containerSentMessage);\r\n this.sentMessages[message.msg_id] = containerSentMessage;\r\n if (mtproto_config_1.Modes.debug || true) {\r\n this.log('Container', innerMessages, message.msg_id, message.seq_no);\r\n }\r\n }\r\n else {\r\n if (message.noResponse) {\r\n noResponseMsgs.push(message.msg_id);\r\n }\r\n this.sentMessages[message.msg_id] = message;\r\n }\r\n this.pendingAcks = [];\r\n let promise = this.sendEncryptedRequest(message);\r\n if (!(this.transport instanceof http_1.default)) {\r\n if (noResponseMsgs.length)\r\n this.log.error('noResponseMsgs length!', noResponseMsgs);\r\n }\r\n else\r\n promise.then((result) => {\r\n self.toggleOffline(false);\r\n // this.log('parse for', message)\r\n self.parseResponse(result).then((response) => {\r\n if (mtproto_config_1.Modes.debug) {\r\n this.log('Server response', self.dcID, response);\r\n }\r\n self.processMessage(response.response, response.messageID, response.sessionID);\r\n noResponseMsgs.forEach((msgID) => {\r\n if (self.sentMessages[msgID]) {\r\n var deferred = self.sentMessages[msgID].deferred;\r\n delete self.sentMessages[msgID];\r\n deferred.resolve();\r\n }\r\n });\r\n if (self.transport instanceof http_1.default) {\r\n self.checkLongPoll();\r\n this.checkConnectionPeriod = Math.max(1.1, Math.sqrt(this.checkConnectionPeriod));\r\n }\r\n });\r\n }, (error) => {\r\n this.log.error('Encrypted request failed', error, message);\r\n if (message.container) {\r\n message.inner.forEach((msgID) => {\r\n self.pendingMessages[msgID] = 0;\r\n });\r\n delete self.sentMessages[message.msg_id];\r\n }\r\n else {\r\n self.pendingMessages[message.msg_id] = 0;\r\n }\r\n noResponseMsgs.forEach((msgID) => {\r\n if (self.sentMessages[msgID]) {\r\n var deferred = self.sentMessages[msgID].deferred;\r\n delete self.sentMessages[msgID];\r\n delete self.pendingMessages[msgID];\r\n deferred.reject();\r\n }\r\n });\r\n self.toggleOffline(true);\r\n });\r\n if (lengthOverflow || singlesCount > 1) {\r\n this.scheduleRequest();\r\n }\r\n }\r\n getEncryptedMessage(dataWithPadding) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let msgKey = yield this.getMsgKey(dataWithPadding, true);\r\n let keyIv = yield this.getAesKeyIv(msgKey, true);\r\n // this.log('after msg key iv')\r\n let encryptedBytes = yield cryptoworker_1.default.aesEncrypt(dataWithPadding, keyIv[0], keyIv[1]);\r\n // this.log('Finish encrypt')\r\n return {\r\n bytes: encryptedBytes,\r\n msgKey: msgKey\r\n };\r\n });\r\n }\r\n getDecryptedMessage(msgKey, encryptedData) {\r\n // this.log('get decrypted start')\r\n return this.getAesKeyIv(msgKey, false).then((keyIv) => {\r\n // this.log('after msg key iv')\r\n return cryptoworker_1.default.aesDecrypt(encryptedData, keyIv[0], keyIv[1]);\r\n });\r\n }\r\n sendEncryptedRequest(message, options = {}) {\r\n var self = this;\r\n this.debug && this.log('Send encrypted', message, options, this.authKeyID);\r\n // console.trace()\r\n var data = new tl_utils_1.TLSerialization({\r\n startMaxLength: message.body.length + 2048\r\n });\r\n data.storeIntBytes(this.serverSalt, 64, 'salt');\r\n data.storeIntBytes(this.sessionID, 64, 'session_id');\r\n data.storeLong(message.msg_id, 'message_id');\r\n data.storeInt(message.seq_no, 'seq_no');\r\n data.storeInt(message.body.length, 'message_data_length');\r\n data.storeRawBytes(message.body, 'message_data');\r\n var dataBuffer = data.getBuffer();\r\n var paddingLength = (16 - (data.offset % 16)) + 16 * (1 + bin_utils_2.nextRandomInt(5));\r\n var padding = new Array(paddingLength);\r\n padding = [...new Uint8Array(padding.length).randomize()];\r\n //MTProto.secureRandom.nextBytes(padding);\r\n var dataWithPadding = bin_utils_2.bufferConcat(dataBuffer, padding);\r\n // this.log('Adding padding', dataBuffer, padding, dataWithPadding)\r\n // this.log('auth_key_id', bytesToHex(self.authKeyID))\r\n return this.getEncryptedMessage(dataWithPadding).then((encryptedResult) => {\r\n this.debug && this.log('Got encrypted out message', encryptedResult);\r\n let request = new tl_utils_1.TLSerialization({\r\n startMaxLength: encryptedResult.bytes.byteLength + 256\r\n });\r\n request.storeIntBytes(self.authKeyID, 64, 'auth_key_id');\r\n request.storeIntBytes(encryptedResult.msgKey, 128, 'msg_key');\r\n request.storeRawBytes(encryptedResult.bytes, 'encrypted_data');\r\n //var requestData = xhrSendBuffer ? request.getBuffer() : request.getBytes(true) as Uint8Array;\r\n let requestData = request.getBytes(true);\r\n let baseError = {\r\n code: 406,\r\n type: 'NETWORK_BAD_RESPONSE',\r\n transport: this.transport\r\n };\r\n let promise = this.transport.send(requestData);\r\n if (!(this.transport instanceof http_1.default))\r\n return promise;\r\n return promise.then((result) => {\r\n if (!result || !result.byteLength) {\r\n return Promise.reject(baseError);\r\n }\r\n return result;\r\n }, (error) => {\r\n if (!error.message && !error.type) {\r\n error = Object.assign(baseError, {\r\n type: 'NETWORK_BAD_REQUEST',\r\n originalError: error\r\n });\r\n }\r\n return Promise.reject(error);\r\n });\r\n });\r\n }\r\n parseResponse(responseBuffer) {\r\n this.debug && this.log('Start parsing response' /* , responseBuffer */);\r\n let self = this;\r\n let deserializer = new tl_utils_1.TLDeserialization(responseBuffer);\r\n let authKeyID = deserializer.fetchIntBytes(64, true, 'auth_key_id');\r\n if (!bin_utils_2.bytesCmp(authKeyID, this.authKeyID)) {\r\n throw new Error('[MT] Invalid server auth_key_id: ' + authKeyID.hex);\r\n }\r\n let msgKey = deserializer.fetchIntBytes(128, true, 'msg_key');\r\n let encryptedData = deserializer.fetchRawBytes(responseBuffer.byteLength - deserializer.getOffset(), true, 'encrypted_data');\r\n return self.getDecryptedMessage(msgKey, encryptedData).then((dataWithPadding) => {\r\n // this.log('after decrypt')\r\n return self.getMsgKey(dataWithPadding, false).then((calcMsgKey) => {\r\n if (!bin_utils_2.bytesCmp(msgKey, calcMsgKey)) {\r\n this.log.warn('[MT] msg_keys', msgKey, calcMsgKey);\r\n this.updateSession(); // fix 28.01.2020\r\n throw new Error('[MT] server msgKey mismatch, updating session');\r\n }\r\n // this.log('after msgKey check')\r\n let deserializer = new tl_utils_1.TLDeserialization(dataWithPadding, { mtproto: true });\r\n /* let salt = */ deserializer.fetchIntBytes(64, false, 'salt'); // need\r\n let sessionID = deserializer.fetchIntBytes(64, false, 'session_id');\r\n let messageID = deserializer.fetchLong('message_id');\r\n if (!bin_utils_2.bytesCmp(sessionID, self.sessionID) &&\r\n (!self.prevSessionID || !bin_utils_2.bytesCmp(sessionID, self.prevSessionID))) {\r\n this.log.warn('Sessions', sessionID, self.sessionID, self.prevSessionID, dataWithPadding);\r\n //this.updateSession();\r\n //this.sessionID = sessionID;\r\n throw new Error('[MT] Invalid server session_id: ' + bin_utils_2.bytesToHex(sessionID));\r\n }\r\n let seqNo = deserializer.fetchInt('seq_no');\r\n let totalLength = dataWithPadding.byteLength;\r\n let messageBodyLength = deserializer.fetchInt('message_data[length]');\r\n let offset = deserializer.getOffset();\r\n if ((messageBodyLength % 4) ||\r\n messageBodyLength > totalLength - offset) {\r\n throw new Error('[MT] Invalid body length: ' + messageBodyLength);\r\n }\r\n let messageBody = deserializer.fetchRawBytes(messageBodyLength, true, 'message_data');\r\n offset = deserializer.getOffset();\r\n let paddingLength = totalLength - offset;\r\n if (paddingLength < 12 || paddingLength > 1024) {\r\n throw new Error('[MT] Invalid padding length: ' + paddingLength);\r\n }\r\n //let buffer = bytesToArrayBuffer(messageBody);\r\n deserializer = new tl_utils_1.TLDeserialization(/* buffer */ messageBody, { mtproto: true });\r\n // костыль\r\n deserializer.override = {\r\n mt_message: (function (result, field) {\r\n result.msg_id = this.fetchLong(field + '[msg_id]');\r\n result.seqno = this.fetchInt(field + '[seqno]');\r\n result.bytes = this.fetchInt(field + '[bytes]');\r\n var offset = this.getOffset();\r\n //self.log('mt_message!!!!!', result, field);\r\n try {\r\n result.body = this.fetchObject('Object', field + '[body]');\r\n }\r\n catch (e) {\r\n self.log.error('parse error', e.message, e.stack);\r\n result.body = {\r\n _: 'parse_error',\r\n error: e\r\n };\r\n }\r\n if (this.offset != offset + result.bytes) {\r\n // console.warn(dT(), 'set offset', this.offset, offset, result.bytes)\r\n // this.log(result)\r\n this.offset = offset + result.bytes;\r\n }\r\n // this.log('override message', result)\r\n }).bind(deserializer),\r\n mt_rpc_result: (function (result, field) {\r\n result.req_msg_id = this.fetchLong(field + '[req_msg_id]');\r\n var sentMessage = self.sentMessages[result.req_msg_id];\r\n var type = sentMessage && sentMessage.resultType || 'Object';\r\n if (result.req_msg_id && !sentMessage) {\r\n // console.warn(dT(), 'Result for unknown message', result);\r\n return;\r\n }\r\n result.result = this.fetchObject(type, field + '[result]');\r\n // self.log(dT(), 'override rpc_result', sentMessage, type, result);\r\n }).bind(deserializer)\r\n };\r\n var response = deserializer.fetchObject('', 'INPUT');\r\n return {\r\n response: response,\r\n messageID: messageID,\r\n sessionID: sessionID,\r\n seqNo: seqNo\r\n };\r\n });\r\n });\r\n }\r\n applyServerSalt(newServerSalt) {\r\n var serverSalt = bin_utils_2.longToBytes(newServerSalt);\r\n storage_1.default.set({\r\n ['dc' + this.dcID + '_server_salt']: bin_utils_2.bytesToHex(serverSalt)\r\n });\r\n this.serverSalt = serverSalt;\r\n return true;\r\n }\r\n scheduleRequest(delay = 0) {\r\n if (!(this.transport instanceof http_1.default)) { // if socket\r\n return this.performScheduledRequest();\r\n }\r\n if (this.offline /* && this.transport instanceof HTTP */) {\r\n this.checkConnection('forced schedule');\r\n }\r\n /* if(delay && !(this.transport instanceof HTTP)) {\r\n delay = 0;\r\n } */\r\n var nextReq = Date.now() + delay;\r\n if (delay && this.nextReq && this.nextReq <= nextReq) {\r\n return false;\r\n }\r\n // this.log('schedule req', delay)\r\n // console.trace()\r\n clearTimeout(this.nextReqTimeout);\r\n this.nextReqTimeout = 0;\r\n if (delay > 0) {\r\n this.nextReqTimeout = window.setTimeout(this.performScheduledRequest.bind(this), delay || 0);\r\n }\r\n else {\r\n setTimeout(this.performScheduledRequest.bind(this), 0);\r\n }\r\n this.nextReq = nextReq;\r\n }\r\n ackMessage(msgID) {\r\n // this.log('ack message', msgID)\r\n this.pendingAcks.push(msgID);\r\n this.scheduleRequest(30000);\r\n }\r\n reqResendMessage(msgID) {\r\n this.log('Req resend', msgID);\r\n this.pendingResends.push(msgID);\r\n this.scheduleRequest(100);\r\n }\r\n cleanupSent() {\r\n var self = this;\r\n var notEmpty = false;\r\n // this.log('clean start', this.dcID/*, this.sentMessages*/)\r\n Object.keys(this.sentMessages).forEach((msgID) => {\r\n let message = this.sentMessages[msgID];\r\n // this.log('clean iter', msgID, message)\r\n if (message.notContentRelated && self.pendingMessages[msgID] === undefined) {\r\n // this.log('clean notContentRelated', msgID)\r\n delete self.sentMessages[msgID];\r\n }\r\n else if (message.container) {\r\n for (var i = 0; i < message.inner.length; i++) {\r\n if (self.sentMessages[message.inner[i]] !== undefined) {\r\n // this.log('clean failed, found', msgID, message.inner[i], self.sentMessages[message.inner[i]].seq_no)\r\n notEmpty = true;\r\n return;\r\n }\r\n }\r\n // this.log('clean container', msgID)\r\n delete self.sentMessages[msgID];\r\n }\r\n else {\r\n notEmpty = true;\r\n }\r\n });\r\n return !notEmpty;\r\n }\r\n processMessageAck(messageID) {\r\n var sentMessage = this.sentMessages[messageID];\r\n if (sentMessage && !sentMessage.acked) {\r\n delete sentMessage.body;\r\n sentMessage.acked = true;\r\n return true;\r\n }\r\n return false;\r\n }\r\n processError(rawError) {\r\n var matches = (rawError.error_message || '').match(/^([A-Z_0-9]+\\b)(: (.+))?/) || [];\r\n rawError.error_code = rawError.error_code;\r\n return {\r\n code: !rawError.error_code || rawError.error_code <= 0 ? 500 : rawError.error_code,\r\n type: matches[1] || 'UNKNOWN',\r\n description: matches[3] || ('CODE#' + rawError.error_code + ' ' + rawError.error_message),\r\n originalError: rawError\r\n };\r\n }\r\n processMessage(message, messageID, sessionID) {\r\n var msgidInt = parseInt(messageID /* .toString(10) */.substr(0, -10), 10);\r\n if (msgidInt % 2) {\r\n this.log.warn('[MT] Server even message id: ', messageID, message);\r\n return;\r\n }\r\n this.debug && this.log('process message', message, messageID, sessionID);\r\n switch (message._) {\r\n case 'msg_container':\r\n var len = message.messages.length;\r\n for (var i = 0; i < len; i++) {\r\n this.processMessage(message.messages[i], message.messages[i].msg_id, sessionID);\r\n }\r\n break;\r\n case 'bad_server_salt':\r\n this.log('Bad server salt', message);\r\n var sentMessage = this.sentMessages[message.bad_msg_id];\r\n if (!sentMessage || sentMessage.seq_no != message.bad_msg_seqno) {\r\n this.log(message.bad_msg_id, message.bad_msg_seqno);\r\n throw new Error('[MT] Bad server salt for invalid message');\r\n }\r\n this.applyServerSalt(message.new_server_salt);\r\n this.pushResend(message.bad_msg_id);\r\n this.ackMessage(messageID);\r\n break;\r\n case 'bad_msg_notification':\r\n this.log('Bad msg notification', message);\r\n var sentMessage = this.sentMessages[message.bad_msg_id];\r\n if (!sentMessage || sentMessage.seq_no != message.bad_msg_seqno) {\r\n this.log(message.bad_msg_id, message.bad_msg_seqno);\r\n throw new Error('[MT] Bad msg notification for invalid message');\r\n }\r\n if (message.error_code == 16 || message.error_code == 17) {\r\n if (timeManager_1.default.applyServerTime(bin_utils_2.bigStringInt(messageID).shiftRight(32).toString(10))) {\r\n this.log('Update session');\r\n this.updateSession();\r\n }\r\n var badMessage = this.updateSentMessage(message.bad_msg_id);\r\n if (badMessage)\r\n this.pushResend(badMessage.msg_id); // fix 23.01.2020\r\n this.ackMessage(messageID);\r\n }\r\n break;\r\n case 'message':\r\n if (this.lastServerMessages.indexOf(messageID) != -1) {\r\n // console.warn('[MT] Server same messageID: ', messageID)\r\n this.ackMessage(messageID);\r\n return;\r\n }\r\n this.lastServerMessages.push(messageID);\r\n if (this.lastServerMessages.length > 100) {\r\n this.lastServerMessages.shift();\r\n }\r\n this.processMessage(message.body, message.msg_id, sessionID);\r\n break;\r\n case 'new_session_created':\r\n this.ackMessage(messageID);\r\n this.log('new_session_created in my head');\r\n //this.updateSession();\r\n this.processMessageAck(message.first_msg_id);\r\n this.applyServerSalt(message.server_salt);\r\n storage_1.default.get('dc').then((baseDcID) => {\r\n if (baseDcID == this.dcID && !this.upload && networkerFactory_1.default.updatesProcessor) {\r\n networkerFactory_1.default.updatesProcessor(message, true);\r\n }\r\n });\r\n break;\r\n case 'msgs_ack':\r\n for (var i = 0; i < message.msg_ids.length; i++) {\r\n this.processMessageAck(message.msg_ids[i]);\r\n }\r\n break;\r\n case 'msg_detailed_info':\r\n if (!this.sentMessages[message.msg_id]) {\r\n this.ackMessage(message.answer_msg_id);\r\n break;\r\n }\r\n case 'msg_new_detailed_info':\r\n if (this.pendingAcks.indexOf(message.answer_msg_id)) {\r\n break;\r\n }\r\n this.reqResendMessage(message.answer_msg_id);\r\n break;\r\n case 'msgs_state_info':\r\n this.ackMessage(message.answer_msg_id);\r\n if (this.lastResendReq &&\r\n this.lastResendReq.req_msg_id == message.req_msg_id &&\r\n this.pendingResends.length) {\r\n var badMsgID, pos;\r\n for (let i = 0; i < this.lastResendReq.resend_msg_ids.length; i++) {\r\n badMsgID = this.lastResendReq.resend_msg_ids[i];\r\n pos = this.pendingResends.indexOf(badMsgID);\r\n if (pos != -1) {\r\n this.pendingResends.splice(pos, 1);\r\n }\r\n }\r\n }\r\n break;\r\n case 'rpc_result':\r\n this.ackMessage(messageID);\r\n var sentMessageID = message.req_msg_id;\r\n var sentMessage = this.sentMessages[sentMessageID];\r\n this.processMessageAck(sentMessageID);\r\n if (sentMessage) {\r\n var deferred = sentMessage.deferred;\r\n if (message.result._ == 'rpc_error') {\r\n var error = this.processError(message.result);\r\n this.log('Rpc error', error);\r\n if (deferred) {\r\n deferred.reject(error);\r\n }\r\n }\r\n else {\r\n if (deferred) {\r\n if (mtproto_config_1.Modes.debug) {\r\n this.debug && this.log('Rpc response', message.result);\r\n }\r\n else {\r\n var dRes = message.result._;\r\n if (!dRes) {\r\n if (message.result.length > 5) {\r\n dRes = '[..' + message.result.length + '..]';\r\n }\r\n else {\r\n dRes = message.result;\r\n }\r\n }\r\n this.debug && this.log('Rpc response', dRes, sentMessage);\r\n }\r\n sentMessage.deferred.resolve(message.result);\r\n }\r\n if (sentMessage.isAPI && !this.connectionInited) {\r\n this.connectionInited = true;\r\n ////this.log('Rpc set connectionInited to:', this.connectionInited);\r\n }\r\n }\r\n delete this.sentMessages[sentMessageID];\r\n }\r\n break;\r\n default:\r\n this.ackMessage(messageID);\r\n this.debug && this.log('Update', message);\r\n if (networkerFactory_1.default.updatesProcessor !== null) {\r\n networkerFactory_1.default.updatesProcessor(message, true);\r\n }\r\n break;\r\n }\r\n }\r\n}\r\nexports.MTPNetworker = MTPNetworker;\r\n"
},
{
"id": 19,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\@cryptography\\sha1\\dist\\index.js",
"name": "./node_modules/@cryptography/sha1/dist/index.js",
"index": 11,
"index2": 5,
"size": 6225,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"issuerId": 12,
"issuerName": "./src/lib/crypto/crypto_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
}
}
],
"profile": {
"factory": 897,
"building": 17
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "@cryptography/sha1",
"loc": "16:31-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/** Gets a uint32 from string in big-endian order order */\nfunction strToInt32(str, pos) {\n return (str.charCodeAt(pos) << 24\n ^ str.charCodeAt(pos + 1) << 16\n ^ str.charCodeAt(pos + 2) << 8\n ^ str.charCodeAt(pos + 3));\n}\n/** Returns a uint32 as a string in big-endian order order */\nfunction int32ToStr(data) {\n return (String.fromCharCode((data >> 24) & 0xFF)\n + String.fromCharCode((data >> 16) & 0xFF)\n + String.fromCharCode((data >> 8) & 0xFF)\n + String.fromCharCode(data & 0xFF));\n}\n// padding\nvar _padding = String.fromCharCode(128);\nfor (var i = 64; i--;)\n _padding += String.fromCharCode(0);\n/**\n * Updates a SHA-1 state with the given byte buffer.\n */\nfunction update(data) {\n var a;\n var b;\n var c;\n var d;\n var e;\n var i = 0;\n var f = 0;\n var t = 0;\n // Array to use to store words.\n var words = new Uint32Array(80);\n // SHA-256 state contains five 32-bit integers\n var h1 = 0x67452301;\n var h2 = 0xEFCDAB89;\n var h3 = 0x98BADCFE;\n var h4 = 0x10325476;\n var h5 = 0xC3D2E1F0;\n var len = data.length;\n var p = 0; // let ni = 64;\n // consume 512 bit (64 byte) chunks\n // While decrementing loop is much faster than for\n while (len >= 64) {\n // initialize hash value for this chunk\n a = h1;\n b = h2;\n c = h3;\n d = h4;\n e = h5;\n // round 1\n for (i = 0; i < 16; i += 1) {\n words[i] = strToInt32(data, p);\n p += 4;\n f = d ^ (b & (c ^ d));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + words[i];\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n for (; i < 20; i += 1) {\n t = (words[i - 3] ^ words[i - 8] ^ words[i - 14] ^ words[i - 16]);\n t = (t << 1) | (t >>> 31);\n words[i] = t;\n f = d ^ (b & (c ^ d));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 2\n for (; i < 32; i += 1) {\n t = (words[i - 3] ^ words[i - 8] ^ words[i - 14] ^ words[i - 16]);\n t = (t << 1) | (t >>> 31);\n words[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n for (; i < 40; i += 1) {\n t = (words[i - 6] ^ words[i - 16] ^ words[i - 28] ^ words[i - 32]);\n t = (t << 2) | (t >>> 30);\n words[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 3\n for (; i < 60; i += 1) {\n t = (words[i - 6] ^ words[i - 16] ^ words[i - 28] ^ words[i - 32]);\n t = (t << 2) | (t >>> 30);\n words[i] = t;\n f = (b & c) | (d & (b ^ c));\n t = ((a << 5) | (a >>> 27)) + f + e + 0x8F1BBCDC + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // round 4\n for (; i < 80; i += 1) {\n t = (words[i - 6] ^ words[i - 16] ^ words[i - 28] ^ words[i - 32]);\n t = (t << 2) | (t >>> 30);\n words[i] = t;\n f = b ^ c ^ d;\n t = ((a << 5) | (a >>> 27)) + f + e + 0xCA62C1D6 + t;\n e = d;\n d = c;\n // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug\n c = ((b << 30) | (b >>> 2)) >>> 0;\n b = a;\n a = t;\n }\n // update hash state\n h1 = (h1 + a) | 0;\n h2 = (h2 + b) | 0;\n h3 = (h3 + c) | 0;\n h4 = (h4 + d) | 0;\n h5 = (h5 + e) | 0;\n len -= 64;\n }\n return {\n h1: h1, h2: h2, h3: h3, h4: h4, h5: h5,\n };\n}\n/**\n * Calculates sha1 hash from string\n */\nfunction sha1(message) {\n // 56-bit length of message so far (does not including padding)\n var len = message.length;\n var len64hi = (len / 0x100000000) >>> 0;\n var len64lo = len >>> 0;\n var flen = [0, 0];\n for (var i = flen.length - 1; i >= 0; i -= 1) {\n flen[i] += len64lo;\n len64lo = len64hi + ((flen[i] / 0x100000000) >>> 0);\n flen[i] >>>= 0;\n len64hi = ((len64lo / 0x100000000) >>> 0);\n }\n var pad = message;\n // compute remaining size to be digested (include message length size)\n var remaining = flen[flen.length - 1] + 8;\n // add padding for overflow blockSize - overflow\n // _padding starts with 1 byte with first bit is set (byte value 128), then\n // there may be up to (blockSize - 1) other pad bytes\n var overflow = remaining & 63;\n pad += _padding.substr(0, 64 - overflow);\n // serialize message length in bits in big-endian order; since length\n // is stored in bytes we multiply by 8 and add carry from next int\n var next;\n var carry;\n var bits = flen[0] * 8;\n for (var i = 0; i < flen.length - 1; i += 1) {\n next = flen[i + 1] * 8;\n carry = (next / 0x100000000) >>> 0;\n bits += carry;\n pad += int32ToStr(bits >>> 0);\n bits = next >>> 0;\n }\n pad += int32ToStr(bits);\n var state = update(pad);\n return int32ToStr(state.h1)\n + int32ToStr(state.h2)\n + int32ToStr(state.h3)\n + int32ToStr(state.h4)\n + int32ToStr(state.h5);\n}\nexports.default = sha1;\n//# sourceMappingURL=index.js.map"
},
{
"id": 20,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\@cryptography\\sha256\\dist\\es\\sha256.js",
"name": "./node_modules/@cryptography/sha256/dist/es/sha256.js",
"index": 12,
"index2": 6,
"size": 8334,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"issuerId": 12,
"issuerName": "./src/lib/crypto/crypto_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
}
}
],
"profile": {
"factory": 897,
"building": 17
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "@cryptography/sha256",
"loc": "17:33-64"
}
],
"usedExports": true,
"providedExports": [
"default"
],
"optimizationBailout": [
"ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/lib/crypto/crypto_utils.ts (referenced with cjs require)"
],
"depth": 3,
"source": "/**\n * Gets a uint32 from string in big-endian order order\n */\nfunction s2i(str, pos) {\n return (str.charCodeAt(pos) << 24\n ^ str.charCodeAt(pos + 1) << 16\n ^ str.charCodeAt(pos + 2) << 8\n ^ str.charCodeAt(pos + 3));\n}\n/**\n * Returns a uint32 as a string in big-endian order order\n */\nfunction i2s(data) {\n return (String.fromCharCode((data >> 24) & 0xFF)\n + String.fromCharCode((data >> 16) & 0xFF)\n + String.fromCharCode((data >> 8) & 0xFF)\n + String.fromCharCode(data & 0xFF));\n}\n/**\n * Returns a uint32 as a hex-string in big-endian order order\n */\nfunction i2h(data) {\n return (\"00000000\" + data.toString(16)).slice(-8);\n}\n\n/**\n * Creates new SHA-256 state\n */\nfunction init(h) {\n if (!h)\n h = new Uint32Array(8);\n // SHA-256 state contains eight 32-bit integers\n h[0] = 0x6A09E667;\n h[1] = 0xBB67AE85;\n h[2] = 0x3C6EF372;\n h[3] = 0xA54FF53A;\n h[4] = 0x510E527F;\n h[5] = 0x9B05688C;\n h[6] = 0x1F83D9AB;\n h[7] = 0x5BE0CD19;\n return h;\n}\n/** Array to use to store round words. */\nvar words = new Uint32Array(64);\n/** K table for SHA-256 */\nvar _k = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n]);\n/**\n * Perform round function\n */\nfunction round(state, data) {\n // initialize hash value for this chunk\n var a = state[0];\n var b = state[1];\n var c = state[2];\n var d = state[3];\n var e = state[4];\n var f = state[5];\n var g = state[6];\n var h = state[7];\n words.set(data);\n for (var i = 16; i < 64; i += 1) {\n // XOR word 2 words ago rot right 17, rot right 19, shft right 10\n var t1 = words[i - 2];\n t1 = ((t1 >>> 17) | (t1 << 15))\n ^ ((t1 >>> 19) | (t1 << 13))\n ^ (t1 >>> 10);\n // XOR word 15 words ago rot right 7, rot right 18, shft right 3\n var t2 = words[i - 15];\n t2 = ((t2 >>> 7) | (t2 << 25))\n ^ ((t2 >>> 18) | (t2 << 14))\n ^ (t2 >>> 3);\n // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^32\n words[i] = (t1 + words[i - 7] + t2 + words[i - 16]);\n }\n // Round Function\n for (var i = 0; i < 64; i += 1) {\n // Sum1(e)\n var s1 = ((e >>> 6) | (e << 26))\n ^ ((e >>> 11) | (e << 21))\n ^ ((e >>> 25) | (e << 7));\n // Ch(e, f, g) (optimized the same way as SHA-1)\n var ch = g ^ (e & (f ^ g));\n // Sum0(a)\n var s0 = ((a >>> 2) | (a << 30))\n ^ ((a >>> 13) | (a << 19))\n ^ ((a >>> 22) | (a << 10));\n // Maj(a, b, c) (optimized the same way as SHA-1)\n var maj = (a & b) | (c & (a ^ b));\n // main algorithm\n var t1 = h + s1 + ch + _k[i] + words[i];\n var t2 = s0 + maj;\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n // update hash state\n state[0] += a;\n state[1] += b;\n state[2] += c;\n state[3] += d;\n state[4] += e;\n state[5] += f;\n state[6] += g;\n state[7] += h;\n}\n/**\n * Pre-processing round buffer for string input\n */\nfunction preprocess(str, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n while (str.length >= 64) {\n for (var i = offset; i < 16; i++)\n buf[i] = s2i(str, i * 4);\n str = str.slice(64 - offset * 4);\n offset = 0;\n round(state, buf);\n }\n return str;\n}\n/**\n * Process input buffer\n */\nfunction process(input, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n while (input.length >= buf.length - offset) {\n buf.set(input.subarray(0, buf.length - offset), offset);\n input = input.subarray(buf.length - offset);\n offset = 0;\n round(state, buf);\n }\n if (input.length > 0) {\n buf.set(input, offset);\n offset += input.length;\n }\n return offset;\n}\n/**\n * Repeatable part\n */\nfunction finish(len, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n var len64hi = (len / 0x100000000) >>> 0;\n var len64lo = len >>> 0;\n for (var i = offset + 1; i < buf.length; i++)\n buf[i] = 0;\n if (offset >= 14) {\n round(state, buf);\n for (var i = 0; i < buf.length; i++)\n buf[i] = 0;\n }\n buf[14] = (len64hi << 3) | (len64hi >>> 28);\n buf[15] = len64lo << 3;\n round(state, buf);\n}\n/**\n * Adds padding to message\n */\nfunction finalizestr(chunk, len, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n for (; chunk.length >= 4; offset++) {\n buf[offset] = s2i(chunk, 0);\n chunk = chunk.slice(4);\n }\n if (offset >= 16) {\n round(state, buf);\n offset = 0;\n }\n buf[offset] = s2i(chunk + \"\\u0080\\0\\0\\0\", 0);\n finish(len, buf, state, offset);\n}\n/**\n * Adds padding to buffer\n */\nfunction finalize(len, buf, state, offset) {\n if (offset === void 0) { offset = 0; }\n buf[offset] = 0x80000000;\n finish(len, buf, state, offset);\n}\nfunction out(state, format) {\n if (format === void 0) { format = 'array'; }\n switch (format) {\n case 'hex': return (i2h(state[0])\n + i2h(state[1])\n + i2h(state[2])\n + i2h(state[3])\n + i2h(state[4])\n + i2h(state[5])\n + i2h(state[6])\n + i2h(state[7]));\n case 'binary': return (i2s(state[0])\n + i2s(state[1])\n + i2s(state[2])\n + i2s(state[3])\n + i2s(state[4])\n + i2s(state[5])\n + i2s(state[6])\n + i2s(state[7]));\n default: return state;\n }\n}\n/**\n * Stream handler for hashing\n */\nvar Stream = /** @class */ (function () {\n function Stream(buf) {\n this.buffer = new Uint32Array(16);\n this.state = init(buf);\n this.length = 0;\n this.offset = 0;\n this.tail = '';\n }\n Stream.prototype.update = function (chunk) {\n if (typeof chunk === 'string') {\n this.length += chunk.length;\n this.tail = preprocess(this.tail + chunk, this.buffer, this.state, this.offset);\n this.offset = 0;\n }\n else {\n if (this.tail.length > 0)\n throw new Error('Unable to update hash-stream with array');\n this.length += chunk.length * 4;\n this.offset = process(chunk, this.buffer, this.state, this.offset);\n }\n return this;\n };\n Stream.prototype.digest = function (format) {\n if (format === void 0) { format = 'array'; }\n if (this.tail.length > 0) {\n finalizestr(this.tail, this.length, this.buffer, this.state, this.offset);\n }\n else {\n finalize(this.length, this.buffer, this.state, this.offset);\n }\n return out(this.state, format);\n };\n Stream.prototype.clear = function () {\n this.state = init();\n this.length = 0;\n this.offset = 0;\n this.tail = '';\n };\n return Stream;\n}());\nfunction sha256(message, format) {\n if (format === void 0) { format = 'array'; }\n var buf = new Uint32Array(16);\n var state = init();\n if (typeof message === 'string')\n finalizestr(preprocess(message, buf, state), message.length, buf, state);\n else\n finalize(message.length * 4, buf, state, process(message, buf, state));\n return out(state, format);\n}\n/**\n * Hash with stream constructor\n */\nsha256.stream = function (buf) { return new Stream(buf); };\nsha256.blockLength = 64;\nsha256.digestLength = 32;\n\nexport default sha256;\n"
},
{
"id": 21,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\pako\\dist\\pako_inflate.min.js",
"name": "./node_modules/pako/dist/pako_inflate.min.js",
"index": 14,
"index2": 8,
"size": 22682,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"issuerId": 12,
"issuerName": "./src/lib/crypto/crypto_utils.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 12,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"name": "./src/lib/crypto/crypto_utils.ts",
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
}
}
],
"profile": {
"factory": 897,
"building": 17
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 12,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_utils.ts",
"module": "./src/lib/crypto/crypto_utils.ts",
"moduleName": "./src/lib/crypto/crypto_utils.ts",
"type": "cjs require",
"userRequest": "pako/dist/pako_inflate.min.js",
"loc": "20:46-86"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 3,
"source": "!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).pako=e()}}(function(){return function r(o,s,f){function l(t,e){if(!s[t]){if(!o[t]){var i=\"function\"==typeof require&&require;if(!e&&i)return i(t,!0);if(d)return d(t,!0);var n=new Error(\"Cannot find module '\"+t+\"'\");throw n.code=\"MODULE_NOT_FOUND\",n}var a=s[t]={exports:{}};o[t][0].call(a.exports,function(e){return l(o[t][1][e]||e)},a,a.exports,r,o,s,f)}return s[t].exports}for(var d=\"function\"==typeof require&&require,e=0;e<f.length;e++)l(f[e]);return l}({1:[function(e,t,i){\"use strict\";var n=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Int32Array;i.assign=function(e){for(var t,i,n=Array.prototype.slice.call(arguments,1);n.length;){var a=n.shift();if(a){if(\"object\"!=typeof a)throw new TypeError(a+\"must be non-object\");for(var r in a)t=a,i=r,Object.prototype.hasOwnProperty.call(t,i)&&(e[r]=a[r])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,n,a){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),a);else for(var r=0;r<n;r++)e[a+r]=t[i+r]},flattenChunks:function(e){var t,i,n,a,r,o;for(t=n=0,i=e.length;t<i;t++)n+=e[t].length;for(o=new Uint8Array(n),t=a=0,i=e.length;t<i;t++)r=e[t],o.set(r,a),a+=r.length;return o}},r={arraySet:function(e,t,i,n,a){for(var r=0;r<n;r++)e[a+r]=t[i+r]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,a)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,r))},i.setTyped(n)},{}],2:[function(e,t,i){\"use strict\";var f=e(\"./common\"),a=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var l=new f.Buf8(256),n=0;n<256;n++)l[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function d(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&a))return String.fromCharCode.apply(null,f.shrinkBuf(e,t));for(var i=\"\",n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i}l[254]=l[254]=1,i.string2buf=function(e){var t,i,n,a,r,o=e.length,s=0;for(a=0;a<o;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new f.Buf8(s),a=r=0;r<s;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),i<128?t[r++]=i:(i<2048?t[r++]=192|i>>>6:(i<65536?t[r++]=224|i>>>12:(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63),t[r++]=128|i>>>6&63),t[r++]=128|63&i);return t},i.buf2binstring=function(e){return d(e,e.length)},i.binstring2buf=function(e){for(var t=new f.Buf8(e.length),i=0,n=t.length;i<n;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,n,a,r,o=t||e.length,s=new Array(2*o);for(i=n=0;i<o;)if((a=e[i++])<128)s[n++]=a;else if(4<(r=l[a]))s[n++]=65533,i+=r-1;else{for(a&=2===r?31:3===r?15:7;1<r&&i<o;)a=a<<6|63&e[i++],r--;1<r?s[n++]=65533:a<65536?s[n++]=a:(a-=65536,s[n++]=55296|a>>10&1023,s[n++]=56320|1023&a)}return d(s,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0?t:0===i?t:i+l[e[i]]>t?i:t}},{\"./common\":1}],3:[function(e,t,i){\"use strict\";t.exports=function(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3<i?2e3:i;r=r+(a=a+t[n++]|0)|0,--o;);a%=65521,r%=65521}return a|r<<16|0}},{}],4:[function(e,t,i){\"use strict\";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){\"use strict\";var s=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,n){var a=s,r=n+i;e^=-1;for(var o=n;o<r;o++)e=e>>>8^a[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,i){\"use strict\";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){\"use strict\";t.exports=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z;i=e.state,n=e.next_in,E=e.input,a=n+(e.avail_in-5),r=e.next_out,Z=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,c=i.wnext,u=i.window,h=i.hold,b=i.bits,m=i.lencode,w=i.distcode,k=(1<<i.lenbits)-1,_=(1<<i.distbits)-1;e:do{b<15&&(h+=E[n++]<<b,b+=8,h+=E[n++]<<b,b+=8),g=m[h&k];t:for(;;){if(h>>>=v=g>>>24,b-=v,0===(v=g>>>16&255))Z[r++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=m[(65535&g)+(h&(1<<v)-1)];continue t}if(32&v){i.mode=12;break e}e.msg=\"invalid literal/length code\",i.mode=30;break e}p=65535&g,(v&=15)&&(b<v&&(h+=E[n++]<<b,b+=8),p+=h&(1<<v)-1,h>>>=v,b-=v),b<15&&(h+=E[n++]<<b,b+=8,h+=E[n++]<<b,b+=8),g=w[h&_];i:for(;;){if(h>>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<<v)-1)];continue i}e.msg=\"invalid distance code\",i.mode=30;break e}if(x=65535&g,b<(v&=15)&&(h+=E[n++]<<b,(b+=8)<v&&(h+=E[n++]<<b,b+=8)),f<(x+=h&(1<<v)-1)){e.msg=\"invalid distance too far back\",i.mode=30;break e}if(h>>>=v,b-=v,(v=r-o)<x){if(d<(v=x-v)&&i.sane){e.msg=\"invalid distance too far back\",i.mode=30;break e}if(S=u,(y=0)===c){if(y+=l-v,v<p){for(p-=v;Z[r++]=u[y++],--v;);y=r-x,S=Z}}else if(c<v){if(y+=l+c-v,(v-=c)<p){for(p-=v;Z[r++]=u[y++],--v;);if(y=0,c<p){for(p-=v=c;Z[r++]=u[y++],--v;);y=r-x,S=Z}}}else if(y+=c-v,v<p){for(p-=v;Z[r++]=u[y++],--v;);y=r-x,S=Z}for(;2<p;)Z[r++]=S[y++],Z[r++]=S[y++],Z[r++]=S[y++],p-=3;p&&(Z[r++]=S[y++],1<p&&(Z[r++]=S[y++]))}else{for(y=r-x;Z[r++]=Z[y++],Z[r++]=Z[y++],Z[r++]=Z[y++],2<(p-=3););p&&(Z[r++]=Z[y++],1<p&&(Z[r++]=Z[y++]))}break}}break}}while(n<a&&r<s);n-=p=b>>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n<a?a-n+5:5-(n-a),e.avail_out=r<s?s-r+257:257-(r-s),i.hold=h,i.bits=b}},{}],8:[function(e,t,i){\"use strict\";var z=e(\"../utils/common\"),R=e(\"./adler32\"),N=e(\"./crc32\"),O=e(\"./inffast\"),C=e(\"./inftrees\"),I=1,D=2,T=0,U=-2,F=1,n=852,a=592;function L(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new z.Buf16(320),this.work=new z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new z.Buf32(n),t.distcode=t.distdyn=new z.Buf32(a),t.sane=1,t.back=-1,T):U}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):U}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?U:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,s(e))):U}function l(e,t){var i,n;return e?(n=new r,(e.state=n).window=null,(i=f(e,t))!==T&&(e.state=null),i):U}var d,c,u=!0;function H(e){if(u){var t;for(d=new z.Buf32(512),c=new z.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(C(I,e.lens,0,288,d,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;C(D,e.lens,0,32,c,0,e.work,{bits:5}),u=!1}e.lencode=d,e.lenbits=9,e.distcode=c,e.distbits=5}function j(e,t,i,n){var a,r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new z.Buf8(r.wsize)),n>=r.wsize?(z.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n<(a=r.wsize-r.wnext)&&(a=n),z.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(z.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0}i.inflateReset=s,i.inflateReset2=f,i.inflateResetKeep=o,i.inflateInit=function(e){return l(e,15)},i.inflateInit2=l,i.inflate=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z=0,B=new z.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return U;12===(i=e.state).mode&&(i.mode=13),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,c=s,u=f,y=T;e:for(;;)switch(i.mode){case F:if(0===i.wrap){i.mode=13;break}for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(2&i.wrap&&35615===l){B[i.check=0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0),d=l=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg=\"incorrect header check\",i.mode=30;break}if(8!=(15&l)){e.msg=\"unknown compression method\",i.mode=30;break}if(d-=4,x=8+(15&(l>>>=4)),0===i.wbits)i.wbits=x;else if(x>i.wbits){e.msg=\"invalid window size\",i.mode=30;break}i.dmax=1<<x,e.adler=i.check=1,i.mode=512&l?10:12,d=l=0;break;case 2:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(i.flags=l,8!=(255&i.flags)){e.msg=\"unknown compression method\",i.mode=30;break}if(57344&i.flags){e.msg=\"unknown header flags set\",i.mode=30;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=3;case 3:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.head&&(i.head.time=l),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,i.check=N(i.check,B,4,0)),d=l=0,i.mode=4;case 4:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=5;case 5:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(s<(h=i.length)&&(h=s),h&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),z.arraySet(i.head.extra,n,r,h,x)),512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,i.length-=h),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x)),x&&h<s;);if(512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,x)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.comment+=String.fromCharCode(x)),x&&h<s;);if(512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,x)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(l!==(65535&i.check)){e.msg=\"header crc mismatch\",i.mode=30;break}d=l=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}e.adler=i.check=L(l),d=l=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,2;e.adler=i.check=1,i.mode=12;case 12:if(5===t||6===t)break e;case 13:if(i.last){l>>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}switch(i.last=1&l,d-=1,3&(l>>>=1)){case 0:i.mode=14;break;case 1:if(H(i),i.mode=20,6!==t)break;l>>>=2,d-=2;break e;case 2:i.mode=17;break;case 3:e.msg=\"invalid block type\",i.mode=30}l>>>=2,d-=2;break;case 14:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg=\"invalid stored block lengths\",i.mode=30;break}if(i.length=65535&l,d=l=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(h=i.length){if(s<h&&(h=s),f<h&&(h=f),0===h)break e;z.arraySet(a,n,r,h,o),s-=h,r+=h,f-=h,o+=h,i.length-=h;break}i.mode=12;break;case 17:for(;d<14;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(i.nlen=257+(31&l),l>>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286<i.nlen||30<i.ndist){e.msg=\"too many length or distance symbols\",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;d<3;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.lens[A[i.have++]]=7&l,l>>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,S={bits:i.lenbits},y=C(0,i.lens,0,19,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg=\"invalid code lengths set\",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;k=(Z=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(_<16)l>>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(l>>>=w,d-=w,0===i.have){e.msg=\"invalid bit length repeat\",i.mode=30;break}x=i.lens[i.have-1],h=3+(3&l),l>>>=2,d-=2}else if(17===_){for(E=w+3;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}d-=w,x=0,h=3+(7&(l>>>=w)),l>>>=3,d-=3}else{for(E=w+7;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}d-=w,x=0,h=11+(127&(l>>>=w)),l>>>=7,d-=7}if(i.have+h>i.nlen+i.ndist){e.msg=\"invalid bit length repeat\",i.mode=30;break}for(;h--;)i.lens[i.have++]=x}}if(30===i.mode)break;if(0===i.lens[256]){e.msg=\"invalid code -- missing end-of-block\",i.mode=30;break}if(i.lenbits=9,S={bits:i.lenbits},y=C(I,i.lens,0,i.nlen,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg=\"invalid literal/lengths set\",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,S={bits:i.distbits},y=C(D,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,S),i.distbits=S.bits,y){e.msg=\"invalid distances set\",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=s&&258<=f){e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,O(e,u),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;k=(Z=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(k&&0==(240&k)){for(g=w,v=k,p=_;k=(Z=i.lencode[p+((l&(1<<g+v)-1)>>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}l>>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,i.length=_,0===k){i.mode=26;break}if(32&k){i.back=-1,i.mode=12;break}if(64&k){e.msg=\"invalid literal/length code\",i.mode=30;break}i.extra=15&k,i.mode=22;case 22:if(i.extra){for(E=i.extra;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;k=(Z=i.distcode[l&(1<<i.distbits)-1])>>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(0==(240&k)){for(g=w,v=k,p=_;k=(Z=i.distcode[p+((l&(1<<g+v)-1)>>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}l>>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,64&k){e.msg=\"invalid distance code\",i.mode=30;break}i.offset=_,i.extra=15&k,i.mode=24;case 24:if(i.extra){for(E=i.extra;d<E;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg=\"invalid distance too far back\",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(h=u-f,i.offset>h){if((h=i.offset-h)>i.whave&&i.sane){e.msg=\"invalid distance too far back\",i.mode=30;break}h>i.wnext?(h-=i.wnext,b=i.wsize-h):b=i.wnext-h,h>i.length&&(h=i.length),m=i.window}else m=a,b=o-i.offset,h=i.length;for(f<h&&(h=f),f-=h,i.length-=h;a[o++]=m[b++],--h;);0===i.length&&(i.mode=21);break;case 26:if(0===f)break e;a[o++]=i.length,f--,i.mode=21;break;case 27:if(i.wrap){for(;d<32;){if(0===s)break e;s--,l|=n[r++]<<d,d+=8}if(u-=f,e.total_out+=u,i.total+=u,u&&(e.adler=i.check=i.flags?N(i.check,a,u,o-u):R(i.check,a,u,o-u)),u=f,(i.flags?l:L(l))!==i.check){e.msg=\"incorrect data check\",i.mode=30;break}d=l=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(l!==(4294967295&i.total)){e.msg=\"incorrect length check\",i.mode=30;break}d=l=0}i.mode=29;case 29:y=1;break e;case 30:y=-3;break e;case 31:return-4;case 32:default:return U}return e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,(i.wsize||u!==e.avail_out&&i.mode<30&&(i.mode<27||4!==t))&&j(e,e.output,e.next_out,u-e.avail_out)?(i.mode=31,-4):(c-=e.avail_in,u-=e.avail_out,e.total_in+=c,e.total_out+=u,i.total+=u,i.wrap&&u&&(e.adler=i.check=i.flags?N(i.check,a,u,e.next_out-u):R(i.check,a,u,e.next_out-u)),e.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0===c&&0===u||4===t)&&y===T&&(y=-5),y)},i.inflateEnd=function(e){if(!e||!e.state)return U;var t=e.state;return t.window&&(t.window=null),e.state=null,T},i.inflateGetHeader=function(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?U:((i.head=t).done=!1,T):U},i.inflateSetDictionary=function(e,t){var i,n=t.length;return e&&e.state?0!==(i=e.state).wrap&&11!==i.mode?U:11===i.mode&&R(1,t,n,0)!==i.check?-3:j(e,t,n,n)?(i.mode=31,-4):(i.havedict=1,T):U},i.inflateInfo=\"pako inflate (from Nodeca project)\"},{\"../utils/common\":1,\"./adler32\":3,\"./crc32\":5,\"./inffast\":7,\"./inftrees\":9}],9:[function(e,t,i){\"use strict\";var I=e(\"../utils/common\"),D=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],T=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],U=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],F=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,n,a,r,o,s){var f,l,d,c,u,h,b,m,w,k=s.bits,_=0,g=0,v=0,p=0,x=0,y=0,S=0,E=0,Z=0,B=0,A=null,z=0,R=new I.Buf16(16),N=new I.Buf16(16),O=null,C=0;for(_=0;_<=15;_++)R[_]=0;for(g=0;g<n;g++)R[t[i+g]]++;for(x=k,p=15;1<=p&&0===R[p];p--);if(p<x&&(x=p),0===p)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(v=1;v<p&&0===R[v];v++);for(x<v&&(x=v),_=E=1;_<=15;_++)if(E<<=1,(E-=R[_])<0)return-1;if(0<E&&(0===e||1!==p))return-1;for(N[1]=0,_=1;_<15;_++)N[_+1]=N[_]+R[_];for(g=0;g<n;g++)0!==t[i+g]&&(o[N[t[i+g]]++]=g);if(0===e?(A=O=o,h=19):1===e?(A=D,z-=257,O=T,C-=257,h=256):(A=U,O=F,h=-1),_=v,u=r,S=g=B=0,d=-1,c=(Z=1<<(y=x))-1,1===e&&852<Z||2===e&&592<Z)return 1;for(;;){for(b=_-S,o[g]<h?(m=0,w=o[g]):o[g]>h?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<<y;a[u+(B>>S)+(l-=f)]=b<<24|m<<16|w|0,0!==l;);for(f=1<<_-1;B&f;)f>>=1;if(0!==f?(B&=f-1,B+=f):B=0,g++,0==--R[_]){if(_===p)break;_=t[i+o[g]]}if(x<_&&(B&c)!==d){for(0===S&&(S=x),u+=v,E=1<<(y=_-S);y+S<p&&!((E-=R[y+S])<=0);)y++,E<<=1;if(Z+=1<<y,1===e&&852<Z||2===e&&592<Z)return 1;a[d=B&c]=x<<24|y<<16|u-r|0}}return 0!==B&&(a[u+B]=_-S<<24|64<<16|0),s.bits=x,0}},{\"../utils/common\":1}],10:[function(e,t,i){\"use strict\";t.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],11:[function(e,t,i){\"use strict\";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],\"/lib/inflate.js\":[function(e,t,i){\"use strict\";var c=e(\"./zlib/inflate\"),u=e(\"./utils/common\"),h=e(\"./utils/strings\"),b=e(\"./zlib/constants\"),n=e(\"./zlib/messages\"),a=e(\"./zlib/zstream\"),r=e(\"./zlib/gzheader\"),m=Object.prototype.toString;function o(e){if(!(this instanceof o))return new o(e);this.options=u.assign({chunkSize:16384,windowBits:0,to:\"\"},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var i=c.inflateInit2(this.strm,t.windowBits);if(i!==b.Z_OK)throw new Error(n[i]);if(this.header=new r,c.inflateGetHeader(this.strm,this.header),t.dictionary&&(\"string\"==typeof t.dictionary?t.dictionary=h.string2buf(t.dictionary):\"[object ArrayBuffer]\"===m.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=c.inflateSetDictionary(this.strm,t.dictionary))!==b.Z_OK))throw new Error(n[i])}function s(e,t){var i=new o(t);if(i.push(e,!0),i.err)throw i.msg||n[i.err];return i.result}o.prototype.push=function(e,t){var i,n,a,r,o,s=this.strm,f=this.options.chunkSize,l=this.options.dictionary,d=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?b.Z_FINISH:b.Z_NO_FLUSH,\"string\"==typeof e?s.input=h.binstring2buf(e):\"[object ArrayBuffer]\"===m.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new u.Buf8(f),s.next_out=0,s.avail_out=f),(i=c.inflate(s,b.Z_NO_FLUSH))===b.Z_NEED_DICT&&l&&(i=c.inflateSetDictionary(this.strm,l)),i===b.Z_BUF_ERROR&&!0===d&&(i=b.Z_OK,d=!1),i!==b.Z_STREAM_END&&i!==b.Z_OK)return this.onEnd(i),!(this.ended=!0);s.next_out&&(0!==s.avail_out&&i!==b.Z_STREAM_END&&(0!==s.avail_in||n!==b.Z_FINISH&&n!==b.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(a=h.utf8border(s.output,s.next_out),r=s.next_out-a,o=h.buf2string(s.output,a),s.next_out=r,s.avail_out=f-r,r&&u.arraySet(s.output,s.output,a,r,0),this.onData(o)):this.onData(u.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(d=!0)}while((0<s.avail_in||0===s.avail_out)&&i!==b.Z_STREAM_END);return i===b.Z_STREAM_END&&(n=b.Z_FINISH),n===b.Z_FINISH?(i=c.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===b.Z_OK):n!==b.Z_SYNC_FLUSH||(this.onEnd(b.Z_OK),!(s.avail_out=0))},o.prototype.onData=function(e){this.chunks.push(e)},o.prototype.onEnd=function(e){e===b.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=o,i.inflate=s,i.inflateRaw=function(e,t){return(t=t||{}).raw=!0,s(e,t)},i.ungzip=s},{\"./utils/common\":1,\"./utils/strings\":2,\"./zlib/constants\":4,\"./zlib/gzheader\":6,\"./zlib/inflate\":8,\"./zlib/messages\":10,\"./zlib/zstream\":11}]},{},[])(\"/lib/inflate.js\")});\n"
},
{
"id": 22,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\crypto_methods.ts",
"name": "./src/lib/crypto/crypto_methods.ts",
"index": 17,
"index2": 12,
"size": 1422,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"issuerId": 1,
"issuerName": "./src/lib/crypto/cryptoworker.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 1,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"name": "./src/lib/crypto/cryptoworker.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 22,
"building": 133,
"dependencies": 870
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\crypto\\cryptoworker.ts",
"module": "./src/lib/crypto/cryptoworker.ts",
"moduleName": "./src/lib/crypto/cryptoworker.ts",
"type": "cjs require",
"userRequest": "./crypto_methods",
"loc": "26:41-68"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 2,
"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": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts",
"name": "./src/lib/mtproto/transports/websocket.ts",
"index": 20,
"index2": 18,
"size": 7993,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"issuerId": 8,
"issuerName": "./src/lib/mtproto/dcConfigurator.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"name": "./src/lib/mtproto/dcConfigurator.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 431,
"building": 313,
"dependencies": 226
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 8,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"module": "./src/lib/mtproto/dcConfigurator.ts",
"moduleName": "./src/lib/mtproto/dcConfigurator.ts",
"type": "cjs require",
"userRequest": "./transports/websocket",
"loc": "7:36-69"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.Obfuscation = void 0;\r\nconst transport_1 = __importDefault(require(\"./transport\"));\r\n//import aesjs from 'aes-js';\r\nconst aes_1 = require(\"@cryptography/aes\");\r\n//import abridgetPacketCodec from './abridged';\r\nconst intermediate_1 = __importDefault(require(\"./intermediate\"));\r\nconst polyfill_1 = require(\"../../polyfill\");\r\nconst bin_utils_1 = require(\"../../bin_utils\");\r\n/*\r\n@cryptography/aes не работает с массивами которые не кратны 4, поэтому использую intermediate а не abridged\r\n*/\r\nclass Obfuscation {\r\n init(codec) {\r\n const initPayload = new Uint8Array(64);\r\n initPayload.randomize();\r\n while (true) {\r\n let val = (initPayload[3] << 24) | (initPayload[2] << 16) | (initPayload[1] << 8) | (initPayload[0]);\r\n let val2 = (initPayload[7] << 24) | (initPayload[6] << 16) | (initPayload[5] << 8) | (initPayload[4]);\r\n if (initPayload[0] != 0xef &&\r\n val != 0x44414548 &&\r\n val != 0x54534f50 &&\r\n val != 0x20544547 &&\r\n val != 0x4954504f &&\r\n val != 0xeeeeeeee &&\r\n val != 0xdddddddd &&\r\n val2 != 0x00000000) {\r\n //initPayload[56] = initPayload[57] = initPayload[58] = initPayload[59] = transport;\r\n break;\r\n }\r\n initPayload.randomize();\r\n }\r\n ////////////////////////initPayload.subarray(60, 62).hex = dcID;\r\n const reversedPayload = initPayload.slice().reverse();\r\n let encKey = initPayload.slice(8, 40);\r\n let encIv = initPayload.slice(40, 56);\r\n let decKey = reversedPayload.slice(8, 40);\r\n let decIv = reversedPayload.slice(40, 56);\r\n /* this.enc = new aesjs.ModeOfOperation.ctr(encKey, new aesjs.Counter(encIv as any));\r\n this.dec = new aesjs.ModeOfOperation.ctr(decKey, new aesjs.Counter(decIv as any)); */\r\n this.encNew = new aes_1.CTR(encKey, encIv);\r\n this.decNew = new aes_1.CTR(decKey, decIv);\r\n initPayload.set(intermediate_1.default.obfuscateTag, 56);\r\n const encrypted = this.encode(initPayload);\r\n initPayload.set(encrypted.slice(56, 64), 56);\r\n return initPayload;\r\n }\r\n /* public encode(payload: Uint8Array) {\r\n let res = this.enc.encrypt(payload);\r\n \r\n try {\r\n let arr = this.encNew.encrypt(payload);\r\n //let resNew = bytesFromWords({words: arr, sigBytes: arr.length});\r\n let resNew = new Uint8Array(bytesFromWordss(arr));\r\n console.log('Obfuscation: encode comparison:', res, arr, resNew, res.hex == resNew.hex);\r\n } catch(err) {\r\n console.error('Obfuscation: error:', err);\r\n }\r\n \r\n return res;\r\n }\r\n \r\n public decode(payload: Uint8Array) {\r\n let res = this.dec.encrypt(payload);\r\n \r\n try {\r\n let arr = this.decNew.decrypt(payload);\r\n //let resNew = bytesFromWords({words: arr, sigBytes: arr.length});\r\n let resNew = new Uint8Array(bytesFromWordss(arr));\r\n console.log('Obfuscation: decode comparison:', res, arr, resNew, res.hex == resNew.hex);\r\n } catch(err) {\r\n console.error('Obfuscation: error:', err);\r\n }\r\n \r\n return res;\r\n } */\r\n encode(payload) {\r\n let res = this.encNew.encrypt(payload);\r\n let bytes = new Uint8Array(bin_utils_1.bytesFromWordss(res));\r\n return bytes;\r\n }\r\n decode(payload) {\r\n let res = this.decNew.decrypt(payload);\r\n let bytes = new Uint8Array(bin_utils_1.bytesFromWordss(res));\r\n return bytes;\r\n }\r\n}\r\nexports.Obfuscation = Obfuscation;\r\nclass Socket extends transport_1.default {\r\n constructor(dcID, url) {\r\n super(dcID, url);\r\n this.pending = [];\r\n this.connected = false;\r\n this.transport = 'websocket';\r\n this.obfuscation = new Obfuscation();\r\n this.debug = false;\r\n this.codec = intermediate_1.default;\r\n this.connect = () => {\r\n if (this.ws) {\r\n this.ws.removeEventListener('open', this.handleOpen);\r\n this.ws.removeEventListener('close', this.handleClose);\r\n this.ws.removeEventListener('message', this.handleMessage);\r\n this.ws.close(1000);\r\n }\r\n this.ws = new WebSocket(this.url, 'binary');\r\n this.ws.binaryType = 'arraybuffer';\r\n this.ws.onopen = this.handleOpen;\r\n this.ws.onclose = this.handleClose;\r\n this.ws.onmessage = this.handleMessage;\r\n };\r\n this.handleOpen = () => {\r\n this.log('opened');\r\n this.ws.send(this.obfuscation.init(this.codec));\r\n this.connected = true;\r\n this.releasePending();\r\n };\r\n this.handleClose = (event) => {\r\n this.log('closed', event);\r\n this.connected = false;\r\n this.pending.length = 0;\r\n if (this.networker) {\r\n this.networker.cleanupSent();\r\n }\r\n this.log('trying to reconnect...');\r\n this.connect();\r\n };\r\n this.handleMessage = (event) => {\r\n this.debug && this.log('<-', 'handleMessage', event);\r\n let data = this.obfuscation.decode(new Uint8Array(event.data));\r\n data = this.codec.readPacket(data);\r\n if (this.networker) { // authenticated!\r\n //this.pending = this.pending.filter(p => p.body); // clear pending\r\n this.debug && this.log('redirecting to networker');\r\n return this.networker.parseResponse(data).then(response => {\r\n this.debug && this.log('redirecting to networker response:', response);\r\n this.networker.processMessage(response.response, response.messageID, response.sessionID);\r\n });\r\n }\r\n //console.log('got hex:', data.hex);\r\n let pending = this.pending.shift();\r\n if (!pending) {\r\n return this.log('no pending for res:', data.hex);\r\n }\r\n pending.resolve(data);\r\n };\r\n this.send = (body) => {\r\n this.debug && this.log('-> body length to pending:', body.length);\r\n if (this.networker) {\r\n this.pending.push({ body });\r\n this.releasePending();\r\n }\r\n else {\r\n let promise = new Promise((resolve, reject) => {\r\n this.pending.push({ resolve, reject, body });\r\n });\r\n this.releasePending();\r\n return promise;\r\n }\r\n };\r\n this.log = polyfill_1.logger(`WS-${dcID}`);\r\n this.log('constructor');\r\n this.connect();\r\n }\r\n releasePending() {\r\n if (!this.connected) {\r\n //this.connect();\r\n return;\r\n }\r\n let length = this.pending.length;\r\n for (let i = length - 1; i >= 0; --i) {\r\n let pending = this.pending[i];\r\n let { body } = pending;\r\n if (body) {\r\n let toEncode = this.codec.encodePacket(body);\r\n //console.log('send before obf:', /* body.hex, nonce.hex, */ toEncode.hex);\r\n let enc = this.obfuscation.encode(toEncode);\r\n //console.log('send after obf:', enc.hex);\r\n this.debug && this.log('-> body length to send:', enc.length);\r\n this.ws.send(enc);\r\n if (!pending.resolve) { // remove if no response needed\r\n this.pending.splice(i, 1);\r\n }\r\n delete pending.body;\r\n }\r\n }\r\n }\r\n}\r\nexports.default = Socket;\r\n"
},
{
"id": 24,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\intermediate.ts",
"name": "./src/lib/mtproto/transports/intermediate.ts",
"index": 22,
"index2": 16,
"size": 1671,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts",
"issuerId": 23,
"issuerName": "./src/lib/mtproto/transports/websocket.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 8,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\dcConfigurator.ts",
"name": "./src/lib/mtproto/dcConfigurator.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
},
{
"id": 23,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\transports\\websocket.ts",
"name": "./src/lib/mtproto/transports/websocket.ts",
"profile": {
"factory": 431,
"building": 313,
"dependencies": 226
}
}
],
"profile": {
"factory": 226,
"building": 26,
"dependencies": 0
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 23,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\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": "./intermediate",
"loc": "11:39-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"depth": 4,
"source": "\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst bin_utils_1 = require(\"../../bin_utils\");\r\nclass IntermediatePacketCodec {\r\n constructor() {\r\n this.tag = 0xee;\r\n this.obfuscateTag = new Uint8Array([this.tag, this.tag, this.tag, this.tag]);\r\n }\r\n encodePacket(data) {\r\n let len = data.byteLength;\r\n let header = new Uint8Array(new Uint32Array([len]).buffer);\r\n return header.concat(data);\r\n }\r\n readPacket(data) {\r\n let length = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);\r\n return data.slice(4, 4 + length);\r\n }\r\n}\r\n/* Data packets are aligned to 4bytes. This codec adds random bytes of size\r\n from 0 to 3 bytes, which are ignored by decoder. */\r\nclass PaddedIntermediatePacketCodec extends IntermediatePacketCodec {\r\n constructor() {\r\n super(...arguments);\r\n this.tag = 0xdd;\r\n this.obfuscateTag = new Uint8Array([this.tag, this.tag, this.tag, this.tag]);\r\n }\r\n encodePacket(data) {\r\n let padding = new Uint8Array(bin_utils_1.nextRandomInt(3)).randomize();\r\n let len = data.byteLength + padding.byteLength;\r\n let header = new Uint8Array(new Uint32Array([len]).buffer);\r\n console.log('encodePacket', padding, len, data, header);\r\n return header.concat(data, padding);\r\n }\r\n readPacket(data) {\r\n let padLength = data.byteLength % 4;\r\n if (padLength > 0) {\r\n return data.slice(4, -padLength);\r\n }\r\n return data.slice(4);\r\n }\r\n}\r\nexports.default = new IntermediatePacketCodec();\r\n//export default new PaddedIntermediatePacketCodec();\r\n"
},
{
"id": 25,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.ts",
"name": "./src/lib/mtproto/mtproto.ts",
"index": 25,
"index2": 23,
"size": 2926,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./mtproto",
"loc": "19:18-38"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.telegramMeWebService = exports.TelegramMeWebService = void 0;\r\nconst storage_1 = __importDefault(require(\"../storage\"));\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 = Date.now() / 1000;\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": 26,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"name": "./src/lib/mtproto/authorizer.ts",
"index": 26,
"index2": 25,
"size": 23315,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./authorizer",
"loc": "20:37-60"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.Authorizer = void 0;\r\nconst tl_utils_1 = require(\"./tl_utils\");\r\nconst dcConfigurator_1 = __importDefault(require(\"./dcConfigurator\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst rsaKeysManager_1 = __importDefault(require(\"./rsaKeysManager\"));\r\nconst timeManager_1 = __importDefault(require(\"./timeManager\"));\r\n// @ts-ignore\r\nconst jsbn_1 = require(\"jsbn\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nclass Authorizer {\r\n constructor() {\r\n this.cached = {};\r\n }\r\n mtpSendPlainRequest(dcID, requestArray) {\r\n var requestLength = requestArray.byteLength;\r\n //requestArray = new /* Int32Array */Uint8Array(requestBuffer);\r\n var header = new tl_utils_1.TLSerialization();\r\n header.storeLongP(0, 0, 'auth_key_id'); // Auth key\r\n header.storeLong(timeManager_1.default.generateID(), 'msg_id'); // Msg_id\r\n header.storeInt(requestLength, 'request_length');\r\n let headerArray = header.getBytes(true);\r\n let resultArray = new Uint8Array(headerArray.byteLength + requestLength);\r\n resultArray.set(headerArray);\r\n resultArray.set(requestArray, headerArray.length);\r\n /* var headerBuffer = header.getBuffer(),\r\n headerArray = new Int32Array(headerBuffer);\r\n var headerLength = headerBuffer.byteLength;\r\n \r\n var resultBuffer = new ArrayBuffer(headerLength + requestLength),\r\n resultArray = new Int32Array(resultBuffer);\r\n \r\n resultArray.set(headerArray);\r\n resultArray.set(requestArray, headerArray.length);\r\n \r\n let requestData = xhrSendBuffer ? resultBuffer : resultArray; */\r\n let transport = dcConfigurator_1.default.chooseServer(dcID);\r\n let baseError = {\r\n code: 406,\r\n type: 'NETWORK_BAD_RESPONSE',\r\n transport: transport\r\n };\r\n console.log(bin_utils_1.dT(), 'mtpSendPlainRequest: creating requestPromise');\r\n return transport.send(resultArray).then(result => {\r\n console.log(bin_utils_1.dT(), 'mtpSendPlainRequest: in good sector', result);\r\n if (!result || !result.byteLength) {\r\n return Promise.reject(baseError);\r\n }\r\n try {\r\n /* result = fResult ? fResult : result;\r\n fResult = new Uint8Array(0); */\r\n let deserializer = new tl_utils_1.TLDeserialization(result, { mtproto: true });\r\n let auth_key_id = deserializer.fetchLong('auth_key_id');\r\n if (auth_key_id != 0)\r\n console.error('auth_key_id != 0', auth_key_id);\r\n let msg_id = deserializer.fetchLong('msg_id');\r\n if (msg_id == 0)\r\n console.error('msg_id == 0', msg_id);\r\n let msg_len = deserializer.fetchInt('msg_len');\r\n if (!msg_len)\r\n console.error('no msg_len', msg_len);\r\n return deserializer;\r\n }\r\n catch (e) {\r\n console.error('mtpSendPlainRequest: deserialization went bad', e);\r\n let error = Object.assign(baseError, { originalError: e });\r\n throw error;\r\n }\r\n }, error => {\r\n if (!error.message && !error.type) {\r\n error = Object.assign(baseError, {\r\n originalError: error\r\n });\r\n }\r\n return Promise.reject(error);\r\n });\r\n }\r\n mtpSendReqPQ(auth) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\r\n request.storeMethod('req_pq_multi', { nonce: auth.nonce });\r\n // need\r\n rsaKeysManager_1.default.prepare().then(() => { });\r\n console.log(bin_utils_1.dT(), 'Send req_pq', auth.nonce.hex);\r\n try {\r\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, request.getBytes(true));\r\n }\r\n catch (error) {\r\n console.error(bin_utils_1.dT(), 'req_pq error', error.message);\r\n throw error;\r\n }\r\n var response = deserializer.fetchObject('ResPQ');\r\n if (response._ != 'resPQ') {\r\n throw new Error('[MT] resPQ response invalid: ' + response._);\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\r\n console.log(auth.nonce, response.nonce);\r\n throw new Error('[MT] resPQ nonce mismatch');\r\n }\r\n //auth.serverNonce = response.server_nonce;\r\n auth.serverNonce = new Uint8Array(response.server_nonce); // need\r\n auth.pq = response.pq;\r\n auth.fingerprints = response.server_public_key_fingerprints;\r\n console.log(bin_utils_1.dT(), 'Got ResPQ', bin_utils_1.bytesToHex(auth.serverNonce), bin_utils_1.bytesToHex(auth.pq), auth.fingerprints);\r\n let publicKey = yield rsaKeysManager_1.default.select(auth.fingerprints);\r\n if (!publicKey) {\r\n throw new Error('[MT] No public key found');\r\n }\r\n auth.publicKey = publicKey;\r\n console.log(bin_utils_1.dT(), 'PQ factorization start', auth.pq);\r\n try {\r\n var pAndQ = yield cryptoworker_1.default.factorize(auth.pq);\r\n }\r\n catch (error) {\r\n console.error('worker error factorize', error);\r\n throw error;\r\n }\r\n auth.p = pAndQ[0];\r\n auth.q = pAndQ[1];\r\n console.log(bin_utils_1.dT(), 'PQ factorization done', pAndQ);\r\n /* let p = new Uint32Array(new Uint8Array(auth.p).buffer)[0];\r\n let q = new Uint32Array(new Uint8Array(auth.q).buffer)[0];\r\n console.log(dT(), 'PQ factorization done', pAndQ, p.toString(16), q.toString(16)); */\r\n return this.mtpSendReqDhParams(auth);\r\n });\r\n }\r\n mtpSendReqDhParams(auth) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n auth.newNonce = new Uint8Array(32).randomize();\r\n /* auth.newNonce = new Array(32); // need array, not uint8array!\r\n MTProto.secureRandom.nextBytes(auth.newNonce); */\r\n //console.log(\"TCL: Authorizer -> mtpSendReqDhParams -> auth.newNonce\", auth.newNonce)\r\n // remove\r\n // auth.newNonce = fNewNonce ? fNewNonce : auth.newNonce;\r\n // console.log(\"TCL: Authorizer -> mtpSendReqDhParams -> auth.newNonce\", auth.newNonce);\r\n let p_q_inner_data = {\r\n _: 'p_q_inner_data',\r\n pq: auth.pq,\r\n p: auth.p,\r\n q: auth.q,\r\n nonce: auth.nonce,\r\n server_nonce: auth.serverNonce,\r\n new_nonce: auth.newNonce\r\n };\r\n let data = new tl_utils_1.TLSerialization({ mtproto: true });\r\n data.storeObject(p_q_inner_data, 'P_Q_inner_data', 'DECRYPTED_DATA');\r\n /* console.log('p_q_inner_data', p_q_inner_data,\r\n bytesToHex(bytesFromArrayBuffer(data.getBuffer())),\r\n sha1BytesSync(data.getBuffer()),\r\n bytesFromArrayBuffer(await CryptoWorker.sha1Hash(data.getBuffer()))); */\r\n let uint8Data = data.getBytes(true);\r\n let sha1Hashed = yield cryptoworker_1.default.sha1Hash(uint8Data);\r\n //var dataWithHash = sha1BytesSync(data.getBuffer()).concat(data.getBytes() as number[]);\r\n let dataWithHash = sha1Hashed.concat(uint8Data);\r\n //dataWithHash = addPadding(dataWithHash, 255);\r\n //dataWithHash = dataWithHash.concat(bytesFromHex('96228ea7790e71caaabc2ab67f4412e9aa224c664d232cc08617a32ce1796aa052da4a737083211689858f461e4473fd6394afd3aa0c8014840dc13f47beaf4fc3b9229aea9cfa83f9f6e676e50ee7676542fb75606879ee7e65cf3a2295b4ba0934ceec1011560c62395a6e9593bfb117cd0da75ba56723672d100ac17ec4d805aa59f7852e3a25a79ee4'));\r\n //console.log('sha1Hashed', bytesToHex(sha1Hashed), 'dataWithHash', bytesToHex(dataWithHash), dataWithHash.length);\r\n let rsaEncrypted = yield cryptoworker_1.default.rsaEncrypt(auth.publicKey, dataWithHash);\r\n //let rsaEncrypted = await CryptoWorker.rsaEncrypt(auth.publicKey, dataWithHash);\r\n //console.log('rsaEncrypted', rsaEncrypted, new Uint8Array(rsaEncrypted).hex);\r\n let req_DH_params = {\r\n nonce: auth.nonce,\r\n server_nonce: auth.serverNonce,\r\n p: auth.p,\r\n q: auth.q,\r\n public_key_fingerprint: auth.publicKey.fingerprint,\r\n encrypted_data: rsaEncrypted\r\n };\r\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\r\n request.storeMethod('req_DH_params', req_DH_params);\r\n let requestBytes = request.getBytes(true);\r\n console.log(bin_utils_1.dT(), 'Send req_DH_params', req_DH_params /* , requestBytes.hex */);\r\n try {\r\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, requestBytes);\r\n }\r\n catch (error) {\r\n console.log(bin_utils_1.dT(), 'Send req_DH_params FAIL!', error);\r\n throw error;\r\n }\r\n var response = deserializer.fetchObject('Server_DH_Params', 'RESPONSE');\r\n console.log(bin_utils_1.dT(), 'Sent req_DH_params, response:', response);\r\n if (response._ != 'server_DH_params_fail' && response._ != 'server_DH_params_ok') {\r\n throw new Error('[MT] Server_DH_Params response invalid: ' + response._);\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\r\n throw new Error('[MT] Server_DH_Params nonce mismatch');\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\r\n throw new Error('[MT] Server_DH_Params server_nonce mismatch');\r\n }\r\n if (response._ == 'server_DH_params_fail') {\r\n //var newNonceHash = sha1BytesSync(auth.newNonce).slice(-16);\r\n var newNonceHash = (yield cryptoworker_1.default.sha1Hash(auth.newNonce)).slice(-16);\r\n if (!bin_utils_1.bytesCmp(newNonceHash, response.new_nonce_hash)) {\r\n throw new Error('[MT] server_DH_params_fail new_nonce_hash mismatch');\r\n }\r\n throw new Error('[MT] server_DH_params_fail');\r\n }\r\n // fill auth object\r\n try {\r\n yield this.mtpDecryptServerDhDataAnswer(auth, response.encrypted_answer);\r\n }\r\n catch (e) {\r\n console.error(bin_utils_1.dT(), 'mtpDecryptServerDhDataAnswer FAILED!', e);\r\n throw e;\r\n }\r\n //console.log(dT(), 'mtpSendReqDhParams: executing mtpSendSetClientDhParams...');\r\n return this.mtpSendSetClientDhParams(auth); // костыль\r\n });\r\n }\r\n mtpDecryptServerDhDataAnswer(auth, encryptedAnswer) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n auth.localTime = Date.now();\r\n // can't concat Array with Uint8Array!\r\n //auth.tmpAesKey = sha1BytesSync(auth.newNonce.concat(auth.serverNonce)).concat(sha1BytesSync(auth.serverNonce.concat(auth.newNonce)).slice(0, 12));\r\n //auth.tmpAesIv = sha1BytesSync(auth.serverNonce.concat(auth.newNonce)).slice(12).concat(sha1BytesSync([].concat(auth.newNonce, auth.newNonce)), auth.newNonce.slice(0, 4));\r\n auth.tmpAesKey = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat(auth.serverNonce)))\r\n .concat((yield cryptoworker_1.default.sha1Hash(auth.serverNonce.concat(auth.newNonce))).slice(0, 12));\r\n auth.tmpAesIv = (yield cryptoworker_1.default.sha1Hash(auth.serverNonce.concat(auth.newNonce))).slice(12)\r\n .concat(yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat(auth.newNonce)), auth.newNonce.slice(0, 4));\r\n /* console.log(auth.serverNonce.concat(auth.newNonce));\r\n console.log(auth.newNonce.concat(auth.serverNonce));\r\n console.log(auth.newNonce.concat(auth.newNonce)); */\r\n //var answerWithHash = aesDecryptSync(encryptedAnswer, auth.tmpAesKey, auth.tmpAesIv);\r\n var answerWithHash = new Uint8Array(yield cryptoworker_1.default.aesDecrypt(encryptedAnswer, auth.tmpAesKey, auth.tmpAesIv));\r\n var hash = answerWithHash.slice(0, 20);\r\n var answerWithPadding = answerWithHash.slice(20);\r\n // console.log('hash', hash);\r\n var deserializer = new tl_utils_1.TLDeserialization(answerWithPadding, { mtproto: true });\r\n var response = deserializer.fetchObject('Server_DH_inner_data');\r\n if (response._ != 'server_DH_inner_data') {\r\n throw new Error('[MT] server_DH_inner_data response invalid: ' + response);\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\r\n throw new Error('[MT] server_DH_inner_data nonce mismatch');\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\r\n throw new Error('[MT] server_DH_inner_data serverNonce mismatch');\r\n }\r\n console.log(bin_utils_1.dT(), 'Done decrypting answer');\r\n auth.g = response.g;\r\n auth.dhPrime = response.dh_prime;\r\n auth.gA = response.g_a;\r\n auth.serverTime = response.server_time;\r\n auth.retry = 0;\r\n this.mtpVerifyDhParams(auth.g, auth.dhPrime, auth.gA);\r\n var offset = deserializer.getOffset();\r\n //if(!bytesCmp(hash, sha1BytesSync(answerWithPadding.slice(0, offset)))) {\r\n if (!bin_utils_1.bytesCmp(hash, yield cryptoworker_1.default.sha1Hash(answerWithPadding.slice(0, offset)))) {\r\n throw new Error('[MT] server_DH_inner_data SHA1-hash mismatch');\r\n }\r\n timeManager_1.default.applyServerTime(auth.serverTime, auth.localTime);\r\n });\r\n }\r\n mtpVerifyDhParams(g, dhPrime, gA) {\r\n console.log(bin_utils_1.dT(), 'Verifying DH params');\r\n var dhPrimeHex = bin_utils_1.bytesToHex(dhPrime);\r\n if (g != 3 || dhPrimeHex !== 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b') {\r\n // The verified value is from https://core.telegram.org/mtproto/security_guidelines\r\n throw new Error('[MT] DH params are not verified: unknown dhPrime');\r\n }\r\n console.log(bin_utils_1.dT(), 'dhPrime cmp OK');\r\n var gABigInt = new jsbn_1.BigInteger(bin_utils_1.bytesToHex(gA), 16);\r\n var dhPrimeBigInt = new jsbn_1.BigInteger(dhPrimeHex, 16);\r\n if (gABigInt.compareTo(jsbn_1.BigInteger.ONE) <= 0) {\r\n throw new Error('[MT] DH params are not verified: gA <= 1');\r\n }\r\n if (gABigInt.compareTo(dhPrimeBigInt.subtract(jsbn_1.BigInteger.ONE)) >= 0) {\r\n throw new Error('[MT] DH params are not verified: gA >= dhPrime - 1');\r\n }\r\n console.log(bin_utils_1.dT(), '1 < gA < dhPrime-1 OK');\r\n var two = new jsbn_1.BigInteger(/* null */ '');\r\n two.fromInt(2);\r\n var twoPow = two.pow(2048 - 64);\r\n if (gABigInt.compareTo(twoPow) < 0) {\r\n throw new Error('[MT] DH params are not verified: gA < 2^{2048-64}');\r\n }\r\n if (gABigInt.compareTo(dhPrimeBigInt.subtract(twoPow)) >= 0) {\r\n throw new Error('[MT] DH params are not verified: gA > dhPrime - 2^{2048-64}');\r\n }\r\n console.log(bin_utils_1.dT(), '2^{2048-64} < gA < dhPrime-2^{2048-64} OK');\r\n return true;\r\n }\r\n mtpSendSetClientDhParams(auth) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n var gBytes = bin_utils_1.bytesFromHex(auth.g.toString(16));\r\n auth.b = new Array(256);\r\n auth.b = [...new Uint8Array(auth.b.length).randomize()];\r\n //MTProto.secureRandom.nextBytes(auth.b);\r\n try {\r\n var gB = yield cryptoworker_1.default.modPow(gBytes, auth.b, auth.dhPrime);\r\n }\r\n catch (error) {\r\n throw error;\r\n }\r\n var data = new tl_utils_1.TLSerialization({ mtproto: true });\r\n data.storeObject({\r\n _: 'client_DH_inner_data',\r\n nonce: auth.nonce,\r\n server_nonce: auth.serverNonce,\r\n retry_id: [0, auth.retry++],\r\n g_b: gB\r\n }, 'Client_DH_Inner_Data');\r\n //var dataWithHash = sha1BytesSync(data.getBuffer()).concat(data.getBytes());\r\n var dataWithHash = (yield cryptoworker_1.default.sha1Hash(data.getBuffer())).concat(data.getBytes());\r\n //var encryptedData = aesEncryptSync(dataWithHash, auth.tmpAesKey, auth.tmpAesIv);\r\n var encryptedData = yield cryptoworker_1.default.aesEncrypt(dataWithHash, auth.tmpAesKey, auth.tmpAesIv);\r\n var request = new tl_utils_1.TLSerialization({ mtproto: true });\r\n request.storeMethod('set_client_DH_params', {\r\n nonce: auth.nonce,\r\n server_nonce: auth.serverNonce,\r\n encrypted_data: encryptedData\r\n });\r\n console.log(bin_utils_1.dT(), 'Send set_client_DH_params');\r\n try {\r\n var deserializer = yield this.mtpSendPlainRequest(auth.dcID, request.getBytes(true));\r\n }\r\n catch (err) {\r\n throw err;\r\n }\r\n let response = deserializer.fetchObject('Set_client_DH_params_answer');\r\n if (response._ != 'dh_gen_ok' && response._ != 'dh_gen_retry' && response._ != 'dh_gen_fail') {\r\n throw new Error('[MT] Set_client_DH_params_answer response invalid: ' + response._);\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.nonce, response.nonce)) {\r\n throw new Error('[MT] Set_client_DH_params_answer nonce mismatch');\r\n }\r\n if (!bin_utils_1.bytesCmp(auth.serverNonce, response.server_nonce)) {\r\n throw new Error('[MT] Set_client_DH_params_answer server_nonce mismatch');\r\n }\r\n try {\r\n var authKey = yield cryptoworker_1.default.modPow(auth.gA, auth.b, auth.dhPrime);\r\n }\r\n catch (err) {\r\n throw authKey;\r\n }\r\n //var authKeyHash = sha1BytesSync(authKey),\r\n let authKeyHash = yield cryptoworker_1.default.sha1Hash(authKey), authKeyAux = authKeyHash.slice(0, 8), authKeyID = authKeyHash.slice(-8);\r\n console.log(bin_utils_1.dT(), 'Got Set_client_DH_params_answer', response._, authKey);\r\n switch (response._) {\r\n case 'dh_gen_ok':\r\n var newNonceHash1 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([1], authKeyAux))).slice(-16);\r\n //var newNonceHash1 = sha1BytesSync(auth.newNonce.concat([1], authKeyAux)).slice(-16);\r\n if (!bin_utils_1.bytesCmp(newNonceHash1, response.new_nonce_hash1)) {\r\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash1 mismatch');\r\n }\r\n var serverSalt = bin_utils_1.bytesXor(auth.newNonce.slice(0, 8), auth.serverNonce.slice(0, 8));\r\n console.log('Auth successfull!', authKeyID, authKey, serverSalt);\r\n auth.authKeyID = authKeyID;\r\n auth.authKey = authKey;\r\n auth.serverSalt = serverSalt;\r\n return auth;\r\n break;\r\n case 'dh_gen_retry':\r\n //var newNonceHash2 = sha1BytesSync(auth.newNonce.concat([2], authKeyAux)).slice(-16);\r\n var newNonceHash2 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([2], authKeyAux))).slice(-16);\r\n if (!bin_utils_1.bytesCmp(newNonceHash2, response.new_nonce_hash2)) {\r\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash2 mismatch');\r\n }\r\n return this.mtpSendSetClientDhParams(auth);\r\n case 'dh_gen_fail':\r\n //var newNonceHash3 = sha1BytesSync(auth.newNonce.concat([3], authKeyAux)).slice(-16);\r\n var newNonceHash3 = (yield cryptoworker_1.default.sha1Hash(auth.newNonce.concat([3], authKeyAux))).slice(-16);\r\n if (!bin_utils_1.bytesCmp(newNonceHash3, response.new_nonce_hash3)) {\r\n throw new Error('[MT] Set_client_DH_params_answer new_nonce_hash3 mismatch');\r\n }\r\n throw new Error('[MT] Set_client_DH_params_answer fail');\r\n }\r\n });\r\n }\r\n // mtpAuth\r\n auth(dcID) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (dcID in this.cached) {\r\n return this.cached[dcID];\r\n }\r\n let nonce = /* fNonce ? fNonce : */ new Uint8Array(16).randomize();\r\n /* var nonce = new Array(16);\r\n MTProto.secureRandom.nextBytes(nonce); */\r\n if (!dcConfigurator_1.default.chooseServer(dcID)) {\r\n return Promise.reject(new Error('[MT] No server found for dc ' + dcID));\r\n }\r\n try {\r\n let promise = this.mtpSendReqPQ({ dcID, nonce });\r\n this.cached[dcID] = promise;\r\n return yield promise;\r\n }\r\n catch (err) {\r\n delete this.cached[dcID];\r\n throw err;\r\n }\r\n });\r\n }\r\n}\r\nexports.Authorizer = Authorizer;\r\nexports.default = new Authorizer();\r\n"
},
{
"id": 27,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\rsaKeysManager.ts",
"name": "./src/lib/mtproto/rsaKeysManager.ts",
"index": 27,
"index2": 24,
"size": 9544,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"issuerId": 26,
"issuerName": "./src/lib/mtproto/authorizer.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
},
{
"id": 26,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"name": "./src/lib/mtproto/authorizer.ts",
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
}
}
],
"profile": {
"factory": 438,
"building": 329,
"dependencies": 1
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 26,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\authorizer.ts",
"module": "./src/lib/mtproto/authorizer.ts",
"moduleName": "./src/lib/mtproto/authorizer.ts",
"type": "cjs require",
"userRequest": "./rsaKeysManager",
"loc": "19:41-68"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.RSAKeysManager = void 0;\r\nconst tl_utils_1 = require(\"./tl_utils\");\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nclass RSAKeysManager {\r\n constructor() {\r\n /**\r\n * Server public key, obtained from here: https://core.telegram.org/api/obtaining_api_id\r\n *\r\n *\r\n * -----BEGIN RSA PUBLIC KEY-----\r\n * MIIBCgKCAQEAwVACPi9w23mF3tBkdZz+zwrzKOaaQdr01vAbU4E1pvkfj4sqDsm6\r\n * lyDONS789sVoD/xCS9Y0hkkC3gtL1tSfTlgCMOOul9lcixlEKzwKENj1Yz/s7daS\r\n * an9tqw3bfUV/nqgbhGX81v/+7RFAEd+RwFnK7a+XYl9sluzHRyVVaTTveB2GazTw\r\n * Efzk2DWgkBluml8OREmvfraX3bkHZJTKX4EQSjBbbdJ2ZXIsRrYOXfaA+xayEGB+\r\n * 8hdlLmAjbCVfaigxX0CDqWeR1yFL9kwd9P0NsZRPsmoqVwMbMu7mStFai6aIhc3n\r\n * Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB\r\n * -----END RSA PUBLIC KEY-----\r\n *\r\n * -----BEGIN PUBLIC KEY-----\r\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAruw2yP/BCcsJliRoW5eB\r\n * VBVle9dtjJw+OYED160Wybum9SXtBBLXriwt4rROd9csv0t0OHCaTmRqBcQ0J8fx\r\n * hN6/cpR1GWgOZRUAiQxoMnlt0R93LCX/j1dnVa/gVbCjdSxpbrfY2g2L4frzjJvd\r\n * l84Kd9ORYjDEAyFnEA7dD556OptgLQQ2e2iVNq8NZLYTzLp5YpOdO1doK+ttrltg\r\n * gTCy5SrKeLoCPPbOgGsdxJxyz5KKcZnSLj16yE5HvJQn0CNpRdENvRUXe6tBP78O\r\n * 39oJ8BTHp9oIjd6XWXAsp2CvK45Ol8wFXGF710w9lwCGNbmNxNYhtIkdqfsEcwR5\r\n * JwIDAQAB\r\n * -----END PUBLIC KEY-----\r\n *\r\n * -----BEGIN PUBLIC KEY-----\r\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvfLHfYH2r9R70w8prHbl\r\n * Wt/nDkh+XkgpflqQVcnAfSuTtO05lNPspQmL8Y2XjVT4t8cT6xAkdgfmmvnvRPOO\r\n * KPi0OfJXoRVylFzAQG/j83u5K3kRLbae7fLccVhKZhY46lvsueI1hQdLgNV9n1cQ\r\n * 3TDS2pQOCtovG4eDl9wacrXOJTG2990VjgnIKNA0UMoP+KF03qzryqIt3oTvZq03\r\n * DyWdGK+AZjgBLaDKSnC6qD2cFY81UryRWOab8zKkWAnhw2kFpcqhI0jdV5QaSCEx\r\n * vnsjVaX0Y1N0870931/5Jb9ICe4nweZ9kSDF/gip3kWLG0o8XQpChDfyvsqB9OLV\r\n * /wIDAQAB\r\n * -----END PUBLIC KEY-----\r\n *\r\n * -----BEGIN PUBLIC KEY-----\r\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/ditzm+mPND6xkhzwFI\r\n * z6J/968CtkcSE/7Z2qAJiXbmZ3UDJPGrzqTDHkO30R8VeRM/Kz2f4nR05GIFiITl\r\n * 4bEjvpy7xqRDspJcCFIOcyXm8abVDhF+th6knSU0yLtNKuQVP6voMrnt9MV1X92L\r\n * GZQLgdHZbPQz0Z5qIpaKhdyA8DEvWWvSUwwc+yi1/gGaybwlzZwqXYoPOhwMebzK\r\n * Uk0xW14htcJrRrq+PXXQbRzTMynseCoPIoke0dtCodbA3qQxQovE16q9zz4Otv2k\r\n * 4j63cz53J+mhkVWAeWxVGI0lltJmWtEYK6er8VqqWot3nqmWMXogrgRLggv/Nbbo\r\n * oQIDAQAB\r\n * -----END PUBLIC KEY-----\r\n *\r\n * -----BEGIN PUBLIC KEY-----\r\n * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvmpxVY7ld/8DAjz6F6q0\r\n * 5shjg8/4p6047bn6/m8yPy1RBsvIyvuDuGnP/RzPEhzXQ9UJ5Ynmh2XJZgHoE9xb\r\n * nfxL5BXHplJhMtADXKM9bWB11PU1Eioc3+AXBB8QiNFBn2XI5UkO5hPhbb9mJpjA\r\n * 9Uhw8EdfqJP8QetVsI/xrCEbwEXe0xvifRLJbY08/Gp66KpQvy7g8w7VB8wlgePe\r\n * xW3pT13Ap6vuC+mQuJPyiHvSxjEKHgqePji9NP3tJUFQjcECqcm0yV7/2d0t/pbC\r\n * m+ZH1sadZspQCEPPrtbkQBlvHb4OLiIWPGHKSMeRFvp3IWcmdJqXahxLCUS1Eh6M\r\n * AQIDAQAB\r\n * -----END PUBLIC KEY-----\r\n *\r\n * Bytes can be got via\r\n * $ openssl rsa -pubin -in key.pub -text -noout\r\n */\r\n this.publisKeysHex = [{\r\n modulus: 'c150023e2f70db7985ded064759cfecf0af328e69a41daf4d6f01b538135a6f91f8f8b2a0ec9ba9720ce352efcf6c5680ffc424bd634864902de0b4bd6d49f4e580230e3ae97d95c8b19442b3c0a10d8f5633fecedd6926a7f6dab0ddb7d457f9ea81b8465fcd6fffeed114011df91c059caedaf97625f6c96ecc74725556934ef781d866b34f011fce4d835a090196e9a5f0e4449af7eb697ddb9076494ca5f81104a305b6dd27665722c46b60e5df680fb16b210607ef217652e60236c255f6a28315f4083a96791d7214bf64c1df4fd0db1944fb26a2a57031b32eee64ad15a8ba68885cde74a5bfc920f6abf59ba5c75506373e7130f9042da922179251f',\r\n exponent: '010001'\r\n }, {\r\n modulus: 'aeec36c8ffc109cb099624685b97815415657bd76d8c9c3e398103d7ad16c9bba6f525ed0412d7ae2c2de2b44e77d72cbf4b7438709a4e646a05c43427c7f184debf72947519680e651500890c6832796dd11f772c25ff8f576755afe055b0a3752c696eb7d8da0d8be1faf38c9bdd97ce0a77d3916230c4032167100edd0f9e7a3a9b602d04367b689536af0d64b613ccba7962939d3b57682beb6dae5b608130b2e52aca78ba023cf6ce806b1dc49c72cf928a7199d22e3d7ac84e47bc9427d0236945d10dbd15177bab413fbf0edfda09f014c7a7da088dde9759702ca760af2b8e4e97cc055c617bd74c3d97008635b98dc4d621b4891da9fb0473047927',\r\n exponent: '010001'\r\n }, {\r\n modulus: 'bdf2c77d81f6afd47bd30f29ac76e55adfe70e487e5e48297e5a9055c9c07d2b93b4ed3994d3eca5098bf18d978d54f8b7c713eb10247607e69af9ef44f38e28f8b439f257a11572945cc0406fe3f37bb92b79112db69eedf2dc71584a661638ea5becb9e23585074b80d57d9f5710dd30d2da940e0ada2f1b878397dc1a72b5ce2531b6f7dd158e09c828d03450ca0ff8a174deacebcaa22dde84ef66ad370f259d18af806638012da0ca4a70baa83d9c158f3552bc9158e69bf332a45809e1c36905a5caa12348dd57941a482131be7b2355a5f4635374f3bd3ddf5ff925bf4809ee27c1e67d9120c5fe08a9de458b1b4a3c5d0a428437f2beca81f4e2d5ff',\r\n exponent: '010001'\r\n }, {\r\n modulus: 'b3f762b739be98f343eb1921cf0148cfa27ff7af02b6471213fed9daa0098976e667750324f1abcea4c31e43b7d11f1579133f2b3d9fe27474e462058884e5e1b123be9cbbc6a443b2925c08520e7325e6f1a6d50e117eb61ea49d2534c8bb4d2ae4153fabe832b9edf4c5755fdd8b19940b81d1d96cf433d19e6a22968a85dc80f0312f596bd2530c1cfb28b5fe019ac9bc25cd9c2a5d8a0f3a1c0c79bcca524d315b5e21b5c26b46babe3d75d06d1cd33329ec782a0f22891ed1db42a1d6c0dea431428bc4d7aabdcf3e0eb6fda4e23eb7733e7727e9a1915580796c55188d2596d2665ad1182ba7abf15aaa5a8b779ea996317a20ae044b820bff35b6e8a1',\r\n exponent: '010001'\r\n }, {\r\n modulus: 'be6a71558ee577ff03023cfa17aab4e6c86383cff8a7ad38edb9fafe6f323f2d5106cbc8cafb83b869cffd1ccf121cd743d509e589e68765c96601e813dc5b9dfc4be415c7a6526132d0035ca33d6d6075d4f535122a1cdfe017041f1088d1419f65c8e5490ee613e16dbf662698c0f54870f0475fa893fc41eb55b08ff1ac211bc045ded31be27d12c96d8d3cfc6a7ae8aa50bf2ee0f30ed507cc2581e3dec56de94f5dc0a7abee0be990b893f2887bd2c6310a1e0a9e3e38bd34fded2541508dc102a9c9b4c95effd9dd2dfe96c29be647d6c69d66ca500843cfaed6e440196f1dbe0e2e22163c61ca48c79116fa77216726749a976a1c4b0944b5121e8c01',\r\n exponent: '010001'\r\n }];\r\n this.publicKeysParsed = {};\r\n this.prepared = false;\r\n this.preparePromise = null;\r\n }\r\n // prepareRsaKeys\r\n prepare() {\r\n if (this.preparePromise)\r\n return this.preparePromise;\r\n else if (this.prepared) {\r\n return Promise.resolve();\r\n }\r\n return this.preparePromise = Promise.all(this.publisKeysHex.map(keyParsed => {\r\n let RSAPublicKey = new tl_utils_1.TLSerialization();\r\n RSAPublicKey.storeBytes(bin_utils_1.bytesFromHex(keyParsed.modulus), 'n');\r\n RSAPublicKey.storeBytes(bin_utils_1.bytesFromHex(keyParsed.exponent), 'e');\r\n let buffer = RSAPublicKey.getBuffer();\r\n return cryptoworker_1.default.sha1Hash(buffer).then(hash => {\r\n let fingerprintBytes = bin_utils_1.bytesFromArrayBuffer(hash).slice(-8);\r\n fingerprintBytes.reverse();\r\n this.publicKeysParsed[bin_utils_1.bytesToHex(fingerprintBytes)] = {\r\n modulus: keyParsed.modulus,\r\n exponent: keyParsed.exponent\r\n };\r\n });\r\n })).then(() => {\r\n this.prepared = true;\r\n console.log('[MT] Prepared keys');\r\n this.preparePromise = null;\r\n });\r\n }\r\n // selectRsaKeyByFingerPrint\r\n select(fingerprints) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.prepare();\r\n var fingerprintHex, foundKey, i;\r\n for (i = 0; i < fingerprints.length; i++) {\r\n fingerprintHex = bin_utils_1.bigStringInt(fingerprints[i]).toString(16);\r\n if (fingerprintHex.length < 16) {\r\n fingerprintHex = new Array(16 - fingerprintHex.length).fill('0').join('') + fingerprintHex;\r\n }\r\n console.log(fingerprintHex, this.publicKeysParsed);\r\n if (foundKey = this.publicKeysParsed[fingerprintHex]) {\r\n return Object.assign({\r\n fingerprint: fingerprints[i]\r\n }, foundKey);\r\n }\r\n }\r\n return false;\r\n });\r\n }\r\n}\r\nexports.RSAKeysManager = RSAKeysManager;\r\nexports.default = new RSAKeysManager();\r\n"
},
{
"id": 28,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\passwordManager.ts",
"name": "./src/lib/mtproto/passwordManager.ts",
"index": 28,
"index2": 26,
"size": 13021,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"issuer": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"issuerId": 6,
"issuerName": "./src/lib/mtproto/apiManager.ts",
"issuerPath": [
{
"id": 17,
"identifier": "E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\mtproto.worker.js",
"name": "./src/lib/mtproto/mtproto.worker.js",
"profile": {
"factory": 0,
"building": 393
}
},
{
"id": 6,
"identifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"name": "./src/lib/mtproto/apiManager.ts",
"profile": {
"factory": 815,
"building": 344,
"dependencies": 0
}
}
],
"profile": {
"factory": 171,
"building": 487,
"dependencies": 83
},
"failed": false,
"errors": 0,
"warnings": 0,
"assets": [],
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "E:\\projects\\TWEB\\tweb\\node_modules\\ts-loader\\index.js!E:\\projects\\TWEB\\tweb\\node_modules\\ifdef-loader\\ifdef-loader.js??ref--5-1!E:\\projects\\TWEB\\tweb\\src\\lib\\mtproto\\apiManager.ts",
"module": "./src/lib/mtproto/apiManager.ts",
"moduleName": "./src/lib/mtproto/apiManager.ts",
"type": "cjs require",
"userRequest": "./passwordManager",
"loc": "25:42-70"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [
"ModuleConcatenation bailout: Module is not an ECMAScript module"
],
"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\nexports.PasswordManager = void 0;\r\nconst apiManager_1 = __importDefault(require(\"./apiManager\"));\r\nconst bin_utils_1 = require(\"../bin_utils\");\r\nconst cryptoworker_1 = __importDefault(require(\"../crypto/cryptoworker\"));\r\nconst index_1 = require(\"leemon/es/index/\");\r\nclass PasswordManager {\r\n getState(options = {}) {\r\n return apiManager_1.default.invokeApi('account.getPassword', {}, options).then((result) => {\r\n return result;\r\n });\r\n }\r\n /* public updateSettings(state: any, settings: any) {\r\n var currentHashPromise;\r\n var newHashPromise;\r\n var params: any = {\r\n new_settings: {\r\n _: 'account.passwordInputSettings',\r\n flags: 0,\r\n hint: settings.hint || ''\r\n }\r\n };\r\n \r\n if(typeof settings.cur_password === 'string' &&\r\n settings.cur_password.length > 0) {\r\n currentHashPromise = this.makePasswordHash(state.current_salt, settings.cur_password);\r\n } else {\r\n currentHashPromise = Promise.resolve([]);\r\n }\r\n \r\n if (typeof settings.new_password === 'string' &&\r\n settings.new_password.length > 0) {\r\n var saltRandom = new Array(8);\r\n var newSalt = bufferConcat(state.new_salt, saltRandom);\r\n secureRandom.nextBytes(saltRandom);\r\n newHashPromise = this.makePasswordHash(newSalt, settings.new_password);\r\n params.new_settings.new_salt = newSalt;\r\n params.new_settings.flags |= 1;\r\n } else {\r\n if(typeof settings.new_password === 'string') {\r\n params.new_settings.flags |= 1;\r\n params.new_settings.new_salt = [];\r\n }\r\n newHashPromise = Promise.resolve([]);\r\n }\r\n \r\n if(typeof settings.email === 'string') {\r\n params.new_settings.flags |= 2;\r\n params.new_settings.email = settings.email || '';\r\n }\r\n \r\n return Promise.all([currentHashPromise, newHashPromise]).then((hashes) => {\r\n params.current_password_hash = hashes[0];\r\n params.new_settings.new_password_hash = hashes[1];\r\n \r\n return apiManager.invokeApi('account.updatePasswordSettings', params);\r\n });\r\n } */\r\n check(state, password, options = {}) {\r\n return this.computeCheck(password, state).then((inputCheckPassword) => {\r\n return apiManager_1.default.invokeApi('auth.checkPassword', {\r\n password: inputCheckPassword\r\n }, options);\r\n });\r\n }\r\n requestRecovery(options = {}) {\r\n return apiManager_1.default.invokeApi('auth.requestPasswordRecovery', {}, options);\r\n }\r\n recover(code, options = {}) {\r\n return apiManager_1.default.invokeApi('auth.recoverPassword', {\r\n code: code\r\n }, options);\r\n }\r\n makePasswordHash(password, client_salt, server_salt) {\r\n var passwordUTF8 = unescape(encodeURIComponent(password));\r\n // @ts-ignore\r\n const textEncoder = new TextEncoder(\"utf-8\");\r\n const passwordBuffer = textEncoder.encode(passwordUTF8);\r\n // right\r\n let buffer = bin_utils_1.bufferConcats(client_salt, passwordBuffer, client_salt);\r\n return cryptoworker_1.default.sha256Hash(buffer).then((buffer) => {\r\n console.log('encoded 1', bin_utils_1.bytesToHex(new Uint8Array(buffer)));\r\n buffer = bin_utils_1.bufferConcats(server_salt, buffer, server_salt);\r\n return cryptoworker_1.default.sha256Hash(buffer).then((buffer) => {\r\n console.log('encoded 2', buffer, bin_utils_1.bytesToHex(new Uint8Array(buffer)));\r\n return cryptoworker_1.default.pbkdf2(new Uint8Array(buffer), client_salt, 100000).then((hash) => {\r\n console.log('encoded 3', hash, bin_utils_1.bytesToHex(new Uint8Array(hash)));\r\n hash = bin_utils_1.bufferConcats(server_salt, hash, server_salt);\r\n return cryptoworker_1.default.sha256Hash(hash).then((buffer) => {\r\n console.log('got password hash:', buffer, bin_utils_1.bytesToHex(new Uint8Array(buffer)));\r\n return buffer;\r\n });\r\n });\r\n });\r\n });\r\n }\r\n computeCheck(password, state) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let algo = state.current_algo;\r\n let p = index_1.str2bigInt(bin_utils_1.bytesToHex(algo.p), 16);\r\n let B = index_1.str2bigInt(bin_utils_1.bytesToHex(state.srp_B), 16);\r\n let g = index_1.int2bigInt(algo.g, 32, 256);\r\n console.log('p', index_1.bigInt2str(p, 16));\r\n console.log('B', index_1.bigInt2str(B, 16));\r\n /* if(B.compareTo(BigInteger.ZERO) < 0) {\r\n console.error('srp_B < 0')\r\n }\r\n \r\n if(B.compareTo(p) <= 0) {\r\n console.error('srp_B <= p');\r\n } */\r\n /* let check_prime_and_good = (bytes: any, g: number) => {\r\n let good_prime = 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b';\r\n \r\n if(bytesToHex(bytes) == good_prime && [3, 4, 5, 7].indexOf(g) !== -1) {\r\n return true;\r\n }\r\n \r\n // TO-DO check_prime_and_good_check\r\n }; */\r\n //check_prime_and_good(algo.p, g);\r\n let pw_hash = yield this.makePasswordHash(password, new Uint8Array(algo.salt1), new Uint8Array(algo.salt2));\r\n let x = index_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(pw_hash)), 16);\r\n console.warn('computed pw_hash:', pw_hash, x, bin_utils_1.bytesToHex(new Uint8Array(pw_hash)));\r\n var padArray = function (arr, len, fill = 0) {\r\n return Array(len).fill(fill).concat(arr).slice(-len);\r\n };\r\n let pForHash = padArray(bin_utils_1.bytesFromHex(index_1.bigInt2str(p, 16)), 256);\r\n let gForHash = padArray(bin_utils_1.bytesFromHex(index_1.bigInt2str(g, 16)), 256); // like uint8array\r\n let b_for_hash = padArray(bin_utils_1.bytesFromHex(index_1.bigInt2str(B, 16)), 256);\r\n console.log(bin_utils_1.bytesToHex(pForHash));\r\n console.log(bin_utils_1.bytesToHex(gForHash));\r\n console.log(bin_utils_1.bytesToHex(b_for_hash));\r\n let g_x = index_1.powMod(g, x, p);\r\n console.log('g_x', index_1.bigInt2str(g_x, 16));\r\n let k = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(pForHash, gForHash));\r\n k = index_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(k)), 16);\r\n console.log('k', index_1.bigInt2str(k, 16));\r\n // kg_x = (k * g_x) % p\r\n let kg_x = index_1.mod(index_1.mult(k, g_x), p);\r\n // good\r\n console.log('kg_x', index_1.bigInt2str(kg_x, 16));\r\n let is_good_mod_exp_first = (modexp, prime) => {\r\n let diff = index_1.sub(prime, modexp);\r\n let min_diff_bits_count = 2048 - 64;\r\n let max_mod_exp_size = 256;\r\n if (index_1.negative(diff) ||\r\n index_1.bitSize(diff) < min_diff_bits_count ||\r\n index_1.bitSize(modexp) < min_diff_bits_count ||\r\n Math.floor((index_1.bitSize(modexp) + 7) / 8) > max_mod_exp_size)\r\n return false;\r\n return true;\r\n };\r\n let generate_and_check_random = () => __awaiter(this, void 0, void 0, function* () {\r\n //let random_size = 256;\r\n while (true) {\r\n /* let a = addPadding([], random_size, false, true);\r\n a = str2bigInt(bytesToHex(a), 16); */\r\n //let a = randBigInt(random_size, 1);\r\n let a = index_1.str2bigInt(bin_utils_1.bytesToHex(state.secure_random), 16);\r\n /* console.log('a', bigInt2str(a, 16));\r\n break; */\r\n let A = index_1.powMod(g, a, p);\r\n //console.log('A', bigInt2str(A, 16));\r\n if (is_good_mod_exp_first(A, p)) {\r\n // a_for_hash = big_num_for_hash(A)\r\n let a_for_hash = bin_utils_1.bytesFromHex(index_1.bigInt2str(A, 16));\r\n let s = yield cryptoworker_1.default.sha256Hash(bin_utils_1.bufferConcat(new Uint8Array(a_for_hash), new Uint8Array(b_for_hash)));\r\n let u = index_1.str2bigInt(bin_utils_1.bytesToHex(new Uint8Array(s)), 16);\r\n //if(u > 0)\r\n if (!index_1.isZero(u) && !index_1.negative(u))\r\n return { a, a_for_hash, u };\r\n }\r\n }\r\n });\r\n let { a, a_for_hash, u } = yield generate_and_check_random();\r\n console.log('a', index_1.bigInt2str(a, 16));\r\n console.log('a_for_hash', bin_utils_1.bytesToHex(a_for_hash));\r\n console.log('u', index_1.bigInt2str(u, 16));\r\n // g_b = (B - kg_x) % p\r\n console.log('B - kg_x', index_1.bigInt2str(index_1.sub(B, kg_x), 16));\r\n //let g_b = mod(sub(B, kg_x), p);\r\n /* let g_b = sub(B, kg_x);\r\n if(negative(g_b)) g_b = add(g_b, p);\r\n else g_b = mod(g_b, p); */\r\n /* let g_b; // g_b = sub(mod(B, p), kg_x);\r\n if(!negative(sub(B, kg_x))) g_b = sub(mod(B, p), kg_x);\r\n else g_b = mod(sub(B, kg_x), p); */\r\n /* let lol = trim(sub(B, kg_x), 10);\r\n console.log('llalala', bigInt2str(lol, 16)); */\r\n let g_b;\r\n if (!index_1.greater(B, kg_x)) {\r\n console.log('negative');\r\n g_b = index_1.add(B, p);\r\n }\r\n else\r\n g_b = B;\r\n g_b = index_1.mod(index_1.sub(g_b, kg_x), p);\r\n //g_b = mod(g_b, p);\r\n //console.log('g_b', bigInt2str(g_b, 16));\r\n /* if(!is_good_mod_exp_first(g_b, p))\r\n throw new Error('bad g_b'); */\r\n let ux = index_1.mult(u, x);\r\n let a_ux = index_1.add(a, ux);\r\n let S = index_1.powMod(g_b, a_ux, p);\r\n let K = yield cryptoworker_1.default.sha256Hash(padArray(bin_utils_1.bytesFromHex(index_1.bigInt2str(S, 16)), 256));\r\n let h1 = yield cryptoworker_1.default.sha256Hash(pForHash);\r\n let h2 = yield cryptoworker_1.default.sha256Hash(gForHash);\r\n h1 = bin_utils_1.bytesXor(new Uint8Array(h1), new Uint8Array(h2));\r\n /* let buff = bufferConcat(h1, await CryptoWorker.sha256Hash(algo.salt1));\r\n buff = bufferConcat(buff, await CryptoWorker.sha256Hash(algo.salt2));\r\n buff = bufferConcat(buff, a_for_hash);\r\n buff = bufferConcat(buff, b_for_hash);\r\n buff = bufferConcat(buff, K); */\r\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);\r\n let M1 = yield cryptoworker_1.default.sha256Hash(buff);\r\n let out = {\r\n _: 'inputCheckPasswordSRP',\r\n srp_id: state.srp_id,\r\n A: new Uint8Array(a_for_hash),\r\n M1: new Uint8Array(M1)\r\n };\r\n console.log('out', bin_utils_1.bytesToHex(out.A), bin_utils_1.bytesToHex(out.M1));\r\n return out;\r\n /* console.log(gForHash, pForHash, bForHash); */\r\n });\r\n }\r\n}\r\nexports.PasswordManager = PasswordManager;\r\nexports.default = new PasswordManager();\r\n"
}
],
"filteredModules": 0,
"logging": {
"webpack.buildChunkGraph.visitModules": {
"entries": [],
"filteredEntries": 2,
"debug": false
}
},
"children": [],
"name": "worker"
}
]
}